@odoo/o-spreadsheet 17.3.0-alpha.4 → 17.3.0-alpha.6

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 17.3.0-alpha.4
5
- @date 2024-04-15T11:03:33.066Z
6
- @hash a32a1df
4
+ @version 17.3.0-alpha.6
5
+ @date 2024-04-26T07:40:36.934Z
6
+ @hash f58a0d5
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ActionButton">
@@ -18,7 +18,7 @@
18
18
  <t t-call="{{iconTitle}}"/>
19
19
  </span>
20
20
  <t t-if="props.hasTriangleDownIcon">
21
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
21
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
22
22
  </t>
23
23
  </span>
24
24
  </t>
@@ -103,7 +103,7 @@
103
103
  dropdownMaxHeight="this.props.dropdownMaxHeight"
104
104
  class="'o-dropdown-button o-border-picker-button'"
105
105
  />
106
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
106
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
107
107
  </div>
108
108
  <div
109
109
  class="o-border-style-tool d-flex align-items-center justify-content-center o-hoverable-button"
@@ -111,7 +111,7 @@
111
111
  t-ref="lineStyleButton"
112
112
  t-on-click.stop="(ev) => this.toggleDropdownTool('borderTypeTool')">
113
113
  <t t-call="o-spreadsheet-Icon.BORDER_TYPE"/>
114
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
114
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
115
115
  <Popover
116
116
  t-props="lineStylePickerPopoverProps"
117
117
  t-if="state.activeTool === 'borderTypeTool'">
@@ -279,7 +279,7 @@
279
279
  t-att-contenteditable="state.isEditing ? 'true': 'false'"
280
280
  />
281
281
  <span class="o-sheet-icon ms-1" t-on-click.stop="(ev) => this.onIconClick(ev)">
282
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
282
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
283
283
  </span>
284
284
  </div>
285
285
  </Ripple>
@@ -289,11 +289,11 @@
289
289
  <t t-set="selectedStatistic" t-value="getSelectedStatistic()"/>
290
290
  <Ripple class="'ms-auto'" t-if="selectedStatistic !== undefined">
291
291
  <div
292
- class="o-selection-statistic text-truncate user-select-none me-4 bg-white rounded shadow"
292
+ class="o-selection-statistic text-truncate user-select-none me-4 bg-white rounded shadow d-flex align-items-center"
293
293
  t-on-click="listSelectionStatistics">
294
294
  <t t-esc="selectedStatistic"/>
295
295
  <span class="ms-2">
296
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
296
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
297
297
  </span>
298
298
  </div>
299
299
  </Ripple>
@@ -365,7 +365,7 @@
365
365
  <div class="o-hue-container" t-on-pointerdown="dragHuePointer">
366
366
  <div class="o-hue-picker" t-on-click.stop=""/>
367
367
  <div class="o-hue-slider pe-none" t-att-style="sliderStyle">
368
- <t t-call="o-spreadsheet-Icon.TRIANGLE_UP"/>
368
+ <t t-call="o-spreadsheet-Icon.CARET_UP"/>
369
369
  </div>
370
370
  </div>
371
371
  <div class="o-custom-input-preview">
@@ -606,7 +606,7 @@
606
606
  <div
607
607
  t-foreach="getClickableCells()"
608
608
  t-as="clickableCell"
609
- t-key="clickableCell.tKey"
609
+ t-key="clickableCell_index"
610
610
  class="o-dashboard-clickable-cell"
611
611
  t-on-click="() => this.selectClickableCell(clickableCell)"
612
612
  t-on-contextmenu.prevent=""
@@ -832,15 +832,17 @@
832
832
 
833
833
  <t t-name="o-spreadsheet-FilterMenu">
834
834
  <div class="o-filter-menu d-flex flex-column bg-white" t-on-wheel.stop="">
835
- <div t-if="!isReadonly">
836
- <div class="o-filter-menu-item" t-on-click="() => this.sortFilterZone('ascending')">
837
- Sort ascending (A ⟶ Z)
838
- </div>
839
- <div class="o-filter-menu-item" t-on-click="() => this.sortFilterZone('descending')">
840
- Sort descending (Z ⟶ A)
835
+ <t t-if="isSortable">
836
+ <div>
837
+ <div class="o-filter-menu-item" t-on-click="() => this.sortFilterZone('ascending')">
838
+ Sort ascending (A ⟶ Z)
839
+ </div>
840
+ <div class="o-filter-menu-item" t-on-click="() => this.sortFilterZone('descending')">
841
+ Sort descending (Z ⟶ A)
842
+ </div>
841
843
  </div>
842
- </div>
843
- <div class="o-separator" t-if="!isReadonly"/>
844
+ <div class="o-separator"/>
845
+ </t>
844
846
  <div class="o-filter-menu-actions">
845
847
  <div class="o-filter-menu-action-text" t-on-click="selectAll">Select all</div>
846
848
  <div class="o-filter-menu-action-text" t-on-click="clearAll">Clear</div>
@@ -929,7 +931,7 @@
929
931
  t-ref="inputFontSize"
930
932
  />
931
933
  <span>
932
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
934
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
933
935
  </span>
934
936
  </div>
935
937
  <div
@@ -1228,14 +1230,14 @@
1228
1230
  t-att-class="{'invisible': hiddenItem.includes(0)}"
1229
1231
  t-att-data-index="hiddenItem_index"
1230
1232
  t-on-click="() => this.unhide(hiddenItem)">
1231
- <t t-call="o-spreadsheet-Icon.TRIANGLE_UP"/>
1233
+ <t t-call="o-spreadsheet-Icon.CARET_UP"/>
1232
1234
  </div>
1233
1235
  <div
1234
1236
  class="o-unhide rounded"
1235
1237
  t-att-class="{'invisible': hiddenItem.includes(env.model.getters.getNumberRows(env.model.getters.getActiveSheetId())-1)}"
1236
1238
  t-att-data-index="hiddenItem_index"
