@odoo/o-spreadsheet 18.0.3 → 18.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 18.0.3
6
- * @date 2024-11-08T12:17:49.992Z
7
- * @hash 5fa5fbb
5
+ * @version 18.0.4
6
+ * @date 2024-11-13T15:08:50.620Z
7
+ * @hash 88e1aee
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -9321,24 +9321,21 @@ stores.inject(MyMetaStore, storeInstance);
9321
9321
  const defaultBorderColor = colorToRGBA(dataset.backgroundColor);
9322
9322
  defaultBorderColor.a = 1;
9323
9323
  const borderColor = config.color || lightenColor(rgbaToHex(defaultBorderColor), 0.5);
9324
- const backgroundRGBA = colorToRGBA(borderColor);
9325
- // @ts-expect-error
9326
- if (dataset?.fill) {
9327
- backgroundRGBA.a = LINE_FILL_TRANSPARENCY; // to support area charts
9328
- }
9329
9324
  return {
9330
- ...dataset,
9331
9325
  type: "line",
9332
9326
  xAxisID: TREND_LINE_XAXIS_ID,
9327
+ yAxisID: dataset.yAxisID,
9333
9328
  label: dataset.label ? _t("Trend line for %s", dataset.label) : "",
9334
9329
  data,
9335
9330
  order: -1,
9336
9331
  showLine: true,
9337
9332
  pointRadius: 0,
9338
- backgroundColor: rgbaToHex(backgroundRGBA),
9333
+ backgroundColor: borderColor,
9339
9334
  borderColor,
9340
9335
  borderDash: [5, 5],
9341
9336
  borderWidth: undefined,
9337
+ fill: false,
9338
+ pointBackgroundColor: borderColor,
9342
9339
  };
9343
9340
  }
9344
9341
  function interpolateData(config, values, labels, newLabels) {
@@ -28171,11 +28168,14 @@ stores.inject(MyMetaStore, storeInstance);
28171
28168
  function getChartLabelFormat(getters, range) {
28172
28169
  if (!range)
28173
28170
  return undefined;
28174
- return getters.getEvaluatedCell({
28175
- sheetId: range.sheetId,
28176
- col: range.zone.left,
28177
- row: range.zone.top,
28178
- }).format;
28171
+ const { sheetId, zone: { left, top, bottom }, } = range;
28172
+ for (let row = top; row <= bottom; row++) {
28173
+ const format = getters.getEvaluatedCell({ sheetId, col: left, row }).format;
28174
+ if (format) {
28175
+ return format;
28176
+ }
28177
+ }
28178
+ return undefined;
28179
28179
  }
28180
28180
  function getChartLabelValues(getters, dataSets, labelRange) {
28181
28181
  let labels = { values: [], formattedValues: [] };
@@ -28756,11 +28756,7 @@ stores.inject(MyMetaStore, storeInstance);
28756
28756
  if (!labelRange || !canBeLinearChart(labelRange, getters)) {
28757
28757
  return false;
28758
28758
  }
28759
- const labelFormat = getters.getEvaluatedCell({
28760
- sheetId: labelRange.sheetId,
28761
- col: labelRange.zone.left,
28762
- row: labelRange.zone.top,
28763
- }).format;
28759
+ const labelFormat = getChartLabelFormat(getters, labelRange);
28764
28760
  return Boolean(labelFormat && timeFormatLuxonCompatible.test(labelFormat));
28765
28761
  }
28766
28762
  function canBeLinearChart(labelRange, getters) {
@@ -36730,6 +36726,7 @@ stores.inject(MyMetaStore, storeInstance);
36730
36726
  currentColor: { type: String, optional: true },
36731
36727
  maxHeight: { type: Number, optional: true },
36732
36728
  anchorRect: Object,
36729
+ disableNoColor: { type: Boolean, optional: true },
36733
36730
  };
36734
36731
  static defaultProps = { currentColor: "" };
36735
36732
  static components = { Popover };
@@ -36956,6 +36953,7 @@ stores.inject(MyMetaStore, storeInstance);
36956
36953
  currentColor: { type: String, optional: true },
36957
36954
  title: { type: String, optional: true },
36958
36955
  onColorPicked: Function,
36956
+ disableNoColor: { type: Boolean, optional: true },
36959
36957
  };
36960
36958
  colorPickerButtonRef = owl.useRef("colorPickerButton");
36961
36959
  state;
@@ -39734,6 +39732,9 @@ stores.inject(MyMetaStore, storeInstance);
39734
39732
  }
39735
39733
  }
39736
39734
  setColorScaleColor(target, color) {
39735
+ if (!isColorValid(color)) {
39736
+ return;
39737
+ }
39737
39738
  const point = this.state.rules.colorScale[target];
39738
39739
  if (point) {
39739
39740
  point.color = Number.parseInt(color.substr(1), 16);
@@ -72478,9 +72479,9 @@ stores.inject(MyMetaStore, storeInstance);
72478
72479
  exports.tokenize = tokenize;
72479
72480
 
72480
72481
 
72481
- __info__.version = "18.0.3";
72482
- __info__.date = "2024-11-08T12:17:49.992Z";
72483
- __info__.hash = "5fa5fbb";
72482
+ __info__.version = "18.0.4";
72483
+ __info__.date = "2024-11-13T15:08:50.620Z";
72484
+ __info__.hash = "88e1aee";
72484
72485
 
72485
72486
 
72486
72487
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);