@odoo/o-spreadsheet 19.5.0-alpha.6 → 19.5.0-alpha.7

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 (68) hide show
  1. package/dist/o_spreadsheet.cjs +2116 -1475
  2. package/dist/o_spreadsheet.css +21 -18
  3. package/dist/o_spreadsheet.esm.js +2116 -1475
  4. package/dist/o_spreadsheet.iife.js +2118 -1477
  5. package/dist/o_spreadsheet.min.iife.js +386 -386
  6. package/dist/o_spreadsheet.xml +95 -51
  7. package/dist/types/actions/action.d.ts +1 -7
  8. package/dist/types/actions/data_actions.d.ts +1 -0
  9. package/dist/types/actions/menu_items_actions.d.ts +2 -0
  10. package/dist/types/components/helpers/dom_helpers.d.ts +2 -0
  11. package/dist/types/components/side_panel/carousel_panel/carousel_panel.d.ts +14 -1
  12. package/dist/types/components/side_panel/chart/chart_type_picker/chart_type_picker.d.ts +4 -17
  13. package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +64 -0
  14. package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup.d.ts +28 -0
  15. package/dist/types/components/side_panel/data_sources_cleanup/data_sources_cleanup_store.d.ts +13 -0
  16. package/dist/types/components/side_panel/pivot/pivot_layout_configurator/pivot_layout_configurator.d.ts +0 -2
  17. package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_panel.d.ts +4 -11
  18. package/dist/types/components/side_panel/split_to_columns_panel/split_to_columns_store.d.ts +33 -0
  19. package/dist/types/formulas/code_builder.d.ts +2 -1
  20. package/dist/types/formulas/compiler.d.ts +6 -0
  21. package/dist/types/functions/create_compute_function.d.ts +4 -3
  22. package/dist/types/functions/function_registry.d.ts +1 -5
  23. package/dist/types/functions/helper_matrices.d.ts +1 -0
  24. package/dist/types/functions/helper_statistical.d.ts +6 -0
  25. package/dist/types/functions/module_array.d.ts +41 -23
  26. package/dist/types/functions/module_database.d.ts +18 -6
  27. package/dist/types/functions/module_date.d.ts +70 -22
  28. package/dist/types/functions/module_engineering.d.ts +3 -1
  29. package/dist/types/functions/module_filter.d.ts +2 -2
  30. package/dist/types/functions/module_financial.d.ts +105 -35
  31. package/dist/types/functions/module_info.d.ts +33 -11
  32. package/dist/types/functions/module_logical.d.ts +16 -8
  33. package/dist/types/functions/module_lookup.d.ts +23 -15
  34. package/dist/types/functions/module_math.d.ts +125 -43
  35. package/dist/types/functions/module_operators.d.ts +7 -3
  36. package/dist/types/functions/module_statistical.d.ts +78 -22
  37. package/dist/types/functions/module_text.d.ts +70 -24
  38. package/dist/types/functions/module_web.d.ts +3 -1
  39. package/dist/types/helpers/carousel_helpers.d.ts +0 -2
  40. package/dist/types/helpers/figures/chart.d.ts +2 -0
  41. package/dist/types/helpers/ui/split_to_columns_interactive.d.ts +1 -1
  42. package/dist/types/index.d.ts +3 -0
  43. package/dist/types/model.d.ts +1 -0
  44. package/dist/types/plugins/core/cell.d.ts +1 -0
  45. package/dist/types/plugins/core/chart.d.ts +2 -0
  46. package/dist/types/plugins/core/conditional_format.d.ts +2 -0
  47. package/dist/types/plugins/core/data_validation.d.ts +2 -0
  48. package/dist/types/plugins/core/formulas_provider.d.ts +8 -0
  49. package/dist/types/plugins/core/pivot.d.ts +1 -0
  50. package/dist/types/plugins/core_plugin.d.ts +7 -3
  51. package/dist/types/plugins/ui_core_views/cell_evaluation/evaluation_plugin.d.ts +10 -3
  52. package/dist/types/plugins/ui_feature/ui_options.d.ts +1 -7
  53. package/dist/types/plugins/ui_stateful/filter_evaluation.d.ts +2 -3
  54. package/dist/types/registries/chart_registry.d.ts +3 -0
  55. package/dist/types/registries/data_source_registry.d.ts +15 -0
  56. package/dist/types/stores/table_resize_store.d.ts +6 -0
  57. package/dist/types/types/commands.d.ts +20 -12
  58. package/dist/types/types/core_getters.d.ts +3 -1
  59. package/dist/types/types/functions.d.ts +14 -4
  60. package/dist/types/types/getters.d.ts +5 -6
  61. package/dist/types/types/misc.d.ts +5 -1
  62. package/package.json +1 -1
  63. package/dist/types/plugins/ui_feature/split_to_columns.d.ts +0 -21
  64. package/dist/types/plugins/ui_feature/table_resize_ui.d.ts +0 -6
  65. /package/dist/types/plugins/{ui_feature → ui_stateful}/cell_computed_style.d.ts +0 -0
  66. /package/dist/types/plugins/{ui_feature → ui_stateful}/figure.d.ts +0 -0
  67. /package/dist/types/plugins/{ui_feature → ui_stateful}/header_visibility_ui.d.ts +0 -0
  68. /package/dist/types/plugins/{ui_feature → ui_stateful}/table_computed_style.d.ts +0 -0