1237
1239
  t-on-click="() => this.unhide(hiddenItem)">
1238
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
1240
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
1239
1241
  </div>
1240
1242
  </div>
1241
1243
  </t>
@@ -1284,14 +1286,14 @@
1284
1286
  t-att-class="{'invisible': hiddenItem.includes(0)}"
1285
1287
  t-att-data-index="hiddenItem_index"
1286
1288
  t-on-click="() => this.unhide(hiddenItem)">
1287
- <t t-call="o-spreadsheet-Icon.TRIANGLE_LEFT"/>
1289
+ <t t-call="o-spreadsheet-Icon.CARET_LEFT"/>
1288
1290
  </div>
1289
1291
  <div
1290
1292
  class="o-unhide rounded"
1291
1293
  t-att-class="{'invisible': hiddenItem.includes(env.model.getters.getNumberCols(env.model.getters.getActiveSheetId())-1)}"
1292
1294
  t-att-data-index="hiddenItem_index"
1293
1295
  t-on-click="() => this.unhide(hiddenItem)">
1294
- <t t-call="o-spreadsheet-Icon.TRIANGLE_RIGHT"/>
1296
+ <t t-call="o-spreadsheet-Icon.CARET_RIGHT"/>
1295
1297
  </div>
1296
1298
  </div>
1297
1299
  </t>
@@ -1440,12 +1442,9 @@
1440
1442
  </svg>
1441
1443
  </t>
1442
1444
  <t t-name="o-spreadsheet-Icon.COPY">
1443
- <svg class="o-icon">
1444
- <path
1445
- fill="currentColor"
1446
- d="M14.5 15.23v1.5H3a1 1 0 0 1-1-1V3.23h1.5v11a1 1 0 0 0 1 1h10m0-3.5a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1h6.5a1 1 0 0 1 1 1m-9-2.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1H15a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1"
1447
- />
1448
- </svg>
1445
+ <div class="o-icon">
1446
+ <i class="fa fa-clone"/>
1447
+ </div>
1449
1448
  </t>
1450
1449
  <t t-name="o-spreadsheet-Icon.CUT">
1451
1450
  <svg class="o-icon">
@@ -1463,22 +1462,6 @@
1463
1462
  />
1464
1463
  </svg>
1465
1464
  </t>
1466
- <t t-name="o-spreadsheet-Icon.FIND_AND_REPLACE">
1467
- <svg class="o-icon">
1468
- <path
1469
- fill="currentColor"
1470
- d="M10.75 11.25c-1 .75-2.25 1.25-3.5 1.25-3 0-5.5-2.5-5.5-5.5s2.5-5.5 5.5-5.5 5.5 2.5 5.5 5.5c0 1.25-.5 2.5-1.25 3.5l.25.25h.75l4 4-1.5 1.5-4-4v-.75l-.25-.25ZM7.25 11c2.25 0 4-1.75 4-4s-1.75-4-4-4-4 1.75-4 4 1.75 4 4 4"
1471
- />
1472
- </svg>
1473
- </t>
1474
- <t t-name="o-spreadsheet-Icon.DELETE">
1475
- <svg class="o-icon">
1476
- <path
1477
- fill="currentColor"
1478
- d="M12 1.75v-1H6v1H1.5v2h1v12a1.5 1.5 0 0 0 1.5 1.5h10a1.5 1.5 0 0 0 1.5-1.5v-12h1v-2M4 15.75v-12h10v12Zm2-10.5h2v9H6Zm4 0h2v9h-2"
1479
- />
1480
- </svg>
1481
- </t>
1482
1465
  <t t-name="o-spreadsheet-Icon.CLEAR">
1483
1466
  <svg class="o-icon">
1484
1467
  <path
@@ -1504,12 +1487,9 @@
1504
1487
  </svg>
1505
1488
  </t>
1506
1489
  <t t-name="o-spreadsheet-Icon.SHOW">
1507
- <svg class="o-icon" viewBox="0 0 24 24" fill="none" stroke="currentcolor">
1508
- <path stroke-width="1.35" d="M1,12 S11.5,0 23,12 M1,12 S11.5,24 23,12"/>
1509
- <path d="M1.26,11.7 A .4 .3 1 0 0 1.2,12.3"/>
1510
- <path d="M22.8,11.7 A .4 .3 1 0 1 22.75,12.3"/>
1511
- <circle stroke-width="1.35" stroke="currentcolor" cx="12" cy="12" r="3"/>
1512
- </svg>
1490
+ <div class="o-icon">
1491
+ <i class="fa fa-eye"/>
1492
+ </div>
1513
1493
  </t>
1514
1494
  <t t-name="o-spreadsheet-Icon.FORMULA">
1515
1495
  <svg class="o-icon">
@@ -1624,34 +1604,24 @@
1624
1604
  </svg>
1625
1605
  </t>
1626
1606
  <t t-name="o-spreadsheet-Icon.INSERT_CHART">
1627
- <svg class="o-icon">
1628
- <path
1629
- fill="currentColor"
1630
- d="M.5 2A1.5 1.5 0 0 1 2 .5h14A1.5 1.5 0 0 1 17.5 2v14a1.5 1.5 0 0 1-1.5 1.5H2A1.5 1.5 0 0 1 .5 16V2H2v14h14V2H2m1.5 12.5h2v-7h-2m3 7h2v-10h-2m3 10h2v-5h-2m3 5h2v-11h-2M2 14.5h14v1H2"
1631
- />
1632
- </svg>
1607
+ <div class="o-icon">
1608
+ <i class="fa fa-bar-chart"/>
1609
+ </div>
1633
1610
  </t>
1634
1611
  <t t-name="o-spreadsheet-Icon.INSERT_IMAGE">
