@odoo/o-spreadsheet 19.5.0-alpha.11 → 19.5.0-alpha.13

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.
Files changed (56) hide show
  1. package/dist/material_symbols_outlined.css +9 -0
  2. package/dist/o_spreadsheet.cjs +2578 -900
  3. package/dist/o_spreadsheet.css +182 -41
  4. package/dist/o_spreadsheet.esm.js +2570 -892
  5. package/dist/o_spreadsheet.iife.js +2578 -900
  6. package/dist/o_spreadsheet.min.iife.js +344 -344
  7. package/dist/o_spreadsheet.xml +238 -150
  8. package/dist/types/actions/data_actions.d.ts +1 -0
  9. package/dist/types/components/bottom_bar/bottom_bar_statistic/bottom_bar_statistic.d.ts +3 -0
  10. package/dist/types/components/dashboard/clickable_cell_sort_icon/clickable_cell_sort_icon.d.ts +1 -1
  11. package/dist/types/components/figures/figure/figure.d.ts +1 -0
  12. package/dist/types/components/figures/figure_carousel/figure_carousel.d.ts +10 -0
  13. package/dist/types/components/figures/figure_container/figure_container.d.ts +1 -2
  14. package/dist/types/components/grid/grid.d.ts +1 -0
  15. package/dist/types/components/helpers/chart_drag_and_drop.d.ts +15 -0
  16. package/dist/types/components/helpers/dom_helpers.d.ts +3 -2
  17. package/dist/types/components/link/link_editor/link_editor.d.ts +1 -1
  18. package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +1 -1
  19. package/dist/types/components/side_panel/chart/building_blocks/color_scale/color_scale_picker.d.ts +1 -1
  20. package/dist/types/components/side_panel/chart/scorecard_chart_panel/scorecard_chart_config_panel.d.ts +6 -10
  21. package/dist/types/components/side_panel/data_analysis/chart_suggestion_preview.d.ts +19 -0
  22. package/dist/types/components/side_panel/data_analysis/data_analysis_panel.d.ts +17 -0
  23. package/dist/types/components/side_panel/data_analysis/data_analysis_store.d.ts +15 -0
  24. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +1 -6
  25. package/dist/types/components/side_panel/side_panel/side_panel_store.d.ts +2 -1
  26. package/dist/types/components/standalone_grid_canvas/carousel_data_view_print.d.ts +32 -0
  27. package/dist/types/components/standalone_grid_canvas/standalone_grid_canvas.d.ts +6 -0
  28. package/dist/types/components/standalone_viewport/standalone_viewport.d.ts +6 -3
  29. package/dist/types/components/standalone_viewport/standalone_viewport_store.d.ts +2 -1
  30. package/dist/types/components/tables/hovered_table_store.d.ts +6 -7
  31. package/dist/types/constants.d.ts +13 -1
  32. package/dist/types/functions/helpers.d.ts +4 -0
  33. package/dist/types/functions/module_operators.d.ts +1 -1
  34. package/dist/types/functions/module_text.d.ts +11 -11
  35. package/dist/types/functions/module_web.d.ts +1 -1
  36. package/dist/types/helpers/carousel_helpers.d.ts +8 -1
  37. package/dist/types/helpers/data_analysis.d.ts +16 -0
  38. package/dist/types/helpers/figures/chart.d.ts +1 -1
  39. package/dist/types/helpers/figures/charts/chart_data_source_helpers.d.ts +10 -0
  40. package/dist/types/helpers/figures/charts/chart_suggestion_engine.d.ts +8 -0
  41. package/dist/types/helpers/figures/charts/chart_ui_common.d.ts +8 -1
  42. package/dist/types/helpers/figures/charts/charts_suggestions_constants.d.ts +37 -0
  43. package/dist/types/helpers/figures/charts/gauge_chart_rendering.d.ts +6 -2
  44. package/dist/types/helpers/text_helper.d.ts +1 -1
  45. package/dist/types/index.d.ts +3 -1
  46. package/dist/types/registries/figures_registry.d.ts +1 -0
  47. package/dist/types/stores/cell_hover_overlay_store.d.ts +15 -0
  48. package/dist/types/stores/chart_drag_store.d.ts +10 -0
  49. package/dist/types/stores/grid_renderer_store.d.ts +3 -2
  50. package/dist/types/stores/main_viewport_store.d.ts +3 -0
  51. package/dist/types/stores/viewports_store.d.ts +0 -1
  52. package/dist/types/types/chart/chart.d.ts +3 -1
  53. package/dist/types/types/chart/chart_suggestion.d.ts +136 -0
  54. package/dist/types/types/chart/scorecard_chart.d.ts +3 -4
  55. package/dist/types/types/commands.d.ts +16 -11
  56. package/package.json +6 -5
@@ -9,6 +9,7 @@ export declare const sortDescending: ActionSpec;
9
9
  export declare const createRemoveFilter: ActionSpec;
10
10
  export declare const createRemoveFilterTool: ActionSpec;
11
11
  export declare const splitToColumns: ActionSpec;
12
+ export declare const dataAnalysis: ActionSpec;
12
13
  export declare const columnStatistics: ActionSpec;
13
14
  export declare const reinsertDynamicPivotMenu: ActionSpec;
