@odoo/o-spreadsheet 16.5.0-alpha.4 → 16.5.0-alpha.6

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.
@@ -1877,7 +1877,7 @@ interface RemoveFilterTableCommand extends TargetDependentCommand {
1877
1877
  }
1878
1878
  interface UpdateFilterCommand extends PositionDependentCommand {
1879
1879
  type: "UPDATE_FILTER";
1880
- values: string[];
1880
+ hiddenValues: string[];
1881
1881
  }
1882
1882
  interface SetFormattingCommand extends TargetDependentCommand {
1883
1883
  type: "SET_FORMATTING";
@@ -2501,7 +2501,7 @@ interface CellPosition {
2501
2501
  sheetId: UID;
2502
2502
  }
2503
2503
  declare const borderStyles: readonly ["thin", "medium", "thick", "dashed", "dotted"];
2504
- type BorderStyle = typeof borderStyles[number];
2504
+ type BorderStyle = (typeof borderStyles)[number];
2505
2505
  type BorderDescr = {
2506
2506
  style: BorderStyle;
2507
2507
  color: Color;
@@ -2521,44 +2521,20 @@ interface Border$1 {
2521
2521
  right?: BorderDescr;
2522
2522
  }
2523
2523
  type ReferenceDenormalizer = (range: Range, isMeta: boolean, functionName: string, paramNumber: number) => any | any[][];
2524
- type EnsureRange = (range: Range) => MatrixArg;
2525
- type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => FormulaReturn;
2524
+ type EnsureRange = (range: Range) => Matrix<ValueAndFormat>;
2525
+ type _CompiledFormula = (deps: Range[], refFn: ReferenceDenormalizer, range: EnsureRange, ctx: {}) => Matrix<ValueAndFormat> | ValueAndFormat;
2526
2526
  interface CompiledFormula {
2527
2527
  execute: _CompiledFormula;
2528
2528
  tokens: Token[];
2529
2529
  dependencies: string[];
2530
2530
  }
2531
2531
  type Matrix<T = unknown> = T[][];
2532
- type Arg = MatrixArg | PrimitiveArg;
2533
- type MatrixArg = {
2534
- value: MatrixArgValue;
2535
- format?: MatrixArgFormat;
2536
- };
2537
- type PrimitiveArg = {
2538
- value: PrimitiveArgValue;
2539
- format?: PrimitiveFormat;
2540
- };
2541
- type ArgValue = PrimitiveArgValue | MatrixArgValue;
2542
- type MatrixArgValue = Matrix<CellValue | undefined>;
2543
- type PrimitiveArgValue = CellValue | null;
2544
- type MatrixArgFormat = Matrix<PrimitiveFormat>;
2545
- type PrimitiveFormat = Format | undefined;
2546
- type FunctionReturn = MatrixFunctionReturn | PrimitiveFunctionReturn;
2547
- type FunctionReturnValue = CellValue | Matrix<CellValue>;
2548
- type FunctionReturnFormat = PrimitiveFormat | MatrixArgFormat;
2549
- type MatrixFunctionReturn = {
2550
- value: Matrix<CellValue>;
2551
- format?: FunctionReturnFormat;
2552
- };
2553
- type PrimitiveFunctionReturn = {
2532
+ type ValueAndFormat = {
2554
2533
  value: CellValue;
2555
- format?: PrimitiveFormat;
2556
- };
2557
- type FormulaReturn = MatrixFunctionReturn | PrimitiveFormulaReturn;
2558
- type PrimitiveFormulaReturn = {
2559
- value: CellValue | null;
2560
- format?: PrimitiveFormat;
2534
+ format?: Format;
2561
2535
  };
2536
+ type Arg = Maybe<ValueAndFormat> | Matrix<ValueAndFormat>;
2537
+ type ArgValue = Maybe<CellValue> | Matrix<CellValue>;
2562
2538
  interface HeaderDimensions {
2563
2539
  start: Pixel;
2564
2540
  size: Pixel;
@@ -2641,6 +2617,7 @@ interface Lazy<T> {
2641
2617
  */
2642
2618
  map: <U>(callback: (value: T) => U) => Lazy<U>;
2643
2619
  }
2620
+ type Maybe<T> = T | undefined;
2644
2621
  interface Cloneable<T> {
2645
2622
  clone: (args?: Partial<T>) => T;
2646
2623
  }
@@ -2712,7 +2689,7 @@ interface EvaluatedCellProperties {
2712
2689
  readonly isAutoSummable: boolean;
2713
2690
  readonly link?: Link;
2714
2691
  }
2715
- type CellValue = string | number | boolean;
2692
+ type CellValue = string | number | boolean | null;
2716
2693
  type EvaluatedCell = NumberCell | TextCell | BooleanCell | EmptyCell | ErrorCell;
2717
2694
  interface NumberCell extends EvaluatedCellProperties {
2718
2695
  readonly type: CellValueType.number;
@@ -2826,16 +2803,6 @@ interface ClipboardInterface {
2826
2803
  readText(): Promise<ClipboardReadResult>;
2827
2804
  }
2828
2805
 
2829
- type TranslationFunction = (string: string, ...values: string[] | [{
2830
- [key: string]: string;
2831
- }]) => string;
2832
- /***
2833
- * Allow to inject a translation function from outside o-spreadsheet.
2834
- * @param tfn the function that will do the translation
2835
- * @param loaded a function that returns true when the translation is loaded
2836
- */
2837
- declare function setTranslationMethod(tfn: TranslationFunction, loaded?: () => boolean): void;
2838
-
2839
2806
  interface EditTextOptions {
2840
2807
  error?: string;
2841
2808
  placeholder?: string;
@@ -2859,7 +2826,6 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
2859
2826
  openSidePanel: (panel: string, panelProps?: any) => void;
2860
2827
  toggleSidePanel: (panel: string, panelProps?: any) => void;
2861
2828
  clipboard: ClipboardInterface;
2862
- _t: TranslationFunction;
2863
2829
  startCellEdition: (content: string) => void;
2864
2830
  loadCurrencies?: () => Promise<Currency[]>;
2865
2831
  loadLocales: () => Promise<Locale[]>;
@@ -2876,24 +2842,32 @@ interface ArgDefinition {
2876
2842
  default?: boolean;
2877
2843
  defaultValue?: any;
2878
2844
  }
2879
- type ComputeFunctionArg<T> = T | (() => T) | undefined;
2845
+ type ComputeFunctionArg<T> = T | (() => T);
2880
2846
  type ComputeFunction<T, R> = (this: EvalContext, ...args: ComputeFunctionArg<T>[]) => R;
2881
- interface AddFunctionDescription {
2847
+ interface AddFunctionDescriptionBase {
2882
2848
  description: string;
2883
- compute: ComputeFunction<ArgValue, FunctionReturnValue>;
2884
- computeFormat?: ComputeFunction<Arg, FunctionReturnFormat>;
2885
2849
  category?: string;
2886
2850
  args: ArgDefinition[];
2887
2851
  returns: [ArgType];
2888
2852
  isExported?: boolean;
2889
2853
  hidden?: boolean;
2890
2854
  }
2891
- interface FunctionDescription extends AddFunctionDescription {
2855
+ interface ComputeValue {
2856
+ compute: ComputeFunction<ArgValue, CellValue | Matrix<CellValue>>;
2857
+ }
2858
+ interface ComputeFormat {
2859
+ computeFormat: ComputeFunction<Arg, Format | undefined | Matrix<Format | undefined>>;
2860
+ }
2861
+ interface ComputeValueAndFormat {
2862
+ computeValueAndFormat: ComputeFunction<Arg, Matrix<ValueAndFormat> | ValueAndFormat>;
2863
+ }
2864
+ type AddFunctionDescription = (AddFunctionDescriptionBase & ComputeValue & Partial<ComputeFormat>) | (AddFunctionDescriptionBase & ComputeValueAndFormat);
2865
+ type FunctionDescription = AddFunctionDescription & {
2892
2866
  minArgRequired: number;
2893
2867
  maxArgPossible: number;
2894
2868
  nbrArgRepeating: number;
2895
2869
  getArgToFocus: (argPosition: number) => number;
2896
- }
2870
+ };
2897
2871
  type EvalContext = {
2898
2872
  __lastFnCalled?: string;
2899
2873
  __originCellXC?: () => string;
@@ -5392,6 +5366,7 @@ declare class ScorecardChartDesignPanel extends Component<Props$x, SpreadsheetCh
5392
5366
  private state;
5393
5367
  setup(): void;
5394
5368
  updateTitle(): void;
5369
+ translate(term: any): string;
5395
5370
  updateBaselineDescr(ev: any): void;
5396
5371
  toggleColorPicker(colorPickerId: ColorPickerId): void;
5397
5372
  setColor(color: Color, colorPickerId: ColorPickerId): void;
@@ -5472,6 +5447,8 @@ interface Action {
5472
5447
  }
5473
5448
  type ActionBuilder = (env: SpreadsheetChildEnv) => ActionSpec[];
5474
5449
  type ActionChildren = (ActionSpec | ActionBuilder)[];
5450
+ declare function createActions(menuItems: ActionSpec[]): Action[];
5451
+ declare function createAction(item: ActionSpec): Action;
5475
5452
 
5476
5453
  /**
5477
5454
  * This registry is intended to map a type of figure (tag) to a class of
@@ -5559,6 +5536,7 @@ declare class ScorecardChart extends Component<Props$v, SpreadsheetChildEnv> {
5559
5536
  get chartStyle(): string;
5560
5537
  get chartContentStyle(): string;
5561
5538
  get chartPadding(): number;
5539
+ translate(term: any): string;
5562
5540
  getTextStyles(): {
5563
5541
  titleStyle: string;
5564
5542
  keyStyle: string;
@@ -6236,48 +6214,48 @@ declare const deleteCellShiftUp: ActionSpec;
6236
6214
  declare const deleteCellShiftLeft: ActionSpec;
6237
6215
  declare const mergeCells: ActionSpec;
6238
6216
 
6239
- declare const ACTION_EDIT_undo: typeof undo;
6240
- declare const ACTION_EDIT_redo: typeof redo;
6217
+ declare const ACTION_EDIT_clearCols: typeof clearCols;
6218
+ declare const ACTION_EDIT_clearRows: typeof clearRows;
6241
6219
  declare const ACTION_EDIT_copy: typeof copy;
6242
6220
  declare const ACTION_EDIT_cut: typeof cut;
6221
+ declare const ACTION_EDIT_deleteCellShiftLeft: typeof deleteCellShiftLeft;
6222
+ declare const ACTION_EDIT_deleteCellShiftUp: typeof deleteCellShiftUp;
6223
+ declare const ACTION_EDIT_deleteCells: typeof deleteCells;
6224
+ declare const ACTION_EDIT_deleteCol: typeof deleteCol;
6225
+ declare const ACTION_EDIT_deleteCols: typeof deleteCols;
6226
+ declare const ACTION_EDIT_deleteRow: typeof deleteRow;
6227
+ declare const ACTION_EDIT_deleteRows: typeof deleteRows;
6228
+ declare const ACTION_EDIT_deleteValues: typeof deleteValues;
6229
+ declare const ACTION_EDIT_findAndReplace: typeof findAndReplace;
6230
+ declare const ACTION_EDIT_mergeCells: typeof mergeCells;
6243
6231
  declare const ACTION_EDIT_paste: typeof paste;
6244
6232
  declare const ACTION_EDIT_pasteSpecial: typeof pasteSpecial;
6245
- declare const ACTION_EDIT_pasteSpecialValue: typeof pasteSpecialValue;
6246
6233
  declare const ACTION_EDIT_pasteSpecialFormat: typeof pasteSpecialFormat;
6247
- declare const ACTION_EDIT_findAndReplace: typeof findAndReplace;
6248
- declare const ACTION_EDIT_deleteValues: typeof deleteValues;
6249
- declare const ACTION_EDIT_deleteRows: typeof deleteRows;
6250
- declare const ACTION_EDIT_deleteRow: typeof deleteRow;
6251
- declare const ACTION_EDIT_clearRows: typeof clearRows;
6252
- declare const ACTION_EDIT_deleteCols: typeof deleteCols;
6253
- declare const ACTION_EDIT_deleteCol: typeof deleteCol;
6254
- declare const ACTION_EDIT_clearCols: typeof clearCols;
6255
- declare const ACTION_EDIT_deleteCells: typeof deleteCells;
6256
- declare const ACTION_EDIT_deleteCellShiftUp: typeof deleteCellShiftUp;
6257
- declare const ACTION_EDIT_deleteCellShiftLeft: typeof deleteCellShiftLeft;
6258
- declare const ACTION_EDIT_mergeCells: typeof mergeCells;
6234
+ declare const ACTION_EDIT_pasteSpecialValue: typeof pasteSpecialValue;
6235
+ declare const ACTION_EDIT_redo: typeof redo;
6236
+ declare const ACTION_EDIT_undo: typeof undo;
6259
6237
  declare namespace ACTION_EDIT {
6260
6238
  export {
6261
- ACTION_EDIT_undo as undo,
6262
- ACTION_EDIT_redo as redo,
6239
+ ACTION_EDIT_clearCols as clearCols,
6240
+ ACTION_EDIT_clearRows as clearRows,
6263
6241
  ACTION_EDIT_copy as copy,
6264
6242
  ACTION_EDIT_cut as cut,
6243
+ ACTION_EDIT_deleteCellShiftLeft as deleteCellShiftLeft,
6244
+ ACTION_EDIT_deleteCellShiftUp as deleteCellShiftUp,
6245
+ ACTION_EDIT_deleteCells as deleteCells,
6246
+ ACTION_EDIT_deleteCol as deleteCol,
6247
+ ACTION_EDIT_deleteCols as deleteCols,
6248
+ ACTION_EDIT_deleteRow as deleteRow,
6249
+ ACTION_EDIT_deleteRows as deleteRows,
6250
+ ACTION_EDIT_deleteValues as deleteValues,
6251
+ ACTION_EDIT_findAndReplace as findAndReplace,
6252
+ ACTION_EDIT_mergeCells as mergeCells,
6265
6253
  ACTION_EDIT_paste as paste,
6266
6254
  ACTION_EDIT_pasteSpecial as pasteSpecial,
6267
- ACTION_EDIT_pasteSpecialValue as pasteSpecialValue,
6268
6255
  ACTION_EDIT_pasteSpecialFormat as pasteSpecialFormat,
6269
- ACTION_EDIT_findAndReplace as findAndReplace,
6270
- ACTION_EDIT_deleteValues as deleteValues,
6271
- ACTION_EDIT_deleteRows as deleteRows,
6272
- ACTION_EDIT_deleteRow as deleteRow,
6273
- ACTION_EDIT_clearRows as clearRows,
6274
- ACTION_EDIT_deleteCols as deleteCols,
6275
- ACTION_EDIT_deleteCol as deleteCol,
6276
- ACTION_EDIT_clearCols as clearCols,
6277
- ACTION_EDIT_deleteCells as deleteCells,
6278
- ACTION_EDIT_deleteCellShiftUp as deleteCellShiftUp,
6279
- ACTION_EDIT_deleteCellShiftLeft as deleteCellShiftLeft,
6280
- ACTION_EDIT_mergeCells as mergeCells,
6256
+ ACTION_EDIT_pasteSpecialValue as pasteSpecialValue,
6257
+ ACTION_EDIT_redo as redo,
6258
+ ACTION_EDIT_undo as undo,
6281
6259
  };
6282
6260
  }
6283
6261
 
@@ -6318,80 +6296,80 @@ declare const fillColor: ActionSpec;
6318
6296
  declare const formatCF: ActionSpec;
6319
6297
  declare const clearFormat: ActionSpec;
6320
6298
 
6299
+ declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
6300
+ declare const ACTION_FORMAT_decraseDecimalPlaces: typeof decraseDecimalPlaces;
6301
+ declare const ACTION_FORMAT_fillColor: typeof fillColor;
6302
+ declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
6303
+ declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
6304
+ declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
6305
+ declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
6306
+ declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
6307
+ declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
6308
+ declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
6309
+ declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
6310
+ declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
6311
+ declare const ACTION_FORMAT_formatBold: typeof formatBold;
6312
+ declare const ACTION_FORMAT_formatCF: typeof formatCF;
6313
+ declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
6314
+ declare const ACTION_FORMAT_formatFontSize: typeof formatFontSize;
6315
+ declare const ACTION_FORMAT_formatItalic: typeof formatItalic;
6321
6316
  declare const ACTION_FORMAT_formatNumberAutomatic: typeof formatNumberAutomatic;
6322
- declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
6323
- declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
6324
- declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
6325
6317
  declare const ACTION_FORMAT_formatNumberCurrency: typeof formatNumberCurrency;
6326
6318
  declare const ACTION_FORMAT_formatNumberCurrencyRounded: typeof formatNumberCurrencyRounded;
6327
- declare const ACTION_FORMAT_formatCustomCurrency: typeof formatCustomCurrency;
6328
6319
  declare const ACTION_FORMAT_formatNumberDate: typeof formatNumberDate;
6329
- declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
6330
6320
  declare const ACTION_FORMAT_formatNumberDateTime: typeof formatNumberDateTime;
6331
6321
  declare const ACTION_FORMAT_formatNumberDuration: typeof formatNumberDuration;
6332
- declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
6333
- declare const ACTION_FORMAT_decraseDecimalPlaces: typeof decraseDecimalPlaces;
6334
- declare const ACTION_FORMAT_formatBold: typeof formatBold;
6335
- declare const ACTION_FORMAT_formatItalic: typeof formatItalic;
6336
- declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
6322
+ declare const ACTION_FORMAT_formatNumberNumber: typeof formatNumberNumber;
6323
+ declare const ACTION_FORMAT_formatNumberPercent: typeof formatNumberPercent;
6324
+ declare const ACTION_FORMAT_formatNumberTime: typeof formatNumberTime;
6325
+ declare const ACTION_FORMAT_formatPercent: typeof formatPercent;
6337
6326
  declare const ACTION_FORMAT_formatStrikethrough: typeof formatStrikethrough;
6338
- declare const ACTION_FORMAT_formatFontSize: typeof formatFontSize;
6339
- declare const ACTION_FORMAT_formatAlignment: typeof formatAlignment;
6340
- declare const ACTION_FORMAT_formatAlignmentHorizontal: typeof formatAlignmentHorizontal;
6341
- declare const ACTION_FORMAT_formatAlignmentLeft: typeof formatAlignmentLeft;
6342
- declare const ACTION_FORMAT_formatAlignmentCenter: typeof formatAlignmentCenter;
6343
- declare const ACTION_FORMAT_formatAlignmentRight: typeof formatAlignmentRight;
6344
- declare const ACTION_FORMAT_formatAlignmentVertical: typeof formatAlignmentVertical;
6345
- declare const ACTION_FORMAT_formatAlignmentTop: typeof formatAlignmentTop;
6346
- declare const ACTION_FORMAT_formatAlignmentMiddle: typeof formatAlignmentMiddle;
6347
- declare const ACTION_FORMAT_formatAlignmentBottom: typeof formatAlignmentBottom;
6348
- declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
6327
+ declare const ACTION_FORMAT_formatUnderline: typeof formatUnderline;
6349
6328
  declare const ACTION_FORMAT_formatWrapping: typeof formatWrapping;
6329
+ declare const ACTION_FORMAT_formatWrappingClip: typeof formatWrappingClip;
6330
+ declare const ACTION_FORMAT_formatWrappingIcon: typeof formatWrappingIcon;
6350
6331
  declare const ACTION_FORMAT_formatWrappingOverflow: typeof formatWrappingOverflow;
6351
6332
  declare const ACTION_FORMAT_formatWrappingWrap: typeof formatWrappingWrap;
6352
- declare const ACTION_FORMAT_formatWrappingClip: typeof formatWrappingClip;
6333
+ declare const ACTION_FORMAT_incraseDecimalPlaces: typeof incraseDecimalPlaces;
6353
6334
  declare const ACTION_FORMAT_textColor: typeof textColor;
6354
- declare const ACTION_FORMAT_fillColor: typeof fillColor;
6355
- declare const ACTION_FORMAT_formatCF: typeof formatCF;
6356
- declare const ACTION_FORMAT_clearFormat: typeof clearFormat;
6357
6335
  declare namespace ACTION_FORMAT {
6358
6336
  export {
6337
+ ACTION_FORMAT_clearFormat as clearFormat,
6338
+ ACTION_FORMAT_decraseDecimalPlaces as decraseDecimalPlaces,
6339
+ ACTION_FORMAT_fillColor as fillColor,
6340
+ ACTION_FORMAT_formatAlignment as formatAlignment,
6341
+ ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
6342
+ ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
6343
+ ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
6344
+ ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
6345
+ ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
6346
+ ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
6347
+ ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
6348
+ ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
6349
+ ACTION_FORMAT_formatBold as formatBold,
6350
+ ACTION_FORMAT_formatCF as formatCF,
6351
+ ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
6352
+ ACTION_FORMAT_formatFontSize as formatFontSize,
6353
+ ACTION_FORMAT_formatItalic as formatItalic,
6359
6354
  ACTION_FORMAT_formatNumberAutomatic as formatNumberAutomatic,
6360
- ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
6361
- ACTION_FORMAT_formatPercent as formatPercent,
6362
- ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
6363
6355
  ACTION_FORMAT_formatNumberCurrency as formatNumberCurrency,
6364
6356
  ACTION_FORMAT_formatNumberCurrencyRounded as formatNumberCurrencyRounded,
6365
- ACTION_FORMAT_formatCustomCurrency as formatCustomCurrency,
6366
6357
  ACTION_FORMAT_formatNumberDate as formatNumberDate,
6367
- ACTION_FORMAT_formatNumberTime as formatNumberTime,
6368
6358
  ACTION_FORMAT_formatNumberDateTime as formatNumberDateTime,
6369
6359
  ACTION_FORMAT_formatNumberDuration as formatNumberDuration,
6370
- ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
6371
- ACTION_FORMAT_decraseDecimalPlaces as decraseDecimalPlaces,
6372
- ACTION_FORMAT_formatBold as formatBold,
6373
- ACTION_FORMAT_formatItalic as formatItalic,
6374
- ACTION_FORMAT_formatUnderline as formatUnderline,
6360
+ ACTION_FORMAT_formatNumberNumber as formatNumberNumber,
6361
+ ACTION_FORMAT_formatNumberPercent as formatNumberPercent,
6362
+ ACTION_FORMAT_formatNumberTime as formatNumberTime,
6363
+ ACTION_FORMAT_formatPercent as formatPercent,
6375
6364
  ACTION_FORMAT_formatStrikethrough as formatStrikethrough,
6376
- ACTION_FORMAT_formatFontSize as formatFontSize,
6377
- ACTION_FORMAT_formatAlignment as formatAlignment,
6378
- ACTION_FORMAT_formatAlignmentHorizontal as formatAlignmentHorizontal,
6379
- ACTION_FORMAT_formatAlignmentLeft as formatAlignmentLeft,
6380
- ACTION_FORMAT_formatAlignmentCenter as formatAlignmentCenter,
6381
- ACTION_FORMAT_formatAlignmentRight as formatAlignmentRight,
6382
- ACTION_FORMAT_formatAlignmentVertical as formatAlignmentVertical,
6383
- ACTION_FORMAT_formatAlignmentTop as formatAlignmentTop,
6384
- ACTION_FORMAT_formatAlignmentMiddle as formatAlignmentMiddle,
6385
- ACTION_FORMAT_formatAlignmentBottom as formatAlignmentBottom,
6386
- ACTION_FORMAT_formatWrappingIcon as formatWrappingIcon,
6365
+ ACTION_FORMAT_formatUnderline as formatUnderline,
6387
6366
  ACTION_FORMAT_formatWrapping as formatWrapping,
6367
+ ACTION_FORMAT_formatWrappingClip as formatWrappingClip,
6368
+ ACTION_FORMAT_formatWrappingIcon as formatWrappingIcon,
6388
6369
  ACTION_FORMAT_formatWrappingOverflow as formatWrappingOverflow,
6389
6370
  ACTION_FORMAT_formatWrappingWrap as formatWrappingWrap,
6390
- ACTION_FORMAT_formatWrappingClip as formatWrappingClip,
6371
+ ACTION_FORMAT_incraseDecimalPlaces as incraseDecimalPlaces,
6391
6372
  ACTION_FORMAT_textColor as textColor,
6392
- ACTION_FORMAT_fillColor as fillColor,
6393
- ACTION_FORMAT_formatCF as formatCF,
6394
- ACTION_FORMAT_clearFormat as clearFormat,
6395
6373
  };
6396
6374
  }
6397
6375
 
@@ -6415,46 +6393,46 @@ declare const viewGridlines: ActionSpec;
6415
6393
  declare const viewFormulas: ActionSpec;
6416
6394
  declare const createRemoveFilter: ActionSpec;
6417
6395
 
6396
+ declare const ACTION_VIEW_createRemoveFilter: typeof createRemoveFilter;
6397
+ declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
6398
+ declare const ACTION_VIEW_freezeCurrentRow: typeof freezeCurrentRow;
6399
+ declare const ACTION_VIEW_freezeFirstCol: typeof freezeFirstCol;
6400
+ declare const ACTION_VIEW_freezeFirstRow: typeof freezeFirstRow;
6401
+ declare const ACTION_VIEW_freezePane: typeof freezePane;
6402
+ declare const ACTION_VIEW_freezeSecondCol: typeof freezeSecondCol;
6403
+ declare const ACTION_VIEW_freezeSecondRow: typeof freezeSecondRow;
6418
6404
  declare const ACTION_VIEW_hideCols: typeof hideCols;
6419
- declare const ACTION_VIEW_unhideCols: typeof unhideCols;
6420
- declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
6421
6405
  declare const ACTION_VIEW_hideRows: typeof hideRows;
6422
- declare const ACTION_VIEW_unhideRows: typeof unhideRows;
6423
- declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
6406
+ declare const ACTION_VIEW_unFreezeCols: typeof unFreezeCols;
6424
6407
  declare const ACTION_VIEW_unFreezePane: typeof unFreezePane;
6425
- declare const ACTION_VIEW_freezePane: typeof freezePane;
6426
6408
  declare const ACTION_VIEW_unFreezeRows: typeof unFreezeRows;
6427
- declare const ACTION_VIEW_freezeFirstRow: typeof freezeFirstRow;
6428
- declare const ACTION_VIEW_freezeSecondRow: typeof freezeSecondRow;
6429
- declare const ACTION_VIEW_freezeCurrentRow: typeof freezeCurrentRow;
6430
- declare const ACTION_VIEW_unFreezeCols: typeof unFreezeCols;
6431
- declare const ACTION_VIEW_freezeFirstCol: typeof freezeFirstCol;
6432
- declare const ACTION_VIEW_freezeSecondCol: typeof freezeSecondCol;
6433
- declare const ACTION_VIEW_freezeCurrentCol: typeof freezeCurrentCol;
6434
- declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
6409
+ declare const ACTION_VIEW_unhideAllCols: typeof unhideAllCols;
6410
+ declare const ACTION_VIEW_unhideAllRows: typeof unhideAllRows;
6411
+ declare const ACTION_VIEW_unhideCols: typeof unhideCols;
6412
+ declare const ACTION_VIEW_unhideRows: typeof unhideRows;
6435
6413
  declare const ACTION_VIEW_viewFormulas: typeof viewFormulas;
6436
- declare const ACTION_VIEW_createRemoveFilter: typeof createRemoveFilter;
6414
+ declare const ACTION_VIEW_viewGridlines: typeof viewGridlines;
6437
6415
  declare namespace ACTION_VIEW {
6438
6416
  export {
6417
+ ACTION_VIEW_createRemoveFilter as createRemoveFilter,
6418
+ ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
6419
+ ACTION_VIEW_freezeCurrentRow as freezeCurrentRow,
6420
+ ACTION_VIEW_freezeFirstCol as freezeFirstCol,
6421
+ ACTION_VIEW_freezeFirstRow as freezeFirstRow,
6422
+ ACTION_VIEW_freezePane as freezePane,
6423
+ ACTION_VIEW_freezeSecondCol as freezeSecondCol,
6424
+ ACTION_VIEW_freezeSecondRow as freezeSecondRow,
6439
6425
  ACTION_VIEW_hideCols as hideCols,
6440
- ACTION_VIEW_unhideCols as unhideCols,
6441
- ACTION_VIEW_unhideAllCols as unhideAllCols,
6442
6426
  ACTION_VIEW_hideRows as hideRows,
6443
- ACTION_VIEW_unhideRows as unhideRows,
6444
- ACTION_VIEW_unhideAllRows as unhideAllRows,
6427
+ ACTION_VIEW_unFreezeCols as unFreezeCols,
6445
6428
  ACTION_VIEW_unFreezePane as unFreezePane,
6446
- ACTION_VIEW_freezePane as freezePane,
6447
6429
  ACTION_VIEW_unFreezeRows as unFreezeRows,
6448
- ACTION_VIEW_freezeFirstRow as freezeFirstRow,
6449
- ACTION_VIEW_freezeSecondRow as freezeSecondRow,
6450
- ACTION_VIEW_freezeCurrentRow as freezeCurrentRow,
6451
- ACTION_VIEW_unFreezeCols as unFreezeCols,
6452
- ACTION_VIEW_freezeFirstCol as freezeFirstCol,
6453
- ACTION_VIEW_freezeSecondCol as freezeSecondCol,
6454
- ACTION_VIEW_freezeCurrentCol as freezeCurrentCol,
6455
- ACTION_VIEW_viewGridlines as viewGridlines,
6430
+ ACTION_VIEW_unhideAllCols as unhideAllCols,
6431
+ ACTION_VIEW_unhideAllRows as unhideAllRows,
6432
+ ACTION_VIEW_unhideCols as unhideCols,
6433
+ ACTION_VIEW_unhideRows as unhideRows,
6456
6434
  ACTION_VIEW_viewFormulas as viewFormulas,
6457
- ACTION_VIEW_createRemoveFilter as createRemoveFilter,
6435
+ ACTION_VIEW_viewGridlines as viewGridlines,
6458
6436
  };
6459
6437
  }
6460
6438
 
@@ -6856,7 +6834,6 @@ declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEn
6856
6834
  SidePanel: typeof SidePanel;
6857
6835
  SpreadsheetDashboard: typeof SpreadsheetDashboard;
6858
6836
  };
6859
- static _t: (s: string) => string;
6860
6837
  sidePanel: SidePanelState;
6861
6838
  composer: ComposerState;
6862
6839
  private _focusGrid?;
@@ -7208,6 +7185,17 @@ declare function createEmptyExcelSheet(sheetId: UID, name: string): ExcelSheetDa
7208
7185
 
7209
7186
  declare function genericRepeat<T extends Command>(getters: Getters, command: T): T;
7210
7187
 
7188
+ type SprintfValues = (string | String | number)[] | [{
7189
+ [key: string]: string | number;
7190
+ }];
7191
+ type TranslationFunction = (string: string, ...values: SprintfValues) => string;
7192
+ /***
7193
+ * Allow to inject a translation function from outside o-spreadsheet.
7194
+ * @param tfn the function that will do the translation
7195
+ * @param loaded a function that returns true when the translation is loaded
7196
+ */
7197
+ declare function setTranslationMethod(tfn: TranslationFunction, loaded?: () => boolean): void;
7198
+
7211
7199
  /**
7212
7200
  * We export here all entities that needs to be accessed publicly by Odoo.
7213
7201
  *
@@ -7235,7 +7223,7 @@ declare const registries: {
7235
7223
  linkMenuRegistry: MenuItemRegistry;
7236
7224
  functionRegistry: {
7237
7225
  mapping: {
7238
- [key: string]: ComputeFunction<Arg, FunctionReturn>;
7226
+ [key: string]: ComputeFunction<Arg, ValueAndFormat | Matrix<ValueAndFormat>>;
7239
7227
  };
7240
7228
  add(name: string, addDescr: AddFunctionDescription): any;
7241
7229
  content: {
@@ -7311,6 +7299,8 @@ declare const helpers: {
7311
7299
  isDefined: typeof isDefined;
7312
7300
  lazy: typeof lazy;
7313
7301
  genericRepeat: typeof genericRepeat;
7302
+ createAction: typeof createAction;
7303
+ createActions: typeof createActions;
7314
7304
  };
7315
7305
  declare const links: {
7316
7306
  isMarkdownLink: typeof isMarkdownLink;
@@ -7335,6 +7325,7 @@ declare const components: {
7335
7325
  ScorecardChartConfigPanel: typeof ScorecardChartConfigPanel;
7336
7326
  ScorecardChartDesignPanel: typeof ScorecardChartDesignPanel;
7337
7327
  FigureComponent: typeof FigureComponent;
7328
+ Menu: typeof Menu;
7338
7329
  };
7339
7330
  declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
7340
7331
  addFunction: (fName: string, fDescription: AddFunctionDescription) => any;