1635
- <svg class="o-icon" fill="currentColor">
1636
- <path
1637
- d="M.5 2A1.5 1.5 0 0 1 2 .5h14A1.5 1.5 0 0 1 17.5 2v14a1.5 1.5 0 0 1-1.5 1.5H2A1.5 1.5 0 0 1 .5 16V2H2v14h14V2H2m10 4.5L10 11 8.5 9.5l-2 2.5L5 10.5l-2 3h12M3.5,5a1.5,1.5,0,0,1,3,0a1.5,1.5,0,0,1,-3,0"
1638
- />
1639
- </svg>
1612
+ <div class="o-icon">
1613
+ <i class="fa fa-file-image-o"/>
1614
+ </div>
1640
1615
  </t>
1641
1616
  <t t-name="o-spreadsheet-Icon.INSERT_LINK">
1642
- <svg class="o-icon" fill="currentColor">
1643
- <path
1644
- d="M6.88 13.69c.19-.19.41-.28.68-.28.27 0 .51.09.72.28.43.45.43.92 0 1.4l-.84.8c-.75.75-1.63 1.12-2.64 1.12-1.04 0-1.93-.37-2.68-1.12C1.37 15.14 1 14.26 1 13.25c0-1.04.37-1.93 1.12-2.68l2.96-2.96c.93-.9 1.89-1.42 2.88-1.54.98-.12 1.84.17 2.56.86.21.21.32.45.32.72 0 .26-.1.51-.32.72-.48.43-.95.43-1.4 0-.67-.64-1.55-.41-2.67.68l-2.93 2.92c-.35.35-.52.77-.52 1.28s.17.92.52 1.24c.35.35.76.52 1.26.52.49 0 .91-.17 1.26-.52l.84-.8m9-11.48c.75.75 1.12 1.63 1.12 2.64 0 1.04-.37 1.94-1.12 2.68l-3.16 3.16c-.99.96-1.99 1.44-3 1.44-.83 0-1.57-.33-2.24-1a.913.913 0 0 1-.28-.68c0-.27.09-.5.27-.72.19-.19.43-.28.71-.28.28 0 .51.09.7.28.66.64 1.48.48 2.44-.48l3.16-3.12c.37-.37.56-.8.56-1.28 0-.51-.19-.92-.56-1.24-.32-.35-.7-.56-1.12-.62-.43-.07-.83.07-1.2.42l-1 1c-.22.19-.45.28-.72.28-.26 0-.5-.09-.68-.28-.46-.45-.46-.92 0-1.4l1-1c.72-.72 1.56-1.06 2.54-1.02.97.04 1.83.45 2.58 1.22"
1645
- />
1646
- </svg>
1617
+ <div class="o-icon">
1618
+ <i class="fa fa-link"/>
1619
+ </div>
1647
1620
  </t>
1648
1621
  <t t-name="o-spreadsheet-Icon.INSERT_CHECKBOX">
1649
- <svg class="o-icon">
1650
- <path
1651
- fill="currentColor"
1652
- d="M.5 2A1.5 1.5 0 0 1 2 .5h14A1.5 1.5 0 0 1 17.5 2v14a1.5 1.5 0 0 1-1.5 1.5H2A1.5 1.5 0 0 1 .5 16V2H2v14h14V2H2m13 4-1.4-1.4L7 11.2 4.4 8.6 3 10l4 4z"
1653
- />
1654
- </svg>
1622
+ <div class="o-icon">
1623
+ <i class="fa fa-check-square-o"/>
1624
+ </div>
1655
1625
  </t>
1656
1626
  <t t-name="o-spreadsheet-Icon.INSERT_DROPDOWN">
1657
1627
  <svg class="o-icon">
@@ -1693,26 +1663,6 @@
1693
1663
  />
1694
1664
  </svg>
1695
1665
  </t>
1696
- <t t-name="o-spreadsheet-Icon.TRIANGLE_DOWN">
1697
- <svg class="o-icon" viewBox="0 0 18 18">
1698
- <polygon fill="currentColor" points="5 7 9 11 13 7"/>
1699
- </svg>
1700
- </t>
1701
- <t t-name="o-spreadsheet-Icon.TRIANGLE_UP">
1702
- <svg class="o-icon" transform="rotate(180)">
1703
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
1704
- </svg>
1705
- </t>
1706
- <t t-name="o-spreadsheet-Icon.TRIANGLE_RIGHT">
1707
- <svg class="o-icon" transform="rotate(-90)">
1708
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
1709
- </svg>
1710
- </t>
1711
- <t t-name="o-spreadsheet-Icon.TRIANGLE_LEFT">
1712
- <svg class="o-icon" transform="rotate(90)" viewBox="0 0 18 18">
1713
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
1714
- </svg>
1715
- </t>
1716
1666
  <t t-name="o-spreadsheet-Icon.BOLD">
1717
1667
  <svg class="o-icon">
1718
1668
  <path
@@ -1955,70 +1905,44 @@
1955
1905
  </t>
1956
1906
 
1957
1907
  <t t-name="o-spreadsheet-Icon.EDIT">
1958
- <svg class="o-icon" viewBox="0 0 576 512">
1959
- <path
1960
- fill="currentColor"
1961
- d="M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z"
1962
- />
1963
- </svg>
1908
+ <div class="o-icon">
1909
+ <i class="fa fa-pencil-square-o"/>
1910
+ </div>
1964
1911
  </t>
1965
1912
  <t t-name="o-spreadsheet-Icon.UNLINK">
1966
- <svg class="o-icon" viewBox="0 0 512 512">
1967
- <path
1968
- fill="currentColor"
1969
- d="M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z"
1970
- />
1971
- </svg>
1913
+ <div class="o-icon">
1914
+ <i class="fa fa-chain-broken"/>
1915
+ </div>
1972
1916
  </t>
1973
- <!-- Font Awesome by Dave Gandy
1974
- http://fontawesome.io/
1975
- https://fontawesome.com/license -->
1976
1917
  <t t-name="o-spreadsheet-Icon.CARET_UP">
