@odoo/o-spreadsheet 19.5.0-alpha.0 → 19.5.0-alpha.10
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 +54635 -52850
- package/dist/o_spreadsheet.css +95 -44
- package/dist/o_spreadsheet.esm.js +54380 -52595
- package/dist/o_spreadsheet.iife.js +54407 -52622
- 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 +1 -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_helpers.d.ts +2 -2
- 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 +29 -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 +1 -0
- 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/index.d.ts
CHANGED
|
@@ -55,8 +55,8 @@ import { openLink, urlRepresentation } from "./helpers/links";
|
|
|
55
55
|
import { deepCopy, deepEquals, doesCellContainFunction, getCanonicalSymbolName, getUniqueText, isDefined, isFormula, isMarkdownLink, lazy, markdownLink, parseMarkdownLink, sanitizeSheetName, unquote } from "./helpers/misc";
|
|
56
56
|
import { isNumber } from "./helpers/numbers";
|
|
57
57
|
import { insertTokenAfterArgSeparator, insertTokenAfterLeftParenthesis, makeFieldProposal } from "./helpers/pivot/pivot_composer_helpers";
|
|
58
|
-
import { splitReference } from "./helpers/references";
|
|
59
|
-
import { computeTextWidth } from "./helpers/text_helper";
|
|
58
|
+
import { isSingleCellReference, splitReference } from "./helpers/references";
|
|
59
|
+
import { computeCachedTextDimension, computeTextWidth } from "./helpers/text_helper";
|
|
60
60
|
import { UuidGenerator } from "./helpers/uuid";
|
|
61
61
|
import { expandZoneOnInsertion, isInside, mergeContiguousZones, overlap, positionToZone, reduceZoneOnDeletion, toUnboundedZone, toZone, union } from "./helpers/zones";
|
|
62
62
|
import { Component } from "./owl3_compatibility_layer";
|
|
@@ -99,6 +99,7 @@ import { HighlightStore } from "./stores/highlight_store";
|
|
|
99
99
|
import { NotificationStore } from "./stores/notification_store";
|
|
100
100
|
import { RendererStore } from "./stores/renderer_store";
|
|
101
101
|
import { SpreadsheetStore } from "./stores/spreadsheet_store";
|
|
102
|
+
import { ZoomStore } from "./stores/zoom_store";
|
|
102
103
|
import { schemeToColorScale } from "./types/chart/chart";
|
|
103
104
|
import { AddFunctionDescription } from "./types/functions";
|
|
104
105
|
import { isMatrix } from "./types/misc";
|
|
@@ -198,7 +199,7 @@ export declare const registries: {
|
|
|
198
199
|
pivotRegistry: import(".").Registry<import("./helpers/pivot/pivot_registry").PivotRegistryItem>;
|
|
199
200
|
pivotTimeAdapterRegistry: import(".").Registry<import(".").PivotTimeAdapter<import(".").CellValue>>;
|
|
200
201
|
pivotSidePanelRegistry: import(".").Registry<import("./helpers/pivot/pivot_side_panel_registry").PivotRegistryItem>;
|
|
201
|
-
pivotNormalizationValueRegistry: import(".").Registry<(value: string,
|
|
202
|
+
pivotNormalizationValueRegistry: import(".").Registry<(value: string, dimension: Pick<import(".").PivotDimension, "type" | "displayName" | "granularity">) => import(".").CellValue>;
|
|
202
203
|
supportedPivotPositionalFormulaRegistry: import(".").Registry<boolean>;
|
|
203
204
|
pivotToFunctionValueRegistry: import(".").Registry<(value: import(".").CellValue, granularity?: string) => string>;
|
|
204
205
|
migrationStepRegistry: import(".").Registry<import("./migrations/migration_steps").MigrationStep>;
|
|
@@ -219,6 +220,7 @@ export declare const registries: {
|
|
|
219
220
|
getKeys(): string[];
|
|
220
221
|
remove(key: string): void;
|
|
221
222
|
};
|
|
223
|
+
unusedDataSourceRegistry: import(".").Registry<import("./registries/data_source_registry").DataSourceType>;
|
|
222
224
|
};
|
|
223
225
|
/** Registries Population */
|
|
224
226
|
import "./clipboard_handlers/clipboard_handler_registrations";
|
|
@@ -228,16 +230,26 @@ import "./plugins/plugin_registries";
|
|
|
228
230
|
import "./registries/auto_completes/autocompelete_registration";
|
|
229
231
|
import "./registries/chart_types";
|
|
230
232
|
import "./registries/interactive_icon_on_cell_registry";
|
|
233
|
+
import { AutofillStore } from "./components/autofill/autofill_store";
|
|
234
|
+
import { TableAutofillStore } from "./components/autofill/table_autofill_store";
|
|
231
235
|
import { Composer } from "./components/composer/composer/composer";
|
|
232
236
|
import { StandaloneComposer } from "./components/composer/standalone_composer/standalone_composer";
|
|
237
|
+
import { CarouselFigure } from "./components/figures/figure_carousel/figure_carousel";
|
|
238
|
+
import { isMobileOS } from "./components/helpers/dom_helpers";
|
|
233
239
|
import { Select } from "./components/select/select";
|
|
234
240
|
import { ChartRangeDataSourceComponent } from "./components/side_panel/chart/building_blocks/range_data_source/range_data_source";
|
|
241
|
+
import { CalendarButton } from "./components/side_panel/criterion_form/calendar_button/calendar_button";
|
|
242
|
+
import { Spreadsheet } from "./components/spreadsheet/spreadsheet";
|
|
235
243
|
import { TopBar } from "./components/top_bar/top_bar";
|
|
244
|
+
import { createComputeFunction } from "./functions/create_compute_function";
|
|
245
|
+
import { PositionMap } from "./helpers/cells/position_map";
|
|
236
246
|
import { parseFormat } from "./helpers/format/format_parser";
|
|
237
247
|
import { replaceSymbolInFormula } from "./helpers/formulas";
|
|
238
248
|
import { getFirstPivotFunction, getNumberOfPivotFunctions } from "./helpers/pivot/pivot_composer_helpers";
|
|
239
249
|
import { domainToColRowDomain } from "./helpers/pivot/pivot_domain_helpers";
|
|
250
|
+
import { drawHighlight } from "./helpers/rendering";
|
|
240
251
|
import { fuzzyLookup } from "./helpers/search";
|
|
252
|
+
import { ViewportsStore } from "./stores/viewports_store";
|
|
241
253
|
export declare const helpers: {
|
|
242
254
|
arg: typeof arg;
|
|
243
255
|
isEvaluationError: typeof isEvaluationError;
|
|
@@ -312,7 +324,13 @@ export declare const helpers: {
|
|
|
312
324
|
collapseHierarchicalDisplayName: typeof collapseHierarchicalDisplayName;
|
|
313
325
|
getCanonicalSymbolName: typeof getCanonicalSymbolName;
|
|
314
326
|
fuzzyLookup: typeof fuzzyLookup;
|
|
327
|
+
PositionMap: typeof PositionMap;
|
|
315
328
|
replaceSymbolInFormula: typeof replaceSymbolInFormula;
|
|
329
|
+
isSingleCellReference: typeof isSingleCellReference;
|
|
330
|
+
computeCachedTextDimension: typeof computeCachedTextDimension;
|
|
331
|
+
createComputeFunction: typeof createComputeFunction;
|
|
332
|
+
isMobileOS: typeof isMobileOS;
|
|
333
|
+
drawHighlight: typeof drawHighlight;
|
|
316
334
|
};
|
|
317
335
|
export declare const links: {
|
|
318
336
|
isMarkdownLink: typeof isMarkdownLink;
|
|
@@ -383,6 +401,9 @@ export declare const components: {
|
|
|
383
401
|
NumberInput: typeof NumberInput;
|
|
384
402
|
TopBar: typeof TopBar;
|
|
385
403
|
Composer: typeof Composer;
|
|
404
|
+
CalendarButton: typeof CalendarButton;
|
|
405
|
+
Spreadsheet: typeof Spreadsheet;
|
|
406
|
+
CarouselFigure: typeof CarouselFigure;
|
|
386
407
|
};
|
|
387
408
|
export declare const hooks: {
|
|
388
409
|
useDragAndDropListItems: typeof useDragAndDropListItems;
|
|
@@ -415,8 +436,13 @@ export declare const stores: {
|
|
|
415
436
|
SidePanelStore: typeof SidePanelStore;
|
|
416
437
|
PivotSidePanelStore: typeof PivotSidePanelStore;
|
|
417
438
|
PivotMeasureDisplayPanelStore: typeof PivotMeasureDisplayPanelStore;
|
|
439
|
+
TableAutofillStore: typeof TableAutofillStore;
|
|
440
|
+
AutofillStore: typeof AutofillStore;
|
|
418
441
|
ClientFocusStore: typeof ClientFocusStore;
|
|
419
442
|
GridRenderer: typeof GridRenderer;
|
|
443
|
+
ViewportsStore: typeof ViewportsStore;
|
|
444
|
+
ZoomStore: typeof ZoomStore;
|
|
445
|
+
globalStores: import(".").Registry<import(".").StoreConstructor<SpreadsheetStore, any[]>>;
|
|
420
446
|
};
|
|
421
447
|
export { getCaretDownSvg, getCaretUpSvg } from "./components/icons/icons";
|
|
422
448
|
export { createAutocompleteArgumentsProvider } from "./functions/autocomplete_arguments_provider";
|
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
|
|
@@ -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
|
+
}
|