@odoo/o-spreadsheet 19.2.0-alpha.1 → 19.2.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-engine.d.ts +89 -27
- package/dist/o-spreadsheet-engine.esm.js +2190 -1003
- package/dist/o-spreadsheet-engine.iife.js +2190 -1002
- package/dist/o-spreadsheet-engine.min.iife.js +334 -334
- package/dist/o-spreadsheet.d.ts +117 -47
- package/dist/o_spreadsheet.css +56 -17
- package/dist/o_spreadsheet.esm.js +4289 -2795
- package/dist/o_spreadsheet.iife.js +4289 -2795
- package/dist/o_spreadsheet.min.iife.js +320 -320
- package/dist/o_spreadsheet.xml +174 -122
- package/package.json +3 -3
|
@@ -143,12 +143,11 @@ type BarChartRuntime = {
|
|
|
143
143
|
interface GenericCriterion {
|
|
144
144
|
type: GenericCriterionType;
|
|
145
145
|
values: string[];
|
|
146
|
+
isPercent?: boolean;
|
|
147
|
+
isBottom?: boolean;
|
|
146
148
|
}
|
|
147
|
-
type GenericCriterionType = "containsText" | "notContainsText" | "isEqualText" | "isEmail" | "isLink" | "dateIs" | "dateIsBefore" | "dateIsOnOrBefore" | "dateIsAfter" | "dateIsOnOrAfter" | "dateIsBetween" | "dateIsNotBetween" | "dateIsValid" | "isEqual" | "isNotEqual" | "isGreaterThan" | "isGreaterOrEqualTo" | "isLessThan" | "isLessOrEqualTo" | "isBetween" | "isNotBetween" | "isBoolean" | "isValueInList" | "isValueInRange" | "customFormula" | "beginsWithText" | "endsWithText" | "isNotEmpty" | "isEmpty";
|
|
149
|
+
type GenericCriterionType = "containsText" | "notContainsText" | "isEqualText" | "isEmail" | "isLink" | "dateIs" | "dateIsBefore" | "dateIsOnOrBefore" | "dateIsAfter" | "dateIsOnOrAfter" | "dateIsBetween" | "dateIsNotBetween" | "dateIsValid" | "isEqual" | "isNotEqual" | "isGreaterThan" | "isGreaterOrEqualTo" | "isLessThan" | "isLessOrEqualTo" | "isBetween" | "isNotBetween" | "isBoolean" | "isValueInList" | "isValueInRange" | "customFormula" | "beginsWithText" | "endsWithText" | "isNotEmpty" | "isEmpty" | "top10";
|
|
148
150
|
type DateCriterionValue = "today" | "tomorrow" | "yesterday" | "lastWeek" | "lastMonth" | "lastYear" | "exactDate";
|
|
149
|
-
type EvaluatedCriterion<T extends GenericCriterion = GenericCriterion> = Omit<T, "values"> & {
|
|
150
|
-
values: CellValue[];
|
|
151
|
-
};
|
|
152
151
|
|
|
153
152
|
interface RangePart {
|
|
154
153
|
readonly colFixed: boolean;
|
|
@@ -180,6 +179,7 @@ interface Table {
|
|
|
180
179
|
readonly range: Range;
|
|
181
180
|
readonly filters: Filter[];
|
|
182
181
|
readonly config: TableConfig;
|
|
182
|
+
readonly isPivotTable?: boolean;
|
|
183
183
|
}
|
|
184
184
|
interface StaticTable extends Table {
|
|
185
185
|
readonly type: "static" | "forceStatic";
|
|
@@ -214,9 +214,13 @@ interface TableElementStyle {
|
|
|
214
214
|
style?: Style;
|
|
215
215
|
size?: number;
|
|
216
216
|
}
|
|
217
|
-
interface TableBorder
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
interface TableBorder {
|
|
218
|
+
top?: BorderDescr | null;
|
|
219
|
+
bottom?: BorderDescr | null;
|
|
220
|
+
left?: BorderDescr | null;
|
|
221
|
+
right?: BorderDescr | null;
|
|
222
|
+
horizontal?: BorderDescr | null;
|
|
223
|
+
vertical?: BorderDescr | null;
|
|
220
224
|
}
|
|
221
225
|
interface TableStyle {
|
|
222
226
|
category: string;
|
|
@@ -232,8 +236,12 @@ interface TableStyle {
|
|
|
232
236
|
lastColumn?: TableElementStyle;
|
|
233
237
|
headerRow?: TableElementStyle;
|
|
234
238
|
totalRow?: TableElementStyle;
|
|
239
|
+
measureHeader?: TableElementStyle;
|
|
240
|
+
mainSubHeaderRow?: TableElementStyle;
|
|
241
|
+
firstAlternatingSubHeaderRow?: TableElementStyle;
|
|
242
|
+
secondAlternatingSubHeaderRow?: TableElementStyle;
|
|
235
243
|
}
|
|
236
|
-
type TableStyleTemplateName =
|
|
244
|
+
type TableStyleTemplateName = string;
|
|
237
245
|
declare const filterCriterions: GenericCriterionType[];
|
|
238
246
|
type FilterCriterionType = (typeof filterCriterions)[number];
|
|
239
247
|
interface ValuesFilter {
|
|
@@ -646,6 +654,8 @@ interface CellIsRule extends SingleColorRule {
|
|
|
646
654
|
operator: ConditionalFormattingOperatorValues;
|
|
647
655
|
values: string[];
|
|
648
656
|
dateValue?: DateCriterionValue;
|
|
657
|
+
isPercent?: boolean;
|
|
658
|
+
isBottom?: boolean;
|
|
649
659
|
}
|
|
650
660
|
type ThresholdType = "value" | "number" | "percentage" | "percentile" | "formula";
|
|
651
661
|
type ColorScaleThreshold = {
|
|
@@ -688,7 +698,7 @@ interface IconSetRule {
|
|
|
688
698
|
upperInflectionPoint: IconThreshold;
|
|
689
699
|
lowerInflectionPoint: IconThreshold;
|
|
690
700
|
}
|
|
691
|
-
declare const cfOperators: readonly ["containsText", "notContainsText", "isGreaterThan", "isGreaterOrEqualTo", "isLessThan", "isLessOrEqualTo", "isBetween", "isNotBetween", "beginsWithText", "endsWithText", "isNotEmpty", "isEmpty", "isNotEqual", "isEqual", "customFormula", "dateIs", "dateIsBefore", "dateIsAfter", "dateIsOnOrBefore", "dateIsOnOrAfter"];
|
|
701
|
+
declare const cfOperators: readonly ["containsText", "notContainsText", "isGreaterThan", "isGreaterOrEqualTo", "isLessThan", "isLessOrEqualTo", "isBetween", "isNotBetween", "beginsWithText", "endsWithText", "isNotEmpty", "isEmpty", "isNotEqual", "isEqual", "customFormula", "dateIs", "dateIsBefore", "dateIsAfter", "dateIsOnOrBefore", "dateIsOnOrAfter", "top10"];
|
|
692
702
|
type ConditionalFormattingOperatorValues = (typeof cfOperators)[number];
|
|
693
703
|
|
|
694
704
|
interface ConditionalFormatState {
|
|
@@ -1118,7 +1128,7 @@ interface MergeState {
|
|
|
1118
1128
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
1119
1129
|
}
|
|
1120
1130
|
declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
1121
|
-
static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "
|
|
1131
|
+
static getters: readonly ["isInMerge", "isInSameMerge", "isMergeHidden", "getMainCellPosition", "expandZone", "doesIntersectMerge", "doesColumnsHaveCommonMerges", "doesRowsHaveCommonMerges", "getMerges", "getMerge", "getMergesInZone", "isSingleCellOrMerge", "isMainCellPosition"];
|
|
1122
1132
|
private nextId;
|
|
1123
1133
|
readonly merges: Record<UID, Record<number, Range | undefined> | undefined>;
|
|
1124
1134
|
readonly mergeCellMap: Record<UID, SheetMergeCellMap | undefined>;
|
|
@@ -1128,10 +1138,6 @@ declare class MergePlugin extends CorePlugin<MergeState> implements MergeState {
|
|
|
1128
1138
|
getMerges(sheetId: UID): Merge[];
|
|
1129
1139
|
getMerge({ sheetId, col, row }: CellPosition): Merge | undefined;
|
|
1130
1140
|
getMergesInZone(sheetId: UID, zone: Zone): Merge[];
|
|
1131
|
-
/**
|
|
1132
|
-
* Same as `getRangeString` but add all necessary merge to the range to make it a valid selection
|
|
1133
|
-
*/
|
|
1134
|
-
getSelectionRangeString(range: Range, forSheetId: UID): string;
|
|
1135
1141
|
/**
|
|
1136
1142
|
* Return true if the zone intersects an existing merge:
|
|
1137
1143
|
* if they have at least a common cell
|
|
@@ -1347,20 +1353,28 @@ interface PivotStyle {
|
|
|
1347
1353
|
displayTotals?: boolean;
|
|
1348
1354
|
displayColumnHeaders?: boolean;
|
|
1349
1355
|
displayMeasuresRow?: boolean;
|
|
1356
|
+
tableStyleId?: string;
|
|
1357
|
+
bandedRows?: boolean;
|
|
1358
|
+
bandedColumns?: boolean;
|
|
1359
|
+
hasFilters?: boolean;
|
|
1350
1360
|
}
|
|
1351
1361
|
|
|
1352
1362
|
interface Pivot$1 {
|
|
1353
1363
|
definition: PivotCoreDefinition;
|
|
1354
1364
|
formulaId: string;
|
|
1355
1365
|
}
|
|
1366
|
+
interface MeasureState {
|
|
1367
|
+
formula: RangeCompiledFormula;
|
|
1368
|
+
dependencies: Range[];
|
|
1369
|
+
}
|
|
1356
1370
|
interface CoreState {
|
|
1357
1371
|
nextFormulaId: number;
|
|
1358
1372
|
pivots: Record<UID, Pivot$1 | undefined>;
|
|
1359
1373
|
formulaIds: Record<UID, string | undefined>;
|
|
1360
|
-
compiledMeasureFormulas: Record<UID, Record<string,
|
|
1374
|
+
compiledMeasureFormulas: Record<UID, Record<string, MeasureState | undefined>>;
|
|
1361
1375
|
}
|
|
1362
1376
|
declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState {
|
|
1363
|
-
static getters: readonly ["getPivotCoreDefinition", "getPivotDisplayName", "getPivotId", "getPivotFormulaId", "getPivotIds", "getMeasureCompiledFormula", "getPivotName", "isExistingPivot"];
|
|
1377
|
+
static getters: readonly ["getPivotCoreDefinition", "getPivotDisplayName", "getPivotId", "getPivotFormulaId", "getPivotIds", "getMeasureCompiledFormula", "getPivotName", "isExistingPivot", "getMeasureFullDependencies"];
|
|
1364
1378
|
readonly nextFormulaId: number;
|
|
1365
1379
|
readonly pivots: {
|
|
1366
1380
|
[pivotId: UID]: Pivot$1 | undefined;
|
|
@@ -1368,7 +1382,7 @@ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState
|
|
|
1368
1382
|
readonly formulaIds: {
|
|
1369
1383
|
[formulaId: UID]: UID | undefined;
|
|
1370
1384
|
};
|
|
1371
|
-
readonly compiledMeasureFormulas: Record<UID, Record<string,
|
|
1385
|
+
readonly compiledMeasureFormulas: Record<UID, Record<string, MeasureState>>;
|
|
1372
1386
|
allowDispatch(cmd: CoreCommand): CommandResult | CommandResult[];
|
|
1373
1387
|
handle(cmd: CoreCommand): void;
|
|
1374
1388
|
adaptRanges(applyChange: ApplyRangeChange): void;
|
|
@@ -1387,9 +1401,11 @@ declare class PivotCorePlugin extends CorePlugin<CoreState> implements CoreState
|
|
|
1387
1401
|
getPivotFormulaId(pivotId: UID): string;
|
|
1388
1402
|
getPivotIds(): UID[];
|
|
1389
1403
|
isExistingPivot(pivotId: UID): boolean;
|
|
1390
|
-
getMeasureCompiledFormula(measure: PivotCoreMeasure): RangeCompiledFormula;
|
|
1404
|
+
getMeasureCompiledFormula(pivotId: UID, measure: PivotCoreMeasure): RangeCompiledFormula;
|
|
1405
|
+
getMeasureFullDependencies(pivotId: UID, measure: PivotCoreMeasure): Range[];
|
|
1391
1406
|
private addPivot;
|
|
1392
1407
|
private compileCalculatedMeasures;
|
|
1408
|
+
private computeMeasureFullDependencies;
|
|
1393
1409
|
private insertPivot;
|
|
1394
1410
|
private resizeSheet;
|
|
1395
1411
|
private getPivotCore;
|
|
@@ -1499,7 +1515,7 @@ interface SheetState {
|
|
|
1499
1515
|
readonly cellPosition: Record<UID, CellPosition | undefined>;
|
|
1500
1516
|
}
|
|
1501
1517
|
declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
1502
|
-
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders", "getDuplicateSheetName"];
|
|
1518
|
+
static getters: readonly ["getSheetName", "tryGetSheetName", "getSheet", "tryGetSheet", "getSheetIdByName", "getSheetIds", "getVisibleSheetIds", "isSheetVisible", "doesHeaderExist", "doesHeadersExist", "getCell", "getCellPosition", "getColsZone", "getRowCells", "getRowsZone", "getNumberCols", "getNumberRows", "getNumberHeaders", "getGridLinesVisibility", "getNextSheetName", "getSheetSize", "getSheetZone", "getPaneDivisions", "checkZonesExistInSheet", "getCommandZones", "getUnboundedZone", "checkElementsIncludeAllNonFrozenHeaders", "getDuplicateSheetName", "tryGetCellPosition"];
|
|
1503
1519
|
readonly sheetIdsMapName: Record<string, UID | undefined>;
|
|
1504
1520
|
readonly orderedSheetIds: UID[];
|
|
1505
1521
|
readonly sheets: Record<UID, Sheet | undefined>;
|
|
@@ -1533,6 +1549,7 @@ declare class SheetPlugin extends CorePlugin<SheetState> implements SheetState {
|
|
|
1533
1549
|
getRowCells(sheetId: UID, row: HeaderIndex): UID[];
|
|
1534
1550
|
getRowsZone(sheetId: UID, start: HeaderIndex, end: HeaderIndex): Zone;
|
|
1535
1551
|
getCellPosition(cellId: UID): CellPosition;
|
|
1552
|
+
tryGetCellPosition(cellId: UID): CellPosition | undefined;
|
|
1536
1553
|
getNumberCols(sheetId: UID): number;
|
|
1537
1554
|
getNumberRows(sheetId: UID): number;
|
|
1538
1555
|
getNumberHeaders(sheetId: UID, dimension: Dimension): HeaderIndex;
|
|
@@ -2535,6 +2552,7 @@ declare class Session extends EventBus<CollaborativeEvent> {
|
|
|
2535
2552
|
private onClientJoined;
|
|
2536
2553
|
private onClientLeft;
|
|
2537
2554
|
private sendUpdateMessage;
|
|
2555
|
+
private sendToTransport;
|
|
2538
2556
|
/**
|
|
2539
2557
|
* Send the next pending message
|
|
2540
2558
|
*/
|
|
@@ -2663,6 +2681,9 @@ declare class DynamicTablesPlugin extends CoreViewPlugin {
|
|
|
2663
2681
|
handle(cmd: Command): void;
|
|
2664
2682
|
finalize(): void;
|
|
2665
2683
|
private computeTables;
|
|
2684
|
+
private getDynamicTables;
|
|
2685
|
+
private getTablesFromPivots;
|
|
2686
|
+
private getTableConfigFromPivotStyle;
|
|
2666
2687
|
getFilters(sheetId: UID): Filter[];
|
|
2667
2688
|
getTables(sheetId: UID): Table[];
|
|
2668
2689
|
getFilter(position: CellPosition): Filter | undefined;
|
|
@@ -2755,6 +2776,9 @@ type SheetValidationResult = {
|
|
|
2755
2776
|
declare class EvaluationDataValidationPlugin extends CoreViewPlugin {
|
|
2756
2777
|
static getters: readonly ["getDataValidationInvalidCriterionValueMessage", "getInvalidDataValidationMessage", "getValidationResultForCellValue", "getDataValidationRangeValues", "isCellValidCheckbox", "getDataValidationCellStyle", "getDataValidationChipStyle", "isDataValidationInvalid"];
|
|
2757
2778
|
validationResults: Record<UID, SheetValidationResult>;
|
|
2779
|
+
criterionPreComputeResult: Record<UID, {
|
|
2780
|
+
[dvRuleId: UID]: unknown;
|
|
2781
|
+
}>;
|
|
2758
2782
|
handle(cmd: CoreViewCommand): void;
|
|
2759
2783
|
isDataValidationInvalid(cellPosition: CellPosition): boolean;
|
|
2760
2784
|
getDataValidationCellStyle(position: CellPosition): Style | undefined;
|
|
@@ -2766,7 +2790,7 @@ declare class EvaluationDataValidationPlugin extends CoreViewPlugin {
|
|
|
2766
2790
|
* The value must be canonicalized.
|
|
2767
2791
|
*/
|
|
2768
2792
|
getDataValidationInvalidCriterionValueMessage(criterionType: DataValidationCriterionType, value: string): string | undefined;
|
|
2769
|
-
getDataValidationRangeValues(sheetId: UID, criterion:
|
|
2793
|
+
getDataValidationRangeValues(sheetId: UID, criterion: GenericCriterion): {
|
|
2770
2794
|
value: string;
|
|
2771
2795
|
label: string;
|
|
2772
2796
|
}[];
|
|
@@ -2785,6 +2809,13 @@ declare class EvaluationDataValidationPlugin extends CoreViewPlugin {
|
|
|
2785
2809
|
private getEvaluatedCriterionValues;
|
|
2786
2810
|
}
|
|
2787
2811
|
|
|
2812
|
+
declare class FormulaTrackerPlugin extends CoreViewPlugin {
|
|
2813
|
+
static getters: readonly ["getCellsWithTrackedFormula"];
|
|
2814
|
+
private trackedCells;
|
|
2815
|
+
handle(cmd: Command): void;
|
|
2816
|
+
getCellsWithTrackedFormula(formula: string): string[];
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2788
2819
|
type Canvas2DContext = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
|
|
2789
2820
|
|
|
2790
2821
|
interface HeaderSizeState {
|
|
@@ -2933,6 +2964,12 @@ declare class SpreadsheetPivotTable {
|
|
|
2933
2964
|
field: string;
|
|
2934
2965
|
value: CellValue;
|
|
2935
2966
|
}[][];
|
|
2967
|
+
getPivotTableDimensions(pivotStyle: Required<PivotStyle>): {
|
|
2968
|
+
numberOfCols: number;
|
|
2969
|
+
numberOfRows: number;
|
|
2970
|
+
numberOfHeaderRows: number;
|
|
2971
|
+
};
|
|
2972
|
+
getNumberOfRowGroupBys(): number;
|
|
2936
2973
|
}
|
|
2937
2974
|
|
|
2938
2975
|
interface InitPivotParams {
|
|
@@ -2965,7 +3002,7 @@ interface Pivot<T = PivotRuntimeDefinition> {
|
|
|
2965
3002
|
}
|
|
2966
3003
|
|
|
2967
3004
|
declare class PivotUIPlugin extends CoreViewPlugin {
|
|
2968
|
-
static getters: readonly ["getPivot", "getFirstPivotFunction", "getPivotCellSortDirection", "getPivotIdFromPosition", "getPivotCellFromPosition", "generateNewCalculatedMeasureName", "isPivotUnused", "isSpillPivotFormula"];
|
|
3005
|
+
static getters: readonly ["getPivot", "getFirstPivotFunction", "getPivotCellSortDirection", "getPivotIdFromPosition", "getPivotCellFromPosition", "generateNewCalculatedMeasureName", "isPivotUnused", "isSpillPivotFormula", "getAllPivotArrayFormulas", "getPivotStyleAtPosition"];
|
|
2969
3006
|
private pivots;
|
|
2970
3007
|
private unusedPivotsInFormulas?;
|
|
2971
3008
|
private custom;
|
|
@@ -3008,6 +3045,16 @@ declare class PivotUIPlugin extends CoreViewPlugin {
|
|
|
3008
3045
|
recreate: boolean;
|
|
3009
3046
|
}): void;
|
|
3010
3047
|
private _getUnusedPivotsInFormulas;
|
|
3048
|
+
getAllPivotArrayFormulas(): {
|
|
3049
|
+
position: CellPosition;
|
|
3050
|
+
pivotStyle: Required<PivotStyle>;
|
|
3051
|
+
pivotId: UID;
|
|
3052
|
+
}[];
|
|
3053
|
+
getPivotStyleAtPosition(position: CellPosition): {
|
|
3054
|
+
pivotStyle: Required<PivotStyle>;
|
|
3055
|
+
pivotId: UID;
|
|
3056
|
+
} | undefined;
|
|
3057
|
+
private isMainFunctionPivotSpreadFunction;
|
|
3011
3058
|
}
|
|
3012
3059
|
|
|
3013
3060
|
/**
|
|
@@ -3447,7 +3494,6 @@ declare class SplitToColumnsPlugin extends UIPlugin {
|
|
|
3447
3494
|
}
|
|
3448
3495
|
|
|
3449
3496
|
declare class SubtotalEvaluationPlugin extends UIPlugin {
|
|
3450
|
-
private subtotalCells;
|
|
3451
3497
|
handle(cmd: Command): void;
|
|
3452
3498
|
}
|
|
3453
3499
|
|
|
@@ -3461,6 +3507,7 @@ declare class TableComputedStylePlugin extends UIPlugin {
|
|
|
3461
3507
|
getCellTableBorder(position: CellPosition): Border | undefined;
|
|
3462
3508
|
getCellTableBorderZone(sheetId: UID, zone: Zone): PositionMap<Border>;
|
|
3463
3509
|
private computeTableStyle;
|
|
3510
|
+
private getTableMetaData;
|
|
3464
3511
|
/**
|
|
3465
3512
|
* Get the actual table config that will be used to compute the table style. It is different from
|
|
3466
3513
|
* the config of the table because of hidden rows and columns in the sheet. For example remove the
|
|
@@ -3600,6 +3647,9 @@ declare class ClipboardPlugin extends UIPlugin {
|
|
|
3600
3647
|
constructor(config: UIPluginConfig);
|
|
3601
3648
|
allowDispatch(cmd: LocalCommand): CommandResult;
|
|
3602
3649
|
handle(cmd: Command): void;
|
|
3650
|
+
private getCopiedDataAbove;
|
|
3651
|
+
private getCopiedDataOnLeft;
|
|
3652
|
+
private getCopiedDataAboveOnLeft;
|
|
3603
3653
|
private convertTextToClipboardData;
|
|
3604
3654
|
private selectClipboardHandlers;
|
|
3605
3655
|
private isCutAllowedOn;
|
|
@@ -3695,7 +3745,7 @@ declare class HeaderPositionsUIPlugin extends UIPlugin {
|
|
|
3695
3745
|
*/
|
|
3696
3746
|
declare class GridSelectionPlugin extends UIPlugin {
|
|
3697
3747
|
static layers: readonly ["Selection"];
|
|
3698
|
-
static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveSheetName", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getSelectedCells", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSingleColSelected", "getElementsFromSelection", "tryGetActiveSheetId", "isGridSelectionActive", "getSelectecUnboundedZone"];
|
|
3748
|
+
static getters: readonly ["getActiveSheet", "getActiveSheetId", "getActiveSheetName", "getActiveCell", "getActiveCols", "getActiveRows", "getCurrentStyle", "getSelectedZones", "getSelectedZone", "getSelectedCells", "getSelectedFigureId", "getSelection", "getActivePosition", "getSheetPosition", "isSingleColSelected", "getElementsFromSelection", "tryGetActiveSheetId", "isGridSelectionActive", "getSelectecUnboundedZone", "getSelectionRangeString"];
|
|
3699
3749
|
private gridSelection;
|
|
3700
3750
|
private selectedFigureId;
|
|
3701
3751
|
private sheetsData;
|
|
@@ -3736,6 +3786,12 @@ declare class GridSelectionPlugin extends UIPlugin {
|
|
|
3736
3786
|
* if dimension === "ROW" => [2,3,4,5]
|
|
3737
3787
|
*/
|
|
3738
3788
|
getElementsFromSelection(dimension: Dimension): number[];
|
|
3789
|
+
/**
|
|
3790
|
+
* Same as `getRangeString` but add:
|
|
3791
|
+
* - all necessary merge to the range to make it a valid selection
|
|
3792
|
+
* - the "#" suffix if the range is a spilled reference
|
|
3793
|
+
*/
|
|
3794
|
+
getSelectionRangeString(range: Range, forSheetId: UID): string;
|
|
3739
3795
|
private activateSheet;
|
|
3740
3796
|
/**
|
|
3741
3797
|
* Ensure selections are not outside sheet boundaries.
|
|
@@ -4052,7 +4108,7 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
4052
4108
|
type Getters = {
|
|
4053
4109
|
isReadonly: () => boolean;
|
|
4054
4110
|
isDashboard: () => boolean;
|
|
4055
|
-
} & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof GridSelectionPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof SubtotalEvaluationPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof TableStylePlugin> & PluginGetters<typeof CellComputedStylePlugin> & PluginGetters<typeof DynamicTablesPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof GeoFeaturePlugin> & PluginGetters<typeof PivotPresencePlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof CheckboxTogglePlugin> & PluginGetters<typeof CellIconPlugin> & PluginGetters<typeof DynamicTranslate> & PluginGetters<typeof CarouselUIPlugin>;
|
|
4111
|
+
} & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof GridSelectionPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof SheetViewPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof SubtotalEvaluationPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof TableStylePlugin> & PluginGetters<typeof CellComputedStylePlugin> & PluginGetters<typeof DynamicTablesPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof GeoFeaturePlugin> & PluginGetters<typeof PivotPresencePlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof CheckboxTogglePlugin> & PluginGetters<typeof CellIconPlugin> & PluginGetters<typeof DynamicTranslate> & PluginGetters<typeof FormulaTrackerPlugin> & PluginGetters<typeof CarouselUIPlugin>;
|
|
4056
4112
|
|
|
4057
4113
|
interface SearchOptions {
|
|
4058
4114
|
matchCase: boolean;
|
|
@@ -4277,6 +4333,7 @@ declare function getUniqueText(text: string, texts: string[], options?: {
|
|
|
4277
4333
|
}): string;
|
|
4278
4334
|
declare function isFormula(content: string): boolean;
|
|
4279
4335
|
declare function chartStyleToCellStyle(style: ChartStyle): Style;
|
|
4336
|
+
declare function doesCellContainFunction(cell: Cell, formula: string): boolean;
|
|
4280
4337
|
|
|
4281
4338
|
/**
|
|
4282
4339
|
* This function returns a regexp that is supposed to be as close as possible as the numberRegexp,
|
|
@@ -4652,7 +4709,6 @@ interface RenderingBox {
|
|
|
4652
4709
|
center?: RenderingGridIcon;
|
|
4653
4710
|
};
|
|
4654
4711
|
textOpacity?: number;
|
|
4655
|
-
skipCellGridLines?: boolean;
|
|
4656
4712
|
disabledAnimation?: boolean;
|
|
4657
4713
|
}
|
|
4658
4714
|
type Box = RenderingBox & Rect;
|
|
@@ -5697,6 +5753,9 @@ interface CopyPasteCellsAboveCommand {
|
|
|
5697
5753
|
interface CopyPasteCellsOnLeftCommand {
|
|
5698
5754
|
type: "COPY_PASTE_CELLS_ON_LEFT";
|
|
5699
5755
|
}
|
|
5756
|
+
interface CopyPasteCellsOnZoneCommand {
|
|
5757
|
+
type: "COPY_PASTE_CELLS_ON_ZONE";
|
|
5758
|
+
}
|
|
5700
5759
|
interface RepeatPasteCommand {
|
|
5701
5760
|
type: "REPEAT_PASTE";
|
|
5702
5761
|
target: Zone[];
|
|
@@ -5945,7 +6004,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | ClearCellsCom
|
|
|
5945
6004
|
| UpdateLocaleCommand
|
|
5946
6005
|
/** PIVOT */
|
|
5947
6006
|
| AddPivotCommand | UpdatePivotCommand | InsertPivotCommand | RenamePivotCommand | RemovePivotCommand | DuplicatePivotCommand;
|
|
5948
|
-
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | EvaluateChartsCommand | StartChangeHighlightCommand | StartCommand | AutofillCommand | AutofillSelectCommand | AutofillTableCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | SetContextualFormatCommand | ResizeViewportCommand | SetZoomCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | ResizeTableCommand | RefreshPivotCommand | InsertNewPivotCommand | DuplicatePivotInNewSheetCommand | InsertPivotWithTableCommand | SplitPivotFormulaCommand | PaintFormat | DeleteUnfilteredContentCommand | PivotStartPresenceTracking | PivotStopPresenceTracking | ToggleCheckboxCommand | AddNewChartToCarouselCommand | AddFigureChartToCarouselCommand | DuplicateCarouselChartCommand | UpdateCarouselActiveItemCommand | PopOutChartFromCarouselCommand;
|
|
6007
|
+
type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | CopyCommand | CutCommand | PasteCommand | CopyPasteCellsAboveCommand | CopyPasteCellsOnLeftCommand | CopyPasteCellsOnZoneCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | EvaluateCellsCommand | EvaluateChartsCommand | StartChangeHighlightCommand | StartCommand | AutofillCommand | AutofillSelectCommand | AutofillTableCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | ReplaceSearchCommand | SortCommand | SetDecimalCommand | SetContextualFormatCommand | ResizeViewportCommand | SetZoomCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | MoveViewportToCellCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand | SplitTextIntoColumnsCommand | RemoveDuplicatesCommand | TrimWhitespaceCommand | ResizeTableCommand | RefreshPivotCommand | InsertNewPivotCommand | DuplicatePivotInNewSheetCommand | InsertPivotWithTableCommand | SplitPivotFormulaCommand | PaintFormat | DeleteUnfilteredContentCommand | PivotStartPresenceTracking | PivotStopPresenceTracking | ToggleCheckboxCommand | AddNewChartToCarouselCommand | AddFigureChartToCarouselCommand | DuplicateCarouselChartCommand | UpdateCarouselActiveItemCommand | PopOutChartFromCarouselCommand;
|
|
5949
6008
|
type Command = CoreCommand | LocalCommand;
|
|
5950
6009
|
/**
|
|
5951
6010
|
* Holds the result of a command dispatch.
|
|
@@ -6214,6 +6273,7 @@ interface Style {
|
|
|
6214
6273
|
textColor?: Color;
|
|
6215
6274
|
fontSize?: number;
|
|
6216
6275
|
rotation?: number;
|
|
6276
|
+
hideGridLines?: boolean;
|
|
6217
6277
|
}
|
|
6218
6278
|
interface DataBarFill {
|
|
6219
6279
|
color: Color;
|
|
@@ -6456,6 +6516,7 @@ declare const UNARY_OPERATOR_MAP: {
|
|
|
6456
6516
|
"-": string;
|
|
6457
6517
|
"+": string;
|
|
6458
6518
|
"%": string;
|
|
6519
|
+
"#": string;
|
|
6459
6520
|
};
|
|
6460
6521
|
declare const functionCache: {
|
|
6461
6522
|
[key: string]: FormulaToExecute;
|
|
@@ -6515,6 +6576,7 @@ interface ASTEmpty extends ASTBase {
|
|
|
6515
6576
|
}
|
|
6516
6577
|
type AST = ASTOperation | ASTUnaryOperation | ASTFuncall | ASTSymbol | ASTArray | ASTNumber | ASTBoolean | ASTString | ASTReference | ASTEmpty;
|
|
6517
6578
|
declare const OP_PRIORITY: {
|
|
6579
|
+
"#": number;
|
|
6518
6580
|
"%": number;
|
|
6519
6581
|
"^": number;
|
|
6520
6582
|
"*": number;
|
|
@@ -6715,4 +6777,4 @@ declare class NumberTooLargeError extends EvaluationError {
|
|
|
6715
6777
|
|
|
6716
6778
|
declare const __info__: {};
|
|
6717
6779
|
|
|
6718
|
-
export { AST, ASTFuncall, ASTOperation, ASTString, ASTSymbol, ASTUnaryOperation, AdaptSheetName, AdjacentEdge, Alias, Align, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, BadExpressionError, BasePlugin, Border, BorderData, BorderDescr, BorderDescrWithOpacity, BorderPosition, BorderStyle, Box, BoxTextContent, CSSProperties, CellErrorType, CellPosition, CellValue, ChangeType, CircularDependencyError, ClipboardCell, Cloneable, Color, CompiledFormula, ComposerFocusType, ConsecutiveIndexes, CoreGetters, CreateRevisionOptions, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DebouncedFunction, Dimension, Direction, DivisionByZeroError, EdgeScrollInfo, EditionMode, EnsureRange, ErrorValue, EvaluationError, FilterId, Format, FormulaToExecute, FunctionCode, FunctionCodeBuilder, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GetSymbolValue, GlobalChart, GridClickModifiers, GridRenderingContext, HSLA, HeaderDimensions, HeaderGroup, HeaderIndex, Highlight, HistoryChange, Image, Immutable, Increment, InvalidReferenceError, LayerName, Lazy, Link, Locale, LocaleCode, Matrix, Maybe, MenuMouseEvent, Merge, Model, NotAvailableError, NumberTooLargeError, OPERATOR_MAP, OP_PRIORITY, Offset, OperationSequenceNode, OrderedLayers, POSTFIX_UNARY_OPERATORS, PaneDivision, Pixel, PixelPosition, PluginGetters, Position, RGBA, RangeAdapter, RangeCompiledFormula, RangeProvider, Rect, Ref, ReferenceDenormalizer, Registry, RenderingBorder, RenderingBox, RenderingGridIcon, Row, Scope, ScrollDirection, Selection, SelectionStep, SetDecimalStep, Sheet, SheetDOMScrollInfo, SortDirection, SortOptions, SplillBlockedError, SpreadsheetClipboardData, StateObserver, Style, TableId, Token, TokenizingChars, Transformation, TransformationFactory, TranslationFunction, UID, UNARY_OPERATOR_MAP, UnboundedZone, UnknownFunctionError, UpdateCellData, UuidGenerator, Validation, Validator, ValueAndLabel, VerticalAlign, Viewport, WorkbookHistory, Wrapping, Zone, ZoneDimension, __info__, _t, addRenderingLayer, batched, borderStyles, buildSheetLink, categories, cellReference, chartStyleToCellStyle, clip, compile, compileTokens, concat, convertAstNodes, createEmptyStructure, debounce, deepCopy, deepEquals, deepEqualsArray, errorTypes, escapeRegExp, findNextDefinedValue, functionCache, getAddHeaderStartIndex, getCanonicalSymbolName, getFormulaNumberRegex, getFullReference, getSearchRegex, getUniqueText, getUnquotedSheetName, groupConsecutive, includesAll, insertItemsAtIndex, isBoolean, isColHeader, isColReference, isConsecutive, isDefined, isFormula, isMarkdownLink, isMatrix, isNotNull, isNumber, isNumberBetween, isObjectEmptyRecursive, isRowHeader, isRowReference, isSheetUrl, isSingleCellReference, isWebLink, iterateAstNodes, largeMax, largeMin, lazy, linkNext, loopThroughReferenceType, mapAst, markdownLink, memoize, parse, parseMarkdownLink, parseNumber, parseSheetUrl, parseTokens, percentile, range, rangeReference, rangeTokenize, removeDuplicates, removeFalsyAttributes, removeIndexesFromArray, replaceItemAtIndex, replaceNewLines, sanitizeSheetName, setDefaultTranslationMethod, setTranslationMethod, setXcToFixedReferenceType, specialWhiteSpaceRegexp, splitReference, tokenize, transpose2dPOJO, trimContent, unquote, whiteSpaceCharacters };
|
|
6780
|
+
export { AST, ASTFuncall, ASTOperation, ASTString, ASTSymbol, ASTUnaryOperation, AdaptSheetName, AdjacentEdge, Alias, Align, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, BadExpressionError, BasePlugin, Border, BorderData, BorderDescr, BorderDescrWithOpacity, BorderPosition, BorderStyle, Box, BoxTextContent, CSSProperties, CellErrorType, CellPosition, CellValue, ChangeType, CircularDependencyError, ClipboardCell, Cloneable, Color, CompiledFormula, ComposerFocusType, ConsecutiveIndexes, CoreGetters, CreateRevisionOptions, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DebouncedFunction, Dimension, Direction, DivisionByZeroError, EdgeScrollInfo, EditionMode, EnsureRange, ErrorValue, EvaluationError, FilterId, Format, FormulaToExecute, FunctionCode, FunctionCodeBuilder, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GetSymbolValue, GlobalChart, GridClickModifiers, GridRenderingContext, HSLA, HeaderDimensions, HeaderGroup, HeaderIndex, Highlight, HistoryChange, Image, Immutable, Increment, InvalidReferenceError, LayerName, Lazy, Link, Locale, LocaleCode, Matrix, Maybe, MenuMouseEvent, Merge, Model, NotAvailableError, NumberTooLargeError, OPERATOR_MAP, OP_PRIORITY, Offset, OperationSequenceNode, OrderedLayers, POSTFIX_UNARY_OPERATORS, PaneDivision, Pixel, PixelPosition, PluginGetters, Position, RGBA, RangeAdapter, RangeCompiledFormula, RangeProvider, Rect, Ref, ReferenceDenormalizer, Registry, RenderingBorder, RenderingBox, RenderingGridIcon, Row, Scope, ScrollDirection, Selection, SelectionStep, SetDecimalStep, Sheet, SheetDOMScrollInfo, SortDirection, SortOptions, SplillBlockedError, SpreadsheetClipboardData, StateObserver, Style, TableId, Token, TokenizingChars, Transformation, TransformationFactory, TranslationFunction, UID, UNARY_OPERATOR_MAP, UnboundedZone, UnknownFunctionError, UpdateCellData, UuidGenerator, Validation, Validator, ValueAndLabel, VerticalAlign, Viewport, WorkbookHistory, Wrapping, Zone, ZoneDimension, __info__, _t, addRenderingLayer, batched, borderStyles, buildSheetLink, categories, cellReference, chartStyleToCellStyle, clip, compile, compileTokens, concat, convertAstNodes, createEmptyStructure, debounce, deepCopy, deepEquals, deepEqualsArray, doesCellContainFunction, errorTypes, escapeRegExp, findNextDefinedValue, functionCache, getAddHeaderStartIndex, getCanonicalSymbolName, getFormulaNumberRegex, getFullReference, getSearchRegex, getUniqueText, getUnquotedSheetName, groupConsecutive, includesAll, insertItemsAtIndex, isBoolean, isColHeader, isColReference, isConsecutive, isDefined, isFormula, isMarkdownLink, isMatrix, isNotNull, isNumber, isNumberBetween, isObjectEmptyRecursive, isRowHeader, isRowReference, isSheetUrl, isSingleCellReference, isWebLink, iterateAstNodes, largeMax, largeMin, lazy, linkNext, loopThroughReferenceType, mapAst, markdownLink, memoize, parse, parseMarkdownLink, parseNumber, parseSheetUrl, parseTokens, percentile, range, rangeReference, rangeTokenize, removeDuplicates, removeFalsyAttributes, removeIndexesFromArray, replaceItemAtIndex, replaceNewLines, sanitizeSheetName, setDefaultTranslationMethod, setTranslationMethod, setXcToFixedReferenceType, specialWhiteSpaceRegexp, splitReference, tokenize, transpose2dPOJO, trimContent, unquote, whiteSpaceCharacters };
|