@odoo/o-spreadsheet 16.3.15 → 16.3.17

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.
@@ -7348,7 +7348,7 @@ function createGaugeChartRuntime(chart, getters) {
7348
7348
  });
7349
7349
  return {
7350
7350
  chartJsConfig: config,
7351
- background: getters.getBackgroundOfSingleCellChart(chart.background, dataRange),
7351
+ background: getters.getStyleOfSingleCellChart(chart.background, dataRange).background,
7352
7352
  };
7353
7353
  }
7354
7354
 
@@ -8069,7 +8069,7 @@ function createScorecardChartRuntime(chart, getters) {
8069
8069
  };
8070
8070
  baselineCell = getters.getEvaluatedCell(baselinePosition);
8071
8071
  }
8072
- const background = getters.getBackgroundOfSingleCellChart(chart.background, chart.keyValue);
8072
+ const { background, fontColor } = getters.getStyleOfSingleCellChart(chart.background, chart.keyValue);
8073
8073
  return {
8074
8074
  title: _t(chart.title),
8075
8075
  keyValue: formattedKeyValue || keyValue,
@@ -8077,7 +8077,7 @@ function createScorecardChartRuntime(chart, getters) {
8077
8077
  baselineArrow: getBaselineArrowDirection(baselineCell, keyValueCell, chart.baselineMode),
8078
8078
  baselineColor: getBaselineColor(baselineCell, chart.baselineMode, keyValueCell, chart.baselineColorUp, chart.baselineColorDown),
8079
8079
  baselineDescr: chart.baselineDescr ? _t(chart.baselineDescr) : "",
8080
- fontColor: chartFontColor(background),
8080
+ fontColor,
8081
8081
  background,
8082
8082
  baselineStyle: chart.baselineMode !== "percentage" && baseline
8083
8083
  ? getters.getCellStyle({
@@ -9388,6 +9388,17 @@ const SORT_CELLS_DESCENDING = (env) => {
9388
9388
  };
9389
9389
  const IS_ONLY_ONE_RANGE = (env) => {
9390
9390
  return env.model.getters.getSelectedZones().length === 1;
9391
+ };
9392
+ const CAN_INSERT_HEADER = (env, dimension) => {
9393
+ if (!IS_ONLY_ONE_RANGE(env)) {
9394
+ return false;
9395
+ }
9396
+ const activeHeaders = dimension === "COL" ? env.model.getters.getActiveCols() : env.model.getters.getActiveRows();
9397
+ const ortogonalActiveHeaders = dimension === "COL" ? env.model.getters.getActiveRows() : env.model.getters.getActiveCols();
9398
+ const sheetId = env.model.getters.getActiveSheetId();
9399
+ const zone = env.model.getters.getSelectedZone();
9400
+ const allSheetSelected = isEqual(zone, env.model.getters.getSheetZone(sheetId));
9401
+ return isConsecutive(activeHeaders) && (ortogonalActiveHeaders.size === 0 || allSheetSelected);
9391
9402
  };
9392
9403
 
9393
9404
  const undo = {
@@ -16322,17 +16333,13 @@ for (let category of categories) {
16322
16333
 
16323
16334
  const insertRow = {
16324
16335
  name: MENU_INSERT_ROWS_NAME,
16325
- isVisible: (env) => isConsecutive(env.model.getters.getActiveRows()) &&
16326
- IS_ONLY_ONE_RANGE(env) &&
16327
- env.model.getters.getActiveCols().size === 0,
16336
+ isVisible: (env) => CAN_INSERT_HEADER(env, "ROW"),
16328
16337
  icon: "o-spreadsheet-Icon.INSERT_ROW",
16329
16338
  };
16330
16339
  const rowInsertRowBefore = {
16331
16340
  name: ROW_INSERT_ROWS_BEFORE_NAME,
16332
16341
  execute: INSERT_ROWS_BEFORE_ACTION,
16333
- isVisible: (env) => isConsecutive(env.model.getters.getActiveRows()) &&
16334
- IS_ONLY_ONE_RANGE(env) &&
16335
- env.model.getters.getActiveCols().size === 0,
16342
+ isVisible: (env) => CAN_INSERT_HEADER(env, "ROW"),
16336
16343
  icon: "o-spreadsheet-Icon.INSERT_ROW_BEFORE",
16337
16344
  };
16338
16345
  const topBarInsertRowsBefore = {
@@ -16348,9 +16355,7 @@ const cellInsertRowsBefore = {
16348
16355
  const rowInsertRowsAfter = {
16349
16356
  execute: INSERT_ROWS_AFTER_ACTION,
16350
16357
  name: ROW_INSERT_ROWS_AFTER_NAME,
16351
- isVisible: (env) => isConsecutive(env.model.getters.getActiveRows()) &&
16352
- IS_ONLY_ONE_RANGE(env) &&
16353
- env.model.getters.getActiveCols().size === 0,
16358
+ isVisible: (env) => CAN_INSERT_HEADER(env, "ROW"),
16354
16359
  icon: "o-spreadsheet-Icon.INSERT_ROW_AFTER",
16355
16360
  };
16356
16361
  const topBarInsertRowsAfter = {
@@ -16359,17 +16364,13 @@ const topBarInsertRowsAfter = {
16359
16364
  };
16360
16365
  const insertCol = {
16361
16366
  name: MENU_INSERT_COLUMNS_NAME,
16362
- isVisible: (env) => isConsecutive(env.model.getters.getActiveCols()) &&
16363
- IS_ONLY_ONE_RANGE(env) &&
16364
- env.model.getters.getActiveRows().size === 0,
16367
+ isVisible: (env) => CAN_INSERT_HEADER(env, "COL"),
16365
16368
  icon: "o-spreadsheet-Icon.INSERT_COL",
16366
16369
  };
16367
16370
  const colInsertColsBefore = {
16368
16371
  name: COLUMN_INSERT_COLUMNS_BEFORE_NAME,
16369
16372
  execute: INSERT_COLUMNS_BEFORE_ACTION,
16370
- isVisible: (env) => isConsecutive(env.model.getters.getActiveCols()) &&
16371
- IS_ONLY_ONE_RANGE(env) &&
16372
- env.model.getters.getActiveRows().size === 0,
16373
+ isVisible: (env) => CAN_INSERT_HEADER(env, "COL"),
16373
16374
  icon: "o-spreadsheet-Icon.INSERT_COL_BEFORE",
16374
16375
  };
16375
16376
  const topBarInsertColsBefore = {
@@ -16385,9 +16386,7 @@ const cellInsertColsBefore = {
16385
16386
  const colInsertColsAfter = {
16386
16387
  name: COLUMN_INSERT_COLUMNS_AFTER_NAME,
16387
16388
  execute: INSERT_COLUMNS_AFTER_ACTION,
16388
- isVisible: (env) => isConsecutive(env.model.getters.getActiveCols()) &&
16389
- IS_ONLY_ONE_RANGE(env) &&
16390
- env.model.getters.getActiveRows().size === 0,
16389
+ isVisible: (env) => CAN_INSERT_HEADER(env, "COL"),
16391
16390
  icon: "o-spreadsheet-Icon.INSERT_COL_AFTER",
16392
16391
  };
16393
16392
  const topBarInsertColsAfter = {
@@ -19714,7 +19713,7 @@ css /* scss */ `
19714
19713
  }
19715
19714
  .o-input-count {
19716
19715
  width: fit-content;
19717
- padding: 4 0 4 4;
19716
+ padding: 4px 0 4px 4px;
19718
19717
  }
19719
19718
  }
19720
19719
  }
@@ -30848,6 +30847,13 @@ class FiltersPlugin extends CorePlugin {
30848
30847
  }
30849
30848
  onDeleteColumnsRows(cmd) {
30850
30849
  for (const table of this.getFilterTables(cmd.sheetId)) {
30850
+ // Remove the filter tables whose data filter headers are in the removed rows.
30851
+ if (cmd.dimension === "ROW" && cmd.elements.includes(table.zone.top)) {
30852
+ const tables = { ...this.tables[cmd.sheetId] };
30853
+ delete tables[table.id];
30854
+ this.history.update("tables", cmd.sheetId, tables);
30855
+ continue;
30856
+ }
30851
30857
  const zone = reduceZoneOnDeletion(table.zone, cmd.dimension === "COL" ? "left" : "top", cmd.elements);
30852
30858
  if (!zone) {
30853
30859
  const tables = { ...this.tables[cmd.sheetId] };
@@ -33728,7 +33734,7 @@ class EvaluationPlugin extends UIPlugin {
33728
33734
  }
33729
33735
 
33730
33736
  class EvaluationChartPlugin extends UIPlugin {
33731
- static getters = ["getChartRuntime", "getBackgroundOfSingleCellChart"];
33737
+ static getters = ["getChartRuntime", "getStyleOfSingleCellChart"];
33732
33738
  charts = {};
33733
33739
  createRuntimeChart = chartRuntimeFactory(this.getters);
33734
33740
  handle(cmd) {
@@ -33766,25 +33772,26 @@ class EvaluationChartPlugin extends UIPlugin {
33766
33772
  return this.charts[figureId];
33767
33773
  }
33768
33774
  /**
33769
- * Get the background color of a chart based on the color of the first cell of the main range
33770
- * of the chart. In order of priority, it will return :
33771
- *
33772
- * - the chart background color if one is defined
33773
- * - the fill color of the cell if one is defined
33774
- * - the fill color of the cell from conditional formats if one is defined
33775
- * - the default chart color if no other color is defined
33775
+ * Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
33776
33776
  */
33777
- getBackgroundOfSingleCellChart(chartBackground, mainRange) {
33777
+ getStyleOfSingleCellChart(chartBackground, mainRange) {
33778
33778
  if (chartBackground)
33779
- return chartBackground;
33779
+ return { background: chartBackground, fontColor: chartFontColor(chartBackground) };
33780
33780
  if (!mainRange) {
33781
- return BACKGROUND_CHART_COLOR;
33781
+ return {
33782
+ background: BACKGROUND_CHART_COLOR,
33783
+ fontColor: chartFontColor(BACKGROUND_CHART_COLOR),
33784
+ };
33782
33785
  }
33783
33786
  const col = mainRange.zone.left;
33784
33787
  const row = mainRange.zone.top;
33785
33788
  const sheetId = mainRange.sheetId;
33786
33789
  const style = this.getters.getCellComputedStyle({ sheetId, col, row });
33787
- return style.fillColor || BACKGROUND_CHART_COLOR;
33790
+ const background = style.fillColor || BACKGROUND_CHART_COLOR;
33791
+ return {
33792
+ background,
33793
+ fontColor: style.textColor || chartFontColor(background),
33794
+ };
33788
33795
  }
33789
33796
  }
33790
33797
 
@@ -34195,6 +34202,8 @@ class FilterEvaluationPlugin extends UIPlugin {
34195
34202
  case "EVALUATE_CELLS":
34196
34203
  case "ACTIVATE_SHEET":
34197
34204
  case "REMOVE_FILTER_TABLE":
34205
+ case "ADD_COLUMNS_ROWS":
34206
+ case "REMOVE_COLUMNS_ROWS":
34198
34207
  this.isEvaluationDirty = true;
34199
34208
  break;
34200
34209
  case "START":
@@ -43565,6 +43574,7 @@ css /* scss */ `
43565
43574
  line-height: 1.2;
43566
43575
  font-size: 13px;
43567
43576
  font-weight: 500;
43577
+ background-color: #fff;
43568
43578
 
43569
43579
  .o-topbar-top {
43570
43580
  border-bottom: 1px solid ${SEPARATOR_COLOR};
@@ -46411,14 +46421,14 @@ function convertFigureData(figure, sheet) {
46411
46421
  */
46412
46422
  function figureCoordinates(headers, position) {
46413
46423
  let currentPosition = 0;
46414
- for (const [headerIndex, header] of Object.entries(headers)) {
46424
+ for (const [headerIndex, header] of headers.entries()) {
46415
46425
  if (currentPosition <= position && position < currentPosition + header.size) {
46416
46426
  return {
46417
- index: parseInt(headerIndex),
46427
+ index: headerIndex,
46418
46428
  offset: convertDotValueToEMU(position - currentPosition + FIGURE_BORDER_WIDTH),
46419
46429
  };
46420
46430
  }
46421
- else {
46431
+ else if (headerIndex < headers.length - 1) {
46422
46432
  currentPosition += header.size;
46423
46433
  }
46424
46434
  }
@@ -47795,6 +47805,6 @@ exports.setTranslationMethod = setTranslationMethod;
47795
47805
  exports.tokenize = tokenize;
47796
47806
 
47797
47807
 
47798
- __info__.version = '16.3.15';
47799
- __info__.date = '2023-10-25T10:03:43.272Z';
47800
- __info__.hash = 'fb7c4dd';
47808
+ __info__.version = '16.3.17';
47809
+ __info__.date = '2023-11-16T11:59:29.130Z';
47810
+ __info__.hash = '4049460';
@@ -3762,22 +3762,20 @@ declare class EvaluationPlugin extends UIPlugin {
3762
3762
  private isBadExpression;
3763
3763
  }
3764
3764
 
3765
+ interface EvaluationChartStyle {
3766
+ background: Color;
3767
+ fontColor: Color;
3768
+ }
3765
3769
  declare class EvaluationChartPlugin extends UIPlugin {
3766
- static getters: readonly ["getChartRuntime", "getBackgroundOfSingleCellChart"];
3770
+ static getters: readonly ["getChartRuntime", "getStyleOfSingleCellChart"];
3767
3771
  readonly charts: Record<UID, ChartRuntime | undefined>;
3768
3772
  private createRuntimeChart;
3769
3773
  handle(cmd: Command): void;
3770
3774
  getChartRuntime(figureId: UID): ChartRuntime;
3771
3775
  /**
3772
- * Get the background color of a chart based on the color of the first cell of the main range
3773
- * of the chart. In order of priority, it will return :
3774
- *
3775
- * - the chart background color if one is defined
3776
- * - the fill color of the cell if one is defined
3777
- * - the fill color of the cell from conditional formats if one is defined
3778
- * - the default chart color if no other color is defined
3776
+ * Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
3779
3777
  */
3780
- getBackgroundOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): Color;
3778
+ getStyleOfSingleCellChart(chartBackground: Color | undefined, mainRange: Range | undefined): EvaluationChartStyle;
3781
3779
  }
3782
3780
 
3783
3781
  declare class EvaluationConditionalFormatPlugin extends UIPlugin {
@@ -7344,7 +7344,7 @@ function createGaugeChartRuntime(chart, getters) {
7344
7344
  });
7345
7345
  return {
7346
7346
  chartJsConfig: config,
7347
- background: getters.getBackgroundOfSingleCellChart(chart.background, dataRange),
7347
+ background: getters.getStyleOfSingleCellChart(chart.background, dataRange).background,
7348
7348
  };
7349
7349
  }
7350
7350
 
@@ -8065,7 +8065,7 @@ function createScorecardChartRuntime(chart, getters) {
8065
8065
  };
8066
8066
  baselineCell = getters.getEvaluatedCell(baselinePosition);
8067
8067
  }
8068
- const background = getters.getBackgroundOfSingleCellChart(chart.background, chart.keyValue);
8068
+ const { background, fontColor } = getters.getStyleOfSingleCellChart(chart.background, chart.keyValue);
8069
8069
  return {
8070
8070
  title: _t(chart.title),
8071
8071
  keyValue: formattedKeyValue || keyValue,
@@ -8073,7 +8073,7 @@ function createScorecardChartRuntime(chart, getters) {
8073
8073
  baselineArrow: getBaselineArrowDirection(baselineCell, keyValueCell, chart.baselineMode),
8074
8074
  baselineColor: getBaselineColor(baselineCell, chart.baselineMode, keyValueCell, chart.baselineColorUp, chart.baselineColorDown),
8075
8075
  baselineDescr: chart.baselineDescr ? _t(chart.baselineDescr) : "",
8076
- fontColor: chartFontColor(background),
8076
+ fontColor,
8077
8077
  background,
8078
8078
  baselineStyle: chart.baselineMode !== "percentage" && baseline
8079
8079
  ? getters.getCellStyle({
@@ -9384,6 +9384,17 @@ const SORT_CELLS_DESCENDING = (env) => {
9384
9384
  };
9385
9385
  const IS_ONLY_ONE_RANGE = (env) => {
9386
9386
  return env.model.getters.getSelectedZones().length === 1;
9387
+ };
9388
+ const CAN_INSERT_HEADER = (env, dimension) => {
9389
+ if (!IS_ONLY_ONE_RANGE(env)) {
9390
+ return false;
9391
+ }
9392
+ const activeHeaders = dimension === "COL" ? env.model.getters.getActiveCols() : env.model.getters.getActiveRows();
9393
+ const ortogonalActiveHeaders = dimension === "COL" ? env.model.getters.getActiveRows() : env.model.getters.getActiveCols();
9394
+ const sheetId = env.model.getters.getActiveSheetId();
9395
+ const zone = env.model.getters.getSelectedZone();
9396
+ const allSheetSelected = isEqual(zone, env.model.getters.getSheetZone(sheetId));
9397
+ return isConsecutive(activeHeaders) && (ortogonalActiveHeaders.size === 0 || allSheetSelected);
9387
9398
  };
9388
9399
 
9389
9400
  const undo = {
@@ -16318,17 +16329,13 @@ for (let category of categories) {
16318
16329
 
16319
16330
  const insertRow = {
16320
16331
  name: MENU_INSERT_ROWS_NAME,
16321
- isVisible: (env) => isConsecutive(env.model.getters.getActiveRows()) &&
16322
- IS_ONLY_ONE_RANGE(env) &&
16323
- env.model.getters.getActiveCols().size === 0,
16332
+ isVisible: (env) => CAN_INSERT_HEADER(env, "ROW"),
16324
16333
  icon: "o-spreadsheet-Icon.INSERT_ROW",
16325
16334
  };
16326
16335
  const rowInsertRowBefore = {
16327
16336
  name: ROW_INSERT_ROWS_BEFORE_NAME,
16328
16337
  execute: INSERT_ROWS_BEFORE_ACTION,
16329
- isVisible: (env) => isConsecutive(env.model.getters.getActiveRows()) &&
16330
- IS_ONLY_ONE_RANGE(env) &&
16331
- env.model.getters.getActiveCols().size === 0,
16338
+ isVisible: (env) => CAN_INSERT_HEADER(env, "ROW"),
16332
16339
  icon: "o-spreadsheet-Icon.INSERT_ROW_BEFORE",
16333
16340
  };
16334
16341
  const topBarInsertRowsBefore = {
@@ -16344,9 +16351,7 @@ const cellInsertRowsBefore = {
16344
16351
  const rowInsertRowsAfter = {
16345
16352
  execute: INSERT_ROWS_AFTER_ACTION,
16346
16353
  name: ROW_INSERT_ROWS_AFTER_NAME,
16347
- isVisible: (env) => isConsecutive(env.model.getters.getActiveRows()) &&
16348
- IS_ONLY_ONE_RANGE(env) &&
16349
- env.model.getters.getActiveCols().size === 0,
16354
+ isVisible: (env) => CAN_INSERT_HEADER(env, "ROW"),
16350
16355
  icon: "o-spreadsheet-Icon.INSERT_ROW_AFTER",
16351
16356
  };
16352
16357
  const topBarInsertRowsAfter = {
@@ -16355,17 +16360,13 @@ const topBarInsertRowsAfter = {
16355
16360
  };
16356
16361
  const insertCol = {
16357
16362
  name: MENU_INSERT_COLUMNS_NAME,
16358
- isVisible: (env) => isConsecutive(env.model.getters.getActiveCols()) &&
16359
- IS_ONLY_ONE_RANGE(env) &&
16360
- env.model.getters.getActiveRows().size === 0,
16363
+ isVisible: (env) => CAN_INSERT_HEADER(env, "COL"),
16361
16364
  icon: "o-spreadsheet-Icon.INSERT_COL",
16362
16365
  };
16363
16366
  const colInsertColsBefore = {
16364
16367
  name: COLUMN_INSERT_COLUMNS_BEFORE_NAME,
16365
16368
  execute: INSERT_COLUMNS_BEFORE_ACTION,
16366
- isVisible: (env) => isConsecutive(env.model.getters.getActiveCols()) &&
16367
- IS_ONLY_ONE_RANGE(env) &&
16368
- env.model.getters.getActiveRows().size === 0,
16369
+ isVisible: (env) => CAN_INSERT_HEADER(env, "COL"),
16369
16370
  icon: "o-spreadsheet-Icon.INSERT_COL_BEFORE",
16370
16371
  };
16371
16372
  const topBarInsertColsBefore = {
@@ -16381,9 +16382,7 @@ const cellInsertColsBefore = {
16381
16382
  const colInsertColsAfter = {
16382
16383
  name: COLUMN_INSERT_COLUMNS_AFTER_NAME,
16383
16384
  execute: INSERT_COLUMNS_AFTER_ACTION,
16384
- isVisible: (env) => isConsecutive(env.model.getters.getActiveCols()) &&
16385
- IS_ONLY_ONE_RANGE(env) &&
16386
- env.model.getters.getActiveRows().size === 0,
16385
+ isVisible: (env) => CAN_INSERT_HEADER(env, "COL"),
16387
16386
  icon: "o-spreadsheet-Icon.INSERT_COL_AFTER",
16388
16387
  };
16389
16388
  const topBarInsertColsAfter = {
@@ -19710,7 +19709,7 @@ css /* scss */ `
19710
19709
  }
19711
19710
  .o-input-count {
19712
19711
  width: fit-content;
19713
- padding: 4 0 4 4;
19712
+ padding: 4px 0 4px 4px;
19714
19713
  }
19715
19714
  }
19716
19715
  }
@@ -30844,6 +30843,13 @@ class FiltersPlugin extends CorePlugin {
30844
30843
  }
30845
30844
  onDeleteColumnsRows(cmd) {
30846
30845
  for (const table of this.getFilterTables(cmd.sheetId)) {
30846
+ // Remove the filter tables whose data filter headers are in the removed rows.
30847
+ if (cmd.dimension === "ROW" && cmd.elements.includes(table.zone.top)) {
30848
+ const tables = { ...this.tables[cmd.sheetId] };
30849
+ delete tables[table.id];
30850
+ this.history.update("tables", cmd.sheetId, tables);
30851
+ continue;
30852
+ }
30847
30853
  const zone = reduceZoneOnDeletion(table.zone, cmd.dimension === "COL" ? "left" : "top", cmd.elements);
30848
30854
  if (!zone) {
30849
30855
  const tables = { ...this.tables[cmd.sheetId] };
@@ -33724,7 +33730,7 @@ class EvaluationPlugin extends UIPlugin {
33724
33730
  }
33725
33731
 
33726
33732
  class EvaluationChartPlugin extends UIPlugin {
33727
- static getters = ["getChartRuntime", "getBackgroundOfSingleCellChart"];
33733
+ static getters = ["getChartRuntime", "getStyleOfSingleCellChart"];
33728
33734
  charts = {};
33729
33735
  createRuntimeChart = chartRuntimeFactory(this.getters);
33730
33736
  handle(cmd) {
@@ -33762,25 +33768,26 @@ class EvaluationChartPlugin extends UIPlugin {
33762
33768
  return this.charts[figureId];
33763
33769
  }
33764
33770
  /**
33765
- * Get the background color of a chart based on the color of the first cell of the main range
33766
- * of the chart. In order of priority, it will return :
33767
- *
33768
- * - the chart background color if one is defined
33769
- * - the fill color of the cell if one is defined
33770
- * - the fill color of the cell from conditional formats if one is defined
33771
- * - the default chart color if no other color is defined
33771
+ * Get the background and textColor of a chart based on the color of the first cell of the main range of the chart.
33772
33772
  */
33773
- getBackgroundOfSingleCellChart(chartBackground, mainRange) {
33773
+ getStyleOfSingleCellChart(chartBackground, mainRange) {
33774
33774
  if (chartBackground)
33775
- return chartBackground;
33775
+ return { background: chartBackground, fontColor: chartFontColor(chartBackground) };
33776
33776
  if (!mainRange) {
33777
- return BACKGROUND_CHART_COLOR;
33777
+ return {
33778
+ background: BACKGROUND_CHART_COLOR,
33779
+ fontColor: chartFontColor(BACKGROUND_CHART_COLOR),
33780
+ };
33778
33781
  }
33779
33782
  const col = mainRange.zone.left;
33780
33783
  const row = mainRange.zone.top;
33781
33784
  const sheetId = mainRange.sheetId;
33782
33785
  const style = this.getters.getCellComputedStyle({ sheetId, col, row });
33783
- return style.fillColor || BACKGROUND_CHART_COLOR;
33786
+ const background = style.fillColor || BACKGROUND_CHART_COLOR;
33787
+ return {
33788
+ background,
33789
+ fontColor: style.textColor || chartFontColor(background),
33790
+ };
33784
33791
  }
33785
33792
  }
33786
33793
 
@@ -34191,6 +34198,8 @@ class FilterEvaluationPlugin extends UIPlugin {
34191
34198
  case "EVALUATE_CELLS":
34192
34199
  case "ACTIVATE_SHEET":
34193
34200
  case "REMOVE_FILTER_TABLE":
34201
+ case "ADD_COLUMNS_ROWS":
34202
+ case "REMOVE_COLUMNS_ROWS":
34194
34203
  this.isEvaluationDirty = true;
34195
34204
  break;
34196
34205
  case "START":
@@ -43561,6 +43570,7 @@ css /* scss */ `
43561
43570
  line-height: 1.2;
43562
43571
  font-size: 13px;
43563
43572
  font-weight: 500;
43573
+ background-color: #fff;
43564
43574
 
43565
43575
  .o-topbar-top {
43566
43576
  border-bottom: 1px solid ${SEPARATOR_COLOR};
@@ -46407,14 +46417,14 @@ function convertFigureData(figure, sheet) {
46407
46417
  */
46408
46418
  function figureCoordinates(headers, position) {
46409
46419
  let currentPosition = 0;
46410
- for (const [headerIndex, header] of Object.entries(headers)) {
46420
+ for (const [headerIndex, header] of headers.entries()) {
46411
46421
  if (currentPosition <= position && position < currentPosition + header.size) {
46412
46422
  return {
46413
- index: parseInt(headerIndex),
46423
+ index: headerIndex,
46414
46424
  offset: convertDotValueToEMU(position - currentPosition + FIGURE_BORDER_WIDTH),
46415
46425
  };
46416
46426
  }
46417
- else {
46427
+ else if (headerIndex < headers.length - 1) {
46418
46428
  currentPosition += header.size;
46419
46429
  }
46420
46430
  }
@@ -47763,6 +47773,6 @@ function addFunction(functionName, functionDescription) {
47763
47773
  export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
47764
47774
 
47765
47775
 
47766
- __info__.version = '16.3.15';
47767
- __info__.date = '2023-10-25T10:03:43.272Z';
47768
- __info__.hash = 'fb7c4dd';
47776
+ __info__.version = '16.3.17';
47777
+ __info__.date = '2023-11-16T11:59:29.130Z';
47778
+ __info__.hash = '4049460';