@odoo/o-spreadsheet 18.4.0-alpha.8 → 18.4.0

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.8
5
- @date 2025-06-12T09:54:36.987Z
6
- @hash 9b7a8d0
4
+ @version 18.4.0
5
+ @date 2025-06-24T11:20:12.897Z
6
+ @hash a5b7cad
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -364,7 +364,7 @@
364
364
  </div>
365
365
  <div
366
366
  class="o-grid-container"
367
- t-att-class="{'o-two-columns': !sidePanel.isOpen}"
367
+ t-att-class="{'o-two-columns': !sidePanel.isMainPanelOpen}"
368
368
  t-att-style="gridContainerStyle"
369
369
  t-on-click="this.focusGrid">
370
370
  <div class="o-top-left"/>
@@ -378,7 +378,7 @@
378
378
  <Grid exposeFocus="(focus) => this._focusGrid = focus" getGridSize.bind="getGridSize"/>
379
379
  </div>
380
380
  </div>
381
- <SidePanel/>
381
+ <SidePanels/>
382
382
  <div class="o-spreadsheet-bottombar-wrapper o-two-columns overflow-hidden">
383
383
  <SmallBottomBar t-if="env.isSmall" onClick="() => this.focusGrid()"/>
384
384
  <BottomBar t-else="" onClick="() => this.focusGrid()"/>
@@ -648,36 +648,89 @@
648
648
  </div>
649
649
  </t>
650
650
 
651
+ <t t-name="o-spreadsheet-SidePanels" t-if="sidePanelStore.isMainPanelOpen">
652
+ <div class="o-sidePanels d-flex overflow-hidden">
653
+ <t t-foreach="panelList" t-as="panel" t-key="panel.key">
654
+ <div t-att-style="panel.style">
655
+ <SidePanel t-key="panel.key" t-props="panel.props"/>
656
+ </div>
657
+ </t>
658
+ </div>
659
+ </t>
660
+
651
661
  <t t-name="o-spreadsheet-SidePanel">
652
- <div class="o-sidePanel" t-if="sidePanelStore.isOpen">
653
- <div class="o-sidePanelHeader">
654
- <div class="o-sidePanelTitle o-fw-bold" t-esc="getTitle()"/>
655
- <div class="o-sidePanelClose" t-on-click="close">✕</div>
662
+ <t t-if="props.isCollapsed" t-call="o-spreadsheet-SidePanelCollapsed"/>
663
+ <t t-else="" t-call="o-spreadsheet-SidePanelExtended"/>
664
+ </t>
665
+
666
+ <t t-name="o-spreadsheet-SidePanelExtended">
667
+ <div class="o-sidePanel h-100">
668
+ <div class="o-sidePanelHeader d-flex align-items-center justify-content-between">
669
+ <div
670
+ t-if="props.onToggleCollapsePanel"
671
+ class="o-collapse-panel o-sidePanelAction rounded"
672
+ t-on-click="props.onToggleCollapsePanel">
673
+ <i class="fa fa-angle-double-right"/>
674
+ </div>
675
+ <div class="o-sidePanelTitle o-fw-bold ms-2" t-esc="getTitle()"/>
676
+ <div
677
+ t-if="props.onTogglePinPanel"
678
+ class="o-pin-panel o-sidePanelAction ms-auto rounded"
679
+ t-att-class="{'active': props.isPinned}"
680
+ t-on-click="props.onTogglePinPanel"
681
+ t-att-title="pinInfoMessage">
682
+ <i class="fa fa-thumb-tack"/>
683
+ </div>
684
+ <div class="o-sidePanelClose o-sidePanelAction rounded" t-on-click="props.onCloseSidePanel">
685
+
686
+ </div>
656
687
  </div>
657
688
  <div class="o-sidePanelBody-container d-flex flex-grow-1 ">
658
689
  <div class="o-sidePanel-handle-container">
659
690
  <div
660
691
  class="o-sidePanel-handle"
661
- t-on-pointerdown="startHandleDrag"
662
- t-on-dblclick="sidePanelStore.resetPanelSize">
692
+ t-on-pointerdown="props.onStartHandleDrag"
693
+ t-on-dblclick="props.onResetPanelSize">
663
694
  <t t-call="o-spreadsheet-Icon.THIN_DRAG_HANDLE"/>
664
695
  </div>
665
696
  </div>
666
697
  <div class="o-sidePanelBody">
667
698
  <t
668
- t-component="panel.Body"
669
- t-props="sidePanelStore.panelProps"
670
- onCloseSidePanel.bind="close"
671
- t-key="'Body_' + sidePanelStore.componentTag + sidePanelStore.panelKey"
699
+ t-component="props.panelContent.Body"
700
+ t-props="props.panelProps"
701
+ onCloseSidePanel="props.onCloseSidePanel"
672
702
  />
673
703
  </div>
674
- <div class="o-sidePanelFooter" t-if="panel?.Footer">
675
- <t
676
- t-component="panel.Footer"
677
- t-props="sidePanelStore.panelProps"
678
- t-key="'Footer_' + sidePanelStore.componentTag"
679
- />
704
+ <div class="o-sidePanelFooter" t-if="props.panelContent?.Footer">
705
+ <t t-component="props.panelContent.Footer" t-props="props.panelProps"/>
706
+ </div>
707
+ </div>
708
+ </div>
709
+ </t>
710
+
711
+ <t t-name="o-spreadsheet-SidePanelCollapsed">
712
+ <div class="o-sidePanel collapsed w-100 h-100" t-on-click="props.onToggleCollapsePanel">
713
+ <div class="d-flex flex-column align-items-center">
714
+ <div
715
+ t-if="props.onToggleCollapsePanel"
716
+ class="o-collapse-panel o-sidePanelAction rounded mb-1">
717
+ <i class="fa fa-angle-double-left"/>
718
+ </div>
719
+ <div
720
+ t-if="props.onTogglePinPanel"
721
+ class="o-pin-panel o-sidePanelAction rounded mb-1"
722
+ t-att-class="{'active': props.isPinned}"
723
+ t-on-click.stop="props.onTogglePinPanel"
724
+ t-att-title="pinInfoMessage">
725
+ <i class="fa fa-thumb-tack"/>
680
726
  </div>
