[IMP] spreadsheet: update o_spreadsheet to latest version

https://github.com/odoo/o-spreadsheet/commit/573e6791 [REL] 16.3.0-alpha.3
https://github.com/odoo/o-spreadsheet/commit/3cf6910c [IMP] spreadsheet: global `o-disabled` CSS class
https://github.com/odoo/o-spreadsheet/commit/18dcf13f [IMP] model: add canDispatch method
https://github.com/odoo/o-spreadsheet/commit/ca3b3d9d [IMP] figure: reposition figure upon row/col deletion Task: 3171141
https://github.com/odoo/o-spreadsheet/commit/2a814dce [FIX] viewport: viewport maxSize should consider the client size Task: 3204720
https://github.com/odoo/o-spreadsheet/commit/bc96d257 [IMP] menu: display separator of hidden items
https://github.com/odoo/o-spreadsheet/commit/1cba1222 [FIX] header_size: prevent row resize caused by multiline formulas
https://github.com/odoo/o-spreadsheet/commit/cfa3b530 [IMP] test: make test tsconfig work in vscode
https://github.com/odoo/o-spreadsheet/commit/133656d6 [FIX] *: use `Color` alias wherever we work with color strings
https://github.com/odoo/o-spreadsheet/commit/bff461d0 [FIX] *: standardization of color representation Task: 3193882
https://github.com/odoo/o-spreadsheet/commit/7445938f [FIX] type: Fix the Alias type
https://github.com/odoo/o-spreadsheet/commit/e96eef5b [IMP] Chart: use first row as header
https://github.com/odoo/o-spreadsheet/commit/91734b7d [MOV] filter: rename fitler_icons_overlay file
https://github.com/odoo/o-spreadsheet/commit/d3234a56 [IMP] color_picker : added accessibility to custom color picker
https://github.com/odoo/o-spreadsheet/commit/bbf4f484 [IMP] xlsx_import: support more date formats
https://github.com/odoo/o-spreadsheet/commit/2e02cfcc [IMP] tests: improve readability of new Model() in tests
https://github.com/odoo/o-spreadsheet/commit/d3036999 [FIX] tests: Bypass useless `drawGrid` Task: 3254822
https://github.com/odoo/o-spreadsheet/commit/96d5e44e [FIX] model: prevent UI plugins to refuse core commands
https://github.com/odoo/o-spreadsheet/commit/21333f9c [FIX] tokenizer: detect xc with sheet name starting with a number Task: 3215464
https://github.com/odoo/o-spreadsheet/commit/654d22fc [FIX] clipboard: don't open composer on firefox
https://github.com/odoo/o-spreadsheet/commit/b14ef0fc [FIX] demo: optional askConfirmation cancel argument
https://github.com/odoo/o-spreadsheet/commit/bf6c3b6a [IMP] spreadsheet: inherit font family
https://github.com/odoo/o-spreadsheet/commit/c20ecd57 [IMP] edition: remove `getEditionSheet` for redundancy Task: 3229919

