@odoo/o-spreadsheet 19.2.0-alpha.1 → 19.2.0-alpha.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.
- package/dist/o-spreadsheet-engine.d.ts +89 -27
- package/dist/o-spreadsheet-engine.esm.js +2190 -1003
- package/dist/o-spreadsheet-engine.iife.js +2190 -1002
- package/dist/o-spreadsheet-engine.min.iife.js +334 -334
- package/dist/o-spreadsheet.d.ts +117 -47
- package/dist/o_spreadsheet.css +56 -17
- package/dist/o_spreadsheet.esm.js +4289 -2795
- package/dist/o_spreadsheet.iife.js +4289 -2795
- package/dist/o_spreadsheet.min.iife.js +320 -320
- package/dist/o_spreadsheet.xml +174 -122
- package/package.json +3 -3
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.2.0-alpha.
|
|
5
|
-
@date
|
|
6
|
-
@hash
|
|
4
|
+
@version 19.2.0-alpha.3
|
|
5
|
+
@date 2026-01-14T10:03:04.642Z
|
|
6
|
+
@hash e5cbf18
|
|
7
7
|
-->
|
|
8
8
|
<odoo>
|
|
9
9
|
<t t-name="o-spreadsheet-ValidationMessages">
|
|
@@ -271,15 +271,17 @@
|
|
|
271
271
|
t-esc="categories[category_value]"
|
|
272
272
|
/>
|
|
273
273
|
</div>
|
|
274
|
-
<div
|
|
274
|
+
<div
|
|
275
|
+
class="d-flex flex-wrap px-4"
|
|
276
|
+
t-att-class="props.type === 'pivot' ? 'o-pivot-previews' : 'o-table-previews'">
|
|
275
277
|
<t t-foreach="displayedStyles" t-as="styleId" t-key="styleId">
|
|
276
278
|
<TableStylePreview
|
|
277
|
-
class="'o-table-style-popover-preview'"
|
|
278
279
|
styleId="styleId"
|
|
279
280
|
selected="styleId === props.selectedStyleId"
|
|
280
281
|
tableConfig="props.tableConfig"
|
|
281
|
-
tableStyle="
|
|
282
|
+
tableStyle="props.tableStyles[styleId]"
|
|
282
283
|
onClick="() => this.props.onStylePicked(styleId)"
|
|
284
|
+
type="props.type"
|
|
283
285
|
/>
|
|
284
286
|
</t>
|
|
285
287
|
<div
|
|
@@ -301,7 +303,7 @@
|
|
|
301
303
|
t-att-title="styleName"
|
|
302
304
|
t-on-click="props.onClick"
|
|
303
305
|
t-on-contextmenu.prevent="(ev) => this.onContextMenu(ev)">
|
|
304
|
-
<div
|
|
306
|
+
<div class="o-table-preview">
|
|
305
307
|
<canvas t-ref="canvas" class="w-100 h-100"/>
|
|
306
308
|
</div>
|
|
307
309
|
<div
|
|
@@ -322,15 +324,17 @@
|
|
|
322
324
|
|
|
323
325
|
<t t-name="o-spreadsheet-TableStylePicker">
|
|
324
326
|
<div class="o-table-style-picker d-flex flew-row justify-content-between ps-1 border rounded">
|
|
325
|
-
<div
|
|
327
|
+
<div
|
|
328
|
+
class="d-flex flex-row overflow-hidden"
|
|
329
|
+
t-att-class="props.type === 'pivot' ? 'o-pivot-previews' : 'o-table-previews ps-2'">
|
|
326
330
|
<t t-foreach="getDisplayedTableStyles()" t-as="styleId" t-key="styleId">
|
|
327
331
|
<TableStylePreview
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
tableStyle="env.model.getters.getTableStyle(styleId)"
|
|
332
|
+
selected="styleId === props.tableConfig.styleId"
|
|
333
|
+
tableConfig="props.tableConfig"
|
|
334
|
+
tableStyle="props.tableStyles[styleId]"
|
|
332
335
|
styleId="styleId"
|
|
333
336
|
onClick="() => this.onStylePicked(styleId)"
|
|
337
|
+
type="props.type"
|
|
334
338
|
/>
|
|
335
339
|
</t>
|
|
336
340
|
</div>
|
|
@@ -341,11 +345,13 @@
|
|
|
341
345
|
</div>
|
|
342
346
|
</div>
|
|
343
347
|
<TableStylesPopover
|
|
344
|
-
tableConfig="props.
|
|
345
|
-
selectedStyleId="props.
|
|
348
|
+
tableConfig="props.tableConfig"
|
|
349
|
+
selectedStyleId="props.tableConfig.styleId"
|
|
346
350
|
onStylePicked.bind="onStylePicked"
|
|
347
351
|
popoverProps="state.popoverProps"
|
|
348
352
|
closePopover.bind="closePopover"
|
|
353
|
+
tableStyles="props.tableStyles"
|
|
354
|
+
type="props.type"
|
|
349
355
|
/>
|
|
350
356
|
</t>
|
|
351
357
|
|
|
@@ -371,6 +377,8 @@
|
|
|
371
377
|
onStylePicked.bind="onStylePicked"
|
|
372
378
|
popoverProps="state.popoverProps"
|
|
373
379
|
closePopover.bind="closePopover"
|
|
380
|
+
tableStyles="tableStyles"
|
|
381
|
+
type="'table'"
|
|
374
382
|
/>
|
|
375
383
|
</t>
|
|
376
384
|
|
|
@@ -499,11 +507,11 @@
|
|
|
499
507
|
<div class="d-flex flex-wrap">
|
|
500
508
|
<t t-foreach="tableTemplates" t-as="templateName" t-key="templateName">
|
|
501
509
|
<TableStylePreview
|
|
502
|
-
class="'o-table-style-edit-template-preview'"
|
|
503
510
|
selected="templateName === state.selectedTemplateName"
|
|
504
511
|
tableConfig="previewTableConfig"
|
|
505
512
|
tableStyle="computeTableStyle(templateName)"
|
|
506
513
|
onClick="() => this.onTemplatePicked(templateName)"
|
|
514
|
+
type="'table'"
|
|
507
515
|
/>
|
|
508
516
|
</t>
|
|
509
517
|
</div>
|
|
@@ -587,7 +595,12 @@
|
|
|
587
595
|
</div>
|
|
588
596
|
</Section>
|
|
589
597
|
<Section>
|
|
590
|
-
<TableStylePicker
|
|
598
|
+
<TableStylePicker
|
|
599
|
+
tableConfig="props.table.config"
|
|
600
|
+
onStylePicked.bind="onStylePicked"
|
|
601
|
+
tableStyles="env.model.getters.getTableStyles()"
|
|
602
|
+
type="'table'"
|
|
603
|
+
/>
|
|
591
604
|
</Section>
|
|
592
605
|
<Section title.translate="Data range">
|
|
593
606
|
<SelectionInput
|
|
@@ -898,7 +911,7 @@
|
|
|
898
911
|
</t>
|
|
899
912
|
|
|
900
913
|
<t t-name="o-spreadsheet-PivotSidePanel">
|
|
901
|
-
<div class="d-flex flex-column h-100">
|
|
914
|
+
<div class="o-pivot-panel d-flex flex-column h-100">
|
|
902
915
|
<div class="o-panel d-flex">
|
|
903
916
|
<div
|
|
904
917
|
class="o-sidePanel-tab o-panel-configuration d-flew flex-grow-1 text-center"
|
|
@@ -918,7 +931,11 @@
|
|
|
918
931
|
|
|
919
932
|
<div class="o-panel-content overflow-y-auto h-100" t-ref="panelContent">
|
|
920
933
|
<div class="h-100" t-att-class="{ 'd-none': state.panel !== 'configuration' }">
|
|
921
|
-
<t
|
|
934
|
+
<t
|
|
935
|
+
t-component="sidePanelEditor"
|
|
936
|
+
pivotId="props.pivotId"
|
|
937
|
+
onCloseSidePanel="props.onCloseSidePanel"
|
|
938
|
+
/>
|
|
922
939
|
</div>
|
|
923
940
|
<div t-att-class="state.panel !== 'design' ? 'd-none' : ''">
|
|
924
941
|
<PivotDesignPanel pivotId="props.pivotId"/>
|
|
@@ -1035,6 +1052,47 @@
|
|
|
1035
1052
|
</div>
|
|
1036
1053
|
</div>
|
|
1037
1054
|
</Section>
|
|
1055
|
+
|
|
1056
|
+
<Section class="'o-pivot-table-style'" title.translate="Pivot table style">
|
|
1057
|
+
<div class="row mb-2 align-items-center pt-2">
|
|
1058
|
+
<div class="col-6">Banded rows:</div>
|
|
1059
|
+
<div class="col-6 d-flex align-items-center">
|
|
1060
|
+
<Checkbox
|
|
1061
|
+
name="'bandedRows'"
|
|
1062
|
+
value="pivotStyle.bandedRows ?? defaultStyle.bandedRows"
|
|
1063
|
+
onChange="(val) => this.updatePivotStyleProperty('bandedRows', val)"
|
|
1064
|
+
/>
|
|
1065
|
+
</div>
|
|
1066
|
+
</div>
|
|
1067
|
+
<div class="row mb-2 align-items-center">
|
|
1068
|
+
<div class="col-6">Banded columns</div>
|
|
1069
|
+
<div class="col-6 d-flex align-items-center">
|
|
1070
|
+
<Checkbox
|
|
1071
|
+
name="'bandedColumns'"
|
|
1072
|
+
value="pivotStyle.bandedColumns ?? defaultStyle.bandedColumns"
|
|
1073
|
+
onChange="(val) => this.updatePivotStyleProperty('bandedColumns', val)"
|
|
1074
|
+
/>
|
|
1075
|
+
</div>
|
|
1076
|
+
</div>
|
|
1077
|
+
<div class="row mb-2 align-items-center">
|
|
1078
|
+
<div class="col-6">Filter button</div>
|
|
1079
|
+
<div class="col-6 d-flex align-items-center">
|
|
1080
|
+
<Checkbox
|
|
1081
|
+
name="'hasFilters'"
|
|
1082
|
+
value="pivotStyle.hasFilters ?? defaultStyle.hasFilters"
|
|
1083
|
+
onChange="(val) => this.updatePivotStyleProperty('hasFilters', val)"
|
|
1084
|
+
/>
|
|
1085
|
+
</div>
|
|
1086
|
+
</div>
|
|
1087
|
+
<div class="mt-4">
|
|
1088
|
+
<TableStylePicker
|
|
1089
|
+
tableConfig="tableConfig"
|
|
1090
|
+
onStylePicked.bind="onStylePicked"
|
|
1091
|
+
tableStyles="tableStyles"
|
|
1092
|
+
type="'pivot'"
|
|
1093
|
+
/>
|
|
1094
|
+
</div>
|
|
1095
|
+
</Section>
|
|
1038
1096
|
</t>
|
|
1039
1097
|
|
|
1040
1098
|
<t t-name="o-spreadsheet-PivotMeasureDisplayPanel">
|
|
@@ -1583,7 +1641,8 @@
|
|
|
1583
1641
|
</select>
|
|
1584
1642
|
<div t-if="searchOptions.searchScope === 'specificRange'">
|
|
1585
1643
|
<SelectionInput
|
|
1586
|
-
|
|
1644
|
+
t-key="selectionInputKey"
|
|
1645
|
+
ranges="[specificRange]"
|
|
1587
1646
|
onSelectionChanged="(ranges) => this.onSearchRangeChanged(ranges)"
|
|
1588
1647
|
onSelectionConfirmed.bind="updateDataRange"
|
|
1589
1648
|
hasSingleRange="true"
|
|
@@ -1647,38 +1706,29 @@
|
|
|
1647
1706
|
</t>
|
|
1648
1707
|
|
|
1649
1708
|
<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"/>
|
|
1709
|
+
<div class="o-dv">
|
|
1710
|
+
<t t-foreach="validationRules" t-as="rule" t-key="rule.id">
|
|
1711
|
+
<DataValidationPreview rule="localizeDVRule(rule)"/>
|
|
1666
1712
|
</t>
|
|
1713
|
+
<div class="o-dv-add o-button-link p-4 float-end" t-on-click="addDataValidationRule">
|
|
1714
|
+
+ Add another rule
|
|
1715
|
+
</div>
|
|
1667
1716
|
</div>
|
|
1668
1717
|
</t>
|
|
1669
1718
|
|
|
1670
1719
|
<t t-name="o-spreadsheet-DataValidationPreview">
|
|
1671
|
-
<div
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
<div
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1720
|
+
<div
|
|
1721
|
+
class="o-dv-preview d-flex justify-content-between p-3 border-bottom"
|
|
1722
|
+
t-on-click="onPreviewClick"
|
|
1723
|
+
t-ref="dvPreview">
|
|
1724
|
+
<div>
|
|
1725
|
+
<div class="o-dv-preview-description o-fw-bold text-truncate" t-esc="descriptionString"/>
|
|
1726
|
+
<div class="o-dv-preview-ranges text-truncate" t-esc="rangesString"/>
|
|
1727
|
+
</div>
|
|
1728
|
+
<div
|
|
1729
|
+
class="o-dv-delete-button d-flex align-items-center o-button-icon px-3"
|
|
1730
|
+
t-on-click.stop="deleteDataValidation">
|
|
1731
|
+
<t t-call="o-spreadsheet-Icon.TRASH_FILLED"/>
|
|
1682
1732
|
</div>
|
|
1683
1733
|
</div>
|
|
1684
1734
|
</t>
|
|
@@ -1721,7 +1771,7 @@
|
|
|
1721
1771
|
|
|
1722
1772
|
<Section>
|
|
1723
1773
|
<div class="o-sidePanelButtons">
|
|
1724
|
-
<button t-on-click="
|
|
1774
|
+
<button t-on-click="onCancel" class="o-dv-cancel o-button">Cancel</button>
|
|
1725
1775
|
<button t-on-click="onSave" class="o-dv-save o-button primary">Save</button>
|
|
1726
1776
|
</div>
|
|
1727
1777
|
</Section>
|
|
@@ -1801,6 +1851,26 @@
|
|
|
1801
1851
|
</select>
|
|
1802
1852
|
</t>
|
|
1803
1853
|
|
|
1854
|
+
<t t-name="o-spreadsheet-Top10CriterionForm">
|
|
1855
|
+
<div class="o-top-10-criterion d-flex flex-row align-items-center gap-2 w-100 mt-2">
|
|
1856
|
+
<select class="o-top-10-select-values o-input flex-shrink-0" t-on-change="updateIsBottom">
|
|
1857
|
+
<option value="top" t-att-selected="!props.criterion.isBottom">Top</option>
|
|
1858
|
+
<option value="bottom" t-att-selected="props.criterion.isBottom">Bottom</option>
|
|
1859
|
+
</select>
|
|
1860
|
+
<CriterionInput
|
|
1861
|
+
value="props.criterion.values[0]"
|
|
1862
|
+
onValueChanged.bind="onValueChanged"
|
|
1863
|
+
criterionType="props.criterion.type"
|
|
1864
|
+
disableFormulas="true"
|
|
1865
|
+
focused="props.autofocus"
|
|
1866
|
+
/>
|
|
1867
|
+
<select class="o-top-10-select-mode o-input flex-shrink-0" t-on-change="updateIsPercent">
|
|
1868
|
+
<option value="values" t-att-selected="!props.criterion.isPercent">Values</option>
|
|
1869
|
+
<option value="percent" t-att-selected="props.criterion.isPercent">Percent</option>
|
|
1870
|
+
</select>
|
|
1871
|
+
</div>
|
|
1872
|
+
</t>
|
|
1873
|
+
|
|
1804
1874
|
<t t-name="o-spreadsheet-SingleInputCriterionForm">
|
|
1805
1875
|
<CriterionInput
|
|
1806
1876
|
value="props.criterion.values[0]"
|
|
@@ -1879,29 +1949,9 @@
|
|
|
1879
1949
|
</div>
|
|
1880
1950
|
</t>
|
|
1881
1951
|
|
|
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
1952
|
<t t-name="o-spreadsheet-ConditionalFormatPreviewList">
|
|
1903
1953
|
<div class="o-cf-preview-list h-100 overflow-auto" t-ref="cfList">
|
|
1904
|
-
<t t-foreach="
|
|
1954
|
+
<t t-foreach="conditionalFormats" t-as="cf" t-key="cf.id">
|
|
1905
1955
|
<div
|
|
1906
1956
|
class="o-cf-preview-container d-flex position-relative"
|
|
1907
1957
|
t-att-style="getPreviewDivStyle(cf)">
|
|
@@ -1909,13 +1959,12 @@
|
|
|
1909
1959
|
conditionalFormat="cf"
|
|
1910
1960
|
class="dragAndDrop.draggedItemId === cf.id ? 'o-cf-dragging' : ''"
|
|
1911
1961
|
onMouseDown="(ev) => this.onPreviewMouseDown(cf, ev)"
|
|
1912
|
-
onPreviewClick="() => props.onPreviewClick(cf)"
|
|
1913
1962
|
/>
|
|
1914
1963
|
</div>
|
|
1915
1964
|
</t>
|
|
1916
1965
|
<div
|
|
1917
1966
|
class="o-button-link p-4 o-cf-add float-end"
|
|
1918
|
-
t-on-click.prevent.stop="
|
|
1967
|
+
t-on-click.prevent.stop="onAddConditionalFormat">
|
|
1919
1968
|
+ Add another rule
|
|
1920
1969
|
</div>
|
|
1921
1970
|
</div>
|
|
@@ -1928,8 +1977,8 @@
|
|
|
1928
1977
|
t-ref="cfPreview"
|
|
1929
1978
|
t-att-class="props.class"
|
|
1930
1979
|
t-att-data-id="cf.id"
|
|
1931
|
-
t-on-click="
|
|
1932
|
-
t-on-pointerdown="(ev) =>
|
|
1980
|
+
t-on-click="editConditionalFormat"
|
|
1981
|
+
t-on-pointerdown="(ev) => props.onMouseDown(ev)">
|
|
1933
1982
|
<div class="o-cf-drag-handle h-100 position-absolute d-flex align-items-center o-button-icon">
|
|
1934
1983
|
<t t-call="o-spreadsheet-Icon.THIN_DRAG_HANDLE"/>
|
|
1935
1984
|
</div>
|
|
@@ -1943,7 +1992,7 @@
|
|
|
1943
1992
|
</t>
|
|
1944
1993
|
<t t-else="">
|
|
1945
1994
|
<div
|
|
1946
|
-
t-att-style="
|
|
1995
|
+
t-att-style="previewImageStyle"
|
|
1947
1996
|
class="o-cf-preview-icon d-flex justify-content-around align-items-center me-3 flex-shrink-0 border">
|
|
1948
1997
|
123
|
|
1949
1998
|
</div>
|
|
@@ -1951,7 +2000,7 @@
|
|
|
1951
2000
|
<div class="o-cf-preview-description me-3 overflow-auto">
|
|
1952
2001
|
<div class="o-cf-preview-ruletype">
|
|
1953
2002
|
<div class="o-cf-preview-description-rule o-fw-bold text-truncate">
|
|
1954
|
-
<t t-esc="
|
|
2003
|
+
<t t-esc="description"/>
|
|
1955
2004
|
</div>
|
|
1956
2005
|
</div>
|
|
1957
2006
|
<div class="o-cf-preview-range text-truncate" t-esc="cf.ranges"/>
|
|
@@ -1959,7 +2008,7 @@
|
|
|
1959
2008
|
<div class="o-cf-delete ms-auto">
|
|
1960
2009
|
<div
|
|
1961
2010
|
class="o-cf-delete-button o-button-icon"
|
|
1962
|
-
t-on-click.stop="
|
|
2011
|
+
t-on-click.stop="deleteConditionalFormat"
|
|
1963
2012
|
title="Remove rule">
|
|
1964
2013
|
<t t-call="o-spreadsheet-Icon.TRASH_FILLED"/>
|
|
1965
2014
|
</div>
|
|
@@ -1976,7 +2025,7 @@
|
|
|
1976
2025
|
t-foreach="['arrows', 'smiley', 'dots']"
|
|
1977
2026
|
t-as="iconSet"
|
|
1978
2027
|
t-key="iconSet"
|
|
1979
|
-
t-on-click="(
|
|
2028
|
+
t-on-click="() => store.setIconSet(iconSet)">
|
|
1980
2029
|
<div>
|
|
1981
2030
|
<t t-call="o-spreadsheet-Icon.{{icons[iconSets[iconSet].good].template}}"/>
|
|
1982
2031
|
</div>
|
|
@@ -1994,14 +2043,14 @@
|
|
|
1994
2043
|
<t t-name="o-spreadsheet-IconSetInflexionPointRow">
|
|
1995
2044
|
<tr>
|
|
1996
2045
|
<td>
|
|
1997
|
-
<div t-on-click.stop="(
|
|
2046
|
+
<div t-on-click.stop="() => store.toggleMenu('iconSet-'+icon+'Icon')">
|
|
1998
2047
|
<div class="o-cf-icon-button o-cf-clickable-icon me-3 border rounded">
|
|
1999
2048
|
<t t-call="o-spreadsheet-Icon.{{icons[iconValue].template}}"/>
|
|
2000
2049
|
</div>
|
|
2001
2050
|
</div>
|
|
2002
2051
|
<IconPicker
|
|
2003
|
-
t-if="state.openedMenu === 'iconSet-'+icon+'Icon'"
|
|
2004
|
-
onIconPicked="(i) =>
|
|
2052
|
+
t-if="store.state.openedMenu === 'iconSet-'+icon+'Icon'"
|
|
2053
|
+
onIconPicked="(i) => store.setIcon(icon, i)"
|
|
2005
2054
|
/>
|
|
2006
2055
|
</td>
|
|
2007
2056
|
<td>When value is</td>
|
|
@@ -2009,7 +2058,7 @@
|
|
|
2009
2058
|
<select
|
|
2010
2059
|
class="o-input"
|
|
2011
2060
|
name="valueType"
|
|
2012
|
-
t-on-change="(ev) =>
|
|
2061
|
+
t-on-change="(ev) => store.setInflectionOperator(inflectionPoint, ev.target.value)">
|
|
2013
2062
|
<option value="gt" t-att-selected="inflectionPointValue.operator === 'gt'">
|
|
2014
2063
|
<span>></span>
|
|
2015
2064
|
</option>
|
|
@@ -2026,7 +2075,7 @@
|
|
|
2026
2075
|
class="o-input"
|
|
2027
2076
|
t-att-class="{ 'o-invalid': isInflectionPointInvalid(inflectionPoint) }"
|
|
2028
2077
|
t-att-value="rule[inflectionPoint].value"
|
|
2029
|
-
t-on-change="(ev) =>
|
|
2078
|
+
t-on-change="(ev) => store.setInflectionValue(inflectionPoint, ev.target.value)"
|
|
2030
2079
|
/>
|
|
2031
2080
|
<StandaloneComposer t-else="" t-props="getColorIconSetComposerProps(inflectionPoint)"/>
|
|
2032
2081
|
</div>
|
|
@@ -2035,7 +2084,7 @@
|
|
|
2035
2084
|
<select
|
|
2036
2085
|
class="o-input"
|
|
2037
2086
|
name="valueType"
|
|
2038
|
-
t-on-change="(ev) =>
|
|
2087
|
+
t-on-change="(ev) => store.setInflectionType(inflectionPoint, ev.target.value)">
|
|
2039
2088
|
<option value="number" t-att-selected="inflectionPointValue.type === 'number'">
|
|
2040
2089
|
Number
|
|
2041
2090
|
</option>
|
|
@@ -2077,14 +2126,14 @@
|
|
|
2077
2126
|
</t>
|
|
2078
2127
|
<tr>
|
|
2079
2128
|
<td>
|
|
2080
|
-
<div t-on-click.stop="(
|
|
2129
|
+
<div t-on-click.stop="() => store.toggleMenu('iconSet-lowerIcon')">
|
|
2081
2130
|
<div class="o-cf-icon-button o-cf-clickable-icon me-3 border rounded">
|
|
2082
2131
|
<t t-call="o-spreadsheet-Icon.{{icons[rule.icons.lower].template}}"/>
|
|
2083
2132
|
</div>
|
|
2084
2133
|
</div>
|
|
2085
2134
|
<IconPicker
|
|
2086
|
-
t-if="state.openedMenu === 'iconSet-lowerIcon'"
|
|
2087
|
-
onIconPicked="(icon) =>
|
|
2135
|
+
t-if="store.state.openedMenu === 'iconSet-lowerIcon'"
|
|
2136
|
+
onIconPicked="(icon) => store.setIcon('lower', icon)"
|
|
2088
2137
|
/>
|
|
2089
2138
|
</td>
|
|
2090
2139
|
<td>Else</td>
|
|
@@ -2097,12 +2146,14 @@
|
|
|
2097
2146
|
</t>
|
|
2098
2147
|
<t t-name="o-spreadsheet-IconSetEditor">
|
|
2099
2148
|
<div class="o-cf-iconset-rule">
|
|
2149
|
+
<t t-set="icons" t-value="store.icons"/>
|
|
2150
|
+
<t t-set="iconSets" t-value="store.iconSets"/>
|
|
2100
2151
|
<t t-call="o-spreadsheet-IconSets"/>
|
|
2101
2152
|
<t t-call="o-spreadsheet-IconSetInflexionPoints"/>
|
|
2102
2153
|
<div class="d-flex flex-row">
|
|
2103
2154
|
<div
|
|
2104
2155
|
class="o-button-link py-1 ps-0 o-cf-iconset-reverse d-flex align-items-center"
|
|
2105
|
-
t-on-click="reverseIcons">
|
|
2156
|
+
t-on-click="() => store.reverseIcons()">
|
|
2106
2157
|
<t t-call="o-spreadsheet-Icon.REFRESH"/>
|
|
2107
2158
|
<div class="ms-1">Reverse icons</div>
|
|
2108
2159
|
</div>
|
|
@@ -2115,17 +2166,17 @@
|
|
|
2115
2166
|
<div class="o-section-subtitle">Color</div>
|
|
2116
2167
|
<RoundColorPicker
|
|
2117
2168
|
currentColor="colorNumberToHex(rule.color)"
|
|
2118
|
-
onColorPicked
|
|
2169
|
+
onColorPicked="(color) => store.updateDataBarColor(color)"
|
|
2119
2170
|
disableNoColor="true"
|
|
2120
2171
|
/>
|
|
2121
2172
|
<div class="o-section-subtitle">Range of values</div>
|
|
2122
2173
|
<SelectionInput
|
|
2123
|
-
ranges="
|
|
2174
|
+
ranges="store.rangeValues"
|
|
2124
2175
|
class="'o-range'"
|
|
2125
2176
|
isInvalid="false"
|
|
2126
2177
|
hasSingleRange="true"
|
|
2127
|
-
onSelectionChanged
|
|
2128
|
-
onSelectionConfirmed
|
|
2178
|
+
onSelectionChanged="(ranges) => store.onDataBarRangeUpdate(ranges)"
|
|
2179
|
+
onSelectionConfirmed="() => store.onDataBarRangeChange()"
|
|
2129
2180
|
required="false"
|
|
2130
2181
|
/>
|
|
2131
2182
|
</div>
|
|
@@ -2140,9 +2191,9 @@
|
|
|
2140
2191
|
<select
|
|
2141
2192
|
class="o-input me-2"
|
|
2142
2193
|
name="valueType"
|
|
2143
|
-
t-on-change="onMidpointChange"
|
|
2194
|
+
t-on-change="(ev) => store.onMidpointChange(ev.target.value)"
|
|
2144
2195
|
t-att-class="{ 'o-select-with-input': threshold and threshold.type !== 'value' }"
|
|
2145
|
-
t-on-click="closeMenus">
|
|
2196
|
+
t-on-click="() => store.closeMenus()">
|
|
2146
2197
|
<option value="none" t-att-selected="threshold === undefined">None</option>
|
|
2147
2198
|
<option value="number" t-att-selected="type === 'number'">Fixed Number</option>
|
|
2148
2199
|
<option value="percentage" t-att-selected="type === 'percentage'">Percentage</option>
|
|
@@ -2154,8 +2205,8 @@
|
|
|
2154
2205
|
<select
|
|
2155
2206
|
class="o-input me-2"
|
|
2156
2207
|
name="valueType"
|
|
2157
|
-
t-on-change="(ev) =>
|
|
2158
|
-
t-on-click="closeMenus"
|
|
2208
|
+
t-on-change="(ev) => store.updateThresholdType(thresholdType, ev.target.value)"
|
|
2209
|
+
t-on-click="() => store.closeMenus()"
|
|
2159
2210
|
t-att-class="{ 'o-select-with-input': threshold?.type !== 'value' }">
|
|
2160
2211
|
<option value="value" t-att-selected="threshold.type === 'value'">Cell values</option>
|
|
2161
2212
|
<option value="number" t-att-selected="threshold.type === 'number'">Number</option>
|
|
@@ -2174,7 +2225,7 @@
|
|
|
2174
2225
|
type="text"
|
|
2175
2226
|
class="o-input"
|
|
2176
2227
|
t-att-value="threshold.value"
|
|
2177
|
-
t-on-change="(ev) =>
|
|
2228
|
+
t-on-change="(ev) => store.updateThresholdValue(thresholdType, ev.target.value)"
|
|
2178
2229
|
t-att-class="{ 'o-invalid': isValueInvalid(thresholdType), 'invisible': threshold === undefined }"
|
|
2179
2230
|
/>
|
|
2180
2231
|
<StandaloneComposer t-else="" t-props="getColorScaleComposerProps(thresholdType)"/>
|
|
@@ -2182,7 +2233,7 @@
|
|
|
2182
2233
|
<div t-attf-class="flex-shrink-0 ms-1 {{ threshold === undefined ? 'invisible' : ''}}">
|
|
2183
2234
|
<RoundColorPicker
|
|
2184
2235
|
currentColor="getThresholdColor(threshold)"
|
|
2185
|
-
onColorPicked="(color) =>
|
|
2236
|
+
onColorPicked="(color) => store.setColorScaleColor(thresholdType, color)"
|
|
2186
2237
|
title="fill_color"
|
|
2187
2238
|
disableNoColor="true"
|
|
2188
2239
|
/>
|
|
@@ -2193,7 +2244,7 @@
|
|
|
2193
2244
|
<t t-name="o-spreadsheet-ColorScaleRuleEditor">
|
|
2194
2245
|
<div class="o-cf-color-scale-editor">
|
|
2195
2246
|
<div class="o-section-subtitle">Preview</div>
|
|
2196
|
-
<div class="o-cf-preview-display mb-4" t-attf-style="{{
|
|
2247
|
+
<div class="o-cf-preview-display mb-4" t-attf-style="{{store.previewGradient}}">
|
|
2197
2248
|
Preview text
|
|
2198
2249
|
</div>
|
|
2199
2250
|
<div class="o-section-subtitle">Minpoint</div>
|
|
@@ -2215,15 +2266,16 @@
|
|
|
2215
2266
|
</t>
|
|
2216
2267
|
|
|
2217
2268
|
<t t-name="o-spreadsheet-ConditionalFormattingEditor">
|
|
2218
|
-
<div class="o-cf-
|
|
2269
|
+
<div class="o-cf-editor">
|
|
2270
|
+
<t t-set="state" t-value="store.state"/>
|
|
2219
2271
|
<Section class="'o-cf-range pb-0'" title.translate="Apply to range">
|
|
2220
2272
|
<div class="o-selection-cf">
|
|
2221
2273
|
<SelectionInput
|
|
2222
2274
|
ranges="state.ranges"
|
|
2223
2275
|
class="'o-range'"
|
|
2224
|
-
isInvalid="isRangeValid"
|
|
2225
|
-
onSelectionChanged
|
|
2226
|
-
onSelectionConfirmed
|
|
2276
|
+
isInvalid="store.isRangeValid"
|
|
2277
|
+
onSelectionChanged="(ranges) => store.onRangeUpdate(ranges)"
|
|
2278
|
+
onSelectionConfirmed="() => store.onRangeConfirmed()"
|
|
2227
2279
|
required="true"
|
|
2228
2280
|
/>
|
|
2229
2281
|
</div>
|
|
@@ -2232,12 +2284,12 @@
|
|
|
2232
2284
|
<div class="o-cf-type-selector">
|
|
2233
2285
|
<BadgeSelection
|
|
2234
2286
|
choices="cfTypesValues"
|
|
2235
|
-
onChange
|
|
2287
|
+
onChange="(ruleType) => store.changeRuleType(ruleType)"
|
|
2236
2288
|
selectedValue="state.currentCFType"
|
|
2237
2289
|
/>
|
|
2238
2290
|
</div>
|
|
2239
2291
|
</Section>
|
|
2240
|
-
<Section
|
|
2292
|
+
<Section>
|
|
2241
2293
|
<t t-if="state.currentCFType === 'CellIsRule'" t-call="o-spreadsheet-CellIsRuleEditor">
|
|
2242
2294
|
<t t-set="rule" t-value="state.rules.cellIs"/>
|
|
2243
2295
|
</t>
|
|
@@ -2265,7 +2317,7 @@
|
|
|
2265
2317
|
</div>
|
|
2266
2318
|
</Section>
|
|
2267
2319
|
<Section>
|
|
2268
|
-
<ValidationMessages messages="errorMessages" msgType="'error'"/>
|
|
2320
|
+
<ValidationMessages messages="store.errorMessages" msgType="'error'"/>
|
|
2269
2321
|
</Section>
|
|
2270
2322
|
</div>
|
|
2271
2323
|
</t>
|
|
@@ -2286,21 +2338,22 @@
|
|
|
2286
2338
|
<t t-name="o-spreadsheet-CellIsRuleEditor">
|
|
2287
2339
|
<t t-set="fill_color">Fill Color</t>
|
|
2288
2340
|
<t t-set="text_color">Text Color</t>
|
|
2341
|
+
<t t-set="state" t-value="store.state"/>
|
|
2289
2342
|
<div class="o-cf-cell-is-rule">
|
|
2290
2343
|
<div class="o-section-subtitle">Format cells if...</div>
|
|
2291
2344
|
<SelectMenu
|
|
2292
2345
|
class="'o-cell-is-operator o-input mb-2'"
|
|
2293
|
-
menuItems="cfCriterionMenuItems"
|
|
2294
|
-
selectedValue="selectedCriterionName"
|
|
2346
|
+
menuItems="store.cfCriterionMenuItems"
|
|
2347
|
+
selectedValue="store.selectedCriterionName"
|
|
2295
2348
|
/>
|
|
2296
2349
|
|
|
2297
2350
|
<t
|
|
2298
|
-
t-if="criterionComponent"
|
|
2299
|
-
t-component="criterionComponent"
|
|
2351
|
+
t-if="store.criterionComponent"
|
|
2352
|
+
t-component="store.criterionComponent"
|
|
2300
2353
|
t-key="state.rules.cellIs.operator"
|
|
2301
|
-
criterion="genericCriterion"
|
|
2302
|
-
onCriterionChanged
|
|
2303
|
-
autofocus="
|
|
2354
|
+
criterion="store.genericCriterion"
|
|
2355
|
+
onCriterionChanged="(rule) => store.onRuleValuesChanged(rule)"
|
|
2356
|
+
autofocus="store.state.hasEditedCf"
|
|
2304
2357
|
/>
|
|
2305
2358
|
|
|
2306
2359
|
<div class="o-section-subtitle pt-3">Formatting style</div>
|
|
@@ -2313,35 +2366,35 @@
|
|
|
2313
2366
|
class="o-hoverable-button o-menu-item-button"
|
|
2314
2367
|
title="Bold"
|
|
2315
2368
|
t-att-class="{active:rule.style.bold}"
|
|
2316
|
-
t-on-click="() =>
|
|
2369
|
+
t-on-click="() => store.toggleStyle('bold')">
|
|
2317
2370
|
<t t-call="o-spreadsheet-Icon.BOLD"/>
|
|
2318
2371
|
</div>
|
|
2319
2372
|
<div
|
|
2320
2373
|
class="o-hoverable-button o-menu-item-button"
|
|
2321
2374
|
title="Italic"
|
|
2322
2375
|
t-att-class="{active:rule.style.italic}"
|
|
2323
|
-
t-on-click="() =>
|
|
2376
|
+
t-on-click="() => store.toggleStyle('italic')">
|
|
2324
2377
|
<t t-call="o-spreadsheet-Icon.ITALIC"/>
|
|
2325
2378
|
</div>
|
|
2326
2379
|
<div
|
|
2327
2380
|
class="o-hoverable-button o-menu-item-button"
|
|
2328
2381
|
title="Underline"
|
|
2329
2382
|
t-att-class="{active:rule.style.underline}"
|
|
2330
|
-
t-on-click="(ev) =>
|
|
2383
|
+
t-on-click="(ev) => store.toggleStyle('underline', ev)">
|
|
2331
2384
|
<t t-call="o-spreadsheet-Icon.UNDERLINE"/>
|
|
2332
2385
|
</div>
|
|
2333
2386
|
<div
|
|
2334
2387
|
class="o-hoverable-button o-menu-item-button"
|
|
2335
2388
|
title="Strikethrough"
|
|
2336
2389
|
t-att-class="{active:rule.style.strikethrough}"
|
|
2337
|
-
t-on-click="(ev) =>
|
|
2390
|
+
t-on-click="(ev) => store.toggleStyle('strikethrough', ev)">
|
|
2338
2391
|
<t t-call="o-spreadsheet-Icon.STRIKE"/>
|
|
2339
2392
|
</div>
|
|
2340
2393
|
<ColorPickerWidget
|
|
2341
2394
|
currentColor="rule.style.textColor || '#000000'"
|
|
2342
|
-
toggleColorPicker="(
|
|
2395
|
+
toggleColorPicker="() => store.toggleMenu('cellIsRule-textColor')"
|
|
2343
2396
|
showColorPicker="state.openedMenu === 'cellIsRule-textColor'"
|
|
2344
|
-
onColorPicked="(color) =>
|
|
2397
|
+
onColorPicked="(color) => store.setColor('textColor', color)"
|
|
2345
2398
|
title="text_color"
|
|
2346
2399
|
icon="'o-spreadsheet-Icon.TEXT_COLOR'"
|
|
2347
2400
|
class="'o-hoverable-button o-menu-item-button'"
|
|
@@ -2349,9 +2402,9 @@
|
|
|
2349
2402
|
<div class="o-divider border-end"/>
|
|
2350
2403
|
<ColorPickerWidget
|
|
2351
2404
|
currentColor="rule.style.fillColor"
|
|
2352
|
-
toggleColorPicker="(
|
|
2405
|
+
toggleColorPicker="() => store.toggleMenu('cellIsRule-fillColor')"
|
|
2353
2406
|
showColorPicker="state.openedMenu === 'cellIsRule-fillColor'"
|
|
2354
|
-
onColorPicked="(color) =>
|
|
2407
|
+
onColorPicked="(color) => store.setColor('fillColor', color)"
|
|
2355
2408
|
title="fill_color"
|
|
2356
2409
|
icon="'o-spreadsheet-Icon.FILL_COLOR'"
|
|
2357
2410
|
class="'o-hoverable-button o-menu-item-button'"
|
|
@@ -6525,7 +6578,6 @@
|
|
|
6525
6578
|
onGridResized.bind="onGridResized"
|
|
6526
6579
|
onGridMoved.bind="moveCanvas"
|
|
6527
6580
|
gridOverlayDimensions="gridOverlayDimensions"
|
|
6528
|
-
getGridSize="props.getGridSize"
|
|
6529
6581
|
/>
|
|
6530
6582
|
<HeadersOverlay onOpenContextMenu="(type, x, y) => this.toggleContextMenu(type, x, y)"/>
|
|
6531
6583
|
<GridComposer
|
|
@@ -6840,6 +6892,7 @@
|
|
|
6840
6892
|
<div
|
|
6841
6893
|
class="o-carousel-tab text-truncate px-2 mt-1 flex-shrink-0"
|
|
6842
6894
|
t-att-class="{ 'selected': isItemSelected(item) }"
|
|
6895
|
+
t-att-data-type="item.type"
|
|
6843
6896
|
t-esc="getItemTitle(item)"
|
|
6844
6897
|
t-on-click.stop="() => this.onCarouselTabClick(item)"
|
|
6845
6898
|
/>
|
|
@@ -7108,8 +7161,7 @@
|
|
|
7108
7161
|
<GridOverlay
|
|
7109
7162
|
onGridResized.bind="onGridResized"
|
|
7110
7163
|
onGridMoved.bind="moveCanvas"
|
|
7111
|
-
gridOverlayDimensions="gridOverlayDimensions"
|
|
7112
|
-
getGridSize="props.getGridSize">
|
|
7164
|
+
gridOverlayDimensions="gridOverlayDimensions">
|
|
7113
7165
|
<div
|
|
7114
7166
|
t-foreach="getClickableCells()"
|
|
7115
7167
|
t-as="clickableCell"
|