@odoo/o-spreadsheet 18.4.0-alpha.3 → 18.4.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  <!--
2
2
  This file is generated by o-spreadsheet build tools. Do not edit it.
3
3
  @see https://github.com/odoo/o-spreadsheet
4
- @version 18.4.0-alpha.3
5
- @date 2025-05-13T17:55:42.200Z
6
- @hash 70ad365
4
+ @version 18.4.0-alpha.4
5
+ @date 2025-05-20T05:58:32.778Z
6
+ @hash 5c28bca
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -352,6 +352,7 @@
352
352
  <div class="o-spreadsheet h-100 w-100" t-ref="spreadsheet" t-att-style="getStyle()">
353
353
  <t t-if="env.isDashboard()">
354
354
  <SpreadsheetDashboard/>
355
+ <FullScreenChart/>
355
356
  </t>
356
357
  <t t-else="">
357
358
  <TopBar onClick="() => this.focusGrid()" dropdownMaxHeight="gridHeight"/>
@@ -971,6 +972,7 @@
971
972
  defaultRangeSheetId="measure.computedBy.sheetId"
972
973
  contextualAutocomplete="getMeasureAutocomplete()"
973
974
  getContextualColoredSymbolToken.bind="getColoredSymbolToken"
975
+ invalid="isCalculatedMeasureInvalid"
974
976
  />
975
977
  </div>
976
978
  </div>
@@ -2449,17 +2451,24 @@
2449
2451
  </Section>
2450
2452
  </t>
2451
2453
  </GeneralDesignEditor>
2454
+ <ChartTitle
2455
+ title="this.props.definition.keyDescr?.text ?? ''"
2456
+ updateTitle="(text) => this.setKeyText(text)"
2457
+ name.translate="Key Value Style"
2458
+ placeholder.translate="Add a key value description"
2459
+ updateStyle.bind="updateKeyStyle"
2460
+ style="keyStyle"
2461
+ />
2452
2462
  <SidePanelCollapsible isInitiallyCollapsed="false" title.translate="Baseline">
2453
2463
  <t t-set-slot="content">
2454
- <Section class="'pt-0'" title.translate="Baseline description">
2455
- <input
2456
- type="text"
2457
- t-att-value="translate(props.definition.baselineDescr)"
2458
- t-on-change="updateBaselineDescr"
2459
- class="o-input"
2460
- placeholder="Baseline description"
2461
- />
2462
- </Section>
2464
+ <ChartTitle
2465
+ title="this.props.definition.baselineDescr?.text ?? ''"
2466
+ updateTitle="(text) => this.setBaselineText(text)"
2467
+ name.translate="Baseline Style"
2468
+ placeholder.translate="Add a baseline description"
2469
+ updateStyle.bind="updateBaselineStyle"
2470
+ style="baselineStyle"
2471
+ />
2463
2472
  <Section class="'o-chart-baseline-color pt-0'" title="colorsSectionTitle">
2464
2473
  <div class="d-flex align-items-center mb-2">
2465
2474
  <RoundColorPicker
@@ -3705,7 +3714,6 @@
3705
3714
  </t>
3706
3715
 
3707
3716
  <t t-name="o-spreadsheet-GeneralDesignEditor">
3708
- <t t-set="chart_title">Chart title</t>
3709
3717
  <SidePanelCollapsible isInitiallyCollapsed="false" title.translate="General">
3710
3718
  <t t-set-slot="content">
3711
3719
  <Section class="'o-chart-background-color pt-0 pb-0'" title.translate="Background color">
@@ -3717,7 +3725,8 @@
3717
3725
  <ChartTitle
3718
3726
  title="title.text"
3719
3727
  updateTitle.bind="updateTitle"
3720
- name="chart_title"
3728
+ name.translate="Chart title"
3729
+ placeholder.translate="Add a Title"
3721
3730
  updateStyle.bind="updateChartTitleStyle"
3722
3731
  style="title"
3723
3732
  defaultStyle="{align: 'left', fontSize: this.props.defaultChartTitleFontSize}"
@@ -3772,18 +3781,13 @@
3772
3781
  </t>
3773
3782
 
3774
3783
  <t t-name="o-spreadsheet.ChartTitle">
