@odoo/o-spreadsheet 16.0.10 → 16.0.11

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.
@@ -6578,7 +6578,7 @@ class LineBarPieConfigPanel extends owl.Component {
6578
6578
  return !!((_a = this.state.labelsDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(32 /* CommandResult.InvalidLabelRange */));
6579
6579
  }
6580
6580
  onUpdateDataSetsHaveTitle(ev) {
6581
- this.props.updateChart({
6581
+ this.props.updateChart(this.props.figureId, {
6582
6582
  dataSetsHaveTitle: ev.target.checked,
6583
6583
  });
6584
6584
  }
@@ -6590,7 +6590,7 @@ class LineBarPieConfigPanel extends owl.Component {
6590
6590
  this.dataSeriesRanges = ranges;
6591
6591
  }
6592
6592
  onDataSeriesConfirmed() {
6593
- this.state.datasetDispatchResult = this.props.updateChart({
6593
+ this.state.datasetDispatchResult = this.props.updateChart(this.props.figureId, {
6594
6594
  dataSets: this.dataSeriesRanges,
6595
6595
  });
6596
6596
  }
@@ -6602,7 +6602,7 @@ class LineBarPieConfigPanel extends owl.Component {
6602
6602
  this.labelRange = ranges[0];
6603
6603
  }
6604
6604
  onLabelRangeConfirmed() {
6605
- this.state.labelsDispatchResult = this.props.updateChart({
6605
+ this.state.labelsDispatchResult = this.props.updateChart(this.props.figureId, {
6606
6606
  labelRange: this.labelRange,
6607
6607
  });
6608
6608
  }
@@ -6612,7 +6612,7 @@ LineBarPieConfigPanel.components = { SelectionInput };
6612
6612
 
6613
6613
  class BarConfigPanel extends LineBarPieConfigPanel {
6614
6614
  onUpdateStacked(ev) {
6615
- this.props.updateChart({
6615
+ this.props.updateChart(this.props.figureId, {
6616
6616
  stacked: ev.target.checked,
6617
6617
  });
6618
6618
  }
@@ -8360,6 +8360,18 @@ css /* scss */ `
8360
8360
  grid-template-columns: repeat(${ITEMS_PER_LINE}, 1fr);
8361
8361
  grid-gap: ${ITEM_HORIZONTAL_MARGIN * 2}px;
8362
8362
  }
8363
+ .o-color-picker-toggler {
8364
+ display: flex;
8365
+ .o-color-picker-toggler-sign {
8366
+ margin: auto auto;
8367
+ width: 55%;
8368
+ height: 55%;
8369
+ .o-icon {
8370
+ width: 100%;
8371
+ height: 100%;
8372
+ }
8373
+ }
8374
+ }
8363
8375
  .o-color-picker-line-item {
8364
8376
  width: ${ITEM_EDGE_LENGTH}px;
8365
8377
  height: ${ITEM_EDGE_LENGTH}px;
@@ -8576,17 +8588,17 @@ class LineBarPieDesignPanel extends owl.Component {
8576
8588
  this.state.fillColorTool = !this.state.fillColorTool;
8577
8589
  }
8578
8590
  updateBackgroundColor(color) {
8579
- this.props.updateChart({
8591
+ this.props.updateChart(this.props.figureId, {
8580
8592
  background: color,
8581
8593
  });
8582
8594
  }
8583
8595
  updateTitle(ev) {
8584
- this.props.updateChart({
8596
+ this.props.updateChart(this.props.figureId, {
8585
8597
  title: ev.target.value,
8586
8598
  });
8587
8599
  }
8588
8600
  updateSelect(attr, ev) {
8589
- this.props.updateChart({
8601
+ this.props.updateChart(this.props.figureId, {
8590
8602
  [attr]: ev.target.value,
8591
8603
  });
8592
8604
  }
@@ -8619,7 +8631,7 @@ class GaugeChartConfigPanel extends owl.Component {
8619
8631
  this.dataRange = ranges[0];
8620
8632
  }
8621
8633
  updateDataRange() {
8622
- this.state.dataRangeDispatchResult = this.props.updateChart({
8634
+ this.state.dataRangeDispatchResult = this.props.updateChart(this.props.figureId, {
8623
8635
  dataRange: this.dataRange,
8624
8636
  });
8625
8637
  }
@@ -8689,12 +8701,12 @@ class GaugeChartDesignPanel extends owl.Component {
8689
8701
  }
8690
8702
  updateBackgroundColor(color) {
8691
8703
  this.state.openedMenu = undefined;
8692
- this.props.updateChart({
8704
+ this.props.updateChart(this.props.figureId, {
8693
8705
  background: color,
8694
8706
  });
8695
8707
  }
8696
8708
  updateTitle(ev) {
8697
- this.props.updateChart({
8709
+ this.props.updateChart(this.props.figureId, {
8698
8710
  title: ev.target.value,
8699
8711
  });
8700
8712
  }
@@ -8763,7 +8775,7 @@ class GaugeChartDesignPanel extends owl.Component {
8763
8775
  }
8764
8776
  }
8765
8777
  updateSectionRule(sectionRule) {
8766
- this.state.sectionRuleDispatchResult = this.props.updateChart({
8778
+ this.state.sectionRuleDispatchResult = this.props.updateChart(this.props.figureId, {
8767
8779
  sectionRule,
8768
8780
  });
8769
8781
  }
@@ -8783,12 +8795,12 @@ class LineConfigPanel extends LineBarPieConfigPanel {
8783
8795
  return false;
8784
8796
  }
8785
8797
  onUpdateLabelsAsText(ev) {
8786
- this.props.updateChart({
8798
+ this.props.updateChart(this.props.figureId, {
8787
8799
  labelsAsText: ev.target.checked,
8788
8800
  });
8789
8801
  }
8790
8802
  onUpdateStacked(ev) {
8791
- this.props.updateChart({
8803
+ this.props.updateChart(this.props.figureId, {
8792
8804
  stacked: ev.target.checked,
8793
8805
  });
8794
8806
  }
@@ -8829,7 +8841,7 @@ class ScorecardChartConfigPanel extends owl.Component {
8829
8841
  this.keyValue = ranges[0];
8830
8842
  }
8831
8843
  updateKeyValueRange() {
8832
- this.state.keyValueDispatchResult = this.props.updateChart({
8844
+ this.state.keyValueDispatchResult = this.props.updateChart(this.props.figureId, {
8833
8845
  keyValue: this.keyValue,
8834
8846
  });
8835
8847
  }
@@ -8837,12 +8849,12 @@ class ScorecardChartConfigPanel extends owl.Component {
8837
8849
  this.baseline = ranges[0];
8838
8850
  }
8839
8851
  updateBaselineRange() {
8840
- this.state.baselineDispatchResult = this.props.updateChart({
8852
+ this.state.baselineDispatchResult = this.props.updateChart(this.props.figureId, {
8841
8853
  baseline: this.baseline,
8842
8854
  });
8843
8855
  }
8844
8856
  updateBaselineMode(ev) {
8845
- this.props.updateChart({ baselineMode: ev.target.value });
8857
+ this.props.updateChart(this.props.figureId, { baselineMode: ev.target.value });
8846
8858
  }
8847
8859
  }
8848
8860
  ScorecardChartConfigPanel.template = "o-spreadsheet-ScorecardChartConfigPanel";
@@ -8862,12 +8874,12 @@ class ScorecardChartDesignPanel extends owl.Component {
8862
8874
  owl.useExternalListener(window, "click", this.onClick);
8863
8875
  }
8864
8876
  updateTitle(ev) {
8865
- this.props.updateChart({
8877
+ this.props.updateChart(this.props.figureId, {
8866
8878
  title: ev.target.value,
8867
8879
  });
8868
8880
  }
8869
8881
  updateBaselineDescr(ev) {
8870
- this.props.updateChart({ baselineDescr: ev.target.value });
8882
+ this.props.updateChart(this.props.figureId, { baselineDescr: ev.target.value });
8871
8883
  }
8872
8884
  openColorPicker(colorPickerId) {
8873
8885
  this.state.openedColorPicker = colorPickerId;
@@ -8875,13 +8887,13 @@ class ScorecardChartDesignPanel extends owl.Component {
8875
8887
  setColor(color, colorPickerId) {
8876
8888
  switch (colorPickerId) {
8877
8889
  case "backgroundColor":
8878
- this.props.updateChart({ background: color });
8890
+ this.props.updateChart(this.props.figureId, { background: color });
8879
8891
  break;
8880
8892
  case "baselineColorDown":
8881
- this.props.updateChart({ baselineColorDown: color });
8893
+ this.props.updateChart(this.props.figureId, { baselineColorDown: color });
8882
8894
  break;
8883
8895
  case "baselineColorUp":
8884
- this.props.updateChart({ baselineColorUp: color });
8896
+ this.props.updateChart(this.props.figureId, { baselineColorUp: color });
8885
8897
  break;
8886
8898
  }
8887
8899
  this.state.openedColorPicker = undefined;
@@ -8945,16 +8957,9 @@ css /* scss */ `
8945
8957
  }
8946
8958
  `;
8947
8959
  class ChartPanel extends owl.Component {
8948
- constructor() {
8949
- super(...arguments);
8950
- this.shouldUpdateChart = true;
8951
- }
8952
8960
  get figureId() {
8953
8961
  return this.state.figureId;
8954
8962
  }
8955
- get sheetId() {
8956
- return this.state.sheetId;
8957
- }
8958
8963
  setup() {
8959
8964
  const selectedFigureId = this.env.model.getters.getSelectedFigureId();
8960
8965
  if (!selectedFigureId) {
@@ -8963,17 +8968,11 @@ class ChartPanel extends owl.Component {
8963
8968
  this.state = owl.useState({
8964
8969
  panel: "configuration",
8965
8970
  figureId: selectedFigureId,
8966
- sheetId: this.env.model.getters.getActiveSheetId(),
8967
8971
  });
8968
8972
  owl.onWillUpdateProps(() => {
8969
8973
  const selectedFigureId = this.env.model.getters.getSelectedFigureId();
8970
8974
  if (selectedFigureId && selectedFigureId !== this.state.figureId) {
8971
8975
  this.state.figureId = selectedFigureId;
8972
- this.state.sheetId = this.env.model.getters.getActiveSheetId();
8973
- this.shouldUpdateChart = false;
8974
- }
8975
- else {
8976
- this.shouldUpdateChart = true;
8977
8976
  }
8978
8977
  if (!this.env.model.getters.isChartDefined(this.figureId)) {
8979
8978
  this.props.onCloseSidePanel();
@@ -8981,8 +8980,8 @@ class ChartPanel extends owl.Component {
8981
8980
  }
8982
8981
  });
8983
8982
  }
8984
- updateChart(updateDefinition) {
8985
- if (!this.shouldUpdateChart) {
8983
+ updateChart(figureId, updateDefinition) {
8984
+ if (figureId !== this.figureId) {
8986
8985
  return;
8987
8986
  }
8988
8987
  const definition = {
@@ -8991,8 +8990,8 @@ class ChartPanel extends owl.Component {
8991
8990
  };
8992
8991
  return this.env.model.dispatch("UPDATE_CHART", {
8993
8992
  definition,
8994
- id: this.figureId,
8995
- sheetId: this.sheetId,
8993
+ id: figureId,
8994
+ sheetId: this.env.model.getters.getFigureSheetId(figureId),
8996
8995
  });
8997
8996
  }
8998
8997
  onTypeChange(type) {
@@ -9004,7 +9003,7 @@ class ChartPanel extends owl.Component {
9004
9003
  this.env.model.dispatch("UPDATE_CHART", {
9005
9004
  definition,
9006
9005
  id: this.figureId,
9007
- sheetId: this.sheetId,
9006
+ sheetId: this.env.model.getters.getFigureSheetId(this.figureId),
9008
9007
  });
9009
9008
  }
9010
9009
  get chartPanel() {
@@ -42803,6 +42802,6 @@ exports.setTranslationMethod = setTranslationMethod;
42803
42802
  exports.tokenize = tokenize;
42804
42803
 
42805
42804
 
42806
- __info__.version = '16.0.10';
42807
- __info__.date = '2023-05-12T10:59:27.820Z';
42808
- __info__.hash = '115eda7';
42805
+ __info__.version = '16.0.11';
42806
+ __info__.date = '2023-05-25T12:57:28.152Z';
42807
+ __info__.hash = 'd27e998';
@@ -4873,7 +4873,7 @@ declare class SelectionInput extends Component<Props$y, SpreadsheetChildEnv> {
4873
4873
  interface Props$x {
4874
4874
  figureId: UID;
4875
4875
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
4876
- updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
4876
+ updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
4877
4877
  }
4878
4878
  declare class LineBarPieConfigPanel extends Component<Props$x, SpreadsheetChildEnv> {
4879
4879
  static template: string;
@@ -4934,7 +4934,7 @@ declare class ColorPicker extends Component<ColorPickerProps, SpreadsheetChildEn
4934
4934
  interface Props$w {
4935
4935
  figureId: UID;
4936
4936
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
4937
- updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => CommandResult | CommandResult[];
4937
+ updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => CommandResult | CommandResult[];
4938
4938
  }
4939
4939
  declare class LineBarPieDesignPanel extends Component<Props$w, SpreadsheetChildEnv> {
4940
4940
  static template: string;
@@ -4953,7 +4953,7 @@ declare class LineBarPieDesignPanel extends Component<Props$w, SpreadsheetChildE
4953
4953
  interface Props$v {
4954
4954
  figureId: UID;
4955
4955
  definition: GaugeChartDefinition;
4956
- updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
4956
+ updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
4957
4957
  }
4958
4958
  declare class GaugeChartConfigPanel extends Component<Props$v, SpreadsheetChildEnv> {
4959
4959
  static template: string;
@@ -4972,7 +4972,7 @@ declare type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectio
4972
4972
  interface Props$u {
4973
4973
  figureId: UID;
4974
4974
  definition: GaugeChartDefinition;
4975
- updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
4975
+ updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
4976
4976
  }
4977
4977
  declare class GaugeChartDesignPanel extends Component<Props$u, SpreadsheetChildEnv> {
4978
4978
  static template: string;
@@ -5009,7 +5009,7 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
5009
5009
  interface Props$t {
5010
5010
  figureId: UID;
5011
5011
  definition: ScorecardChartDefinition;
5012
- updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5012
+ updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5013
5013
  }
5014
5014
  declare class ScorecardChartConfigPanel extends Component<Props$t, SpreadsheetChildEnv> {
5015
5015
  static template: string;
@@ -5033,7 +5033,7 @@ declare type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" |
5033
5033
  interface Props$s {
5034
5034
  figureId: UID;
5035
5035
  definition: ScorecardChartDefinition;
5036
- updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5036
+ updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5037
5037
  }
5038
5038
  declare class ScorecardChartDesignPanel extends Component<Props$s, SpreadsheetChildEnv> {
5039
5039
  static template: string;
@@ -6118,11 +6118,9 @@ interface Props$4 {
6118
6118
  declare class ChartPanel extends Component<Props$4, SpreadsheetChildEnv> {
6119
6119
  static template: string;
6120
6120
  private state;
6121
- private shouldUpdateChart;
6122
6121
  get figureId(): UID;
6123
- get sheetId(): UID;
6124
6122
  setup(): void;
6125
- updateChart<T extends ChartDefinition>(updateDefinition: Partial<T>): DispatchResult | undefined;
6123
+ updateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
6126
6124
  onTypeChange(type: ChartType): void;
6127
6125
  get chartPanel(): ChartSidePanel;
6128
6126
  private getChartDefinition;
@@ -6574,7 +6574,7 @@ class LineBarPieConfigPanel extends Component {
6574
6574
  return !!((_a = this.state.labelsDispatchResult) === null || _a === void 0 ? void 0 : _a.isCancelledBecause(32 /* CommandResult.InvalidLabelRange */));
6575
6575
  }
6576
6576
  onUpdateDataSetsHaveTitle(ev) {
6577
- this.props.updateChart({
6577
+ this.props.updateChart(this.props.figureId, {
6578
6578
  dataSetsHaveTitle: ev.target.checked,
6579
6579
  });
6580
6580
  }
@@ -6586,7 +6586,7 @@ class LineBarPieConfigPanel extends Component {
6586
6586
  this.dataSeriesRanges = ranges;
6587
6587
  }
6588
6588
  onDataSeriesConfirmed() {
6589
- this.state.datasetDispatchResult = this.props.updateChart({
6589
+ this.state.datasetDispatchResult = this.props.updateChart(this.props.figureId, {
6590
6590
  dataSets: this.dataSeriesRanges,
6591
6591
  });
6592
6592
  }
@@ -6598,7 +6598,7 @@ class LineBarPieConfigPanel extends Component {
6598
6598
  this.labelRange = ranges[0];
6599
6599
  }
6600
6600
  onLabelRangeConfirmed() {
6601
- this.state.labelsDispatchResult = this.props.updateChart({
6601
+ this.state.labelsDispatchResult = this.props.updateChart(this.props.figureId, {
6602
6602
  labelRange: this.labelRange,
6603
6603
  });
6604
6604
  }
@@ -6608,7 +6608,7 @@ LineBarPieConfigPanel.components = { SelectionInput };
6608
6608
 
6609
6609
  class BarConfigPanel extends LineBarPieConfigPanel {
6610
6610
  onUpdateStacked(ev) {
6611
- this.props.updateChart({
6611
+ this.props.updateChart(this.props.figureId, {
6612
6612
  stacked: ev.target.checked,
6613
6613
  });
6614
6614
  }
@@ -8356,6 +8356,18 @@ css /* scss */ `
8356
8356
  grid-template-columns: repeat(${ITEMS_PER_LINE}, 1fr);
8357
8357
  grid-gap: ${ITEM_HORIZONTAL_MARGIN * 2}px;
8358
8358
  }
8359
+ .o-color-picker-toggler {
8360
+ display: flex;
8361
+ .o-color-picker-toggler-sign {
8362
+ margin: auto auto;
8363
+ width: 55%;
8364
+ height: 55%;
8365
+ .o-icon {
8366
+ width: 100%;
8367
+ height: 100%;
8368
+ }
8369
+ }
8370
+ }
8359
8371
  .o-color-picker-line-item {
8360
8372
  width: ${ITEM_EDGE_LENGTH}px;
8361
8373
  height: ${ITEM_EDGE_LENGTH}px;
@@ -8572,17 +8584,17 @@ class LineBarPieDesignPanel extends Component {
8572
8584
  this.state.fillColorTool = !this.state.fillColorTool;
8573
8585
  }
8574
8586
  updateBackgroundColor(color) {
8575
- this.props.updateChart({
8587
+ this.props.updateChart(this.props.figureId, {
8576
8588
  background: color,
8577
8589
  });
8578
8590
  }
8579
8591
  updateTitle(ev) {
8580
- this.props.updateChart({
8592
+ this.props.updateChart(this.props.figureId, {
8581
8593
  title: ev.target.value,
8582
8594
  });
8583
8595
  }
8584
8596
  updateSelect(attr, ev) {
8585
- this.props.updateChart({
8597
+ this.props.updateChart(this.props.figureId, {
8586
8598
  [attr]: ev.target.value,
8587
8599
  });
8588
8600
  }
@@ -8615,7 +8627,7 @@ class GaugeChartConfigPanel extends Component {
8615
8627
  this.dataRange = ranges[0];
8616
8628
  }
8617
8629
  updateDataRange() {
8618
- this.state.dataRangeDispatchResult = this.props.updateChart({
8630
+ this.state.dataRangeDispatchResult = this.props.updateChart(this.props.figureId, {
8619
8631
  dataRange: this.dataRange,
8620
8632
  });
8621
8633
  }
@@ -8685,12 +8697,12 @@ class GaugeChartDesignPanel extends Component {
8685
8697
  }
8686
8698
  updateBackgroundColor(color) {
8687
8699
  this.state.openedMenu = undefined;
8688
- this.props.updateChart({
8700
+ this.props.updateChart(this.props.figureId, {
8689
8701
  background: color,
8690
8702
  });
8691
8703
  }
8692
8704
  updateTitle(ev) {
8693
- this.props.updateChart({
8705
+ this.props.updateChart(this.props.figureId, {
8694
8706
  title: ev.target.value,
8695
8707
  });
8696
8708
  }
@@ -8759,7 +8771,7 @@ class GaugeChartDesignPanel extends Component {
8759
8771
  }
8760
8772
  }
8761
8773
  updateSectionRule(sectionRule) {
8762
- this.state.sectionRuleDispatchResult = this.props.updateChart({
8774
+ this.state.sectionRuleDispatchResult = this.props.updateChart(this.props.figureId, {
8763
8775
  sectionRule,
8764
8776
  });
8765
8777
  }
@@ -8779,12 +8791,12 @@ class LineConfigPanel extends LineBarPieConfigPanel {
8779
8791
  return false;
8780
8792
  }
8781
8793
  onUpdateLabelsAsText(ev) {
8782
- this.props.updateChart({
8794
+ this.props.updateChart(this.props.figureId, {
8783
8795
  labelsAsText: ev.target.checked,
8784
8796
  });
8785
8797
  }
8786
8798
  onUpdateStacked(ev) {
8787
- this.props.updateChart({
8799
+ this.props.updateChart(this.props.figureId, {
8788
8800
  stacked: ev.target.checked,
8789
8801
  });
8790
8802
  }
@@ -8825,7 +8837,7 @@ class ScorecardChartConfigPanel extends Component {
8825
8837
  this.keyValue = ranges[0];
8826
8838
  }
8827
8839
  updateKeyValueRange() {
8828
- this.state.keyValueDispatchResult = this.props.updateChart({
8840
+ this.state.keyValueDispatchResult = this.props.updateChart(this.props.figureId, {
8829
8841
  keyValue: this.keyValue,
8830
8842
  });
8831
8843
  }
@@ -8833,12 +8845,12 @@ class ScorecardChartConfigPanel extends Component {
8833
8845
  this.baseline = ranges[0];
8834
8846
  }
8835
8847
  updateBaselineRange() {
8836
- this.state.baselineDispatchResult = this.props.updateChart({
8848
+ this.state.baselineDispatchResult = this.props.updateChart(this.props.figureId, {
8837
8849
  baseline: this.baseline,
8838
8850
  });
8839
8851
  }
8840
8852
  updateBaselineMode(ev) {
8841
- this.props.updateChart({ baselineMode: ev.target.value });
8853
+ this.props.updateChart(this.props.figureId, { baselineMode: ev.target.value });
8842
8854
  }
8843
8855
  }
8844
8856
  ScorecardChartConfigPanel.template = "o-spreadsheet-ScorecardChartConfigPanel";
@@ -8858,12 +8870,12 @@ class ScorecardChartDesignPanel extends Component {
8858
8870
  useExternalListener(window, "click", this.onClick);
8859
8871
  }
8860
8872
  updateTitle(ev) {
8861
- this.props.updateChart({
8873
+ this.props.updateChart(this.props.figureId, {
8862
8874
  title: ev.target.value,
8863
8875
  });
8864
8876
  }
8865
8877
  updateBaselineDescr(ev) {
8866
- this.props.updateChart({ baselineDescr: ev.target.value });
8878
+ this.props.updateChart(this.props.figureId, { baselineDescr: ev.target.value });
8867
8879
  }
8868
8880
  openColorPicker(colorPickerId) {
8869
8881
  this.state.openedColorPicker = colorPickerId;
@@ -8871,13 +8883,13 @@ class ScorecardChartDesignPanel extends Component {
8871
8883
  setColor(color, colorPickerId) {
8872
8884
  switch (colorPickerId) {
8873
8885
  case "backgroundColor":
8874
- this.props.updateChart({ background: color });
8886
+ this.props.updateChart(this.props.figureId, { background: color });
8875
8887
  break;
8876
8888
  case "baselineColorDown":
8877
- this.props.updateChart({ baselineColorDown: color });
8889
+ this.props.updateChart(this.props.figureId, { baselineColorDown: color });
8878
8890
  break;
8879
8891
  case "baselineColorUp":
8880
- this.props.updateChart({ baselineColorUp: color });
8892
+ this.props.updateChart(this.props.figureId, { baselineColorUp: color });
8881
8893
  break;
8882
8894
  }
8883
8895
  this.state.openedColorPicker = undefined;
@@ -8941,16 +8953,9 @@ css /* scss */ `
8941
8953
  }
8942
8954
  `;
8943
8955
  class ChartPanel extends Component {
8944
- constructor() {
8945
- super(...arguments);
8946
- this.shouldUpdateChart = true;
8947
- }
8948
8956
  get figureId() {
8949
8957
  return this.state.figureId;
8950
8958
  }
8951
- get sheetId() {
8952
- return this.state.sheetId;
8953
- }
8954
8959
  setup() {
8955
8960
  const selectedFigureId = this.env.model.getters.getSelectedFigureId();
8956
8961
  if (!selectedFigureId) {
@@ -8959,17 +8964,11 @@ class ChartPanel extends Component {
8959
8964
  this.state = useState({
8960
8965
  panel: "configuration",
8961
8966
  figureId: selectedFigureId,
8962
- sheetId: this.env.model.getters.getActiveSheetId(),
8963
8967
  });
8964
8968
  onWillUpdateProps(() => {
8965
8969
  const selectedFigureId = this.env.model.getters.getSelectedFigureId();
8966
8970
  if (selectedFigureId && selectedFigureId !== this.state.figureId) {
8967
8971
  this.state.figureId = selectedFigureId;
8968
- this.state.sheetId = this.env.model.getters.getActiveSheetId();
8969
- this.shouldUpdateChart = false;
8970
- }
8971
- else {
8972
- this.shouldUpdateChart = true;
8973
8972
  }
8974
8973
  if (!this.env.model.getters.isChartDefined(this.figureId)) {
8975
8974
  this.props.onCloseSidePanel();
@@ -8977,8 +8976,8 @@ class ChartPanel extends Component {
8977
8976
  }
8978
8977
  });
8979
8978
  }
8980
- updateChart(updateDefinition) {
8981
- if (!this.shouldUpdateChart) {
8979
+ updateChart(figureId, updateDefinition) {
8980
+ if (figureId !== this.figureId) {
8982
8981
  return;
8983
8982
  }
8984
8983
  const definition = {
@@ -8987,8 +8986,8 @@ class ChartPanel extends Component {
8987
8986
  };
8988
8987
  return this.env.model.dispatch("UPDATE_CHART", {
8989
8988
  definition,
8990
- id: this.figureId,
8991
- sheetId: this.sheetId,
8989
+ id: figureId,
8990
+ sheetId: this.env.model.getters.getFigureSheetId(figureId),
8992
8991
  });
8993
8992
  }
8994
8993
  onTypeChange(type) {
@@ -9000,7 +8999,7 @@ class ChartPanel extends Component {
9000
8999
  this.env.model.dispatch("UPDATE_CHART", {
9001
9000
  definition,
9002
9001
  id: this.figureId,
9003
- sheetId: this.sheetId,
9002
+ sheetId: this.env.model.getters.getFigureSheetId(this.figureId),
9004
9003
  });
9005
9004
  }
9006
9005
  get chartPanel() {
@@ -42771,6 +42770,6 @@ function addFunction(functionName, functionDescription) {
42771
42770
  export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
42772
42771
 
42773
42772
 
42774
- __info__.version = '16.0.10';
42775
- __info__.date = '2023-05-12T10:59:27.820Z';
42776
- __info__.hash = '115eda7';
42773
+ __info__.version = '16.0.11';
42774
+ __info__.date = '2023-05-25T12:57:28.152Z';
42775
+ __info__.hash = 'd27e998';