@odoo/o-spreadsheet 19.5.0-alpha.3 → 19.5.0-alpha.5
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 +50825 -50795
- package/dist/o_spreadsheet.css +3 -7
- package/dist/o_spreadsheet.esm.js +50550 -50520
- package/dist/o_spreadsheet.iife.js +50540 -50510
- package/dist/o_spreadsheet.min.iife.js +272 -272
- package/dist/o_spreadsheet.xml +7 -7
- package/dist/types/components/autofill/autofill.d.ts +3 -0
- package/dist/types/{plugins/ui_feature/autofill.d.ts → components/autofill/autofill_store.d.ts} +6 -11
- package/dist/types/components/autofill/table_autofill_store.d.ts +6 -0
- package/dist/types/components/border_editor/border_editor_widget.d.ts +1 -0
- package/dist/types/components/collaborative_client_tag/collaborative_client_tag.d.ts +2 -0
- package/dist/types/components/composer/composer/abstract_composer_store.d.ts +3 -2
- package/dist/types/components/composer/composer/composer.d.ts +2 -1
- package/dist/types/components/composer/grid_composer/grid_composer.d.ts +1 -0
- package/dist/types/components/dashboard/clickable_cell_store.d.ts +1 -0
- package/dist/types/components/dashboard/dashboard.d.ts +1 -0
- package/dist/types/components/figures/chart/gauge/gauge_chart_component.d.ts +1 -0
- package/dist/types/components/figures/chart/scorecard/chart_scorecard.d.ts +1 -0
- package/dist/types/components/figures/figure_container/figure_container.d.ts +1 -0
- package/dist/types/components/grid/grid.d.ts +4 -0
- package/dist/types/components/grid_add_rows_footer/grid_add_rows_footer.d.ts +1 -0
- package/dist/types/components/grid_overlay/grid_overlay.d.ts +1 -0
- package/dist/types/components/grid_popover/grid_popover.d.ts +1 -0
- package/dist/types/components/header_group/header_group_container.d.ts +2 -0
- package/dist/types/components/headers_overlay/headers_overlay.d.ts +3 -0
- package/dist/types/components/headers_overlay/unhide_headers.d.ts +4 -0
- package/dist/types/components/helpers/figure_snap_helper.d.ts +3 -3
- package/dist/types/components/highlight/border/border.d.ts +2 -0
- package/dist/types/components/highlight/corner/corner.d.ts +1 -0
- package/dist/types/components/highlight/highlight/highlight.d.ts +2 -0
- package/dist/types/components/paint_format_button/paint_format_store.d.ts +1 -1
- package/dist/types/components/popover/cell_popover_store.d.ts +2 -1
- package/dist/types/components/props_validation.d.ts +7 -7
- package/dist/types/components/scrollbar/scrollbar_horizontal.d.ts +2 -0
- package/dist/types/components/scrollbar/scrollbar_vertical.d.ts +2 -0
- package/dist/types/components/selection_input/selection_input_store.d.ts +1 -1
- package/dist/types/components/side_panel/chart/chart_type_picker/chart_type_picker.d.ts +1 -1
- package/dist/types/components/side_panel/chart/common.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/cell_is_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor_threshold.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/data_bar_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/conditional_formatting/cf_editor/icon_set_rule_editor.d.ts +1 -1
- package/dist/types/components/side_panel/find_and_replace/find_and_replace_store.d.ts +1 -0
- package/dist/types/components/side_panel/pivot/pivot_side_panel/pivot_side_panel_store.d.ts +1 -0
- package/dist/types/components/side_panel/remove_duplicates/remove_duplicates.d.ts +3 -10
- package/dist/types/components/side_panel/side_panel/side_panel_store.d.ts +1 -1
- package/dist/types/components/small_bottom_bar/small_bottom_bar.d.ts +1 -0
- package/dist/types/components/spreadsheet/spreadsheet.d.ts +1 -0
- package/dist/types/components/standalone_grid_canvas/standalone_grid_canvas.d.ts +1 -1
- package/dist/types/components/tables/table_resizer/table_resizer.d.ts +1 -0
- package/dist/types/components/top_bar/zoom_editor/zoom_editor.d.ts +2 -1
- package/dist/types/formulas/compiler.d.ts +1 -0
- package/dist/types/helpers/carousel_helpers.d.ts +8 -1
- package/dist/types/helpers/figures/charts/chart_common.d.ts +0 -2
- package/dist/types/helpers/figures/figure/figure.d.ts +3 -2
- package/dist/types/helpers/pivot/pivot_highlight.d.ts +2 -2
- package/dist/types/helpers/viewport_collection.d.ts +9 -7
- package/dist/types/index.d.ts +6 -0
- package/dist/types/plugins/core/squisher.d.ts +1 -0
- package/dist/types/plugins/ui_feature/figure.d.ts +4 -0
- package/dist/types/plugins/ui_stateful/carousel_ui.d.ts +2 -2
- package/dist/types/stores/array_formula_highlight.d.ts +1 -1
- package/dist/types/{plugins/ui_feature/automatic_sum.d.ts → stores/automatic_sum_store.d.ts} +5 -4
- package/dist/types/stores/checkbox_toggle.d.ts +9 -0
- package/dist/types/stores/client_focus_store.d.ts +1 -0
- package/dist/types/stores/data_cleanup_store.d.ts +31 -0
- package/dist/types/stores/spreadsheet_store.d.ts +1 -1
- package/dist/types/stores/trim_whitespace_store.d.ts +9 -0
- package/dist/types/stores/viewports_store.d.ts +73 -0
- package/dist/types/types/commands.d.ts +12 -53
- package/dist/types/types/getters.d.ts +2 -6
- package/dist/types/types/misc.d.ts +6 -0
- package/dist/types/types/range.d.ts +1 -0
- package/dist/types/types/store_engine.d.ts +10 -3
- package/package.json +2 -2
- package/dist/types/plugins/ui_feature/checkbox_toggle.d.ts +0 -9
- package/dist/types/plugins/ui_feature/data_cleanup.d.ts +0 -16
- package/dist/types/plugins/ui_feature/table_autofill.d.ts +0 -6
- package/dist/types/plugins/ui_stateful/sheetview.d.ts +0 -123
|
@@ -16,6 +16,7 @@ export declare class TableResizer extends Component<SpreadsheetChildEnv> {
|
|
|
16
16
|
clientY: number;
|
|
17
17
|
}, onPointerMove: (col: HeaderIndex, row: HeaderIndex, ev: MouseEvent) => void, onPointerUp: () => void, startScrollDirection?: import("../../helpers/drag_and_drop_grid_hook").DnDDirection) => void;
|
|
18
18
|
};
|
|
19
|
+
private viewStore;
|
|
19
20
|
setup(): void;
|
|
20
21
|
get containerStyle(): string;
|
|
21
22
|
onMouseDown(ev: PointerEvent): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Component } from "../../../owl3_compatibility_layer";
|
|
1
2
|
import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
|
|
2
3
|
import { ToolBarDropdownStore } from "../../helpers/top_bar_tool_hook";
|
|
3
4
|
import { NumberEditor } from "../../number_editor/number_editor";
|
|
4
|
-
import { Component } from "../../../owl3_compatibility_layer";
|
|
5
5
|
export declare class ToolBarZoom extends Component<SpreadsheetChildEnv> {
|
|
6
6
|
static template: string;
|
|
7
7
|
static components: {
|
|
@@ -11,6 +11,7 @@ export declare class ToolBarZoom extends Component<SpreadsheetChildEnv> {
|
|
|
11
11
|
class: string;
|
|
12
12
|
}>;
|
|
13
13
|
topBarToolStore: ToolBarDropdownStore;
|
|
14
|
+
private viewStore;
|
|
14
15
|
valueList: number[];
|
|
15
16
|
setup(): void;
|
|
16
17
|
get currentFontSize(): number;
|
|
@@ -92,6 +92,7 @@ export declare class CompiledFormula implements Omit<ICompiledFormula, "tokens"
|
|
|
92
92
|
* Make a new instance of CompiledFormula by compiling the formula string as input by the user.
|
|
93
93
|
* */
|
|
94
94
|
static Compile(formula: string, sheetId: UID, getters: CoreGetters): CompiledFormula;
|
|
95
|
+
areRangeShapesInLineWithNormalizedFormula(): boolean;
|
|
95
96
|
}
|
|
96
97
|
/**
|
|
97
98
|
* A compiled formula serialized
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { ChartDefinition } from "../types/chart/chart";
|
|
2
|
-
import { CarouselItem } from "../types/figure";
|
|
2
|
+
import { AnchorOffset, CarouselItem } from "../types/figure";
|
|
3
3
|
import { Getters } from "../types/getters";
|
|
4
|
+
import { UID } from "../types/misc";
|
|
5
|
+
import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
|
|
4
6
|
export declare const CAROUSEL_DEFAULT_CHART_DEFINITION: ChartDefinition;
|
|
7
|
+
/**
|
|
8
|
+
* Compute the anchor of a chart popped out of a carousel: slightly offset from the
|
|
9
|
+
* carousel figure so the new chart does not perfectly overlap it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getPoppedOutChartAnchor(env: SpreadsheetChildEnv, sheetId: UID, carouselId: UID): AnchorOffset;
|
|
5
12
|
export declare function getCarouselItemPreview(getters: Getters, item: CarouselItem): string;
|
|
6
13
|
export declare function getCarouselItemTitle(getters: Getters, item: CarouselItem): string;
|
|
@@ -6,7 +6,6 @@ import { Getters } from "../../../types/getters";
|
|
|
6
6
|
import { Locale } from "../../../types/locale";
|
|
7
7
|
import { Color, RangeAdapterFunctions, UID } from "../../../types/misc";
|
|
8
8
|
import { Range } from "../../../types/range";
|
|
9
|
-
import { DOMCoordinates, DOMDimension } from "../../../types/rendering";
|
|
10
9
|
import { ColorGenerator } from "../../color";
|
|
11
10
|
export declare const TREND_LINE_XAXIS_ID = "x1";
|
|
12
11
|
export declare const MOVING_AVERAGE_TREND_LINE_XAXIS_ID = "xMovingAverage";
|
|
@@ -47,7 +46,6 @@ export declare function chartMutedFontColor(backgroundColor: Color | undefined):
|
|
|
47
46
|
export declare function checkDataset(dataSource: ChartRangeDataSource<string>): CommandResult;
|
|
48
47
|
export declare function checkLabelRange(dataSource: ChartRangeDataSource<string>): CommandResult;
|
|
49
48
|
export declare function shouldRemoveFirstLabel(numberOfLabels: number, numberOfDataPoints: number | undefined, dataSetsHaveTitle: boolean): boolean;
|
|
50
|
-
export declare function getChartPositionAtCenterOfViewport(getters: Getters, chartSize: DOMDimension): DOMCoordinates;
|
|
51
49
|
export declare function getDefinedAxis(definition: Partial<ChartDefinition<string | Range>>): {
|
|
52
50
|
useLeftAxis: boolean;
|
|
53
51
|
useRightAxis: boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Position, UID } from "../../..";
|
|
2
2
|
import { AnchorOffset, Figure, FigureSize } from "../../../types/figure";
|
|
3
3
|
import { Getters } from "../../../types/getters";
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
4
|
+
import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
|
|
5
|
+
export declare function centerFigurePosition(env: SpreadsheetChildEnv, size: FigureSize): AnchorOffset;
|
|
6
|
+
export declare function getMaxFigureSize(figureSize: FigureSize): FigureSize;
|
|
6
7
|
export declare function boundColRowOffsetInSheet(getters: Getters, sheetId: UID, position: Position, figure: Figure): {
|
|
7
8
|
col: import("../../..").HeaderIndex;
|
|
8
9
|
row: import("../../..").HeaderIndex;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Getters } from "../../types/getters";
|
|
2
1
|
import { Highlight, UID } from "../../types/misc";
|
|
3
|
-
|
|
2
|
+
import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
|
|
3
|
+
export declare function getPivotHighlights(env: SpreadsheetChildEnv, pivotId: UID): Highlight[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { CommandResult, ResizeViewportCommand, SetViewportOffsetCommand } from "../types/commands";
|
|
2
1
|
import { AnchorOffset, Figure, FigureUI } from "../types/figure";
|
|
3
2
|
import { RenderingGetters } from "../types/getters";
|
|
4
|
-
import { CellPosition, Dimension, HeaderDimensions, HeaderIndex, PaneDivision, Pixel, PixelPosition, Position, UID, Zone } from "../types/misc";
|
|
3
|
+
import { CellPosition, Dimension, HeaderDimensions, HeaderIndex, PaneDivision, Pixel, PixelPosition, Position, SheetViewDimensions, UID, Zone } from "../types/misc";
|
|
5
4
|
import { DOMCoordinates, DOMDimension, EdgeScrollInfo, Rect, SheetDOMScrollInfo, Viewport } from "../types/rendering";
|
|
6
5
|
import { InternalViewport } from "./internal_viewport";
|
|
7
6
|
type SheetViewports = {
|
|
@@ -143,18 +142,21 @@ export declare class ViewportCollection {
|
|
|
143
142
|
getViewportZoomLevel(): number;
|
|
144
143
|
ensureMainViewportExist(sheetId: UID): void;
|
|
145
144
|
getSubViewports(sheetId: UID): InternalViewport[];
|
|
146
|
-
checkPositiveDimension(
|
|
147
|
-
checkValuesAreDifferent(
|
|
145
|
+
checkPositiveDimension(dims: SheetViewDimensions): boolean;
|
|
146
|
+
checkValuesAreDifferent(dims: SheetViewDimensions): boolean;
|
|
148
147
|
checkScrollingDirection(sheetId: UID, { offsetX, offsetY }: {
|
|
149
148
|
offsetX: Pixel;
|
|
150
149
|
offsetY: Pixel;
|
|
151
|
-
}):
|
|
152
|
-
checkIfViewportsWillChange(sheetId: UID, { offsetX, offsetY }:
|
|
150
|
+
}): boolean;
|
|
151
|
+
checkIfViewportsWillChange(sheetId: UID, { offsetX, offsetY }: {
|
|
152
|
+
offsetX: Pixel;
|
|
153
|
+
offsetY: Pixel;
|
|
154
|
+
}): boolean;
|
|
153
155
|
getMainViewport(sheetId: UID): Viewport;
|
|
154
156
|
getMainInternalViewport(sheetId: UID): InternalViewport;
|
|
155
157
|
/** gets rid of deprecated sheetIds */
|
|
156
158
|
cleanViewports(): void;
|
|
157
|
-
resizeSheetView(
|
|
159
|
+
resizeSheetView(dimensions: SheetViewDimensions): void;
|
|
158
160
|
recomputeViewports(): void;
|
|
159
161
|
setSheetViewOffset(sheetId: UID, offsetX: Pixel, offsetY: Pixel): void;
|
|
160
162
|
getViewportOffset(sheetId: UID): {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -228,6 +228,8 @@ import "./plugins/plugin_registries";
|
|
|
228
228
|
import "./registries/auto_completes/autocompelete_registration";
|
|
229
229
|
import "./registries/chart_types";
|
|
230
230
|
import "./registries/interactive_icon_on_cell_registry";
|
|
231
|
+
import { AutofillStore } from "./components/autofill/autofill_store";
|
|
232
|
+
import { TableAutofillStore } from "./components/autofill/table_autofill_store";
|
|
231
233
|
import { Composer } from "./components/composer/composer/composer";
|
|
232
234
|
import { StandaloneComposer } from "./components/composer/standalone_composer/standalone_composer";
|
|
233
235
|
import { Select } from "./components/select/select";
|
|
@@ -239,6 +241,7 @@ import { replaceSymbolInFormula } from "./helpers/formulas";
|
|
|
239
241
|
import { getFirstPivotFunction, getNumberOfPivotFunctions } from "./helpers/pivot/pivot_composer_helpers";
|
|
240
242
|
import { domainToColRowDomain } from "./helpers/pivot/pivot_domain_helpers";
|
|
241
243
|
import { fuzzyLookup } from "./helpers/search";
|
|
244
|
+
import { ViewportsStore } from "./stores/viewports_store";
|
|
242
245
|
export declare const helpers: {
|
|
243
246
|
arg: typeof arg;
|
|
244
247
|
isEvaluationError: typeof isEvaluationError;
|
|
@@ -419,8 +422,11 @@ export declare const stores: {
|
|
|
419
422
|
SidePanelStore: typeof SidePanelStore;
|
|
420
423
|
PivotSidePanelStore: typeof PivotSidePanelStore;
|
|
421
424
|
PivotMeasureDisplayPanelStore: typeof PivotMeasureDisplayPanelStore;
|
|
425
|
+
TableAutofillStore: typeof TableAutofillStore;
|
|
426
|
+
AutofillStore: typeof AutofillStore;
|
|
422
427
|
ClientFocusStore: typeof ClientFocusStore;
|
|
423
428
|
GridRenderer: typeof GridRenderer;
|
|
429
|
+
ViewportsStore: typeof ViewportsStore;
|
|
424
430
|
};
|
|
425
431
|
export { getCaretDownSvg, getCaretUpSvg } from "./components/icons/icons";
|
|
426
432
|
export { createAutocompleteArgumentsProvider } from "./functions/autocomplete_arguments_provider";
|
|
@@ -30,6 +30,7 @@ export declare class Squisher {
|
|
|
30
30
|
private alreadyAppliedNumberOffsets;
|
|
31
31
|
private previousStrings;
|
|
32
32
|
private baseFormulaWasTransformed;
|
|
33
|
+
private rangeToStringOptions;
|
|
33
34
|
private baseNumber;
|
|
34
35
|
constructor(getters: CoreGetters);
|
|
35
36
|
/** Build the result object based on a transformation. Joins the numbers into a single string, tries to do the same
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Command, CommandResult } from "../../types/commands";
|
|
2
|
+
import { Figure, FigureUI } from "../../types/figure";
|
|
3
|
+
import { UID } from "../../types/misc";
|
|
2
4
|
import { UIPlugin } from "../ui_plugin";
|
|
3
5
|
export declare class FigureUIPlugin extends UIPlugin {
|
|
6
|
+
static getters: readonly ["getFigureUI"];
|
|
4
7
|
allowDispatch(cmd: Command): CommandResult | CommandResult[];
|
|
5
8
|
handle(cmd: Command): void;
|
|
9
|
+
getFigureUI(sheetId: UID, figure: Figure): FigureUI;
|
|
6
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpreadsheetChart } from "../../helpers/figures/chart";
|
|
2
|
-
import { Command, CommandResult, LocalCommand } from "../../types/commands";
|
|
2
|
+
import { Command, CommandResult, LocalCommand, PopOutChartFromCarouselCommand } from "../../types/commands";
|
|
3
3
|
import { CarouselItem } from "../../types/figure";
|
|
4
4
|
import { UID } from "../../types/misc";
|
|
5
5
|
import { UIPlugin } from "../ui_plugin";
|
|
@@ -8,7 +8,7 @@ export declare class CarouselUIPlugin extends UIPlugin {
|
|
|
8
8
|
carouselStates: Record<UID, string | undefined>;
|
|
9
9
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
10
10
|
handle(cmd: Command): void;
|
|
11
|
-
popOutChartFromCarousel(
|
|
11
|
+
popOutChartFromCarousel(cmd: PopOutChartFromCarouselCommand): void;
|
|
12
12
|
getSelectedCarouselItem(figureId: UID): CarouselItem | undefined;
|
|
13
13
|
getChartFromFigureId(figureId: UID): SpreadsheetChart | undefined;
|
|
14
14
|
getChartIdFromFigureId(figureId: UID): UID | undefined;
|
|
@@ -3,7 +3,7 @@ import { Get } from "../types/store_engine";
|
|
|
3
3
|
import { HighlightStore } from "./highlight_store";
|
|
4
4
|
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
5
5
|
export declare class ArrayFormulaHighlight extends SpreadsheetStore {
|
|
6
|
-
protected highlightStore: import("../types/store_engine").
|
|
6
|
+
protected highlightStore: import("../types/store_engine").Store<HighlightStore>;
|
|
7
7
|
constructor(get: Get);
|
|
8
8
|
get highlights(): Highlight[];
|
|
9
9
|
}
|
package/dist/types/{plugins/ui_feature/automatic_sum.d.ts → stores/automatic_sum_store.d.ts}
RENAMED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Command } from "
|
|
2
|
-
import { Position, UID, Zone } from "
|
|
3
|
-
import {
|
|
1
|
+
import { Command } from "../types/commands";
|
|
2
|
+
import { Position, UID, Zone } from "../types/misc";
|
|
3
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
4
4
|
interface AutomaticSum {
|
|
5
5
|
position: Position;
|
|
6
6
|
zone: Zone;
|
|
7
7
|
}
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class AutomaticSumStore extends SpreadsheetStore {
|
|
9
9
|
static getters: readonly ["getAutomaticSums"];
|
|
10
10
|
handle(cmd: Command): void;
|
|
11
11
|
getAutomaticSums(sheetId: UID, zone: Zone, anchor: Position): AutomaticSum[];
|
|
12
|
+
get automaticSumsOnMainSelectedZone(): AutomaticSum[];
|
|
12
13
|
private sumData;
|
|
13
14
|
private sumAdjacentData;
|
|
14
15
|
/**
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from "../types/commands";
|
|
2
|
+
import { Zone } from "../types/misc";
|
|
3
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
4
|
+
export declare class CheckboxToggleStore extends SpreadsheetStore {
|
|
5
|
+
storeGetters: readonly ["hasBooleanValidationInZones"];
|
|
6
|
+
handle(cmd: Command): void;
|
|
7
|
+
hasBooleanValidationInZones(zones: Zone[]): boolean;
|
|
8
|
+
private toggleCheckbox;
|
|
9
|
+
}
|
|
@@ -5,6 +5,7 @@ export declare class ClientFocusStore extends SpreadsheetStore {
|
|
|
5
5
|
mutators: readonly ["focusClient", "unfocusClient", "showClientTag", "hideClientTag", "jumpToClient"];
|
|
6
6
|
private _showClientTag;
|
|
7
7
|
private clientFocusTimeout;
|
|
8
|
+
private viewStore;
|
|
8
9
|
constructor(get: Get);
|
|
9
10
|
get focusedClients(): Set<ClientId>;
|
|
10
11
|
jumpToClient(clientId: ClientId): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { CancelledReason, Command } from "../types/commands";
|
|
2
|
+
import { Get } from "../types/store_engine";
|
|
3
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
4
|
+
export declare class DataCleanupStore extends SpreadsheetStore {
|
|
5
|
+
mutators: readonly ["setHasHeader", "setColumns", "toggleAllColumns", "toggleColumn"];
|
|
6
|
+
private notificationStore;
|
|
7
|
+
hasHeader: boolean;
|
|
8
|
+
columns: {
|
|
9
|
+
[colIndex: number]: boolean;
|
|
10
|
+
};
|
|
11
|
+
constructor(get: Get);
|
|
12
|
+
private updateColumns;
|
|
13
|
+
setHasHeader(hasHeader: boolean): void;
|
|
14
|
+
setColumns(columns: {
|
|
15
|
+
[colIndex: number]: boolean;
|
|
16
|
+
}): void;
|
|
17
|
+
toggleAllColumns(): void;
|
|
18
|
+
toggleColumn(colIndex: number): void;
|
|
19
|
+
private get isEveryColumnSelected();
|
|
20
|
+
get removeDuplicateErrors(): CancelledReason[];
|
|
21
|
+
handle(cmd: Command): void;
|
|
22
|
+
private removeDuplicates;
|
|
23
|
+
private getUniqueRowsIndexes;
|
|
24
|
+
private notifyRowsRemovedAndRemaining;
|
|
25
|
+
private checkSingleRangeSelected;
|
|
26
|
+
private checkNoMergeInZone;
|
|
27
|
+
private checkRangeContainsValues;
|
|
28
|
+
private checkNoColumnProvided;
|
|
29
|
+
private checkColumnsIncludedInZone;
|
|
30
|
+
private getColsToAnalyze;
|
|
31
|
+
}
|
|
@@ -7,7 +7,7 @@ import { RendererStore } from "./renderer_store";
|
|
|
7
7
|
export declare class SpreadsheetStore extends DisposableStore {
|
|
8
8
|
protected model: Model;
|
|
9
9
|
protected getters: import("..").Getters;
|
|
10
|
-
protected renderer: import("../types/store_engine").
|
|
10
|
+
protected renderer: import("../types/store_engine").Store<RendererStore>;
|
|
11
11
|
constructor(get: Get);
|
|
12
12
|
get renderingLayers(): Readonly<LayerName[]>;
|
|
13
13
|
protected handle(cmd: Command): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from "../types/commands";
|
|
2
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
3
|
+
export declare class TrimWhitespaceStore extends SpreadsheetStore {
|
|
4
|
+
mutators: readonly ["trimWhitespace"];
|
|
5
|
+
private notificationStore;
|
|
6
|
+
trimWhitespace(): void;
|
|
7
|
+
handle(cmd: Command): void;
|
|
8
|
+
private _trimWhitespace;
|
|
9
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CellPosition, FigureUI, HeaderIndex, Pixel, SheetViewDimensions } from "..";
|
|
2
|
+
import { ViewportCollection } from "../helpers/viewport_collection";
|
|
3
|
+
import { Command } from "../types/commands";
|
|
4
|
+
import { DOMCoordinates, DOMDimension, Rect, SheetDOMScrollInfo, Viewport } from "../types/rendering";
|
|
5
|
+
import { Get } from "../types/store_engine";
|
|
6
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
7
|
+
/**
|
|
8
|
+
* Viewport store.
|
|
9
|
+
*
|
|
10
|
+
* This store manages all things related to all viewport states.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export declare class ViewportsStore extends SpreadsheetStore {
|
|
14
|
+
mutators: readonly ["setViewportOffset", "resizeSheetView", "setZoom", "shiftViewportDown", "shiftViewportUp", "scrollToCell"];
|
|
15
|
+
viewports: ViewportCollection;
|
|
16
|
+
private sheetsWithDirtyViewports;
|
|
17
|
+
private shouldRepositionViewports;
|
|
18
|
+
constructor(get: Get);
|
|
19
|
+
private handleEvent;
|
|
20
|
+
handle(cmd: Command): void;
|
|
21
|
+
finalize(): void;
|
|
22
|
+
private setViewports;
|
|
23
|
+
private syncPaneDivision;
|
|
24
|
+
setViewportOffset(offset: {
|
|
25
|
+
offsetX: Pixel;
|
|
26
|
+
offsetY: Pixel;
|
|
27
|
+
}): "noStateChange" | undefined;
|
|
28
|
+
resizeSheetView(dimensions: SheetViewDimensions): "noStateChange" | undefined;
|
|
29
|
+
setZoom(zoom: number): "noStateChange" | undefined;
|
|
30
|
+
shiftViewportDown(): void;
|
|
31
|
+
shiftViewportUp(): void;
|
|
32
|
+
scrollToCell(col: HeaderIndex, row: HeaderIndex): void;
|
|
33
|
+
get sheetViewDimensionWithHeaders(): DOMDimension;
|
|
34
|
+
get sheetViewDimension(): DOMDimension;
|
|
35
|
+
get gridOffset(): DOMCoordinates;
|
|
36
|
+
/** type as pane, not viewport but basically pane extends viewport */
|
|
37
|
+
get activeMainViewport(): Viewport;
|
|
38
|
+
/**
|
|
39
|
+
* Return the DOM scroll info of the active sheet, ie. the offset between the viewport left/top side and
|
|
40
|
+
* the grid left/top side, corresponding to the scroll of the scrollbars and not snapped to the grid.
|
|
41
|
+
*/
|
|
42
|
+
get activeSheetScrollInfo(): SheetDOMScrollInfo;
|
|
43
|
+
get visibleCols(): HeaderIndex[];
|
|
44
|
+
get visibleRows(): HeaderIndex[];
|
|
45
|
+
/**
|
|
46
|
+
* Get the positions of all the cells that are visible in the viewport, taking merges into account.
|
|
47
|
+
*/
|
|
48
|
+
get visibleCellPositions(): CellPosition[];
|
|
49
|
+
/**
|
|
50
|
+
* Return the main viewport maximum size relative to the client size.
|
|
51
|
+
*/
|
|
52
|
+
get mainViewportRect(): Rect;
|
|
53
|
+
get maximumSheetOffset(): {
|
|
54
|
+
maxOffsetX: Pixel;
|
|
55
|
+
maxOffsetY: Pixel;
|
|
56
|
+
};
|
|
57
|
+
get scrollBarWidth(): Pixel;
|
|
58
|
+
/**
|
|
59
|
+
* Returns the position of the MainViewport relatively to the start of the grid (without headers)
|
|
60
|
+
* It corresponds to the summed dimensions of the visible cols/rows (in x/y respectively)
|
|
61
|
+
* situated before the pane divisions.
|
|
62
|
+
*/
|
|
63
|
+
get mainViewportCoordinates(): DOMCoordinates;
|
|
64
|
+
get zoomLevel(): number;
|
|
65
|
+
get visibleFigures(): FigureUI[];
|
|
66
|
+
/**
|
|
67
|
+
* Shift the viewport vertically and move the selection anchor
|
|
68
|
+
* such that it remains at the same place relative to the
|
|
69
|
+
* viewport top.
|
|
70
|
+
*/
|
|
71
|
+
private shiftVertically;
|
|
72
|
+
private getPaneDivisions;
|
|
73
|
+
}
|