@odoo/o-spreadsheet 19.5.0-alpha.1 → 19.5.0-alpha.11
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 +54676 -52882
- package/dist/o_spreadsheet.css +95 -44
- package/dist/o_spreadsheet.esm.js +54498 -52704
- package/dist/o_spreadsheet.iife.js +54471 -52677
- package/dist/o_spreadsheet.min.iife.js +403 -403
- package/dist/o_spreadsheet.xml +290 -167
- package/dist/types/actions/action.d.ts +1 -7
- package/dist/types/actions/data_actions.d.ts +1 -0
- package/dist/types/actions/menu_items_actions.d.ts +2 -0
- package/dist/types/clipboard_handlers/default_clipboard.d.ts +1 -1
- package/dist/types/collaborative/ot/ot_helpers.d.ts +3 -1
- 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} +7 -12
- 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/clickable_cells_overlay/clickable_cells_overlay.d.ts +20 -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 +7 -12
- package/dist/types/components/error_tooltip/error_tooltip.d.ts +2 -0
- package/dist/types/components/figures/chart/chartJs/chartjs_geo_projection_plugin.d.ts +12 -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 +3 -0
- package/dist/types/components/figures/figure/figure.d.ts +8 -9
- package/dist/types/components/figures/figure_carousel/figure_carousel.d.ts +7 -2
- package/dist/types/components/figures/figure_chart/figure_chart.d.ts +1 -2
- package/dist/types/components/figures/figure_container/figure_container.d.ts +4 -2
- package/dist/types/components/figures/figure_image/figure_image.d.ts +1 -2
- package/dist/types/components/filters/filter_menu/filter_menu.d.ts +1 -0
- package/dist/types/components/grid/grid.d.ts +8 -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 +6 -4
- 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/dom_helpers.d.ts +2 -0
- package/dist/types/components/helpers/figure_snap_helper.d.ts +3 -3
- package/dist/types/components/helpers/wheel_hook.d.ts +1 -1
- package/dist/types/components/helpers/zoom.d.ts +1 -5
- 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 +3 -0
- package/dist/types/components/link/link_display/link_display.d.ts +1 -0
- package/dist/types/components/link/link_editor/link_editor.d.ts +1 -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 +3 -0
- package/dist/types/components/scrollbar/scrollbar_vertical.d.ts +5 -1
- package/dist/types/components/selection_input/selection_input_store.d.ts +1 -1
- package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +20 -2
- package/dist/types/components/side_panel/chart/building_blocks/chart_title/chart_title.d.ts +1 -0
- package/dist/types/components/side_panel/chart/chart_type_picker/chart_type_picker.d.ts +5 -18
- package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +64 -0
- 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/criterion_form/calendar_button/calendar_button.d.ts +13 -0
- package/dist/types/components/side_panel/criterion_form/date_criterion/date_criterion.d.ts +2 -0
- package/dist/types/components/side_panel/criterion_form/double_input_criterion/double_input_criterion.d.ts +3 -0
- package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup.d.ts +28 -0
- package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup_store.d.ts +13 -0
- 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_layout_configurator/pivot_layout_configurator.d.ts +0 -2
- 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/side_panel/split_to_columns_panel/split_to_columns_panel.d.ts +4 -11
- package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_store.d.ts +33 -0
- package/dist/types/components/small_bottom_bar/small_bottom_bar.d.ts +1 -0
- package/dist/types/components/spreadsheet/spreadsheet.d.ts +2 -0
- package/dist/types/components/standalone_grid_canvas/standalone_grid_canvas.d.ts +2 -1
- package/dist/types/components/standalone_viewport/standalone_viewport.d.ts +56 -0
- package/dist/types/components/standalone_viewport/standalone_viewport_store.d.ts +28 -0
- package/dist/types/components/tables/hovered_table_store.d.ts +3 -6
- 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/constants.d.ts +4 -0
- package/dist/types/formulas/code_builder.d.ts +2 -1
- package/dist/types/formulas/compiler.d.ts +7 -0
- package/dist/types/functions/create_compute_function.d.ts +4 -3
- package/dist/types/functions/function_registry.d.ts +4 -5
- package/dist/types/functions/helper_matrices.d.ts +1 -0
- package/dist/types/functions/helper_statistical.d.ts +6 -0
- package/dist/types/functions/module_array.d.ts +41 -23
- package/dist/types/functions/module_database.d.ts +18 -6
- package/dist/types/functions/module_date.d.ts +70 -22
- package/dist/types/functions/module_engineering.d.ts +3 -1
- package/dist/types/functions/module_filter.d.ts +2 -2
- package/dist/types/functions/module_financial.d.ts +105 -35
- package/dist/types/functions/module_info.d.ts +33 -11
- package/dist/types/functions/module_logical.d.ts +16 -8
- package/dist/types/functions/module_lookup.d.ts +23 -15
- package/dist/types/functions/module_math.d.ts +125 -43
- package/dist/types/functions/module_operators.d.ts +7 -3
- package/dist/types/functions/module_statistical.d.ts +78 -22
- package/dist/types/functions/module_text.d.ts +70 -24
- package/dist/types/functions/module_web.d.ts +3 -1
- package/dist/types/helpers/carousel_helpers.d.ts +8 -3
- package/dist/types/helpers/figures/chart.d.ts +2 -0
- package/dist/types/helpers/figures/charts/chart_common.d.ts +0 -2
- package/dist/types/helpers/figures/charts/scorecard_chart_config_builder.d.ts +2 -0
- package/dist/types/helpers/figures/figure/figure.d.ts +3 -2
- package/dist/types/helpers/internal_viewport.d.ts +20 -10
- package/dist/types/helpers/misc.d.ts +2 -0
- package/dist/types/helpers/pivot/pivot_highlight.d.ts +2 -2
- package/dist/types/helpers/rectangle.d.ts +4 -0
- package/dist/types/helpers/text_helper.d.ts +6 -1
- package/dist/types/helpers/ui/split_to_columns_interactive.d.ts +1 -1
- package/dist/types/helpers/viewport_collection.d.ts +51 -21
- package/dist/types/helpers/zones.d.ts +1 -0
- package/dist/types/index.d.ts +30 -3
- package/dist/types/model.d.ts +1 -0
- package/dist/types/plugins/core/carousel.d.ts +8 -4
- package/dist/types/plugins/core/cell.d.ts +1 -0
- package/dist/types/plugins/core/chart.d.ts +2 -0
- package/dist/types/plugins/core/conditional_format.d.ts +2 -0
- package/dist/types/plugins/core/data_validation.d.ts +2 -0
- package/dist/types/plugins/core/formulas_provider.d.ts +8 -0
- package/dist/types/plugins/core/pivot.d.ts +1 -0
- package/dist/types/plugins/core/squisher.d.ts +3 -1
- package/dist/types/plugins/core_plugin.d.ts +7 -3
- package/dist/types/plugins/ui_core_views/cell_evaluation/evaluation_plugin.d.ts +10 -3
- package/dist/types/plugins/ui_core_views/pivot_ui.d.ts +3 -0
- package/dist/types/plugins/ui_feature/collaborative.d.ts +2 -1
- package/dist/types/plugins/ui_feature/ui_options.d.ts +1 -7
- package/dist/types/plugins/ui_feature/ui_sheet.d.ts +2 -1
- package/dist/types/plugins/ui_stateful/carousel_ui.d.ts +2 -2
- package/dist/types/plugins/{ui_feature → ui_stateful}/figure.d.ts +4 -0
- package/dist/types/plugins/ui_stateful/filter_evaluation.d.ts +2 -3
- package/dist/types/plugins/ui_stateful/header_positions.d.ts +2 -1
- package/dist/types/registries/chart_registry.d.ts +3 -0
- package/dist/types/registries/data_source_registry.d.ts +15 -0
- package/dist/types/registries/figures_registry.d.ts +4 -1
- package/dist/types/store_engine/dependency_container.d.ts +5 -0
- package/dist/types/store_engine/store_hooks.d.ts +6 -0
- package/dist/types/store_engine/store_registries.d.ts +4 -0
- 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/main_viewport_store.d.ts +11 -0
- package/dist/types/stores/spreadsheet_store.d.ts +1 -1
- package/dist/types/stores/table_resize_store.d.ts +6 -0
- package/dist/types/stores/trim_whitespace_store.d.ts +9 -0
- package/dist/types/stores/viewports_store.d.ts +87 -0
- package/dist/types/stores/zoom_store.d.ts +14 -0
- package/dist/types/types/chart/radar_chart.d.ts +1 -1
- package/dist/types/types/chart/scorecard_chart.d.ts +2 -0
- package/dist/types/types/commands.d.ts +25 -58
- package/dist/types/types/core_getters.d.ts +3 -1
- package/dist/types/types/figure.d.ts +26 -3
- package/dist/types/types/functions.d.ts +14 -4
- package/dist/types/types/getters.d.ts +28 -11
- package/dist/types/types/misc.d.ts +19 -1
- package/dist/types/types/range.d.ts +1 -0
- package/dist/types/types/rendering.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/split_to_columns.d.ts +0 -21
- package/dist/types/plugins/ui_feature/table_autofill.d.ts +0 -6
- package/dist/types/plugins/ui_feature/table_resize_ui.d.ts +0 -6
- package/dist/types/plugins/ui_stateful/sheetview.d.ts +0 -123
- /package/dist/types/plugins/{ui_feature → ui_stateful}/cell_computed_style.d.ts +0 -0
- /package/dist/types/plugins/{ui_feature → ui_stateful}/header_visibility_ui.d.ts +0 -0
- /package/dist/types/plugins/{ui_feature → ui_stateful}/table_computed_style.d.ts +0 -0
package/dist/types/model.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export declare class Model extends EventBus<any> implements CommandDispatcher {
|
|
|
35
35
|
private corePlugins;
|
|
36
36
|
private statefulUIPlugins;
|
|
37
37
|
private range;
|
|
38
|
+
private formulasPlugin;
|
|
38
39
|
private session;
|
|
39
40
|
/**
|
|
40
41
|
* In a collaborative context, some commands can be replayed, we have to ensure
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { CommandResult, CoreCommand } from "../../types/commands";
|
|
2
|
-
import { Carousel } from "../../types/figure";
|
|
3
|
-
import { UID } from "../../types/misc";
|
|
2
|
+
import { Carousel, CarouselData } from "../../types/figure";
|
|
3
|
+
import { RangeAdapterFunctions, UID } from "../../types/misc";
|
|
4
4
|
import { WorkbookData } from "../../types/workbook_data";
|
|
5
5
|
import { CorePlugin } from "../core_plugin";
|
|
6
6
|
interface CarouselState {
|
|
7
7
|
readonly carousels: Record<UID, Record<UID, Carousel | undefined> | undefined>;
|
|
8
8
|
}
|
|
9
9
|
export declare class CarouselPlugin extends CorePlugin<CarouselState> implements CarouselState {
|
|
10
|
-
static getters: readonly ["getCarousel", "doesCarouselExist"];
|
|
10
|
+
static getters: readonly ["getCarousel", "doesCarouselExist", "carouselToCarouselData"];
|
|
11
11
|
readonly carousels: Record<UID, Record<UID, Carousel | undefined> | undefined>;
|
|
12
|
-
|
|
12
|
+
adaptRanges(rangeAdapterFunctions: RangeAdapterFunctions): void;
|
|
13
|
+
allowDispatch(cmd: CoreCommand): CommandResult.Success | CommandResult.InvalidRange | CommandResult.InvalidFigureId | CommandResult.DuplicatedFigureId;
|
|
13
14
|
handle(cmd: CoreCommand): void;
|
|
14
15
|
doesCarouselExist(figureId: UID): boolean;
|
|
15
16
|
getCarousel(figureId: UID): Carousel;
|
|
16
17
|
private removeDeletedCharts;
|
|
18
|
+
private carouselDataToCarousel;
|
|
19
|
+
carouselToCarouselData(carousel: Carousel): CarouselData;
|
|
20
|
+
private areDataViewRangesValid;
|
|
17
21
|
import(data: WorkbookData): void;
|
|
18
22
|
export(data: WorkbookData): void;
|
|
19
23
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompiledFormula } from "../../formulas/compiler";
|
|
1
2
|
import { SpreadsheetChart } from "../../helpers/figures/chart";
|
|
2
3
|
import { ChartCreationContext, ChartDefinition, ChartType } from "../../types/chart/chart";
|
|
3
4
|
import { Command, CommandResult, CoreCommand } from "../../types/commands";
|
|
@@ -41,5 +42,6 @@ export declare class ChartPlugin extends CorePlugin<ChartState> implements Chart
|
|
|
41
42
|
private checkChartChanged;
|
|
42
43
|
/** If the command is meant to create a new figure, the position & offset argument need to be defined in the command */
|
|
43
44
|
private checkFigureArguments;
|
|
45
|
+
getFormulas(): CompiledFormula[];
|
|
44
46
|
}
|
|
45
47
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompiledFormula } from "../../formulas/compiler";
|
|
1
2
|
import { Command, CommandResult, CoreCommand } from "../../types/commands";
|
|
2
3
|
import { ConditionalFormat, ConditionalFormatInternal } from "../../types/conditional_formatting";
|
|
3
4
|
import { RangeAdapterFunctions, UID, Zone } from "../../types/misc";
|
|
@@ -55,5 +56,6 @@ export declare class ConditionalFormatPlugin extends CorePlugin<ConditionalForma
|
|
|
55
56
|
private checkCFValues;
|
|
56
57
|
private removeConditionalFormatting;
|
|
57
58
|
private changeCFPriority;
|
|
59
|
+
getFormulas(): CompiledFormula[];
|
|
58
60
|
}
|
|
59
61
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompiledFormula } from "../../formulas/compiler";
|
|
1
2
|
import { Command, CommandResult, CoreCommand } from "../../types/commands";
|
|
2
3
|
import { DataValidationRule } from "../../types/data_validation";
|
|
3
4
|
import { CellPosition, RangeAdapterFunctions, UID } from "../../types/misc";
|
|
@@ -34,5 +35,6 @@ export declare class DataValidationPlugin extends CorePlugin<DataValidationState
|
|
|
34
35
|
private checkCriterionHasValidNumberOfValues;
|
|
35
36
|
private checkCriterionValuesAreValid;
|
|
36
37
|
private checkValidRange;
|
|
38
|
+
getFormulas(): CompiledFormula[];
|
|
37
39
|
}
|
|
38
40
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CompiledFormula } from "../../formulas/compiler";
|
|
2
|
+
import { FormulaProvider } from "../../types/misc";
|
|
3
|
+
export declare class FormulaProviderAggregator {
|
|
4
|
+
private providers;
|
|
5
|
+
static getters: readonly ["getAllFormulas"];
|
|
6
|
+
addFormulaProvider(provider: FormulaProvider["getFormulas"]): void;
|
|
7
|
+
getAllFormulas(): CompiledFormula[];
|
|
8
|
+
}
|
|
@@ -59,6 +59,7 @@ export declare class PivotCorePlugin extends CorePlugin<CoreState> implements Co
|
|
|
59
59
|
private checkSortedColumnInMeasures;
|
|
60
60
|
private checkDuplicatedMeasureIds;
|
|
61
61
|
private checkCustomFieldsAreValid;
|
|
62
|
+
getFormulas(): CompiledFormula[];
|
|
62
63
|
/**
|
|
63
64
|
* Import the pivots
|
|
64
65
|
*/
|
|
@@ -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
|
|
@@ -46,7 +47,8 @@ export declare class Squisher {
|
|
|
46
47
|
* The result of this method is:
|
|
47
48
|
* - if the cell is not a formula, returns the content as is and resets the base formula
|
|
48
49
|
* - if the cell is a formula:
|
|
49
|
-
* - if there is no previous formula, or the normalized formula is different from the previous one
|
|
50
|
+
* - if there is no previous formula, or the normalized formula is different from the previous one or it contains blacklisted functions (see NonSquishableFunctionRegistry),
|
|
51
|
+
* resets the base formula to this one and returns the full formula string
|
|
50
52
|
* - else, compares the literal values and range dependencies to the previous formula, and for each parameter:
|
|
51
53
|
* - for numbers: returns a relative change (+N or -N) if possible, else the full number or "=" if unchanged
|
|
52
54
|
* - for strings: returns the full string if changed, else "="
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { CompiledFormula } from "../formulas/compiler";
|
|
1
2
|
import { StateObserver } from "../state_observer";
|
|
2
3
|
import { CoreCommand, CoreCommandDispatcher } from "../types/commands";
|
|
3
4
|
import { CoreGetters } from "../types/core_getters";
|
|
4
|
-
import { RangeAdapterFunctions, RangeProvider } from "../types/misc";
|
|
5
|
+
import { FormulaProvider, RangeAdapterFunctions, RangeProvider } from "../types/misc";
|
|
5
6
|
import { ModelConfig } from "../types/model";
|
|
6
7
|
import { WorkbookData } from "../types/workbook_data";
|
|
7
8
|
import { BasePlugin } from "./base_plugin";
|
|
9
|
+
import { FormulaProviderAggregator } from "./core/formulas_provider";
|
|
8
10
|
import { RangeAdapterPlugin } from "./core/range";
|
|
9
11
|
export interface CorePluginConfig {
|
|
10
12
|
readonly getters: CoreGetters;
|
|
11
13
|
readonly stateObserver: StateObserver;
|
|
12
14
|
readonly range: RangeAdapterPlugin;
|
|
15
|
+
readonly formulasPlugin: FormulaProviderAggregator;
|
|
13
16
|
readonly dispatch: CoreCommandDispatcher["dispatch"];
|
|
14
17
|
readonly canDispatch: CoreCommandDispatcher["dispatch"];
|
|
15
18
|
readonly custom: ModelConfig["custom"];
|
|
@@ -25,11 +28,11 @@ export interface CorePluginConstructor {
|
|
|
25
28
|
* persisted state.
|
|
26
29
|
* They should not be concerned about UI parts or transient state.
|
|
27
30
|
*/
|
|
28
|
-
export declare class CorePlugin<State = any> extends BasePlugin<State, CoreCommand> implements RangeProvider {
|
|
31
|
+
export declare class CorePlugin<State = any> extends BasePlugin<State, CoreCommand> implements RangeProvider, FormulaProvider {
|
|
29
32
|
protected getters: CoreGetters;
|
|
30
33
|
protected dispatch: CoreCommandDispatcher["dispatch"];
|
|
31
34
|
protected canDispatch: CoreCommandDispatcher["dispatch"];
|
|
32
|
-
constructor({ getters, stateObserver, range, dispatch, canDispatch }: CorePluginConfig);
|
|
35
|
+
constructor({ getters, stateObserver, range, dispatch, canDispatch, formulasPlugin, }: CorePluginConfig);
|
|
33
36
|
import(data: WorkbookData): void;
|
|
34
37
|
export(data: WorkbookData, shouldSquish: boolean): void;
|
|
35
38
|
/**
|
|
@@ -44,4 +47,5 @@ export declare class CorePlugin<State = any> extends BasePlugin<State, CoreComma
|
|
|
44
47
|
* @param sheetName couple of old and new sheet names to adapt ranges pointing to that sheet
|
|
45
48
|
*/
|
|
46
49
|
adaptRanges(rangeAdapterFunctions: RangeAdapterFunctions): void;
|
|
50
|
+
getFormulas(): CompiledFormula[];
|
|
47
51
|
}
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { CompiledFormula } from "../../../formulas/compiler";
|
|
2
2
|
import { CellValue, EvaluatedCell, FormulaCell } from "../../../types/cells";
|
|
3
|
-
import { Command,
|
|
3
|
+
import { Command, CommandResult } from "../../../types/commands";
|
|
4
4
|
import { PerfProfile } from "../../../types/functions";
|
|
5
5
|
import { CellPosition, FunctionResultObject, GetSymbolValue, Matrix, UID, Zone } from "../../../types/misc";
|
|
6
6
|
import { Range } from "../../../types/range";
|
|
7
7
|
import { ExcelWorkbookData } from "../../../types/workbook_data";
|
|
8
8
|
import { CoreViewPlugin, CoreViewPluginConfig } from "../../core_view_plugin";
|
|
9
9
|
export declare class EvaluationPlugin extends CoreViewPlugin {
|
|
10
|
-
static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getVisibleRangeValues", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isArrayFormulaSpillBlocked", "isEmpty", "getPerfProfile"];
|
|
10
|
+
static getters: readonly ["evaluateFormula", "evaluateFormulaResult", "evaluateCompiledFormula", "getCorrespondingFormulaCell", "getVisibleRangeValues", "getEvaluatedCell", "getEvaluatedCells", "getEvaluatedCellsInZone", "getEvaluatedCellsPositions", "getSpreadZone", "getArrayFormulaSpreadingOn", "isArrayFormulaSpillBlocked", "isEmpty", "getPerfProfile", "isAutomaticEvaluationEnabled"];
|
|
11
11
|
private shouldRebuildDependenciesGraph;
|
|
12
12
|
private forceEvaluation;
|
|
13
|
+
private automaticEvaluation;
|
|
13
14
|
private evaluator;
|
|
14
15
|
private positionsToUpdate;
|
|
15
16
|
constructor(config: CoreViewPluginConfig);
|
|
17
|
+
allowDispatch(cmd: Command): CommandResult.Success | CommandResult.NoChangeInAutomaticEvaluation;
|
|
16
18
|
beforeHandle(cmd: Command): void;
|
|
17
|
-
handle(cmd:
|
|
19
|
+
handle(cmd: Command): void;
|
|
18
20
|
finalize(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Returns whether automatic evaluation is enabled.
|
|
23
|
+
* When disabled, cells are only re-evaluated on explicit EVALUATE_CELLS commands (F9).
|
|
24
|
+
*/
|
|
25
|
+
isAutomaticEvaluationEnabled(): boolean;
|
|
19
26
|
evaluateFormula(sheetId: UID, formulaString: string, cellPosition?: CellPosition): CellValue | Matrix<CellValue>;
|
|
20
27
|
evaluateFormulaResult(sheetId: UID, formulaString: string, cellPosition?: CellPosition): Matrix<FunctionResultObject> | FunctionResultObject;
|
|
21
28
|
evaluateCompiledFormula(sheetId: UID, compiledFormula: CompiledFormula, getSymbolValue?: GetSymbolValue): FunctionResultObject | Matrix<FunctionResultObject>;
|
|
@@ -15,9 +15,12 @@ export declare class PivotUIPlugin extends CoreViewPlugin {
|
|
|
15
15
|
private pivots;
|
|
16
16
|
private unusedPivotsInFormulas?;
|
|
17
17
|
private custom;
|
|
18
|
+
private pivotPositionCache;
|
|
19
|
+
private shouldInvalidateCache;
|
|
18
20
|
constructor(config: CoreViewPluginConfig);
|
|
19
21
|
beforeHandle(cmd: Command): void;
|
|
20
22
|
handle(cmd: Command): void;
|
|
23
|
+
finalize(): void;
|
|
21
24
|
/**
|
|
22
25
|
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
23
26
|
* is no pivot at this position
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UID } from "../..";
|
|
1
2
|
import { Client, ClientId, ClientWithColor } from "../../types/collaborative/session";
|
|
2
3
|
import { GridRenderingContext } from "../../types/rendering";
|
|
3
4
|
import { UIPlugin, UIPluginConfig } from "../ui_plugin";
|
|
@@ -18,7 +19,7 @@ export declare class CollaborativePlugin extends UIPlugin {
|
|
|
18
19
|
* Get the list of others connected clients which are present in the same sheet
|
|
19
20
|
* and with a valid position
|
|
20
21
|
*/
|
|
21
|
-
getClientsToDisplay(): ClientToDisplay[];
|
|
22
|
+
getClientsToDisplay(sheetId: UID): ClientToDisplay[];
|
|
22
23
|
drawLayer(renderingContext: GridRenderingContext): void;
|
|
23
24
|
}
|
|
24
25
|
export {};
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { Command } from "../../types/commands";
|
|
2
2
|
import { UIPlugin } from "../ui_plugin";
|
|
3
3
|
export declare class UIOptionsPlugin extends UIPlugin {
|
|
4
|
-
static getters: readonly ["shouldShowFormulas"
|
|
4
|
+
static getters: readonly ["shouldShowFormulas"];
|
|
5
5
|
private showFormulas;
|
|
6
|
-
private automaticEvaluation;
|
|
7
6
|
handle(cmd: Command): void;
|
|
8
7
|
shouldShowFormulas(): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Returns whether automatic evaluation is enabled.
|
|
11
|
-
* When disabled, cells are only re-evaluated on explicit EVALUATE_CELLS commands (F9).
|
|
12
|
-
*/
|
|
13
|
-
isAutomaticEvaluationEnabled(): boolean;
|
|
14
8
|
}
|
|
@@ -3,7 +3,7 @@ import { CellPosition, Pixel, Style, UID, VerticalAlign, Zone } from "../../type
|
|
|
3
3
|
import { Rect } from "../../types/rendering";
|
|
4
4
|
import { UIPlugin } from "../ui_plugin";
|
|
5
5
|
export declare class SheetUIPlugin extends UIPlugin {
|
|
6
|
-
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getMultilineTextSize", "getContiguousZone", "computeTextYCoordinate"];
|
|
6
|
+
static getters: readonly ["getCellWidth", "getTextWidth", "getCellText", "getCellMultiLineText", "getMultilineTextSize", "getContiguousZone", "computeTextYCoordinate", "getZoneMaxWidth"];
|
|
7
7
|
private ctx;
|
|
8
8
|
allowDispatch(cmd: LocalCommand): CommandResult | CommandResult[];
|
|
9
9
|
handle(cmd: Command): void;
|
|
@@ -40,6 +40,7 @@ export declare class SheetUIPlugin extends UIPlugin {
|
|
|
40
40
|
* If the cell is part of a merge, the check applies to the main cell of the merge.
|
|
41
41
|
*/
|
|
42
42
|
private isCellEmpty;
|
|
43
|
+
getZoneMaxWidth(sheetId: UID, zone: Zone): number;
|
|
43
44
|
private getColMaxWidth;
|
|
44
45
|
/**
|
|
45
46
|
* Check that any "sheetId" in the command matches an existing
|
|
@@ -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;
|
|
@@ -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,10 +1,10 @@
|
|
|
1
1
|
import { Command, CommandResult, LocalCommand } from "../../types/commands";
|
|
2
2
|
import { CellPosition, UID } from "../../types/misc";
|
|
3
|
-
import { CriterionFilter, DataFilterValue
|
|
3
|
+
import { CriterionFilter, DataFilterValue } from "../../types/table";
|
|
4
4
|
import { ExcelWorkbookData } from "../../types/workbook_data";
|
|
5
5
|
import { UIPlugin } from "../ui_plugin";
|
|
6
6
|
export declare class FilterEvaluationPlugin extends UIPlugin {
|
|
7
|
-
static getters: readonly ["getFilterValue", "getFilterHiddenValues", "getFilterCriterionValue", "
|
|
7
|
+
static getters: readonly ["getFilterValue", "getFilterHiddenValues", "getFilterCriterionValue", "isRowFiltered", "isFilterActive"];
|
|
8
8
|
private filterValues;
|
|
9
9
|
hiddenRows: Record<UID, Set<number> | undefined>;
|
|
10
10
|
isEvaluationDirty: boolean;
|
|
@@ -16,7 +16,6 @@ export declare class FilterEvaluationPlugin extends UIPlugin {
|
|
|
16
16
|
getFilterHiddenValues(position: CellPosition): string[];
|
|
17
17
|
getFilterCriterionValue(position: CellPosition): CriterionFilter;
|
|
18
18
|
isFilterActive(position: CellPosition): boolean;
|
|
19
|
-
getFirstTableInSelection(): Table | undefined;
|
|
20
19
|
private updateFilter;
|
|
21
20
|
private updateHiddenRows;
|
|
22
21
|
exportForExcel(data: ExcelWorkbookData): void;
|
|
@@ -2,7 +2,7 @@ import { Command } from "../../types/commands";
|
|
|
2
2
|
import { Dimension, HeaderDimensions, HeaderIndex, Pixel, UID } from "../../types/misc";
|
|
3
3
|
import { UIPlugin } from "../ui_plugin";
|
|
4
4
|
export declare class HeaderPositionsUIPlugin extends UIPlugin {
|
|
5
|
-
static getters: readonly ["getColDimensions", "getRowDimensions", "getColRowOffset"];
|
|
5
|
+
static getters: readonly ["getColDimensions", "getRowDimensions", "getHeaderDimensions", "getColRowOffset"];
|
|
6
6
|
private headerPositions;
|
|
7
7
|
private isDirty;
|
|
8
8
|
handle(cmd: Command): void;
|
|
@@ -15,6 +15,7 @@ export declare class HeaderPositionsUIPlugin extends UIPlugin {
|
|
|
15
15
|
* Returns the size, start and end coordinates of a row an unfolded sheet
|
|
16
16
|
*/
|
|
17
17
|
getRowDimensions(sheetId: UID, row: HeaderIndex): HeaderDimensions;
|
|
18
|
+
getHeaderDimensions(sheetId: UID, dimension: "COL" | "ROW", index: number): HeaderDimensions;
|
|
18
19
|
/**
|
|
19
20
|
* Returns the offset of a header (determined by the dimension) at the given index
|
|
20
21
|
* based on the referenceIndex given. If start === 0, this method will return
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CoreChartOptions } from "chart.js";
|
|
2
|
+
import { CompiledFormula } from "..";
|
|
2
3
|
import { ChartCreationContext, ChartData, ChartRuntime, ChartType, ChartTypeDefinition, ExcelChartDefinition } from "../types/chart/chart";
|
|
3
4
|
import { CommandResult } from "../types/commands";
|
|
4
5
|
import { CoreGetters } from "../types/core_getters";
|
|
@@ -47,6 +48,8 @@ export interface ChartTypeBuilder<T extends ChartType> {
|
|
|
47
48
|
*/
|
|
48
49
|
getDefinitionForExcel(getters: Getters, definition: ChartTypeDefinition<T, Range>, params: Pick<ExcelChartDefinition, "dataSets" | "labelRange">): ExcelChartDefinition | undefined;
|
|
49
50
|
getRuntime(getters: Getters, definition: ChartTypeDefinition<T, Range>, chartDataExtractors: ChartDataExtractors, sheetId: UID, eventHandlers: ChartJsEventHandlers): ChartRuntime;
|
|
51
|
+
/** Get all the formulas used in the chart */
|
|
52
|
+
getFormulas(getters: CoreGetters, sheetId: UID, definition: ChartTypeDefinition<T, Range>): CompiledFormula[];
|
|
50
53
|
allowedDefinitionKeys: readonly string[];
|
|
51
54
|
sequence: number;
|
|
52
55
|
dataSeriesLimit?: number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Model } from "../model";
|
|
2
|
+
import { Getters } from "../types/getters";
|
|
3
|
+
import { UID } from "../types/misc";
|
|
4
|
+
import { Registry } from "./registry";
|
|
5
|
+
export interface UnusedDataSource {
|
|
6
|
+
label: string;
|
|
7
|
+
id: UID;
|
|
8
|
+
}
|
|
9
|
+
export interface DataSourceType {
|
|
10
|
+
type: string;
|
|
11
|
+
unusedLabel: string;
|
|
12
|
+
getUnusedInstances: (getters: Getters) => UnusedDataSource[];
|
|
13
|
+
deleteDataSource: (dispatch: Model["dispatch"], id: UID) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const unusedDataSourceRegistry: Registry<DataSourceType>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Action } from "../actions/action";
|
|
2
|
+
import { Getters } from "../types/getters";
|
|
2
3
|
import { UID } from "../types/misc";
|
|
3
4
|
import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
|
|
4
5
|
import { Registry } from "./registry";
|
|
@@ -14,6 +15,8 @@ export interface FigureContent {
|
|
|
14
15
|
SidePanelComponent?: string;
|
|
15
16
|
keepRatio?: boolean;
|
|
16
17
|
minFigSize?: number;
|
|
17
|
-
borderWidth
|
|
18
|
+
borderWidth: (getters: Getters) => number;
|
|
19
|
+
hasShadow: (getters: Getters) => boolean;
|
|
20
|
+
isRounded: (getters: Getters) => boolean;
|
|
18
21
|
}
|
|
19
22
|
export declare const figureRegistry: Registry<FigureContent>;
|
|
@@ -9,6 +9,10 @@ interface StoreUpdateEvent {
|
|
|
9
9
|
export declare class DependencyContainer extends EventBus<StoreUpdateEvent> {
|
|
10
10
|
private dependencies;
|
|
11
11
|
private factory;
|
|
12
|
+
private parent?;
|
|
13
|
+
/** If the dependency container has a parent, those are the store that will be owned by this container instead of its parent */
|
|
14
|
+
private ownStores;
|
|
15
|
+
constructor(parent?: DependencyContainer, extendedStores?: StoreConstructor[]);
|
|
12
16
|
/**
|
|
13
17
|
* Injects a store instance in the dependency container.
|
|
14
18
|
* Useful for injecting an external store that is not created by the container.
|
|
@@ -22,5 +26,6 @@ export declare class DependencyContainer extends EventBus<StoreUpdateEvent> {
|
|
|
22
26
|
instantiate<T>(Store: StoreConstructor<T>, ...args: StoreParams<StoreConstructor<T>>): T;
|
|
23
27
|
resetStores(): void;
|
|
24
28
|
dispose(): void;
|
|
29
|
+
trigger(type: StoreUpdateEvent["type"], payload?: Omit<StoreUpdateEvent, "type">): void;
|
|
25
30
|
}
|
|
26
31
|
export {};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { LocalStoreConstructor, Store, StoreConstructor, StoreParams } from "../types/store_engine";
|
|
2
|
+
import { DependencyContainer } from "./dependency_container";
|
|
2
3
|
/**
|
|
3
4
|
* This hook should be used at the root of your app to provide the store container.
|
|
4
5
|
*/
|
|
5
6
|
export declare function useStoreProvider(): any;
|
|
7
|
+
/**
|
|
8
|
+
* This create a new store dependency container. The store given in the extended store array will be owned by this
|
|
9
|
+
* new container, the other stores will be owned by the parent container.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useChildStoreProvider(extendedStores: StoreConstructor[]): DependencyContainer;
|
|
6
12
|
/**
|
|
7
13
|
* Get the instance of a store.
|
|
8
14
|
*/
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from "../types/commands";
|
|
2
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
3
|
+
/**
|
|
4
|
+
* The goal of this store is to make its attached viewport store follow the active sheet
|
|
5
|
+
*/
|
|
6
|
+
export declare class MainViewportStore extends SpreadsheetStore {
|
|
7
|
+
private viewStore;
|
|
8
|
+
private sheetIdAtFinalize;
|
|
9
|
+
protected handle(cmd: Command): void;
|
|
10
|
+
protected finalize(): void;
|
|
11
|
+
}
|
|
@@ -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,6 @@
|
|
|
1
|
+
import { Command, DispatchResult, ResizeTableCommand } from "../types/commands";
|
|
2
|
+
import { SpreadsheetStore } from "./spreadsheet_store";
|
|
3
|
+
export declare class TableResizeStore extends SpreadsheetStore {
|
|
4
|
+
canResizeTable(cmd: ResizeTableCommand): DispatchResult;
|
|
5
|
+
handle(cmd: Command): void;
|
|
6
|
+
}
|
|
@@ -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,87 @@
|
|
|
1
|
+
import { CellPosition, FigureUI, HeaderDimensions, HeaderIndex, Pixel, SheetViewDimensions, UID, ViewportsGetters, Zone } 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
|
+
type getHeaderDimensionsCallback = (sheetId: UID, dimension: "COL" | "ROW", index: number) => HeaderDimensions;
|
|
8
|
+
/**
|
|
9
|
+
* Viewport store.
|
|
10
|
+
*
|
|
11
|
+
* This store manages all things related to all viewport states.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export declare class ViewportsStore extends SpreadsheetStore {
|
|
15
|
+
mutators: readonly ["setViewportOffset", "resizeSheetView", "shiftViewportDown", "shiftViewportUp", "scrollToCell", "setDisplayedSheetId", "setViewportArgs", "rebuildViewports"];
|
|
16
|
+
private zoomStore;
|
|
17
|
+
private getHeaderDimensionsCallback;
|
|
18
|
+
private getFooterSizeCallback;
|
|
19
|
+
private getZoomLevelCallback;
|
|
20
|
+
private zoneToDisplay;
|
|
21
|
+
viewports: ViewportCollection;
|
|
22
|
+
private sheetsWithDirtyViewports;
|
|
23
|
+
private shouldRepositionViewports;
|
|
24
|
+
displayedSheetId: UID;
|
|
25
|
+
constructor(get: Get);
|
|
26
|
+
private handleEvent;
|
|
27
|
+
handle(cmd: Command): void;
|
|
28
|
+
finalize(): void;
|
|
29
|
+
private setViewports;
|
|
30
|
+
private syncPaneDivision;
|
|
31
|
+
setDisplayedSheetId(sheetId: UID): void;
|
|
32
|
+
setViewportOffset(offset: {
|
|
33
|
+
offsetX: Pixel;
|
|
34
|
+
offsetY: Pixel;
|
|
35
|
+
}): "noStateChange" | undefined;
|
|
36
|
+
resizeSheetView(dimensions: SheetViewDimensions): "noStateChange" | undefined;
|
|
37
|
+
shiftViewportDown(): void;
|
|
38
|
+
shiftViewportUp(): void;
|
|
39
|
+
scrollToCell(sheetId: UID, col: HeaderIndex, row: HeaderIndex): void;
|
|
40
|
+
get sheetViewDimensionWithHeaders(): DOMDimension;
|
|
41
|
+
get sheetViewDimension(): DOMDimension;
|
|
42
|
+
get gridOffset(): DOMCoordinates;
|
|
43
|
+
/** type as pane, not viewport but basically pane extends viewport */
|
|
44
|
+
get activeMainViewport(): Viewport;
|
|
45
|
+
/**
|
|
46
|
+
* Return the DOM scroll info of the active sheet, ie. the offset between the viewport left/top side and
|
|
47
|
+
* the grid left/top side, corresponding to the scroll of the scrollbars and not snapped to the grid.
|
|
48
|
+
*/
|
|
49
|
+
get activeSheetScrollInfo(): SheetDOMScrollInfo;
|
|
50
|
+
get visibleCols(): HeaderIndex[];
|
|
51
|
+
get visibleRows(): HeaderIndex[];
|
|
52
|
+
/**
|
|
53
|
+
* Get the positions of all the cells that are visible in the viewport, taking merges into account.
|
|
54
|
+
*/
|
|
55
|
+
get visibleCellPositions(): CellPosition[];
|
|
56
|
+
/**
|
|
57
|
+
* Return the main viewport maximum size relative to the client size.
|
|
58
|
+
*/
|
|
59
|
+
get mainViewportRect(): Rect;
|
|
60
|
+
get maximumSheetOffset(): {
|
|
61
|
+
maxOffsetX: Pixel;
|
|
62
|
+
maxOffsetY: Pixel;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Returns the position of the MainViewport relatively to the start of the grid (without headers)
|
|
66
|
+
* It corresponds to the summed dimensions of the visible cols/rows (in x/y respectively)
|
|
67
|
+
* situated before the pane divisions.
|
|
68
|
+
*/
|
|
69
|
+
get mainViewportCoordinates(): DOMCoordinates;
|
|
70
|
+
get visibleFigures(): FigureUI[];
|
|
71
|
+
/**
|
|
72
|
+
* Shift the viewport vertically and move the selection anchor
|
|
73
|
+
* such that it remains at the same place relative to the
|
|
74
|
+
* viewport top.
|
|
75
|
+
*/
|
|
76
|
+
private shiftVertically;
|
|
77
|
+
private getPaneDivisions;
|
|
78
|
+
private getFooterSize;
|
|
79
|
+
setViewportArgs(args: {
|
|
80
|
+
getHeaderDimensions?: getHeaderDimensionsCallback;
|
|
81
|
+
getFooterSize?: () => Pixel;
|
|
82
|
+
zoneToDisplay?: Zone;
|
|
83
|
+
}): void;
|
|
84
|
+
rebuildViewports(): void;
|
|
85
|
+
buildViewportGetters(getHeaderDimensions: (sheetId: UID, dimension: "COL" | "ROW", index: number) => HeaderDimensions): ViewportsGetters;
|
|
86
|
+
}
|
|
87
|
+
export {};
|