@odoo/o-spreadsheet 15.2.0 → 15.2.1
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 +187 -132
- package/dist/o_spreadsheet.d.ts +19 -17
- package/dist/o_spreadsheet.esm.js +187 -132
- package/dist/o_spreadsheet.iife.js +187 -132
- package/dist/o_spreadsheet.iife.min.js +31 -31
- package/package.json +5 -2
package/dist/o_spreadsheet.d.ts
CHANGED
|
@@ -553,6 +553,7 @@ interface WorkbookData {
|
|
|
553
553
|
};
|
|
554
554
|
};
|
|
555
555
|
revisionId: UID;
|
|
556
|
+
uniqueFigureIds: boolean;
|
|
556
557
|
}
|
|
557
558
|
interface ExcelWorkbookData extends WorkbookData {
|
|
558
559
|
sheets: ExcelSheetData[];
|
|
@@ -1294,7 +1295,7 @@ interface UpdateChartCommand extends SheetDependentCommand {
|
|
|
1294
1295
|
id: UID;
|
|
1295
1296
|
definition: ChartUIDefinitionUpdate;
|
|
1296
1297
|
}
|
|
1297
|
-
interface RefreshChartCommand
|
|
1298
|
+
interface RefreshChartCommand {
|
|
1298
1299
|
type: "REFRESH_CHART";
|
|
1299
1300
|
id: UID;
|
|
1300
1301
|
}
|
|
@@ -1794,7 +1795,8 @@ declare const enum CommandResult {
|
|
|
1794
1795
|
InvalidViewportSize = 54,
|
|
1795
1796
|
FigureDoesNotExist = 55,
|
|
1796
1797
|
DuplicatedFigureId = 56,
|
|
1797
|
-
DuplicatedChartId = 57
|
|
1798
|
+
DuplicatedChartId = 57,
|
|
1799
|
+
ChartDoesNotExist = 58
|
|
1798
1800
|
}
|
|
1799
1801
|
interface CommandHandler<T> {
|
|
1800
1802
|
allowDispatch(command: T): CommandResult | CommandResult[];
|
|
@@ -2346,21 +2348,19 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
|
|
|
2346
2348
|
* This plugin creates and displays charts
|
|
2347
2349
|
* */
|
|
2348
2350
|
interface ChartState {
|
|
2349
|
-
readonly chartFigures:
|
|
2350
|
-
[sheetId: UID]: Record<UID, ChartDefinition | undefined> | undefined;
|
|
2351
|
-
};
|
|
2351
|
+
readonly chartFigures: Record<UID, ChartDefinition | undefined>;
|
|
2352
2352
|
}
|
|
2353
2353
|
declare class ChartPlugin extends CorePlugin<ChartState> implements ChartState {
|
|
2354
|
-
static getters: readonly ["getChartDefinition", "getChartDefinitionUI", "
|
|
2355
|
-
readonly chartFigures:
|
|
2354
|
+
static getters: readonly ["getChartDefinition", "getChartDefinitionUI", "getChartsIdBySheet"];
|
|
2355
|
+
readonly chartFigures: Record<UID, ChartDefinition>;
|
|
2356
2356
|
adaptRanges(applyChange: ApplyRangeChange): void;
|
|
2357
2357
|
private adaptDataSetRanges;
|
|
2358
2358
|
private adaptLabelRanges;
|
|
2359
2359
|
allowDispatch(cmd: Command): CommandResult | CommandResult[];
|
|
2360
2360
|
handle(cmd: CoreCommand): void;
|
|
2361
|
-
getChartDefinition(
|
|
2362
|
-
|
|
2363
|
-
getChartDefinitionUI(sheetId: UID, figureId: UID
|
|
2361
|
+
getChartDefinition(figureId: UID): ChartDefinition | undefined;
|
|
2362
|
+
getChartsIdBySheet(sheetId: UID): string[];
|
|
2363
|
+
getChartDefinitionUI(sheetId: UID, figureId: UID): ChartUIDefinition | undefined;
|
|
2364
2364
|
private getChartDefinitionExcel;
|
|
2365
2365
|
private toExcelDataset;
|
|
2366
2366
|
import(data: WorkbookData): void;
|
|
@@ -2382,6 +2382,7 @@ declare class ChartPlugin extends CorePlugin<ChartState> implements ChartState {
|
|
|
2382
2382
|
private checkDataset;
|
|
2383
2383
|
private checkLabelRange;
|
|
2384
2384
|
private checkChartDuplicate;
|
|
2385
|
+
private checkChartExists;
|
|
2385
2386
|
}
|
|
2386
2387
|
|
|
2387
2388
|
interface ConditionalFormatState {
|
|
@@ -2430,12 +2431,14 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
|
|
|
2430
2431
|
|
|
2431
2432
|
interface FigureState {
|
|
2432
2433
|
readonly figures: {
|
|
2433
|
-
[sheet:
|
|
2434
|
+
[sheet: string]: Record<UID, Figure | undefined> | undefined;
|
|
2434
2435
|
};
|
|
2435
2436
|
}
|
|
2436
2437
|
declare class FigurePlugin extends CorePlugin<FigureState> implements FigureState {
|
|
2437
|
-
static getters: readonly ["getFigures", "getFigure"];
|
|
2438
|
-
readonly figures:
|
|
2438
|
+
static getters: readonly ["getFigures", "getFigure", "getFigureSheetId"];
|
|
2439
|
+
readonly figures: {
|
|
2440
|
+
[sheet: string]: Record<UID, Figure | undefined> | undefined;
|
|
2441
|
+
};
|
|
2439
2442
|
allowDispatch(cmd: CoreCommand): CommandResult;
|
|
2440
2443
|
handle(cmd: CoreCommand): void;
|
|
2441
2444
|
private updateFigure;
|
|
@@ -2446,6 +2449,7 @@ declare class FigurePlugin extends CorePlugin<FigureState> implements FigureStat
|
|
|
2446
2449
|
private checkFigureDuplicate;
|
|
2447
2450
|
getFigures(sheetId: UID): Figure[];
|
|
2448
2451
|
getFigure(sheetId: string, figureId: string): Figure | undefined;
|
|
2452
|
+
getFigureSheetId(figureId: string): UID | undefined;
|
|
2449
2453
|
import(data: WorkbookData): void;
|
|
2450
2454
|
export(data: WorkbookData): void;
|
|
2451
2455
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
@@ -2965,13 +2969,11 @@ declare class EvaluationChartPlugin extends UIPlugin {
|
|
|
2965
2969
|
static getters: readonly ["getChartRuntime"];
|
|
2966
2970
|
static modes: Mode[];
|
|
2967
2971
|
readonly chartRuntime: {
|
|
2968
|
-
[
|
|
2969
|
-
[figureId: UID]: ChartConfiguration;
|
|
2970
|
-
} | undefined;
|
|
2972
|
+
[figureId: string]: ChartConfiguration;
|
|
2971
2973
|
};
|
|
2972
2974
|
private outOfDate;
|
|
2973
2975
|
handle(cmd: Command): void;
|
|
2974
|
-
getChartRuntime(
|
|
2976
|
+
getChartRuntime(figureId: string): ChartConfiguration | undefined;
|
|
2975
2977
|
private truncateLabel;
|
|
2976
2978
|
private getDefaultConfiguration;
|
|
2977
2979
|
private getSheetIdsUsedInChart;
|