@odoo/o-spreadsheet 19.5.0-alpha.4 → 19.5.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/o_spreadsheet.cjs +14926 -14852
  2. package/dist/o_spreadsheet.css +3 -7
  3. package/dist/o_spreadsheet.esm.js +14855 -14781
  4. package/dist/o_spreadsheet.iife.js +4252 -4178
  5. package/dist/o_spreadsheet.min.iife.js +230 -230
  6. package/dist/o_spreadsheet.xml +6 -6
  7. package/dist/types/components/autofill/autofill.d.ts +1 -0
  8. package/dist/types/{plugins/ui_feature/autofill.d.ts → components/autofill/autofill_store.d.ts} +6 -11
  9. package/dist/types/components/autofill/table_autofill_store.d.ts +6 -0
  10. package/dist/types/components/composer/composer/abstract_composer_store.d.ts +2 -2
  11. package/dist/types/components/composer/composer/composer.d.ts +2 -1
  12. package/dist/types/components/grid/grid.d.ts +2 -0
  13. package/dist/types/components/paint_format_button/paint_format_store.d.ts +1 -1
  14. package/dist/types/components/popover/cell_popover_store.d.ts +1 -1
  15. package/dist/types/components/props_validation.d.ts +7 -7
  16. package/dist/types/components/selection_input/selection_input_store.d.ts +1 -1
  17. package/dist/types/components/side_panel/chart/chart_type_picker/chart_type_picker.d.ts +1 -1
  18. package/dist/types/components/side_panel/chart/common.d.ts +1 -1
  19. package/dist/types/components/side_panel/conditional_formatting/cf_editor/cell_is_rule_editor.d.ts +1 -1
  20. package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor.d.ts +1 -1
  21. package/dist/types/components/side_panel/conditional_formatting/cf_editor/color_scale_rule_editor_threshold.d.ts +1 -1
  22. package/dist/types/components/side_panel/conditional_formatting/cf_editor/data_bar_rule_editor.d.ts +1 -1
  23. package/dist/types/components/side_panel/conditional_formatting/cf_editor/icon_set_rule_editor.d.ts +1 -1
  24. package/dist/types/components/side_panel/remove_duplicates/remove_duplicates.d.ts +3 -10
  25. package/dist/types/components/side_panel/side_panel/side_panel_store.d.ts +1 -1
  26. package/dist/types/formulas/compiler.d.ts +1 -0
  27. package/dist/types/index.d.ts +4 -0
  28. package/dist/types/plugins/core/squisher.d.ts +1 -0
  29. package/dist/types/stores/array_formula_highlight.d.ts +1 -1
  30. package/dist/types/{plugins/ui_feature/automatic_sum.d.ts → stores/automatic_sum_store.d.ts} +5 -4
  31. package/dist/types/stores/checkbox_toggle.d.ts +9 -0
  32. package/dist/types/stores/data_cleanup_store.d.ts +31 -0
  33. package/dist/types/stores/spreadsheet_store.d.ts +1 -1
  34. package/dist/types/stores/trim_whitespace_store.d.ts +9 -0
  35. package/dist/types/types/commands.d.ts +0 -3
  36. package/dist/types/types/getters.d.ts +1 -4
  37. package/dist/types/types/range.d.ts +1 -0
  38. package/dist/types/types/store_engine.d.ts +10 -3
  39. package/package.json +2 -2
  40. package/dist/types/plugins/ui_feature/checkbox_toggle.d.ts +0 -9
  41. package/dist/types/plugins/ui_feature/data_cleanup.d.ts +0 -16
  42. package/dist/types/plugins/ui_feature/table_autofill.d.ts +0 -6
@@ -1,9 +1,9 @@
1
1
  <!--
2
2
  This file is generated by o-spreadsheet build tools. Do not edit it.
3
3
  @see https://github.com/odoo/o-spreadsheet
4
- @version 19.5.0-alpha.4
5
- @date 2026-07-14T11:12:07.602Z
6
- @hash 8e2f0c2
4
+ @version 19.5.0-alpha.5
5
+ @date 2026-07-20T10:50:14.853Z
6
+ @hash a599d86
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -979,7 +979,7 @@
979
979
  <t t-set="dataHasHeaderLabel">Data has header row</t>
980
980
  <Checkbox
981
981
  name="'dataHasHeader'"
982
- value="this.state.hasHeader"
982
+ value="this.dataCleanupSore.hasHeader"
983
983
  label="dataHasHeaderLabel"
984
984
  onChange.bind="this.toggleHasHeader"
985
985
  />
@@ -994,9 +994,9 @@
994
994
  onChange.bind="this.toggleAllColumns"
995
995
  />
996
996
 
997
- <t t-foreach="Object.keys(this.state.columns)" t-as="colIndex" t-key="colIndex">
997
+ <t t-foreach="Object.keys(this.dataCleanupSore.columns)" t-as="colIndex" t-key="colIndex">
998
998
  <Checkbox
