@odoo/o-spreadsheet 17.0.5 → 17.0.7
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 +998 -218
- package/dist/o-spreadsheet.d.ts +47 -18
- package/dist/o-spreadsheet.esm.js +998 -218
- package/dist/o-spreadsheet.iife.js +998 -218
- package/dist/o-spreadsheet.iife.min.js +245 -245
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +6 -2
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -940,6 +940,35 @@ declare function toCartesian(xc: string): Position$1;
|
|
|
940
940
|
*/
|
|
941
941
|
declare function toXC(col: HeaderIndex, row: HeaderIndex, rangePart?: RangePart): string;
|
|
942
942
|
|
|
943
|
+
/**
|
|
944
|
+
* A DateTime object that can be used to manipulate spreadsheet dates.
|
|
945
|
+
* Conceptually, a spreadsheet date is simply a number with a date format,
|
|
946
|
+
* and it is timezone-agnostic.
|
|
947
|
+
* This DateTime object consistently uses UTC time to represent a naive date and time.
|
|
948
|
+
*/
|
|
949
|
+
declare class DateTime {
|
|
950
|
+
private jsDate;
|
|
951
|
+
constructor(year: number, month: number, day: number, hours?: number, minutes?: number, seconds?: number);
|
|
952
|
+
static fromTimestamp(timestamp: number): DateTime;
|
|
953
|
+
static now(): DateTime;
|
|
954
|
+
toString(): string;
|
|
955
|
+
toLocaleDateString(): string;
|
|
956
|
+
getTime(): number;
|
|
957
|
+
getFullYear(): number;
|
|
958
|
+
getMonth(): number;
|
|
959
|
+
getDate(): number;
|
|
960
|
+
getDay(): number;
|
|
961
|
+
getHours(): number;
|
|
962
|
+
getMinutes(): number;
|
|
963
|
+
getSeconds(): number;
|
|
964
|
+
setFullYear(year: number): number;
|
|
965
|
+
setMonth(month: number): number;
|
|
966
|
+
setDate(date: number): number;
|
|
967
|
+
setHours(hours: number): number;
|
|
968
|
+
setMinutes(minutes: number): number;
|
|
969
|
+
setSeconds(seconds: number): number;
|
|
970
|
+
}
|
|
971
|
+
|
|
943
972
|
/**
|
|
944
973
|
* Formats a cell value with its format.
|
|
945
974
|
*/
|
|
@@ -2667,6 +2696,7 @@ type ValueAndFormat = {
|
|
|
2667
2696
|
};
|
|
2668
2697
|
type Arg = Maybe<ValueAndFormat> | Matrix<ValueAndFormat>;
|
|
2669
2698
|
type ArgValue = Maybe<CellValue> | Matrix<CellValue>;
|
|
2699
|
+
declare function isMatrix(x: any): x is Matrix<any>;
|
|
2670
2700
|
interface HeaderDimensions {
|
|
2671
2701
|
start: Pixel;
|
|
2672
2702
|
size: Pixel;
|
|
@@ -4141,25 +4171,23 @@ declare class CustomColorsPlugin extends UIPlugin<CustomColorState> {
|
|
|
4141
4171
|
private tryToAddColor;
|
|
4142
4172
|
}
|
|
4143
4173
|
|
|
4174
|
+
interface EvaluationChartStyle {
|
|
4175
|
+
background: Color;
|
|
4176
|
+
fontColor: Color;
|
|
4177
|
+
}
|
|
4144
4178
|
interface EvaluationChartState {
|
|
4145
4179
|
charts: Record<UID, ChartRuntime | undefined>;
|
|
4146
4180
|
}
|
|
4147
4181
|
declare class EvaluationChartPlugin extends UIPlugin<EvaluationChartState> {
|
|
4148
|
-
static getters: readonly ["getChartRuntime", "
|
|
4182
|
+
static getters: readonly ["getChartRuntime", "getStyleOfSingleCellChart"];
|
|
4149
4183
|
charts: Record<UID, ChartRuntime | undefined>;
|
|
4150
4184
|
private createRuntimeChart;
|
|
4151
4185
|
handle(cmd: CoreViewCommand): void;
|
|
4152
4186
|
getChartRuntime(figureId: UID): ChartRuntime;
|
|
4153
4187
|
/**
|
|
4154
|
-
* Get the background
|
|
4155
|
-
* of the chart. In order of priority, it will return :
|
|
4156
|
-
*
|
|
4157
|
-
* - the chart background color if one is defined
|
|
4158
|
-
* - the fill color of the cell if one is defined
|
|
4159
|
-
* - the fill color of the cell from conditional formats if one is defined
|
|
4160
|
-
* - the default chart color if no other color is defined
|
|
4188
|
+
* Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
|
|
4161
4189
|
*/
|
|
4162
|
-
|
|
4190
|
+
getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): EvaluationChartStyle;
|
|
4163
4191
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
4164
4192
|
}
|
|
4165
4193
|
|
|
@@ -6444,8 +6472,8 @@ interface Props$m {
|
|
|
6444
6472
|
onCellHovered: (position: Partial<Position$1>) => void;
|
|
6445
6473
|
onCellDoubleClicked: (col: HeaderIndex, row: HeaderIndex) => void;
|
|
6446
6474
|
onCellClicked: (col: HeaderIndex, row: HeaderIndex, modifiers: {
|
|
6447
|
-
|
|
6448
|
-
|
|
6475
|
+
addZone: boolean;
|
|
6476
|
+
expandZone: boolean;
|
|
6449
6477
|
}) => void;
|
|
6450
6478
|
onCellRightClicked: (col: HeaderIndex, row: HeaderIndex, coordinates: DOMCoordinates) => void;
|
|
6451
6479
|
onGridResized: (dimension: Rect) => void;
|
|
@@ -7465,7 +7493,7 @@ declare abstract class AbstractResizer extends Component<ResizerProps, Spreadshe
|
|
|
7465
7493
|
abstract _getMaxSize(): Pixel;
|
|
7466
7494
|
abstract _updateSize(): void;
|
|
7467
7495
|
abstract _moveElements(): void;
|
|
7468
|
-
abstract _selectElement(index: HeaderIndex,
|
|
7496
|
+
abstract _selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
7469
7497
|
abstract _increaseSelection(index: HeaderIndex): void;
|
|
7470
7498
|
abstract _fitElementSize(index: HeaderIndex): void;
|
|
7471
7499
|
abstract _getType(): ContextMenuType;
|
|
@@ -7499,7 +7527,7 @@ declare class ColResizer extends AbstractResizer {
|
|
|
7499
7527
|
_getMaxSize(): Pixel;
|
|
7500
7528
|
_updateSize(): void;
|
|
7501
7529
|
_moveElements(): void;
|
|
7502
|
-
_selectElement(index: HeaderIndex,
|
|
7530
|
+
_selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
7503
7531
|
_increaseSelection(index: HeaderIndex): void;
|
|
7504
7532
|
_fitElementSize(index: HeaderIndex): void;
|
|
7505
7533
|
_getType(): ContextMenuType;
|
|
@@ -7524,7 +7552,7 @@ declare class RowResizer extends AbstractResizer {
|
|
|
7524
7552
|
_getMaxSize(): Pixel;
|
|
7525
7553
|
_updateSize(): void;
|
|
7526
7554
|
_moveElements(): void;
|
|
7527
|
-
_selectElement(index: HeaderIndex,
|
|
7555
|
+
_selectElement(index: HeaderIndex, addDistinctHeader: boolean): void;
|
|
7528
7556
|
_increaseSelection(index: HeaderIndex): void;
|
|
7529
7557
|
_fitElementSize(index: HeaderIndex): void;
|
|
7530
7558
|
_getType(): ContextMenuType;
|
|
@@ -7651,9 +7679,9 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7651
7679
|
getClientPositionKey(client: Client): string;
|
|
7652
7680
|
isCellHovered(col: HeaderIndex, row: HeaderIndex): boolean;
|
|
7653
7681
|
private getGridRect;
|
|
7654
|
-
onCellClicked(col: HeaderIndex, row: HeaderIndex, {
|
|
7655
|
-
|
|
7656
|
-
|
|
7682
|
+
onCellClicked(col: HeaderIndex, row: HeaderIndex, { addZone, expandZone }: {
|
|
7683
|
+
addZone: boolean;
|
|
7684
|
+
expandZone: boolean;
|
|
7657
7685
|
}): void;
|
|
7658
7686
|
onCellDoubleClicked(col: HeaderIndex, row: HeaderIndex): void;
|
|
7659
7687
|
closeOpenedPopover(): void;
|
|
@@ -7718,7 +7746,7 @@ declare class ChartPanel extends Component<Props, SpreadsheetChildEnv> {
|
|
|
7718
7746
|
declare function toNumber(value: string | number | boolean | null | undefined, locale: Locale): number;
|
|
7719
7747
|
declare function toString(value: string | number | boolean | null | undefined): string;
|
|
7720
7748
|
declare function toBoolean(value: string | number | boolean | null | undefined): boolean;
|
|
7721
|
-
declare function toJsDate(value: string | number | boolean | null | undefined, locale: Locale):
|
|
7749
|
+
declare function toJsDate(value: string | number | boolean | null | undefined, locale: Locale): DateTime;
|
|
7722
7750
|
|
|
7723
7751
|
declare function arg(definition: string, description?: string): ArgDefinition;
|
|
7724
7752
|
|
|
@@ -7867,6 +7895,7 @@ declare const helpers: {
|
|
|
7867
7895
|
colorToRGBA: typeof colorToRGBA;
|
|
7868
7896
|
positionToZone: typeof positionToZone;
|
|
7869
7897
|
isDefined: typeof isDefined;
|
|
7898
|
+
isMatrix: typeof isMatrix;
|
|
7870
7899
|
lazy: typeof lazy;
|
|
7871
7900
|
genericRepeat: typeof genericRepeat;
|
|
7872
7901
|
createAction: typeof createAction;
|