@odoo/o-spreadsheet 16.3.0 → 16.3.2

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.
@@ -16873,6 +16873,7 @@ const unFreezePane = {
16873
16873
  execute: (env) => env.model.dispatch("UNFREEZE_COLUMNS_ROWS", {
16874
16874
  sheetId: env.model.getters.getActiveSheetId(),
16875
16875
  }),
16876
+ icon: "o-spreadsheet-Icon.UNFREEZE",
16876
16877
  };
16877
16878
  const freezePane = {
16878
16879
  name: _lt("Freeze"),
@@ -17843,7 +17844,7 @@ class LineBarPieConfigPanel extends owl.Component {
17843
17844
  return !!this.state.labelsDispatchResult?.isCancelledBecause(33 /* CommandResult.InvalidLabelRange */);
17844
17845
  }
17845
17846
  onUpdateDataSetsHaveTitle(ev) {
17846
- this.props.updateChart({
17847
+ this.props.updateChart(this.props.figureId, {
17847
17848
  dataSetsHaveTitle: ev.target.checked,
17848
17849
  });
17849
17850
  }
@@ -17855,7 +17856,7 @@ class LineBarPieConfigPanel extends owl.Component {
17855
17856
  this.dataSeriesRanges = ranges;
17856
17857
  }
17857
17858
  onDataSeriesConfirmed() {
17858
- this.state.datasetDispatchResult = this.props.updateChart({
17859
+ this.state.datasetDispatchResult = this.props.updateChart(this.props.figureId, {
17859
17860
  dataSets: this.dataSeriesRanges,
17860
17861
  });
17861
17862
  }
@@ -17867,12 +17868,12 @@ class LineBarPieConfigPanel extends owl.Component {
17867
17868
  this.labelRange = ranges[0];
17868
17869
  }
17869
17870
  onLabelRangeConfirmed() {
17870
- this.state.labelsDispatchResult = this.props.updateChart({
17871
+ this.state.labelsDispatchResult = this.props.updateChart(this.props.figureId, {
17871
17872
  labelRange: this.labelRange,
17872
17873
  });
17873
17874
  }
17874
17875
  onUpdateAggregated(ev) {
17875
- this.props.updateChart({
17876
+ this.props.updateChart(this.props.figureId, {
17876
17877
  aggregated: ev.target.checked,
17877
17878
  });
17878
17879
  }
@@ -17902,12 +17903,12 @@ LineBarPieConfigPanel.props = {
17902
17903
  class BarConfigPanel extends LineBarPieConfigPanel {
17903
17904
  static template = "o-spreadsheet-BarConfigPanel";
17904
17905
  onUpdateStacked(ev) {
17905
- this.props.updateChart({
17906
+ this.props.updateChart(this.props.figureId, {
17906
17907
  stacked: ev.target.checked,
17907
17908
  });
17908
17909
  }
17909
17910
  onUpdateAggregated(ev) {
17910
- this.props.updateChart({
17911
+ this.props.updateChart(this.props.figureId, {
17911
17912
  aggregated: ev.target.checked,
17912
17913
  });
17913
17914
  }
@@ -17944,6 +17945,18 @@ css /* scss */ `
17944
17945
  grid-template-columns: repeat(${ITEMS_PER_LINE}, 1fr);
17945
17946
  grid-gap: ${ITEM_HORIZONTAL_MARGIN * 2}px;
17946
17947
  }
17948
+ .o-color-picker-toggler-button {
17949
+ display: flex;
17950
+ .o-color-picker-toggler-sign {
17951
+ margin: auto auto;
17952
+ width: 55%;
17953
+ height: 55%;
17954
+ .o-icon {
17955
+ width: 100%;
17956
+ height: 100%;
17957
+ }
17958
+ }
17959
+ }
17947
17960
  .o-color-picker-line-item {
17948
17961
  width: ${ITEM_EDGE_LENGTH}px;
17949
17962
  height: ${ITEM_EDGE_LENGTH}px;
@@ -18232,17 +18245,17 @@ class LineBarPieDesignPanel extends owl.Component {
18232
18245
  this.state.fillColorTool = !this.state.fillColorTool;
18233
18246
  }
18234
18247
  updateBackgroundColor(color) {
18235
- this.props.updateChart({
18248
+ this.props.updateChart(this.props.figureId, {
18236
18249
  background: color,
18237
18250
  });
18238
18251
  }
18239
18252
  updateTitle(ev) {
18240
- this.props.updateChart({
18253
+ this.props.updateChart(this.props.figureId, {
18241
18254
  title: ev.target.value,
18242
18255
  });
18243
18256
  }
18244
18257
  updateSelect(attr, ev) {
18245
- this.props.updateChart({
18258
+ this.props.updateChart(this.props.figureId, {
18246
18259
  [attr]: ev.target.value,
18247
18260
  });
18248
18261
  }
@@ -18275,7 +18288,7 @@ class GaugeChartConfigPanel extends owl.Component {
18275
18288
  this.dataRange = ranges[0];
18276
18289
  }
18277
18290
  updateDataRange() {
18278
- this.state.dataRangeDispatchResult = this.props.updateChart({
18291
+ this.state.dataRangeDispatchResult = this.props.updateChart(this.props.figureId, {
18279
18292
  dataRange: this.dataRange,
18280
18293
  });
18281
18294
  }
@@ -18333,12 +18346,12 @@ class GaugeChartDesignPanel extends owl.Component {
18333
18346
  }
18334
18347
  updateBackgroundColor(color) {
18335
18348
  this.state.openedMenu = undefined;
18336
- this.props.updateChart({
18349
+ this.props.updateChart(this.props.figureId, {
18337
18350
  background: color,
18338
18351
  });
18339
18352
  }
18340
18353
  updateTitle(ev) {
18341
- this.props.updateChart({
18354
+ this.props.updateChart(this.props.figureId, {
18342
18355
  title: ev.target.value,
18343
18356
  });
18344
18357
  }
@@ -18403,7 +18416,7 @@ class GaugeChartDesignPanel extends owl.Component {
18403
18416
  }
18404
18417
  }
18405
18418
  updateSectionRule(sectionRule) {
18406
- this.state.sectionRuleDispatchResult = this.props.updateChart({
18419
+ this.state.sectionRuleDispatchResult = this.props.updateChart(this.props.figureId, {
18407
18420
  sectionRule,
18408
18421
  });
18409
18422
  }
@@ -18427,17 +18440,17 @@ class LineConfigPanel extends LineBarPieConfigPanel {
18427
18440
  return false;
18428
18441
  }
18429
18442
  onUpdateLabelsAsText(ev) {
18430
- this.props.updateChart({
18443
+ this.props.updateChart(this.props.figureId, {
18431
18444
  labelsAsText: ev.target.checked,
18432
18445
  });
18433
18446
  }
18434
18447
  onUpdateStacked(ev) {
18435
- this.props.updateChart({
18448
+ this.props.updateChart(this.props.figureId, {
18436
18449
  stacked: ev.target.checked,
18437
18450
  });
18438
18451
  }
18439
18452
  onUpdateAggregated(ev) {
18440
- this.props.updateChart({
18453
+ this.props.updateChart(this.props.figureId, {
18441
18454
  aggregated: ev.target.checked,
18442
18455
  });
18443
18456
  }
@@ -18473,7 +18486,7 @@ class ScorecardChartConfigPanel extends owl.Component {
18473
18486
  this.keyValue = ranges[0];
18474
18487
  }
18475
18488
  updateKeyValueRange() {
18476
- this.state.keyValueDispatchResult = this.props.updateChart({
18489
+ this.state.keyValueDispatchResult = this.props.updateChart(this.props.figureId, {
18477
18490
  keyValue: this.keyValue,
18478
18491
  });
18479
18492
  }
@@ -18481,12 +18494,12 @@ class ScorecardChartConfigPanel extends owl.Component {
18481
18494
  this.baseline = ranges[0];
18482
18495
  }
18483
18496
  updateBaselineRange() {
18484
- this.state.baselineDispatchResult = this.props.updateChart({
18497
+ this.state.baselineDispatchResult = this.props.updateChart(this.props.figureId, {
18485
18498
  baseline: this.baseline,
18486
18499
  });
18487
18500
  }
18488
18501
  updateBaselineMode(ev) {
18489
- this.props.updateChart({ baselineMode: ev.target.value });
18502
+ this.props.updateChart(this.props.figureId, { baselineMode: ev.target.value });
18490
18503
  }
18491
18504
  }
18492
18505
  ScorecardChartConfigPanel.props = {
@@ -18505,12 +18518,12 @@ class ScorecardChartDesignPanel extends owl.Component {
18505
18518
  owl.useExternalListener(window, "click", this.closeMenus);
18506
18519
  }
18507
18520
  updateTitle(ev) {
18508
- this.props.updateChart({
18521
+ this.props.updateChart(this.props.figureId, {
18509
18522
  title: ev.target.value,
18510
18523
  });
18511
18524
  }
18512
18525
  updateBaselineDescr(ev) {
18513
- this.props.updateChart({ baselineDescr: ev.target.value });
18526
+ this.props.updateChart(this.props.figureId, { baselineDescr: ev.target.value });
18514
18527
  }
18515
18528
  toggleColorPicker(colorPickerId) {
18516
18529
  if (this.state.openedColorPicker === colorPickerId) {
@@ -18523,13 +18536,13 @@ class ScorecardChartDesignPanel extends owl.Component {
18523
18536
  setColor(color, colorPickerId) {
18524
18537
  switch (colorPickerId) {
18525
18538
  case "backgroundColor":
18526
- this.props.updateChart({ background: color });
18539
+ this.props.updateChart(this.props.figureId, { background: color });
18527
18540
  break;
18528
18541
  case "baselineColorDown":
18529
- this.props.updateChart({ baselineColorDown: color });
18542
+ this.props.updateChart(this.props.figureId, { baselineColorDown: color });
18530
18543
  break;
18531
18544
  case "baselineColorUp":
18532
- this.props.updateChart({ baselineColorUp: color });
18545
+ this.props.updateChart(this.props.figureId, { baselineColorUp: color });
18533
18546
  break;
18534
18547
  }
18535
18548
  this.closeMenus();
@@ -18594,13 +18607,9 @@ css /* scss */ `
18594
18607
  class ChartPanel extends owl.Component {
18595
18608
  static template = "o-spreadsheet-ChartPanel";
18596
18609
  state;
18597
- shouldUpdateChart = true;
18598
18610
  get figureId() {
18599
18611
  return this.state.figureId;
18600
18612
  }
18601
- get sheetId() {
18602
- return this.state.sheetId;
18603
- }
18604
18613
  setup() {
18605
18614
  const selectedFigureId = this.env.model.getters.getSelectedFigureId();
18606
18615
  if (!selectedFigureId) {
@@ -18610,17 +18619,11 @@ class ChartPanel extends owl.Component {
18610
18619
  this.state = owl.useState({
18611
18620
  panel: "configuration",
18612
18621
  figureId: selectedFigureId,
18613
- sheetId: this.env.model.getters.getActiveSheetId(),
18614
18622
  });
18615
18623
  owl.onWillUpdateProps(() => {
18616
18624
  const selectedFigureId = this.env.model.getters.getSelectedFigureId();
18617
18625
  if (selectedFigureId && selectedFigureId !== this.state.figureId) {
18618
18626
  this.state.figureId = selectedFigureId;
18619
- this.state.sheetId = this.env.model.getters.getActiveSheetId();
18620
- this.shouldUpdateChart = false;
18621
- }
18622
- else {
18623
- this.shouldUpdateChart = true;
18624
18627
  }
18625
18628
  if (!this.env.model.getters.isChartDefined(this.figureId)) {
18626
18629
  this.props.onCloseSidePanel();
@@ -18628,8 +18631,8 @@ class ChartPanel extends owl.Component {
18628
18631
  }
18629
18632
  });
18630
18633
  }
18631
- updateChart(updateDefinition) {
18632
- if (!this.shouldUpdateChart) {
18634
+ updateChart(figureId, updateDefinition) {
18635
+ if (figureId !== this.figureId) {
18633
18636
  return;
18634
18637
  }
18635
18638
  const definition = {
@@ -18638,8 +18641,8 @@ class ChartPanel extends owl.Component {
18638
18641
  };
18639
18642
  return this.env.model.dispatch("UPDATE_CHART", {
18640
18643
  definition,
18641
- id: this.figureId,
18642
- sheetId: this.sheetId,
18644
+ id: figureId,
18645
+ sheetId: this.env.model.getters.getFigureSheetId(figureId),
18643
18646
  });
18644
18647
  }
18645
18648
  onTypeChange(type) {
@@ -18651,7 +18654,7 @@ class ChartPanel extends owl.Component {
18651
18654
  this.env.model.dispatch("UPDATE_CHART", {
18652
18655
  definition,
18653
18656
  id: this.figureId,
18654
- sheetId: this.sheetId,
18657
+ sheetId: this.env.model.getters.getFigureSheetId(this.figureId),
18655
18658
  });
18656
18659
  }
18657
18660
  get chartPanel() {
@@ -20616,7 +20619,14 @@ class ContentEditableHelper {
20616
20619
  current = it.next();
20617
20620
  }
20618
20621
  if (current.value !== nodeToFind) {
20619
- throw new Error("Cannot find the node in the children of the element");
20622
+ /** This situation can happen if the code is called while the selection is not currently on the ContentEditableHelper.
20623
+ * In this case, we return 0 because we don't know the size of the text before the selection.
20624
+ *
20625
+ * A known occurence is triggered since the introduction of commit d4663158 (PR #2038).
20626
+ *
20627
+ * FIXME: find a way to test eventhough the selection API is not available in jsDOM.
20628
+ */
20629
+ return 0;
20620
20630
  }
20621
20631
  else {
20622
20632
  if (!current.value.hasChildNodes()) {
@@ -24465,6 +24475,16 @@ const XLSX_INDEXED_COLORS = {
24465
24475
  63: "333333",
24466
24476
  64: "000000",
24467
24477
  65: "FFFFFF", // system background
24478
+ };
24479
+ const IMAGE_MIMETYPE_EXTENSION_MAPPING = {
24480
+ "image/avif": "avif",
24481
+ "image/bmp": "bmp",
24482
+ "image/gif": "gif",
24483
+ "image/vnd.microsoft.icon": "ico",
24484
+ "image/jpeg": "jpeg",
24485
+ "image/png": "png",
24486
+ "image/tiff": "tiff",
24487
+ "image/webp": "webp",
24468
24488
  };
24469
24489
 
24470
24490
  /**
@@ -26946,6 +26966,11 @@ function createOverride(partName, contentType) {
26946
26966
  <Override ContentType="${contentType}" PartName="${partName}" />
26947
26967
  `;
26948
26968
  }
26969
+ function createDefaultXMLElement(extension, contentType) {
26970
+ return escapeXml /*xml*/ `
26971
+ <Default Extension="${extension}" ContentType="${contentType}" />
26972
+ `;
26973
+ }
26949
26974
  function joinXmlNodes(xmlNodes) {
26950
26975
  return new XMLString(xmlNodes.join("\n"));
26951
26976
  }
@@ -38668,7 +38693,8 @@ class SheetUIPlugin extends UIPlugin {
38668
38693
  getCellWidth(position) {
38669
38694
  const text = this.getCellText(position);
38670
38695
  const style = this.getters.getCellComputedStyle(position);
38671
- let contentWidth = this.getTextWidth(text, style);
38696
+ const multiLineText = text.split(NEWLINE);
38697
+ let contentWidth = Math.max(...multiLineText.map((line) => this.getTextWidth(line, style)));
38672
38698
  const icon = this.getters.getConditionalIcon(position);
38673
38699
  if (icon) {
38674
38700
  contentWidth += computeIconWidth(this.getters.getCellStyle(position));
@@ -41712,7 +41738,7 @@ class ImageProvider {
41712
41738
  const file = await this.getImageFromUser();
41713
41739
  const path = await this.fileStore.upload(file);
41714
41740
  const size = await this.getImageSize(path);
41715
- return { path, size };
41741
+ return { path, size, mimetype: file.type };
41716
41742
  }
41717
41743
  getImageFromUser() {
41718
41744
  return new Promise((resolve, reject) => {
@@ -43797,6 +43823,10 @@ class Spreadsheet extends owl.Component {
43797
43823
  }
43798
43824
  checkViewportSize() {
43799
43825
  const { xRatio, yRatio } = this.env.model.getters.getFrozenSheetViewRatio(this.env.model.getters.getActiveSheetId());
43826
+ if (!isFinite(xRatio) || !isFinite(yRatio)) {
43827
+ // before mounting, the ratios can be NaN or Infinity if the viewport size is 0
43828
+ return;
43829
+ }
43800
43830
  if (yRatio > MAXIMAL_FREEZABLE_RATIO || xRatio > MAXIMAL_FREEZABLE_RATIO) {
43801
43831
  if (this.isViewportTooSmall) {
43802
43832
  return;
@@ -46789,8 +46819,7 @@ function createWorksheets(data, construct) {
46789
46819
  // Figures and Charts
46790
46820
  let drawingNode = escapeXml ``;
46791
46821
  const drawingRelIds = [];
46792
- const charts = sheet.charts;
46793
- for (const chart of charts) {
46822
+ for (const chart of sheet.charts) {
46794
46823
  const xlsxChartId = convertChartId(chart.id);
46795
46824
  const chartRelId = addRelsToFile(construct.relsFiles, `xl/drawings/_rels/drawing${sheetIndex}.xml.rels`, {
46796
46825
  target: `../charts/chart${xlsxChartId}.xml`,
@@ -46799,20 +46828,27 @@ function createWorksheets(data, construct) {
46799
46828
  drawingRelIds.push(chartRelId);
46800
46829
  files.push(createXMLFile(createChart(chart, sheetIndex, data), `xl/charts/chart${xlsxChartId}.xml`, "chart"));
46801
46830
  }
46802
- const images = sheet.images;
46803
- for (const image of images) {
46831
+ for (const image of sheet.images) {
46832
+ const mimeType = image.data.mimetype;
46833
+ if (mimeType === undefined)
46834
+ continue;
46835
+ const extension = IMAGE_MIMETYPE_EXTENSION_MAPPING[mimeType];
46836
+ // only support exporting images with mimetypes specified in the mapping
46837
+ if (extension === undefined)
46838
+ continue;
46804
46839
  const xlsxImageId = convertImageId(image.id);
46840
+ let imageFileName = `image${xlsxImageId}.${extension}`;
46805
46841
  const imageRelId = addRelsToFile(construct.relsFiles, `xl/drawings/_rels/drawing${sheetIndex}.xml.rels`, {
46806
- target: `../media/image${xlsxImageId}`,
46842
+ target: `../media/${imageFileName}`,
46807
46843
  type: XLSX_RELATION_TYPE.image,
46808
46844
  });
46809
46845
  drawingRelIds.push(imageRelId);
46810
46846
  files.push({
46811
- path: `xl/media/image${xlsxImageId}`,
46812
- imagePath: image.data.path,
46847
+ path: `xl/media/${imageFileName}`,
46848
+ imageSrc: image.data.path,
46813
46849
  });
46814
46850
  }
46815
- const drawings = [...charts, ...images];
46851
+ const drawings = [...sheet.charts, ...sheet.images];
46816
46852
  if (drawings.length) {
46817
46853
  const drawingRelId = addRelsToFile(construct.relsFiles, `xl/worksheets/_rels/sheet${sheetIndex}.xml.rels`, {
46818
46854
  target: `../drawings/drawing${sheetIndex}.xml`,
@@ -46931,6 +46967,8 @@ function createRelsFiles(relsFiles) {
46931
46967
  }
46932
46968
  function createContentTypes(files) {
46933
46969
  const overrideNodes = [];
46970
+ // hard-code supported image mimetypes
46971
+ const imageDefaultNodes = Object.entries(IMAGE_MIMETYPE_EXTENSION_MAPPING).map(([mimetype, extension]) => createDefaultXMLElement(extension, mimetype));
46934
46972
  for (const file of files) {
46935
46973
  if ("contentType" in file && file.contentType) {
46936
46974
  overrideNodes.push(createOverride("/" + file.path, CONTENT_TYPES[file.contentType]));
@@ -46946,6 +46984,7 @@ function createContentTypes(files) {
46946
46984
  ];
46947
46985
  const xml = escapeXml /*xml*/ `
46948
46986
  <Types xmlns="${NAMESPACE["Types"]}">
46987
+ ${joinXmlNodes(Object.values(imageDefaultNodes))}
46949
46988
  <Default ${formatAttributes(relsAttributes)} />
46950
46989
  <Default ${formatAttributes(xmlAttributes)} />
46951
46990
  ${joinXmlNodes(overrideNodes)}
@@ -47558,6 +47597,6 @@ exports.setTranslationMethod = setTranslationMethod;
47558
47597
  exports.tokenize = tokenize;
47559
47598
 
47560
47599
 
47561
- __info__.version = '16.3.0';
47562
- __info__.date = '2023-05-17T14:44:57.860Z';
47563
- __info__.hash = '33b37e4';
47600
+ __info__.version = '16.3.2';
47601
+ __info__.date = '2023-06-02T10:13:46.734Z';
47602
+ __info__.hash = '69a4378';
@@ -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;