@odoo/o-spreadsheet 16.1.28 → 16.1.33
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 +461 -361
- package/dist/o-spreadsheet.d.ts +99 -70
- package/dist/o-spreadsheet.esm.js +461 -361
- package/dist/o-spreadsheet.iife.js +461 -361
- package/dist/o-spreadsheet.iife.min.js +230 -230
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +1 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -202,6 +202,33 @@ declare function toCartesian(xc: string): Position$1;
|
|
|
202
202
|
*/
|
|
203
203
|
declare function toXC(col: HeaderIndex, row: HeaderIndex, rangePart?: RangePart): string;
|
|
204
204
|
|
|
205
|
+
/**
|
|
206
|
+
* A DateTime object that can be used to manipulate spreadsheet dates.
|
|
207
|
+
* Conceptually, a spreadsheet date is simply a number with a date format,
|
|
208
|
+
* and it is timezone-agnostic.
|
|
209
|
+
* This DateTime object consistently uses UTC time to represent a naive date and time.
|
|
210
|
+
*/
|
|
211
|
+
declare class DateTime {
|
|
212
|
+
private jsDate;
|
|
213
|
+
constructor(year: number, month: number, day: number, hours?: number, minutes?: number, seconds?: number);
|
|
214
|
+
static fromTimestamp(timestamp: number): DateTime;
|
|
215
|
+
static now(): DateTime;
|
|
216
|
+
toString(): string;
|
|
217
|
+
getTime(): number;
|
|
218
|
+
getFullYear(): number;
|
|
219
|
+
getMonth(): number;
|
|
220
|
+
getDate(): number;
|
|
221
|
+
getDay(): number;
|
|
222
|
+
getHours(): number;
|
|
223
|
+
getMinutes(): number;
|
|
224
|
+
getSeconds(): number;
|
|
225
|
+
setFullYear(year: number): void;
|
|
226
|
+
setDate(date: number): void;
|
|
227
|
+
setHours(hours: number): void;
|
|
228
|
+
setMinutes(minutes: number): void;
|
|
229
|
+
setSeconds(seconds: number): void;
|
|
230
|
+
}
|
|
231
|
+
|
|
205
232
|
/**
|
|
206
233
|
* Formats a cell value with its format.
|
|
207
234
|
*/
|
|
@@ -1626,6 +1653,7 @@ interface MoveColumnsRowsCommand extends GridDependentCommand {
|
|
|
1626
1653
|
type: "MOVE_COLUMNS_ROWS";
|
|
1627
1654
|
base: HeaderIndex;
|
|
1628
1655
|
elements: HeaderIndex[];
|
|
1656
|
+
position: "before" | "after";
|
|
1629
1657
|
}
|
|
1630
1658
|
interface ResizeColumnsRowsCommand extends GridDependentCommand {
|
|
1631
1659
|
type: "RESIZE_COLUMNS_ROWS";
|
|
@@ -2203,64 +2231,65 @@ declare const enum CommandResult {
|
|
|
2203
2231
|
InvalidFigureId = 28,
|
|
2204
2232
|
InputAlreadyFocused = 29,
|
|
2205
2233
|
MaximumRangesReached = 30,
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2234
|
+
InvalidInputId = 31,
|
|
2235
|
+
InvalidChartDefinition = 32,
|
|
2236
|
+
InvalidDataSet = 33,
|
|
2237
|
+
InvalidLabelRange = 34,
|
|
2238
|
+
InvalidScorecardKeyValue = 35,
|
|
2239
|
+
InvalidScorecardBaseline = 36,
|
|
2240
|
+
InvalidGaugeDataRange = 37,
|
|
2241
|
+
EmptyGaugeRangeMin = 38,
|
|
2242
|
+
GaugeRangeMinNaN = 39,
|
|
2243
|
+
EmptyGaugeRangeMax = 40,
|
|
2244
|
+
GaugeRangeMaxNaN = 41,
|
|
2245
|
+
GaugeRangeMinBiggerThanRangeMax = 42,
|
|
2246
|
+
GaugeLowerInflectionPointNaN = 43,
|
|
2247
|
+
GaugeUpperInflectionPointNaN = 44,
|
|
2248
|
+
GaugeLowerBiggerThanUpper = 45,
|
|
2249
|
+
InvalidAutofillSelection = 46,
|
|
2250
|
+
WrongComposerSelection = 47,
|
|
2251
|
+
MinBiggerThanMax = 48,
|
|
2252
|
+
LowerBiggerThanUpper = 49,
|
|
2253
|
+
MidBiggerThanMax = 50,
|
|
2254
|
+
MinBiggerThanMid = 51,
|
|
2255
|
+
FirstArgMissing = 52,
|
|
2256
|
+
SecondArgMissing = 53,
|
|
2257
|
+
MinNaN = 54,
|
|
2258
|
+
MidNaN = 55,
|
|
2259
|
+
MaxNaN = 56,
|
|
2260
|
+
ValueUpperInflectionNaN = 57,
|
|
2261
|
+
ValueLowerInflectionNaN = 58,
|
|
2262
|
+
MinInvalidFormula = 59,
|
|
2263
|
+
MidInvalidFormula = 60,
|
|
2264
|
+
MaxInvalidFormula = 61,
|
|
2265
|
+
ValueUpperInvalidFormula = 62,
|
|
2266
|
+
ValueLowerInvalidFormula = 63,
|
|
2267
|
+
InvalidSortZone = 64,
|
|
2268
|
+
WaitingSessionConfirmation = 65,
|
|
2269
|
+
MergeOverlap = 66,
|
|
2270
|
+
TooManyHiddenElements = 67,
|
|
2271
|
+
Readonly = 68,
|
|
2272
|
+
InvalidViewportSize = 69,
|
|
2273
|
+
InvalidScrollingDirection = 70,
|
|
2274
|
+
FigureDoesNotExist = 71,
|
|
2275
|
+
InvalidConditionalFormatId = 72,
|
|
2276
|
+
InvalidCellPopover = 73,
|
|
2277
|
+
EmptyTarget = 74,
|
|
2278
|
+
InvalidFreezeQuantity = 75,
|
|
2279
|
+
FrozenPaneOverlap = 76,
|
|
2280
|
+
ValuesNotChanged = 77,
|
|
2281
|
+
InvalidFilterZone = 78,
|
|
2282
|
+
FilterOverlap = 79,
|
|
2283
|
+
FilterNotFound = 80,
|
|
2284
|
+
MergeInFilter = 81,
|
|
2285
|
+
NonContinuousTargets = 82,
|
|
2286
|
+
DuplicatedFigureId = 83,
|
|
2287
|
+
InvalidSelectionStep = 84,
|
|
2288
|
+
DuplicatedChartId = 85,
|
|
2289
|
+
ChartDoesNotExist = 86,
|
|
2290
|
+
InvalidHeaderIndex = 87,
|
|
2291
|
+
InvalidQuantity = 88,
|
|
2292
|
+
NoChanges = 89
|
|
2264
2293
|
}
|
|
2265
2294
|
interface CommandHandler<T> {
|
|
2266
2295
|
allowDispatch(command: T): CommandResult | CommandResult[];
|
|
@@ -3796,7 +3825,7 @@ declare class EvaluationPlugin extends UIPlugin {
|
|
|
3796
3825
|
constructor(config: UIPluginConfig);
|
|
3797
3826
|
handle(cmd: Command): void;
|
|
3798
3827
|
finalize(): void;
|
|
3799
|
-
evaluateFormula(formulaString: string, sheetId?: UID):
|
|
3828
|
+
evaluateFormula(formulaString: string, sheetId?: UID): FunctionReturnValue | null;
|
|
3800
3829
|
/**
|
|
3801
3830
|
* Return the value of each cell in the range as they are displayed in the grid.
|
|
3802
3831
|
*/
|
|
@@ -4396,7 +4425,7 @@ interface RangeInputValue {
|
|
|
4396
4425
|
* This plugin handles this internal state.
|
|
4397
4426
|
*/
|
|
4398
4427
|
declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<SelectionEvent> {
|
|
4399
|
-
|
|
4428
|
+
readonly inputHasSingleRange: boolean;
|
|
4400
4429
|
static layers: LAYERS[];
|
|
4401
4430
|
static getters: never[];
|
|
4402
4431
|
ranges: RangeInputValue[];
|
|
@@ -4404,7 +4433,6 @@ declare class SelectionInputPlugin extends UIPlugin implements StreamCallbacks<S
|
|
|
4404
4433
|
private activeSheet;
|
|
4405
4434
|
private willAddNewRange;
|
|
4406
4435
|
constructor(config: UIPluginConfig, initialRanges: string[], inputHasSingleRange: boolean);
|
|
4407
|
-
allowDispatch(cmd: Command): CommandResult;
|
|
4408
4436
|
handleEvent(event: SelectionEvent): void;
|
|
4409
4437
|
handle(cmd: Command): void;
|
|
4410
4438
|
unsubscribe(): void;
|
|
@@ -5879,8 +5907,8 @@ interface Props$d {
|
|
|
5879
5907
|
onCellHovered: (position: Partial<Position$1>) => void;
|
|
5880
5908
|
onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
|
|
5881
5909
|
onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
|
|
5882
|
-
|
|
5883
|
-
|
|
5910
|
+
addZone: boolean;
|
|
5911
|
+
expandZone: boolean;
|
|
5884
5912
|
}) => void;
|
|
5885
5913
|
onCellRightClicked: (col: HeaderIndex, row: HeaderIndex, coordinates: DOMCoordinates) => void;
|
|
5886
5914
|
onGridResized: (dimension: DOMDimension) => void;
|
|
@@ -5937,6 +5965,7 @@ interface ResizerState {
|
|
|
5937
5965
|
draggerShadowThickness: number;
|
|
5938
5966
|
delta: number;
|
|
5939
5967
|
base: number;
|
|
5968
|
+
position: "before" | "after";
|
|
5940
5969
|
}
|
|
5941
5970
|
interface ResizerProps {
|
|
5942
5971
|
onOpenContextMenu: (type: ContextMenuType, x: Pixel, y: Pixel) => void;
|
|
@@ -5959,7 +5988,7 @@ declare abstract class AbstractResizer extends Component<ResizerProps, Spreadshe
|
|
|
5959
5988
|
abstract _getMaxSize(): Pixel;
|
|
5960
5989
|
abstract _updateSize(): void;
|
|
5961
5990
|
abstract _moveElements(): void;
|
|
5962
|
-
abstract _selectElement(index: HeaderIndex,
|
|
5991
|
+
abstract _selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
5963
5992
|
abstract _increaseSelection(index: HeaderIndex): void;
|
|
5964
5993
|
abstract _fitElementSize(index: HeaderIndex): void;
|
|
5965
5994
|
abstract _getType(): ContextMenuType;
|
|
@@ -5993,7 +6022,7 @@ declare class ColResizer extends AbstractResizer {
|
|
|
5993
6022
|
_getMaxSize(): Pixel;
|
|
5994
6023
|
_updateSize(): void;
|
|
5995
6024
|
_moveElements(): void;
|
|
5996
|
-
_selectElement(index: HeaderIndex,
|
|
6025
|
+
_selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
5997
6026
|
_increaseSelection(index: HeaderIndex): void;
|
|
5998
6027
|
_fitElementSize(index: HeaderIndex): void;
|
|
5999
6028
|
_getType(): ContextMenuType;
|
|
@@ -6018,7 +6047,7 @@ declare class RowResizer extends AbstractResizer {
|
|
|
6018
6047
|
_getMaxSize(): Pixel;
|
|
6019
6048
|
_updateSize(): void;
|
|
6020
6049
|
_moveElements(): void;
|
|
6021
|
-
_selectElement(index: HeaderIndex,
|
|
6050
|
+
_selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
6022
6051
|
_increaseSelection(index: HeaderIndex): void;
|
|
6023
6052
|
_fitElementSize(index: HeaderIndex): void;
|
|
6024
6053
|
_getType(): ContextMenuType;
|
|
@@ -6443,9 +6472,9 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
6443
6472
|
getClientPositionKey(client: Client): string;
|
|
6444
6473
|
isCellHovered(col: HeaderIndex, row: HeaderIndex): boolean;
|
|
6445
6474
|
private getGridRect;
|
|
6446
|
-
onCellClicked(col: HeaderIndex, row: HeaderIndex, {
|
|
6447
|
-
|
|
6448
|
-
|
|
6475
|
+
onCellClicked(col: HeaderIndex, row: HeaderIndex, { addZone, expandZone }: {
|
|
6476
|
+
addZone: boolean;
|
|
6477
|
+
expandZone: boolean;
|
|
6449
6478
|
}): void;
|
|
6450
6479
|
onCellDoubleClicked(col: HeaderIndex, row: HeaderIndex): void;
|
|
6451
6480
|
closeOpenedPopover(): void;
|
|
@@ -6480,7 +6509,7 @@ declare class ChartPanel extends Component<Props, SpreadsheetChildEnv> {
|
|
|
6480
6509
|
declare function toNumber(value: string | number | boolean | null | undefined): number;
|
|
6481
6510
|
declare function toString(value: string | number | boolean | null | undefined): string;
|
|
6482
6511
|
declare function toBoolean(value: string | number | boolean | null | undefined): boolean;
|
|
6483
|
-
declare function toJsDate(value: string | number | boolean | null | undefined):
|
|
6512
|
+
declare function toJsDate(value: string | number | boolean | null | undefined): DateTime;
|
|
6484
6513
|
|
|
6485
6514
|
/**
|
|
6486
6515
|
* This function is meant to be used as a tag for a template strings.
|