1977
- <svg class="caret-up" viewBox="0 0 320 512">
1978
- <path
1979
- fill="currentColor"
1980
- d="M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z"
1981
- />
1982
- </svg>
1918
+ <div class="o-icon fa-small">
1919
+ <i class="fa fa-caret-up"/>
1920
+ </div>
1983
1921
  </t>
1984
1922
  <t t-name="o-spreadsheet-Icon.CARET_DOWN">
1985
- <svg class="caret-down" viewBox="0 0 320 512">
1986
- <path
1987
- fill="currentColor"
1988
- d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
1989
- />
1990
- </svg>
1923
+ <div class="o-icon fa-small">
1924
+ <i class="fa fa-caret-down"/>
1925
+ </div>
1991
1926
  </t>
1992
1927
  <t t-name="o-spreadsheet-Icon.CARET_RIGHT">
1993
- <svg class="o-icon caret-right" viewBox="0 0 192 512">
1994
- <path
1995
- d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"
1996
- />
1997
- </svg>
1928
+ <div class="o-icon fa-small">
1929
+ <i class="fa fa-caret-right"/>
1930
+ </div>
1998
1931
  </t>
1999
1932
  <t t-name="o-spreadsheet-Icon.CARET_LEFT">
2000
- <svg class="o-icon caret-left" viewBox="0 0 192 512">
2001
- <path
2002
- d="M192 127.338v257.324c0 17.818-21.543 26.741-34.142 14.142L29.196 270.142c-7.81-7.81-7.81-20.474 0-28.284l128.662-128.662c12.599-12.6 34.142-3.676 34.142 14.142z"
2003
- />
2004
- </svg>
1933
+ <div class="o-icon fa-small">
1934
+ <i class="fa fa-caret-left"/>
1935
+ </div>
2005
1936
  </t>
2006
-
2007
1937
  <t t-name="o-spreadsheet-Icon.TRASH">
2008
- <svg class="o-cf-icon trash" viewBox="0 0 448 512">
2009
- <path
2010
- fill="currentColor"
2011
- d="M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"
2012
- />
2013
- </svg>
1938
+ <div class="o-icon">
1939
+ <i class="fa fa-trash-o"/>
1940
+ </div>
2014
1941
  </t>
2015
1942
  <t t-name="o-spreadsheet-Icon.REFRESH">
2016
- <svg class="o-cf-icon refresh" viewBox="0 0 512 512">
2017
- <path
2018
- fill="currentColor"
2019
- d="M440.65 12.57l4 82.77A247.16 247.16 0 0 0 255.83 8C134.73 8 33.91 94.92 12.29 209.82A12 12 0 0 0 24.09 224h49.05a12 12 0 0 0 11.67-9.26 175.91 175.91 0 0 1 317-56.94l-101.46-4.86a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12H500a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12h-47.37a12 12 0 0 0-11.98 12.57zM255.83 432a175.61 175.61 0 0 1-146-77.8l101.8 4.87a12 12 0 0 0 12.57-12v-47.4a12 12 0 0 0-12-12H12a12 12 0 0 0-12 12V500a12 12 0 0 0 12 12h47.35a12 12 0 0 0 12-12.6l-4.15-82.57A247.17 247.17 0 0 0 255.83 504c121.11 0 221.93-86.92 243.55-201.82a12 12 0 0 0-11.8-14.18h-49.05a12 12 0 0 0-11.67 9.26A175.86 175.86 0 0 1 255.83 432z"
2020
- />
2021
- </svg>
1943
+ <div class="o-icon">
1944
+ <i class="fa fa-refresh"/>
1945
+ </div>
2022
1946
  </t>
2023
1947
 
2024
1948
  <t t-name="o-spreadsheet-Icon.ARROW_DOWN">
@@ -2121,25 +2045,19 @@ https://fontawesome.com/license -->
2121
2045
  </svg>
2122
2046
  </t>
2123
2047
  <t t-name="o-spreadsheet-Icon.SORT_ASCENDING">
2124
- <svg class="o-icon" fill="currentColor">
2125
- <path d="m3 13-1-1-1 1 3 3 3-3-1-1-1 1V0H3"/>
2126
- <text x="9" y="7" class="small-text">A</text>
2127
- <text x="9.3" y="15" class="small-text">Z</text>
2128
- </svg>
2048
+ <div class="o-icon">
2049
+ <i class="fa fa-sort-alpha-asc"/>
2050
+ </div>
2129
2051
  </t>
2130
2052
  <t t-name="o-spreadsheet-Icon.SORT_DESCENDING">
2131
- <svg class="o-icon" fill="currentColor">
2132
- <path d="m3 13.9-1-1-1 1 3 3 3-3-1-1-1 1V.9H3"/>
2133
- <text x="9.3" y="7.9" class="small-text">Z</text>
2134
- <text x="9" y="15.9" class="small-text">A</text>
2135
- </svg>
2053
+ <div class="o-icon">
2054
+ <i class="fa fa-sort-alpha-desc"/>
2055
+ </div>
2136
2056
  </t>
2137
2057
  <t t-name="o-spreadsheet-Icon.DATA_CLEANUP">
2138
- <svg class="o-icon" fill="currentColor">
2139
- <path
2140
- d="m13.6 6.4-2.1-2.1c-.4-.4-1-.4-1.4 0l-8.8 8.9c-.4.4-.4 1 0 1.4l2.1 2.1c.4.4 1 .4 1.4 0l8.8-8.9c.4-.4.4-1 0-1.4M8 8.5 10.5 6l1.4 1.4-2.5 2.5m3-7 1.8.8.8 1.8.8-1.8 1.8-.8-1.8-.8L14.9.4l-.8 1.8M3.5 4l1.7.7.8 1.8.8-1.8 1.8-.8-1.8-.8-.8-1.8-.8 1.8zm13.5 7.7-1.8-.8-.8-1.8-.8 1.8-1.8.8 1.8.8.8 1.8.7-1.8"
2141
- />
2142
- </svg>
2058
+ <div class="o-icon">
2059
+ <i class="fa fa-magic"/>
2060
+ </div>
2143
2061
  </t>