999
- value="this.state.columns[colIndex]"
999
+ value="this.dataCleanupSore.columns[colIndex]"
1000
1000
  label="this.getColLabel(colIndex)"
1001
1001
  onChange="() => this.toggleColumn(colIndex)"
1002
1002
  />
@@ -20,6 +20,7 @@ export declare class Autofill extends Component<SpreadsheetChildEnv> {
20
20
  }, onPointerMove: (col: HeaderIndex, row: HeaderIndex, ev: MouseEvent) => void, onPointerUp: () => void, startScrollDirection?: import("../helpers/drag_and_drop_grid_hook").DnDDirection) => void;
21
21
  };
22
22
  private viewStore;
23
+ private autofillStore;
23
24
  setup(): void;
24
25
  get style(): string;
25
26
  get handlerStyle(): string;
@@ -1,22 +1,17 @@
1
+ import { SpreadsheetStore } from "../../stores/spreadsheet_store";
1
2
  import { Tooltip } from "../../types/autofill";
2
- import { Command, CommandResult, LocalCommand } from "../../types/commands";
3
+ import { Command } from "../../types/commands";
4
+ import { HeaderIndex } from "../../types/misc";
3
5
  import { GridRenderingContext } from "../../types/rendering";
4
- import { UIPlugin } from "../ui_plugin";
5
- /**
6
- * Autofill Plugin
7
- *
8
- */
9
- export declare class AutofillPlugin extends UIPlugin {
6
+ export declare class AutofillStore extends SpreadsheetStore {
10
7
  static layers: readonly ["Autofill"];
11
- static getters: readonly ["getAutofillTooltip"];
12
8
  private autofillZone;
13
9
  private steps;
14
10
  private lastCellSelected;
15
11
  private direction;
16
- private tooltip;
17
- allowDispatch(cmd: LocalCommand): CommandResult;
12
+ tooltip: Tooltip | undefined;
13
+ canAutofillSelect(col: HeaderIndex, row: HeaderIndex): boolean;
18
14
  handle(cmd: Command): void;
19
- getAutofillTooltip(): Tooltip | undefined;
20
15
  /**
21
16
  * Autofill the autofillZone from the current selection
22
17
  * @param apply Flag set to true to apply the autofill in the model. It's
@@ -0,0 +1,6 @@
1
+ import { SpreadsheetStore } from "../../stores/spreadsheet_store";
2
+ import { Command } from "../../types/commands";
3
+ export declare class TableAutofillStore extends SpreadsheetStore {
4
+ handle(cmd: Command): void;
5
+ private autofillTableZone;
6
+ }
@@ -4,7 +4,7 @@ import { NotificationStore } from "../../../stores/notification_store";
4
4
  import { SpreadsheetStore } from "../../../stores/spreadsheet_store";
5
5
  import { Command } from "../../../types/commands";
6
6
  import { CellPosition, Direction, EditionMode, HeaderIndex, Highlight, UID, UnboundedZone, Zone } from "../../../types/misc";
7
- import { Get } from "../../../types/store_engine";
7
+ import { Get, Store } from "../../../types/store_engine";
8
8
  export interface ComposerSelection {
9
9
  start: number;
10
10
  end: number;
@@ -26,7 +26,7 @@ export declare abstract class AbstractComposerStore extends SpreadsheetStore {
26
26
  hoveredTokens: EnrichedToken[];
27
27
  hoveredContentEvaluation: string;
28
28
  private autoCompleteKeepLast;
29
- protected notificationStore: import("../../../types/store_engine").CQS<Pick<NotificationStore, "notifyUser" | "raiseError" | "askConfirmation" | "updateNotificationCallbacks"> & import("../../../types/store_engine").OmitFunctions<NotificationStore>>;
29
+ protected notificationStore: Store<NotificationStore>;
30
30
  private highlightStore;
31
31
  private viewStore;
32
32
  constructor(get: Get);
@@ -5,6 +5,7 @@ import { FunctionDescription } from "../../../types/functions";
5
5
  import { CSSProperties, Color } from "../../../types/misc";
6
6
  import { Rect } from "../../../types/rendering";
7
7
  import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
8
+ import { Store } from "../../../types/store_engine";
8
9
  import { TextValueProvider } from "../autocomplete_dropdown/autocomplete_dropdown";
9
10
  import { ContentEditableHelper } from "../content_editable_helper";
10
11
  import { FunctionDescriptionProvider } from "../formula_assistant/formula_assistant";
@@ -41,7 +42,7 @@ export declare class Composer extends Component<SpreadsheetChildEnv> {
41
42
  inputStyle: string;
42
43
  onComposerContentFocused: (selection: ComposerSelection) => void;
43
44
  isDefaultFocus: boolean;
44
- composerStore: import("../../../types/store_engine").CQS<Pick<AbstractComposerStore, "stopEdition" | "hoverToken" | "changeComposerCursorSelection" | "stopComposerRangeSelection" | "startEdition" | "cancelEdition" | "setCurrentContent" | "replaceComposerCursorSelection" | "cycleReferences" | "toggleEditionMode" | "hideHelp" | "autoCompleteOrStop" | "insertAutoCompleteValue" | "selectAutoCompleteIndex" | "moveAutoCompleteSelection"> & import("../../../types/store_engine").OmitFunctions<AbstractComposerStore>>;
45
+ composerStore: Store<AbstractComposerStore>;
45
46
  inputMode: string;
46
47
  showAssistant: boolean;
47
48
  rect?: Rect | undefined;
@@ -67,6 +67,7 @@ export declare class Grid extends Component<SpreadsheetChildEnv> {
67
67
  private DOMFocusableElementStore;
68
68
  private paintFormatStore;
69
69
  private clientFocusStore;
70
+ private checkboxToggleStore;
70
71
  dragNDropGrid: {
71
72
  start: (initialPointerCoordinates: {
72
73
  clientX: number;
@@ -76,6 +77,7 @@ export declare class Grid extends Component<SpreadsheetChildEnv> {
76
77
  onMouseWheel: (ev: WheelEvent) => void;
77
78
  hoveredCell: Store<DelayedHoveredCellStore>;
78
79
  sidePanel: Store<SidePanelStore>;
80
+ private automaticSumStore;
79
81
  setup(): void;
80
82
  get highlights(): import("../..").Highlight[];
81
83
  get gridOverlayDimensions(): string;
@@ -5,7 +5,7 @@ import { Highlight, Zone } from "../../types/misc";
5
5
  import { Get } from "../../types/store_engine";
6
6
  export declare class PaintFormatStore extends SpreadsheetStore {
7
7
  mutators: readonly ["activate", "cancel", "pasteFormat"];
8
- protected highlightStore: import("../../types/store_engine").CQS<Pick<HighlightStore, "register" | "unRegister"> & import("../../types/store_engine").OmitFunctions<HighlightStore>>;
8
+ protected highlightStore: import("../../types/store_engine").Store<HighlightStore>;
9
9
  private status;
10
10
  private copiedData?;
11
11
  constructor(get: Get);
@@ -6,7 +6,7 @@ import { DelayedHoveredCellStore } from "../grid/delayed_hovered_cell_store";
6
6
  export declare class CellPopoverStore extends SpreadsheetStore {
7
7
  mutators: readonly ["open", "close"];
8
8
  private persistentPopover?;
9
- protected hoveredCell: import("../../types/store_engine").CQS<Pick<DelayedHoveredCellStore, "clear" | "hover"> & import("../../types/store_engine").OmitFunctions<DelayedHoveredCellStore>>;
9
+ protected hoveredCell: import("../../types/store_engine").Store<DelayedHoveredCellStore>;
10
10
  private viewStore;
11
11
  handle(cmd: Command): void;
12
12
  open({ col, row }: Position, type: CellPopoverType): void;
@@ -133,7 +133,7 @@ export declare const types: {
133
133
  DataValidationCriterionType: () => Type<"containsText" | "notContainsText" | "isEqualText" | "isEmail" | "isLink" | "dateIs" | "dateIsBefore" | "dateIsOnOrBefore" | "dateIsAfter" | "dateIsOnOrAfter" | "dateIsBetween" | "dateIsNotBetween" | "dateIsValid" | "isEqual" | "isNotEqual" | "isGreaterThan" | "isGreaterOrEqualTo" | "isLessThan" | "isLessOrEqualTo" | "isBetween" | "isNotBetween" | "isBoolean" | "isValueInList" | "isValueInRange" | "customFormula">;
134
134
  Dimension: typeof validateDimension;
135
135
  ContextMenuType: typeof validateContextMenuType;
136
- and: <T extends any[]>(types: T) => Type<import("@odoo/owl").UnionToIntersection<import("@odoo/owl").StripBrands<T[number]>>>;
136
+ and: <T extends any[]>(types: T) => import("@odoo/owl").ShapeType<import("@odoo/owl").MergedShape<T>, import("@odoo/owl").UnionToIntersection<import("@odoo/owl").StripBrands<T[number]>>>;
137
137
  any: () => Type<any>;
138
138
  array: {
139
139
  (): Type<any[]>;
@@ -147,10 +147,10 @@ export declare const types: {
147
147
  literal: <const T extends import("@odoo/owl").LiteralTypes>(literal: T) => Type<T>;
148
148
  number: <T extends number = number>() => Type<T>;
149
149
  object: {
150
- (): Type<Record<string, any>>;
151
- <const Keys extends string[]>(keys: Keys): Type<import("@odoo/owl").ResolveOptionalEntries<import("@odoo/owl").KeyedObject<Keys>>>;
152
- <Shape extends {}>(): Type<import("@odoo/owl").ResolveOptionalEntries<Shape>>;
153
- <Shape extends {}>(shape: Shape): Type<import("@odoo/owl").ResolveOptionalEntries<Shape>>;
150
+ (): import("@odoo/owl").ShapeType<Record<string, any>, Record<string, any>>;
151
+ <const Keys extends string[]>(keys: Keys): import("@odoo/owl").ShapeType<Keys, import("@odoo/owl").ResolveOptionalEntries<import("@odoo/owl").KeyedObject<Keys>>>;
152
+ <Shape extends {}>(): import("@odoo/owl").ShapeType<Shape, import("@odoo/owl").ResolveOptionalEntries<Shape>>;
153
+ <Shape extends {}>(shape: Shape): import("@odoo/owl").ShapeType<Shape, import("@odoo/owl").ResolveOptionalEntries<Shape>>;
154
154
  };
155
155
  or: <T extends unknown[]>(types: T) => Type<import("@odoo/owl").StripBrands<T[number]>>;
156
156
  promise: {
@@ -172,8 +172,8 @@ export declare const types: {
172
172
  <T>(type: T): Type<import("@odoo/owl").ReactiveValue<import("@odoo/owl").StripBrands<T>>>;
173
173
  };
174
174
  strictObject: {
175
- <const Keys extends string[]>(keys: Keys): Type<import("@odoo/owl").ResolveOptionalEntries<import("@odoo/owl").KeyedObject<Keys>>>;
176
- <Shape extends {}>(shape: Shape): Type<import("@odoo/owl").ResolveOptionalEntries<Shape>>;
175
+ <const Keys extends string[]>(keys: Keys): import("@odoo/owl").ShapeType<Keys, import("@odoo/owl").ResolveOptionalEntries<import("@odoo/owl").KeyedObject<Keys>>>;
176
+ <Shape extends {}>(shape: Shape): import("@odoo/owl").ShapeType<Shape, import("@odoo/owl").ResolveOptionalEntries<Shape>>;
177
177
  };
178
178
  string: <T extends string = string>() => Type<T>;
179
179
  tuple: <const T extends unknown[]>(types: T) => Type<import("@odoo/owl").StripBrandsAll<T>>;
@@ -28,7 +28,7 @@ export declare class SelectionInputStore extends SpreadsheetStore {
28
28
  mode: SelectionRangeEditMode;
29
29
  private inputSheetId;
30
30
  private focusStore;
31
- protected highlightStore: import("../../types/store_engine").CQS<Pick<HighlightStore, "register" | "unRegister"> & import("../../types/store_engine").OmitFunctions<HighlightStore>>;
31
+ protected highlightStore: import("../../types/store_engine").Store<HighlightStore>;
32
32
  constructor(get: Get, initialRanges?: string[], inputHasSingleRange?: boolean, colors?: Color[], disabledRanges?: boolean[]);
33
33
  handleEvent(event: SelectionEvent): void;
34
34
  handle(cmd: Command): void;
@@ -19,7 +19,7 @@ export declare class ChartTypePicker extends Component<SpreadsheetChildEnv> {
19
19
  };
20
20
  protected props: import("@odoo/owl").Props<{
21
21
  chartId: UID;
22
- chartPanelStore: import("../../../../types/store_engine").CQS<Pick<MainChartPanelStore, "activatePanel" | "changeChartType"> & import("../../../../types/store_engine").OmitFunctions<MainChartPanelStore>>;
22
+ chartPanelStore: import("../../../../types/store_engine").Store<MainChartPanelStore>;
23
23
  }>;
24
24
  categories: {
25
25
  line: string;
@@ -10,7 +10,7 @@ export interface ChartSidePanelProps<T extends ChartDefinition<string>> {
10
10
  export type ChartUpdateFunction<T extends ChartDefinition<string> = ChartDefinition<string>> = (chartId: UID, definition: Partial<T>) => DispatchResult;
11
11
  export declare const chartSidePanelPropsDefinition: {
12
12
  chartId: import("@odoo/owl").Type<UID>;
13
- definition: import("@odoo/owl").Type<{}>;
13
+ definition: import("@odoo/owl").ShapeType<{}, {}>;
14
14
  canUpdateChart: import("@odoo/owl").Type<ChartUpdateFunction<ChartDefinition<string>>>;
15
15
  updateChart: import("@odoo/owl").Type<ChartUpdateFunction<ChartDefinition<string>>>;
16
16
  };
@@ -11,7 +11,7 @@ export declare class CellIsRuleEditor extends Component<SpreadsheetChildEnv> {
11
11
  Select: typeof Select;
12
12
  };
13
13
  protected props: import("@odoo/owl").Props<{
14
- store: import("../../../../types/store_engine").CQS<Pick<ConditionalFormattingEditorStore, "updateConditionalFormat" | "closeMenus"> & import("../../../../types/store_engine").OmitFunctions<ConditionalFormattingEditorStore>>;
14
+ store: import("../../../../types/store_engine").Store<ConditionalFormattingEditorStore>;
15
15
  }>;
16
16
  getTextDecoration: typeof getTextDecoration;
17
17
  get rule(): import("../../../..").CellIsRule;
@@ -8,6 +8,6 @@ export declare class ColorScaleRuleEditor extends Component<SpreadsheetChildEnv>
8
8
  ColorScaleRuleEditorThreshold: typeof ColorScaleRuleEditorThreshold;
9
9
  };
10
10
  protected props: import("@odoo/owl").Props<{
11
- store: import("../../../../types/store_engine").CQS<Pick<ConditionalFormattingEditorStore, "updateConditionalFormat" | "closeMenus"> & import("../../../../types/store_engine").OmitFunctions<ConditionalFormattingEditorStore>>;
11
+ store: import("../../../../types/store_engine").Store<ConditionalFormattingEditorStore>;
12
12
  }>;
13
13
  }
@@ -15,7 +15,7 @@ export declare class ColorScaleRuleEditorThreshold extends Component<Spreadsheet
15
15
  Select: typeof Select;
16
16
  };
17
17
  protected props: import("@odoo/owl").Props<{
18
- store: import("../../../../types/store_engine").CQS<Pick<ConditionalFormattingEditorStore, "updateConditionalFormat" | "closeMenus"> & import("../../../../types/store_engine").OmitFunctions<ConditionalFormattingEditorStore>>;
18
+ store: import("../../../../types/store_engine").Store<ConditionalFormattingEditorStore>;
19
19
  thresholdType: "minimum" | "maximum" | "midpoint";
20
20
  }>;
21
21
  get rule(): import("../../../..").ColorScaleRule;
@@ -11,7 +11,7 @@ export declare class DataBarRuleEditor extends Component<SpreadsheetChildEnv> {
11
11
  RoundColorPicker: typeof RoundColorPicker;
12
12
  };
13
13
  protected props: import("@odoo/owl").Props<{
14
- store: import("../../../../types/store_engine").CQS<Pick<ConditionalFormattingEditorStore, "updateConditionalFormat" | "closeMenus"> & import("../../../../types/store_engine").OmitFunctions<ConditionalFormattingEditorStore>>;
14
+ store: import("../../../../types/store_engine").Store<ConditionalFormattingEditorStore>;
15
15
  }>;
16
16
  get rule(): import("../../../..").DataBarRule;
17
17
  colorNumberToHex: typeof colorNumberToHex;
@@ -14,7 +14,7 @@ export declare class IconSetRuleEditor extends Component<SpreadsheetChildEnv> {
14
14
  Select: typeof Select;
15
15
  };
16
16
  protected props: import("@odoo/owl").Props<{
17
- store: import("../../../../types/store_engine").CQS<Pick<ConditionalFormattingEditorStore, "updateConditionalFormat" | "closeMenus"> & import("../../../../types/store_engine").OmitFunctions<ConditionalFormattingEditorStore>>;
17
+ store: import("../../../../types/store_engine").Store<ConditionalFormattingEditorStore>;
18
18
  }>;
19
19
  get rule(): import("../../../..").IconSetRule;
20
20
  getIconName(iconSet: "arrows" | "smiley" | "dots", iconType: "good" | "neutral" | "bad"): string;
@@ -1,14 +1,10 @@
1
1
  import { Component } from "../../../owl3_compatibility_layer";
2
+ import { DataCleanupStore } from "../../../stores/data_cleanup_store";
2
3
  import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
4
+ import { Store } from "../../../types/store_engine";
3
5
  import { ValidationMessages } from "../../validation_messages/validation_messages";
4
6
  import { Checkbox } from "../components/checkbox/checkbox";
5
7
  import { Section } from "../components/section/section";
6
- interface RemoveDuplicatesState {
7
- hasHeader: boolean;
8
- columns: {
9
- [colIndex: number]: boolean;
10
- };
11
- }
12
8
  export declare class RemoveDuplicatesPanel extends Component<SpreadsheetChildEnv> {
13
9
  static template: string;
14
10
  static components: {
@@ -19,7 +15,7 @@ export declare class RemoveDuplicatesPanel extends Component<SpreadsheetChildEnv
19
15
  protected props: import("@odoo/owl").Props<{
20
16
  onCloseSidePanel: () => void;
21
17
  }>;
22
- state: RemoveDuplicatesState;
18
+ dataCleanupSore: Store<DataCleanupStore>;
23
19
  setup(): void;
24
20
  toggleHasHeader(): void;
25
21
  toggleAllColumns(): void;
@@ -30,7 +26,4 @@ export declare class RemoveDuplicatesPanel extends Component<SpreadsheetChildEnv
30
26
  get errorMessages(): string[];
31
27
  get selectionStatisticalInformation(): string;
32
28
  get canConfirm(): boolean;
33
- private updateColumns;
34
- private getColsToAnalyze;
35
29
  }
36
- export {};
@@ -30,7 +30,7 @@ export declare class SidePanelStore extends SpreadsheetStore {
30
30
  }) | undefined;
31
31
  secondaryPanel: PanelInfo | undefined;
32
32
  availableWidth: number;
33
- screenWidthStore: import("../../../types/store_engine").CQS<Pick<ScreenWidthStore, "setSmallThreshhold"> & import("../../../types/store_engine").OmitFunctions<ScreenWidthStore>>;
33
+ screenWidthStore: import("../../../types/store_engine").Store<ScreenWidthStore>;
34
34
  get isMainPanelOpen(): boolean;
35
35
  get isSecondaryPanelOpen(): boolean;
36
36
  get mainPanelProps(): SidePanelComponentProps | undefined;
@@ -92,6 +92,7 @@ export declare class CompiledFormula implements Omit<ICompiledFormula, "tokens"
92
92
  * Make a new instance of CompiledFormula by compiling the formula string as input by the user.
93
93
  * */
94
94
  static Compile(formula: string, sheetId: UID, getters: CoreGetters): CompiledFormula;
95
+ areRangeShapesInLineWithNormalizedFormula(): boolean;
95
96
  }
96
97
  /**
97
98
  * A compiled formula serialized
@@ -228,6 +228,8 @@ import "./plugins/plugin_registries";
228
228
  import "./registries/auto_completes/autocompelete_registration";
229
229
  import "./registries/chart_types";
230
230
  import "./registries/interactive_icon_on_cell_registry";
231
+ import { AutofillStore } from "./components/autofill/autofill_store";
232
+ import { TableAutofillStore } from "./components/autofill/table_autofill_store";
231
233
  import { Composer } from "./components/composer/composer/composer";
232
234
  import { StandaloneComposer } from "./components/composer/standalone_composer/standalone_composer";
233
235
  import { Select } from "./components/select/select";
@@ -420,6 +422,8 @@ export declare const stores: {
420
422
  SidePanelStore: typeof SidePanelStore;
421
423
  PivotSidePanelStore: typeof PivotSidePanelStore;
422
424
  PivotMeasureDisplayPanelStore: typeof PivotMeasureDisplayPanelStore;
425
+ TableAutofillStore: typeof TableAutofillStore;
426
+ AutofillStore: typeof AutofillStore;
423
427
  ClientFocusStore: typeof ClientFocusStore;
424
428
  GridRenderer: typeof GridRenderer;
425
429
  ViewportsStore: typeof ViewportsStore;
@@ -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
@@ -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").CQS<Pick<HighlightStore, "register" | "unRegister"> & import("../types/store_engine").OmitFunctions<HighlightStore>>;
6
+ protected highlightStore: import("../types/store_engine").Store<HighlightStore>;
7
7
  constructor(get: Get);
8
8
  get highlights(): Highlight[];
9
9
  }
@@ -1,14 +1,15 @@
1
- import { Command } from "../../types/commands";
2
- import { Position, UID, Zone } from "../../types/misc";
3
- import { UIPlugin } from "../ui_plugin";
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 AutomaticSumPlugin extends UIPlugin {
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
+ }
@@ -0,0 +1,31 @@
1
+ import { CancelledReason, Command } from "../types/commands";
2
+ import { Get } from "../types/store_engine";
3
+ import { SpreadsheetStore } from "./spreadsheet_store";
4
+ export declare class DataCleanupStore extends SpreadsheetStore {
5
+ mutators: readonly ["setHasHeader", "setColumns", "toggleAllColumns", "toggleColumn"];
6
+ private notificationStore;
7
+ hasHeader: boolean;
8
+ columns: {
9
+ [colIndex: number]: boolean;
10
+ };
11
+ constructor(get: Get);
12
+ private updateColumns;
13
+ setHasHeader(hasHeader: boolean): void;
14
+ setColumns(columns: {
15
+ [colIndex: number]: boolean;
16
+ }): void;
17
+ toggleAllColumns(): void;
18
+ toggleColumn(colIndex: number): void;
19
+ private get isEveryColumnSelected();
20
+ get removeDuplicateErrors(): CancelledReason[];
21
+ handle(cmd: Command): void;
22
+ private removeDuplicates;
23
+ private getUniqueRowsIndexes;
24
+ private notifyRowsRemovedAndRemaining;
25
+ private checkSingleRangeSelected;
26
+ private checkNoMergeInZone;
27
+ private checkRangeContainsValues;
28
+ private checkNoColumnProvided;
29
+ private checkColumnsIncludedInZone;
30
+ private getColsToAnalyze;
31
+ }
@@ -7,7 +7,7 @@ import { RendererStore } from "./renderer_store";
7
7
  export declare class SpreadsheetStore extends DisposableStore {
8
8
  protected model: Model;
9
9
  protected getters: import("..").Getters;
10
- protected renderer: import("../types/store_engine").CQS<Pick<RendererStore, "register" | "unRegister" | "draw" | "startAnimation" | "stopAnimation"> & import("../types/store_engine").OmitFunctions<RendererStore>>;
10
+ protected renderer: import("../types/store_engine").Store<RendererStore>;
11
11
  constructor(get: Get);
12
12
  get renderingLayers(): Readonly<LayerName[]>;
13
13
  protected handle(cmd: Command): void;
@@ -0,0 +1,9 @@
1
+ import { Command } from "../types/commands";
2
+ import { SpreadsheetStore } from "./spreadsheet_store";
3
+ export declare class TrimWhitespaceStore extends SpreadsheetStore {
4
+ mutators: readonly ["trimWhitespace"];
5
+ private notificationStore;
6
+ trimWhitespace(): void;
7
+ handle(cmd: Command): void;
8
+ private _trimWhitespace;
9
+ }
@@ -435,8 +435,6 @@ export interface DuplicatePivotCommand {
435
435
  }
436
436
  export interface RemoveDuplicatesCommand {
437
437
  type: "REMOVE_DUPLICATES";
438
- columns: HeaderIndex[];
439
- hasHeader: boolean;
440
438
  }
441
439
  export interface TrimWhitespaceCommand {
442
440
  type: "TRIM_WHITESPACE";
@@ -885,7 +883,6 @@ export declare const enum CommandResult {
885
883
  MoreThanOneRangeSelected = "MoreThanOneRangeSelected",
886
884
  NoColumnsProvided = "NoColumnsProvided",
887
885
  ColumnsNotIncludedInZone = "ColumnsNotIncludedInZone",
888
- DuplicatesColumnsSelected = "DuplicatesColumnsSelected",
889
886
  InvalidHeaderGroupStartEnd = "InvalidHeaderGroupStartEnd",
890
887
  HeaderGroupAlreadyExists = "HeaderGroupAlreadyExists",
891
888
  UnknownHeaderGroup = "UnknownHeaderGroup",
@@ -10,10 +10,7 @@ import { FingerprintPlugin } from "../plugins/ui_core_views/fingerprint";
10
10
  import { FormulaTrackerPlugin } from "../plugins/ui_core_views/formula_tracker";
11
11
  import { HeaderSizeUIPlugin } from "../plugins/ui_core_views/header_sizes_ui";
12
12
  import { PivotUIPlugin } from "../plugins/ui_core_views/pivot_ui";
13
- import { AutofillPlugin } from "../plugins/ui_feature/autofill";
14
- import { AutomaticSumPlugin } from "../plugins/ui_feature/automatic_sum";
15
13
  import { CellComputedStylePlugin } from "../plugins/ui_feature/cell_computed_style";
16
- import { CheckboxTogglePlugin } from "../plugins/ui_feature/checkbox_toggle";
17
14
  import { CollaborativePlugin } from "../plugins/ui_feature/collaborative";
18
15
  import { ColorThemeUIPlugin } from "../plugins/ui_feature/color_theme";
19
16
  import { DynamicTranslate } from "../plugins/ui_feature/dynamic_translate";
@@ -42,5 +39,5 @@ import { CoreGetters, PluginGetters } from "./core_getters";
42
39
  export type RenderingGetters = {
43
40
  isReadonly: () => boolean;
44
41
  isDashboard: () => boolean;
45
- } & CoreGetters & PluginGetters<typeof AutofillPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof AutomaticSumPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof FingerprintPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof SubtotalEvaluationPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof TableStylePlugin> & PluginGetters<typeof CellComputedStylePlugin> & PluginGetters<typeof DynamicTablesPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof GeoFeaturePlugin> & PluginGetters<typeof PivotPresencePlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof CheckboxTogglePlugin> & PluginGetters<typeof CellIconPlugin> & PluginGetters<typeof DynamicTranslate> & PluginGetters<typeof FormulaTrackerPlugin> & PluginGetters<typeof LockSheetPlugin> & PluginGetters<typeof CarouselUIPlugin> & PluginGetters<typeof ColorThemeUIPlugin> & PluginGetters<typeof FigureUIPlugin>;
42
+ } & CoreGetters & PluginGetters<typeof HistoryPlugin> & PluginGetters<typeof ClipboardPlugin> & PluginGetters<typeof EvaluationPlugin> & PluginGetters<typeof EvaluationChartPlugin> & PluginGetters<typeof EvaluationConditionalFormatPlugin> & PluginGetters<typeof HeaderVisibilityUIPlugin> & PluginGetters<typeof CustomColorsPlugin> & PluginGetters<typeof CollaborativePlugin> & PluginGetters<typeof SortPlugin> & PluginGetters<typeof UIOptionsPlugin> & PluginGetters<typeof SheetUIPlugin> & PluginGetters<typeof FilterEvaluationPlugin> & PluginGetters<typeof FingerprintPlugin> & PluginGetters<typeof SplitToColumnsPlugin> & PluginGetters<typeof SubtotalEvaluationPlugin> & PluginGetters<typeof HeaderSizeUIPlugin> & PluginGetters<typeof EvaluationDataValidationPlugin> & PluginGetters<typeof HeaderPositionsUIPlugin> & PluginGetters<typeof TableStylePlugin> & PluginGetters<typeof CellComputedStylePlugin> & PluginGetters<typeof DynamicTablesPlugin> & PluginGetters<typeof PivotUIPlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof GeoFeaturePlugin> & PluginGetters<typeof PivotPresencePlugin> & PluginGetters<typeof TableComputedStylePlugin> & PluginGetters<typeof CellIconPlugin> & PluginGetters<typeof DynamicTranslate> & PluginGetters<typeof FormulaTrackerPlugin> & PluginGetters<typeof LockSheetPlugin> & PluginGetters<typeof CarouselUIPlugin> & PluginGetters<typeof ColorThemeUIPlugin> & PluginGetters<typeof FigureUIPlugin>;
46
43
  export type Getters = RenderingGetters & PluginGetters<typeof GridSelectionPlugin>;
@@ -22,6 +22,7 @@ export interface BoundedRange {
22
22
  export interface RangeStringOptions {
23
23
  useBoundedReference?: boolean;
24
24
  useFixedReference?: boolean;
25
+ doNotSimplifyRange?: boolean;
25
26
  }
26
27
  export interface RangeData {
27
28
  _zone: Zone | UnboundedZone;
@@ -28,9 +28,16 @@ export type SkipFirst<T extends any[]> = T extends [any, ...infer U] ? U : never
28
28
  export type OmitFunctions<T> = {
29
29
  [K in keyof T as T[K] extends Function ? never : K]: T[K];
30
30
  };
31
- export type Store<S> = S extends {
32
- mutators: readonly (keyof S)[];
33
- } ? CQS<Pick<S, S["mutators"][number]> & OmitFunctions<S>> : CQS<OmitFunctions<S>>;
31
+ export type FunctionKeys<T> = {
32
+ [K in keyof T]: T[K] extends Function ? K : never;
33
+ }[keyof T];
34
+ export type MutatorKeys<S> = S extends {
35
+ mutators: readonly FunctionKeys<S>[];
36
+ } ? S["mutators"][number] : never;
37
+ export type GetterKeys<S> = S extends {
38
+ storeGetters: readonly FunctionKeys<S>[];
39
+ } ? S["storeGetters"][number] : never;
40
+ export type Store<S> = CQS<Pick<S, MutatorKeys<S>> & OmitFunctions<S>> & Pick<S, GetterKeys<S>>;
34
41
  /**
35
42
  * Command Query Separation [1,2] implementation with types.
36
43
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "19.5.0-alpha.4",
3
+ "version": "19.5.0-alpha.5",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o_spreadsheet.cjs",
@@ -141,7 +141,7 @@
141
141
  "xmlSelfClosingSpace": false
142
142
  },
143
143
  "dependencies": {
144
- "@odoo/owl": "3.0.0-alpha.40",
144
+ "@odoo/owl": "3.0.0-alpha.43",
145
145
  "bootstrap": "5.3.3",
146
146
  "font-awesome": "^4.7.0",
147
147
  "rbush": "^3.0.1"
@@ -1,9 +0,0 @@
1
- import { Command } from "../../types/commands";
2
- import { Zone } from "../../types/misc";
3
- import { UIPlugin } from "../ui_plugin";
4
- export declare class CheckboxTogglePlugin extends UIPlugin {
5
- static getters: readonly ["hasBooleanValidationInZones"];
6
- handle(cmd: Command): void;
7
- hasBooleanValidationInZones(zones: Zone[]): boolean;
8
- private toggleCheckbox;
9
- }
@@ -1,16 +0,0 @@
1
- import { Command, CommandResult } from "../../types/commands";
2
- import { UIPlugin } from "../ui_plugin";
3
- export declare class DataCleanupPlugin extends UIPlugin {
4
- allowDispatch(cmd: Command): CommandResult | CommandResult[];
5
- handle(cmd: Command): void;
6
- private removeDuplicates;
7
- private getUniqueRowsIndexes;
8
- private notifyRowsRemovedAndRemaining;
9
- private checkSingleRangeSelected;
10
- private checkNoMergeInZone;
11
- private checkRangeContainsValues;
12
- private checkNoColumnProvided;
13
- private checkColumnsIncludedInZone;
14
- private checkColumnsAreUnique;
15
- private trimWhitespace;
16
- }
@@ -1,6 +0,0 @@
1
- import { Command } from "../../types/commands";
2
- import { UIPlugin } from "../ui_plugin";
3
- export declare class TableAutofillPlugin extends UIPlugin {
4
- handle(cmd: Command): void;
5
- private autofillTableZone;
6
- }