@odoo/o-spreadsheet 18.1.0 → 18.1.1

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, Color as Color$1, ChartType as ChartType$1 } from 'chart.js';
2
+ import { ChartConfiguration, Point, Chart, Color as Color$1, ChartType as ChartType$1 } from 'chart.js';
3
3
  import * as ChartGeo from 'chartjs-chart-geo';
4
4
  import * as GeoJSON$1 from 'geojson';
5
5
  import * as _odoo_owl from '@odoo/owl';
@@ -408,7 +408,7 @@ interface ChartRuntimeGenerationArgs {
408
408
  axisFormats: ChartAxisFormats;
409
409
  labels: string[];
410
410
  locale: Locale;
411
- trendDataSetsValues?: ((number | null)[] | undefined)[];
411
+ trendDataSetsValues?: (Point[] | undefined)[];
412
412
  axisType?: AxisType;
413
413
  }
414
414
  /** Generic definition of chart to create a runtime: omit the chart type and the dataRange of the dataSets*/
@@ -1336,6 +1336,7 @@ declare class DateTime {
1336
1336
  setMinutes(minutes: number): number;
1337
1337
  setSeconds(seconds: number): number;
1338
1338
  }
1339
+ declare function isDateTime(str: string, locale: Locale): boolean;
1339
1340
 
1340
1341
  interface FormatWidth {
1341
1342
  availableWidth: number;
@@ -1389,6 +1390,13 @@ declare function lazy<T>(fn: (() => T) | T): Lazy<T>;
1389
1390
  */
1390
1391
  declare function deepEquals(o1: any, o2: any): boolean;
1391
1392
 
1393
+ /**
1394
+ * Return true if the argument is a "number string".
1395
+ *
1396
+ * Note that "" (empty string) does not count as a number string
1397
+ */
1398
+ declare function isNumber(value: string | undefined, locale: Locale): boolean;
1399
+
1392
1400
  interface ConstructorArgs {
1393
1401
  readonly zone: Readonly<Zone | UnboundedZone>;
1394
1402
  readonly parts: readonly RangePart[];
@@ -3102,6 +3110,7 @@ declare const enum CommandResult {
3102
3110
  SheetIsHidden = "SheetIsHidden",
3103
3111
  InvalidTableResize = "InvalidTableResize",
3104
3112
  PivotIdNotFound = "PivotIdNotFound",
3113
+ PivotInError = "PivotInError",
3105
3114
  EmptyName = "EmptyName",
3106
3115
  ValueCellIsInvalidFormula = "ValueCellIsInvalidFormula",
3107
3116
  InvalidDefinition = "InvalidDefinition",
@@ -4168,6 +4177,10 @@ declare class BordersPlugin extends CorePlugin<BordersPluginState> implements Bo
4168
4177
  * Remove the borders of a zone
4169
4178
  */
4170
4179
  private clearBorders;
4180
+ /**
4181
+ * Remove the borders inside of a zone
4182
+ */
4183
+ private clearInsideBorders;
4171
4184
  /**
4172
4185
  * Add a border to the existing one to a cell
4173
4186
  */
@@ -9823,7 +9836,8 @@ declare class TextInput extends Component<Props$m, SpreadsheetChildEnv> {
9823
9836
  setup(): void;
9824
9837
  onKeyDown(ev: KeyboardEvent): void;
9825
9838
  save(): void;
9826
- focusInputAndSelectContent(): void;
9839
+ onMouseDown(ev: MouseEvent): void;
9840
+ onMouseUp(ev: MouseEvent): void;
9827
9841
  }
9828
9842
 
9829
9843
  interface Props$l {
@@ -10122,6 +10136,7 @@ declare class PivotSidePanelStore extends SpreadsheetStore {
10122
10136
  discardPendingUpdate(): void;
10123
10137
  update(definitionUpdate: Partial<PivotCoreDefinition>): void;
10124
10138
  private isDynamicPivotInViewport;
10139
+ private isStaticPivotInViewport;
10125
10140
  private addDefaultDateTimeGranularity;
10126
10141
  private getUnusedGranularities;
10127
10142
  /**
@@ -12520,6 +12535,8 @@ declare const helpers: {
12520
12535
  areDomainArgsFieldsValid: typeof areDomainArgsFieldsValid;
12521
12536
  splitReference: typeof splitReference;
12522
12537
  sanitizeSheetName: typeof sanitizeSheetName;
12538
+ isNumber: typeof isNumber;
12539
+ isDateTime: typeof isDateTime;
12523
12540
  };
12524
12541
  declare const links: {
12525
12542
  isMarkdownLink: typeof isMarkdownLink;
@@ -12629,8 +12646,8 @@ declare const chartHelpers: {
12629
12646
  getPieChartData(definition: GenericDefinition<PieChartDefinition>, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): ChartRuntimeGenerationArgs;
12630
12647
  getRadarChartData(definition: GenericDefinition<RadarChartDefinition>, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): ChartRuntimeGenerationArgs;
12631
12648
  getGeoChartData(definition: GeoChartDefinition, dataSets: DataSet[], labelRange: Range | undefined, getters: Getters): GeoChartRuntimeGenerationArgs;
12632
- getTrendDatasetForBarChart(config: TrendConfiguration, data: any[]): (number | null)[] | undefined;
12633
- getTrendDatasetForLineChart(config: TrendConfiguration, data: any[], labels: string[], axisType: AxisType, locale: Locale): (number | null)[] | undefined;
12649
+ getTrendDatasetForBarChart(config: TrendConfiguration, data: any[]): chart_js.Point[] | undefined;
12650
+ getTrendDatasetForLineChart(config: TrendConfiguration, data: any[], labels: string[], axisType: AxisType, locale: Locale): chart_js.Point[] | undefined;
12634
12651
  canChartParseLabels(labelRange: Range | undefined, getters: Getters): boolean;
12635
12652
  getData(getters: Getters, ds: DataSet): (CellValue | undefined)[];
12636
12653
  getChartLabelFormat(getters: Getters, range: Range | undefined): Format | undefined;