2144
2062
  <t t-name="o-spreadsheet-Icon.FILTER_ICON">
2145
2063
  <svg class="o-cf-icon filter-icon" viewBox="0 0 850 850">
@@ -2150,20 +2068,14 @@ https://fontawesome.com/license -->
2150
2068
  </svg>
2151
2069
  </t>
2152
2070
  <t t-name="o-spreadsheet-Icon.FILTER_ICON_ACTIVE">
2153
- <svg class="o-cf-icon filter-icon-active" viewBox="0 0 18 18">
2154
- <path
2155
- fill="currentColor"
2156
- d="M16.6.5H1.29C.59.5.23 1.35.73 1.85l6.1 6.1v6.8c0 .26.13.5.34.65l2.64 1.85a.79.79 0 0 0 1.25-.65V7.96l6.1-6.1A.79.79 0 0 0 16.6.51"
2157
- />
2158
- </svg>
2071
+ <div class="o-icon filter-icon-active">
2072
+ <i class="fa fa-filter"/>
2073
+ </div>
2159
2074
  </t>
2160
2075
  <t t-name="o-spreadsheet-Icon.SEARCH">
2161
- <svg class="search-icon" width="10" height="10" focusable="false" viewBox="0 0 512 512">
2162
- <path
2163
- fill="currentColor"
2164
- d="M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"
2165
- />
2166
- </svg>
2076
+ <div class="o-icon">
2077
+ <i class="fa fa-search"/>
2078
+ </div>
2167
2079
  </t>
2168
2080
  <t t-name="o-spreadsheet-Icon.CHECK">
2169
2081
  <svg class="o-icon" viewBox="0 0 24 24">
@@ -2196,12 +2108,9 @@ https://fontawesome.com/license -->
2196
2108
  </svg>
2197
2109
  </t>
2198
2110
  <t t-name="o-spreadsheet-Icon.TRIANGLE_EXCLAMATION">
2199
- <svg class="o-icon" viewBox="0 0 512 512">
2200
- <path
2201
- fill="currentColor"
2202
- d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"
2203
- />
2204
- </svg>
2111
+ <div class="o-icon fa-small">
2112
+ <i class="fa fa-exclamation-triangle"/>
2113
+ </div>
2205
2114
  </t>
2206
2115
  <t t-name="o-spreadsheet-Icon.SPLIT_TEXT">
2207
2116
  <svg class="o-icon">
@@ -2212,12 +2121,9 @@ https://fontawesome.com/license -->
2212
2121
  </svg>
2213
2122
  </t>
2214
2123
  <t t-name="o-spreadsheet-Icon.ERROR">
2215
- <svg class="error-icon" width="14" height="14" viewBox="0 0 512 512">
2216
- <path
2217
- fill="currentColor"
2218
- d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
2219
- />
2220
- </svg>
2124
+ <div class="o-icon">
2125
+ <i class="fa fa-exclamation-circle"/>
2126
+ </div>
2221
2127
  </t>
2222
2128
  <t t-name="o-spreadsheet-Icon.DISPLAY_HEADER">
2223
2129
  <svg class="o-icon" width="18" height="18">
@@ -2331,6 +2237,19 @@ https://fontawesome.com/license -->
2331
2237
  />
2332
2238
  </svg>
2333
2239
  </t>
2240
+ <t t-name="o-spreadsheet-Icon.PIVOT">
2241
+ <svg class="o-icon" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
2242
+ <path
2243
+ fill="currentColor"
2244
+ d="M17 2v14H1V6h4V2h12m-1 1H6v3h10M2 7v2h3V7m-3 3v2h3v-2m-3 3v2h3v-2m1-6v2h6V7m-6 3v2h6v-2m-6 3v2h6v-2m1-6v2h3V7m-3 3v2h3v-2m-3 3v2h3v-2"
2245
+ />
2246
+ </svg>
2247
+ </t>
2248
+ <t t-name="o-spreadsheet-Icon.UNUSED_PIVOT_WARNING">
2249
+ <div class="o-unused-pivot-icon text-warning" title="This pivot is not used">
2250
+ <t t-call="o-spreadsheet-Icon.TRIANGLE_EXCLAMATION"/>
2251
+ </div>
2252
+ </t>
2334
2253
 
2335
2254
  <t t-name="o-spreadsheet-LinkDisplay">
2336
2255
  <div class="o-link-tool d-flex align-items-center">
@@ -2447,7 +2366,9 @@ https://fontawesome.com/license -->
2447
2366
  t-att-class="{'disabled': !isMenuEnabled, 'o-menu-item-active': isActive(menuItem)}"
2448
2367
  t-att-style="getColor(menuItem)">
2449
2368
  <div class="d-flex w-100">
2450
- <div t-if="childrenHaveIcon" class="o-menu-item-icon align-middle flex-shrink-0">
2369
+ <div
2370
+ t-if="childrenHaveIcon"
2371
+ class="o-menu-item-icon d-flex align-items-center flex-shrink-0">
2451
2372
  <t t-if="getIconName(menuItem)" t-call="{{getIconName(menuItem)}}"/>
2452
2373
  </div>
2453
2374
  <div class="o-menu-item-name align-middle text-truncate" t-esc="getName(menuItem)"/>
@@ -2461,7 +2382,7 @@ https://fontawesome.com/license -->
2461
2382
  <div
2462
2383
  t-if="isMenuRoot"
2463
2384
  class="o-menu-item-root align-middle ms-auto"
2464
- t-call="o-spreadsheet-Icon.TRIANGLE_RIGHT"
2385
+ t-call="o-spreadsheet-Icon.CARET_RIGHT"
2465
2386
  />
2466
2387
  <div
2467
2388
  t-elif="secondaryIcon"
@@ -4249,6 +4170,202 @@ https://fontawesome.com/license -->
4249
4170
  </div>
4250
4171
  </t>
4251
4172
 
