@odoo/o-spreadsheet 17.4.0-alpha.8 → 17.4.0-alpha.9

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.
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 17.4.0-alpha.8
6
- * @date 2024-06-24T19:51:16.144Z
7
- * @hash ccd30df
5
+ * @version 17.4.0-alpha.9
6
+ * @date 2024-06-26T11:09:20.284Z
7
+ * @hash 526be20
8
8
  */
9
9
 
10
10
  'use strict';
@@ -31686,7 +31686,7 @@ class ChartTitle extends owl.Component {
31686
31686
  static template = "o-spreadsheet.ChartTitle";
31687
31687
  static components = { Section, ColorPickerWidget };
31688
31688
  static props = {
31689
- title: String,
31689
+ title: { type: String, optional: true },
31690
31690
  updateTitle: Function,
31691
31691
  name: { type: String, optional: true },
31692
31692
  toggleItalic: { type: Function, optional: true },
@@ -31695,6 +31695,9 @@ class ChartTitle extends owl.Component {
31695
31695
  updateColor: { type: Function, optional: true },
31696
31696
  style: { type: Object, optional: true },
31697
31697
  };
31698
+ static defaultProps = {
31699
+ title: "",
31700
+ };
31698
31701
  openedEl = null;
31699
31702
  setup() {
31700
31703
  owl.useExternalListener(window, "click", this.onExternalClick);
@@ -55043,7 +55046,7 @@ class PivotUIPlugin extends UIPlugin {
55043
55046
  getPivotIdFromPosition(position) {
55044
55047
  const cell = this.getters.getCorrespondingFormulaCell(position);
55045
55048
  if (cell && cell.isFormula) {
55046
- const pivotFunction = this.getFirstPivotFunction(cell.compiledFormula.tokens);
55049
+ const pivotFunction = this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens);
55047
55050
  if (pivotFunction) {
55048
55051
  const pivotId = pivotFunction.args[0]?.toString();
55049
55052
  return pivotId && this.getters.getPivotId(pivotId);
@@ -55054,12 +55057,12 @@ class PivotUIPlugin extends UIPlugin {
55054
55057
  isSpillPivotFormula(position) {
55055
55058
  const cell = this.getters.getCorrespondingFormulaCell(position);
55056
55059
  if (cell && cell.isFormula) {
55057
- const pivotFunction = this.getFirstPivotFunction(cell.compiledFormula.tokens);
55060
+ const pivotFunction = this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens);
55058
55061
  return pivotFunction?.functionName === "PIVOT";
55059
55062
  }
55060
55063
  return false;
55061
55064
  }
55062
- getFirstPivotFunction(tokens) {
55065
+ getFirstPivotFunction(sheetId, tokens) {
55063
55066
  const pivotFunction = getFirstPivotFunction(tokens);
55064
55067
  if (!pivotFunction) {
55065
55068
  return undefined;
@@ -55075,7 +55078,7 @@ class PivotUIPlugin extends UIPlugin {
55075
55078
  return argAst.value;
55076
55079
  }
55077
55080
  const argsString = astToFormula(argAst);
55078
- return this.getters.evaluateFormula(this.getters.getActiveSheetId(), argsString);
55081
+ return this.getters.evaluateFormula(sheetId, argsString);
55079
55082
  });
55080
55083
  return { functionName, args: evaluatedArgs };
55081
55084
  }
@@ -55098,7 +55101,7 @@ class PivotUIPlugin extends UIPlugin {
55098
55101
  return EMPTY_PIVOT_CELL;
55099
55102
  }
55100
55103
  const mainPosition = this.getters.getCellPosition(cell.id);
55101
- const result = this.getters.getFirstPivotFunction(cell.compiledFormula.tokens);
55104
+ const result = this.getters.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens);
55102
55105
  if (!result) {
55103
55106
  return EMPTY_PIVOT_CELL;
55104
55107
  }
@@ -67555,6 +67558,6 @@ exports.tokenColors = tokenColors;
67555
67558
  exports.tokenize = tokenize;
67556
67559
 
67557
67560
 
67558
- __info__.version = "17.4.0-alpha.8";
67559
- __info__.date = "2024-06-24T19:51:16.144Z";
67560
- __info__.hash = "ccd30df";
67561
+ __info__.version = "17.4.0-alpha.9";
67562
+ __info__.date = "2024-06-26T11:09:20.284Z";
67563
+ __info__.hash = "526be20";
@@ -4291,7 +4291,7 @@ declare class PivotUIPlugin extends UIPlugin {
4291
4291
  */
4292
4292
  getPivotIdFromPosition(position: CellPosition): "" | UID | undefined;
4293
4293
  isSpillPivotFormula(position: CellPosition): boolean;
4294
- getFirstPivotFunction(tokens: Token[]): {
4294
+ getFirstPivotFunction(sheetId: UID, tokens: Token[]): {
4295
4295
  functionName: string;
4296
4296
  args: (CellValue | Matrix<CellValue> | undefined)[];
4297
4297
  } | undefined;
@@ -6961,7 +6961,7 @@ declare class RoundColorPicker extends Component<Props$U, SpreadsheetChildEnv> {
6961
6961
  }
6962
6962
 
6963
6963
  interface Props$T {
6964
- title: string;
6964
+ title?: string;
6965
6965
  updateTitle: (title: string) => void;
6966
6966
  name?: string;
6967
6967
  toggleItalic?: () => void;
@@ -6977,7 +6977,10 @@ declare class ChartTitle extends Component<Props$T, SpreadsheetChildEnv> {
6977
6977
  ColorPickerWidget: typeof ColorPickerWidget;
6978
6978
  };
6979
6979
  static props: {
6980
- title: StringConstructor;
6980
+ title: {
6981
+ type: StringConstructor;
6982
+ optional: boolean;
6983
+ };
6981
6984
  updateTitle: FunctionConstructor;
6982
6985
  name: {
6983
6986
  type: StringConstructor;
@@ -7004,6 +7007,9 @@ declare class ChartTitle extends Component<Props$T, SpreadsheetChildEnv> {
7004
7007
  optional: boolean;
7005
7008
  };
7006
7009
  };
7010
+ static defaultProps: {
7011
+ title: string;
7012
+ };
7007
7013
  openedEl: HTMLElement | null;
7008
7014
  setup(): void;
7009
7015
  state: {
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 17.4.0-alpha.8
6
- * @date 2024-06-24T19:51:16.144Z
7
- * @hash ccd30df
5
+ * @version 17.4.0-alpha.9
6
+ * @date 2024-06-26T11:09:20.284Z
7
+ * @hash 526be20
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -31684,7 +31684,7 @@ class ChartTitle extends Component {
31684
31684
  static template = "o-spreadsheet.ChartTitle";
31685
31685
  static components = { Section, ColorPickerWidget };
31686
31686
  static props = {
31687
- title: String,
31687
+ title: { type: String, optional: true },
31688
31688
  updateTitle: Function,
31689
31689
  name: { type: String, optional: true },
31690
31690
  toggleItalic: { type: Function, optional: true },
@@ -31693,6 +31693,9 @@ class ChartTitle extends Component {
31693
31693
  updateColor: { type: Function, optional: true },
31694
31694
  style: { type: Object, optional: true },
31695
31695
  };
31696
+ static defaultProps = {
31697
+ title: "",
31698
+ };
31696
31699
  openedEl = null;
31697
31700
  setup() {
31698
31701
  useExternalListener(window, "click", this.onExternalClick);
@@ -55041,7 +55044,7 @@ class PivotUIPlugin extends UIPlugin {
55041
55044
  getPivotIdFromPosition(position) {
55042
55045
  const cell = this.getters.getCorrespondingFormulaCell(position);
55043
55046
  if (cell && cell.isFormula) {
55044
- const pivotFunction = this.getFirstPivotFunction(cell.compiledFormula.tokens);
55047
+ const pivotFunction = this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens);
55045
55048
  if (pivotFunction) {
55046
55049
  const pivotId = pivotFunction.args[0]?.toString();
55047
55050
  return pivotId && this.getters.getPivotId(pivotId);
@@ -55052,12 +55055,12 @@ class PivotUIPlugin extends UIPlugin {
55052
55055
  isSpillPivotFormula(position) {
55053
55056
  const cell = this.getters.getCorrespondingFormulaCell(position);
55054
55057
  if (cell && cell.isFormula) {
55055
- const pivotFunction = this.getFirstPivotFunction(cell.compiledFormula.tokens);
55058
+ const pivotFunction = this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens);
55056
55059
  return pivotFunction?.functionName === "PIVOT";
55057
55060
  }
55058
55061
  return false;
55059
55062
  }
55060
- getFirstPivotFunction(tokens) {
55063
+ getFirstPivotFunction(sheetId, tokens) {
55061
55064
  const pivotFunction = getFirstPivotFunction(tokens);
55062
55065
  if (!pivotFunction) {
55063
55066
  return undefined;
@@ -55073,7 +55076,7 @@ class PivotUIPlugin extends UIPlugin {
55073
55076
  return argAst.value;
55074
55077
  }
55075
55078
  const argsString = astToFormula(argAst);
55076
- return this.getters.evaluateFormula(this.getters.getActiveSheetId(), argsString);
55079
+ return this.getters.evaluateFormula(sheetId, argsString);
55077
55080
  });
55078
55081
  return { functionName, args: evaluatedArgs };
55079
55082
  }
@@ -55096,7 +55099,7 @@ class PivotUIPlugin extends UIPlugin {
55096
55099
  return EMPTY_PIVOT_CELL;
55097
55100
  }
55098
55101
  const mainPosition = this.getters.getCellPosition(cell.id);
55099
- const result = this.getters.getFirstPivotFunction(cell.compiledFormula.tokens);
55102
+ const result = this.getters.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens);
55100
55103
  if (!result) {
55101
55104
  return EMPTY_PIVOT_CELL;
55102
55105
  }
@@ -67510,6 +67513,6 @@ const constants = {
67510
67513
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
67511
67514
 
67512
67515
 
67513
- __info__.version = "17.4.0-alpha.8";
67514
- __info__.date = "2024-06-24T19:51:16.144Z";
67515
- __info__.hash = "ccd30df";
67516
+ __info__.version = "17.4.0-alpha.9";
67517
+ __info__.date = "2024-06-26T11:09:20.284Z";
67518
+ __info__.hash = "526be20";
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 17.4.0-alpha.8
6
- * @date 2024-06-24T19:51:16.144Z
7
- * @hash ccd30df
5
+ * @version 17.4.0-alpha.9
6
+ * @date 2024-06-26T11:09:20.284Z
7
+ * @hash 526be20
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -31685,7 +31685,7 @@ stores.inject(MyMetaStore, storeInstance);
31685
31685
  static template = "o-spreadsheet.ChartTitle";
31686
31686
  static components = { Section, ColorPickerWidget };
31687
31687
  static props = {
31688
- title: String,
31688
+ title: { type: String, optional: true },
31689
31689
  updateTitle: Function,
31690
31690
  name: { type: String, optional: true },
31691
31691
  toggleItalic: { type: Function, optional: true },
@@ -31694,6 +31694,9 @@ stores.inject(MyMetaStore, storeInstance);
31694
31694
  updateColor: { type: Function, optional: true },
31695
31695
  style: { type: Object, optional: true },
31696
31696
  };
31697
+ static defaultProps = {
31698
+ title: "",
31699
+ };
31697
31700
  openedEl = null;
31698
31701
  setup() {
31699
31702
  owl.useExternalListener(window, "click", this.onExternalClick);
@@ -55042,7 +55045,7 @@ stores.inject(MyMetaStore, storeInstance);
55042
55045
  getPivotIdFromPosition(position) {
55043
55046
  const cell = this.getters.getCorrespondingFormulaCell(position);
55044
55047
  if (cell && cell.isFormula) {
55045
- const pivotFunction = this.getFirstPivotFunction(cell.compiledFormula.tokens);
55048
+ const pivotFunction = this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens);
55046
55049
  if (pivotFunction) {
55047
55050
  const pivotId = pivotFunction.args[0]?.toString();
55048
55051
  return pivotId && this.getters.getPivotId(pivotId);
@@ -55053,12 +55056,12 @@ stores.inject(MyMetaStore, storeInstance);
55053
55056
  isSpillPivotFormula(position) {
55054
55057
  const cell = this.getters.getCorrespondingFormulaCell(position);
55055
55058
  if (cell && cell.isFormula) {
55056
- const pivotFunction = this.getFirstPivotFunction(cell.compiledFormula.tokens);
55059
+ const pivotFunction = this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens);
55057
55060
  return pivotFunction?.functionName === "PIVOT";
55058
55061
  }
55059
55062
  return false;
55060
55063
  }
55061
- getFirstPivotFunction(tokens) {
55064
+ getFirstPivotFunction(sheetId, tokens) {
55062
55065
  const pivotFunction = getFirstPivotFunction(tokens);
55063
55066
  if (!pivotFunction) {
55064
55067
  return undefined;
@@ -55074,7 +55077,7 @@ stores.inject(MyMetaStore, storeInstance);
55074
55077
  return argAst.value;
55075
55078
  }
55076
55079
  const argsString = astToFormula(argAst);
55077
- return this.getters.evaluateFormula(this.getters.getActiveSheetId(), argsString);
55080
+ return this.getters.evaluateFormula(sheetId, argsString);
55078
55081
  });
55079
55082
  return { functionName, args: evaluatedArgs };
55080
55083
  }
@@ -55097,7 +55100,7 @@ stores.inject(MyMetaStore, storeInstance);
55097
55100
  return EMPTY_PIVOT_CELL;
55098
55101
  }
55099
55102
  const mainPosition = this.getters.getCellPosition(cell.id);
55100
- const result = this.getters.getFirstPivotFunction(cell.compiledFormula.tokens);
55103
+ const result = this.getters.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens);
55101
55104
  if (!result) {
55102
55105
  return EMPTY_PIVOT_CELL;
55103
55106
  }
@@ -67554,9 +67557,9 @@ stores.inject(MyMetaStore, storeInstance);
67554
67557
  exports.tokenize = tokenize;
67555
67558
 
67556
67559
 
67557
- __info__.version = "17.4.0-alpha.8";
67558
- __info__.date = "2024-06-24T19:51:16.144Z";
67559
- __info__.hash = "ccd30df";
67560
+ __info__.version = "17.4.0-alpha.9";
67561
+ __info__.date = "2024-06-26T11:09:20.284Z";
67562
+ __info__.hash = "526be20";
67560
67563
 
67561
67564
 
67562
67565
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);