@@ -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.6
5
- @date 2026-07-23T07:49:15.559Z
6
- @hash 192a921
4
+ @version 19.5.0-alpha.7
5
+ @date 2026-07-30T06:59:22.954Z
6
+ @hash 5b6f8b6
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -810,22 +810,22 @@
810
810
  <Select
811
811
  class="'mb-3'"
812
812
  values="this.separators"
813
- selectedValue="this.state.separatorValue"
813
+ selectedValue="this.store.separatorValue"
814
814
  onChange.bind="this.onSeparatorChange"
815
815
  />
816
816
 
817
817
  <input
818
818
  class="o-input mb-3"
819
819
  type="text"
820
- t-if="this.state.separatorValue === 'custom'"
821
- t-att-value="this.state.customSeparator"
820
+ t-if="this.store.separatorValue === 'custom'"
821
+ t-att-value="this.store.customSeparator"
822
822
  t-on-input="this.updateCustomSeparator"
823
823
  placeholder="Add any characters or symbol"
824
824
  />
825
825
 
826
826
  <t t-set="addColumnsLabel">Add new columns to avoid overwriting cells</t>
827
827
  <Checkbox
828
- value="this.state.addNewColumns"
828
+ value="this.store.addNewColumns"
829
829
  label="addColumnsLabel"
830
830
  onChange.bind="this.updateAddNewColumnsCheckbox"
831
831
  />
@@ -1473,7 +1473,7 @@
1473
1473
  />
1474
1474
  </t>
1475
1475
  <div t-if="measure.computedBy" class="d-flex flex-row small">
1476
- <div class="d-flex flex-column py-2 px-2 w-100" t-on-pointerdown.stop="">
1476
+ <div class="d-flex flex-column py-2 px-2 w-100">
1477
1477
  <StandaloneComposer
1478
1478
  onConfirm.bind="this.updateMeasureFormula"
1479
1479
  composerContent="measure.computedBy.formula"
@@ -1552,7 +1552,7 @@
1552
1552
  />
1553
1553
  <span t-else="1" class="o-fw-bold text-truncate" t-out="this.dimensionDisplayName"/>
1554
1554
  </div>
1555
- <div class="d-flex flex-rows" t-on-pointerdown.stop="">
1555
+ <div class="d-flex flex-rows">
1556
1556
  <t t-call-slot="upper-right-icons"/>
1557
1557
  <i
1558
1558
  class="o-button-icon fa fa-trash pe-1 ps-2"
@@ -1661,9 +1661,7 @@
1661
1661
  t-as="group"
1662
1662
  t-key="group_index"
1663
1663
  class="o-pivot-custom-group pb-1">
1664
- <div
1665
- class="d-flex align-items-center justify-content-between small"
1666
- t-on-pointerdown.stop="">
1664
+ <div class="d-flex align-items-center justify-content-between small">
1667
1665
  <TextInput
1668
1666
  value="group.name"
1669
1667
  onChange="(newName) => this.onRenameGroup(group_index, newName)"
@@ -2124,6 +2122,34 @@
2124
2122
  </div>
2125
2123
  </t>
2126
2124
 
