@odoo/o-spreadsheet 16.4.21 → 16.4.23
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 +238 -144
- package/dist/o-spreadsheet.d.ts +28 -14
- package/dist/o-spreadsheet.esm.js +238 -144
- package/dist/o-spreadsheet.iife.js +238 -144
- package/dist/o-spreadsheet.iife.min.js +100 -100
- package/dist/o_spreadsheet.xml +15 -33
- package/package.json +1 -1
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -1523,7 +1523,7 @@ declare class EditionPlugin extends UIPlugin {
|
|
|
1523
1523
|
getEditionMode(): EditionMode;
|
|
1524
1524
|
getCurrentContent(): string;
|
|
1525
1525
|
getComposerSelection(): ComposerSelection;
|
|
1526
|
-
getCurrentEditedCell(): CellPosition;
|
|
1526
|
+
getCurrentEditedCell(): CellPosition | undefined;
|
|
1527
1527
|
isSelectingForComposer(): boolean;
|
|
1528
1528
|
showSelectionIndicator(): boolean;
|
|
1529
1529
|
getCurrentTokens(): EnrichedToken[];
|
|
@@ -2866,6 +2866,12 @@ interface ClipboardInterface {
|
|
|
2866
2866
|
readText(): Promise<ClipboardReadResult>;
|
|
2867
2867
|
}
|
|
2868
2868
|
|
|
2869
|
+
declare class FocusableElement {
|
|
2870
|
+
private focusableElement;
|
|
2871
|
+
setFocusableElement(element: HTMLElement): void;
|
|
2872
|
+
focus(): void;
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2869
2875
|
type TranslationFunction = (string: string, ...values: string[] | [{
|
|
2870
2876
|
[key: string]: string;
|
|
2871
2877
|
}]) => string;
|
|
@@ -2900,6 +2906,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
|
2900
2906
|
startCellEdition: (content: string) => void;
|
|
2901
2907
|
loadCurrencies?: () => Promise<Currency[]>;
|
|
2902
2908
|
loadLocales: () => Promise<Locale[]>;
|
|
2909
|
+
focusableElement: FocusableElement;
|
|
2903
2910
|
}
|
|
2904
2911
|
|
|
2905
2912
|
type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
|
|
@@ -3246,6 +3253,7 @@ declare class CellPlugin extends CorePlugin<CoreState> implements CoreState {
|
|
|
3246
3253
|
private createErrorFormula;
|
|
3247
3254
|
private checkCellOutOfSheet;
|
|
3248
3255
|
private checkUselessClearCell;
|
|
3256
|
+
private checkUselessUpdateCell;
|
|
3249
3257
|
}
|
|
3250
3258
|
|
|
3251
3259
|
/**
|
|
@@ -6674,11 +6682,12 @@ interface AutocompleteValue {
|
|
|
6674
6682
|
}
|
|
6675
6683
|
interface ComposerProps {
|
|
6676
6684
|
focus: ComposerFocusType;
|
|
6677
|
-
onComposerContentFocused: (selection: ComposerSelection) => void;
|
|
6678
6685
|
inputStyle?: string;
|
|
6679
6686
|
rect?: Rect;
|
|
6680
6687
|
delimitation?: DOMDimension;
|
|
6681
|
-
|
|
6688
|
+
onComposerContentFocused: () => void;
|
|
6689
|
+
onComposerCellFocused?: (content: String) => void;
|
|
6690
|
+
isDefaultFocus?: boolean;
|
|
6682
6691
|
}
|
|
6683
6692
|
interface ComposerState$1 {
|
|
6684
6693
|
positionStart: number;
|
|
@@ -6703,6 +6712,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6703
6712
|
};
|
|
6704
6713
|
static defaultProps: {
|
|
6705
6714
|
inputStyle: string;
|
|
6715
|
+
isDefaultFocus: boolean;
|
|
6706
6716
|
};
|
|
6707
6717
|
composerRef: {
|
|
6708
6718
|
el: HTMLElement | null;
|
|
@@ -6725,7 +6735,6 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6725
6735
|
private processArrowKeys;
|
|
6726
6736
|
private handleArrowKeysForAutocomplete;
|
|
6727
6737
|
private processTabKey;
|
|
6728
|
-
processSpaceKey(ev: KeyboardEvent): void;
|
|
6729
6738
|
private processEnterKey;
|
|
6730
6739
|
private processEscapeKey;
|
|
6731
6740
|
private processF4Key;
|
|
@@ -6733,6 +6742,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
6733
6742
|
onCompositionStart(): void;
|
|
6734
6743
|
onCompositionEnd(): void;
|
|
6735
6744
|
onKeydown(ev: KeyboardEvent): void;
|
|
6745
|
+
onPaste(ev: ClipboardEvent): void;
|
|
6736
6746
|
onInput(ev: InputEvent): void;
|
|
6737
6747
|
onKeyup(ev: KeyboardEvent): void;
|
|
6738
6748
|
showAutocomplete(searchTerm: string): void;
|
|
@@ -6911,7 +6921,7 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
|
|
|
6911
6921
|
focusGrid(): void;
|
|
6912
6922
|
onKeydown(ev: KeyboardEvent): void;
|
|
6913
6923
|
onTopBarComposerFocused(selection: ComposerSelection): void;
|
|
6914
|
-
onGridComposerContentFocused(): void;
|
|
6924
|
+
onGridComposerContentFocused(selection: ComposerSelection): void;
|
|
6915
6925
|
onGridComposerCellFocused(content?: string, selection?: ComposerSelection): void;
|
|
6916
6926
|
/**
|
|
6917
6927
|
* Start the edition or update the content if it's already started.
|
|
@@ -6922,8 +6932,8 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
|
|
|
6922
6932
|
|
|
6923
6933
|
interface Props$5 {
|
|
6924
6934
|
focus: ComposerFocusType;
|
|
6925
|
-
|
|
6926
|
-
|
|
6935
|
+
onComposerContentFocused: () => void;
|
|
6936
|
+
onComposerCellFocused: () => void;
|
|
6927
6937
|
gridDims: DOMDimension;
|
|
6928
6938
|
}
|
|
6929
6939
|
/**
|
|
@@ -6935,17 +6945,23 @@ declare class GridComposer extends Component<Props$5, SpreadsheetChildEnv> {
|
|
|
6935
6945
|
static components: {
|
|
6936
6946
|
Composer: typeof Composer;
|
|
6937
6947
|
};
|
|
6938
|
-
private gridComposerRef;
|
|
6939
|
-
private zone;
|
|
6940
6948
|
private rect;
|
|
6949
|
+
private isEditing;
|
|
6941
6950
|
private isCellReferenceVisible;
|
|
6942
|
-
|
|
6951
|
+
get defaultRect(): {
|
|
6952
|
+
x: number;
|
|
6953
|
+
y: number;
|
|
6954
|
+
width: number;
|
|
6955
|
+
height: number;
|
|
6956
|
+
};
|
|
6943
6957
|
setup(): void;
|
|
6944
6958
|
get shouldDisplayCellReference(): boolean;
|
|
6945
6959
|
get cellReference(): string;
|
|
6946
6960
|
get cellReferenceStyle(): string;
|
|
6961
|
+
get composerProps(): ComposerProps;
|
|
6947
6962
|
get containerStyle(): string;
|
|
6948
|
-
|
|
6963
|
+
private updateComponentPosition;
|
|
6964
|
+
private updateCellReferenceVisibility;
|
|
6949
6965
|
}
|
|
6950
6966
|
|
|
6951
6967
|
interface ResizerState {
|
|
@@ -7145,7 +7161,6 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7145
7161
|
readonly HEADER_WIDTH = 48;
|
|
7146
7162
|
private menuState;
|
|
7147
7163
|
private gridRef;
|
|
7148
|
-
private hiddenInput;
|
|
7149
7164
|
onMouseWheel: (ev: WheelEvent) => void;
|
|
7150
7165
|
canvasPosition: DOMCoordinates;
|
|
7151
7166
|
hoveredCell: Partial<Position$1>;
|
|
@@ -7157,7 +7172,7 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7157
7172
|
get gridOverlayDimensions(): string;
|
|
7158
7173
|
onClosePopover(): void;
|
|
7159
7174
|
private keyDownMapping;
|
|
7160
|
-
|
|
7175
|
+
focusDefaultElement(): void;
|
|
7161
7176
|
get gridEl(): HTMLElement;
|
|
7162
7177
|
getAutofillPosition(): {
|
|
7163
7178
|
left: number;
|
|
@@ -7177,7 +7192,6 @@ declare class Grid extends Component<Props$1, SpreadsheetChildEnv> {
|
|
|
7177
7192
|
closeOpenedPopover(): void;
|
|
7178
7193
|
processArrows(ev: KeyboardEvent): void;
|
|
7179
7194
|
onKeydown(ev: KeyboardEvent): void;
|
|
7180
|
-
onInput(ev: InputEvent): void;
|
|
7181
7195
|
onInputContextMenu(ev: MouseEvent): void;
|
|
7182
7196
|
onCellRightClicked(col: HeaderIndex, row: HeaderIndex, { x, y }: DOMCoordinates): void;
|
|
7183
7197
|
toggleContextMenu(type: ContextMenuType, x: Pixel, y: Pixel): void;
|