727
+ <div
728
+ class="o-sidePanelClose o-sidePanelAction rounded mb-1"
729
+ t-on-click.stop="props.onCloseSidePanel">
730
+
731
+ </div>
732
+
733
+ <div class="o-sidePanelTitle o-fw-bold" t-esc="getTitle()"/>
681
734
  </div>
682
735
  </div>
683
736
  </t>
@@ -714,8 +767,9 @@
714
767
  </div>
715
768
  </div>
716
769
  </Section>
770
+
717
771
  <Section class="'pt-0'">
718
- <t t-set="message">This setting affects all users.</t>
772
+ <t t-set="message">Those settings affect all users.</t>
719
773
  <ValidationMessages messages="[message]" msgType="'info'"/>
720
774
  </Section>
721
775
  </div>
@@ -1485,9 +1539,21 @@
1485
1539
  required="true"
1486
1540
  hasSingleRange="true"
1487
1541
  />
1542
+ <t t-foreach="values" t-as="value" t-key="value_index">
1543
+ <div class="o-dv-list-values p-1 d-flex align-items-center">
1544
+ <div class="me-2">
1545
+ <RoundColorPicker
1546
+ currentColor="props.criterion.colors?.[value] || '#E7E9ED'"
1547
+ onColorPicked="(c) => this.onColorChanged(c, value)"
1548
+ />
1549
+ </div>
1550
+ <input type="text" class="o-input" t-att-value="value" disabled="1"/>
1551
+ </div>
1552
+ </t>
1488
1553
 
1489
1554
  <div class="o-section-subtitle mt-4">Display style</div>
1490
1555
  <select class="o-dv-display-style o-input" t-on-change="onChangedDisplayStyle">
1556
+ <option t-att-selected="props.criterion.displayStyle === 'chip'" value="chip">Chip</option>
1491
1557
  <option t-att-selected="props.criterion.displayStyle === 'arrow'" value="arrow">Arrow</option>
1492
1558
  <option t-att-selected="props.criterion.displayStyle === 'plainText'" value="plainText">
1493
1559
  Plain text
@@ -1498,6 +1564,12 @@
1498
1564
  <t t-name="o-spreadsheet-ListCriterionForm">
1499
1565
  <t t-foreach="displayedValues" t-as="value" t-key="value_index">
1500
1566
  <div class="o-dv-list-values d-flex align-items-center">
1567
+ <div class="me-1">
1568
+ <RoundColorPicker
1569
+ currentColor="props.criterion.colors?.[value] || '#E7E9ED'"
1570
+ onColorPicked="(c) => this.onColorChanged(c, value)"
1571
+ />
1572
+ </div>
1501
1573
  <CriterionInput
1502
1574
  value="props.criterion.values[value_index]"
1503
1575
  onValueChanged="(v) => this.onValueChanged(v, value_index)"
@@ -1521,6 +1593,7 @@
1521
1593
 
1522
1594
  <div class="o-section-subtitle">Display style</div>
1523
1595
  <select class="o-dv-display-style o-input" t-on-change="onChangedDisplayStyle">
1596
+ <option t-att-selected="props.criterion.displayStyle === 'chip'" value="chip">Chip</option>
1524
1597
  <option t-att-selected="props.criterion.displayStyle === 'arrow'" value="arrow">Arrow</option>
1525
1598
  <option t-att-selected="props.criterion.displayStyle === 'plainText'" value="plainText">
1526
1599
  Plain text
@@ -4067,8 +4140,8 @@
4067
4140
  <div
4068
4141
  t-att-title="getName(menuItem)"
4069
4142
  t-att-data-name="menuItem.id"
4070
- t-on-click="(ev) => this.props.onClickMenu?.(menuItem, ev)"
4071
- t-on-auxclick="(ev) => this.props.onClickMenu?.(menuItem, ev)"
4143
+ t-on-click="(ev) => this.onClickMenu(menuItem, ev)"
4144
+ t-on-auxclick="(ev) => this.onClickMenu(menuItem, ev)"
4072
4145
  t-on-mouseover="(ev) => this.props.onMouseOver?.(menuItem, ev)"
4073
4146
  t-on-mouseenter="(ev) => this.onMouseEnter?.(menuItem, ev)"
4074
4147
  t-on-mouseleave="(ev) => this.onMouseLeave?.(menuItem)"
@@ -6351,7 +6424,7 @@
6351
6424
  t-as="content"
6352
6425
  t-key="content_index"
6353
6426
  t-att-class="content.classes?.join(' ')"
6354
- t-attf-style="color: {{content.color || '#000000'}};"
6427
+ t-att-style="getCss(content)"
6355
6428
  t-esc="content.value"
6356
6429
  />
6357
6430
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.4.0-alpha.8",
3
+ "version": "18.4.0",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
@@ -147,6 +147,6 @@
147
147
  ]
148
148
  },
149
149
  "publishConfig": {
150
- "tag": "alpha"
150
+ "tag": "latest"
151
151
  }
152
152
  }