@odoo/o-spreadsheet 19.1.2 → 19.2.0-alpha.2
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.
- package/dist/o-spreadsheet-engine.d.ts +10 -6
- package/dist/o-spreadsheet-engine.esm.js +130 -16
- package/dist/o-spreadsheet-engine.iife.js +130 -16
- package/dist/o-spreadsheet-engine.min.iife.js +312 -312
- package/dist/o-spreadsheet.d.ts +17 -10
- package/dist/o_spreadsheet.css +20 -10
- package/dist/o_spreadsheet.esm.js +678 -589
- package/dist/o_spreadsheet.iife.js +678 -589
- package/dist/o_spreadsheet.min.iife.js +9 -9
- package/dist/o_spreadsheet.xml +97 -103
- package/package.json +2 -2
package/dist/o_spreadsheet.xml
CHANGED
|
@@ -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 19.
|
|
5
|
-
@date 2026-01-07T16:22:
|
|
6
|
-
@hash
|
|
4
|
+
@version 19.2.0-alpha.2
|
|
5
|
+
@date 2026-01-07T16:22:28.451Z
|
|
6
|
+
@hash ac2fa3e
|
|
7
7
|
-->
|
|
8
8
|
<odoo>
|
|
9
9
|
<t t-name="o-spreadsheet-ValidationMessages">
|
|
@@ -1647,38 +1647,29 @@
|
|
|
1647
1647
|
</t>
|
|
1648
1648
|
|
|
1649
1649
|
<t t-name="o-spreadsheet-DataValidationPanel">
|
|
1650
|
-
<div class="o-
|
|
1651
|
-
<t t-
|
|
1652
|
-
<
|
|
1653
|
-
<t t-foreach="validationRules" t-as="rule" t-key="rule.id">
|
|
1654
|
-
<DataValidationPreview
|
|
1655
|
-
rule="localizeDVRule(rule)"
|
|
1656
|
-
onClick="() => this.onPreviewClick(rule.id)"
|
|
1657
|
-
/>
|
|
1658
|
-
</t>
|
|
1659
|
-
</div>
|
|
1660
|
-
<div class="o-dv-add o-button-link p-4 float-end" t-on-click="addDataValidationRule">
|
|
1661
|
-
+ Add another rule
|
|
1662
|
-
</div>
|
|
1663
|
-
</t>
|
|
1664
|
-
<t t-else="">
|
|
1665
|
-
<DataValidationEditor rule="localizeDVRule(state.activeRule)" onExit.bind="onExitEditMode"/>
|
|
1650
|
+
<div class="o-dv">
|
|
1651
|
+
<t t-foreach="validationRules" t-as="rule" t-key="rule.id">
|
|
1652
|
+
<DataValidationPreview rule="localizeDVRule(rule)"/>
|
|
1666
1653
|
</t>
|
|
1654
|
+
<div class="o-dv-add o-button-link p-4 float-end" t-on-click="addDataValidationRule">
|
|
1655
|
+
+ Add another rule
|
|
1656
|
+
</div>
|
|
1667
1657
|
</div>
|
|
1668
1658
|
</t>
|
|
1669
1659
|
|
|
1670
1660
|
<t t-name="o-spreadsheet-DataValidationPreview">
|
|
1671
|
-
<div
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
<div
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1661
|
+
<div
|
|
1662
|
+
class="o-dv-preview d-flex justify-content-between p-3 border-bottom"
|
|
1663
|
+
t-on-click="onPreviewClick"
|
|
1664
|
+
t-ref="dvPreview">
|
|
1665
|
+
<div>
|
|
1666
|
+
<div class="o-dv-preview-description o-fw-bold text-truncate" t-esc="descriptionString"/>
|
|
1667
|
+
<div class="o-dv-preview-ranges text-truncate" t-esc="rangesString"/>
|
|
1668
|
+
</div>
|
|
1669
|
+
<div
|
|
1670
|
+
class="o-dv-delete-button d-flex align-items-center o-button-icon px-3"
|
|
1671
|
+
t-on-click.stop="deleteDataValidation">
|
|
1672
|
+
<t t-call="o-spreadsheet-Icon.TRASH_FILLED"/>
|
|
1682
1673
|
</div>
|
|
1683
1674
|
</div>
|
|
1684
1675
|
</t>
|
|
@@ -1721,7 +1712,7 @@
|
|
|
1721
1712
|
|
|
1722
1713
|
<Section>
|
|
1723
1714
|
<div class="o-sidePanelButtons">
|
|
1724
|
-
<button t-on-click="
|
|
1715
|
+
<button t-on-click="onCancel" class="o-dv-cancel o-button">Cancel</button>
|
|
1725
1716
|
<button t-on-click="onSave" class="o-dv-save o-button primary">Save</button>
|
|
1726
1717
|
</div>
|
|
1727
1718
|
</Section>
|
|
@@ -1801,6 +1792,26 @@
|
|
|
1801
1792
|
</select>
|
|
1802
1793
|
</t>
|
|
1803
1794
|
|
|
1795
|
+
<t t-name="o-spreadsheet-Top10CriterionForm">
|
|
1796
|
+
<div class="o-top-10-criterion d-flex flex-row align-items-center gap-2 w-100 mt-2">
|
|
1797
|
+
<select class="o-top-10-select-values o-input flex-shrink-0" t-on-change="updateIsBottom">
|
|
1798
|
+
<option value="top" t-att-selected="!props.criterion.isBottom">Top</option>
|
|
1799
|
+
<option value="bottom" t-att-selected="props.criterion.isBottom">Bottom</option>
|
|
1800
|
+
</select>
|
|
1801
|
+
<CriterionInput
|
|
1802
|
+
value="props.criterion.values[0]"
|
|
1803
|
+
onValueChanged.bind="onValueChanged"
|
|
1804
|
+
criterionType="props.criterion.type"
|
|
1805
|
+
disableFormulas="true"
|
|
1806
|
+
focused="props.autofocus"
|
|
1807
|
+
/>
|
|
1808
|
+
<select class="o-top-10-select-mode o-input flex-shrink-0" t-on-change="updateIsPercent">
|
|
1809
|
+
<option value="values" t-att-selected="!props.criterion.isPercent">Values</option>
|
|
1810
|
+
<option value="percent" t-att-selected="props.criterion.isPercent">Percent</option>
|
|
1811
|
+
</select>
|
|
1812
|
+
</div>
|
|
1813
|
+
</t>
|
|
1814
|
+
|
|
1804
1815
|
<t t-name="o-spreadsheet-SingleInputCriterionForm">
|
|
1805
1816
|
<CriterionInput
|
|
1806
1817
|
value="props.criterion.values[0]"
|
|
@@ -1879,29 +1890,9 @@
|
|
|
1879
1890
|
</div>
|
|
1880
1891
|
</t>
|
|
1881
1892
|
|
|
1882
|
-
<t t-name="o-spreadsheet-ConditionalFormattingPanel">
|
|
1883
|
-
<div class="o-cf h-100">
|
|
1884
|
-
<t t-if="state.mode === 'list'">
|
|
1885
|
-
<ConditionalFormatPreviewList
|
|
1886
|
-
conditionalFormats="conditionalFormats"
|
|
1887
|
-
onPreviewClick.bind="editConditionalFormat"
|
|
1888
|
-
onAddConditionalFormat.bind="addConditionalFormat"
|
|
1889
|
-
/>
|
|
1890
|
-
</t>
|
|
1891
|
-
<t t-if="state.mode === 'edit'">
|
|
1892
|
-
<ConditionalFormattingEditor
|
|
1893
|
-
editedCf="editedCF"
|
|
1894
|
-
onExit.bind="switchToList"
|
|
1895
|
-
onCancel.bind="cancelEdition"
|
|
1896
|
-
isNewCf="originalEditedCf === undefined"
|
|
1897
|
-
/>
|
|
1898
|
-
</t>
|
|
1899
|
-
</div>
|
|
1900
|
-
</t>
|
|
1901
|
-
|
|
1902
1893
|
<t t-name="o-spreadsheet-ConditionalFormatPreviewList">
|
|
1903
1894
|
<div class="o-cf-preview-list h-100 overflow-auto" t-ref="cfList">
|
|
1904
|
-
<t t-foreach="
|
|
1895
|
+
<t t-foreach="conditionalFormats" t-as="cf" t-key="cf.id">
|
|
1905
1896
|
<div
|
|
1906
1897
|
class="o-cf-preview-container d-flex position-relative"
|
|
1907
1898
|
t-att-style="getPreviewDivStyle(cf)">
|
|
@@ -1909,13 +1900,12 @@
|
|
|
1909
1900
|
conditionalFormat="cf"
|
|
1910
1901
|
class="dragAndDrop.draggedItemId === cf.id ? 'o-cf-dragging' : ''"
|
|
1911
1902
|
onMouseDown="(ev) => this.onPreviewMouseDown(cf, ev)"
|
|
1912
|
-
onPreviewClick="() => props.onPreviewClick(cf)"
|
|
1913
1903
|
/>
|
|
1914
1904
|
</div>
|
|
1915
1905
|
</t>
|
|
1916
1906
|
<div
|
|
1917
1907
|
class="o-button-link p-4 o-cf-add float-end"
|
|
1918
|
-
t-on-click.prevent.stop="
|
|
1908
|
+
t-on-click.prevent.stop="onAddConditionalFormat">
|
|
1919
1909
|
+ Add another rule
|
|
1920
1910
|
</div>
|
|
1921
1911
|
</div>
|
|
@@ -1928,8 +1918,8 @@
|
|
|
1928
1918
|
t-ref="cfPreview"
|
|
1929
1919
|
t-att-class="props.class"
|
|
1930
1920
|
t-att-data-id="cf.id"
|
|
1931
|
-
t-on-click="
|
|
1932
|
-
t-on-pointerdown="(ev) =>
|
|
1921
|
+
t-on-click="editConditionalFormat"
|
|
1922
|
+
t-on-pointerdown="(ev) => props.onMouseDown(ev)">
|
|
1933
1923
|
<div class="o-cf-drag-handle h-100 position-absolute d-flex align-items-center o-button-icon">
|
|
1934
1924
|
<t t-call="o-spreadsheet-Icon.THIN_DRAG_HANDLE"/>
|
|
1935
1925
|
</div>
|
|
@@ -1943,7 +1933,7 @@
|
|
|
1943
1933
|
</t>
|
|
1944
1934
|
<t t-else="">
|
|
1945
1935
|
<div
|
|
1946
|
-
t-att-style="
|
|
1936
|
+
t-att-style="previewImageStyle"
|
|
1947
1937
|
class="o-cf-preview-icon d-flex justify-content-around align-items-center me-3 flex-shrink-0 border">
|
|
1948
1938
|
123
|
|
1949
1939
|
</div>
|
|
@@ -1951,7 +1941,7 @@
|
|
|
1951
1941
|
<div class="o-cf-preview-description me-3 overflow-auto">
|
|
1952
1942
|
<div class="o-cf-preview-ruletype">
|
|
1953
1943
|
<div class="o-cf-preview-description-rule o-fw-bold text-truncate">
|
|
1954
|
-
<t t-esc="
|
|
1944
|
+
<t t-esc="description"/>
|
|
1955
1945
|
</div>
|
|
1956
1946
|
</div>
|
|
1957
1947
|
<div class="o-cf-preview-range text-truncate" t-esc="cf.ranges"/>
|
|
@@ -1959,7 +1949,7 @@
|
|
|
1959
1949
|
<div class="o-cf-delete ms-auto">
|
|
1960
1950
|
<div
|
|
1961
1951
|
class="o-cf-delete-button o-button-icon"
|
|
1962
|
-
t-on-click.stop="
|
|
1952
|
+
t-on-click.stop="deleteConditionalFormat"
|
|
1963
1953
|
title="Remove rule">
|
|
1964
1954
|
<t t-call="o-spreadsheet-Icon.TRASH_FILLED"/>
|
|
1965
1955
|
</div>
|
|
@@ -1976,7 +1966,7 @@
|
|
|
1976
1966
|
t-foreach="['arrows', 'smiley', 'dots']"
|
|
1977
1967
|
t-as="iconSet"
|
|
1978
1968
|
t-key="iconSet"
|
|
1979
|
-
t-on-click="(
|
|
1969
|
+
t-on-click="() => store.setIconSet(iconSet)">
|
|
1980
1970
|
<div>
|
|
1981
1971
|
<t t-call="o-spreadsheet-Icon.{{icons[iconSets[iconSet].good].template}}"/>
|
|
1982
1972
|
</div>
|
|
@@ -1994,14 +1984,14 @@
|
|
|
1994
1984
|
<t t-name="o-spreadsheet-IconSetInflexionPointRow">
|
|
1995
1985
|
<tr>
|
|
1996
1986
|
<td>
|
|
1997
|
-
<div t-on-click.stop="(
|
|
1987
|
+
<div t-on-click.stop="() => store.toggleMenu('iconSet-'+icon+'Icon')">
|
|
1998
1988
|
<div class="o-cf-icon-button o-cf-clickable-icon me-3 border rounded">
|
|
1999
1989
|
<t t-call="o-spreadsheet-Icon.{{icons[iconValue].template}}"/>
|
|
2000
1990
|
</div>
|
|
2001
1991
|
</div>
|
|
2002
1992
|
<IconPicker
|
|
2003
|
-
t-if="state.openedMenu === 'iconSet-'+icon+'Icon'"
|
|
2004
|
-
onIconPicked="(i) =>
|
|
1993
|
+
t-if="store.state.openedMenu === 'iconSet-'+icon+'Icon'"
|
|
1994
|
+
onIconPicked="(i) => store.setIcon(icon, i)"
|
|
2005
1995
|
/>
|
|
2006
1996
|
</td>
|
|
2007
1997
|
<td>When value is</td>
|
|
@@ -2009,7 +1999,7 @@
|
|
|
2009
1999
|
<select
|
|
2010
2000
|
class="o-input"
|
|
2011
2001
|
name="valueType"
|
|
2012
|
-
t-on-change="(ev) =>
|
|
2002
|
+
t-on-change="(ev) => store.setInflectionOperator(inflectionPoint, ev.target.value)">
|
|
2013
2003
|
<option value="gt" t-att-selected="inflectionPointValue.operator === 'gt'">
|
|
2014
2004
|
<span>></span>
|
|
2015
2005
|
</option>
|
|
@@ -2026,7 +2016,7 @@
|
|
|
2026
2016
|
class="o-input"
|
|
2027
2017
|
t-att-class="{ 'o-invalid': isInflectionPointInvalid(inflectionPoint) }"
|
|
2028
2018
|
t-att-value="rule[inflectionPoint].value"
|
|
2029
|
-
t-on-change="(ev) =>
|
|
2019
|
+
t-on-change="(ev) => store.setInflectionValue(inflectionPoint, ev.target.value)"
|
|
2030
2020
|
/>
|
|
2031
2021
|
<StandaloneComposer t-else="" t-props="getColorIconSetComposerProps(inflectionPoint)"/>
|
|
2032
2022
|
</div>
|
|
@@ -2035,7 +2025,7 @@
|
|
|
2035
2025
|
<select
|
|
2036
2026
|
class="o-input"
|
|
2037
2027
|
name="valueType"
|
|
2038
|
-
t-on-change="(ev) =>
|
|
2028
|
+
t-on-change="(ev) => store.setInflectionType(inflectionPoint, ev.target.value)">
|
|
2039
2029
|
<option value="number" t-att-selected="inflectionPointValue.type === 'number'">
|
|
2040
2030
|
Number
|
|
2041
2031
|
</option>
|
|
@@ -2077,14 +2067,14 @@
|
|
|
2077
2067
|
</t>
|
|
2078
2068
|
<tr>
|
|
2079
2069
|
<td>
|
|
2080
|
-
<div t-on-click.stop="(
|
|
2070
|
+
<div t-on-click.stop="() => store.toggleMenu('iconSet-lowerIcon')">
|
|
2081
2071
|
<div class="o-cf-icon-button o-cf-clickable-icon me-3 border rounded">
|
|
2082
2072
|
<t t-call="o-spreadsheet-Icon.{{icons[rule.icons.lower].template}}"/>
|
|
2083
2073
|
</div>
|
|
2084
2074
|
</div>
|
|
2085
2075
|
<IconPicker
|
|
2086
|
-
t-if="state.openedMenu === 'iconSet-lowerIcon'"
|
|
2087
|
-
onIconPicked="(icon) =>
|
|
2076
|
+
t-if="store.state.openedMenu === 'iconSet-lowerIcon'"
|
|
2077
|
+
onIconPicked="(icon) => store.setIcon('lower', icon)"
|
|
2088
2078
|
/>
|
|
2089
2079
|
</td>
|
|
2090
2080
|
<td>Else</td>
|
|
@@ -2097,12 +2087,14 @@
|
|
|
2097
2087
|
</t>
|
|
2098
2088
|
<t t-name="o-spreadsheet-IconSetEditor">
|
|
2099
2089
|
<div class="o-cf-iconset-rule">
|
|
2090
|
+
<t t-set="icons" t-value="store.icons"/>
|
|
2091
|
+
<t t-set="iconSets" t-value="store.iconSets"/>
|
|
2100
2092
|
<t t-call="o-spreadsheet-IconSets"/>
|
|
2101
2093
|
<t t-call="o-spreadsheet-IconSetInflexionPoints"/>
|
|
2102
2094
|
<div class="d-flex flex-row">
|
|
2103
2095
|
<div
|
|
2104
2096
|
class="o-button-link py-1 ps-0 o-cf-iconset-reverse d-flex align-items-center"
|
|
2105
|
-
t-on-click="reverseIcons">
|
|
2097
|
+
t-on-click="() => store.reverseIcons()">
|
|
2106
2098
|
<t t-call="o-spreadsheet-Icon.REFRESH"/>
|
|
2107
2099
|
<div class="ms-1">Reverse icons</div>
|
|
2108
2100
|
</div>
|
|
@@ -2115,17 +2107,17 @@
|
|
|
2115
2107
|
<div class="o-section-subtitle">Color</div>
|
|
2116
2108
|
<RoundColorPicker
|
|
2117
2109
|
currentColor="colorNumberToHex(rule.color)"
|
|
2118
|
-
onColorPicked
|
|
2110
|
+
onColorPicked="(color) => store.updateDataBarColor(color)"
|
|
2119
2111
|
disableNoColor="true"
|
|
2120
2112
|
/>
|
|
2121
2113
|
<div class="o-section-subtitle">Range of values</div>
|
|
2122
2114
|
<SelectionInput
|
|
2123
|
-
ranges="
|
|
2115
|
+
ranges="store.rangeValues"
|
|
2124
2116
|
class="'o-range'"
|
|
2125
2117
|
isInvalid="false"
|
|
2126
2118
|
hasSingleRange="true"
|
|
2127
|
-
onSelectionChanged
|
|
2128
|
-
onSelectionConfirmed
|
|
2119
|
+
onSelectionChanged="(ranges) => store.onDataBarRangeUpdate(ranges)"
|
|
2120
|
+
onSelectionConfirmed="() => store.onDataBarRangeChange()"
|
|
2129
2121
|
required="false"
|
|
2130
2122
|
/>
|
|
2131
2123
|
</div>
|
|
@@ -2140,9 +2132,9 @@
|
|
|
2140
2132
|
<select
|
|
2141
2133
|
class="o-input me-2"
|
|
2142
2134
|
name="valueType"
|
|
2143
|
-
t-on-change="onMidpointChange"
|
|
2135
|
+
t-on-change="(ev) => store.onMidpointChange(ev.target.value)"
|
|
2144
2136
|
t-att-class="{ 'o-select-with-input': threshold and threshold.type !== 'value' }"
|
|
2145
|
-
t-on-click="closeMenus">
|
|
2137
|
+
t-on-click="() => store.closeMenus()">
|
|
2146
2138
|
<option value="none" t-att-selected="threshold === undefined">None</option>
|
|
2147
2139
|
<option value="number" t-att-selected="type === 'number'">Fixed Number</option>
|
|
2148
2140
|
<option value="percentage" t-att-selected="type === 'percentage'">Percentage</option>
|
|
@@ -2154,8 +2146,8 @@
|
|
|
2154
2146
|
<select
|
|
2155
2147
|
class="o-input me-2"
|
|
2156
2148
|
name="valueType"
|
|
2157
|
-
t-on-change="(ev) =>
|
|
2158
|
-
t-on-click="closeMenus"
|
|
2149
|
+
t-on-change="(ev) => store.updateThresholdType(thresholdType, ev.target.value)"
|
|
2150
|
+
t-on-click="() => store.closeMenus()"
|
|
2159
2151
|
t-att-class="{ 'o-select-with-input': threshold?.type !== 'value' }">
|
|
2160
2152
|
<option value="value" t-att-selected="threshold.type === 'value'">Cell values</option>
|
|
2161
2153
|
<option value="number" t-att-selected="threshold.type === 'number'">Number</option>
|
|
@@ -2174,7 +2166,7 @@
|
|
|
2174
2166
|
type="text"
|
|
2175
2167
|
class="o-input"
|
|
2176
2168
|
t-att-value="threshold.value"
|
|
2177
|
-
t-on-change="(ev) =>
|
|
2169
|
+
t-on-change="(ev) => store.updateThresholdValue(thresholdType, ev.target.value)"
|
|
2178
2170
|
t-att-class="{ 'o-invalid': isValueInvalid(thresholdType), 'invisible': threshold === undefined }"
|
|
2179
2171
|
/>
|
|
2180
2172
|
<StandaloneComposer t-else="" t-props="getColorScaleComposerProps(thresholdType)"/>
|
|
@@ -2182,7 +2174,7 @@
|
|
|
2182
2174
|
<div t-attf-class="flex-shrink-0 ms-1 {{ threshold === undefined ? 'invisible' : ''}}">
|
|
2183
2175
|
<RoundColorPicker
|
|
2184
2176
|
currentColor="getThresholdColor(threshold)"
|
|
2185
|
-
onColorPicked="(color) =>
|
|
2177
|
+
onColorPicked="(color) => store.setColorScaleColor(thresholdType, color)"
|
|
2186
2178
|
title="fill_color"
|
|
2187
2179
|
disableNoColor="true"
|
|
2188
2180
|
/>
|
|
@@ -2193,7 +2185,7 @@
|
|
|
2193
2185
|
<t t-name="o-spreadsheet-ColorScaleRuleEditor">
|
|
2194
2186
|
<div class="o-cf-color-scale-editor">
|
|
2195
2187
|
<div class="o-section-subtitle">Preview</div>
|
|
2196
|
-
<div class="o-cf-preview-display mb-4" t-attf-style="{{
|
|
2188
|
+
<div class="o-cf-preview-display mb-4" t-attf-style="{{store.previewGradient}}">
|
|
2197
2189
|
Preview text
|
|
2198
2190
|
</div>
|
|
2199
2191
|
<div class="o-section-subtitle">Minpoint</div>
|
|
@@ -2215,15 +2207,16 @@
|
|
|
2215
2207
|
</t>
|
|
2216
2208
|
|
|
2217
2209
|
<t t-name="o-spreadsheet-ConditionalFormattingEditor">
|
|
2218
|
-
<div class="o-cf-
|
|
2210
|
+
<div class="o-cf-editor">
|
|
2211
|
+
<t t-set="state" t-value="store.state"/>
|
|
2219
2212
|
<Section class="'o-cf-range pb-0'" title.translate="Apply to range">
|
|
2220
2213
|
<div class="o-selection-cf">
|
|
2221
2214
|
<SelectionInput
|
|
2222
2215
|
ranges="state.ranges"
|
|
2223
2216
|
class="'o-range'"
|
|
2224
|
-
isInvalid="isRangeValid"
|
|
2225
|
-
onSelectionChanged
|
|
2226
|
-
onSelectionConfirmed
|
|
2217
|
+
isInvalid="store.isRangeValid"
|
|
2218
|
+
onSelectionChanged="(ranges) => store.onRangeUpdate(ranges)"
|
|
2219
|
+
onSelectionConfirmed="() => store.onRangeConfirmed()"
|
|
2227
2220
|
required="true"
|
|
2228
2221
|
/>
|
|
2229
2222
|
</div>
|
|
@@ -2232,12 +2225,12 @@
|
|
|
2232
2225
|
<div class="o-cf-type-selector">
|
|
2233
2226
|
<BadgeSelection
|
|
2234
2227
|
choices="cfTypesValues"
|
|
2235
|
-
onChange
|
|
2228
|
+
onChange="(ruleType) => store.changeRuleType(ruleType)"
|
|
2236
2229
|
selectedValue="state.currentCFType"
|
|
2237
2230
|
/>
|
|
2238
2231
|
</div>
|
|
2239
2232
|
</Section>
|
|
2240
|
-
<Section
|
|
2233
|
+
<Section>
|
|
2241
2234
|
<t t-if="state.currentCFType === 'CellIsRule'" t-call="o-spreadsheet-CellIsRuleEditor">
|
|
2242
2235
|
<t t-set="rule" t-value="state.rules.cellIs"/>
|
|
2243
2236
|
</t>
|
|
@@ -2265,7 +2258,7 @@
|
|
|
2265
2258
|
</div>
|
|
2266
2259
|
</Section>
|
|
2267
2260
|
<Section>
|
|
2268
|
-
<ValidationMessages messages="errorMessages" msgType="'error'"/>
|
|
2261
|
+
<ValidationMessages messages="store.errorMessages" msgType="'error'"/>
|
|
2269
2262
|
</Section>
|
|
2270
2263
|
</div>
|
|
2271
2264
|
</t>
|
|
@@ -2286,21 +2279,22 @@
|
|
|
2286
2279
|
<t t-name="o-spreadsheet-CellIsRuleEditor">
|
|
2287
2280
|
<t t-set="fill_color">Fill Color</t>
|
|
2288
2281
|
<t t-set="text_color">Text Color</t>
|
|
2282
|
+
<t t-set="state" t-value="store.state"/>
|
|
2289
2283
|
<div class="o-cf-cell-is-rule">
|
|
2290
2284
|
<div class="o-section-subtitle">Format cells if...</div>
|
|
2291
2285
|
<SelectMenu
|
|
2292
2286
|
class="'o-cell-is-operator o-input mb-2'"
|
|
2293
|
-
menuItems="cfCriterionMenuItems"
|
|
2294
|
-
selectedValue="selectedCriterionName"
|
|
2287
|
+
menuItems="store.cfCriterionMenuItems"
|
|
2288
|
+
selectedValue="store.selectedCriterionName"
|
|
2295
2289
|
/>
|
|
2296
2290
|
|
|
2297
2291
|
<t
|
|
2298
|
-
t-if="criterionComponent"
|
|
2299
|
-
t-component="criterionComponent"
|
|
2292
|
+
t-if="store.criterionComponent"
|
|
2293
|
+
t-component="store.criterionComponent"
|
|
2300
2294
|
t-key="state.rules.cellIs.operator"
|
|
2301
|
-
criterion="genericCriterion"
|
|
2302
|
-
onCriterionChanged
|
|
2303
|
-
autofocus="
|
|
2295
|
+
criterion="store.genericCriterion"
|
|
2296
|
+
onCriterionChanged="(rule) => store.onRuleValuesChanged(rule)"
|
|
2297
|
+
autofocus="store.state.hasEditedCf"
|
|
2304
2298
|
/>
|
|
2305
2299
|
|
|
2306
2300
|
<div class="o-section-subtitle pt-3">Formatting style</div>
|
|
@@ -2313,35 +2307,35 @@
|
|
|
2313
2307
|
class="o-hoverable-button o-menu-item-button"
|
|
2314
2308
|
title="Bold"
|
|
2315
2309
|
t-att-class="{active:rule.style.bold}"
|
|
2316
|
-
t-on-click="() =>
|
|
2310
|
+
t-on-click="() => store.toggleStyle('bold')">
|
|
2317
2311
|
<t t-call="o-spreadsheet-Icon.BOLD"/>
|
|
2318
2312
|
</div>
|
|
2319
2313
|
<div
|
|
2320
2314
|
class="o-hoverable-button o-menu-item-button"
|
|
2321
2315
|
title="Italic"
|
|
2322
2316
|
t-att-class="{active:rule.style.italic}"
|
|
2323
|
-
t-on-click="() =>
|
|
2317
|
+
t-on-click="() => store.toggleStyle('italic')">
|
|
2324
2318
|
<t t-call="o-spreadsheet-Icon.ITALIC"/>
|
|
2325
2319
|
</div>
|
|
2326
2320
|
<div
|
|
2327
2321
|
class="o-hoverable-button o-menu-item-button"
|
|
2328
2322
|
title="Underline"
|
|
2329
2323
|
t-att-class="{active:rule.style.underline}"
|
|
2330
|
-
t-on-click="(ev) =>
|
|
2324
|
+
t-on-click="(ev) => store.toggleStyle('underline', ev)">
|
|
2331
2325
|
<t t-call="o-spreadsheet-Icon.UNDERLINE"/>
|
|
2332
2326
|
</div>
|
|
2333
2327
|
<div
|
|
2334
2328
|
class="o-hoverable-button o-menu-item-button"
|
|
2335
2329
|
title="Strikethrough"
|
|
2336
2330
|
t-att-class="{active:rule.style.strikethrough}"
|
|
2337
|
-
t-on-click="(ev) =>
|
|
2331
|
+
t-on-click="(ev) => store.toggleStyle('strikethrough', ev)">
|
|
2338
2332
|
<t t-call="o-spreadsheet-Icon.STRIKE"/>
|
|
2339
2333
|
</div>
|
|
2340
2334
|
<ColorPickerWidget
|
|
2341
2335
|
currentColor="rule.style.textColor || '#000000'"
|
|
2342
|
-
toggleColorPicker="(
|
|
2336
|
+
toggleColorPicker="() => store.toggleMenu('cellIsRule-textColor')"
|
|
2343
2337
|
showColorPicker="state.openedMenu === 'cellIsRule-textColor'"
|
|
2344
|
-
onColorPicked="(color) =>
|
|
2338
|
+
onColorPicked="(color) => store.setColor('textColor', color)"
|
|
2345
2339
|
title="text_color"
|
|
2346
2340
|
icon="'o-spreadsheet-Icon.TEXT_COLOR'"
|
|
2347
2341
|
class="'o-hoverable-button o-menu-item-button'"
|
|
@@ -2349,9 +2343,9 @@
|
|
|
2349
2343
|
<div class="o-divider border-end"/>
|
|
2350
2344
|
<ColorPickerWidget
|
|
2351
2345
|
currentColor="rule.style.fillColor"
|
|
2352
|
-
toggleColorPicker="(
|
|
2346
|
+
toggleColorPicker="() => store.toggleMenu('cellIsRule-fillColor')"
|
|
2353
2347
|
showColorPicker="state.openedMenu === 'cellIsRule-fillColor'"
|
|
2354
|
-
onColorPicked="(color) =>
|
|
2348
|
+
onColorPicked="(color) => store.setColor('fillColor', color)"
|
|
2355
2349
|
title="fill_color"
|
|
2356
2350
|
icon="'o-spreadsheet-Icon.FILL_COLOR'"
|
|
2357
2351
|
class="'o-hoverable-button o-menu-item-button'"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odoo/o-spreadsheet",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.2.0-alpha.2",
|
|
4
4
|
"description": "A spreadsheet component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/o-spreadsheet.cjs.js",
|
|
@@ -176,6 +176,6 @@
|
|
|
176
176
|
]
|
|
177
177
|
},
|
|
178
178
|
"publishConfig": {
|
|
179
|
-
"tag": "
|
|
179
|
+
"tag": "alpha"
|
|
180
180
|
}
|
|
181
181
|
}
|