@odoo/o-spreadsheet 16.0.7 → 16.0.9
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 +268 -83
- package/dist/o-spreadsheet.d.ts +35 -6
- package/dist/o-spreadsheet.esm.js +268 -83
- package/dist/o-spreadsheet.iife.js +268 -83
- package/dist/o-spreadsheet.iife.min.js +242 -242
- package/package.json +1 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -818,6 +818,7 @@ interface ExcelWorkbookData extends WorkbookData {
|
|
|
818
818
|
interface ExcelCellData extends CellData {
|
|
819
819
|
value: CellValue;
|
|
820
820
|
isFormula: Boolean;
|
|
821
|
+
computedFormat?: Format;
|
|
821
822
|
}
|
|
822
823
|
interface ExcelSheetData extends Omit<SheetData, "figureTables"> {
|
|
823
824
|
cells: {
|
|
@@ -1053,8 +1054,9 @@ declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
1053
1054
|
*/
|
|
1054
1055
|
private coreGetters;
|
|
1055
1056
|
uuidGenerator: UuidGenerator;
|
|
1057
|
+
private readonly handlers;
|
|
1058
|
+
private readonly coreHandlers;
|
|
1056
1059
|
constructor(data?: any, config?: Partial<ModelConfig>, stateUpdateMessages?: StateUpdateMessage[], uuidGenerator?: UuidGenerator, verboseImport?: boolean);
|
|
1057
|
-
get handlers(): CommandHandler<Command>[];
|
|
1058
1060
|
joinSession(): void;
|
|
1059
1061
|
leaveSession(): void;
|
|
1060
1062
|
private setupUiPlugin;
|
|
@@ -2177,7 +2179,9 @@ declare const enum CommandResult {
|
|
|
2177
2179
|
DuplicatedFigureId = 81,
|
|
2178
2180
|
InvalidSelectionStep = 82,
|
|
2179
2181
|
DuplicatedChartId = 83,
|
|
2180
|
-
ChartDoesNotExist = 84
|
|
2182
|
+
ChartDoesNotExist = 84,
|
|
2183
|
+
InvalidHeaderIndex = 85,
|
|
2184
|
+
InvalidQuantity = 86
|
|
2181
2185
|
}
|
|
2182
2186
|
interface CommandHandler<T> {
|
|
2183
2187
|
allowDispatch(command: T): CommandResult | CommandResult[];
|
|
@@ -3386,14 +3390,16 @@ declare class HeaderSizePlugin extends CorePlugin<HeaderSizeState> implements He
|
|
|
3386
3390
|
}
|
|
3387
3391
|
|
|
3388
3392
|
declare class HeaderVisibilityPlugin extends CorePlugin {
|
|
3389
|
-
static getters: readonly ["getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
|
|
3393
|
+
static getters: readonly ["canRemoveHeaders", "getHiddenColsGroups", "getHiddenRowsGroups", "isRowHiddenByUser", "isColHiddenByUser"];
|
|
3390
3394
|
private readonly hiddenHeaders;
|
|
3391
|
-
allowDispatch(cmd: Command): CommandResult.Success | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements;
|
|
3395
|
+
allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NotEnoughElements | CommandResult.InvalidSheetId | CommandResult.TooManyHiddenElements | CommandResult.InvalidHeaderIndex;
|
|
3392
3396
|
handle(cmd: Command): void;
|
|
3397
|
+
canRemoveHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
|
|
3393
3398
|
isRowHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
|
|
3394
3399
|
isColHiddenByUser(sheetId: UID, index: HeaderIndex): boolean;
|
|
3395
3400
|
getHiddenColsGroups(sheetId: UID): ConsecutiveIndexes[];
|
|
3396
3401
|
getHiddenRowsGroups(sheetId: UID): ConsecutiveIndexes[];
|
|
3402
|
+
private getAllVisibleHeaders;
|
|
3397
3403
|
import(data: WorkbookData): void;
|
|
3398
3404
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
3399
3405
|
export(data: WorkbookData): void;
|
|
@@ -3968,7 +3974,12 @@ declare class HeaderVisibilityUIPlugin extends UIPlugin {
|
|
|
3968
3974
|
isColHidden(sheetId: UID, index: number): boolean;
|
|
3969
3975
|
isHeaderHidden(sheetId: UID, dimension: Dimension, index: number): boolean;
|
|
3970
3976
|
getNextVisibleCellPosition(sheetId: UID, col: number, row: number): Position$1;
|
|
3971
|
-
|
|
3977
|
+
/**
|
|
3978
|
+
* Find the first visible header in the range [`from` => `to`].
|
|
3979
|
+
*
|
|
3980
|
+
* Both `from` and `to` are inclusive.
|
|
3981
|
+
*/
|
|
3982
|
+
findVisibleHeader(sheetId: UID, dimension: Dimension, from: number, to: number): number | undefined;
|
|
3972
3983
|
findLastVisibleColRowIndex(sheetId: UID, dimension: Dimension, indexes: {
|
|
3973
3984
|
first: number;
|
|
3974
3985
|
last: number;
|
|
@@ -5265,6 +5276,7 @@ declare class Menu extends Component<Props$o, SpreadsheetChildEnv> {
|
|
|
5265
5276
|
private menuRef;
|
|
5266
5277
|
private position;
|
|
5267
5278
|
setup(): void;
|
|
5279
|
+
get visibleMenuItems(): MenuItem[];
|
|
5268
5280
|
get subMenuPosition(): DOMCoordinates;
|
|
5269
5281
|
get menuHeight(): Pixel;
|
|
5270
5282
|
get subMenuHeight(): Pixel;
|
|
@@ -5428,7 +5440,24 @@ declare class ContentEditableHelper {
|
|
|
5428
5440
|
start: number;
|
|
5429
5441
|
end: number;
|
|
5430
5442
|
};
|
|
5431
|
-
|
|
5443
|
+
/**
|
|
5444
|
+
* Computes the text 'index' inside this.el based on the currently selected node and its offset.
|
|
5445
|
+
* The selected node is either a Text node or an Element node.
|
|
5446
|
+
*
|
|
5447
|
+
* case 1 -Text node:
|
|
5448
|
+
* the offset is the number of characters from the start of the node. We have to add this offset to the
|
|
5449
|
+
* content length of all previous nodes.
|
|
5450
|
+
*
|
|
5451
|
+
* case 2 - Element node:
|
|
5452
|
+
* the offset is the number of child nodes before the selected node. We have to add the content length of
|
|
5453
|
+
* all the bnodes prior to the selected node as well as the content of the child node before the offset.
|
|
5454
|
+
*
|
|
5455
|
+
* See the MDN documentation for more details.
|
|
5456
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Range/startOffset
|
|
5457
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Range/endOffset
|
|
5458
|
+
*
|
|
5459
|
+
*/
|
|
5460
|
+
private findSelectionIndex;
|
|
5432
5461
|
private getStartAndEndSelection;
|
|
5433
5462
|
}
|
|
5434
5463
|
|