14
15
  export declare const reinsertStaticPivotMenu: ActionSpec;
@@ -14,8 +14,11 @@ export declare class BottomBarStatistic extends Component<SpreadsheetChildEnv> {
14
14
  }>;
15
15
  private state;
16
16
  private store;
17
+ private sidePanelStore;
17
18
  setup(): void;
18
19
  getSelectedStatistic(): string | undefined;
19
20
  listSelectionStatistics(ev: MenuMouseEvent): void;
20
21
  private getComposedFnName;
22
+ get isDataAnalysisOpen(): boolean;
23
+ toggleDataAnalysisPanel(): void;
21
24
  }
@@ -6,7 +6,7 @@ export declare class ClickableCellSortIcon extends Component<SpreadsheetChildEnv
6
6
  position: import("../../..").CellPosition;
7
7
  sortDirection: "none" | (() => import("@odoo/owl").Type<import("../../..").SortDirection>);
8
8
  }>;
9
- private hoveredTableStore;
9
+ private hoveredCellOverlayStore;
10
10
  setup(): void;
11
11
  get style(): string;
12
12
  get verticalJustifyClass(): "justify-content-start" | "justify-content-center" | "justify-content-end";
@@ -19,6 +19,7 @@ export declare class FigureComponent extends Component<SpreadsheetChildEnv> {
19
19
  private menuState;
20
20
  private figureRef;
21
21
  get isSelected(): boolean;
22
+ get isThemeDependant(): boolean;
22
23
  get figureRegistry(): import("../../..").Registry<import("../../../registries/figures_registry").FigureContent>;
23
24
  get borderWidth(): number;
24
25
  get hasShadow(): boolean;
@@ -38,8 +38,12 @@ export declare class CarouselFigure extends Component<SpreadsheetChildEnv> {
38
38
  getItemTitle(item: CarouselItem): string;
39
39
  onCarouselTabClick(item: CarouselItem): void;
40
40
  get carouselStyle(): string;
41
+ get contentStyle(): string;
42
+ get headerStyle(): string;
43
+ get separatorStyle(): string;
41
44
  get title(): string;
42
45
  get titleStyle(): string;
46
+ private rectToCss;
43
47
  private updateTabsVisibility;
44
48
  get menuId(): string;
45
49
  toggleMenu(ev: MenuMouseEvent): void;
@@ -49,4 +53,10 @@ export declare class CarouselFigure extends Component<SpreadsheetChildEnv> {
49
53
  removeEmptyHeadersFromRange(range: Range): Range;
50
54
  onResizeColumns(columnWeights: number[]): void;
51
55
  get canResizeDataViewColumns(): boolean;
56
+ get carouselLayout(): {
57
+ headerRect: Rect;
58
+ separatorRect: Rect | undefined;
59
+ contentRect: Rect;
60
+ headerLineHeight: 1.5;
61
+ };
52
62
  }
@@ -23,7 +23,6 @@ interface DndState {
23
23
  horizontalSnap?: Snap<HFigureAxisType>;
24
24
  verticalSnap?: Snap<VFigureAxisType>;
25
25
  cancelDnd: (() => void) | undefined;
26
- overlappingChartOrCarousel?: FigureUI;
27
26
  }
28
27
  /**
29
28
  * Each figure ⭐ is positioned inside a container `div` placed and sized
@@ -93,6 +92,7 @@ export declare class FiguresContainer extends Component<SpreadsheetChildEnv> {
93
92
  dnd: DndState;
94
93
  private viewStore;
95
94
  private zoomStore;
95
+ private chartDragStore;
96
96
  setup(): void;
97
97
  private getVisibleFigures;
98
98
  get containers(): Container[];
@@ -121,6 +121,5 @@ export declare class FiguresContainer extends Component<SpreadsheetChildEnv> {
121
121
  getFigureClass(figureUI: FigureUI): string;
122
122
  private getSnap;
123
123
  private getSnapLineStyle;
124
- private getOverlappingFigure;
125
124
  }
126
125
  export {};
@@ -128,4 +128,5 @@ export declare class Grid extends Component<SpreadsheetChildEnv> {
128
128
  get staticTables(): Table[];
129
129
  get displaySelectionHandler(): boolean;
130
130
  get clientsToDisplay(): Required<Client>[];
131
+ get displayTableResizer(): boolean;
131
132
  }
@@ -0,0 +1,15 @@
1
+ import { ChartDefinition } from "../../types/chart/chart";
2
+ import { FigureUI } from "../../types/figure";
3
+ import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
4
+ export declare function getCarouselOverlappingChart(figureUI: {
5
+ tag: string;
6
+ x: number;
7
+ y: number;
8
+ width: number;
9
+ height: number;
10
+ }, otherFigures: FigureUI[], matchTags: FigureUI["tag"][]): FigureUI | undefined;
11
+ /**
12
+ * Start dragging a floating preview of the given chart definition, following the mouse.
13
+ * On drop, creates the chart on the grid (or inside a carousel if dropped on one).
14
+ */
15
+ export declare function startChartDragAndDrop(env: SpreadsheetChildEnv, definition: ChartDefinition, ev: MouseEvent): void;
@@ -1,13 +1,14 @@
1
- import { DOMCoordinates, Rect } from "../../types/rendering";
1
+ import { Rect } from "../../types/rendering";
2
2
  /**
3
3
  * Return true if the event was triggered from
4
4
  * a child element.
5
5
  */
6
6
  export declare function isChildEvent(parent: HTMLElement | null | undefined, ev: Event): boolean;
7
- export declare function gridOverlayPosition(zoom?: number): DOMCoordinates;
7
+ export declare function gridOverlayPosition(zoom?: number): Rect;
8
8
  export declare function zoomCorrectedElementRect(el: Element, zoomLevel: number): Rect;
9
9
  export declare function getElBoundingRect(el: HTMLElement | null): Rect;
10
10
  export declare function getBoundingRectAsPOJO(el: Element): Rect;
11
+ export declare function getBoundingRectWithMargins(el: Element): Rect;
11
12
  /**
12
13
  * Iterate over all the children of `el` in the dom tree starting at `el`, depth first.
13
14
  */
@@ -29,7 +29,7 @@ export declare class LinkEditor extends Component<SpreadsheetChildEnv> {
29
29
  static size: {
30
30
  maxHeight: number;
31
31
  };
32
- urlInput: import("@odoo/owl").Signal<HTMLElement | null>;
32
+ urlInput: import("@odoo/owl").Signal<HTMLInputElement | null>;
33
33
  suggestionListRef: import("@odoo/owl").Signal<HTMLElement | null>;
34
34
  urlInputContainer: import("@odoo/owl").Signal<HTMLElement | null>;
35
35
  private state;
@@ -36,7 +36,7 @@ export declare class CarouselPanel extends Component<SpreadsheetChildEnv> {
36
36
  };
37
37
  private dragAndDrop;
38
38
  private previewListRef;
39
- addChartButton: import("@odoo/owl").Signal<HTMLElement | null>;
39
+ addChartButton: import("@odoo/owl").Signal<HTMLButtonElement | null>;
40
40
  state: CarouselPanelState;
41
41
  setup(): void;
42
42
  get carouselItems(): CarouselItem[];
@@ -30,7 +30,7 @@ export declare class ColorScalePicker extends Component<SpreadsheetChildEnv> {
30
30
  className: string;
31
31
  }[];
32
32
  state: ColorScalePickerState;
33
- popoverRef: import("@odoo/owl").Signal<HTMLElement | null>;
33
+ popoverRef: import("@odoo/owl").Signal<HTMLTableElement | null>;
34
34
  setup(): void;
35
35
  get currentColorScale(): ChartColorScale;
36
36
  get currentColorScaleStyle(): string | undefined;
@@ -2,32 +2,28 @@ import { Component } from "../../../../owl3_compatibility_layer";
2
2
  import { BaselineMode, ScorecardChartDefinition } from "../../../../types/chart/scorecard_chart";
3
3
  import { ValueAndLabel } from "../../../../types/misc";
4
4
  import { SpreadsheetChildEnv } from "../../../../types/spreadsheet_env";
5
+ import { StandaloneComposer } from "../../../composer/standalone_composer/standalone_composer";
5
6
  import { Select } from "../../../select/select";
6
- import { SelectionInput } from "../../../selection_input/selection_input";
7
7
  import { Section } from "../../components/section/section";
8
8
  import { ChartErrorSection } from "../building_blocks/error_section/error_section";
9
9
  import { ChartSidePanelProps } from "../common";
10
10
  export declare class ScorecardChartConfigPanel extends Component<SpreadsheetChildEnv> {
11
11
  static template: string;
12
12
  static components: {
13
- SelectionInput: typeof SelectionInput;
14
13
  ChartErrorSection: typeof ChartErrorSection;
15
14
  Section: typeof Section;
16
15
  Select: typeof Select;
16
+ StandaloneComposer: typeof StandaloneComposer;
17
17
  };
18
18
  protected props: ChartSidePanelProps<ScorecardChartDefinition>;
19
19
  private state;
20
20
  private keyValue;
21
21
  private baseline;
22
22
  get errorMessages(): string[];
23
- get isKeyValueInvalid(): boolean;
24
- get isBaselineInvalid(): boolean;
25
- onKeyValueRangeChanged(ranges: string[]): void;
26
- updateKeyValueRange(): void;
27
- getKeyValueRange(): string;
28
- onBaselineRangeChanged(ranges: string[]): void;
29
- updateBaselineRange(): void;
30
- getBaselineRange(): string;
23
+ onConfirmKeyValue(keyValue: string): void;
24
+ getKeyValue(): string;
25
+ onConfirmBaseline(baseline: string): void;
26
+ getBaseline(): string;
31
27
  updateBaselineMode(baselineMode: BaselineMode): void;
32
28
  get baselineModeOptions(): ValueAndLabel[];
33
29
  }
@@ -0,0 +1,19 @@
1
+ import { Component } from "../../../owl3_compatibility_layer";
2
+ import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
3
+ export declare class ChartSuggestionPreview extends Component<SpreadsheetChildEnv> {
4
+ static template: string;
5
+ protected props: import("@odoo/owl").Props<{
6
+ definition: import("../../..").ChartDefinition<string>;
7
+ description: string;
8
+ onPointerDown: () => void;
9
+ }>;
10
+ private chartCanvasRef;
11
+ private chart?;
12
+ setup(): void;
13
+ private getChartConfiguration;
14
+ private getScalesCongif;
15
+ private scaleBubblePointRadius;
16
+ private updateChart;
17
+ private drawNativeChart;
18
+ private destroyChart;
19
+ }
@@ -0,0 +1,17 @@
1
+ import { Component } from "../../../owl3_compatibility_layer";
2
+ import { ChartDefinition } from "../../../types/chart/chart";
3
+ import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
4
+ import { Store } from "../../../types/store_engine";
5
+ import { Section } from "../components/section/section";
6
+ import { ChartSuggestionPreview } from "./chart_suggestion_preview";
7
+ import { DataAnalysisStore } from "./data_analysis_store";
8
+ export declare class DataAnalysisPanel extends Component<SpreadsheetChildEnv> {
9
+ static template: string;
10
+ static components: {
11
+ Section: typeof Section;
12
+ ChartSuggestionPreview: typeof ChartSuggestionPreview;
13
+ };
14
+ store: Store<DataAnalysisStore>;
15
+ setup(): void;
16
+ onStartChartSuggestionDrag(definition: ChartDefinition, ev: MouseEvent): void;
17
+ }
@@ -0,0 +1,15 @@
1
+ import { ChartSuggestion } from "../../../helpers/figures/charts/chart_suggestion_engine";
2
+ import { SpreadsheetStore } from "../../../stores/spreadsheet_store";
3
+ import { Command } from "../../../types/commands";
4
+ import { Get } from "../../../types/store_engine";
5
+ export declare class DataAnalysisStore extends SpreadsheetStore {
6
+ mutators: readonly [];
7
+ hasData: boolean;
8
+ chartSuggestions: ChartSuggestion[];
9
+ private isDirty;
10
+ ranges?: string[];
11
+ constructor(get: Get);
12
+ handle(cmd: Command): void;
13
+ finalize(): void;
14
+ private refresh;
15
+ }
@@ -43,12 +43,7 @@ export declare class PivotLayoutConfigurator extends Component<SpreadsheetChildE
43
43
  startDragAndDrop(dimension: PivotDimensionType, event: MouseEvent): void;
44
44
  getGranularitiesFor(field: PivotField): string[];
45
45
  startDragAndDropMeasures(measure: PivotMeasure, event: MouseEvent): void;
46
- getDimensionElementsRects(): {
47
- x: number;
48
- y: number;
49
- width: number;
50
- height: number;
51
- }[];
46
+ getDimensionElementsRects(): import("../../../..").Rect[];
52
47
  removeDimension(dimension: PivotDimensionType): void;
53
48
  removeMeasureDimension(measure: PivotMeasure): void;
54
49
  addColumnDimension(fieldName: string): void;
@@ -23,7 +23,7 @@ interface PanelInfo {
23
23
  isCollapsed?: boolean;
24
24
  }
25
25
  export declare class SidePanelStore extends SpreadsheetStore {
26
- mutators: readonly ["open", "replace", "toggle", "close", "changePanelSize", "resetPanelSize", "togglePinPanel", "closeMainPanel", "changeSpreadsheetWidth", "toggleCollapsePanel"];
26
+ mutators: readonly ["open", "replace", "toggle", "close", "changePanelSize", "resetPanelSize", "togglePinPanel", "togglePinnedSidePanel", "closeMainPanel", "changeSpreadsheetWidth", "toggleCollapsePanel"];
27
27
  mainPanel: (PanelInfo & {
28
28
  isCollapsed?: boolean;
29
29
  isPinned?: boolean;
@@ -49,6 +49,7 @@ export declare class SidePanelStore extends SpreadsheetStore {
49
49
  changePanelSize(panel: "mainPanel" | "secondaryPanel", size: number): void;
50
50
  resetPanelSize(panel: "mainPanel" | "secondaryPanel"): void;
51
51
  togglePinPanel(): void;
52
+ togglePinnedSidePanel(componentTag: string, panelProps?: SidePanelComponentProps): void;
52
53
  toggleCollapsePanel(panel: "mainPanel" | "secondaryPanel"): void;
53
54
  private computeState;
54
55
  changeSpreadsheetWidth(width: number): void;
@@ -0,0 +1,32 @@
1
+ import { Component } from "../../owl3_compatibility_layer";
2
+ import { GridRenderer } from "../../stores/grid_renderer_store";
3
+ import { ViewportsStore } from "../../stores/viewports_store";
4
+ import { GridRenderingContext } from "../../types/rendering";
5
+ import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
6
+ import { Store } from "../../types/store_engine";
7
+ export declare class CarouselDataViewPrint extends Component<SpreadsheetChildEnv> {
8
+ static template: string;
9
+ props: import("@odoo/owl").Props<{
10
+ range: import("../..").Range;
11
+ rect: {
12
+ x: import("../..").Pixel;
13
+ y: import("../..").Pixel;
14
+ width: import("../..").Pixel;
15
+ height: import("../..").Pixel;
16
+ };
17
+ rendererStore: {
18
+ readonly register: (renderer: import("../../stores/renderer_store").Renderer) => void;
19
+ readonly unRegister: (renderer: import("../../stores/renderer_store").Renderer) => void;
20
+ readonly draw: (context?: GridRenderingContext | undefined, timestamp?: number | undefined) => void;
21
+ readonly startAnimation: (animationId: string) => void;
22
+ readonly stopAnimation: (animationId: string) => void;
23
+ readonly mutators: readonly ["register", "unRegister", "draw", "startAnimation", "stopAnimation"];
24
+ };
25
+ columnWeights?: number[] | undefined;
26
+ }>;
27
+ viewportsStore: Store<ViewportsStore>;
28
+ gridRender: Store<GridRenderer>;
29
+ setup(): void;
30
+ get renderingLayers(): readonly ["Chart"];
31
+ drawLayer(renderingContext: GridRenderingContext): void;
32
+ }
@@ -1,10 +1,15 @@
1
1
  import { Component } from "../../owl3_compatibility_layer";
2
2
  import { RendererStore } from "../../stores/renderer_store";
3
+ import { PropsOf } from "../../types/props_of";
3
4
  import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
4
5
  import { Store } from "../../types/store_engine";
6
+ import { CarouselDataViewPrint } from "./carousel_data_view_print";
5
7
  import { FigureRendererStore } from "./figure_renderer_store";
6
8
  export declare class StandaloneGridCanvas extends Component<SpreadsheetChildEnv> {
7
9
  static template: string;
10
+ static components: {
11
+ CarouselDataViewPrint: typeof CarouselDataViewPrint;
12
+ };
8
13
  protected props: import("@odoo/owl").Props<{
9
14
  sheetId: import("../..").UID;
10
15
  zone: import("../..").Zone;
@@ -25,4 +30,5 @@ export declare class StandaloneGridCanvas extends Component<SpreadsheetChildEnv>
25
30
  figureRendererStore: Store<FigureRendererStore>;
26
31
  setup(): void;
27
32
  private loadImages;
33
+ get carouselDataViews(): PropsOf<CarouselDataViewPrint>[];
28
34
  }
@@ -29,6 +29,10 @@ export declare class StandaloneViewport extends Component<SpreadsheetChildEnv> {
29
29
  protected props: import("@odoo/owl").PropsWithDefaults<{
30
30
  range: import("../..").Range;
31
31
  canResizeColumns: boolean;
32
+ size: {
33
+ width: import("../..").Pixel;
34
+ height: import("../..").Pixel;
35
+ };
32
36
  onResizeColumns?: ((columnWeights: number[] | undefined) => void) | undefined;
33
37
  columnWeights?: number[] | undefined;
34
38
  }, "canResizeColumns">;
@@ -42,9 +46,8 @@ export declare class StandaloneViewport extends Component<SpreadsheetChildEnv> {
42
46
  zoomStore: Store<ZoomStore>;
43
47
  cellPopoverStore: Store<CellPopoverStore>;
44
48
  setup(): void;
45
- get containerWidth(): number;
46
- get containerHeight(): number;
47
- get hasVerticalScrollBar(): boolean | 0;
49
+ get contentWidth(): number;
50
+ get hasVerticalScrollBar(): boolean;
48
51
  get scrollBarContainerStyle(): string;
49
52
  onCellDoubleClicked(col: HeaderIndex, row: HeaderIndex, ev: MouseEvent): void;
50
53
  get gridOverlayDimensions(): string;
@@ -1,6 +1,6 @@
1
1
  import { SpreadsheetStore } from "../../stores/spreadsheet_store";
2
2
  import { Command } from "../../types/commands";
3
- import { HeaderDimensions, HeaderIndex, UID } from "../../types/misc";
3
+ import { CellPosition, HeaderDimensions, HeaderIndex, UID } from "../../types/misc";
4
4
  import { Range } from "../../types/range";
5
5
  import { GridRenderingContext } from "../../types/rendering";
6
6
  import { Get } from "../../types/store_engine";
@@ -25,4 +25,5 @@ export declare class StandaloneViewportStore extends SpreadsheetStore {
25
25
  get columnWeights(): number[];
26
26
  private computeColDimensions;
27
27
  private normalizeWeights;
28
+ getHighlightedPositions(position: CellPosition): CellPosition[];
28
29
  }
@@ -1,11 +1,10 @@
1
- import { PositionMap } from "../../helpers/cells/position_map";
2
1
  import { SpreadsheetStore } from "../../stores/spreadsheet_store";
3
- import { CellPosition, Color } from "../../types/misc";
2
+ import { CellPosition } from "../../types/misc";
3
+ import { Get } from "../../types/store_engine";
4
4
  export declare class HoveredTableStore extends SpreadsheetStore {
5
- mutators: readonly ["clear", "hover"];
5
+ mutators: readonly ["hover"];
6
+ storeGetters: readonly ["getCellHoverOverlayColor"];
6
7
  position: CellPosition | undefined;
7
- overlayColors: PositionMap<Color>;
8
- hover(position: CellPosition | undefined): "noStateChange" | undefined;
9
- clear(): void;
10
- private computeOverlay;
8
+ constructor(get: Get);
9
+ getHighlightedPositions(hoveredPosition: CellPosition): CellPosition[];
11
10
  }
@@ -99,7 +99,7 @@ export declare const DEFAULT_NUMBER_STYLE: {
99
99
  export declare const DEFAULT_VERTICAL_ALIGN: "bottom";
100
100
  export declare const DEFAULT_WRAPPING_MODE: "overflow";
101
101
  export declare const DEFAULT_TEXT_HIGHLIGHT_PERCENT = 0.25;
102
- export declare const DEFAULT_FONT_WEIGHT = "400";
102
+ export declare const DEFAULT_FONT_WEIGHT = 400;
103
103
  export declare const DEFAULT_FONT_SIZE: number;
104
104
  export declare const HEADER_FONT_SIZE = 11;
105
105
  export declare const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
@@ -109,6 +109,8 @@ export declare const MAX_HISTORY_STEPS = 99;
109
109
  export declare const DEFAULT_REVISION_ID = "START_REVISION";
110
110
  export declare const DEFAULT_FIGURE_HEIGHT = 335;
111
111
  export declare const DEFAULT_FIGURE_WIDTH = 536;
112
+ export declare const DEFAULT_SCORECARD_HEIGHT = 101;
113
+ export declare const DEFAULT_SCORECARD_WIDTH = 213;
112
114
  export declare const FIGURE_BORDER_WIDTH = 1;
113
115
  export declare const ACTIVE_BORDER_WIDTH = 2;
114
116
  export declare const MIN_FIG_SIZE = 80;
@@ -125,6 +127,7 @@ export declare const DEFAULT_SCORECARD_BASELINE_FONT_SIZE = 16;
125
127
  export declare const LINE_FILL_TRANSPARENCY = 0.4;
126
128
  export declare const LINE_DATA_POINT_RADIUS = 3;
127
129
  export declare const DEFAULT_WINDOW_SIZE = 2;
130
+ export declare const MAX_CHART_PREVIEW_DATA_POINTS = 150;
128
131
  export declare const MESSAGE_VERSION = 1;
129
132
  export declare const FORBIDDEN_SHEETNAME_CHARS: readonly ["'", "*", "?", "/", "\\", "[", "]"];
130
133
  export declare const FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX: RegExp;
@@ -161,6 +164,14 @@ export declare const DEFAULT_CAROUSEL_TITLE_STYLE: {
161
164
  fontSize: number;
162
165
  color: string;
163
166
  };
167
+ export declare const CAROUSEL_LAYOUT: {
168
+ readonly paddingX: 24;
169
+ readonly paddingY: 8;
170
+ readonly headerPaddingTop: 4;
171
+ readonly separatorWidth: 1;
172
+ readonly headerLineHeight: 1.5;
173
+ readonly minHeaderHeight: 25;
174
+ };
164
175
  export declare const DEFAULT_TOKEN_COLOR: Color;
165
176
  export declare const tokenColors: {
166
177
  readonly OPERATOR: "#3da4ab";
@@ -174,3 +185,4 @@ export declare const tokenColors: {
174
185
  readonly ORPHAN_RIGHT_PAREN: "#ff0000";
175
186
  };
176
187
  export declare const DRAG_THRESHOLD = 5;
188
+ export declare const PRINT_DPR = 3;
@@ -17,6 +17,10 @@ export declare function strictToNumber(data: FunctionResultObject | CellValue |
17
17
  export declare function toInteger(value: FunctionResultObject | CellValue | undefined, locale: Locale): number;
18
18
  export declare function strictToInteger(value: FunctionResultObject | CellValue | undefined, locale: Locale): number;
19
19
  export declare function toString(data: FunctionResultObject | CellValue | undefined): string;
20
+ /**
21
+ * Only converts the decimal separator, ignore number format such as % or dates
22
+ */
23
+ export declare function toLocaleString(data: FunctionResultObject | CellValue | undefined, locale: Locale): string;
20
24
  /**
21
25
  * Normalize range by setting all the string in the range to lowercase and replacing
22
26
  * accent letters with plain letters
@@ -8,7 +8,7 @@ export declare const ADD: {
8
8
  export declare const CONCAT: {
9
9
  description: string;
10
10
  args: import("..").ArgDefinition[];
11
- compute: (value1: Maybe<FunctionResultObject>, value2: Maybe<FunctionResultObject>) => {
11
+ compute: (this: import("..").EvalContext, value1: Maybe<FunctionResultObject>, value2: Maybe<FunctionResultObject>) => {
12
12
  value: string;
13
13
  };
14
14
  isExported: true;
@@ -11,7 +11,7 @@ export declare const CHAR: {
11
11
  export declare const CLEAN: {
12
12
  description: string;
13
13
  args: import("..").ArgDefinition[];
14
- compute: (text: Maybe<FunctionResultObject>) => {
14
+ compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
15
15
  value: string;
16
16
  };
17
17
  isExported: true;
@@ -19,7 +19,7 @@ export declare const CLEAN: {
19
19
  export declare const CONCATENATE: {
20
20
  description: string;
21
21
  args: import("..").ArgDefinition[];
22
- compute: (...datas: Arg[]) => {
22
+ compute: (this: import("..").EvalContext, ...datas: Arg[]) => {
23
23
  value: string;
24
24
  };
25
25
  isExported: true;
@@ -27,7 +27,7 @@ export declare const CONCATENATE: {
27
27
  export declare const EXACT: {
28
28
  description: string;
29
29
  args: import("..").ArgDefinition[];
30
- compute: (string1: Maybe<FunctionResultObject>, string2: Maybe<FunctionResultObject>) => {
30
+ compute: (this: import("..").EvalContext, string1: Maybe<FunctionResultObject>, string2: Maybe<FunctionResultObject>) => {
31
31
  value: boolean;
32
32
  };
33
33
  isExported: true;
@@ -48,7 +48,7 @@ export declare const FORMAT_LARGE_NUMBER: {
48
48
  export declare const JOIN: {
49
49
  description: string;
50
50
  args: import("..").ArgDefinition[];
51
- compute: (delimiter: Maybe<FunctionResultObject>, ...valuesOrArrays: Arg[]) => {
51
+ compute: (this: import("..").EvalContext, delimiter: Maybe<FunctionResultObject>, ...valuesOrArrays: Arg[]) => {
52
52
  value: string;
53
53
  };
54
54
  };
@@ -63,7 +63,7 @@ export declare const LEFT: {
63
63
  export declare const LEN: {
64
64
  description: string;
65
65
  args: import("..").ArgDefinition[];
66
- compute: (text: Maybe<FunctionResultObject>) => {
66
+ compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
67
67
  value: number;
68
68
  };
69
69
  isExported: true;
@@ -71,7 +71,7 @@ export declare const LEN: {
71
71
  export declare const LOWER: {
72
72
  description: string;
73
73
  args: import("..").ArgDefinition[];
74
- compute: (text: Maybe<FunctionResultObject>) => {
74
+ compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
75
75
  value: string;
76
76
  };
77
77
  isExported: true;
@@ -87,7 +87,7 @@ export declare const MID: {
87
87
  export declare const PROPER: {
88
88
  description: string;
89
89
  args: import("..").ArgDefinition[];
90
- compute: (text: Maybe<FunctionResultObject>) => {
90
+ compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
91
91
  value: string;
92
92
  };
93
93
  isExported: true;
@@ -149,7 +149,7 @@ export declare const SEARCH: {
149
149
  export declare const SPLIT: {
150
150
  description: string;
151
151
  args: import("..").ArgDefinition[];
152
- computeArray: (text: Maybe<FunctionResultObject>, delimiter: Maybe<FunctionResultObject>, splitByEach?: Maybe<FunctionResultObject>, removeEmptyText?: Maybe<FunctionResultObject>) => EvaluationError | import("..").Matrix<{
152
+ computeArray: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>, delimiter: Maybe<FunctionResultObject>, splitByEach?: Maybe<FunctionResultObject>, removeEmptyText?: Maybe<FunctionResultObject>) => EvaluationError | import("..").Matrix<{
153
153
  value: string;
154
154
  }>;
155
155
  isExported: false;
@@ -165,7 +165,7 @@ export declare const SUBSTITUTE: {
165
165
  export declare const TEXTJOIN: {
166
166
  description: string;
167
167
  args: import("..").ArgDefinition[];
168
- compute: (delimiter: Maybe<FunctionResultObject>, ignoreEmpty?: Maybe<FunctionResultObject>, ...textsOrArrays: Arg[]) => {
168
+ compute: (this: import("..").EvalContext, delimiter: Maybe<FunctionResultObject>, ignoreEmpty?: Maybe<FunctionResultObject>, ...textsOrArrays: Arg[]) => {
169
169
  value: string;
170
170
  };
171
171
  isExported: true;
@@ -179,7 +179,7 @@ export declare const TEXTSPLIT: {
179
179
  export declare const TRIM: {
180
180
  description: string;
181
181
  args: import("..").ArgDefinition[];
182
- compute: (text: Maybe<FunctionResultObject>) => {
182
+ compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
183
183
  value: string;
184
184
  };
185
185
  isExported: true;
@@ -187,7 +187,7 @@ export declare const TRIM: {
187
187
  export declare const UPPER: {
188
188
  description: string;
189
189
  args: import("..").ArgDefinition[];
190
- compute: (text: Maybe<FunctionResultObject>) => {
190
+ compute: (this: import("..").EvalContext, text: Maybe<FunctionResultObject>) => {
191
191
  value: string;
192
192
  };
193
193
  isExported: true;
@@ -2,7 +2,7 @@ import { FunctionResultObject, Maybe } from "../types/misc";
2
2
  export declare const HYPERLINK: {
3
3
  description: string;
4
4
  args: import("..").ArgDefinition[];
5
- compute: (url: Maybe<FunctionResultObject>, linkLabel: Maybe<FunctionResultObject>) => {
5
+ compute: (this: import("..").EvalContext, url: Maybe<FunctionResultObject>, linkLabel: Maybe<FunctionResultObject>) => {
6
6
  value: string;
7
7
  };
8
8
  isExported: true;
@@ -1,6 +1,7 @@
1
- import { AnchorOffset, CarouselItem } from "../types/figure";
1
+ import { AnchorOffset, Carousel, CarouselItem } from "../types/figure";
2
2
  import { Getters } from "../types/getters";
3
3
  import { UID } from "../types/misc";
4
+ import { Rect } from "../types/rendering";
4
5
  import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
5
6
  /**
6
7
  * Compute the anchor of a chart popped out of a carousel: slightly offset from the
@@ -9,3 +10,9 @@ import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
9
10
  export declare function getPoppedOutChartAnchor(env: SpreadsheetChildEnv, sheetId: UID, carouselId: UID): AnchorOffset;
10
11
  export declare function getCarouselItemPreview(getters: Getters, item: CarouselItem): string;
11
12
  export declare function getCarouselItemTitle(getters: Getters, item: CarouselItem): string;
13
+ export declare function getCarouselLayout(figureRect: Rect, carousel: Carousel, selectedItem: CarouselItem | undefined): {
14
+ headerRect: Rect;
15
+ separatorRect: Rect | undefined;
16
+ contentRect: Rect;
17
+ headerLineHeight: 1.5;
18
+ };
@@ -0,0 +1,16 @@
1
+ import { EvaluatedCell } from "../types/cells";
2
+ import { Getters } from "../types/getters";
3
+ import { Zone } from "../types/misc";
4
+ export type ExtendedColumnType = "error" | "number" | "percentage" | "date" | "categorical" | "label" | "boolean" | "empty";
5
+ export interface ColumnAnalysis {
6
+ zone: Zone;
7
+ type: ExtendedColumnType;
8
+ header?: string;
9
+ hasHeader: boolean;
10
+ rowCount: number;
11
+ uniqueCount: number;
12
+ uniqueRatio: number;
13
+ maxValue?: number;
14
+ nonEmpty: EvaluatedCell[];
15
+ }
16
+ export declare function analyzeColumns(zones: Zone[], getters: Getters): ColumnAnalysis[];
@@ -16,7 +16,7 @@ export declare class SpreadsheetChart {
16
16
  static fromStrDefinition(getters: CoreGetters, sheetId: UID, definition: ChartDefinition<string>): SpreadsheetChart;
17
17
  static fromDefinition(getters: CoreGetters, sheetId: UID, definition: ChartDefinition<Range>): SpreadsheetChart;
18
18
  static validate(validator: Validator, definition: ChartDefinition<string>): import("../..").CommandResult | import("../..").CommandResult[];
19
- static transformDefinition(chartSheetId: UID, definition: ChartDefinition<string>, rangeAdapters: RangeAdapterFunctions): import("../../types/chart/line_chart").LineChartDefinition<string> | import("../../types/chart/pie_chart").PieChartDefinition<string> | import("../../types/chart/bar_chart").BarChartDefinition<string> | import("../../types/chart/scatter_chart").ScatterChartDefinition<string> | import("../../types/chart/combo_chart").ComboChartDefinition<string> | import("../../types/chart/waterfall_chart").WaterfallChartDefinition<string> | import("../../types/chart/pyramid_chart").PyramidChartDefinition<string> | import("../../types/chart/radar_chart").RadarChartDefinition<string> | import("../../types/chart/geo_chart").GeoChartDefinition<string> | import("../../types/chart/funnel_chart").FunnelChartDefinition<string> | import("../../types/chart/sunburst_chart").SunburstChartDefinition<string> | import("../../types/chart/tree_map_chart").TreeMapChartDefinition<string> | import("../../types/chart/calendar_chart").CalendarChartDefinition<string> | import("../../types/chart/scorecard_chart").ScorecardChartDefinition<string> | import("../../types/chart/gauge_chart").GaugeChartDefinition<string> | import("../../types/chart/bubble_chart").BubbleChartDefinition<string>;
19
+ static transformDefinition(chartSheetId: UID, definition: ChartDefinition<string>, rangeAdapters: RangeAdapterFunctions): import("../../types/chart/scorecard_chart").ScorecardChartDefinition | import("../../types/chart/line_chart").LineChartDefinition<string> | import("../../types/chart/pie_chart").PieChartDefinition<string> | import("../../types/chart/bar_chart").BarChartDefinition<string> | import("../../types/chart/scatter_chart").ScatterChartDefinition<string> | import("../../types/chart/combo_chart").ComboChartDefinition<string> | import("../../types/chart/waterfall_chart").WaterfallChartDefinition<string> | import("../../types/chart/pyramid_chart").PyramidChartDefinition<string> | import("../../types/chart/radar_chart").RadarChartDefinition<string> | import("../../types/chart/geo_chart").GeoChartDefinition<string> | import("../../types/chart/funnel_chart").FunnelChartDefinition<string> | import("../../types/chart/sunburst_chart").SunburstChartDefinition<string> | import("../../types/chart/tree_map_chart").TreeMapChartDefinition<string> | import("../../types/chart/calendar_chart").CalendarChartDefinition<string> | import("../../types/chart/gauge_chart").GaugeChartDefinition<string> | import("../../types/chart/bubble_chart").BubbleChartDefinition<string>;
20
20
  getRangeDefinition(): ChartDefinition<Range>;
21
21
  getDefinition(): ChartDefinition<string>;
22
22
  updateRanges(rangeAdapters: RangeAdapterFunctions): ChartDefinition<Range>;