@odoo/o-spreadsheet 16.3.1 → 16.3.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.
@@ -1777,6 +1777,7 @@ function removeTrailingZeroes(numberString) {
1777
1777
  }
1778
1778
  return numberString.slice(0, i + 1) || undefined;
1779
1779
  }
1780
+ const leadingZeroesRegexp = /^0+/;
1780
1781
  /**
1781
1782
  * Limit the size of the decimal part of a number to the given number of digits.
1782
1783
  */
@@ -1787,17 +1788,24 @@ function limitDecimalDigits(decimalDigits, maxDecimals) {
1787
1788
  // but it has very strange behaviour. Ex: 12.345.toFixed(2) => "12.35", but 1.345.toFixed(2) => "1.34"
1788
1789
  let slicedDecimalDigits = decimalDigits.slice(0, maxDecimals);
1789
1790
  const i = maxDecimals;
1790
- if (Number(Number(decimalDigits[i]) < 5)) {
1791
+ if (Number(decimalDigits[i]) < 5) {
1791
1792
  return { integerDigits, decimalDigits: slicedDecimalDigits };
1792
1793
  }
1793
1794
  // round up
1795
+ const leadingZeroes = slicedDecimalDigits.match(leadingZeroesRegexp)?.[0] || "";
1794
1796
  const slicedRoundedUp = (Number(slicedDecimalDigits) + 1).toString();
1795
- if (slicedRoundedUp.length > slicedDecimalDigits.length) {
1796
- integerDigits = (Number(integerDigits) + 1).toString();
1797
+ const withoutLeadingZeroes = slicedDecimalDigits.slice(leadingZeroes.length);
1798
+ // e.g. carry over from 99 to 100
1799
+ const carryOver = slicedRoundedUp.length > withoutLeadingZeroes.length;
1800
+ if (carryOver && !leadingZeroes) {
1801
+ integerDigits = "1";
1797
1802
  resultDecimalDigits = undefined;
1798
1803
  }
1804
+ else if (carryOver) {
1805
+ resultDecimalDigits = leadingZeroes.slice(0, -1) + slicedRoundedUp;
1806
+ }
1799
1807
  else {
1800
- resultDecimalDigits = slicedRoundedUp;
1808
+ resultDecimalDigits = leadingZeroes + slicedRoundedUp;
1801
1809
  }
1802
1810
  return { integerDigits, decimalDigits: resultDecimalDigits };
1803
1811
  }
@@ -17844,7 +17852,7 @@ class LineBarPieConfigPanel extends owl.Component {
17844
17852
  return !!this.state.labelsDispatchResult?.isCancelledBecause(33 /* CommandResult.InvalidLabelRange */);
17845
17853
  }
17846
17854
  onUpdateDataSetsHaveTitle(ev) {
17847
- this.props.updateChart({
17855
+ this.props.updateChart(this.props.figureId, {
17848
17856
  dataSetsHaveTitle: ev.target.checked,
17849
17857
  });
17850
17858
  }
@@ -17856,7 +17864,7 @@ class LineBarPieConfigPanel extends owl.Component {
17856
17864
  this.dataSeriesRanges = ranges;
17857
17865
  }
17858
17866
  onDataSeriesConfirmed() {
17859
- this.state.datasetDispatchResult = this.props.updateChart({
17867
+ this.state.datasetDispatchResult = this.props.updateChart(this.props.figureId, {
17860
17868
  dataSets: this.dataSeriesRanges,
17861
17869
  });
17862
17870
  }
@@ -17868,12 +17876,12 @@ class LineBarPieConfigPanel extends owl.Component {
17868
17876
  this.labelRange = ranges[0];
17869
17877
  }
17870
17878
  onLabelRangeConfirmed() {
17871
- this.state.labelsDispatchResult = this.props.updateChart({
17879
+ this.state.labelsDispatchResult = this.props.updateChart(this.props.figureId, {
17872
17880
  labelRange: this.labelRange,
17873
17881
  });
17874
17882
  }
17875
17883
  onUpdateAggregated(ev) {
17876
- this.props.updateChart({
17884
+ this.props.updateChart(this.props.figureId, {
17877
17885
  aggregated: ev.target.checked,
17878
17886
  });
17879
17887
  }
@@ -17903,12 +17911,12 @@ LineBarPieConfigPanel.props = {
17903
17911
  class BarConfigPanel extends LineBarPieConfigPanel {
17904
17912
  static template = "o-spreadsheet-BarConfigPanel";
17905
17913
  onUpdateStacked(ev) {
17906
- this.props.updateChart({
17914
+ this.props.updateChart(this.props.figureId, {
17907
17915
  stacked: ev.target.checked,
17908
17916
  });
17909
17917
  }
17910
17918
  onUpdateAggregated(ev) {
17911
- this.props.updateChart({
17919
+ this.props.updateChart(this.props.figureId, {
17912
17920
  aggregated: ev.target.checked,
17913
17921
  });
17914
17922
  }
@@ -17948,6 +17956,7 @@ css /* scss */ `
17948
17956
  .o-color-picker-toggler-button {
17949
17957
  display: flex;
17950
17958
  .o-color-picker-toggler-sign {
17959
+ display: flex;
17951
17960
  margin: auto auto;
17952
17961
  width: 55%;
17953
17962
  height: 55%;
@@ -18245,17 +18254,17 @@ class LineBarPieDesignPanel extends owl.Component {
18245
18254
  this.state.fillColorTool = !this.state.fillColorTool;
18246
18255
  }
18247
18256
  updateBackgroundColor(color) {
18248
- this.props.updateChart({
18257
+ this.props.updateChart(this.props.figureId, {
18249
18258
  background: color,
18250
18259
  });
18251
18260
  }
18252
18261
  updateTitle(ev) {
18253
- this.props.updateChart({
18262
+ this.props.updateChart(this.props.figureId, {
18254
18263
  title: ev.target.value,
18255
18264
  });
18256
18265
  }
18257
18266
  updateSelect(attr, ev) {
18258
- this.props.updateChart({
18267
+ this.props.updateChart(this.props.figureId, {
18259
18268
  [attr]: ev.target.value,
18260
18269
  });
18261
18270
  }
@@ -18288,7 +18297,7 @@ class GaugeChartConfigPanel extends owl.Component {
18288
18297
  this.dataRange = ranges[0];
18289
18298
  }
18290
18299
  updateDataRange() {
18291
- this.state.dataRangeDispatchResult = this.props.updateChart({
18300
+ this.state.dataRangeDispatchResult = this.props.updateChart(this.props.figureId, {
18292
18301
  dataRange: this.dataRange,
18293
18302
  });
18294
18303
  }
@@ -18346,12 +18355,12 @@ class GaugeChartDesignPanel extends owl.Component {
18346
18355
  }
18347
18356
  updateBackgroundColor(color) {
18348
18357
  this.state.openedMenu = undefined;
18349
- this.props.updateChart({
18358
+ this.props.updateChart(this.props.figureId, {
18350
18359
  background: color,
18351
18360
  });
18352
18361
  }
18353
18362
  updateTitle(ev) {
18354
- this.props.updateChart({
18363
+ this.props.updateChart(this.props.figureId, {
18355
18364
  title: ev.target.value,
18356
18365
  });
18357
18366
  }
@@ -18416,7 +18425,7 @@ class GaugeChartDesignPanel extends owl.Component {
18416
18425
  }
18417
18426
  }
18418
18427
  updateSectionRule(sectionRule) {
18419
- this.state.sectionRuleDispatchResult = this.props.updateChart({
18428
+ this.state.sectionRuleDispatchResult = this.props.updateChart(this.props.figureId, {
18420
18429
  sectionRule,
18421
18430
  });
18422
18431
  }
@@ -18440,17 +18449,17 @@ class LineConfigPanel extends LineBarPieConfigPanel {
18440
18449
  return false;
18441
18450
  }
18442
18451
  onUpdateLabelsAsText(ev) {
18443
- this.props.updateChart({
18452
+ this.props.updateChart(this.props.figureId, {
18444
18453
  labelsAsText: ev.target.checked,
18445
18454
  });
18446
18455
  }
18447
18456
  onUpdateStacked(ev) {
18448
- this.props.updateChart({
18457
+ this.props.updateChart(this.props.figureId, {
18449
18458
  stacked: ev.target.checked,
18450
18459
  });
18451
18460
  }
18452
18461
  onUpdateAggregated(ev) {
18453
- this.props.updateChart({
18462
+ this.props.updateChart(this.props.figureId, {
18454
18463
  aggregated: ev.target.checked,
18455
18464
  });
18456
18465
  }
@@ -18486,7 +18495,7 @@ class ScorecardChartConfigPanel extends owl.Component {
18486
18495
  this.keyValue = ranges[0];
18487
18496
  }
18488
18497
  updateKeyValueRange() {
18489
- this.state.keyValueDispatchResult = this.props.updateChart({
18498
+ this.state.keyValueDispatchResult = this.props.updateChart(this.props.figureId, {
18490
18499
  keyValue: this.keyValue,
18491
18500
  });
18492
18501
  }
@@ -18494,12 +18503,12 @@ class ScorecardChartConfigPanel extends owl.Component {
18494
18503
  this.baseline = ranges[0];
18495
18504
  }
18496
18505
  updateBaselineRange() {
18497
- this.state.baselineDispatchResult = this.props.updateChart({
18506
+ this.state.baselineDispatchResult = this.props.updateChart(this.props.figureId, {
18498
18507
  baseline: this.baseline,
18499
18508
  });
18500
18509
  }
18501
18510
  updateBaselineMode(ev) {
18502
- this.props.updateChart({ baselineMode: ev.target.value });
18511
+ this.props.updateChart(this.props.figureId, { baselineMode: ev.target.value });
18503
18512
  }
18504
18513
  }
18505
18514
  ScorecardChartConfigPanel.props = {
@@ -18518,12 +18527,12 @@ class ScorecardChartDesignPanel extends owl.Component {
18518
18527
  owl.useExternalListener(window, "click", this.closeMenus);
18519
18528
  }
18520
18529
  updateTitle(ev) {
18521
- this.props.updateChart({
18530
+ this.props.updateChart(this.props.figureId, {
18522
18531
  title: ev.target.value,
18523
18532
  });
18524
18533
  }
18525
18534
  updateBaselineDescr(ev) {
18526
- this.props.updateChart({ baselineDescr: ev.target.value });
18535
+ this.props.updateChart(this.props.figureId, { baselineDescr: ev.target.value });
18527
18536
  }
18528
18537
  toggleColorPicker(colorPickerId) {
18529
18538
  if (this.state.openedColorPicker === colorPickerId) {
@@ -18536,13 +18545,13 @@ class ScorecardChartDesignPanel extends owl.Component {
18536
18545
  setColor(color, colorPickerId) {
18537
18546
  switch (colorPickerId) {
18538
18547
  case "backgroundColor":
18539
- this.props.updateChart({ background: color });
18548
+ this.props.updateChart(this.props.figureId, { background: color });
18540
18549
  break;
18541
18550
  case "baselineColorDown":
18542
- this.props.updateChart({ baselineColorDown: color });
18551
+ this.props.updateChart(this.props.figureId, { baselineColorDown: color });
18543
18552
  break;
18544
18553
  case "baselineColorUp":
18545
- this.props.updateChart({ baselineColorUp: color });
18554
+ this.props.updateChart(this.props.figureId, { baselineColorUp: color });
18546
18555
  break;
18547
18556
  }
18548
18557
  this.closeMenus();
@@ -18607,13 +18616,9 @@ css /* scss */ `
18607
18616
  class ChartPanel extends owl.Component {
18608
18617
  static template = "o-spreadsheet-ChartPanel";
18609
18618
  state;
18610
- shouldUpdateChart = true;
18611
18619
  get figureId() {
18612
18620
  return this.state.figureId;
18613
18621
  }
18614
- get sheetId() {
18615
- return this.state.sheetId;
18616
- }
18617
18622
  setup() {
18618
18623
  const selectedFigureId = this.env.model.getters.getSelectedFigureId();
18619
18624
  if (!selectedFigureId) {
@@ -18623,17 +18628,11 @@ class ChartPanel extends owl.Component {
18623
18628
  this.state = owl.useState({
18624
18629
  panel: "configuration",
18625
18630
  figureId: selectedFigureId,
18626
- sheetId: this.env.model.getters.getActiveSheetId(),
18627
18631
  });
18628
18632
  owl.onWillUpdateProps(() => {
18629
18633
  const selectedFigureId = this.env.model.getters.getSelectedFigureId();
18630
18634
  if (selectedFigureId && selectedFigureId !== this.state.figureId) {
18631
18635
  this.state.figureId = selectedFigureId;
18632
- this.state.sheetId = this.env.model.getters.getActiveSheetId();
18633
- this.shouldUpdateChart = false;
18634
- }
18635
- else {
18636
- this.shouldUpdateChart = true;
18637
18636
  }
18638
18637
  if (!this.env.model.getters.isChartDefined(this.figureId)) {
18639
18638
  this.props.onCloseSidePanel();
@@ -18641,8 +18640,8 @@ class ChartPanel extends owl.Component {
18641
18640
  }
18642
18641
  });
18643
18642
  }
18644
- updateChart(updateDefinition) {
18645
- if (!this.shouldUpdateChart) {
18643
+ updateChart(figureId, updateDefinition) {
18644
+ if (figureId !== this.figureId) {
18646
18645
  return;
18647
18646
  }
18648
18647
  const definition = {
@@ -18651,8 +18650,8 @@ class ChartPanel extends owl.Component {
18651
18650
  };
18652
18651
  return this.env.model.dispatch("UPDATE_CHART", {
18653
18652
  definition,
18654
- id: this.figureId,
18655
- sheetId: this.sheetId,
18653
+ id: figureId,
18654
+ sheetId: this.env.model.getters.getFigureSheetId(figureId),
18656
18655
  });
18657
18656
  }
18658
18657
  onTypeChange(type) {
@@ -18664,7 +18663,7 @@ class ChartPanel extends owl.Component {
18664
18663
  this.env.model.dispatch("UPDATE_CHART", {
18665
18664
  definition,
18666
18665
  id: this.figureId,
18667
- sheetId: this.sheetId,
18666
+ sheetId: this.env.model.getters.getFigureSheetId(this.figureId),
18668
18667
  });
18669
18668
  }
18670
18669
  get chartPanel() {
@@ -24485,6 +24484,16 @@ const XLSX_INDEXED_COLORS = {
24485
24484
  63: "333333",
24486
24485
  64: "000000",
24487
24486
  65: "FFFFFF", // system background
24487
+ };
24488
+ const IMAGE_MIMETYPE_EXTENSION_MAPPING = {
24489
+ "image/avif": "avif",
24490
+ "image/bmp": "bmp",
24491
+ "image/gif": "gif",
24492
+ "image/vnd.microsoft.icon": "ico",
24493
+ "image/jpeg": "jpeg",
24494
+ "image/png": "png",
24495
+ "image/tiff": "tiff",
24496
+ "image/webp": "webp",
24488
24497
  };
24489
24498
 
24490
24499
  /**
@@ -26966,6 +26975,11 @@ function createOverride(partName, contentType) {
26966
26975
  <Override ContentType="${contentType}" PartName="${partName}" />
26967
26976
  `;
26968
26977
  }
26978
+ function createDefaultXMLElement(extension, contentType) {
26979
+ return escapeXml /*xml*/ `
26980
+ <Default Extension="${extension}" ContentType="${contentType}" />
26981
+ `;
26982
+ }
26969
26983
  function joinXmlNodes(xmlNodes) {
26970
26984
  return new XMLString(xmlNodes.join("\n"));
26971
26985
  }
@@ -41733,7 +41747,7 @@ class ImageProvider {
41733
41747
  const file = await this.getImageFromUser();
41734
41748
  const path = await this.fileStore.upload(file);
41735
41749
  const size = await this.getImageSize(path);
41736
- return { path, size };
41750
+ return { path, size, mimetype: file.type };
41737
41751
  }
41738
41752
  getImageFromUser() {
41739
41753
  return new Promise((resolve, reject) => {
@@ -46814,8 +46828,7 @@ function createWorksheets(data, construct) {
46814
46828
  // Figures and Charts
46815
46829
  let drawingNode = escapeXml ``;
46816
46830
  const drawingRelIds = [];
46817
- const charts = sheet.charts;
46818
- for (const chart of charts) {
46831
+ for (const chart of sheet.charts) {
46819
46832
  const xlsxChartId = convertChartId(chart.id);
46820
46833
  const chartRelId = addRelsToFile(construct.relsFiles, `xl/drawings/_rels/drawing${sheetIndex}.xml.rels`, {
46821
46834
  target: `../charts/chart${xlsxChartId}.xml`,
@@ -46824,20 +46837,27 @@ function createWorksheets(data, construct) {
46824
46837
  drawingRelIds.push(chartRelId);
46825
46838
  files.push(createXMLFile(createChart(chart, sheetIndex, data), `xl/charts/chart${xlsxChartId}.xml`, "chart"));
46826
46839
  }
46827
- const images = sheet.images;
46828
- for (const image of images) {
46840
+ for (const image of sheet.images) {
46841
+ const mimeType = image.data.mimetype;
46842
+ if (mimeType === undefined)
46843
+ continue;
46844
+ const extension = IMAGE_MIMETYPE_EXTENSION_MAPPING[mimeType];
46845
+ // only support exporting images with mimetypes specified in the mapping
46846
+ if (extension === undefined)
46847
+ continue;
46829
46848
  const xlsxImageId = convertImageId(image.id);
46849
+ let imageFileName = `image${xlsxImageId}.${extension}`;
46830
46850
  const imageRelId = addRelsToFile(construct.relsFiles, `xl/drawings/_rels/drawing${sheetIndex}.xml.rels`, {
46831
- target: `../media/image${xlsxImageId}`,
46851
+ target: `../media/${imageFileName}`,
46832
46852
  type: XLSX_RELATION_TYPE.image,
46833
46853
  });
46834
46854
  drawingRelIds.push(imageRelId);
46835
46855
  files.push({
46836
- path: `xl/media/image${xlsxImageId}`,
46837
- imagePath: image.data.path,
46856
+ path: `xl/media/${imageFileName}`,
46857
+ imageSrc: image.data.path,
46838
46858
  });
46839
46859
  }
46840
- const drawings = [...charts, ...images];
46860
+ const drawings = [...sheet.charts, ...sheet.images];
46841
46861
  if (drawings.length) {
46842
46862
  const drawingRelId = addRelsToFile(construct.relsFiles, `xl/worksheets/_rels/sheet${sheetIndex}.xml.rels`, {
46843
46863
  target: `../drawings/drawing${sheetIndex}.xml`,
@@ -46956,6 +46976,8 @@ function createRelsFiles(relsFiles) {
46956
46976
  }
46957
46977
  function createContentTypes(files) {
46958
46978
  const overrideNodes = [];
46979
+ // hard-code supported image mimetypes
46980
+ const imageDefaultNodes = Object.entries(IMAGE_MIMETYPE_EXTENSION_MAPPING).map(([mimetype, extension]) => createDefaultXMLElement(extension, mimetype));
46959
46981
  for (const file of files) {
46960
46982
  if ("contentType" in file && file.contentType) {
46961
46983
  overrideNodes.push(createOverride("/" + file.path, CONTENT_TYPES[file.contentType]));
@@ -46971,6 +46993,7 @@ function createContentTypes(files) {
46971
46993
  ];
46972
46994
  const xml = escapeXml /*xml*/ `
46973
46995
  <Types xmlns="${NAMESPACE["Types"]}">
46996
+ ${joinXmlNodes(Object.values(imageDefaultNodes))}
46974
46997
  <Default ${formatAttributes(relsAttributes)} />
46975
46998
  <Default ${formatAttributes(xmlAttributes)} />
46976
46999
  ${joinXmlNodes(overrideNodes)}
@@ -47583,6 +47606,6 @@ exports.setTranslationMethod = setTranslationMethod;
47583
47606
  exports.tokenize = tokenize;
47584
47607
 
47585
47608
 
47586
- __info__.version = '16.3.1';
47587
- __info__.date = '2023-05-25T13:00:27.320Z';
47588
- __info__.hash = 'b3cfd2c';
47609
+ __info__.version = '16.3.3';
47610
+ __info__.date = '2023-06-12T13:50:01.114Z';
47611
+ __info__.hash = 'd3ab96f';
@@ -297,7 +297,7 @@ interface XLSXExportXMLFile {
297
297
  }
298
298
  interface XLSXExportImageFile {
299
299
  path: string;
300
- imagePath: string;
300
+ imageSrc: string;
301
301
  }
302
302
  interface XLSXExport {
303
303
  name: string;
@@ -574,6 +574,7 @@ declare type ResizeDirection = -1 | 0 | 1;
574
574
  interface Image {
575
575
  path: string;
576
576
  size: FigureSize;
577
+ mimetype?: string;
577
578
  }
578
579
 
579
580
  interface CellData {
@@ -5026,7 +5027,7 @@ declare class SelectionInput extends Component<Props$D, SpreadsheetChildEnv> {
5026
5027
  interface Props$C {
5027
5028
  figureId: UID;
5028
5029
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5029
- updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5030
+ updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => DispatchResult;
5030
5031
  }
5031
5032
  declare class LineBarPieConfigPanel extends Component<Props$C, SpreadsheetChildEnv> {
5032
5033
  static template: string;
@@ -5173,7 +5174,7 @@ declare class ColorPickerWidget extends Component<Props$B, SpreadsheetChildEnv>
5173
5174
  interface Props$A {
5174
5175
  figureId: UID;
5175
5176
  definition: LineChartDefinition | BarChartDefinition | PieChartDefinition;
5176
- updateChart: (definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => CommandResult | CommandResult[];
5177
+ updateChart: (figureId: UID, definition: Partial<LineChartDefinition | BarChartDefinition | PieChartDefinition>) => CommandResult | CommandResult[];
5177
5178
  }
5178
5179
  declare class LineBarPieDesignPanel extends Component<Props$A, SpreadsheetChildEnv> {
5179
5180
  static template: string;
@@ -5192,7 +5193,7 @@ declare class LineBarPieDesignPanel extends Component<Props$A, SpreadsheetChildE
5192
5193
  interface Props$z {
5193
5194
  figureId: UID;
5194
5195
  definition: GaugeChartDefinition;
5195
- updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
5196
+ updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5196
5197
  }
5197
5198
  declare class GaugeChartConfigPanel extends Component<Props$z, SpreadsheetChildEnv> {
5198
5199
  static template: string;
@@ -5211,7 +5212,7 @@ declare type GaugeMenu = "backgroundColor" | "sectionColor-lowerColor" | "sectio
5211
5212
  interface Props$y {
5212
5213
  figureId: UID;
5213
5214
  definition: GaugeChartDefinition;
5214
- updateChart: (definition: Partial<GaugeChartDefinition>) => DispatchResult;
5215
+ updateChart: (figureId: UID, definition: Partial<GaugeChartDefinition>) => DispatchResult;
5215
5216
  }
5216
5217
  declare class GaugeChartDesignPanel extends Component<Props$y, SpreadsheetChildEnv> {
5217
5218
  static template: string;
@@ -5248,7 +5249,7 @@ declare class LineConfigPanel extends LineBarPieConfigPanel {
5248
5249
  interface Props$x {
5249
5250
  figureId: UID;
5250
5251
  definition: ScorecardChartDefinition;
5251
- updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5252
+ updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5252
5253
  }
5253
5254
  declare class ScorecardChartConfigPanel extends Component<Props$x, SpreadsheetChildEnv> {
5254
5255
  static template: string;
@@ -5272,7 +5273,7 @@ declare type ColorPickerId = undefined | "backgroundColor" | "baselineColorUp" |
5272
5273
  interface Props$w {
5273
5274
  figureId: UID;
5274
5275
  definition: ScorecardChartDefinition;
5275
- updateChart: (definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5276
+ updateChart: (figureId: UID, definition: Partial<ScorecardChartDefinition>) => DispatchResult;
5276
5277
  }
5277
5278
  declare class ScorecardChartDesignPanel extends Component<Props$w, SpreadsheetChildEnv> {
5278
5279
  static template: string;
@@ -7018,11 +7019,9 @@ interface Props {
7018
7019
  declare class ChartPanel extends Component<Props, SpreadsheetChildEnv> {
7019
7020
  static template: string;
7020
7021
  private state;
7021
- private shouldUpdateChart;
7022
7022
  get figureId(): UID;
7023
- get sheetId(): UID;
7024
7023
  setup(): void;
7025
- updateChart<T extends ChartDefinition>(updateDefinition: Partial<T>): DispatchResult | undefined;
7024
+ updateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
7026
7025
  onTypeChange(type: ChartType): void;
7027
7026
  get chartPanel(): ChartSidePanel;
7028
7027
  private getChartDefinition;