2125
+ <t t-name="o-spreadsheet-DataSourcesCleanup">
2126
+ <div class="o-data-source-cleanup">
2127
+ <Section
2128
+ t-foreach="this.store.unusedDataSourcesCategories"
2129
+ t-as="category"
2130
+ t-key="category.type"
2131
+ title="category.label">
2132
+ <t t-foreach="category.dataSources" t-as="dataSource" t-key="dataSource_index">
2133
+ <Checkbox
2134
+ name="dataSource.id"
2135
+ label="dataSource.label"
2136
+ value="this.isDataSourceChecked(category.type, dataSource.id)"
2137
+ onChange="(checked) => this.onToggleDataSource(category.type, dataSource.id, checked)"
2138
+ className="'mb-2'"
2139
+ />
2140
+ </t>
2141
+ <div t-if="!category.dataSources.length" class="w-100 d-flex fst-italic text-muted">
2142
+ No unused data source in this category.
2143
+ </div>
2144
+ </Section>
2145
+ <Section t-if="this.dataSourcesToDelete.length" class="'pt-0'">
2146
+ <button class="o-button o-button-danger" t-on-click="this.onRemoveUnusedDataSources">
2147
+ Delete selected items
2148
+ </button>
2149
+ </Section>
2150
+ </div>
2151
+ </t>
2152
+
2127
2153
  <t t-name="o-spreadsheet-ValueInRangeCriterionForm">
2128
2154
  <SelectionInput
2129
2155
  ranges="[this.props.criterion.values[0] || '']"
@@ -3921,26 +3947,12 @@
3921
3947
  <ChartAnnotation t-props="this.props"/>
3922
3948
  </t>
3923
3949
 
3924
- <t t-name="o-spreadsheet-ChartTypePicker">
3925
- <t t-set="selectedChartProperties" t-value="this.getSelectedChartSubtypeProperties()"/>
3926
- <Section title.translate="Chart type">
3927
- <div class="position-relative">
3928
- <div
3929
- class="o-select o-input o-type-selector"
3930
- t-ref="this.selectRef"
3931
- t-on-pointerdown.prevent="this.onPointerDown">
3932
- <t t-out="selectedChartProperties.displayName"/>
3933
- </div>
3934
- <div class="o-type-selector-preview position-absolute">
3935
- <t t-call="{{selectedChartProperties.preview}}"/>
3936
- </div>
3937
- </div>
3938
- </Section>
3939
- <Popover t-if="this.state.popoverProps" t-props="this.state.popoverProps">
3950
+ <t t-name="o-spreadsheet-ChartTypePickerPopover">
3951
+ <Popover t-props="this.props.popoverProps">
3940
3952
  <div
3941
3953
  t-ref="this.popoverRef"
3942
3954
  class="o-chart-select-popover px-3 pb-4"
3943
- t-att-style="this.state.popoverStyle">
3955
+ t-att-style="this.popoverStyle">
3944
3956
  <t t-foreach="this.categories" t-as="category" t-key="category">
3945
3957
  <t t-if="this.chartTypeByCategories[category]">
3946
3958
  <h5 class="my-3" t-out="category_value"/>
@@ -3954,7 +3966,7 @@
3954
3966
  t-att-title="properties.displayName"
3955
3967
  t-on-click="() => this.onTypeChange(properties.chartSubtype)"
3956
3968
  t-att-data-id="properties.chartSubtype"
3957
- t-att-class="{'selected': properties === selectedChartProperties}">
3969
+ t-att-class="{'selected': properties.chartSubtype === this.props.selectedChartSubType}">
3958
3970
  <t t-call="{{properties.preview}}"/>
3959
3971
  </div>
3960
3972
  </t>
@@ -3965,6 +3977,32 @@
3965
3977
  </Popover>
3966
3978
  </t>
3967
3979
 
3980
+ <t t-name="o-spreadsheet-ChartTypePicker">
3981
+ <t t-set="selectedChartProperties" t-value="this.getSelectedChartSubtypeProperties()"/>
3982
+ <Section title.translate="Chart type">
3983
+ <div class="position-relative">
3984
+ <div
3985
+ class="o-select o-input o-type-selector"
3986
+ t-ref="this.selectRef"
3987
+ t-on-pointerdown.prevent="this.onPointerDown">
3988
+ <t t-out="selectedChartProperties.displayName"/>
3989
+ </div>
3990
+ <div class="o-type-selector-preview position-absolute">
3991
+ <t t-call="{{selectedChartProperties.preview}}"/>
3992
+ </div>
3993
+ </div>
3994
+ </Section>
3995
+ <ChartTypePickerPopover
3996
+ t-if="this.state.popoverProps"
3997
+ popoverProps="this.state.popoverProps"
3998
+ onClose.bind="this.closePopover"
3999
+ onSelectSubType.bind="this.onTypeChange"
4000
+ parentRef="this.selectRef"
4001
+ supportedTypes="this.getSupportedChartTypes()"
4002
+ selectedChartSubType="selectedChartProperties.chartSubtype"
4003
+ />
4004
+ </t>
4005
+
3968
4006
  <t t-name="o-spreadsheet-ChartPreview.LINE_CHART">
3969
4007
  <svg viewBox="0 0 48 48" class="o-chart-preview" xmlns="http://www.w3.org/2000/svg">