4173
+ <div t-name="o-spreadsheet-AllPivotsSidePanel" class="o_spreadsheet_pivot_side_panel">
4174
+ <t t-foreach="env.model.getters.getPivotIds()" t-as="pivotId" t-key="pivotId">
4175
+ <PivotPreview pivotId="pivotId"/>
4176
+ </t>
4177
+ </div>
4178
+
4179
+ <t t-name="o-spreadsheet-PivotPreview">
4180
+ <div class="o_side_panel_select" t-ref="pivotPreview" t-on-click="this.selectPivot">
4181
+ <span t-esc="env.model.getters.getPivotDisplayName(props.pivotId)"/>
4182
+ </div>
4183
+ </t>
4184
+
4185
+ <t t-name="o-spreadsheet-EditableName">
4186
+ <t t-if="state.isEditing">
4187
+ <div>
4188
+ <input type="text" class="o_input o_sp_en_name" t-model="state.name"/>
4189
+ </div>
4190
+ <div class="btn btn-link o_sp_en_save" t-on-click="save">Save</div>
4191
+ <br/>
4192
+ </t>
4193
+ <t t-else="">
4194
+ <div class="o_sp_en_display_name" t-esc="props.displayName"/>
4195
+ <div class="btn btn-link o_sp_en_rename" t-on-click="rename">
4196
+ <i class="fa fa-pencil me-1"/>
4197
+ Rename
4198
+ </div>
4199
+ <br/>
4200
+ </t>
4201
+ </t>
4202
+
4203
+ <t t-name="o-spreadsheet-AddDimensionButton">
4204
+ <span class="btn btn-sm btn-link add-dimension" t-on-click="togglePopover" t-ref="button">
4205
+ Add
4206
+ </span>
4207
+ <Popover t-if="popover.isOpen" t-props="popoverProps">
4208
+ <div class="p-2 bg-white border-bottom d-flex align-items-baseline pivot-dimension-search">
4209
+ <i class="pe-1 pivot-dimension-search-field-icon">
4210
+ <t t-call="o-spreadsheet-Icon.SEARCH"/>
4211
+ </i>
4212
+ <input
4213
+ t-model="search.input"
4214
+ t-on-keydown="onKeyDown"
4215
+ class="border-0 w-100 pivot-dimension-search-field"
4216
+ autofocus="1"
4217
+ />
4218
+ </div>
4219
+ <div
4220
+ t-foreach="filteredFields"
4221
+ t-as="field"
4222
+ t-key="field.name"
4223
+ t-esc="field.string"
4224
+ t-att-title="field.help"
4225
+ t-on-click="() => this.pickField(field)"
4226
+ class="p-1 px-2 pivot-dimension-field"
4227
+ role="button"
4228
+ />
4229
+ </Popover>
4230
+ </t>
4231
+
4232
+ <t t-name="o-spreadsheet-PivotDimension">
4233
+ <div class="border py-1 px-2 d-flex flex-column shadow-sm pivot-dimension">
4234
+ <div class="d-flex flex-row justify-content-between align-items-center">
4235
+ <span class="fw-bold" t-esc="props.dimension.displayName"/>
4236
+ <i
4237
+ class="btn fa fa-times pe-0"
4238
+ t-if="props.onRemoved"
4239
+ t-on-click="() => props.onRemoved(props.dimension)"
4240
+ />
4241
+ </div>
4242
+ <t t-slot="default"/>
4243
+ </div>
4244
+ </t>
4245
+
4246
+ <t t-name="o-spreadsheet-PivotDimensionGranularity">
4247
+ <div class="d-flex flex-row">
4248
+ <div class="d-flex flex-row py-1 px-2 w-100 small">
4249
+ <t t-set="granularity" t-value="props.dimension.granularity"/>
4250
+ <div class="flex-basis-50">Granularity</div>
4251
+ <select
4252
+ class="o_input flex-basis-50"
4253
+ t-on-change="(ev) => props.onUpdated(props.dimension, ev.target.value)">
4254
+ <option
4255
+ t-foreach="allGranularities"
4256
+ t-as="granularity"
4257
+ t-key="granularity"
4258
+ t-if="props.availableGranularities.has(granularity) || granularity === props.dimension.granularity"
4259
+ t-att-value="granularity"
4260
+ t-esc="periods[granularity]"
4261
+ t-att-selected="granularity === props.dimension.granularity or (granularity === 'month' and !props.dimension.granularity)"
4262
+ />
4263
+ </select>
4264
+ </div>
4265
+ </div>
4266
+ </t>
4267
+
4268
+ <t t-name="o-spreadsheet-PivotDimensionOrder">
4269
+ <div class="d-flex">
4270
+ <div class="d-flex py-1 px-2 w-100 small">
4271
+ <div class="flex-basis-50">Order by</div>
4272
+ <select
4273
+ class="o_input flex-basis-50"
4274
+ t-on-change="(ev) => props.onUpdated(props.dimension, ev.target.value)">
4275
+ <option value="" t-att-selected="props.dimension.order === undefined">Automatic</option>
4276
+ <option value="asc" t-att-selected="props.dimension.order === 'asc'">Ascending</option>
4277
+ <option value="desc" t-att-selected="props.dimension.order === 'desc'">Descending</option>
4278
+ </select>
4279
+ </div>
4280
+ </div>
4281
+ </t>
4282
+
4283
+ <t t-name="o-spreadsheet-PivotDimensions">
4284
+ <div class="o_side_panel_section pivot-dimensions" t-ref="pivot-dimensions">
4285
+ <div class="fw-bold py-1 d-flex flex-row justify-content-between align-items-center">
4286
+ Columns
4287
+ <AddDimensionButton
4288
+ onFieldPicked.bind="addColumnDimension"
4289
+ fields="props.unusedGroupableFields"
4290
+ />
4291
+ </div>
4292
+ <t t-foreach="props.definition.columns" t-as="col" t-key="col.nameWithGranularity">
4293
+ <div
4294
+ t-on-pointerdown="(ev) => this.startDragAndDrop(col, ev)"
4295
+ t-att-style="dragAndDrop.itemsStyle[col.nameWithGranularity]"
4296
+ class="pt-1">
4297
+ <PivotDimension dimension="col" onRemoved.bind="removeDimension">
4298
+ <PivotDimensionGranularity
4299
+ t-if="isDateField(col)"
4300
+ dimension="col"
4301
+ onUpdated.bind="this.updateGranularity"
4302
+ availableGranularities="props.unusedDateTimeGranularities[col.name]"
4303
+ />
4304
+ <PivotDimensionOrder dimension="col" onUpdated.bind="this.updateOrder"/>
4305
+ </PivotDimension>
4306
+ </div>
4307
+ </t>
4308
+ <div
4309
+ class="fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center"
4310
+ t-att-style="dragAndDrop.itemsStyle['__rows_title__']">
4311
+ Rows
4312
+ <AddDimensionButton
4313
+ onFieldPicked.bind="addRowDimension"
4314
+ fields="props.unusedGroupableFields"
4315
+ />
4316
+ </div>
4317
+ <t t-foreach="props.definition.rows" t-as="row" t-key="row.nameWithGranularity">
4318
+ <div
4319
+ t-on-pointerdown="(ev) => this.startDragAndDrop(row, ev)"
4320
+ t-att-style="dragAndDrop.itemsStyle[row.nameWithGranularity]"
4321
+ class="pt-1">
4322
+ <PivotDimension dimension="row" onRemoved.bind="removeDimension">
4323
+ <PivotDimensionGranularity
4324
+ t-if="isDateField(row)"
4325
+ dimension="row"
4326
+ onUpdated.bind="this.updateGranularity"
4327
+ availableGranularities="props.unusedDateTimeGranularities[row.name]"
4328
+ />
4329
+ <PivotDimensionOrder dimension="row" onUpdated.bind="this.updateOrder"/>
4330
+ </PivotDimension>
4331
+ </div>
4332
+ </t>
4333
+ <div class="fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center">
4334
+ Measures
4335
+ <AddDimensionButton
4336
+ onFieldPicked.bind="addMeasureDimension"
4337
+ fields="props.unusedMeasureFields"
4338
+ />
4339
+ </div>
4340
+ <t t-foreach="props.definition.measures" t-as="measure" t-key="measure.nameWithAggregator">
4341
+ <div
4342
+ t-on-pointerdown="(ev) => this.startDragAndDropMeasures(measure, ev)"
4343
+ t-att-style="dragAndDrop.itemsStyle[measure.name]"
4344
+ class="pt-1 pivot-measure">
4345
+ <PivotDimension dimension="measure" onRemoved.bind="removeMeasureDimension">
4346
+ <div class="d-flex flex-row small">
4347
+ <div class="d-flex flex-row py-1 px-2 w-100">
4348
+ <div class="flex-basis-50">Aggregated by</div>
4349
+ <select
4350
+ class="o_input flex-basis-50"
4351
+ t-on-change="(ev) => this.updateAggregator(measure, ev.target.value)">
4352
+ <option
4353
+ t-foreach="Object.keys(AGGREGATORS[measure.type])"
4354
+ t-as="agg"
4355
+ t-key="agg"
4356
+ t-att-value="agg"
4357
+ t-att-selected="agg === measure.aggregator"
4358
+ t-esc="AGGREGATORS[measure.type][agg]"
4359
+ />
4360
+ </select>
4361
+ </div>
4362
+ </div>
4363
+ </PivotDimension>
4364
+ </div>
4365
+ </t>
4366
+ </div>
4367
+ </t>
4368
+
4252
4369
  <t t-name="o-spreadsheet-RemoveDuplicatesPanel">
