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

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 (34) hide show
  1. package/dist/o_spreadsheet.cjs +352 -311
  2. package/dist/o_spreadsheet.css +15 -4
  3. package/dist/o_spreadsheet.esm.js +352 -311
  4. package/dist/o_spreadsheet.iife.js +352 -311
  5. package/dist/o_spreadsheet.min.iife.js +299 -299
  6. package/dist/o_spreadsheet.xml +16 -10
  7. package/dist/types/components/figures/figure_container/figure_container.d.ts +6 -2
  8. package/dist/types/components/helpers/figure_drag_helper.d.ts +3 -3
  9. package/dist/types/components/helpers/figure_snap_helper.d.ts +8 -3
  10. package/dist/types/components/link/link_editor/link_editor.d.ts +1 -0
  11. package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +1 -1
  12. package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +12 -12
  13. package/dist/types/components/side_panel/find_and_replace/find_and_replace.d.ts +1 -0
  14. package/dist/types/components/side_panel/find_and_replace/find_and_replace_store.d.ts +2 -1
  15. package/dist/types/components/side_panel/table_style_editor_panel/table_style_editor_panel.d.ts +2 -0
  16. package/dist/types/constants.d.ts +0 -1
  17. package/dist/types/helpers/color_themes.d.ts +2 -0
  18. package/dist/types/helpers/figures/chart.d.ts +2 -1
  19. package/dist/types/helpers/figures/charts/chart_common.d.ts +2 -2
  20. package/dist/types/helpers/figures/charts/chart_ui_common.d.ts +3 -3
  21. package/dist/types/helpers/figures/charts/runtime/chart_data_extractor.d.ts +11 -10
  22. package/dist/types/helpers/owl3_helpers.d.ts +4 -0
  23. package/dist/types/index.d.ts +0 -1
  24. package/dist/types/owl3_compatibility_layer.d.ts +1 -14
  25. package/dist/types/plugins/ui_core_views/evaluation_chart.d.ts +6 -5
  26. package/dist/types/plugins/ui_feature/chart_ui.d.ts +6 -0
  27. package/dist/types/plugins/ui_feature/color_theme.d.ts +0 -3
  28. package/dist/types/registries/chart_registry.d.ts +2 -2
  29. package/dist/types/registries/figures_registry.d.ts +1 -1
  30. package/dist/types/types/commands.d.ts +15 -15
  31. package/dist/types/types/getters.d.ts +2 -1
  32. package/dist/types/types/model.d.ts +2 -1
  33. package/dist/types/types/rendering.d.ts +2 -0
  34. package/package.json +2 -2
@@ -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.13
5
- @date 2026-08-21T15:33:45.089Z
6
- @hash a73559e
4
+ @version 19.5.0-alpha.14
5
+ @date 2026-08-29T09:17:10.223Z
6
+ @hash e8ad6ad
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -16,7 +16,7 @@
16
16
  <t t-else="" t-call="o-spreadsheet-Icon.TRIANGLE_EXCLAMATION"/>
17
17
  </div>
18
18
  <div class="d-flex flex-column overflow-hidden">
19
- <span class="ps-2 text-truncate" t-out="msg"/>
19
+ <span class="ps-2" t-out="msg"/>
20
20
  </div>
21
21
  </div>
22
22
  </div>
@@ -697,7 +697,11 @@
697
697
  <t t-name="o-spreadsheet-TableStyleEditorPanel">
698
698
  <div class="o-table-style-editor-panel">
699
699
  <Section title.translate="Style name">
700
- <input type="text" class="o-input" t-custom-model="this.state.styleName"/>
700
+ <TextInput
701
+ value="this.state.styleName"
702
+ onChange="(value) => this.state.styleName = value"
703
+ alwaysShowBorder="true"
704
+ />
701
705
  </Section>
702
706
  <Section class="'pt-1'" title.translate="Style color">
703
707
  <RoundColorPicker
@@ -2072,7 +2076,8 @@
2072
2076
  type="text"
2073
2077
  class="o-input o-input-without-count o-replace"
2074
2078
  t-on-keydown="this.onKeydownReplace"
2075
- t-custom-model="this.store.toReplace"
2079
+ t-att-value="this.store.toReplace"
2080
+ t-on-input="this.onReplaceInput"
2076
2081
  placeholder="e.g. 'replace me'"
2077
2082
  />
2078
2083
  </div>
@@ -5844,7 +5849,8 @@
5844
5849
  title="Link label"