3970
4008
  <path fill="var(--os-gray-600)" d="M2,2 v44 h1 v-44 M3,45 h42 v1 h-42"/>
@@ -5277,20 +5315,33 @@
5277
5315
  </div>
5278
5316
  </t>
5279
5317
  </div>
5280
- <div
5281
- class="o-button-link o-carousel-add-chart float-end d-flex align-items-center py-4 pe-4 gap-2"
5282
- t-on-click="this.addNewChartToCarousel"
5283
- t-att-title="this.carouselAddChartInfoMessage">
5284
- + Add chart
5285
- </div>
5286
- <div
5287
- t-if="!this.hasDataView"
5288
- class="o-button-link o-carousel-add-data-view float-end py-4 pe-4"
5289
- t-on-click="this.addDataViewToCarousel"
5290
- t-att-title="this.carouselDataViewMessage">
5291
- + Add data view
5292
- </div>
5318
+ <Section class="'pt-0'">
5319
+ <div>
5320
+ <div
5321
+ class="o-button-link o-carousel-add-chart float-end d-flex align-items-center my-4"
5322
+ t-on-click="this.addNewChartToCarousel"
5323
+ t-ref="this.addChartButton"
5324
+ t-att-title="this.carouselAddChartInfoMessage">
5325
+ + Add chart
5326
+ </div>
5327
+ <div
5328
+ t-if="!this.hasDataView"
5329
+ class="o-button-link o-carousel-add-data-view float-end my-4 me-4"
5330
+ t-on-click="this.addDataViewToCarousel"
5331
+ t-att-title="this.carouselDataViewMessage">
5332
+ + Add data view
5333
+ </div>
5334
+ </div>
5335
+ </Section>
5293
5336
  </div>
5337
+ <ChartTypePickerPopover
5338
+ t-if="this.state.popoverProps"
5339
+ popoverProps="this.state.popoverProps"
5340
+ onClose.bind="this.closePopover"
5341
+ onSelectSubType.bind="this.onSelectChartType"
5342
+ parentRef="this.addChartButton"
5343
+ supportedTypes="this.supportedChartTypes"
5344
+ />
5294
5345
  </t>
5295
5346
 
5296
5347
  <t t-name="o-spreadsheet-SelectionInput">
@@ -5663,11 +5714,9 @@
5663
5714
  class="o-menu-item-description ms-auto text-truncate"
5664
5715
  t-out="description"
5665
5716
  />
5666
- <t t-set="secondaryIcon" t-value="menuItem.secondaryIcon(this.env)"/>
5667
5717
  <div
5668
- t-if="isMenuRoot || secondaryIcon"
5718
+ t-if="isMenuRoot"
5669
5719
  class="o-menu-item-root ms-auto align-items-center d-flex gap-1">
5670
- <t t-if="secondaryIcon" t-call="{{secondaryIcon}}"/>
5671
5720
  <t t-if="isMenuRoot" t-call="o-spreadsheet-Icon.CARET_RIGHT"/>
5672
5721
  </div>
5673
5722
  </div>
@@ -6798,11 +6847,6 @@
6798
6847
  />
6799
6848
  </svg>
6800
6849
  </t>
6801
- <t t-name="o-spreadsheet-Icon.UNUSED_PIVOT_WARNING">
6802
- <div class="o-unused-pivot-icon text-warning" title="This pivot is not used">
6803
- <t t-call="o-spreadsheet-Icon.TRIANGLE_EXCLAMATION"/>
6804
- </div>
6805
- </t>
6806
6850
  <t t-name="o-spreadsheet-Icon.ANGLE_DOWN">
6807
6851
  <div class="o-icon">