4253
4370
  <div class="o-remove-duplicates">
4254
4371
  <Section>
@@ -4518,6 +4635,56 @@ https://fontawesome.com/license -->
4518
4635
  </div>
4519
4636
  </t>
4520
4637
 
4638
+ <t t-name="o-spreadsheet-TableStyleEditorPanel">
4639
+ <div class="o-table-style-editor-panel">
4640
+ <Section>
4641
+ <t t-set-slot="title">Style name</t>
4642
+ <input type="text" class="o-input o-optional" t-model="state.styleName"/>
4643
+ </Section>
4644
+ <Section class="'pt-1'">
4645
+ <t t-set-slot="title">Style color</t>
4646
+ <div class="d-flex align-items-center">
4647
+ <div
4648
+ class="o-color-preview"
4649
+ t-att-style="colorPreviewStyle"
4650
+ t-on-click.stop="togglePicker"
4651
+ />
4652
+ <span class="pe-1">Primary table style color</span>
4653
+ <ColorPickerWidget
4654
+ currentColor="state.primaryColor"
4655
+ showColorPicker="state.pickerOpened"
4656
+ toggleColorPicker.bind="togglePicker"
4657
+ onColorPicked.bind="onColorPicked"
4658
+ icon="'o-spreadsheet-Icon.FILL_COLOR'"
4659
+ />
4660
+ </div>
4661
+ </Section>
4662
+ <Section class="'pt-1'">
4663
+ <t t-set-slot="title">Style template</t>
4664
+ <div class="d-flex flex-wrap">
4665
+ <div
4666
+ class="o-table-style-list-item"
4667
+ t-foreach="tableTemplates"
4668
+ t-as="templateName"
4669
+ t-key="templateName"
4670
+ t-att-class="{ 'selected': templateName === state.selectedTemplateName }"
4671
+ t-on-click="() => this.onTemplatePicked(templateName)">
4672
+ <div class="o-table-style-edit-template-preview">
4673
+ <TableStylePreview
4674
+ tableConfig="previewTableConfig"
4675
+ tableStyle="computeTableStyle(templateName)"
4676
+ />
4677
+ </div>
4678
+ </div>
4679
+ </div>
4680
+ <div class="o-sidePanelButtons">
4681
+ <button t-on-click="onCancel" class="o-cancel o-button">Cancel</button>
4682
+ <button t-on-click="onConfirm" class="o-confirm o-button">Confirm</button>
4683
+ </div>
4684
+ </Section>
4685
+ </div>
4686
+ </t>
4687
+
4521
4688
  <t t-name="o-spreadsheet-Spreadsheet">