3775
- <t t-set="placeholder">Add a title</t>
3776
- <t t-set="title">
3777
- <t t-if="props.name" t-esc="props.name"/>
3778
- <t t-else="">Title</t>
3779
- </t>
3780
- <Section class="'o-chart-title'" title="title.toString()">
3784
+ <Section class="'o-chart-title'" title="props.name">
3781
3785
  <input
3782
3786
  type="text"
3783
3787
  class="o-input"
3784
3788
  t-att-value="props.title"
3785
3789
  t-on-change="updateTitle"
3786
- t-att-placeholder="placeholder"
3790
+ t-att-placeholder="props.placeholder"
3787
3791
  />
3788
3792
  <TextStyler
3789
3793
  style="props.style"
@@ -3991,6 +3995,15 @@
3991
3995
  </div>
3992
3996
  </t>
3993
3997
 
3998
+ <t t-name="o-spreadsheet-PivotCollapseIcon">
3999
+ <div
4000
+ class="o-pivot-collapse-icon o-hoverable-button d-flex align-items-center justify-content-center"
4001
+ t-on-click="onClick">
4002
+ <t t-if="isCollapsed" t-call="o-spreadsheet-Icon.PLUS"/>
4003
+ <t t-else="" t-call="o-spreadsheet-Icon.MINUS"/>
4004
+ </div>
4005
+ </t>
4006
+
3994
4007
  <t t-name="o-spreadsheet-PaintFormatButton">
3995
4008
  <span
3996
4009
  class="o-menu-item-button"
@@ -5538,8 +5551,7 @@
5538
5551
  t-on-pointerdown="onMouseDown"
5539
5552
  t-on-dblclick.self="onDoubleClick"
5540
5553
  t-on-contextmenu.stop.prevent="onContextMenu">
5541
- <DataValidationOverlay/>
5542
- <FilterIconsOverlay/>
5554
+ <GridCellIconOverlay/>
5543
5555
  <GridAddRowsFooter
5544
5556
  t-if="!env.model.getters.isReadonly()"
5545
5557
  t-key="env.model.getters.getActiveSheetId()"
@@ -5549,10 +5561,18 @@
5549
5561
  </div>
5550
5562
  </t>
5551
5563
 
5564
+ <t t-name="o-spreadsheet-GridCellIconOverlay">
5565
+ <t t-foreach="icons" t-as="icon" t-key="icon_index">
5566
+ <GridCellIcon icon="icon">
5567
+ <t t-component="icon.component" cellPosition="icon.position"/>
5568
+ </GridCellIcon>
5569
+ </t>
5570
+ </t>
5571
+
5552
5572
  <t t-name="o-spreadsheet-GridCellIcon">
5553
5573
  <div
5554
5574
  class="o-grid-cell-icon position-absolute overflow-hidden"
5555
- t-if="isPositionVisible(this.props.cellPosition)"
5575
+ t-if="isPositionVisible(this.props.icon.position)"
5556
5576
  t-att-style="iconStyle">
5557
5577
  <t t-slot="default"/>
5558
5578
  </div>
@@ -5608,6 +5628,7 @@
5608
5628
  onInputContextMenu.bind="onInputContextMenu"
5609
5629
  />
5610
5630
  <canvas t-ref="canvas"/>
5631
+ <t t-set="focused" t-value="focusedClients"/>
5611
5632
  <t
5612
5633
  t-foreach="env.model.getters.getClientsToDisplay()"
5613
5634
  t-as="client"
@@ -5617,7 +5638,7 @@
5617
5638
  color="client.color"
5618
5639
  col="client.position.col"
5619
5640
  row="client.position.row"
5620
- active="isCellHovered(client.position.col, client.position.row)"
5641
+ active="isCellHovered(client.position.col, client.position.row) || focused.has(client.id)"
5621
5642
  />
5622
5643
  </t>
5623
5644
  <GridPopover
@@ -5650,6 +5671,37 @@
5650
5671
  </div>
5651
5672
  </t>
5652
5673
 
