@odoo/o-spreadsheet 17.0.13 → 17.0.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.cjs.js +85 -70
- package/dist/o-spreadsheet.d.ts +16 -10
- package/dist/o-spreadsheet.esm.js +85 -70
- package/dist/o-spreadsheet.iife.js +85 -70
- package/dist/o-spreadsheet.iife.min.js +10 -8
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.0.
|
|
6
|
-
* @date 2024-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.14
|
|
6
|
+
* @date 2024-03-12T07:56:15.364Z
|
|
7
|
+
* @hash 6f6e1b9
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -6059,8 +6059,10 @@ function getGroup(cell, cells, filter) {
|
|
|
6059
6059
|
if (x === cell) {
|
|
6060
6060
|
found = true;
|
|
6061
6061
|
}
|
|
6062
|
-
const cellValue =
|
|
6063
|
-
|
|
6062
|
+
const cellValue = x?.isFormula
|
|
6063
|
+
? undefined
|
|
6064
|
+
: evaluateLiteral(x?.content, { locale: DEFAULT_LOCALE });
|
|
6065
|
+
if (cellValue && filter(cellValue)) {
|
|
6064
6066
|
group.push(cellValue);
|
|
6065
6067
|
}
|
|
6066
6068
|
else {
|
|
@@ -19443,10 +19445,8 @@ function createComputeFunctionFromDescription(descr) {
|
|
|
19443
19445
|
}
|
|
19444
19446
|
function buildComputeFunctionFromDescription(descr) {
|
|
19445
19447
|
return function (...args) {
|
|
19446
|
-
const
|
|
19447
|
-
const
|
|
19448
|
-
const value = computeValue(...extractArgValuesFromArgs(args));
|
|
19449
|
-
const format = computeFormat(...args);
|
|
19448
|
+
const value = descr.compute.apply(this, extractArgValuesFromArgs(args));
|
|
19449
|
+
const format = descr.computeFormat?.apply(this, args);
|
|
19450
19450
|
if (isMatrix(value)) {
|
|
19451
19451
|
if (format === undefined || isMatrix(format)) {
|
|
19452
19452
|
return value.map((col, i) => col.map((row, j) => ({ value: row, format: format?.[i]?.[j] })));
|
|
@@ -27271,7 +27271,11 @@ class GridComposer extends owl.Component {
|
|
|
27271
27271
|
}
|
|
27272
27272
|
}
|
|
27273
27273
|
updateCellReferenceVisibility() {
|
|
27274
|
-
if (this.
|
|
27274
|
+
if (this.env.model.getters.getEditionMode() === "inactive") {
|
|
27275
|
+
this.isCellReferenceVisible = false;
|
|
27276
|
+
return;
|
|
27277
|
+
}
|
|
27278
|
+
if (this.isCellReferenceVisible) {
|
|
27275
27279
|
return;
|
|
27276
27280
|
}
|
|
27277
27281
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
@@ -27300,19 +27304,21 @@ class GridCellIcon extends owl.Component {
|
|
|
27300
27304
|
static style = CSS$1;
|
|
27301
27305
|
static template = "o-spreadsheet-GridCellIcon";
|
|
27302
27306
|
get iconStyle() {
|
|
27303
|
-
const
|
|
27304
|
-
const
|
|
27307
|
+
const cellPosition = this.props.cellPosition;
|
|
27308
|
+
const merge = this.env.model.getters.getMerge(cellPosition);
|
|
27309
|
+
const zone = merge || positionToZone(cellPosition);
|
|
27310
|
+
const rect = this.env.model.getters.getVisibleRectWithoutHeaders(zone);
|
|
27311
|
+
const x = this.getIconHorizontalPosition(rect, cellPosition);
|
|
27312
|
+
const y = this.getIconVerticalPosition(rect, cellPosition);
|
|
27305
27313
|
return cssPropertiesToCss({
|
|
27306
27314
|
top: `${y + (this.props.offset?.y || 0)}px`,
|
|
27307
27315
|
left: `${x + (this.props.offset?.x || 0)}px`,
|
|
27308
27316
|
});
|
|
27309
27317
|
}
|
|
27310
|
-
getIconVerticalPosition() {
|
|
27311
|
-
const
|
|
27312
|
-
const
|
|
27313
|
-
const
|
|
27314
|
-
const end = this.env.model.getters.getRowDimensionsInViewport(sheetId, merge ? merge.bottom : row).end;
|
|
27315
|
-
const cell = this.env.model.getters.getCell(this.props.cellPosition);
|
|
27318
|
+
getIconVerticalPosition(rect, cellPosition) {
|
|
27319
|
+
const start = rect.y;
|
|
27320
|
+
const end = rect.y + rect.height;
|
|
27321
|
+
const cell = this.env.model.getters.getCell(cellPosition);
|
|
27316
27322
|
const align = this.props.verticalAlign || cell?.style?.verticalAlign || DEFAULT_VERTICAL_ALIGN;
|
|
27317
27323
|
switch (align) {
|
|
27318
27324
|
case "bottom":
|
|
@@ -27324,13 +27330,11 @@ class GridCellIcon extends owl.Component {
|
|
|
27324
27330
|
return end - GRID_ICON_EDGE_LENGTH - centeringOffset;
|
|
27325
27331
|
}
|
|
27326
27332
|
}
|
|
27327
|
-
getIconHorizontalPosition() {
|
|
27328
|
-
const
|
|
27329
|
-
const
|
|
27330
|
-
const
|
|
27331
|
-
const
|
|
27332
|
-
const cell = this.env.model.getters.getCell(this.props.cellPosition);
|
|
27333
|
-
const evaluatedCell = this.env.model.getters.getEvaluatedCell(this.props.cellPosition);
|
|
27333
|
+
getIconHorizontalPosition(rect, cellPosition) {
|
|
27334
|
+
const start = rect.x;
|
|
27335
|
+
const end = rect.x + rect.width;
|
|
27336
|
+
const cell = this.env.model.getters.getCell(cellPosition);
|
|
27337
|
+
const evaluatedCell = this.env.model.getters.getEvaluatedCell(cellPosition);
|
|
27334
27338
|
const align = this.props.horizontalAlign || cell?.style?.align || evaluatedCell.defaultAlign;
|
|
27335
27339
|
switch (align) {
|
|
27336
27340
|
case "right":
|
|
@@ -27422,6 +27426,8 @@ css /* scss */ `
|
|
|
27422
27426
|
height: ${CHECKBOX_WIDTH}px;
|
|
27423
27427
|
accent-color: #808080;
|
|
27424
27428
|
margin: ${MARGIN}px;
|
|
27429
|
+
/** required to prevent the checkbox position to be sensible to the font-size (affects Firefox) */
|
|
27430
|
+
position: absolute;
|
|
27425
27431
|
}
|
|
27426
27432
|
`;
|
|
27427
27433
|
class DataValidationCheckbox extends owl.Component {
|
|
@@ -27437,7 +27443,7 @@ class DataValidationCheckbox extends owl.Component {
|
|
|
27437
27443
|
}
|
|
27438
27444
|
get isDisabled() {
|
|
27439
27445
|
const cell = this.env.model.getters.getCell(this.props.cellPosition);
|
|
27440
|
-
return !!cell?.isFormula;
|
|
27446
|
+
return this.env.model.getters.isReadonly() || !!cell?.isFormula;
|
|
27441
27447
|
}
|
|
27442
27448
|
}
|
|
27443
27449
|
DataValidationCheckbox.props = {
|
|
@@ -27479,12 +27485,17 @@ class DataValidationOverlay extends owl.Component {
|
|
|
27479
27485
|
static template = "o-spreadsheet-DataValidationOverlay";
|
|
27480
27486
|
static components = { GridCellIcon, DataValidationCheckbox, DataValidationListIcon };
|
|
27481
27487
|
get checkBoxCellPositions() {
|
|
27482
|
-
return this.env.model.getters
|
|
27488
|
+
return this.env.model.getters
|
|
27489
|
+
.getVisibleCellPositions()
|
|
27490
|
+
.filter(this.env.model.getters.isCellValidCheckbox);
|
|
27483
27491
|
}
|
|
27484
27492
|
get listIconsCellPositions() {
|
|
27485
|
-
|
|
27486
|
-
|
|
27487
|
-
|
|
27493
|
+
if (this.env.model.getters.isReadonly()) {
|
|
27494
|
+
return [];
|
|
27495
|
+
}
|
|
27496
|
+
return this.env.model.getters
|
|
27497
|
+
.getVisibleCellPositions()
|
|
27498
|
+
.filter(this.env.model.getters.cellHasListDataValidationIcon);
|
|
27488
27499
|
}
|
|
27489
27500
|
}
|
|
27490
27501
|
DataValidationOverlay.props = {};
|
|
@@ -38600,7 +38611,6 @@ class SheetPlugin extends CorePlugin {
|
|
|
38600
38611
|
"getNumberHeaders",
|
|
38601
38612
|
"getGridLinesVisibility",
|
|
38602
38613
|
"getNextSheetName",
|
|
38603
|
-
"isEmpty",
|
|
38604
38614
|
"getSheetSize",
|
|
38605
38615
|
"getSheetZone",
|
|
38606
38616
|
"getPaneDivisions",
|
|
@@ -38975,14 +38985,6 @@ class SheetPlugin extends CorePlugin {
|
|
|
38975
38985
|
// ---------------------------------------------------------------------------
|
|
38976
38986
|
// Row/Col manipulation
|
|
38977
38987
|
// ---------------------------------------------------------------------------
|
|
38978
|
-
/**
|
|
38979
|
-
* Check if a zone only contains empty cells
|
|
38980
|
-
*/
|
|
38981
|
-
isEmpty(sheetId, zone) {
|
|
38982
|
-
return positions(zone)
|
|
38983
|
-
.map(({ col, row }) => this.getCell({ sheetId, col, row }))
|
|
38984
|
-
.every((cell) => !cell || cell.content === "");
|
|
38985
|
-
}
|
|
38986
38988
|
getCommandZones(cmd) {
|
|
38987
38989
|
const zones = [];
|
|
38988
38990
|
if ("zone" in cmd) {
|
|
@@ -41436,6 +41438,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
41436
41438
|
"getEvaluatedCellsInZone",
|
|
41437
41439
|
"getSpreadPositionsOf",
|
|
41438
41440
|
"getArrayFormulaSpreadingOn",
|
|
41441
|
+
"isEmpty",
|
|
41439
41442
|
];
|
|
41440
41443
|
shouldRebuildDependenciesGraph = true;
|
|
41441
41444
|
evaluator;
|
|
@@ -41540,6 +41543,14 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
41540
41543
|
getArrayFormulaSpreadingOn(position) {
|
|
41541
41544
|
return this.evaluator.getArrayFormulaSpreadingOn(position);
|
|
41542
41545
|
}
|
|
41546
|
+
/**
|
|
41547
|
+
* Check if a zone only contains empty cells
|
|
41548
|
+
*/
|
|
41549
|
+
isEmpty(sheetId, zone) {
|
|
41550
|
+
return positions(zone)
|
|
41551
|
+
.map(({ col, row }) => this.getEvaluatedCell({ sheetId, col, row }))
|
|
41552
|
+
.every((cell) => cell.type === CellValueType.empty);
|
|
41553
|
+
}
|
|
41543
41554
|
// ---------------------------------------------------------------------------
|
|
41544
41555
|
// Export
|
|
41545
41556
|
// ---------------------------------------------------------------------------
|
|
@@ -42186,8 +42197,6 @@ const VALID_RESULT = { isValid: true };
|
|
|
42186
42197
|
class EvaluationDataValidationPlugin extends UIPlugin {
|
|
42187
42198
|
static getters = [
|
|
42188
42199
|
"getDataValidationInvalidCriterionValueMessage",
|
|
42189
|
-
"getDataValidationCheckBoxCellPositions",
|
|
42190
|
-
"getDataValidationListCellsPositions",
|
|
42191
42200
|
"getInvalidDataValidationMessage",
|
|
42192
42201
|
"getValidationResultForCellValue",
|
|
42193
42202
|
"isCellValidCheckbox",
|
|
@@ -42251,19 +42260,6 @@ class EvaluationDataValidationPlugin extends UIPlugin {
|
|
|
42251
42260
|
const error = this.getRuleErrorForCellValue(cellValue, cellPosition, rule);
|
|
42252
42261
|
return error ? { error, rule, isValid: false } : VALID_RESULT;
|
|
42253
42262
|
}
|
|
42254
|
-
getDataValidationCheckBoxCellPositions() {
|
|
42255
|
-
const rules = this.getters
|
|
42256
|
-
.getDataValidationRules(this.getters.getActiveSheetId())
|
|
42257
|
-
.filter((rule) => rule.criterion.type === "isBoolean");
|
|
42258
|
-
return getCellPositionsInRanges(rules.map((rule) => rule.ranges).flat()).filter((position) => this.isCellValidCheckbox(position));
|
|
42259
|
-
}
|
|
42260
|
-
getDataValidationListCellsPositions() {
|
|
42261
|
-
const rules = this.getters
|
|
42262
|
-
.getDataValidationRules(this.getters.getActiveSheetId())
|
|
42263
|
-
.filter((rule) => (rule.criterion.type === "isValueInList" || rule.criterion.type === "isValueInRange") &&
|
|
42264
|
-
rule.criterion.displayStyle === "arrow");
|
|
42265
|
-
return getCellPositionsInRanges(rules.map((rule) => rule.ranges).flat());
|
|
42266
|
-
}
|
|
42267
42263
|
getValidationResultForCell(cellPosition) {
|
|
42268
42264
|
const { col, row, sheetId } = cellPosition;
|
|
42269
42265
|
if (!this.validationResults[sheetId]) {
|
|
@@ -50086,6 +50082,8 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
50086
50082
|
"getEdgeScrollRow",
|
|
50087
50083
|
"getVisibleFigures",
|
|
50088
50084
|
"getVisibleRect",
|
|
50085
|
+
"getVisibleRectWithoutHeaders",
|
|
50086
|
+
"getVisibleCellPositions",
|
|
50089
50087
|
"getColRowOffsetInViewport",
|
|
50090
50088
|
"getMainViewportCoordinates",
|
|
50091
50089
|
"getActiveSheetScrollInfo",
|
|
@@ -50329,6 +50327,26 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
50329
50327
|
const viewports = this.getSubViewports(sheetId);
|
|
50330
50328
|
return [...new Set(viewports.map((v) => range(v.top, v.bottom + 1)).flat())].filter((row) => !this.getters.isHeaderHidden(sheetId, "ROW", row));
|
|
50331
50329
|
}
|
|
50330
|
+
/**
|
|
50331
|
+
* Get the positions of all the cells that are visible in the viewport, taking merges into account.
|
|
50332
|
+
*/
|
|
50333
|
+
getVisibleCellPositions() {
|
|
50334
|
+
const visibleCols = this.getSheetViewVisibleCols();
|
|
50335
|
+
const visibleRows = this.getSheetViewVisibleRows();
|
|
50336
|
+
const sheetId = this.getters.getActiveSheetId();
|
|
50337
|
+
const positions = [];
|
|
50338
|
+
for (const col of visibleCols) {
|
|
50339
|
+
for (const row of visibleRows) {
|
|
50340
|
+
const position = { sheetId, col, row };
|
|
50341
|
+
const mainPosition = this.getters.getMainCellPosition(position);
|
|
50342
|
+
if (mainPosition.row !== row || mainPosition.col !== col) {
|
|
50343
|
+
continue;
|
|
50344
|
+
}
|
|
50345
|
+
positions.push(position);
|
|
50346
|
+
}
|
|
50347
|
+
}
|
|
50348
|
+
return positions;
|
|
50349
|
+
}
|
|
50332
50350
|
/**
|
|
50333
50351
|
* Return the main viewport maximum size relative to the client size.
|
|
50334
50352
|
*/
|
|
@@ -50448,6 +50466,13 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
50448
50466
|
* Computes the coordinates and size to draw the zone on the canvas
|
|
50449
50467
|
*/
|
|
50450
50468
|
getVisibleRect(zone) {
|
|
50469
|
+
const rect = this.getVisibleRectWithoutHeaders(zone);
|
|
50470
|
+
return { ...rect, x: rect.x + this.gridOffsetX, y: rect.y + this.gridOffsetY };
|
|
50471
|
+
}
|
|
50472
|
+
/**
|
|
50473
|
+
* Computes the coordinates and size to draw the zone without taking the grid offset into account
|
|
50474
|
+
*/
|
|
50475
|
+
getVisibleRectWithoutHeaders(zone) {
|
|
50451
50476
|
const sheetId = this.getters.getActiveSheetId();
|
|
50452
50477
|
const viewportRects = this.getSubViewports(sheetId)
|
|
50453
50478
|
.map((viewport) => viewport.getRect(zone))
|
|
@@ -50459,12 +50484,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
50459
50484
|
const y = Math.min(...viewportRects.map((rect) => rect.y));
|
|
50460
50485
|
const width = Math.max(...viewportRects.map((rect) => rect.x + rect.width)) - x;
|
|
50461
50486
|
const height = Math.max(...viewportRects.map((rect) => rect.y + rect.height)) - y;
|
|
50462
|
-
return {
|
|
50463
|
-
x: x + this.gridOffsetX,
|
|
50464
|
-
y: y + this.gridOffsetY,
|
|
50465
|
-
width,
|
|
50466
|
-
height,
|
|
50467
|
-
};
|
|
50487
|
+
return { x, y, width, height };
|
|
50468
50488
|
}
|
|
50469
50489
|
/**
|
|
50470
50490
|
* Returns the position of the MainViewport relatively to the start of the grid (without headers)
|
|
@@ -50688,13 +50708,8 @@ class HeaderPositionsUIPlugin extends UIPlugin {
|
|
|
50688
50708
|
}
|
|
50689
50709
|
break;
|
|
50690
50710
|
case "UPDATE_CELL":
|
|
50691
|
-
|
|
50692
|
-
|
|
50693
|
-
this.isDirty = true;
|
|
50694
|
-
}
|
|
50695
|
-
else {
|
|
50696
|
-
this.headerPositions[cmd.sheetId] = this.computeHeaderPositionsOfSheet(cmd.sheetId);
|
|
50697
|
-
}
|
|
50711
|
+
this.headerPositions = {};
|
|
50712
|
+
this.isDirty = true;
|
|
50698
50713
|
break;
|
|
50699
50714
|
case "UPDATE_FILTER":
|
|
50700
50715
|
case "REMOVE_FILTER_TABLE":
|
|
@@ -56941,6 +56956,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
56941
56956
|
exports.tokenize = tokenize;
|
|
56942
56957
|
|
|
56943
56958
|
|
|
56944
|
-
__info__.version = "17.0.
|
|
56945
|
-
__info__.date = "2024-
|
|
56946
|
-
__info__.hash = "
|
|
56959
|
+
__info__.version = "17.0.14";
|
|
56960
|
+
__info__.date = "2024-03-12T07:56:15.364Z";
|
|
56961
|
+
__info__.hash = "6f6e1b9";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -3981,7 +3981,7 @@ interface SheetState {
|
|
|
3981
3981
|
readonly cellPosition: Record<UID, CellPosition | undefined>;
|
|
3982
3982
|
}
|
|
3983
3983
|
declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
3984
|
-
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "
|
|
3984
|
+
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "getEvaluationSheets", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders"];
|
|
3985
3985
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
3986
3986
|
readonly orderedSheetIds: UID[];
|
|
3987
3987
|
readonly sheets: Record<UID, Sheet | undefined>;
|
|
@@ -4030,10 +4030,6 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
|
4030
4030
|
* This validation ensures that all rows or columns cannot be deleted when frozen panes exist.
|
|
4031
4031
|
*/
|
|
4032
4032
|
checkElementsIncludeAllNonFrozenHeaders(sheetId: UID, dimension: Dimension, elements: HeaderIndex[]): boolean;
|
|
4033
|
-
/**
|
|
4034
|
-
* Check if a zone only contains empty cells
|
|
4035
|
-
*/
|
|
4036
|
-
isEmpty(sheetId: UID, zone: Zone): boolean;
|
|
4037
4033
|
getCommandZones(cmd: Command): Zone[];
|
|
4038
4034
|
/**
|
|
4039
4035
|
* Check if zones in the command are well formed and
|
|
@@ -4128,7 +4124,7 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
|
4128
4124
|
}
|
|
4129
4125
|
|
|
4130
4126
|
declare class EvaluationPlugin extends UIPlugin {
|
|
4131
|
-
static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getSpreadPositionsOf", "getArrayFormulaSpreadingOn"];
|
|
4127
|
+
static getters: readonly ["evaluateFormula", "getCorrespondingFormulaCell", "getRangeFormattedValues", "getRangeValues", "getRangeFormats", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getSpreadPositionsOf", "getArrayFormulaSpreadingOn", "isEmpty"];
|
|
4132
4128
|
private shouldRebuildDependenciesGraph;
|
|
4133
4129
|
private evaluator;
|
|
4134
4130
|
private positionsToUpdate;
|
|
@@ -4154,6 +4150,10 @@ declare class EvaluationPlugin extends UIPlugin {
|
|
|
4154
4150
|
getEvaluatedCellsInZone(sheetId: UID, zone: Zone): EvaluatedCell[];
|
|
4155
4151
|
getSpreadPositionsOf(position: CellPosition): CellPosition[];
|
|
4156
4152
|
getArrayFormulaSpreadingOn(position: CellPosition): CellPosition | undefined;
|
|
4153
|
+
/**
|
|
4154
|
+
* Check if a zone only contains empty cells
|
|
4155
|
+
*/
|
|
4156
|
+
isEmpty(sheetId: UID, zone: Zone): boolean;
|
|
4157
4157
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
4158
4158
|
/**
|
|
4159
4159
|
* Returns the corresponding formula cell of a given cell
|
|
@@ -4253,7 +4253,7 @@ type SheetValidationResult = {
|
|
|
4253
4253
|
[col: HeaderIndex]: Array<Lazy<ValidationResult>>;
|
|
4254
4254
|
};
|
|
4255
4255
|
declare class EvaluationDataValidationPlugin extends UIPlugin {
|
|
4256
|
-
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "
|
|
4256
|
+
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "isCellValidCheckbox", "isDataValidationInvalid"];
|
|
4257
4257
|
validationResults: Record<UID, SheetValidationResult>;
|
|
4258
4258
|
handle(cmd: CoreViewCommand): void;
|
|
4259
4259
|
isDataValidationInvalid(cellPosition: CellPosition): boolean;
|
|
@@ -4267,8 +4267,6 @@ declare class EvaluationDataValidationPlugin extends UIPlugin {
|
|
|
4267
4267
|
isCellValidCheckbox(cellPosition: CellPosition): boolean;
|
|
4268
4268
|
/** Get the validation result if the cell on the given position had the given value */
|
|
4269
4269
|
getValidationResultForCellValue(cellValue: CellValue, cellPosition: CellPosition): ValidationResult;
|
|
4270
|
-
getDataValidationCheckBoxCellPositions(): CellPosition[];
|
|
4271
|
-
getDataValidationListCellsPositions(): CellPosition[];
|
|
4272
4270
|
private getValidationResultForCell;
|
|
4273
4271
|
private computeSheetValidationResults;
|
|
4274
4272
|
private getRuleErrorForCellValue;
|
|
@@ -5123,7 +5121,7 @@ type SheetViewports = {
|
|
|
5123
5121
|
*
|
|
5124
5122
|
*/
|
|
5125
5123
|
declare class SheetViewPlugin extends UIPlugin {
|
|
5126
|
-
static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getActiveSheetDOMScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPositionVisible"];
|
|
5124
|
+
static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getActiveSheetDOMScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPositionVisible"];
|
|
5127
5125
|
readonly viewports: Record<UID, SheetViewports | undefined>;
|
|
5128
5126
|
/**
|
|
5129
5127
|
* The viewport dimensions are usually set by one of the components
|
|
@@ -5170,6 +5168,10 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
5170
5168
|
getActiveSheetDOMScrollInfo(): SheetDOMScrollInfo;
|
|
5171
5169
|
getSheetViewVisibleCols(): HeaderIndex[];
|
|
5172
5170
|
getSheetViewVisibleRows(): HeaderIndex[];
|
|
5171
|
+
/**
|
|
5172
|
+
* Get the positions of all the cells that are visible in the viewport, taking merges into account.
|
|
5173
|
+
*/
|
|
5174
|
+
getVisibleCellPositions(): CellPosition[];
|
|
5173
5175
|
/**
|
|
5174
5176
|
* Return the main viewport maximum size relative to the client size.
|
|
5175
5177
|
*/
|
|
@@ -5186,6 +5188,10 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
5186
5188
|
* Computes the coordinates and size to draw the zone on the canvas
|
|
5187
5189
|
*/
|
|
5188
5190
|
getVisibleRect(zone: Zone): Rect;
|
|
5191
|
+
/**
|
|
5192
|
+
* Computes the coordinates and size to draw the zone without taking the grid offset into account
|
|
5193
|
+
*/
|
|
5194
|
+
getVisibleRectWithoutHeaders(zone: Zone): Rect;
|
|
5189
5195
|
/**
|
|
5190
5196
|
* Returns the position of the MainViewport relatively to the start of the grid (without headers)
|
|
5191
5197
|
* It corresponds to the summed dimensions of the visible cols/rows (in x/y respectively)
|