4522
4689
  <div
4523
4690
  class="o-spreadsheet"
@@ -4586,16 +4753,21 @@ https://fontawesome.com/license -->
4586
4753
  t-as="styleId"
4587
4754
  t-key="styleId"
4588
4755
  t-att-title="getStyleName(styleId)"
4589
- t-on-click="() => this.onStylePicked(styleId)">
4756
+ t-att-data-id="styleId"
4757
+ t-on-click="() => this.onStylePicked(styleId)"
4758
+ t-on-contextmenu.prevent="(ev) => this.onContextMenu(ev, styleId)">
4590
4759
  <div class="o-table-style-picker-preview">
4591
- <TableStylePreview tableConfig="getTableConfig(styleId)"/>
4760
+ <TableStylePreview
4761
+ tableConfig="props.table.config"
4762
+ tableStyle="env.model.getters.getTableStyle(styleId)"
4763
+ />
4592
4764
  </div>
4593
4765
  </div>
4594
4766
  </div>
4595
4767
  <div
4596
4768
  class="o-table-style-picker-arrow d-flex align-items-center px-1"
4597
4769
  t-on-click.stop="onArrowButtonClick">
4598
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
4770
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
4599
4771
  </div>
4600
4772
  </div>
4601
4773
  <TableStylesPopover
@@ -4605,6 +4777,12 @@ https://fontawesome.com/license -->
4605
4777
  popoverProps="state.popoverProps"
4606
4778
  closePopover.bind="closePopover"
4607
4779
  />
4780
+ <Menu
4781
+ t-if="menu.isOpen"
4782
+ menuItems="menu.menuItems"
4783
+ position="menu.position"
4784
+ onClose.bind="this.closeMenu"
4785
+ />
4608
4786
  </t>
4609
4787
 
4610
4788
  <t t-name="o-spreadsheet-TableStylePreview">
@@ -4613,28 +4791,63 @@ https://fontawesome.com/license -->
4613
4791
 
4614
4792
  <t t-name="o-spreadsheet-TableStylesPopover">
4615
4793
  <Popover t-if="props.popoverProps" t-props="props.popoverProps">
4616
- <div class="o-table-style-popover d-flex flex-column px-4 py-1" t-ref="tableStyleList">
4617
- <div t-foreach="categories" t-as="category" t-key="category">
4618
- <div class="mt-2 mb-1">
4619
- <b t-esc="category_value"/>
4794
+ <div
4795
+ class="o-table-style-popover d-flex flex-column px-4 py-3"
4796
+ t-ref="tableStyleList"
4797
+ t-on-contextmenu.prevent="">
4798
+ <div class="d-flex">
4799
+ <div
4800
+ t-foreach="Object.keys(categories)"
4801
+ t-as="category"
4802
+ t-key="category"
4803
+ class="form-check d-flex align-items-center">
4804
+ <input
4805
+ class="form-check-input me-1"
4806
+ type="radio"
4807
+ t-att-id="category_value"
4808
+ t-att-value="category_value"
4809
+ name="category"
4810
+ t-model="state.selectedCategory"
4811
+ />
4812
+ <label
4813
+ class="form-check-label pe-4"
4814
+ t-att-for="category_value"
4815
+ t-esc="categories[category_value]"
4816
+ />
4620
4817
  </div>
4621
- <div class="d-flex flex-wrap">
4622
- <div
4623
- class="o-table-style-list-item"
4624
- t-att-class="{ 'selected': styleId === props.selectedStyleId }"
4625
- t-foreach="getPresetsByCategory(category)"
4626
- t-as="styleId"
4627
- t-key="styleId"
4628
- t-att-title="getStyleName(styleId)"
4629
- t-on-click="() => this.props.onStylePicked(styleId)">
4630
- <div class="o-table-style-popover-preview">
4631
- <TableStylePreview tableConfig="getTableConfig(styleId)"/>
4632
- </div>
4818
+ </div>
4819
+ <hr class="hr my-2"/>
4820
+ <div class="d-flex flex-wrap">
4821
+ <div
4822
+ class="o-table-style-list-item"
4823
+ t-att-class="{ 'selected': styleId === props.selectedStyleId }"
4824
+ t-foreach="displayedStyles"
4825
+ t-as="styleId"
4826
+ t-key="styleId"
4827
+ t-att-title="getStyleName(styleId)"
4828
+ t-on-click="() => this.props.onStylePicked(styleId)"
4829
+ t-on-contextmenu.prevent="(ev) => this.onContextMenu(ev, styleId)">
4830
+ <div class="o-table-style-popover-preview">
4831
+ <TableStylePreview
4832
+ tableConfig="props.tableConfig"
4833
+ tableStyle="env.model.getters.getTableStyle(styleId)"
4834
+ />
4633
4835
  </div>
4634
4836
  </div>
4635
- <hr t-if="!category_last" class="hr mt-2 mb-0"/>
4837
+ <div
4838
+ t-if="state.selectedCategory === 'custom'"
4839
+ class="o-new-table-style o-table-style-list-item o-table-style-popover-preview d-flex justify-content-center align-items-center"
4840
+ t-on-click="newTableStyle">
4841
+ +
4842
+ </div>
4636
4843
  </div>
4637
4844
  </div>
4845
+ <Menu
4846
+ t-if="menu.isOpen"
4847
+ menuItems="menu.menuItems"
4848
+ position="menu.position"
4849
+ onClose.bind="this.closeMenu"
4850
+ />
4638
4851
  </Popover>
4639
4852
  </t>
4640
4853