5674
+ <t t-name="o-spreadsheet-FullScreenChart">
5675
+ <div
5676
+ class="position-absolute o-fullscreen-chart-overlay w-100 h-100 d-flex"
5677
+ t-if="figureUI"
5678
+ t-on-click="exitFullScreen">
5679
+ <button
5680
+ class="o-exit top-0 end-0 position-absolute o-button primary m-1"
5681
+ t-on-click="exitFullScreen">
5682
+ Exit fullscreen
5683
+ </button>
5684
+ <div class="flex-fill">
5685
+ <div
5686
+ class="o-fullscreen-chart o-figure position-relative"
5687
+ tabindex="1"
5688
+ t-ref="fullScreenChart"
5689
+ t-on-click.stop=""
5690
+ t-on-keydown="(ev) => this.onKeyDown(ev)">
5691
+ <t
5692
+ t-component="chartComponent"
5693
+ figureUI="this.figureUI"
5694
+ isFullScreen="true"
5695
+ t-key="this.figureUI.id"
5696
+ />
5697
+ <div class="position-absolute top-0 end-0">
5698
+ <ChartDashboardMenu figureUI="figureUI"/>
5699
+ </div>
5700
+ </div>
5701
+ </div>
5702
+ </div>
5703
+ </t>
5704
+
5653
5705
  <t t-name="o-spreadsheet-FontSizeEditor">
5654
5706
  <div class="o-dropdown" t-ref="FontSizeEditor">
5655
5707
  <div
@@ -5819,17 +5871,6 @@
5819
5871
  </div>
5820
5872
  </t>
5821
5873
 
5822
- <t t-name="o-spreadsheet-FilterIconsOverlay">
5823
- <t
5824
- t-foreach="getFilterHeadersPositions()"
5825
- t-as="position"
5826
- t-key="'filter'+position.col + '_' + position.row">
5827
- <GridCellIcon cellPosition="position" horizontalAlign="'right'">
5828
- <FilterIcon cellPosition="position"/>
5829
- </GridCellIcon>
5830
- </t>
5831
- </t>
5832
-
5833
5874
  <t t-name="o-spreadsheet-FilterIcon">
5834
5875
  <div class="o-filter-icon" t-att-class="iconClass" t-on-click="onClick">
5835
5876
  <t t-if="isFilterActive" t-call="o-spreadsheet-Icon.FILTER_ICON_ACTIVE"/>
@@ -5989,13 +6030,13 @@
5989
6030
  <t t-name="spreadsheet.ChartDashboardMenu">
5990
6031
  <div class="o-dashboard-chart-select position-absolute top-0 end-0" t-on-click.stop="">
5991
6032
  <div class="d-flex flex-row px-1" t-att-style="backgroundColor">
5992
- <t t-foreach="getAvailableTypes()" t-as="type" t-key="type.chartSubtype">
6033
+ <t t-foreach="getMenuItems()" t-as="item" t-key="item.id">
5993
6034
  <button
5994
- t-attf-class=" {{type.icon}} {{type.chartType === selectedChartType ? 'active' : ''}}"
6035
+ t-attf-class=" {{item.iconClass}} {{item.isSelected ? 'active' : ''}}"
5995
6036
  class="o-chart-dashboard-item btn mt-1 me-1 p-1 "
5996
- t-att-title="type.displayName"
5997
- t-on-click="() => this.onTypeChange(type.chartSubtype)"
5998
- t-att-data-id="type.chartSubtype"
6037
+ t-att-title="item.label"
6038
+ t-on-click="item.onClick"
6039
+ t-att-data-id="item.id"
5999
6040
  />
6000
6041
  </t>
6001
6042
  <button
@@ -6042,20 +6083,6 @@
6042
6083
  </div>
6043
6084
  </t>
6044
6085
 
6045
- <t t-name="o-spreadsheet-DataValidationOverlay">
6046
- <t t-foreach="checkBoxCellPositions" t-as="position" t-key="'checkbox'+position_index">
6047
- <GridCellIcon cellPosition="position">
6048
- <DataValidationCheckbox cellPosition="position"/>
6049
- </GridCellIcon>
6050
- </t>
6051
-
6052
- <t t-foreach="listIconsCellPositions" t-as="position" t-key="'list'+position_index">
6053
- <GridCellIcon cellPosition="position" horizontalAlign="'right'">
6054
- <DataValidationListIcon cellPosition="position"/>
6055
- </GridCellIcon>
6056
- </t>
6057
- </t>
6058
-
6059
6086
  <t t-name="o-spreadsheet-DataValidationListIcon">
6060
6087
  <div
6061
6088
  class="o-dv-list-icon d-flex align-items-center justify-content-center"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.4.0-alpha.3",
3
+ "version": "18.4.0-alpha.4",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",