@odoo/o-spreadsheet 18.1.0-alpha.2 → 18.1.0-alpha.3

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.
@@ -1,5 +1,5 @@
1
1
  import * as chart_js from 'chart.js';
2
- import { ChartConfiguration, Chart, ChartDataset } from 'chart.js';
2
+ import { ChartConfiguration, Chart, ChartDataset, LegendItem } from 'chart.js';
3
3
  import * as _odoo_owl from '@odoo/owl';
4
4
  import { ComponentConstructor, Component } from '@odoo/owl';
5
5
  import * as chart_js_dist_types_basic from 'chart.js/dist/types/basic';
@@ -3034,6 +3034,7 @@ declare class ConditionalFormatPlugin extends CorePlugin<ConditionalFormatState>
3034
3034
  private checkValidPriorityChange;
3035
3035
  private checkEmptyRange;
3036
3036
  private checkCFRule;
3037
+ private checkCFHasChanged;
3037
3038
  private checkOperatorArgsNumber;
3038
3039
  private checkNaN;
3039
3040
  private checkFormulaCompilation;
@@ -6514,7 +6515,7 @@ interface ChartSubtypeProperties {
6514
6515
  preview: string;
6515
6516
  }
6516
6517
 
6517
- interface Props$17 {
6518
+ interface Props$18 {
6518
6519
  label?: string;
6519
6520
  value: boolean;
6520
6521
  className?: string;
@@ -6523,7 +6524,7 @@ interface Props$17 {
6523
6524
  disabled?: boolean;
6524
6525
  onChange: (value: boolean) => void;
6525
6526
  }
6526
- declare class Checkbox extends Component<Props$17, SpreadsheetChildEnv> {
6527
+ declare class Checkbox extends Component<Props$18, SpreadsheetChildEnv> {
6527
6528
  static template: string;
6528
6529
  static props: {
6529
6530
  label: {
@@ -6558,10 +6559,10 @@ declare class Checkbox extends Component<Props$17, SpreadsheetChildEnv> {
6558
6559
  onChange(ev: InputEvent): void;
6559
6560
  }
6560
6561
 
6561
- interface Props$16 {
6562
+ interface Props$17 {
6562
6563
  class?: string;
6563
6564
  }
6564
- declare class Section extends Component<Props$16, SpreadsheetChildEnv> {
6565
+ declare class Section extends Component<Props$17, SpreadsheetChildEnv> {
6565
6566
  static template: string;
6566
6567
  static props: {
6567
6568
  class: {
@@ -6694,7 +6695,7 @@ declare class SelectionInputStore extends SpreadsheetStore {
6694
6695
  getIndex(rangeId: number | null): number | null;
6695
6696
  }
6696
6697
 
6697
- interface Props$15 {
6698
+ interface Props$16 {
6698
6699
  ranges: string[];
6699
6700
  hasSingleRange?: boolean;
6700
6701
  required?: boolean;
@@ -6717,7 +6718,7 @@ interface SelectionRange extends Omit<RangeInputValue, "color"> {
6717
6718
  * onSelectionChanged is called every time the input value
6718
6719
  * changes.
6719
6720
  */
6720
- declare class SelectionInput extends Component<Props$15, SpreadsheetChildEnv> {
6721
+ declare class SelectionInput extends Component<Props$16, SpreadsheetChildEnv> {
6721
6722
  static template: string;
6722
6723
  static props: {
6723
6724
  ranges: ArrayConstructor;
@@ -6772,13 +6773,13 @@ declare class SelectionInput extends Component<Props$15, SpreadsheetChildEnv> {
6772
6773
  confirm(): void;
6773
6774
  }
6774
6775
 
6775
- interface Props$14 {
6776
+ interface Props$15 {
6776
6777
  ranges: CustomizedDataSet[];
6777
6778
  hasSingleRange?: boolean;
6778
6779
  onSelectionChanged: (ranges: string[]) => void;
6779
6780
  onSelectionConfirmed: () => void;
6780
6781
  }
6781
- declare class ChartDataSeries extends Component<Props$14, SpreadsheetChildEnv> {
6782
+ declare class ChartDataSeries extends Component<Props$15, SpreadsheetChildEnv> {
6782
6783
  static template: string;
6783
6784
  static components: {
6784
6785
  SelectionInput: typeof SelectionInput;
@@ -6798,12 +6799,12 @@ declare class ChartDataSeries extends Component<Props$14, SpreadsheetChildEnv> {
6798
6799
  get title(): string;
6799
6800
  }
6800
6801
 
6801
- interface Props$13 {
6802
+ interface Props$14 {
6802
6803
  messages: string[];
6803
6804
  msgType: "warning" | "error" | "info";
6804
6805
  singleBox?: boolean;
6805
6806
  }
6806
- declare class ValidationMessages extends Component<Props$13, SpreadsheetChildEnv> {
6807
+ declare class ValidationMessages extends Component<Props$14, SpreadsheetChildEnv> {
6807
6808
  static template: string;
6808
6809
  static props: {
6809
6810
  messages: ArrayConstructor;
@@ -6817,10 +6818,10 @@ declare class ValidationMessages extends Component<Props$13, SpreadsheetChildEnv
6817
6818
  get alertBoxes(): string[][];
6818
6819
  }
6819
6820
 
6820
- interface Props$12 {
6821
+ interface Props$13 {
6821
6822
  messages: string[];
6822
6823
  }
6823
- declare class ChartErrorSection extends Component<Props$12, SpreadsheetChildEnv> {
6824
+ declare class ChartErrorSection extends Component<Props$13, SpreadsheetChildEnv> {
6824
6825
  static template: string;
6825
6826
  static components: {
6826
6827
  Section: typeof Section;
@@ -6834,7 +6835,7 @@ declare class ChartErrorSection extends Component<Props$12, SpreadsheetChildEnv>
6834
6835
  };
6835
6836
  }
6836
6837
 
6837
- interface Props$11 {
6838
+ interface Props$12 {
6838
6839
  title?: string;
6839
6840
  range: string;
6840
6841
  isInvalid: boolean;
@@ -6847,7 +6848,7 @@ interface Props$11 {
6847
6848
  onChange: (value: boolean) => void;
6848
6849
  }>;
6849
6850
  }
6850
- declare class ChartLabelRange extends Component<Props$11, SpreadsheetChildEnv> {
6851
+ declare class ChartLabelRange extends Component<Props$12, SpreadsheetChildEnv> {
6851
6852
  static template: string;
6852
6853
  static components: {
6853
6854
  SelectionInput: typeof SelectionInput;
@@ -6868,16 +6869,16 @@ declare class ChartLabelRange extends Component<Props$11, SpreadsheetChildEnv> {
6868
6869
  optional: boolean;
6869
6870
  };
6870
6871
  };
6871
- static defaultProps: Partial<Props$11>;
6872
+ static defaultProps: Partial<Props$12>;
6872
6873
  }
6873
6874
 
6874
- interface Props$10 {
6875
+ interface Props$11 {
6875
6876
  figureId: UID;
6876
6877
  definition: ChartWithDataSetDefinition;
6877
6878
  canUpdateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
6878
6879
  updateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
6879
6880
  }
6880
- declare class GenericChartConfigPanel extends Component<Props$10, SpreadsheetChildEnv> {
6881
+ declare class GenericChartConfigPanel extends Component<Props$11, SpreadsheetChildEnv> {
6881
6882
  static template: string;
6882
6883
  static components: {
6883
6884
  ChartDataSeries: typeof ChartDataSeries;
@@ -6901,6 +6902,7 @@ declare class GenericChartConfigPanel extends Component<Props$10, SpreadsheetChi
6901
6902
  StackedBarChart: string;
6902
6903
  StackedLineChart: string;
6903
6904
  StackedAreaChart: string;
6905
+ StackedColumnChart: string;
6904
6906
  CumulativeData: string;
6905
6907
  TreatLabelsAsText: string;
6906
6908
  AggregatedChart: string;
@@ -6915,7 +6917,10 @@ declare class GenericChartConfigPanel extends Component<Props$10, SpreadsheetChi
6915
6917
  GaugeRangeMinNaN: string;
6916
6918
  EmptyGaugeRangeMax: string;
6917
6919
  GaugeRangeMaxNaN: string;
6918
- GaugeRangeMinBiggerThanRangeMax: string;
6920
+ GaugeRangeMinBiggerThanRangeMax: string; /**
6921
+ * Change the local labelRange. The model should be updated when the
6922
+ * button "confirm" is clicked
6923
+ */
6919
6924
  GaugeLowerInflectionPointNaN: string;
6920
6925
  GaugeUpperInflectionPointNaN: string;
6921
6926
  };
@@ -6952,6 +6957,7 @@ declare class GenericChartConfigPanel extends Component<Props$10, SpreadsheetChi
6952
6957
 
6953
6958
  declare class BarConfigPanel extends GenericChartConfigPanel {
6954
6959
  static template: string;
6960
+ get stackedLabel(): string;
6955
6961
  onUpdateStacked(stacked: boolean): void;
6956
6962
  }
6957
6963
 
@@ -6979,12 +6985,12 @@ interface Choice$1 {
6979
6985
  value: string;
6980
6986
  label: string;
6981
6987
  }
6982
- interface Props$$ {
6988
+ interface Props$10 {
6983
6989
  choices: Choice$1[];
6984
6990
  onChange: (value: string) => void;
6985
6991
  selectedValue: string;
6986
6992
  }
6987
- declare class BadgeSelection extends Component<Props$$, SpreadsheetChildEnv> {
6993
+ declare class BadgeSelection extends Component<Props$10, SpreadsheetChildEnv> {
6988
6994
  static template: string;
6989
6995
  static props: {
6990
6996
  choices: ArrayConstructor;
@@ -7136,7 +7142,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
7136
7142
  isSameColor(color1: Color, color2: Color): boolean;
7137
7143
  }
7138
7144
 
7139
- interface Props$_ {
7145
+ interface Props$$ {
7140
7146
  currentColor: string | undefined;
7141
7147
  toggleColorPicker: () => void;
7142
7148
  showColorPicker: boolean;
@@ -7147,7 +7153,7 @@ interface Props$_ {
7147
7153
  dropdownMaxHeight?: Pixel;
7148
7154
  class?: string;
7149
7155
  }
7150
- declare class ColorPickerWidget extends Component<Props$_, SpreadsheetChildEnv> {
7156
+ declare class ColorPickerWidget extends Component<Props$$, SpreadsheetChildEnv> {
7151
7157
  static template: string;
7152
7158
  static props: {
7153
7159
  currentColor: {
@@ -7185,7 +7191,7 @@ declare class ColorPickerWidget extends Component<Props$_, SpreadsheetChildEnv>
7185
7191
  get colorPickerAnchorRect(): Rect;
7186
7192
  }
7187
7193
 
7188
- interface Props$Z {
7194
+ interface Props$_ {
7189
7195
  title?: string;
7190
7196
  updateTitle: (title: string) => void;
7191
7197
  name?: string;
@@ -7195,7 +7201,7 @@ interface Props$Z {
7195
7201
  updateColor?: (Color: any) => void;
7196
7202
  style: TitleDesign;
7197
7203
  }
7198
- declare class ChartTitle extends Component<Props$Z, SpreadsheetChildEnv> {
7204
+ declare class ChartTitle extends Component<Props$_, SpreadsheetChildEnv> {
7199
7205
  static template: string;
7200
7206
  static components: {
7201
7207
  Section: typeof Section;
@@ -7258,13 +7264,13 @@ interface AxisDefinition {
7258
7264
  id: string;
7259
7265
  name: string;
7260
7266
  }
7261
- interface Props$Y {
7267
+ interface Props$Z {
7262
7268
  figureId: UID;
7263
7269
  definition: ChartWithDataSetDefinition | WaterfallChartDefinition;
7264
7270
  updateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition | WaterfallChartDefinition>) => DispatchResult;
7265
7271
  axesList: AxisDefinition[];
7266
7272
  }
7267
- declare class AxisDesignEditor extends Component<Props$Y, SpreadsheetChildEnv> {
7273
+ declare class AxisDesignEditor extends Component<Props$Z, SpreadsheetChildEnv> {
7268
7274
  static template: string;
7269
7275
  static components: {
7270
7276
  Section: typeof Section;
@@ -7294,12 +7300,12 @@ declare class AxisDesignEditor extends Component<Props$Y, SpreadsheetChildEnv> {
7294
7300
  updateAxisTitle(text: string): void;
7295
7301
  }
7296
7302
 
7297
- interface Props$X {
7303
+ interface Props$Y {
7298
7304
  currentColor?: string;
7299
7305
  onColorPicked: (color: string) => void;
7300
7306
  title?: string;
7301
7307
  }
7302
- declare class RoundColorPicker extends Component<Props$X, SpreadsheetChildEnv> {
7308
+ declare class RoundColorPicker extends Component<Props$Y, SpreadsheetChildEnv> {
7303
7309
  static template: string;
7304
7310
  static components: {
7305
7311
  Section: typeof Section;
@@ -7328,12 +7334,12 @@ declare class RoundColorPicker extends Component<Props$X, SpreadsheetChildEnv> {
7328
7334
  get buttonStyle(): string;
7329
7335
  }
7330
7336
 
7331
- interface Props$W {
7337
+ interface Props$X {
7332
7338
  figureId: UID;
7333
7339
  definition: ChartDefinition;
7334
7340
  updateChart: (figureId: UID, definition: Partial<ChartDefinition>) => DispatchResult;
7335
7341
  }
7336
- declare class GeneralDesignEditor extends Component<Props$W, SpreadsheetChildEnv> {
7342
+ declare class GeneralDesignEditor extends Component<Props$X, SpreadsheetChildEnv> {
7337
7343
  static template: string;
7338
7344
  static components: {
7339
7345
  RoundColorPicker: typeof RoundColorPicker;
@@ -7363,6 +7369,24 @@ declare class GeneralDesignEditor extends Component<Props$W, SpreadsheetChildEnv
7363
7369
  updateChartTitleAlignment(align: "left" | "center" | "right"): void;
7364
7370
  }
7365
7371
 
7372
+ interface Props$W {
7373
+ figureId: UID;
7374
+ definition: ChartWithDataSetDefinition;
7375
+ updateChart: (figureId: UID, definition: Partial<ChartWithDataSetDefinition>) => DispatchResult;
7376
+ }
7377
+ declare class ChartLegend extends Component<Props$W, SpreadsheetChildEnv> {
7378
+ static template: string;
7379
+ static components: {
7380
+ Section: typeof Section;
7381
+ };
7382
+ static props: {
7383
+ figureId: StringConstructor;
7384
+ definition: ObjectConstructor;
7385
+ updateChart: FunctionConstructor;
7386
+ };
7387
+ updateLegendPosition(ev: any): void;
7388
+ }
7389
+
7366
7390
  interface Choice {
7367
7391
  value: unknown;
7368
7392
  label: string;
@@ -7463,7 +7487,9 @@ declare class SeriesWithAxisDesignEditor extends Component<Props$T, SpreadsheetC
7463
7487
  getTrendLineConfiguration(index: number): TrendConfiguration | undefined;
7464
7488
  getTrendType(config: TrendConfiguration): "linear" | "" | TrendType | undefined;
7465
7489
  onChangeTrendType(index: any, ev: InputEvent): void;
7490
+ getPolynomialDegrees(index: number): number[];
7466
7491
  onChangePolynomialDegree(index: number, ev: InputEvent): void;
7492
+ getMaxPolynomialDegree(index: any): number;
7467
7493
  get defaultWindowSize(): number;
7468
7494
  onChangeMovingAverageWindow(index: number, ev: InputEvent): void;
7469
7495
  getDataSerieColor(index: number): "" | Color;
@@ -7487,6 +7513,7 @@ declare class ChartWithAxisDesignPanel<P extends Props$S = Props$S> extends Comp
7487
7513
  AxisDesignEditor: typeof AxisDesignEditor;
7488
7514
  Checkbox: typeof Checkbox;
7489
7515
  SeriesWithAxisDesignEditor: typeof SeriesWithAxisDesignEditor;
7516
+ ChartLegend: typeof ChartLegend;
7490
7517
  };
7491
7518
  static props: {
7492
7519
  figureId: StringConstructor;
@@ -7495,7 +7522,6 @@ declare class ChartWithAxisDesignPanel<P extends Props$S = Props$S> extends Comp
7495
7522
  updateChart: FunctionConstructor;
7496
7523
  };
7497
7524
  get axesList(): AxisDefinition[];
7498
- updateLegendPosition(ev: any): void;
7499
7525
  }
7500
7526
 
7501
7527
  interface Props$R {
@@ -7766,17 +7792,21 @@ interface FunctionContext {
7766
7792
  *
7767
7793
  * The information added are:
7768
7794
  * - start, end and length of each token
7769
- * - range detection (replaces the tokens that composes the range with 1 token)
7770
- * - parenthesis matching (only for parenthesis tokens)
7771
- * - parent function (only for tokens surrounded by a function)
7772
- * - arg position (only for tokens surrounded by a function)
7795
+ * - parenthesesCode (a code indicating the position of the token in the parentheses tree)
7796
+ * - functionContext (only for tokens surrounded by a function)
7797
+ * - color (the base color of the token, without fading modification)
7798
+ * - isBlurred (indicates whether the text should be highlighted or not, useful to know if the token matches the same formula as the cursor token)
7799
+ * - isParenthesisLinkedToCursor (Useful for highlighting tokens related to the current token, such as matching parentheses)
7773
7800
  */
7774
7801
  interface EnrichedToken extends Token {
7775
7802
  start: number;
7776
7803
  end: number;
7777
7804
  length: number;
7778
- parenIndex?: number;
7805
+ parenthesesCode?: string;
7779
7806
  functionContext?: FunctionContext;
7807
+ color?: Color;
7808
+ isBlurred?: boolean;
7809
+ isParenthesisLinkedToCursor?: boolean;
7780
7810
  }
7781
7811
 
7782
7812
  interface Props$N {
@@ -7887,6 +7917,17 @@ declare class FunctionDescriptionProvider extends Component<Props$M, Spreadsheet
7887
7917
  get formulaArgSeparator(): string;
7888
7918
  }
7889
7919
 
7920
+ declare const tokenColors: {
7921
+ readonly OPERATOR: "#3da4ab";
7922
+ readonly NUMBER: "#02c39a";
7923
+ readonly STRING: "#00a82d";
7924
+ readonly FUNCTION: Color;
7925
+ readonly DEBUGGER: "#3da4ab";
7926
+ readonly LEFT_PAREN: Color;
7927
+ readonly RIGHT_PAREN: Color;
7928
+ readonly ARG_SEPARATOR: Color;
7929
+ readonly ORPHAN_RIGHT_PAREN: "#ff0000";
7930
+ };
7890
7931
  interface ComposerSelection {
7891
7932
  start: number;
7892
7933
  end: number;
@@ -7978,6 +8019,19 @@ declare abstract class AbstractComposerStore extends SpreadsheetStore {
7978
8019
  * The cursor is then set at the end of the text.
7979
8020
  */
7980
8021
  private insertText;
8022
+ private updateTokenColor;
8023
+ private getTokenColor;
8024
+ private rangeColor;
8025
+ /**
8026
+ * Compute for each token if it is part of the same
8027
+ * formula as the current selector token.
8028
+ * If no specific formula found for the current selected
8029
+ * token, it assumes all tokens are part of the formula
8030
+ * context.
8031
+ */
8032
+ private computeFormulaCursorContext;
8033
+ private getParenthesesCodeAfterCursor;
8034
+ private computeParenthesisRelatedToCursor;
7981
8035
  private updateRangeColor;
7982
8036
  /**
7983
8037
  * Highlight all ranges that can be found in the composer content.
@@ -8020,17 +8074,6 @@ type HtmlContent = {
8020
8074
  color?: Color;
8021
8075
  class?: string;
8022
8076
  };
8023
- declare const tokenColors: {
8024
- readonly OPERATOR: "#3da4ab";
8025
- readonly NUMBER: "#02c39a";
8026
- readonly STRING: "#00a82d";
8027
- readonly FUNCTION: "#4a4e4d";
8028
- readonly DEBUGGER: "#3da4ab";
8029
- readonly LEFT_PAREN: "#4a4e4d";
8030
- readonly RIGHT_PAREN: "#4a4e4d";
8031
- readonly ARG_SEPARATOR: "#4a4e4d";
8032
- readonly MATCHING_PAREN: "#000000";
8033
- };
8034
8077
  interface CellComposerProps {
8035
8078
  focus: ComposerFocusType;
8036
8079
  inputStyle?: string;
@@ -8157,14 +8200,13 @@ declare class Composer extends Component<CellComposerProps, SpreadsheetChildEnv>
8157
8200
  * Get the HTML content corresponding to the current composer token, divided by lines.
8158
8201
  */
8159
8202
  private getContentLines;
8160
- private getColoredTokens;
8203
+ private getHtmlContentFromTokens;
8161
8204
  /**
8162
8205
  * Split an array of HTMLContents into lines. Each NEWLINE character encountered will create a new
8163
8206
  * line. Contents can be split into multiple parts if they contain multiple NEWLINE characters.
8164
8207
  */
8165
8208
  private splitHtmlContentIntoLines;
8166
8209
  private isContentEmpty;
8167
- private rangeColor;
8168
8210
  /**
8169
8211
  * Compute the state of the composer from the tokenAtCursor.
8170
8212
  * If the token is a function or symbol (that isn't a cell/range reference) we have to initialize
@@ -9402,6 +9444,7 @@ declare class PieChartDesignPanel extends Component<Props$n, SpreadsheetChildEnv
9402
9444
  GeneralDesignEditor: typeof GeneralDesignEditor;
9403
9445
  Section: typeof Section;
9404
9446
  Checkbox: typeof Checkbox;
9447
+ ChartLegend: typeof ChartLegend;
9405
9448
  };
9406
9449
  static props: {
9407
9450
  figureId: StringConstructor;
@@ -9412,7 +9455,6 @@ declare class PieChartDesignPanel extends Component<Props$n, SpreadsheetChildEnv
9412
9455
  optional: boolean;
9413
9456
  };
9414
9457
  };
9415
- updateLegendPosition(ev: any): void;
9416
9458
  }
9417
9459
 
9418
9460
  interface Props$m {
@@ -9964,8 +10006,8 @@ declare function getTrendDatasetForBarChart(config: TrendConfiguration, dataset:
9964
10006
  hoverBorderColor?: string | ((ctx: chart_js.ScriptableContext<"bar">, options: chart_js_dist_types_basic.AnyObject) => chart_js.Color | undefined) | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | readonly (string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined)[] | undefined;
9965
10007
  hoverBackgroundColor?: string | ((ctx: chart_js.ScriptableContext<"bar">, options: chart_js_dist_types_basic.AnyObject) => chart_js.Color | undefined) | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | readonly (string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined)[] | undefined;
9966
10008
  animation?: false | chart_js_dist_types_utils._DeepPartialObject<chart_js.AnimationSpec<"bar"> & {
9967
- onProgress?: ((this: chart_js.Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
9968
- onComplete?: ((this: chart_js.Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10009
+ onProgress?: ((this: Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10010
+ onComplete?: ((this: Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
9969
10011
  }> | undefined;
9970
10012
  animations?: chart_js_dist_types_utils._DeepPartialObject<chart_js.AnimationsSpec<"bar">> | undefined;
9971
10013
  transitions?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TransitionsSpec<"bar">> | undefined;
@@ -10036,8 +10078,8 @@ declare function getTrendDatasetForBarChart(config: TrendConfiguration, dataset:
10036
10078
  hoverBorderColor?: string | ((ctx: chart_js.ScriptableContext<"line">, options: chart_js_dist_types_basic.AnyObject) => chart_js.Color | undefined) | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | readonly (string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined)[] | undefined;
10037
10079
  hoverBackgroundColor?: string | ((ctx: chart_js.ScriptableContext<"line">, options: chart_js_dist_types_basic.AnyObject) => chart_js.Color | undefined) | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | readonly (string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined)[] | undefined;
10038
10080
  animation?: false | chart_js_dist_types_utils._DeepPartialObject<chart_js.AnimationSpec<"line"> & {
10039
- onProgress?: ((this: chart_js.Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10040
- onComplete?: ((this: chart_js.Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10081
+ onProgress?: ((this: Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10082
+ onComplete?: ((this: Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10041
10083
  }> | undefined;
10042
10084
  animations?: chart_js_dist_types_utils._DeepPartialObject<chart_js.AnimationsSpec<"line">> | undefined;
10043
10085
  transitions?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TransitionsSpec<"line">> | undefined;
@@ -10108,8 +10150,8 @@ declare function getTrendDatasetForBarChart(config: TrendConfiguration, dataset:
10108
10150
  hoverBorderColor?: string | ((ctx: chart_js.ScriptableContext<"doughnut">, options: chart_js_dist_types_basic.AnyObject) => chart_js.Color | undefined) | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | readonly (string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined)[] | undefined;
10109
10151
  hoverBackgroundColor?: string | ((ctx: chart_js.ScriptableContext<"doughnut">, options: chart_js_dist_types_basic.AnyObject) => chart_js.Color | undefined) | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | readonly (string | chart_js_dist_types_utils._DeepPartialObject<CanvasGradient> | chart_js_dist_types_utils._DeepPartialObject<CanvasPattern> | undefined)[] | undefined;
10110
10152
  animation?: false | chart_js_dist_types_utils._DeepPartialObject<chart_js.AnimationSpec<"doughnut"> & {
10111
- onProgress?: ((this: chart_js.Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10112
- onComplete?: ((this: chart_js.Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10153
+ onProgress?: ((this: Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10154
+ onComplete?: ((this: Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10113
10155
  }> | undefined;
10114
10156
  animations?: chart_js_dist_types_utils._DeepPartialObject<chart_js.AnimationsSpec<"doughnut">> | undefined;
10115
10157
  transitions?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TransitionsSpec<"doughnut">> | undefined;
@@ -10217,13 +10259,20 @@ declare function getTrendDatasetForBarChart(config: TrendConfiguration, dataset:
10217
10259
  hoverBorderDashOffset?: number | ((ctx: chart_js.ScriptableContext<"radar">, options: chart_js_dist_types_basic.AnyObject) => number | undefined) | readonly (number | undefined)[] | undefined;
10218
10260
  hoverBorderJoinStyle?: "round" | "bevel" | "miter" | ((ctx: chart_js.ScriptableContext<"radar">, options: chart_js_dist_types_basic.AnyObject) => CanvasLineJoin | undefined) | readonly ("round" | "bevel" | "miter" | undefined)[] | undefined;
10219
10261
  animation?: false | chart_js_dist_types_utils._DeepPartialObject<chart_js.AnimationSpec<"radar"> & {
10220
- onProgress?: ((this: chart_js.Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10221
- onComplete?: ((this: chart_js.Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10262
+ onProgress?: ((this: Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10263
+ onComplete?: ((this: Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint | null)[], unknown>, event: chart_js.AnimationEvent) => void) | undefined;
10222
10264
  }> | undefined;
10223
10265
  animations?: chart_js_dist_types_utils._DeepPartialObject<chart_js.AnimationsSpec<"radar">> | undefined;
10224
10266
  transitions?: chart_js_dist_types_utils._DeepPartialObject<chart_js.TransitionsSpec<"radar">> | undefined;
10225
10267
  } | undefined;
10226
10268
  declare function formatTickValue(localeFormat: LocaleFormat): (value: any) => any;
10269
+ declare function getCustomLegendLabels(fontColor: Color, legendLabelConfig: Partial<LegendItem>): {
10270
+ labels: {
10271
+ color: Color;
10272
+ usePointStyle: boolean;
10273
+ generateLabels: (chart: Chart) => LegendItem[];
10274
+ };
10275
+ };
10227
10276
 
10228
10277
  interface GetDefaultChartJsRuntimeOptions {
10229
10278
  axisFormats?: ChartAxisFormats;
@@ -12360,6 +12409,7 @@ declare const helpers: {
12360
12409
  createEmptySheet: typeof createEmptySheet;
12361
12410
  createEmptyExcelSheet: typeof createEmptyExcelSheet;
12362
12411
  getDefaultChartJsRuntime: typeof getDefaultChartJsRuntime;
12412
+ getCustomLegendLabels: typeof getCustomLegendLabels;
12363
12413
  chartFontColor: typeof chartFontColor;
12364
12414
  getChartAxisTitleRuntime: typeof getChartAxisTitleRuntime;
12365
12415
  getChartAxisType: typeof getChartAxisType;
@@ -12448,6 +12498,7 @@ declare const components: {
12448
12498
  CogWheelMenu: typeof CogWheelMenu;
12449
12499
  TextInput: typeof TextInput;
12450
12500
  SidePanelCollapsible: typeof SidePanelCollapsible;
12501
+ RadioSelection: typeof RadioSelection;
12451
12502
  };
12452
12503
  declare const hooks: {
12453
12504
  useDragAndDropListItems: typeof useDragAndDropListItems;
@@ -12497,6 +12548,37 @@ declare const constants: {
12497
12548
  value: string;
12498
12549
  label: string;
12499
12550
  }[];
12551
+ INTERACTIVE_LEGEND_CONFIG: {
12552
+ onHover: (event: any) => void;
12553
+ onLeave: (event: any) => void;
12554
+ onClick: (event: any, legendItem: any, legend: any) => void;
12555
+ };
12556
+ ChartTerms: {
12557
+ Series: string;
12558
+ BackgroundColor: string;
12559
+ StackedBarChart: string;
12560
+ StackedLineChart: string;
12561
+ StackedAreaChart: string;
12562
+ StackedColumnChart: string;
12563
+ CumulativeData: string;
12564
+ TreatLabelsAsText: string;
12565
+ AggregatedChart: string;
12566
+ Errors: {
12567
+ Unexpected: string;
12568
+ InvalidDataSet: string;
12569
+ InvalidLabelRange: string;
12570
+ InvalidScorecardKeyValue: string;
12571
+ InvalidScorecardBaseline: string;
12572
+ InvalidGaugeDataRange: string;
12573
+ EmptyGaugeRangeMin: string;
12574
+ GaugeRangeMinNaN: string;
12575
+ EmptyGaugeRangeMax: string;
12576
+ GaugeRangeMaxNaN: string;
12577
+ GaugeRangeMinBiggerThanRangeMax: string;
12578
+ GaugeLowerInflectionPointNaN: string;
12579
+ GaugeUpperInflectionPointNaN: string;
12580
+ };
12581
+ };
12500
12582
  };
12501
12583
 
12502
12584
  export { AST, ASTFuncall, AboveAverageRule, AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, ActivateNextSheetCommand, ActivatePreviousSheetCommand, ActivateSheetCommand, AddColumnsRowsCommand, AddConditionalFormatCommand, AddDataValidationCommand, AddFunctionDescription, AddMergeCommand, AddPivotCommand, Aggregator, Alias, Align, AlphanumericIncrementModifier, AnchorZone, ApplyRangeChange, ApplyRangeChangeResult, Arg, ArgDefinition, ArgType, AutoFillCellCommand, AutofillAutoCommand, AutofillCellData, AutofillCommand, AutofillData, AutofillModifier, AutofillModifierImplementation, AutofillResult, AutofillSelectCommand, AutofillTableCommand, AutoresizeColumnsCommand, AutoresizeRowsCommand, AxesDesign, AxisDesign, AxisType, BeginsWithRule, BooleanCell, Border$1 as Border, BorderData, BorderDescr, BorderDescription, BorderPosition, BorderStyle, Box, BoxTextContent, CHART_TYPES, CSSProperties, CancelledReason, Cell, CellData, CellErrorType, CellIsRule, CellPosition, CellValue, CellValueType, ChangeType, ChartAxisFormats, ChartCreationContext, ChartDefinition, ChartJSRuntime, ChartRuntime, ChartType, ChartWithDataSetDefinition, CleanClipBoardHighlightCommand, ClearCellCommand, ClearCellsCommand, ClearFormattingCommand, Client, ClientId, ClientJoinedMessage, ClientLeftMessage, ClientMovedMessage, ClientPosition, ClipboardCell, ClipboardCellData, ClipboardContent, ClipboardData, ClipboardFigureData, ClipboardMIMEType, ClipboardOperation, ClipboardOptions, ClipboardPasteOptions, ClipboardPasteTarget, Cloneable, CollaborationMessage, CollaborativeEvent, CollaborativeEventReceived, CollaborativeEventTypes, Color, ColorScaleMidPointThreshold, ColorScaleRule, ColorScaleThreshold, ColorSheetCommand, Command, CommandDispatcher, CommandHandler, CommandResult, CommandTypes, CommonPivotCoreDefinition, CompiledFormula, ComposerFocusType, ComputeFunction, ComputedTableStyle, ConditionalFormat, ConditionalFormatInternal, ConditionalFormatRule, ConditionalFormatRuleInternal, ConditionalFormattingOperatorValues, ConsecutiveIndexes, ContainsTextRule, CopyCommand, CopyModifier, CopyPasteCellsAboveCommand, CopyPasteCellsOnLeftCommand, CoreCommand, CoreCommandDispatcher, CoreCommandTypes, CoreGetters, CorePlugin, CoreTable, CoreTableType, CoreViewCommand, CoreViewCommandTypes, CreateChartCommand, CreateFigureCommand, CreateImageOverCommand, CreateRevisionOptions, CreateSheetCommand, CreateTableCommand, CreateTableStyleCommand, Currency, CustomFormulaCriterion, CustomizedDataSet, CutCommand, DEFAULT_LOCALE, DEFAULT_LOCALES, DIRECTION, DOMCoordinates, DOMDimension, DataBarFill, DataBarRule, DataBarRuleInternal, DataSet, DataValidationCriterion, DataValidationCriterionType, DataValidationDateCriterion, DataValidationRule, DataValidationRuleData, DatasetDesign, DatasetValues, DateCriterionValue, DateIncrementModifier, DateIsAfterCriterion, DateIsBeforeCriterion, DateIsBetweenCriterion, DateIsCriterion, DateIsNotBetweenCriterion, DateIsOnOrAfterCriterion, DateIsOnOrBeforeCriterion, DateIsValidCriterion, DebouncedFunction, DeleteCellCommand, DeleteContentCommand, DeleteFigureCommand, DeleteSheetCommand, Dependencies, Dimension, DimensionTree, DimensionTreeNode, Direction$1 as Direction, DispatchResult, DuplicatePivotCommand, DuplicatePivotInNewSheetCommand, DuplicateSheetCommand, DynamicTable, EdgeScrollInfo, EditTextOptions, EditionMode, EmptyCell, EndsWithRule, EnrichedToken, EnsureRange, ErrorCell, EvalContext, EvaluateCellsCommand, EvaluatedCell, EvaluationError, ExcelCellData, ExcelChartDataset, ExcelChartDefinition, ExcelChartType, ExcelFigureSize, ExcelFilterData, ExcelHeaderData, ExcelSheetData, ExcelTableData, ExcelWorkbookData, ExpressionRule, Figure, FigureData, FigureSize, Filter, FilterId, FoldAllHeaderGroupsCommand, FoldHeaderGroupCommand, FoldHeaderGroupsInZoneCommand, Format, FormattedValue, FormulaCell, FormulaModifier, FormulaToExecute, FreezeColumnsCommand, FreezeRowsCommand, FunctionDescription, FunctionRegistry, FunctionResultNumber, FunctionResultObject, GeneratorCell, GetSymbolValue, Getters, Granularity, GridClickModifiers, GridRenderingContext, GroupHeadersCommand, HSLA, HeaderData, HeaderDimensions, HeaderGroup, HeaderIndex, HeadersDependentCommand, HideColumnsRowsCommand, HideSheetCommand, Highlight$1 as Highlight, HistoryChange, IconSet, IconSetRule, IconThreshold, Image, Immutable, Increment, IncrementModifier, InformationNotification, InitPivotParams, InsertCellCommand, InsertNewPivotCommand, InsertPivotCommand, InsertPivotWithTableCommand, IsBetweenCriterion, IsCheckboxCriterion, IsEqualCriterion, IsGreaterOrEqualToCriterion, IsGreaterThanCriterion, IsLessOrEqualToCriterion, IsLessThanCriterion, IsNotBetweenCriterion, IsNotEqualCriterion, IsValueInListCriterion, IsValueInRangeCriterion, LabelValues, LayerName, Lazy, Link, LiteralCell, LocalCommand, Locale, LocaleCode, LocaleFormat, Matrix, Maybe, MenuMouseEvent, Merge, Model, MoveColumnsRowsCommand, MoveConditionalFormatCommand, MoveRangeCommand, MoveSheetCommand, MoveViewportDownCommand, MoveViewportToCellCommand, MoveViewportUpCommand, NewLocalStateUpdateEvent, NotContainsTextRule, NotificationType, NumberCell, Offset, OperationSequenceNode, OrderedLayers, PaintFormat, PaneDivision, PasteCommand, PasteFromOSClipboardCommand, Pivot, PivotColRowDomain, PivotCoreDefinition, PivotCoreDimension, PivotCoreMeasure, PivotDimension$1 as PivotDimension, PivotDomain, PivotEmptyCell, PivotField, PivotFields, PivotHeaderCell, PivotMeasure, PivotMeasureDisplay, PivotMeasureDisplayType, PivotMeasureHeaderCell, PivotNode, PivotRuntimeDefinition, PivotTableCell, PivotTableColumn, PivotTableData, PivotTableRow, PivotTimeAdapter, PivotTimeAdapterNotNull, PivotValueCell, Pixel, PixelPosition, Position$1 as Position, PositionDependentCommand, PropsOf, RGBA, Range, RangeCompiledFormula, RangeData, RangePart, RangeProvider, RangesDependentCommand, Rect, RedoCommand, Ref, ReferenceDenormalizer, RefreshPivotCommand, Registry, RemoteRevisionMessage, RemoteRevisionReceivedEvent, RemoveColumnsRowsCommand, RemoveConditionalFormatCommand, RemoveDataValidationCommand, RemoveDuplicatesCommand, RemoveMergeCommand, RemovePivotCommand, RemoveTableCommand, RemoveTableStyleCommand, RenamePivotCommand, RenameSheetCommand, RepeatPasteCommand, ReplaceSearchCommand, RequestRedoCommand, RequestUndoCommand, ResizeColumnsRowsCommand, ResizeDirection, ResizeTableCommand, ResizeViewportCommand, Revision, RevisionAcknowledgedEvent, RevisionData, RevisionRedone, RevisionRedoneMessage, RevisionUndone, RevisionUndoneMessage, RevisionsDroppedEvent, Row, SPREADSHEET_DIMENSIONS, ScrollDirection$1 as ScrollDirection, SelectFigureCommand, Selection, SelectionStep, SetBorderCommand, SetContextualFormatCommand, SetDecimalCommand, SetDecimalStep, SetFormattingCommand, SetGridLinesVisibilityCommand, SetViewportOffsetCommand, SetZoneBordersCommand, Sheet, SheetDOMScrollInfo, SheetData, SheetDependentCommand, SheetScrollInfo, ShowFormulaCommand, ShowSheetCommand, SingleColorRule, SingleColorRules, SnapshotEvent, SortCommand, SortDirection, SortOptions, SplitPivotFormulaCommand, SplitTextIntoColumnsCommand, Spreadsheet, SpreadsheetChildEnv, SpreadsheetPivotCoreDefinition, SpreadsheetPivotTable, StartChangeHighlightCommand, StartCommand, StaticTable, StoreConstructor, StoreParams, Style, SumSelectionCommand, Table, TableBorder, TableConfig, TableData, TableElementStyle, TableId, TableStyle, TableStyleData, TableStyleTemplateName, TargetDependentCommand, TechnicalName, TextCell, TextContainsCriterion, TextIsCriterion, TextIsEmailCriterion, TextIsLinkCriterion, TextNotContainsCriterion, TextRule, ThresholdType, TimePeriodRule, TitleDesign, Token, Tooltip, Top10Rule, Transformation, TransformationFactory, TransportService, TrendConfiguration, TrendType, TrimWhitespaceCommand, UID, UIPlugin, UnGroupHeadersCommand, UnboundedZone, UndoCommand, UnexpectedRevisionIdEvent, UnfoldAllHeaderGroupsCommand, UnfoldHeaderGroupCommand, UnfoldHeaderGroupsInZoneCommand, UnfreezeColumnsCommand, UnfreezeColumnsRowsCommand, UnfreezeRowsCommand, UnhideColumnsRowsCommand, UpdateCellCommand, UpdateCellData, UpdateCellPositionCommand, UpdateChartCommand, UpdateFigureCommand, UpdateFilterCommand, UpdateLocaleCommand, UpdatePivotCommand, UpdateTableCommand, Validation, VerticalAlign, Viewport, WorkbookData, WorkbookHistory, Wrapping, Zone, ZoneDependentCommand, ZoneDimension, __info__, addFunction, addRenderingLayer, astToFormula, borderStyles, canExecuteInReadonly, compile, compileTokens, components, constants, containsBlanksRule, containsErrorsRule, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, notContainsBlanksRule, notContainsErrorsRule, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };