@odoo/o-spreadsheet 17.2.0 → 17.2.1

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.
@@ -3,9 +3,9 @@
3
3
  /**
4
4
  * This file is generated by o-spreadsheet build tools. Do not edit it.
5
5
  * @see https://github.com/odoo/o-spreadsheet
6
- * @version 17.2.0
7
- * @date 2024-03-20T08:12:44.398Z
8
- * @hash 1869c24
6
+ * @version 17.2.1
7
+ * @date 2024-03-25T09:41:58.737Z
8
+ * @hash f97284c
9
9
  */
10
10
 
11
11
  (function (exports, owl) {
@@ -30,7 +30,6 @@
30
30
  const LINK_COLOR = "#017E84";
31
31
  const FILTERS_COLOR = "#188038";
32
32
  const BACKGROUND_HEADER_FILTER_COLOR = "#E6F4EA";
33
- const BACKGROUND_HEADER_SELECTED_FILTER_COLOR = "#CEEAD6";
34
33
  const SEPARATOR_COLOR = "#E0E2E4";
35
34
  const ICONS_COLOR = "#4A4F59";
36
35
  const HEADER_GROUPING_BACKGROUND_COLOR = "#F5F5F5";
@@ -8004,6 +8003,9 @@
8004
8003
  instantiate(Store, ...args) {
8005
8004
  return this.factory.build(Store, ...args);
8006
8005
  }
8006
+ resetStores() {
8007
+ this.dependencies.clear();
8008
+ }
8007
8009
  }
8008
8010
  class StoreFactory {
8009
8011
  get;
@@ -24214,14 +24216,19 @@ stores.inject(MyMetaStore, storeInstance);
24214
24216
  children: [allFunctionListMenuBuilder],
24215
24217
  };
24216
24218
  function allFunctionListMenuBuilder() {
24217
- const fnNames = functionRegistry.getKeys();
24219
+ const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
24218
24220
  return createFormulaFunctions(fnNames);
24219
24221
  }
24220
24222
  const categoriesFunctionListMenuBuilder = () => {
24221
24223
  const functions = functionRegistry.content;
24222
- const categories = [...new Set(functionRegistry.getAll().map((fn) => fn.category))].filter(isDefined$1);
24224
+ const categories = [
24225
+ ...new Set(functionRegistry
24226
+ .getAll()
24227
+ .filter((fn) => !fn.hidden)
24228
+ .map((fn) => fn.category)),
24229
+ ].filter(isDefined$1);
24223
24230
  return categories.sort().map((category, i) => {
24224
- const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
24231
+ const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
24225
24232
  return {
24226
24233
  name: category,
24227
24234
  children: createFormulaFunctions(functionsInCategory),
@@ -28379,11 +28386,9 @@ stores.inject(MyMetaStore, storeInstance);
28379
28386
  }
28380
28387
  .o-cell-is-operator {
28381
28388
  margin-bottom: 5px;
28382
- width: 96%;
28383
28389
  }
28384
28390
  .o-cell-is-value {
28385
28391
  margin-bottom: 5px;
28386
- width: 96%;
28387
28392
  }
28388
28393
  .o-color-picker-widget .o-color-picker-button {
28389
28394
  pointer-events: all;
@@ -31085,6 +31090,9 @@ stores.inject(MyMetaStore, storeInstance);
31085
31090
  el?.focus({ preventScroll: true });
31086
31091
  }
31087
31092
  }, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
31093
+ owl.onWillUnmount(() => {
31094
+ this.props.onFigureDeleted();
31095
+ });
31088
31096
  }
31089
31097
  clickAnchor(dirX, dirY, ev) {
31090
31098
  this.props.onClickAnchor(dirX, dirY, ev);
@@ -31103,6 +31111,7 @@ stores.inject(MyMetaStore, storeInstance);
31103
31111
  this.props.onFigureDeleted();
31104
31112
  ev.stopPropagation();
31105
31113
  ev.preventDefault();
31114
+ ev.stopPropagation();
31106
31115
  break;
31107
31116
  case "ArrowDown":
31108
31117
  case "ArrowLeft":
@@ -31123,6 +31132,7 @@ stores.inject(MyMetaStore, storeInstance);
31123
31132
  });
31124
31133
  ev.stopPropagation();
31125
31134
  ev.preventDefault();
31135
+ ev.stopPropagation();
31126
31136
  break;
31127
31137
  }