5845
5850
  placeholder="e.g. 'Link label'"
5846
5851
  class="o-input"
5847
- t-custom-model="this.state.label"
5852
+ t-att-value="this.state.label"
5853
+ t-on-input="(ev) => this.state.label = ev.target.value"
5848
5854
  />
5849
5855
  </div>
5850
5856
 
@@ -5861,8 +5867,8 @@
5861
5867
  placeholder="e.g. 'http://www.odoo.com'"
5862
5868
  title="Link URL"
5863
5869
  t-ref="this.urlInput"
5864
- t-custom-model="this.state.url"
5865
- t-on-input="this.computeLinks"
5870
+ t-att-value="this.state.url"
5871
+ t-on-input="this.onLinkUrlInput"
5866
5872
  />
5867
5873
  </t>
5868
5874
  <t t-else="">
@@ -7955,7 +7961,7 @@
7955
7961
  style="this.getFigureStyle(figureUI)"
7956
7962
  class="this.getFigureClass(figureUI)"
7957
7963
  onMouseDown="(ev) => this.startDraggingFigure(figureUI, ev)"
7958
- onClickAnchor="(dirX, dirY, ev) => this.startResize(figureUI, dirX, dirY, ev)"
7964
+ onClickAnchor.bind="this.resizeAllSelectedFigures"
7959
7965
  />
7960
7966
  </t>
7961
7967
  </div>