6808
6852
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 224 256">
@@ -34,10 +34,6 @@ export interface ActionSpec {
34
34
  */
35
35
  icon?: string | ((env: SpreadsheetChildEnv) => string);
36
36
  iconColor?: Color;
37
- /**
38
- * Can be defined to display another icon on the right of the item.
39
- */
40
- secondaryIcon?: string | ((env: SpreadsheetChildEnv) => string);
41
37
  /**
42
38
  * is the action allowed when running spreadsheet in readonly mode
43
39
  */
@@ -77,7 +73,6 @@ export interface Action {
77
73
  isActive?: (env: SpreadsheetChildEnv) => boolean;
78
74
  icon: (env: SpreadsheetChildEnv) => string;
79
75
  iconColor?: Color;
80
- secondaryIcon: (env: SpreadsheetChildEnv) => string;
81
76
  isReadonlyAllowed: boolean;
82
77
  isEnabledOnLockedSheet: boolean;
83
78
  execute?: (env: SpreadsheetChildEnv, isMiddleClick?: boolean) => unknown;
@@ -87,11 +82,10 @@ export interface Action {
87
82
  onStartHover?: (env: SpreadsheetChildEnv) => void;
88
83
  onStopHover?: (env: SpreadsheetChildEnv) => void;
89
84
  }
90
- export interface ComputedAction extends Omit<Action, "name" | "description" | "icon" | "secondaryIcon" | "children"> {
85
+ export interface ComputedAction extends Omit<Action, "name" | "description" | "icon" | "children"> {
91
86
  name: string;
92
87
  description: string;
93
88
  icon: string;
94
- secondaryIcon: string;
95
89
  }
96
90
  export type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
97
91
  type ActionChildren = (ActionSpec | ActionBuilder)[];
@@ -4,6 +4,7 @@ export declare const sortAscending: ActionSpec;
4
4
  export declare const dataCleanup: ActionSpec;
5
5
  export declare const removeDuplicates: ActionSpec;
6
6
  export declare const trimWhitespace: ActionSpec;
7
+ export declare const cleanupDataSources: ActionSpec;
7
8
  export declare const sortDescending: ActionSpec;
8
9
  export declare const createRemoveFilter: ActionSpec;
9
10
  export declare const createRemoveFilterTool: ActionSpec;
@@ -1,6 +1,7 @@
1
1
  import { Format } from "../types/format";
2
2
  import { Dimension, Style } from "../types/misc";
3
3
  import { SpreadsheetChildEnv } from "../types/spreadsheet_env";
4
+ import { Table } from "../types/table";
4
5
  import { ActionSpec } from "./action";
5
6
  export declare function setFormatter(env: SpreadsheetChildEnv, format: Format): void;
6
7
  export declare function setStyle(env: SpreadsheetChildEnv, style: Style): void;
@@ -49,6 +50,7 @@ export declare const INSERT_LINK_NAME: (env: SpreadsheetChildEnv) => string;
49
50
  export declare const SELECTED_TABLE_HAS_FILTERS: (env: SpreadsheetChildEnv) => boolean;
50
51
  export declare const SELECTION_CONTAINS_SINGLE_TABLE: (env: SpreadsheetChildEnv) => boolean;
51
52
  export declare const IS_SELECTION_CONTINUOUS: (env: SpreadsheetChildEnv) => boolean;
53
+ export declare const FIRST_TABLE_IN_SELECTION: (env: SpreadsheetChildEnv) => Table | undefined;
52
54
  export declare const ADD_DATA_FILTER: (env: SpreadsheetChildEnv) => void;
53
55
  export declare const REMOVE_DATA_FILTER: (env: SpreadsheetChildEnv) => void;
54
56
  export declare const INSERT_TABLE: (env: SpreadsheetChildEnv) => void;
@@ -44,3 +44,5 @@ export declare function isMiddleClickOrCtrlClick(ev: MouseEvent): boolean;
44
44
  export declare function downloadFile(dataUrl: string, fileName: string): void;
45
45
  export declare function isIOS(): boolean;
46
46
  export declare function isMobileOS(): boolean;
47
+ /** Check if there is an interactive element (input, select, button, ...) between the event.target and event.currentTarget (inclusive)*/
48
+ export declare function hasInteractiveElementInEventTree(event: Event): boolean;
@@ -3,11 +3,17 @@ import { Component } from "../../../owl3_compatibility_layer";
3
3
  import { TitleDesign } from "../../../types/chart/chart";
4
4
  import { CarouselItem } from "../../../types/figure";
5
5
  import { UID } from "../../../types/misc";
6
+ import { PropsOf } from "../../../types/props_of";
6
7
  import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
8
+ import { Popover } from "../../popover/popover";
7
9
  import { TextInput } from "../../text_input/text_input";
8
10
  import { TextStyler } from "../chart/building_blocks/text_styler/text_styler";
11
+ import { ChartTypePickerPopover } from "../chart/chart_type_picker_popover/chart_type_picker_popover";
9
12
  import { CogWheelMenu } from "../components/cog_wheel_menu/cog_wheel_menu";
10
13
  import { Section } from "../components/section/section";
14
+ interface CarouselPanelState {
15
+ popoverProps: PropsOf<Popover> | undefined;
16
+ }
11
17
  export declare class CarouselPanel extends Component<SpreadsheetChildEnv> {
12
18
  static template: string;
13
19
  static components: {
@@ -15,6 +21,7 @@ export declare class CarouselPanel extends Component<SpreadsheetChildEnv> {
15
21
  TextInput: typeof TextInput;
16
22
  TextStyler: typeof TextStyler;
17
23
  CogWheelMenu: typeof CogWheelMenu;
24
+ ChartTypePickerPopover: typeof ChartTypePickerPopover;
18
25
  };
19
26
  protected props: import("@odoo/owl").Props<{
20
27
  onCloseSidePanel: () => void;
@@ -26,13 +33,18 @@ export declare class CarouselPanel extends Component<SpreadsheetChildEnv> {
26
33
  };
27
34
  private dragAndDrop;
28
35
  private previewListRef;
36
+ addChartButton: import("@odoo/owl").Signal<HTMLElement | null>;
37
+ state: CarouselPanelState;
29
38
  setup(): void;
30
39
  get carouselItems(): CarouselItem[];
31
40
  get title(): TitleDesign | undefined;
32
41
  get carousel(): import("../../..").Carousel;
33
42
  getPreviewDivStyle(item: CarouselItem): string;
34
43
  getItemId(item: CarouselItem): string;
35
- addNewChartToCarousel(): void;
44
+ addNewChartToCarousel(ev: MouseEvent): void;
45
+ get supportedChartTypes(): Set<"line" | "calendar" | "bar" | "scatter" | "bubble" | "pie" | "radar" | "treemap" | "funnel" | "geo" | "scorecard" | "gauge" | "combo" | "waterfall" | "pyramid" | "sunburst">;
46
+ closePopover(): void;
47
+ onSelectChartType(type: string): void;
36
48
  get hasDataView(): boolean;
37
49
  isCarouselItemActive(item: CarouselItem): boolean;
38
50
  addDataViewToCarousel(): void;
@@ -54,3 +66,4 @@ export declare class CarouselPanel extends Component<SpreadsheetChildEnv> {
54
66
  get carouselSheetId(): UID;
55
67
  get carouselDataViewMessage(): string;
56
68
  }
69
+ export {};
@@ -6,41 +6,28 @@ import { PropsOf } from "../../../../types/props_of";
6
6
  import { SpreadsheetChildEnv } from "../../../../types/spreadsheet_env";
7
7
  import { Popover } from "../../../popover/popover";
8
8
  import { Section } from "../../components/section/section";
9
+ import { ChartTypePickerPopover } from "../chart_type_picker_popover/chart_type_picker_popover";
9
10
  import { MainChartPanelStore } from "../main_chart_panel/main_chart_panel_store";
10
11
  interface ChartTypePickerState {
11
12
  popoverProps: PropsOf<Popover> | undefined;
12
- popoverStyle: string;
13
13
  }
14
14
  export declare class ChartTypePicker extends Component<SpreadsheetChildEnv> {
15
15
  static template: string;
16
16
  static components: {
17
17
  Section: typeof Section;
18
- Popover: typeof Popover;
18
+ ChartTypePickerPopover: typeof ChartTypePickerPopover;
19
19
  };
20
20
  protected props: import("@odoo/owl").Props<{
21
21
  chartId: UID;
22
22
  chartPanelStore: import("../../../../types/store_engine").Store<MainChartPanelStore>;
23
23
  }>;
24
- categories: {
25
- line: string;
26
- column: string;
27
- bar: string;
28
- area: string;
29
- pie: string;
30
- hierarchical: string;
31
- misc: string;
32
- };
33
- chartTypeByCategories: Record<string, ChartSubtypeProperties[]>;
34
- popoverRef: import("@odoo/owl").Signal<HTMLElement | null>;
35
24
  selectRef: import("@odoo/owl").Signal<HTMLElement | null>;
36
25
  state: ChartTypePickerState;
37
- setup(): void;
38
- private getSupportedChartTypes;
39
- onExternalClick(ev: MouseEvent): void;
26
+ getSupportedChartTypes(): Set<ChartType>;
40
27
  onTypeChange(type: ChartType): void;
41
28
  private getChartDefinition;
42
29
  getSelectedChartSubtypeProperties(): ChartSubtypeProperties;
43
30
  onPointerDown(ev: PointerEvent): void;
44
- private closePopover;
31
+ closePopover(): void;
45
32
  }
46
33
  export {};
@@ -0,0 +1,64 @@
1
+ import { Component } from "../../../../owl3_compatibility_layer";
2
+ import { ChartType } from "../../../../types/chart/chart";
3
+ import { ChartSubtypeProperties } from "../../../../types/chart_subtype_properties";
4
+ import { SpreadsheetChildEnv } from "../../../../types/spreadsheet_env";
5
+ import { Popover } from "../../../popover/popover";
6
+ export declare class ChartTypePickerPopover extends Component<SpreadsheetChildEnv> {
7
+ static template: string;
8
+ static components: {
9
+ Popover: typeof Popover;
10
+ };
11
+ protected props: import("@odoo/owl").Props<{
12
+ onClose: () => void;
13
+ onSelectSubType: (type: string) => void;
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">;
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;
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>;
28
+ isSubsetOf: (other: ReadonlySetLike<unknown>) => boolean;
29
+ isSupersetOf: (other: ReadonlySetLike<unknown>) => boolean;
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">;
32
+ readonly [Symbol.toStringTag]: string;
33
+ };
34
+ popoverProps: {
35
+ maxHeight?: import("../../../..").Pixel | undefined;
36
+ maxWidth?: import("../../../..").Pixel | undefined;
37
+ zIndex?: number | undefined;
38
+ class?: string | undefined;
39
+ anchorRect: import("../../../..").Rect;
40
+ containerRect?: {} | undefined;
41
+ positioning?: "top-right" | "bottom-left" | undefined;
42
+ verticalOffset?: number | undefined;
43
+ onMouseWheel?: (() => void) | undefined;
44
+ onPopoverHidden?: (() => void) | undefined;
45
+ onPopoverMoved?: (() => void) | undefined;
46
+ };
47
+ parentRef?: import("@odoo/owl").ReactiveValue<HTMLElement | null, HTMLElement | null> | undefined;
48
+ selectedChartSubType?: string | undefined;
49
+ }>;
50
+ categories: {
51
+ line: string;
52
+ column: string;
53
+ bar: string;
54
+ area: string;
55
+ pie: string;
56
+ hierarchical: string;
57
+ misc: string;
58
+ };
59
+ chartTypeByCategories: Record<string, ChartSubtypeProperties[]>;
60
+ popoverRef: import("@odoo/owl").Signal<HTMLElement | null>;
61
+ setup(): void;
62
+ onExternalClick(ev: MouseEvent): void;
63
+ onTypeChange(type: ChartType): void;
64
+ }
@@ -0,0 +1,28 @@
1
+ import { Component } from "../../../owl3_compatibility_layer";
2
+ import { UID } from "../../../types/misc";
3
+ import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
4
+ import { Store } from "../../../types/store_engine";
5
+ import { Checkbox } from "../components/checkbox/checkbox";
6
+ import { Section } from "../components/section/section";
7
+ import { DataSourcesCleanupStore } from "./data_sources_cleanup_store";
8
+ interface State {
9
+ uncheckedDataSources: Record<UID, boolean>;
10
+ }
11
+ export declare class DataSourcesCleanup extends Component<SpreadsheetChildEnv> {
12
+ static template: string;
13
+ static components: {
14
+ Section: typeof Section;
15
+ Checkbox: typeof Checkbox;
16
+ };
17
+ state: State;
18
+ store: Store<DataSourcesCleanupStore>;
19
+ setup(): void;
20
+ onToggleDataSource(type: string, id: UID, checked: boolean): void;
21
+ isDataSourceChecked(type: string, id: UID): boolean;
22
+ get dataSourcesToDelete(): {
23
+ type: string;
24
+ id: UID;
25
+ }[];
26
+ onRemoveUnusedDataSources(): void;
27
+ }
28
+ export {};
@@ -0,0 +1,13 @@
1
+ import { UnusedDataSource } from "../../../registries/data_source_registry";
2
+ import { SpreadsheetStore } from "../../../stores/spreadsheet_store";
3
+ import { Command } from "../../../types/commands";
4
+ interface UnusedDataSourceCategory {
5
+ type: string;
6
+ label: string;
7
+ dataSources: UnusedDataSource[];
8
+ }
9
+ export declare class DataSourcesCleanupStore extends SpreadsheetStore {
10
+ protected handle(cmd: Command): void;
11
+ get unusedDataSourcesCategories(): UnusedDataSourceCategory[];
12
+ }
13
+ export {};
@@ -39,9 +39,7 @@ export declare class PivotLayoutConfigurator extends Component<SpreadsheetChildE
39
39
  private dimensionsRef;
40
40
  private dragAndDrop;
41
41
  AGGREGATORS: {};
42
- private composerFocus;
43
42
  isDateOrDatetimeField: typeof isDateOrDatetimeField;
44
- setup(): void;
45
43
  startDragAndDrop(dimension: PivotDimensionType, event: MouseEvent): void;
46
44
  getGranularitiesFor(field: PivotField): string[];
47
45
  startDragAndDropMeasures(measure: PivotMeasure, event: MouseEvent): void;
@@ -1,17 +1,12 @@
1
- import { NEWLINE } from "../../../constants";
2
1
  import { Component } from "../../../owl3_compatibility_layer";
3
2
  import { ValueAndLabel } from "../../../types/misc";
4
3
  import { SpreadsheetChildEnv } from "../../../types/spreadsheet_env";
4
+ import { Store } from "../../../types/store_engine";
5
5
  import { Select } from "../../select/select";
6
6
  import { ValidationMessages } from "../../validation_messages/validation_messages";
7
7
  import { Checkbox } from "../components/checkbox/checkbox";
8
8
  import { Section } from "../components/section/section";
9
- type SeparatorValue = "auto" | "custom" | " " | "," | ";" | typeof NEWLINE;
10
- interface State {
11
- separatorValue: SeparatorValue;
12
- customSeparator: string;
13
- addNewColumns: boolean;
14
- }
9
+ import { SplitToColumnsSeparatorValue, SplitToColumnsStore } from "./split_to_columns_store";
15
10
  export declare class SplitIntoColumnsPanel extends Component<SpreadsheetChildEnv> {
16
11
  static template: string;
17
12
  static components: {
@@ -23,16 +18,14 @@ export declare class SplitIntoColumnsPanel extends Component<SpreadsheetChildEnv
23
18
  protected props: import("@odoo/owl").Props<{
24
19
  onCloseSidePanel: () => void;
25
20
  }>;
26
- state: State;
21
+ store: Store<SplitToColumnsStore>;
27
22
  setup(): void;
28
- onSeparatorChange(value: SeparatorValue): void;
23
+ onSeparatorChange(value: SplitToColumnsSeparatorValue): void;
29
24
  updateCustomSeparator(ev: InputEvent): void;
30
25
  updateAddNewColumnsCheckbox(addNewColumns: boolean): void;
31
26
  confirm(): void;
32
27
  get errorMessages(): string[];
33
28
  get warningMessages(): string[];
34
- get separatorValue(): string;
35
29
  get separators(): ValueAndLabel[];
36
30
  get isConfirmDisabled(): boolean;
37
31
  }
38
- export {};
@@ -0,0 +1,33 @@
1
+ import { NEWLINE } from "../../../constants";
2
+ import { SpreadsheetStore } from "../../../stores/spreadsheet_store";
3
+ import { Command, DispatchResult } from "../../../types/commands";
4
+ export type SplitToColumnsSeparatorValue = "auto" | "custom" | " " | "," | ";" | typeof NEWLINE;
5
+ export declare class SplitToColumnsStore extends SpreadsheetStore {
6
+ mutators: readonly ["setSeparatorValue", "setCustomSeparator", "setShouldAddNewColumns"];
7
+ storeGetters: readonly ["canSplitIntoColumns"];
8
+ separatorValue: SplitToColumnsSeparatorValue;
9
+ customSeparator: string;
10
+ addNewColumns: boolean;
11
+ setSeparatorValue(separatorValue: SplitToColumnsSeparatorValue): void;
12
+ setCustomSeparator(customSeparator: string): void;
13
+ setShouldAddNewColumns(addNewColumns: boolean): void;
14
+ canSplitIntoColumns(args: {
15
+ force: boolean;
16
+ }): DispatchResult;
17
+ handle(cmd: Command): void;
18
+ get automaticSeparatorOfSelection(): string;
19
+ private getAutoSeparatorForString;
20
+ private splitIntoColumns;
21
+ private getSplittedCols;
22
+ private splitAndRemoveTrailingEmpty;
23
+ private willSplittedColsOverwriteContent;
24
+ private removeMergesInSplitZone;
25
+ private addColsToAvoidCollisions;
26
+ private getColsToAddToAvoidCollision;
27
+ private addColumnsToNotOverflowSheet;
28
+ private checkSingleColSelected;
29
+ private checkNonEmptySelector;
30
+ private checkNotOverwritingContent;
31
+ private checkSeparatorInSelection;
32
+ get separatorString(): string;
33
+ }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  export interface FunctionCode {
5
5
  readonly returnExpression: JsString;
6
+ readonly returnsMatrix: boolean;
6
7
  /**
7
8
  * Return the same function code but with the return expression assigned to a variable.
8
9
  */
@@ -26,7 +27,7 @@ export declare class FunctionCodeBuilder {
26
27
  private code;
27
28
  constructor(scope?: Scope);
28
29
  append(...lines: (JsString | FunctionCode)[]): void;
29
- return(expression: JsString): FunctionCode;
30
+ return(expression: JsString, returnsMatrix?: boolean): FunctionCode;
30
31
  toString(): string;
31
32
  }
32
33
  export declare class Scope {