31128
31138
  }
@@ -31790,6 +31800,7 @@ stores.inject(MyMetaStore, storeInstance);
31790
31800
  // -----------------------------------------------------------------------------
31791
31801
  css /* scss */ `
31792
31802
  .o-formula-assistant {
31803
+ background: #ffffff;
31793
31804
  .o-formula-assistant-head {
31794
31805
  background-color: #f2f2f2;
31795
31806
  padding: 10px;
@@ -31845,6 +31856,9 @@ stores.inject(MyMetaStore, storeInstance);
31845
31856
  this.assistantState.allowCellSelectionBehind = false;
31846
31857
  }, 2000);
31847
31858
  }
31859
+ get formulaArgSeparator() {
31860
+ return this.env.model.getters.getLocale().formulaArgSeparator + " ";
31861
+ }
31848
31862
  }
31849
31863
 
31850
31864
  const functions$2 = functionRegistry.content;
@@ -34614,19 +34628,16 @@ stores.inject(MyMetaStore, storeInstance);
34614
34628
  for (let col = left; col <= right; col++) {
34615
34629
  const colZone = { left: col, right: col, top: 0, bottom: numberOfRows - 1 };
34616
34630
  const { x, width } = this.getters.getVisibleRect(colZone);
34617
- const colHasFilter = this.getters.doesZonesContainFilter(sheetId, [colZone]);
34618
34631
  const isColActive = activeCols.has(col);
34619
34632
  const isColSelected = selectedCols.has(col);
34620
34633
  if (isColActive) {
34621
- ctx.fillStyle = colHasFilter ? FILTERS_COLOR : BACKGROUND_HEADER_ACTIVE_COLOR;
34634
+ ctx.fillStyle = BACKGROUND_HEADER_ACTIVE_COLOR;
34622
34635
  }
34623
34636
  else if (isColSelected) {
34624
- ctx.fillStyle = colHasFilter
34625
- ? BACKGROUND_HEADER_SELECTED_FILTER_COLOR
34626
- : BACKGROUND_HEADER_SELECTED_COLOR;
34637
+ ctx.fillStyle = BACKGROUND_HEADER_SELECTED_COLOR;
34627
34638
  }
34628
34639
  else {
34629
- ctx.fillStyle = colHasFilter ? BACKGROUND_HEADER_FILTER_COLOR : BACKGROUND_HEADER_COLOR;
34640
+ ctx.fillStyle = BACKGROUND_HEADER_COLOR;
34630
34641
  }
34631
34642
  ctx.fillRect(x, 0, width, HEADER_HEIGHT);
34632
34643
  }
@@ -34634,19 +34645,16 @@ stores.inject(MyMetaStore, storeInstance);
34634
34645
  for (let row = top; row <= bottom; row++) {
34635
34646
  const rowZone = { top: row, bottom: row, left: 0, right: numberOfCols - 1 };
34636
34647
  const { y, height } = this.getters.getVisibleRect(rowZone);
34637
- const rowHasFilter = this.getters.doesZonesContainFilter(sheetId, [rowZone]);
34638
34648
  const isRowActive = activeRows.has(row);
34639
34649
  const isRowSelected = selectedRows.has(row);
34640
34650
  if (isRowActive) {
34641
- ctx.fillStyle = rowHasFilter ? FILTERS_COLOR : BACKGROUND_HEADER_ACTIVE_COLOR;
34651
+ ctx.fillStyle = BACKGROUND_HEADER_ACTIVE_COLOR;
34642
34652
  }
34643
34653
  else if (isRowSelected) {
34644
- ctx.fillStyle = rowHasFilter
34645
- ? BACKGROUND_HEADER_SELECTED_FILTER_COLOR
34646
- : BACKGROUND_HEADER_SELECTED_COLOR;
34654
+ ctx.fillStyle = BACKGROUND_HEADER_SELECTED_COLOR;
34647
34655
  }
34648
34656
  else {
34649
- ctx.fillStyle = rowHasFilter ? BACKGROUND_HEADER_FILTER_COLOR : BACKGROUND_HEADER_COLOR;
34657
+ ctx.fillStyle = BACKGROUND_HEADER_COLOR;
34650
34658
  }
34651
34659
  ctx.fillRect(0, y, HEADER_WIDTH, height);
34652
34660
  }
@@ -44819,7 +44827,6 @@ stores.inject(MyMetaStore, storeInstance);
44819
44827
 
44820
44828
  class TablePlugin extends CorePlugin {
44821
44829
  static getters = [
44822
- "doesZonesContainFilter",
44823
44830
  "getFilter",
44824
44831
  "getFilters",
44825
44832
  "getTable",
@@ -44976,10 +44983,6 @@ stores.inject(MyMetaStore, storeInstance);
44976
44983
  getTablesOverlappingZones(sheetId, zones) {
44977
44984
  return this.getTables(sheetId).filter((table) => zones.some((zone) => overlap(table.range.zone, zone)));
44978
44985
  }
44979
- doesZonesContainFilter(sheetId, zones) {
44980
- return (this.getTablesOverlappingZones(sheetId, zones).filter((table) => table.config.hasFilters)
44981
- .length > 0);
44982
- }
44983
44986
  getFilterHeaders(sheetId) {
44984
44987
  const headers = [];
44985
44988
  for (const table of this.getTables(sheetId)) {
@@ -52474,6 +52477,7 @@ stores.inject(MyMetaStore, storeInstance);
52474
52477
  this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
52475
52478
  this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
52476
52479
  this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
52480
+ this.selectedFigureId = null;
52477
52481
  break;
52478
52482
  }
52479
52483
  /** Any change to the selection has to be reflected in the selection processor. */
@@ -56092,9 +56096,6 @@ stores.inject(MyMetaStore, storeInstance);
56092
56096
  .text-muted {
56093
56097
  color: grey !important;
56094
56098
  }
56095
- button {
56096
- color: #333;
56097
- }
56098
56099
  .o-disabled {
56099
56100
  opacity: 0.4;
56100
56101
  pointer: default;
@@ -56215,17 +56216,17 @@ stores.inject(MyMetaStore, storeInstance);
56215
56216
  }
56216
56217
 
56217
56218
  .o-button {
56218
- border: 1px solid lightgrey;
56219
+ border: 1px solid;
56219
56220
  padding: 0px 20px 0px 20px;
56220
56221
  border-radius: 4px;
56221
56222
  font-weight: 500;
56222
56223
  font-size: 14px;
56223
56224
  height: 30px;
56224
56225
  line-height: 16px;
56225
- background: white;
56226
56226
  margin-right: 8px;
56227
- &:hover:enabled {
56228
- background-color: rgba(0, 0, 0, 0.08);
56227
+
56228
+ &:not(:hover) {
56229
+ background-color: transparent;
56229
56230
  }
56230
56231
 
56231
56232
  &:enabled {
@@ -56239,6 +56240,15 @@ stores.inject(MyMetaStore, storeInstance);
56239
56240
  &:last-child {
56240
56241
  margin-right: 0px;
56241
56242
  }
56243
+
56244
+ &.o-button-grey {
56245
+ border-color: lightgrey;
56246
+ background: #ffffff;
56247
+ color: #333;
56248
+ &:hover:enabled {
56249
+ background-color: rgba(0, 0, 0, 0.08);
56250
+ }
56251
+ }
56242
56252
  }
56243
56253
 
56244
56254
  .o-input {
@@ -60166,9 +60176,9 @@ stores.inject(MyMetaStore, storeInstance);
60166
60176
  exports.tokenize = tokenize;
60167
60177
 
60168
60178
 
60169
- __info__.version = "17.2.0";
60170
- __info__.date = "2024-03-20T08:12:44.398Z";
60171
- __info__.hash = "1869c24";
60179
+ __info__.version = "17.2.1";
60180
+ __info__.date = "2024-03-25T09:41:58.737Z";
60181
+ __info__.hash = "f97284c";
60172
60182
 
60173
60183
 
60174
60184
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);