@@ -100,6 +100,10 @@ export declare class FiguresContainer extends Component<SpreadsheetChildEnv> {
100
100
  private rectToCss;
101
101
  private getContainerRect;
102
102
  get selectedRectStyle(): string;
103
+ get maxDimensions(): {
104
+ maxX: import("../../..").Pixel;
105
+ maxY: import("../../..").Pixel;
106
+ };
103
107
  private getInverseViewportPositionStyle;
104
108
  private getFigureContainer;
105
109
  private getDndFigureRect;
@@ -107,7 +111,7 @@ export declare class FiguresContainer extends Component<SpreadsheetChildEnv> {
107
111
  private isMenuClick;
108
112
  startDraggingFigure(figureUI: FigureUI, ev: MouseEvent): void;
109
113
  /**
110
- * Initialize the resize of a figure with mouse movements
114
+ * Initialize the resize of the selected figures with mouse movements
111
115
  *
112
116
  * @param dirX X direction of the resize. -1 : resize from the left border of the figure, 0 : no resize in X, 1 :
113
117
  * resize from the right border of the figure
@@ -115,7 +119,7 @@ export declare class FiguresContainer extends Component<SpreadsheetChildEnv> {
115
119
  * resize from the bottom border of the figure
116
120
  * @param ev Mouse Event
117
121
  */
118
- startResize(figureUI: FigureUI, dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
122
+ resizeAllSelectedFigures(dirX: ResizeDirection, dirY: ResizeDirection, ev: MouseEvent): void;
119
123
  private getOtherFigures;
120
124
  getFigureStyle(figureUI: FigureUI): string;
121
125
  getFigureClass(figureUI: FigureUI): string;
@@ -1,11 +1,11 @@
1
1
  import { FigureUI } from "../../types/figure";
2
2
  import { PixelPosition } from "../../types/misc";
3
- import { SheetDOMScrollInfo } from "../../types/rendering";
3
+ import { DOMDimension, Rect, SheetDOMScrollInfo } from "../../types/rendering";
4
4
  export declare function dragFigureForMove({ x: mouseX, y: mouseY }: PixelPosition, { x: mouseInitialX, y: mouseInitialY }: PixelPosition, initialFigures: FigureUI[], { maxX, maxY }: {
5
5
  maxX: number;
6
6
  maxY: number;
7
7
  }, { scrollX: initialScrollX, scrollY: initialScrollY }: SheetDOMScrollInfo, { scrollX, scrollY }: SheetDOMScrollInfo): FigureUI[];
8
- export declare function dragFigureForResize(initialFigure: FigureUI, dirX: -1 | 0 | 1, dirY: -1 | 0 | 1, { x: mouseX, y: mouseY }: PixelPosition, { x: mouseInitialX, y: mouseInitialY }: PixelPosition, keepRatio: boolean, minFigSize: number, { scrollX: initialScrollX, scrollY: initialScrollY }: SheetDOMScrollInfo, { scrollX, scrollY }: SheetDOMScrollInfo, { maxX, maxY }: {
8
+ export declare function dragFigureForResize(initialRect: Rect, dirX: -1 | 0 | 1, dirY: -1 | 0 | 1, { x: mouseX, y: mouseY }: PixelPosition, { x: mouseInitialX, y: mouseInitialY }: PixelPosition, keepRatio: boolean, minFigSize: DOMDimension, { scrollX: initialScrollX, scrollY: initialScrollY }: SheetDOMScrollInfo, { scrollX, scrollY }: SheetDOMScrollInfo, { maxX, maxY }: {
9
9
  maxX: number;
10
10
  maxY: number;
11
- }): FigureUI;
11
+ }): Rect;
@@ -1,5 +1,6 @@
1
1
  import { FigureUI } from "../../types/figure";
2
2
  import { Pixel, UID } from "../../types/misc";
3
+ import { Rect } from "../../types/rendering";
3
4
  import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
4
5
  export type HFigureAxisType = "top" | "bottom" | "vCenter";
5
6
  export type VFigureAxisType = "right" | "left" | "hCenter";
@@ -9,8 +10,10 @@ export interface SnapLine<T extends HFigureAxisType | VFigureAxisType> {
9
10
  snappedAxisType: T;
10
11
  position: Pixel;
11
12
  }
12
- interface SnapReturn {
13
+ interface SnapMoveReturn extends SnapReturn {
13
14
  snappedFigures: FigureUI[];
15
+ }
16
+ export interface SnapReturn {
14
17
  verticalSnapLine?: SnapLine<VFigureAxisType>;
15
18
  horizontalSnapLine?: SnapLine<HFigureAxisType>;
16
19
  }
@@ -18,10 +21,12 @@ interface SnapReturn {
18
21
  * Try to snap the given figure to other figures when moving the figure, and return the snapped
19
22
  * figure and the possible snap lines, if any were found
20
23
  */
21
- export declare function snapForMove(env: SpreadsheetChildEnv, figuresToSnap: FigureUI[], otherFigures: FigureUI[]): SnapReturn;
24
+ export declare function snapForMove(env: SpreadsheetChildEnv, figuresToSnap: FigureUI[], otherFigures: FigureUI[]): SnapMoveReturn;
22
25
  /**
23
26
  * Try to snap the given figure to the other figures when resizing the figure, and return the snapped
24
27
  * figure and the possible snap lines, if any were found
25
28
  */
26
- export declare function snapForResize(env: SpreadsheetChildEnv, resizeDirX: -1 | 0 | 1, resizeDirY: -1 | 0 | 1, figureToSnap: FigureUI, otherFigures: FigureUI[]): SnapReturn;
29
+ export declare function snapForResize(env: SpreadsheetChildEnv, resizeDirX: -1 | 0 | 1, resizeDirY: -1 | 0 | 1, rect: Rect, otherFigures: FigureUI[]): {
30
+ snappedRect: Rect;
31
+ } & SnapReturn;
27
32
  export {};
@@ -35,6 +35,7 @@ export declare class LinkEditor extends Component<SpreadsheetChildEnv> {
35
35
  private state;
36
36
  private viewStore;
37
37
  setup(): void;
38
+ onLinkUrlInput(ev: InputEvent): void;
38
39
  computeLinks(): void;
39
40
  get linkProposalByCategory(): Record<string, LinkProposal>;
40
41
  get defaultState(): LinkState;
@@ -45,7 +45,7 @@ export declare class CarouselPanel extends Component<SpreadsheetChildEnv> {
45
45
  getPreviewDivStyle(item: CarouselItem): string;
46
46
  getItemId(item: CarouselItem): string;
47
47
  addNewChartToCarousel(ev: MouseEvent): void;
48
- get supportedChartTypes(): Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst">;
48
+ get supportedChartTypes(): Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst">;
49
49
  closePopover(): void;
50
50
  onSelectChartType(type: string): void;
51
51
  get hasDataView(): boolean;
@@ -12,23 +12,23 @@ export declare class ChartTypePickerPopover extends Component<SpreadsheetChildEn
12
12
  onClose: () => void;
13
13
  onSelectSubType: (type: string) => void;
14
14
  supportedTypes: {
15
- add: (value: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst") => Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst">;
15
+ add: (value: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst") => Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst">;
16
16
  clear: () => void;
17
- delete: (value: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst") => boolean;
18
- forEach: (callbackfn: (value: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst", value2: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst", set: Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst">) => void, thisArg?: any) => void;
19
- has: (value: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst") => boolean;
17
+ delete: (value: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst") => boolean;
18
+ forEach: (callbackfn: (value: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst", value2: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst", set: Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst">) => void, thisArg?: any) => void;
19
+ has: (value: "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst") => boolean;
20
20
  readonly size: number;
21
- entries: () => SetIterator<["line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst", "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst"]>;
22
- keys: () => SetIterator<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst">;
23
- values: () => SetIterator<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst">;
24
- union: <U>(other: ReadonlySetLike<U>) => Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst" | U>;
25
- intersection: <U>(other: ReadonlySetLike<U>) => Set<("line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst") & U>;
26
- difference: <U>(other: ReadonlySetLike<U>) => Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst">;
27
- symmetricDifference: <U>(other: ReadonlySetLike<U>) => Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst" | U>;
21
+ entries: () => SetIterator<["line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst", "line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst"]>;
22
+ keys: () => SetIterator<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst">;
23
+ values: () => SetIterator<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst">;
24
+ union: <U>(other: ReadonlySetLike<U>) => Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst" | U>;
25
+ intersection: <U>(other: ReadonlySetLike<U>) => Set<("line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst") & U>;
26
+ difference: <U>(other: ReadonlySetLike<U>) => Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst">;
27
+ symmetricDifference: <U>(other: ReadonlySetLike<U>) => Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst" | U>;
28
28
  isSubsetOf: (other: ReadonlySetLike<unknown>) => boolean;
29
29
  isSupersetOf: (other: ReadonlySetLike<unknown>) => boolean;
30
30
  isDisjointFrom: (other: ReadonlySetLike<unknown>) => boolean;
31
- [Symbol.iterator]: () => SetIterator<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst">;
31
+ [Symbol.iterator]: () => SetIterator<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "geo" | "sunburst">;
32
32
  readonly [Symbol.toStringTag]: string;
33
33
  };
34
34
  popoverProps: {
@@ -34,6 +34,7 @@ export declare class FindAndReplacePanel extends Component<SpreadsheetChildEnv>
34
34
  setup(): void;
35
35
  onFocusSearch(): void;
36
36
  onSearchInput(ev: InputEvent): void;
37
+ onReplaceInput(ev: InputEvent): void;
37
38
  onKeydownPanel(ev: KeyboardEvent): void;
38
39
  onKeydownSearch(ev: KeyboardEvent): void;
39
40
  onKeydownReplace(ev: KeyboardEvent): void;
@@ -5,7 +5,7 @@ import { SpreadsheetStore } from "../../../stores/spreadsheet_store";
5
5
  import { SearchOptions } from "../../../types/find_and_replace";
6
6
  import { Get } from "../../../types/store_engine";
7
7
  export declare class FindAndReplaceStore extends SpreadsheetStore implements HighlightProvider {
8
- mutators: readonly ["updateSearchOptions", "updateSearchContent", "searchFormulas", "selectPreviousMatch", "selectNextMatch", "replace"];
8
+ mutators: readonly ["updateSearchOptions", "updateSearchContent", "updateReplaceContent", "searchFormulas", "selectPreviousMatch", "selectNextMatch", "replace"];
9
9
  private allSheetsMatches;
10
10
  private activeSheetMatches;
11
11
  private specificRangeMatches;
@@ -28,6 +28,7 @@ export declare class FindAndReplaceStore extends SpreadsheetStore implements Hig
28
28
  constructor(get: Get);
29
29
  get searchMatches(): CellPosition[];
30
30
  updateSearchContent(toSearch: string): void;
31
+ updateReplaceContent(toReplace: string): void;
31
32
  updateSearchOptions(searchOptions: Partial<SearchOptions>): void;
32
33
  searchFormulas(showFormula: boolean): void;
33
34
  selectPreviousMatch(): void;
@@ -3,6 +3,7 @@ import { Color } from "../../../types/misc";
3
3
  import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
4
4
  import { TableConfig, TableStyle, TableStyleTemplateName } from "../../../types/table";
5
5
  import { TableStylePreview } from "../../tables/table_style_preview/table_style_preview";
6
+ import { TextInput } from "../../text_input/text_input";
6
7
  import { RoundColorPicker } from "../components/round_color_picker/round_color_picker";
7
8
  import { Section } from "../components/section/section";
8
9
  interface State {
@@ -17,6 +18,7 @@ export declare class TableStyleEditorPanel extends Component<SpreadsheetChildEnv
17
18
  Section: typeof Section;
18
19
  RoundColorPicker: typeof RoundColorPicker;
19
20
  TableStylePreview: typeof TableStylePreview;
21
+ TextInput: typeof TextInput;
20
22
  };
21
23
  protected props: import("@odoo/owl").Props<{
22
24
  onCloseSidePanel: () => void;
@@ -113,7 +113,6 @@ export declare const DEFAULT_SCORECARD_HEIGHT = 101;
113
113
  export declare const DEFAULT_SCORECARD_WIDTH = 213;
114
114
  export declare const FIGURE_BORDER_WIDTH = 1;
115
115
  export declare const ACTIVE_BORDER_WIDTH = 2;
116
- export declare const MIN_FIG_SIZE = 80;
117
116
  export declare const MAX_CHAR_LABEL = 20;
118
117
  export declare const FIGURE_ID_SPLITTER = "??";
119
118
  export declare const DEFAULT_GAUGE_LOWER_COLOR = "#EA6175";
@@ -0,0 +1,2 @@
1
+ import { ColorThemeName, GridRenderingTheme } from "../types/rendering";
2
+ export declare const COLOR_THEMES: Record<ColorThemeName, GridRenderingTheme>;
@@ -4,6 +4,7 @@ import { CoreGetters } from "../../types/core_getters";
4
4
  import { Getters } from "../../types/getters";
5
5
  import { RangeAdapterFunctions, UID } from "../../types/misc";
6
6
  import { Range } from "../../types/range";
7
+ import { ColorThemeName } from "../../types/rendering";
7
8
  import { Validator } from "../../types/validator";
8
9
  export declare class SpreadsheetChart {
9
10
  private readonly getters;
@@ -26,6 +27,6 @@ export declare class SpreadsheetChart {
26
27
  getDefinitionForExcel(getters: Getters): import("../..").ExcelChartDefinition | undefined;
27
28
  getData(getters: Getters, chartId: UID): ChartData;
28
29
  getFormulas(getters: CoreGetters): CompiledFormula[];
29
- getRuntime(getters: Getters, chartId: UID): import("../..").ChartRuntime;
30
+ getRuntime(getters: Getters, chartId: UID, colorThemeName: ColorThemeName): import("../..").ChartRuntime;
30
31
  static deleteInvalidKeys(definition: ChartDefinition<any>): ChartDefinition<any>;
31
32
  }
@@ -2,10 +2,10 @@ import { ChartAxisFormats, ChartDefinition, ChartRangeDataSource, DataSet, DataS
2
2
  import { CommandResult } from "../../../types/commands";
3
3
  import { CoreGetters } from "../../../types/core_getters";
4
4
  import { LocaleFormat } from "../../../types/format";
5
- import { Getters } from "../../../types/getters";
6
5
  import { Locale } from "../../../types/locale";
7
6
  import { Color, RangeAdapterFunctions, UID } from "../../../types/misc";
8
7
  import { Range } from "../../../types/range";
8
+ import { ColorThemeName } from "../../../types/rendering";
9
9
  import { ColorGenerator } from "../../color";
10
10
  export declare const TREND_LINE_XAXIS_ID = "x1";
11
11
  export declare const MOVING_AVERAGE_TREND_LINE_XAXIS_ID = "xMovingAverage";
@@ -61,4 +61,4 @@ export declare function truncateLabel(label: string | undefined, maxLen?: number
61
61
  export declare function isTrendLineAxis(axisID: string): axisID is "x1" | "xMovingAverage";
62
62
  export declare function getChartBackgroundColor({ background }: {
63
63
  background?: Color;
64
- }, getters: Getters): Color;
64
+ }, colorThemeName: ColorThemeName): Color;
@@ -1,7 +1,7 @@
1
1
  import { ChartConfiguration } from "chart.js";
2
2
  import { ChartRuntime, ChartType } from "../../../types/chart/chart";
3
3
  import { Figure } from "../../../types/figure";
4
- import { DOMDimension } from "../../../types/rendering";
4
+ import { ColorThemeName, DOMDimension } from "../../../types/rendering";
5
5
  export declare const CHART_COMMON_OPTIONS: {
6
6
  responsive: true;
7
7
  maintainAspectRatio: false;
@@ -22,8 +22,8 @@ export declare const CHART_COMMON_OPTIONS: {
22
22
  * of a large dataset would make Chart.js slow without any visible benefit on a small canvas.
23
23
  */
24
24
  export declare function limitChartConfigDataPoints(config: ChartConfiguration<any>, maxPoints?: number): ChartConfiguration<any>;
25
- export declare function chartToImageUrl(runtime: ChartRuntime, figure: Figure, type: ChartType): Promise<string | undefined>;
26
- export declare function chartToImageFile(runtime: ChartRuntime, figure: Figure, type: ChartType): Promise<Blob | null>;
25
+ export declare function chartToImageUrl(runtime: ChartRuntime, figure: Figure, type: ChartType, colorThemeName?: ColorThemeName): Promise<string | undefined>;
26
+ export declare function chartToImageFile(runtime: ChartRuntime, figure: Figure, type: ChartType, colorThemeName?: ColorThemeName): Promise<Blob | null>;
27
27
  /**
28
28
  * Draw the given chart on the canvas.
29
29
  *
@@ -16,17 +16,18 @@ import { Getters } from "../../../../types/getters";
16
16
  import { Locale } from "../../../../types/locale";
17
17
  import { FunctionResultObject } from "../../../../types/misc";
18
18
  import { Range } from "../../../../types/range";
19
+ import { ColorThemeName } from "../../../../types/rendering";
19
20
  import { BubbleChartData } from "../bubble_chart";
20
- export declare function getBarChartData(definition: GenericDefinition<BarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters): ChartRuntimeGenerationArgs;
21
- export declare function getCalendarChartData(definition: GenericDefinition<CalendarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters): ChartRuntimeGenerationArgs;
22
- export declare function getPyramidChartData(definition: PyramidChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: Getters): ChartRuntimeGenerationArgs;
23
- export declare function getLineChartData(definition: GenericDefinition<LineChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters): ChartRuntimeGenerationArgs;
24
- export declare function getPieChartData(definition: GenericDefinition<PieChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters): ChartRuntimeGenerationArgs;
25
- export declare function getRadarChartData(definition: GenericDefinition<RadarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters): ChartRuntimeGenerationArgs;
26
- export declare function getGeoChartData(definition: GeoChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: Getters): GeoChartRuntimeGenerationArgs;
27
- export declare function getFunnelChartData(definition: GenericDefinition<FunnelChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters): ChartRuntimeGenerationArgs;
28
- export declare function getHierarchalChartData(definition: SunburstChartDefinition | TreeMapChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: Getters): ChartRuntimeGenerationArgs;
29
- export declare function getBubbleChartData(definition: BubbleChartDefinition<Range>, getters: Getters): BubbleChartData;
21
+ export declare function getBarChartData(definition: GenericDefinition<BarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
22
+ export declare function getCalendarChartData(definition: GenericDefinition<CalendarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
23
+ export declare function getPyramidChartData(definition: PyramidChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: Getters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
24
+ export declare function getLineChartData(definition: GenericDefinition<LineChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
25
+ export declare function getPieChartData(definition: GenericDefinition<PieChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
26
+ export declare function getRadarChartData(definition: GenericDefinition<RadarChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
27
+ export declare function getGeoChartData(definition: GeoChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: Getters, colorThemeName: ColorThemeName): GeoChartRuntimeGenerationArgs;
28
+ export declare function getFunnelChartData(definition: GenericDefinition<FunnelChartDefinition>, { labelValues, dataSetsValues }: ChartData, getters: Getters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
29
+ export declare function getHierarchalChartData(definition: SunburstChartDefinition | TreeMapChartDefinition, { labelValues, dataSetsValues }: ChartData, getters: Getters, colorThemeName: ColorThemeName): ChartRuntimeGenerationArgs;
30
+ export declare function getBubbleChartData(definition: BubbleChartDefinition<Range>, getters: Getters, colorThemeName: ColorThemeName): BubbleChartData;
30
31
  export declare function getTrendDatasetForBarChart(config: TrendConfiguration, data: FunctionResultObject[]): Point[] | undefined;
31
32
  export declare function getTrendDatasetForLineChart(config: TrendConfiguration, data: FunctionResultObject[], labels: string[], axisType: AxisType, locale: Locale): Point[] | undefined;
32
33
  export declare function canChartParseLabels(chartData: ChartData): boolean;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Comes from https://github.com/odoo/odoo/blob/master/addons/web/static/src/owl2/utils.js
3
+ */
4
+ export declare function render(component: any, deep?: boolean): void;
@@ -415,7 +415,6 @@ export declare const hooks: {
415
415
  };
416
416
  export declare const compatibility: {
417
417
  Component: any;
418
- useExternalListener: any;
419
418
  EnvPlugin: any;
420
419
  App: any;
421
420
  };
@@ -11,7 +11,6 @@
11
11
  *
12
12
  * 1. Update template directives:
13
13
  * - replace `t-portal` → `t-custom-portal`
14
- * - replace `t-model` → `t-custom-model`
15
14
  *
16
15
  * 2. Load this file immediately after Owl 3.
17
16
  *
@@ -26,7 +25,6 @@
26
25
  * Gradually remove the compatibility layer by migrating to native Owl 3:
27
26
  *
28
27
  * - replace `t-custom-portal` with proper Owl 3 portal usage
29
- * - replace `t-custom-model` with `t-model` + signals
30
28
  * - convert `useLayoutEffect` back to `useEffect` where appropriate
31
29
  *
32
30
  * The end goal is to eliminate all compatibility shims.
@@ -38,14 +36,11 @@ export interface ComponentConstructor<Env = any> {
38
36
  template: string;
39
37
  }
40
38
  declare class _Component<Env = any> extends OwlComponent {
41
- static template: string;
42
39
  env: Env;
43
40
  constructor(node: any);
44
41
  setup(): void;
45
- render(deep?: boolean): void;
46
42
  }
47
43
  declare function _useComponent(): any;
48
- declare function _useExternalListener(target: any, eventName: any, handler: any, eventParams?: any): void;
49
44
  declare function _useLayoutEffect(effect: any, computeDependencies?: () => any): void;
50
45
  declare class _EnvPlugin extends Plugin {
51
46
  static id: string;
@@ -53,8 +48,6 @@ declare class _EnvPlugin extends Plugin {
53
48
  }
54
49
  declare function _useEnv(): any;
55
50
  declare function _useSubEnv(extension: any): void;
56
- declare function _useChildSubEnv(extension: any): void;
57
- declare function _useChildEnv(): any;
58
51
  declare class _App extends OwlApp {
59
52
  /**
60
53
  * @param {any} config
@@ -64,22 +57,16 @@ declare class _App extends OwlApp {
64
57
  }
65
58
  declare const Component: typeof _Component;
66
59
  declare const useComponent: typeof _useComponent;
67
- declare const useExternalListener: typeof _useExternalListener;
68
60
  declare const useLayoutEffect: typeof _useLayoutEffect;
69
61
  declare const EnvPlugin: typeof _EnvPlugin;
70
62
  declare const useEnv: typeof _useEnv;
71
63
  declare const useSubEnv: typeof _useSubEnv;
72
- declare const useChildEnv: typeof _useChildEnv;
73
- declare const useChildSubEnv: typeof _useChildSubEnv;
74
64
  declare const App: typeof _App;
75
- export { App, Component, EnvPlugin, useChildEnv, useChildSubEnv, useComponent, useEnv, useExternalListener, useLayoutEffect, useSubEnv, };
65
+ export { App, Component, EnvPlugin, useComponent, useEnv, useLayoutEffect, useSubEnv };
76
66
  export type Component<Env = any> = _Component<Env>;
77
67
  export type useComponent = () => any;
78
- export type useExternalListener = (target: any, eventName: any, handler: any, eventParams?: any) => void;
79
68
  export type useLayoutEffect = (effect: any, computeDependencies: () => any) => void;
80
69
  export type EnvPlugin = _EnvPlugin;
81
70
  export type useEnv = () => any;
82
71
  export type useSubEnv = () => any;
83
- export type useChildEnv = () => any;
84
- export type useChildSubEnv = () => any;
85
72
  export type App = _App;
@@ -2,6 +2,7 @@ import { ChartRuntime } from "../../types/chart/chart";
2
2
  import { CoreViewCommand } from "../../types/commands";
3
3
  import { Color, UID } from "../../types/misc";
4
4
  import { Range } from "../../types/range";
5
+ import { ColorThemeName } from "../../types/rendering";
5
6
  import { ExcelWorkbookData } from "../../types/workbook_data";
6
7
  import { CoreViewPlugin } from "../core_view_plugin";
7
8
  interface EvaluationChartStyle {
@@ -9,17 +10,17 @@ interface EvaluationChartStyle {
9
10
  fontColor: Color;
10
11
  }
11
12
  interface EvaluationChartState {
12
- charts: Record<UID, ChartRuntime | undefined>;
13
+ charts: Record<UID, Partial<Record<ColorThemeName, ChartRuntime | undefined>>>;
13
14
  }
14
15
  export declare class EvaluationChartPlugin extends CoreViewPlugin<EvaluationChartState> {
15
- static getters: readonly ["getChartRuntime", "getStyleOfSingleCellChart"];
16
- charts: Record<UID, ChartRuntime | undefined>;
16
+ static getters: readonly ["getStyleOfSingleCellChart", "getChartRuntimeWithTheme"];
17
+ charts: Record<UID, Partial<Record<ColorThemeName, ChartRuntime | undefined>>>;
17
18
  handle(cmd: CoreViewCommand): void;
18
- getChartRuntime(chartId: UID): ChartRuntime;
19
+ getChartRuntimeWithTheme(chartId: UID, colorThemeName: ColorThemeName): ChartRuntime;
19
20
  /**
20
21
  * Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
21
22
  */
22
- getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): EvaluationChartStyle;
23
+ getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined, colorThemeName: ColorThemeName): EvaluationChartStyle;
23
24
  exportForExcel(data: ExcelWorkbookData): Promise<void>;
24
25
  private createRuntimeChart;
25
26
  }
@@ -0,0 +1,6 @@
1
+ import { ChartRuntime } from "../../types/chart/chart";
2
+ import { UIPlugin } from "../ui_plugin";
3
+ export declare class ChartUIPlugin extends UIPlugin {
4
+ static getters: readonly ["getChartRuntime"];
5
+ getChartRuntime(chartId: string): ChartRuntime;
6
+ }
@@ -1,9 +1,6 @@
1
1
  import { Command } from "../../types/commands";
2
2
  import { GridRenderingTheme } from "../../types/rendering";
3
3
  import { UIPlugin, UIPluginConfig } from "../ui_plugin";
4
- export declare const BACKGROUND_HEADER_SELECTED_COLOR = "#E8EAED";
5
- export declare const BACKGROUND_HEADER_ACTIVE_COLOR = "#595959";
6
- export declare const COLOR_THEMES: Record<string, GridRenderingTheme>;
7
4
  export declare class ColorThemeUIPlugin extends UIPlugin {
8
5
  static getters: readonly ["isDarkMode", "getSpreadsheetTheme"];
9
6
  private colorScheme?;
@@ -1,5 +1,5 @@
1
1
  import { CoreChartOptions } from "chart.js";
2
- import { CompiledFormula } from "..";
2
+ import { ColorThemeName, CompiledFormula } from "..";
3
3
  import { ChartCreationContext, ChartData, ChartRuntime, ChartType, ChartTypeDefinition, ExcelChartDefinition } from "../types/chart/chart";
4
4
  import { CommandResult } from "../types/commands";
5
5
  import { CoreGetters } from "../types/core_getters";
@@ -47,7 +47,7 @@ export interface ChartTypeBuilder<T extends ChartType> {
47
47
  * If the chart is not supported by Excel, this function returns undefined.
48
48
  */
49
49
  getDefinitionForExcel(getters: Getters, definition: ChartTypeDefinition<T, Range>, params: Pick<ExcelChartDefinition, "dataSets" | "labelRange">): ExcelChartDefinition | undefined;
50
- getRuntime(getters: Getters, definition: ChartTypeDefinition<T, Range>, chartDataExtractors: ChartDataExtractors, sheetId: UID, eventHandlers: ChartJsEventHandlers): ChartRuntime;
50
+ getRuntime(getters: Getters, definition: ChartTypeDefinition<T, Range>, chartDataExtractors: ChartDataExtractors, sheetId: UID, eventHandlers: ChartJsEventHandlers, colorThemeName: ColorThemeName): ChartRuntime;
51
51
  /** Get all the formulas used in the chart */
52
52
  getFormulas(getters: CoreGetters, sheetId: UID, definition: ChartTypeDefinition<T, Range>): CompiledFormula[];
53
53
  allowedDefinitionKeys: readonly string[];
@@ -15,7 +15,7 @@ export interface FigureContent {
15
15
  isThemeDependant: boolean;
16
16
  SidePanelComponent?: string;
17
17
  keepRatio?: boolean;
18
- minFigSize?: number;
18
+ minFigSize: number;
19
19
  borderWidth: (getters: Getters) => number;
20
20
  hasShadow: (getters: Getters) => boolean;
21
21
  isRounded: (getters: Getters) => boolean;