@odoo/o-spreadsheet 16.3.24 → 16.3.26
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 +219 -124
- package/dist/o-spreadsheet.d.ts +29 -14
- package/dist/o-spreadsheet.esm.js +219 -124
- package/dist/o-spreadsheet.iife.js +219 -124
- package/dist/o-spreadsheet.iife.min.js +141 -141
- package/dist/o_spreadsheet.xml +15 -33
- package/package.json +1 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1519,7 +1519,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1519
1519
|
getEditionMode(): EditionMode;
|
|
1520
1520
|
getCurrentContent(): string;
|
|
1521
1521
|
getComposerSelection(): ComposerSelection;
|
|
1522
|
-
getCurrentEditedCell(): CellPosition;
|
|
1522
|
+
getCurrentEditedCell(): CellPosition | undefined;
|
|
1523
1523
|
isSelectingForComposer(): boolean;
|
|
1524
1524
|
showSelectionIndicator(): boolean;
|
|
1525
1525
|
getCurrentTokens(): EnrichedToken[];
|
|
@@ -2808,6 +2808,12 @@ interface ClipboardInterface {
|
|
|
2808
2808
|
readText(): Promise<ClipboardReadResult>;
|
|
2809
2809
|
}
|
|
2810
2810
|
|
|
2811
|
+
declare class FocusableElement {
|
|
2812
|
+
private focusableElement;
|
|
2813
|
+
setFocusableElement(element: HTMLElement): void;
|
|
2814
|
+
focus(): void;
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2811
2817
|
type TranslationFunction = (string: string, ...values: string[] | [{
|
|
2812
2818
|
[key: string]: string;
|
|
2813
2819
|
}]) => string;
|
|
@@ -2841,6 +2847,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
|
2841
2847
|
_t: TranslationFunction;
|
|
2842
2848
|
startCellEdition: (content: string) => void;
|
|
2843
2849
|
loadCurrencies?: () => Promise<Currency[]>;
|
|
2850
|
+
focusableElement: FocusableElement;
|
|
2844
2851
|
}
|
|
2845
2852
|
|
|
2846
2853
|
type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "META";
|
|
@@ -3190,6 +3197,7 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
|
|
|
3190
3197
|
private createErrorFormula;
|
|
3191
3198
|
private checkCellOutOfSheet;
|
|
3192
3199
|
private checkUselessClearCell;
|
|
3200
|
+
private checkUselessUpdateCell;
|
|
3193
3201
|
}
|
|
3194
3202
|
|
|
3195
3203
|
/**
|
|
@@ -6556,11 +6564,12 @@ interface AutocompleteValue {
|
|
|
6556
6564
|
}
|
|
6557
6565
|
interface ComposerProps {
|
|
6558
6566
|
focus: ComposerFocusType;
|
|
6559
|
-
onComposerContentFocused: (selection: ComposerSelection) => void;
|
|
6560
6567
|
inputStyle?: string;
|
|
6561
6568
|
rect?: Rect;
|
|
6562
6569
|
delimitation?: DOMDimension;
|
|
6563
|
-
|
|
6570
|
+
onComposerContentFocused: () => void;
|
|
6571
|
+
onComposerCellFocused?: (content: String) => void;
|
|
6572
|
+
isDefaultFocus?: boolean;
|
|
6564
6573
|
}
|
|
6565
6574
|
interface ComposerState$1 {
|
|
6566
6575
|
positionStart: number;
|
|
@@ -6585,6 +6594,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6585
6594
|
};
|
|
6586
6595
|
static defaultProps: {
|
|
6587
6596
|
inputStyle: string;
|
|
6597
|
+
isDefaultFocus: boolean;
|
|
6588
6598
|
};
|
|
6589
6599
|
composerRef: {
|
|
6590
6600
|
el: HTMLElement | null;
|
|
@@ -6612,7 +6622,8 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6612
6622
|
onCompositionEnd(): void;
|
|
6613
6623
|
onKeydown(ev: KeyboardEvent): void;
|
|
6614
6624
|
private updateCursorIfNeeded;
|
|
6615
|
-
|
|
6625
|
+
onPaste(ev: ClipboardEvent): void;
|
|
6626
|
+
onInput(ev: InputEvent): void;
|
|
6616
6627
|
onKeyup(ev: KeyboardEvent): void;
|
|
6617
6628
|
showAutocomplete(searchTerm: string): void;
|
|
6618
6629
|
onMousedown(ev: MouseEvent): void;
|
|
@@ -6771,7 +6782,7 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
|
|
|
6771
6782
|
focusGrid(): void;
|
|
6772
6783
|
onKeydown(ev: KeyboardEvent): void;
|
|
6773
6784
|
onTopBarComposerFocused(selection: ComposerSelection): void;
|
|
6774
|
-
onGridComposerContentFocused(): void;
|
|
6785
|
+
onGridComposerContentFocused(selection: ComposerSelection): void;
|
|
6775
6786
|
onGridComposerCellFocused(content?: string, selection?: ComposerSelection): void;
|
|
6776
6787
|
/**
|
|
6777
6788
|
* Start the edition or update the content if it's already started.
|
|
@@ -6782,8 +6793,8 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
|
|
|
6782
6793
|
|
|
6783
6794
|
interface Props$5 {
|
|
6784
6795
|
focus: ComposerFocusType;
|
|
6785
|
-
|
|
6786
|
-
|
|
6796
|
+
onComposerContentFocused: () => void;
|
|
6797
|
+
onComposerCellFocused: () => void;
|
|
6787
6798
|
gridDims: DOMDimension;
|
|
6788
6799
|
}
|
|
6789
6800
|
/**
|
|
@@ -6795,17 +6806,23 @@ declare class GridComposer extends Component<Props$5, SpreadsheetChildEnv> {
|
|
|
6795
6806
|
static components: {
|
|
6796
6807
|
Composer: typeof Composer;
|
|
6797
6808
|
};
|
|
6798
|
-
private gridComposerRef;
|
|
6799
|
-
private zone;
|
|
6800
6809
|
private rect;
|
|
6810
|
+
private isEditing;
|
|
6801
6811
|
private isCellReferenceVisible;
|
|
6802
|
-
|
|
6812
|
+
get defaultRect(): {
|
|
6813
|
+
x: number;
|
|
6814
|
+
y: number;
|
|
6815
|
+
width: number;
|
|
6816
|
+
height: number;
|
|
6817
|
+
};
|
|
6803
6818
|
setup(): void;
|
|
6804
6819
|
get shouldDisplayCellReference(): boolean;
|
|
6805
6820
|
get cellReference(): string;
|
|
6806
6821
|
get cellReferenceStyle(): string;
|
|
6822
|
+
get composerProps(): ComposerProps;
|
|
6807
6823
|
get containerStyle(): string;
|
|
6808
|
-
|
|
6824
|
+
private updateComponentPosition;
|
|
6825
|
+
private updateCellReferenceVisibility;
|
|
6809
6826
|
}
|
|
6810
6827
|
|
|
6811
6828
|
interface ResizerState {
|
|
@@ -7005,7 +7022,6 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7005
7022
|
readonly HEADER_WIDTH = 48;
|
|
7006
7023
|
private menuState;
|
|
7007
7024
|
private gridRef;
|
|
7008
|
-
private hiddenInput;
|
|
7009
7025
|
onMouseWheel: (ev: WheelEvent) => void;
|
|
7010
7026
|
canvasPosition: DOMCoordinates;
|
|
7011
7027
|
hoveredCell: Partial<Position$1>;
|
|
@@ -7017,7 +7033,7 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7017
7033
|
get gridOverlayDimensions(): string;
|
|
7018
7034
|
onClosePopover(): void;
|
|
7019
7035
|
private keyDownMapping;
|
|
7020
|
-
|
|
7036
|
+
focusDefaultElement(): void;
|
|
7021
7037
|
get gridEl(): HTMLElement;
|
|
7022
7038
|
getAutofillPosition(): {
|
|
7023
7039
|
left: number;
|
|
@@ -7037,7 +7053,6 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7037
7053
|
closeOpenedPopover(): void;
|
|
7038
7054
|
processArrows(ev: KeyboardEvent): void;
|
|
7039
7055
|
onKeydown(ev: KeyboardEvent): void;
|
|
7040
|
-
onInput(ev: InputEvent): void;
|
|
7041
7056
|
onInputContextMenu(ev: MouseEvent): void;
|
|
7042
7057
|
onCellRightClicked(col: HeaderIndex, row: HeaderIndex, { x, y }: DOMCoordinates): void;
|
|
7043
7058
|
toggleContextMenu(type: ContextMenuType, x: Pixel, y: Pixel): void;
|