closes odoo/odoo#118429

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
This commit is contained in:
Rémi Rahir (rar)
2023-04-13 16:40:30 +02:00
parent 2965dae628
commit 33b39eef80
3 changed files with 565 additions and 328 deletions
File diff suppressed because it is too large Load Diff
@@ -193,7 +193,7 @@
t-on-click="() => this.onColorClick(color)"
t-attf-style="background-color:{{color}};">
<div
t-if="props.currentColor === color"
t-if="isSameColor(props.currentColor, color)"
align="center"
t-attf-style="color:{{getCheckMarkColor()}}">
&#10004;
@@ -201,13 +201,13 @@
</div>
</div>
<div class="o-separator"/>
<div class="o-color-picker-section-name">
<div
class="o-color-picker-section-name o-color-picker-toggler"
t-on-click="toggleColorPicker">
<span>Custom</span>
</div>
<div class="colors-grid">
<div
class="o-color-picker-toggler o-color-picker-line-item"
t-on-click.stop="toggleColorPicker">
<div class="colors-grid o-color-picker-toggler" t-on-click.stop="toggleColorPicker">
<div class="o-color-picker-line-item o-color-picker-toggler">
<div align="center">+</div>
</div>
<div
@@ -879,7 +879,8 @@
maxWidth="cellPopover.Component.size and cellPopover.Component.size.maxHidth"
anchorRect="cellPopover.anchorRect"
containerRect="env.getPopoverContainerRect()"
onMouseWheel="props.onMouseWheel">
onMouseWheel="props.onMouseWheel"
zIndex="zIndex">
<t
t-component="cellPopover.Component"
t-props="{...cellPopover.props, onClosed : () => props.onClosePopover()}"
@@ -1710,7 +1711,7 @@
</t>
<t t-name="o-spreadsheet-Menu" owl="1">
<Popover t-if="visibleMenuItems.length" t-props="popoverProps">
<Popover t-if="menuItemsAndSeparators.length" t-props="popoverProps">
<div
t-ref="menu"
class="o-menu"
@@ -1718,31 +1719,33 @@
t-on-wheel.stop=""
t-on-click.stop=""
t-on-contextmenu.prevent="">
<t t-foreach="visibleMenuItems" t-as="menuItem" t-key="menuItem.id">
<t t-set="isMenuRoot" t-value="isRoot(menuItem)"/>
<t t-set="isMenuEnabled" t-value="isEnabled(menuItem)"/>
<div
t-att-title="getName(menuItem)"
t-att-data-name="menuItem.id"
t-on-click="() => this.onClickMenu(menuItem, menuItem_index)"
t-on-mouseover="() => this.onMouseOver(menuItem, menuItem_index)"
class="o-menu-item"
t-att-class="{ 'o-menu-root': isMenuRoot, 'disabled': !isMenuEnabled, 'o-menu-item-active': isParentMenu(subMenu, menuItem)}"
t-att-style="getColor(menuItem)">
<span class="o-menu-item-name" t-esc="getName(menuItem)"/>
<span
t-if="menuItem.description"
class="o-menu-item-description"
t-esc="menuItem.description"
/>
<t t-if="isMenuRoot">
<span t-call="o-spreadsheet-Icon.TRIANGLE_RIGHT"/>
</t>
<t t-elif="menuItem.icon">
<i t-att-class="menuItem.icon" class="o-menu-item-icon"/>
</t>
</div>
<div t-if="menuItem.separator and !menuItem_last" class="o-separator"/>
<t t-foreach="menuItemsAndSeparators" t-as="menuItem" t-key="menuItem_index">
<div t-if="menuItem === 'separator'" class="o-separator"/>
<t t-else="">
<t t-set="isMenuRoot" t-value="isRoot(menuItem)"/>
<t t-set="isMenuEnabled" t-value="isEnabled(menuItem)"/>
<div
t-att-title="getName(menuItem)"
t-att-data-name="menuItem.id"
t-on-click="(ev) => this.onClickMenu(menuItem, menuItem_index, ev)"
t-on-mouseover="(ev) => this.onMouseOver(menuItem, menuItem_index, ev)"
class="o-menu-item"
t-att-class="{ 'o-menu-root': isMenuRoot, 'disabled': !isMenuEnabled, 'o-menu-item-active': isParentMenu(subMenu, menuItem)}"
t-att-style="getColor(menuItem)">
<span class="o-menu-item-name" t-esc="getName(menuItem)"/>
<span
t-if="menuItem.description"
class="o-menu-item-description"
t-esc="menuItem.description"
/>
<t t-if="isMenuRoot">
<span t-call="o-spreadsheet-Icon.TRIANGLE_RIGHT"/>
</t>
<t t-elif="menuItem.icon">
<i t-att-class="menuItem.icon" class="o-menu-item-icon"/>
</t>
</div>
</t>
</t>
</div>
<Menu
@@ -1760,7 +1763,11 @@
<t t-name="o-spreadsheet-Popover" owl="1">
<t t-portal="'.o-spreadsheet'">
<div class="o-popover" t-ref="popover" t-on-wheel="props.onMouseWheel">
<div
class="o-popover"
t-ref="popover"
t-on-wheel="props.onMouseWheel"
t-att-style="popoverStyle">
<t t-slot="default"/>
</div>
</t>
@@ -1841,15 +1848,6 @@
onSelectionChanged="(ranges) => this.onDataSeriesRangesChanged(ranges)"
onSelectionConfirmed="() => this.onDataSeriesConfirmed()"
/>
<label>
<input
type="checkbox"
t-att-checked="props.definition.dataSetsHaveTitle"
t-on-change="onUpdateDataSetsHaveTitle"
class="align-middle"
/>
Data series include title
</label>
</div>
<div class="o-section o-data-labels">
<div class="o-section-title">Categories / Labels</div>
@@ -1871,6 +1869,19 @@
Aggregate
</label>
</div>
<div class="o-section o-use-row-as-headers" t-if="calculateHeaderPosition()">
<label>
<input
type="checkbox"
t-att-checked="props.definition.dataSetsHaveTitle"
t-on-change="onUpdateDataSetsHaveTitle"
class="align-middle"
/>
Use row
<span t-esc="calculateHeaderPosition()"/>
as headers
</label>
</div>
<div class="o-section o-sidepanel-error" t-if="errorMessages">
<div t-foreach="errorMessages" t-as="error" t-key="error">
<t t-esc="error"/>
@@ -2104,15 +2115,6 @@
onSelectionChanged="(ranges) => this.onDataSeriesRangesChanged(ranges)"
onSelectionConfirmed="() => this.onDataSeriesConfirmed()"
/>
<label>
<input
type="checkbox"
t-att-checked="props.definition.dataSetsHaveTitle"
t-on-change="onUpdateDataSetsHaveTitle"
class="align-middle"
/>
Data series include title
</label>
</div>
<div class="o-section o-data-labels">
<div class="o-section-title">Categories / Labels</div>
@@ -2134,6 +2136,19 @@
Aggregate
</label>
</div>
<div class="o-section o-use-row-as-headers" t-if="calculateHeaderPosition()">
<label>
<input
type="checkbox"
t-att-checked="props.definition.dataSetsHaveTitle"
t-on-change="onUpdateDataSetsHaveTitle"
class="align-middle"
/>
Use row
<span t-esc="calculateHeaderPosition()"/>
as headers
</label>
</div>
<div class="o-section o-sidepanel-error" t-if="errorMessages">
<div t-foreach="errorMessages" t-as="error" t-key="error">
<t t-esc="error"/>
@@ -2207,15 +2222,6 @@
onSelectionChanged="(ranges) => this.onDataSeriesRangesChanged(ranges)"
onSelectionConfirmed="() => this.onDataSeriesConfirmed()"
/>
<label>
<input
type="checkbox"
t-att-checked="props.definition.dataSetsHaveTitle"
t-on-change="onUpdateDataSetsHaveTitle"
class="align-middle"
/>
Data series include title
</label>
</div>
<div class="o-section o-data-labels">
<div class="o-section-title">Categories / Labels</div>
@@ -2248,6 +2254,19 @@
</label>
</div>
</div>
<div class="o-section o-use-row-as-headers" t-if="calculateHeaderPosition()">
<label>
<input
type="checkbox"
t-att-checked="props.definition.dataSetsHaveTitle"
t-on-change="onUpdateDataSetsHaveTitle"
class="align-middle"
/>
Use row
<span t-esc="calculateHeaderPosition()"/>
as headers
</label>
</div>
<div class="o-section o-sidepanel-error" t-if="errorMessages">
<div t-foreach="errorMessages" t-as="error" t-key="error">
<t t-esc="error"/>
@@ -3550,7 +3569,7 @@
</t>
</odoo>
<!--
__info__.version = '16.3.0-alpha.2';
__info__.date = '2023-03-23T11:47:49.776Z';
__info__.hash = '59f25bb';
__info__.version = '16.3.0-alpha.3';
__info__.date = '2023-04-13T09:07:06.746Z';
__info__.hash = '6431610';
-->
@@ -134,7 +134,7 @@ QUnit.module("spreadsheet > odoo chart plugin", {}, () => {
assert.deepEqual(model.getters.getChartRuntime(chartId).chartJsConfig.data, {
datasets: [
{
backgroundColor: "#1f77b466",
backgroundColor: "#1F77B466",
borderColor: "rgb(31,119,180)",
data: [1, 3],
label: "Count",