@odoo/o-spreadsheet 18.3.1 → 18.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.
@@ -1,9 +1,9 @@
1
1
  <!--
2
2
  This file is generated by o-spreadsheet build tools. Do not edit it.
3
3
  @see https://github.com/odoo/o-spreadsheet
4
- @version 18.3.1
5
- @date 2025-05-02T12:34:13.360Z
6
- @hash 7b9574b
4
+ @version 18.3.3
5
+ @date 2025-05-13T17:55:28.556Z
6
+ @hash b79924a
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -849,7 +849,7 @@
849
849
  fields="props.unusedGroupableFields"
850
850
  />
851
851
  </div>
852
- <t t-foreach="props.definition.columns" t-as="col" t-key="col.nameWithGranularity">
852
+ <t t-foreach="props.definition.columns" t-as="col" t-key="col_index">
853
853
  <div
854
854
  t-on-pointerdown="(ev) => this.startDragAndDrop(col, ev)"
855
855
  t-att-style="dragAndDrop.itemsStyle[col.nameWithGranularity]"
@@ -875,7 +875,7 @@
875
875
  fields="props.unusedGroupableFields"
876
876
  />
877
877
  </div>
878
- <t t-foreach="props.definition.rows" t-as="row" t-key="row.nameWithGranularity">
878
+ <t t-foreach="props.definition.rows" t-as="row" t-key="row_index">
879
879
  <div
880
880
  t-on-pointerdown="(ev) => this.startDragAndDrop(row, ev)"
881
881
  t-att-style="dragAndDrop.itemsStyle[row.nameWithGranularity]"
@@ -1017,7 +1017,7 @@
1017
1017
  <t t-name="o-spreadsheet-PivotDimensionGranularity">
1018
1018
  <div class="d-flex flex-row">
1019
1019
  <div class="d-flex flex-row py-1 px-2 w-100 small">
1020
- <t t-set="granularity" t-value="props.dimension.granularity"/>
1020
+ <t t-set="granularityProps" t-value="props.dimension.granularity || 'month'"/>
1021
1021
  <div class="pivot-dim-operator-label">Granularity</div>
1022
1022
  <select
1023
1023
  class="o-input flex-grow-1"
@@ -1026,10 +1026,10 @@
1026
1026
  t-foreach="props.allGranularities"
1027
1027
  t-as="granularity"
1028
1028
  t-key="granularity"
1029
- t-if="props.availableGranularities.has(granularity) || granularity === props.dimension.granularity"
1029
+ t-if="props.availableGranularities.has(granularity) || granularity === granularityProps"
1030
1030
  t-att-value="granularity"
1031
1031
  t-esc="periods[granularity]"
1032
- t-att-selected="granularity === props.dimension.granularity or (granularity === 'month' and !props.dimension.granularity)"
1032
+ t-att-selected="granularity === granularityProps or (granularity === 'month' and !granularityProps)"
1033
1033
  />
1034
1034
  </select>
1035
1035
  </div>
@@ -3871,6 +3871,55 @@
3871
3871
  </t>
3872
3872
  </t>
3873
3873
 
3874
+ <t t-name="o_spreadsheet.PivotHTMLRenderer">
3875
+ <div class="o_pivot_html_renderer">
3876
+ <Checkbox
3877
+ name="'missing_values'"
3878
+ label.translate="Display missing cells only"
3879
+ value="state.showMissingValuesOnly"
3880
+ onChange.bind="(value) => this.state.showMissingValuesOnly = value"
3881
+ className="'m-2'"
3882
+ />
3883
+ <t t-set="tableData" t-value="getTableData()"/>
3884
+ <table
3885
+ class="o_pivot_html_renderer"
3886
+ t-if="tableData.values.length > 0 or tableData.rows.length > 0">
3887
+ <tr t-foreach="tableData.columns" t-as="row" t-key="row_index">
3888
+ <t t-if="row_index === 0">
3889
+ <th t-att-rowspan="tableData.columns.length"/>
3890
+ </t>
3891
+ <t t-foreach="row" t-as="cell" t-key="cell_index">
3892
+ <th
3893
+ t-att-colspan="cell.span"
3894
+ t-att-style="cell.style"
3895
+ t-att-class="{ o_missing_value: cell.isMissing }"
3896
+ t-on-click="() => props.onCellClicked(cell.formula)">
3897
+ <t t-esc="cell.value"/>
3898
+ </th>
3899
+ </t>
3900
+ </tr>
3901
+ <t t-foreach="tableData.rows" t-as="row" t-key="row_index">
3902
+ <tr>
3903
+ <th
3904
+ t-att-style="row.style"
3905
+ t-att-class="{ o_missing_value: row.isMissing }"
3906
+ t-on-click="() => props.onCellClicked(row.formula)">
3907
+ <t t-esc="row.value"/>
3908
+ </th>
3909
+ <t t-foreach="tableData.values" t-as="col" t-key="col_index">
3910
+ <td
3911
+ t-att-class="{ o_missing_value: col[row_index].isMissing }"
3912
+ t-on-click="() => props.onCellClicked(col[row_index].formula)">
3913
+ <t t-esc="col[row_index].value"/>
3914
+ </td>
3915
+ </t>
3916
+ </tr>
3917
+ </t>
3918
+ </table>
3919
+ <div class="alert alert-info" t-else="1">This pivot has no cell missing on this sheet</div>
3920
+ </div>
3921
+ </t>
3922
+
3874
3923
  <t t-name="o-spreadsheet-PaintFormatButton">
3875
3924
  <span
3876
3925
  class="o-menu-item-button"
@@ -6062,12 +6111,17 @@
6062
6111
  t-on-dblclick="onDblClick"
6063
6112
  t-on-contextmenu="onContextMenu"
6064
6113
  t-on-blur="onBlur"
6114
+ t-on-wheel="onWheel"
6065
6115
  />
6066
6116
  </div>
6067
6117
  <div
6068
6118
  class="o-composer-assistant-container shadow position-absolute z-1"
6069
6119
  t-att-style="assistantContainerStyle"
6070
- t-if="props.focus !== 'inactive' and !assistant.forcedClosed and assistantIsAvailable">
6120
+ t-if="props.focus !== 'inactive' and !assistant.forcedClosed and assistantIsAvailable"
6121
+ t-on-wheel.stop=""
6122
+ t-on-pointerdown.prevent.stop=""
6123
+ t-on-pointerup.prevent.stop=""
6124
+ t-on-click.prevent.stop="">
6071
6125
  <span
6072
6126
  role="button"
6073
6127
  t-on-click="closeAssistant"
@@ -6075,13 +6129,7 @@
6075
6129
  <i class="fa fa-circle fa-stack-1x fa-inverse"/>
6076
6130
  <i class="fa fa-times-circle fa-stack-1x text-muted"/>
6077
6131
  </span>
6078
- <div
6079
- class="o-composer-assistant overflow-auto"
6080
- t-att-style="assistantStyle"
6081
- t-on-wheel.stop=""
6082
- t-on-pointerdown.prevent.stop=""
6083
- t-on-click.prevent.stop=""
6084
- t-on-pointerup.prevent.stop="">
6132
+ <div class="o-composer-assistant overflow-auto" t-att-style="assistantStyle">
6085
6133
  <FunctionDescriptionProvider
6086
6134
  t-if="functionDescriptionState.showDescription"
6087
6135
  functionDescription="functionDescriptionState.functionDescription"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.3.1",
3
+ "version": "18.3.3",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",