@odoo/o-spreadsheet 17.3.0-alpha.1 → 17.3.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.
@@ -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.1
5
- @date 2024-03-25T09:44:13.802Z
6
- @hash 4095c41
4
+ @version 17.3.0-alpha.3
5
+ @date 2024-04-10T12:29:04.461Z
6
+ @hash 80b5056
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ActionButton">
@@ -276,7 +276,7 @@
276
276
  t-on-dblclick="() => this.onDblClick()"
277
277
  t-on-focusout="() => this.onFocusOut()"
278
278
  t-on-keydown="(ev) => this.onKeyDown(ev)"
279
- t-att-contenteditable="state.isEditing ? 'plaintext-only': 'false'"
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
282
  <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
@@ -285,7 +285,7 @@
285
285
  </Ripple>
286
286
  </t>
287
287
 
288
- <t t-name="o-spreadsheet-BottomBarStatisic">
288
+ <t t-name="o-spreadsheet-BottomBarStatistic">
289
289
  <t t-set="selectedStatistic" t-value="getSelectedStatistic()"/>
290
290
  <Ripple class="'ms-auto'" t-if="selectedStatistic !== undefined">
291
291
  <div
@@ -471,6 +471,7 @@
471
471
  t-on-compositionstart="onCompositionStart"
472
472
  t-on-compositionend="onCompositionEnd"
473
473
  t-on-dblclick="onDblClick"
474
+ t-on-contextmenu="onContextMenu"
474
475
  />
475
476
 
476
477
  <div
@@ -515,7 +516,7 @@
515
516
  <span t-esc="context.functionName"/>
516
517
  (
517
518
  <t t-foreach="context.functionDescription.args" t-as="arg" t-key="arg.name">
518
- <span t-if="arg_index > '0'">,&#xA0;</span>
519
+ <span t-if="arg_index > '0'" t-esc="formulaArgSeparator"/>
519
520
  <span t-att-class="{ 'o-formula-assistant-focus': context.argToFocus === arg_index }">
520
521
  <span>
521
522
  <span t-if="arg.optional || arg.repeating || arg.default">[</span>
@@ -574,7 +575,12 @@
574
575
  class="o-topbar-composer bg-white user-select-text"
575
576
  t-on-click.stop=""
576
577
  t-att-style="containerStyle">
577
- <Composer focus="focus" inputStyle="composerStyle" onComposerContentFocused.bind="onFocus"/>
578
+ <Composer
579
+ focus="focus"
580
+ inputStyle="composerStyle"
581
+ onComposerContentFocused.bind="onFocus"
582
+ delimitation="delimitation"
583
+ />
578
584
  </div>
579
585
  </t>
580
586
 
@@ -583,7 +589,7 @@
583
589
  class="o-grid o-two-columns"
584
590
  tabindex="-1"
585
591
  t-on-wheel="onMouseWheel"
586
- t-on-click="onClosePopover">
592
+ t-on-pointerdown="onClosePopover">
587
593
  <div class="mx-auto h-100 position-relative" t-ref="grid" t-att-style="gridContainer">
588
594
  <GridOverlay
589
595
  onCellHovered.bind="onCellHovered"
@@ -606,7 +612,6 @@
606
612
  t-on-contextmenu.prevent=""
607
613
  t-att-style="getCellClickableStyle(clickableCell.coordinates)"
608
614
  />
609
- <FilterIconsOverlay/>
610
615
  </div>
611
616
  <VerticalScrollBar/>
612
617
  <HorizontalScrollBar/>
@@ -806,21 +811,23 @@
806
811
  </t>
807
812
 
808
813
  <t t-name="o-spreadsheet-FilterIcon">
809
- <div class="o-filter-icon" t-att-class="iconClass" t-on-click.stop="onClick">
814
+ <div class="o-filter-icon" t-att-class="iconClass" t-on-click="onClick">
810
815
  <t t-if="isFilterActive" t-call="o-spreadsheet-Icon.FILTER_ICON_ACTIVE"/>
811
816
  <t t-else="" t-call="o-spreadsheet-Icon.FILTER_ICON"/>
812
817
  </div>
813
818
  </t>
814
819
 
815
820
  <t t-name="o-spreadsheet-FilterIconsOverlay">
816
- <t
817
- t-foreach="getFilterHeadersPositions()"
818
- t-as="position"
819
- t-key="'filter'+position.col + '_' + position.row">
820
- <GridCellIcon cellPosition="position" offset="props.gridPosition" horizontalAlign="'right'">
821
- <FilterIcon cellPosition="position"/>
822
- </GridCellIcon>
823
- </t>
821
+ <div t-on-pointerdown.stop="this.props.onMouseDown">
822
+ <t
823
+ t-foreach="getFilterHeadersPositions()"
824
+ t-as="position"
825
+ t-key="'filter'+position.col + '_' + position.row">
826
+ <GridCellIcon cellPosition="position" horizontalAlign="'right'">
827
+ <FilterIcon cellPosition="position"/>
828
+ </GridCellIcon>
829
+ </t>
830
+ </div>
824
831
  </t>
825
832
 
826
833
  <t t-name="o-spreadsheet-FilterMenu">
@@ -948,7 +955,6 @@
948
955
  t-on-click="focusDefaultElement"
949
956
  t-on-keydown="onKeydown"
950
957
  t-on-wheel="onMouseWheel"
951
- t-on-contextmenu="onInputContextMenu"
952
958
  t-ref="grid">
953
959
  <GridOverlay
954
960
  onCellClicked.bind="onCellClicked"
@@ -961,7 +967,10 @@
961
967
  onFigureDeleted.bind="focusDefaultElement"
962
968
  />
963
969
  <HeadersOverlay onOpenContextMenu="(type, x, y) => this.toggleContextMenu(type, x, y)"/>
964
- <GridComposer gridDims="env.model.getters.getSheetViewDimensionWithHeaders()"/>
970
+ <GridComposer
971
+ gridDims="env.model.getters.getSheetViewDimensionWithHeaders()"
972
+ onInputContextMenu.bind="onInputContextMenu"
973
+ />
965
974
  <canvas t-ref="canvas"/>
966
975
  <t
967
976
  t-foreach="env.model.getters.getClientsToDisplay()"
@@ -996,7 +1005,6 @@
996
1005
  position="menuState.position"
997
1006
  onClose="() => this.closeMenu()"
998
1007
  />
999
- <FilterIconsOverlay gridPosition="{ x: HEADER_WIDTH, y : HEADER_HEIGHT }"/>
1000
1008
  <VerticalScrollBar topOffset="HEADER_HEIGHT"/>
1001
1009
  <HorizontalScrollBar leftOffset="HEADER_WIDTH"/>
1002
1010
  <div class="o-scrollbar corner"/>
@@ -1049,6 +1057,7 @@
1049
1057
  t-on-contextmenu.stop.prevent="onContextMenu">
1050
1058
  <FiguresContainer onFigureDeleted="props.onFigureDeleted"/>
1051
1059
  <DataValidationOverlay/>
1060
+ <FilterIconsOverlay onMouseDown="(ev) => this.onMouseDown(ev, {closePopover: false})"/>
1052
1061
  <GridAddRowsFooter
1053
1062
  t-if="!env.model.getters.isReadonly()"
1054
1063
  t-key="env.model.getters.getActiveSheetId()"
@@ -1209,25 +1218,22 @@
1209
1218
  t-as="hiddenItem"
1210
1219
  t-key="hiddenItem_index">
1211
1220
  <div
1212
- class="o-unhide-buttons position-relative float-end"
1221
+ class="position-absolute end-0 translate-middle-y"
1213
1222
  t-att-style="getUnhideButtonStyle(hiddenItem[0])">
1214
- <t t-if="!hiddenItem.includes(0)">
1215
- <div
1216
- class="o-unhide rounded mb-1"
1217
- t-att-data-index="hiddenItem_index"
1218
- t-on-click="() => this.unhide(hiddenItem)">
1219
- <t t-call="o-spreadsheet-Icon.TRIANGLE_UP"/>
1220
- </div>
1221
- </t>
1222
- <t
1223
- t-if="!hiddenItem.includes(env.model.getters.getNumberRows(env.model.getters.getActiveSheetId())-1)">
1224
- <div
1225
- class="o-unhide rounded"
1226
- t-att-data-index="hiddenItem_index"
1227
- t-on-click="() => this.unhide(hiddenItem)">
1228
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
1229
- </div>
1230
- </t>
1223
+ <div
1224
+ class="o-unhide rounded mb-1"
1225
+ t-att-class="{'invisible': hiddenItem.includes(0)}"
1226
+ t-att-data-index="hiddenItem_index"
1227
+ t-on-click="() => this.unhide(hiddenItem)">
1228
+ <t t-call="o-spreadsheet-Icon.TRIANGLE_UP"/>
1229
+ </div>
1230
+ <div
1231
+ class="o-unhide rounded"
1232
+ t-att-class="{'invisible': hiddenItem.includes(env.model.getters.getNumberRows(env.model.getters.getActiveSheetId())-1)}"
1233
+ t-att-data-index="hiddenItem_index"
1234
+ t-on-click="() => this.unhide(hiddenItem)">
1235
+ <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
1236
+ </div>
1231
1237
  </div>
1232
1238
  </t>
1233
1239
  </div>
@@ -1268,25 +1274,22 @@
1268
1274
  t-as="hiddenItem"
1269
1275
  t-key="hiddenItem_index">
1270
1276
  <div
1271
- class="o-unhide-buttons position-relative h-100 d-flex align-items-center"
1277
+ class="position-absolute h-100 d-flex align-items-center translate-middle-x gap-2"
1272
1278
  t-att-style="getUnhideButtonStyle(hiddenItem[0])">
1273
- <t t-if="!hiddenItem.includes(0)">
1274
- <div
1275
- class="o-unhide rounded"
1276
- t-att-data-index="hiddenItem_index"
1277
- t-on-click="() => this.unhide(hiddenItem)">
1278
- <t t-call="o-spreadsheet-Icon.TRIANGLE_LEFT"/>
1279
- </div>
1280
- </t>
1281
- <t
1282
- t-if="!hiddenItem.includes(env.model.getters.getNumberCols(env.model.getters.getActiveSheetId())-1)">
1283
- <div
1284
- class="o-unhide rounded"
1285
- t-att-data-index="hiddenItem_index"
1286
- t-on-click="() => this.unhide(hiddenItem)">
1287
- <t t-call="o-spreadsheet-Icon.TRIANGLE_RIGHT"/>
1288
- </div>
1289
- </t>
1279
+ <div
1280
+ class="o-unhide rounded"
1281
+ t-att-class="{'invisible': hiddenItem.includes(0)}"
1282
+ t-att-data-index="hiddenItem_index"
1283
+ t-on-click="() => this.unhide(hiddenItem)">
1284
+ <t t-call="o-spreadsheet-Icon.TRIANGLE_LEFT"/>
1285
+ </div>
1286
+ <div
1287
+ class="o-unhide rounded"
1288
+ t-att-class="{'invisible': hiddenItem.includes(env.model.getters.getNumberCols(env.model.getters.getActiveSheetId())-1)}"
1289
+ t-att-data-index="hiddenItem_index"
1290
+ t-on-click="() => this.unhide(hiddenItem)">
1291
+ <t t-call="o-spreadsheet-Icon.TRIANGLE_RIGHT"/>
1292
+ </div>
1290
1293
  </div>
1291
1294
  </t>
1292
1295
  </div>
@@ -2441,7 +2444,7 @@ https://fontawesome.com/license -->
2441
2444
  t-att-class="{'disabled': !isMenuEnabled, 'o-menu-item-active': isActive(menuItem)}"
2442
2445
  t-att-style="getColor(menuItem)">
2443
2446
  <div class="d-flex w-100">
2444
- <div t-if="childrenHaveIcon" class="o-menu-item-icon align-middle">
2447
+ <div t-if="childrenHaveIcon" class="o-menu-item-icon align-middle flex-shrink-0">
2445
2448
  <t t-if="getIconName(menuItem)" t-call="{{getIconName(menuItem)}}"/>
2446
2449
  </div>
2447
2450
  <div class="o-menu-item-name align-middle text-truncate" t-esc="getName(menuItem)"/>
@@ -2616,10 +2619,17 @@ https://fontawesome.com/license -->
2616
2619
 
2617
2620
  <t t-name="o-spreadsheet-BarChartDesignPanel">
2618
2621
  <div>
2619
- <ChartColor
2620
- currentColor="props.definition.background"
2621
- onColorPicked.bind="updateBackgroundColor"
2622
- />
2622
+ <Section class="'o-chart-background-color'">
2623
+ <t t-set-slot="title">Background color</t>
2624
+ <div class="d-flex align-items-center">
2625
+ <span class="me-2">Select a color...</span>
2626
+ <RoundColorPicker
2627
+ currentColor="props.definition.background"
2628
+ onColorPicked.bind="updateBackgroundColor"
2629
+ title="backgroundColorTitle"
2630
+ />
2631
+ </div>
2632
+ </Section>
2623
2633
  <ChartTitle title="title" update.bind="updateTitle"/>
2624
2634
  <Section>
2625
2635
  <t t-set-slot="title">Vertical axis position</t>
@@ -2647,24 +2657,6 @@ https://fontawesome.com/license -->
2647
2657
  </div>
2648
2658
  </t>
2649
2659
 
2650
- <t t-name="o-spreadsheet.ChartColor">
2651
- <Section class="'o-chart-background-color'">
2652
- <t t-set-slot="title">Background color</t>
2653
- <div class="d-flex align-items-center">
2654
- <span class="pe-1">Select a color...</span>
2655
- <t t-set="background_color">Background color</t>
2656
- <ColorPickerWidget
2657
- currentColor="props.currentColor"
2658
- showColorPicker="state.pickerOpened"
2659
- toggleColorPicker.bind="togglePicker"
2660
- onColorPicked="props.onColorPicked"
2661
- title="background_color"
2662
- icon="'o-spreadsheet-Icon.FILL_COLOR'"
2663
- />
2664
- </div>
2665
- </Section>
2666
- </t>
2667
-
2668
2660
  <t t-name="o-spreadsheet.ChartDataSeries">
2669
2661
  <Section class="'o-data-series'">
2670
2662
  <t t-set-slot="title" t-esc="title"/>
@@ -2720,6 +2712,81 @@ https://fontawesome.com/license -->
2720
2712
  </Section>
2721
2713
  </t>
2722
2714
 
2715
+ <t t-name="o-spreadsheet-ComboChartConfigPanel">
2716
+ <div>
2717
+ <ChartDataSeries
2718
+ ranges="this.getDataSeriesRanges()"
2719
+ onSelectionChanged="(ranges) => this.onDataSeriesRangesChanged(ranges)"
2720
+ onSelectionConfirmed="() => this.onDataSeriesConfirmed()"
2721
+ />
2722
+ <ChartLabelRange
2723
+ range="this.getLabelRange()"
2724
+ isInvalid="isLabelInvalid"
2725
+ onSelectionChanged="(ranges) => this.onLabelRangeChanged(ranges)"
2726
+ onSelectionConfirmed="() => this.onLabelRangeConfirmed()"
2727
+ options="this.getLabelRangeOptions()"
2728
+ />
2729
+ <Section class="'o-use-right-axis py-0'">
2730
+ <Checkbox
2731
+ name="'shouldUseRightAxis'"
2732
+ label="shouldUseRightAxis"
2733
+ value="props.definition.useBothYAxis"
2734
+ onChange.bind="onUpdateUseRightAxis"
2735
+ />
2736
+ </Section>
2737
+ <Section class="'o-use-row-as-headers py-0'" t-if="calculateHeaderPosition()">
2738
+ <Checkbox
2739
+ name="'dataSetsHaveTitle'"
2740
+ label="dataSetsHaveTitleLabel"
2741
+ value="props.definition.dataSetsHaveTitle"
2742
+ onChange.bind="onUpdateDataSetsHaveTitle"
2743
+ />
2744
+ </Section>
2745
+
2746
+ <ChartErrorSection t-if="errorMessages.length" messages="errorMessages"/>
2747
+ </div>
2748
+ </t>
2749
+
2750
+ <t t-name="o-spreadsheet-ComboChartDesignPanel">
2751
+ <div>
2752
+ <Section class="'o-chart-background-color'">
2753
+ <t t-set-slot="title">Background color</t>
2754
+ <div class="d-flex align-items-center">
2755
+ <span class="me-2">Select a color...</span>
2756
+ <RoundColorPicker
2757
+ currentColor="props.definition.background"
2758
+ onColorPicked.bind="updateBackgroundColor"
2759
+ title="backgroundColorTitle"
2760
+ />
2761
+ </div>
2762
+ </Section>
2763
+ <ChartTitle title="title" update.bind="updateTitle"/>
2764
+ <Section t-if="!props.definition.useBothYAxis">
2765
+ <t t-set-slot="title">Vertical axis position</t>
2766
+ <select
2767
+ t-att-value="props.definition.verticalAxisPosition"
2768
+ class="o-input"
2769
+ t-on-change="(ev) => this.updateSelect('verticalAxisPosition', ev)">
2770
+ <option value="left">Left</option>
2771
+ <option value="right">Right</option>
2772
+ </select>
2773
+ </Section>
2774
+ <Section>
2775
+ <t t-set-slot="title">Legend position</t>
2776
+ <select
2777
+ t-att-value="props.definition.legendPosition"
2778
+ class="o-input"
2779
+ t-on-change="(ev) => this.updateSelect('legendPosition', ev)">
2780
+ <option value="none">None</option>
2781
+ <option value="top">Top</option>
2782
+ <option value="bottom">Bottom</option>
2783
+ <option value="left">Left</option>
2784
+ <option value="right">Right</option>
2785
+ </select>
2786
+ </Section>
2787
+ </div>
2788
+ </t>
2789
+
2723
2790
  <t t-name="o-spreadsheet-GaugeChartConfigPanel">
2724
2791
  <div>
2725
2792
  <ChartDataSeries
@@ -2738,10 +2805,17 @@ https://fontawesome.com/license -->
2738
2805
 
2739
2806
  <t t-name="o-spreadsheet-GaugeChartDesignPanel">
2740
2807
  <div>
2741
- <ChartColor
2742
- currentColor="props.definition.background"
2743
- onColorPicked.bind="updateBackgroundColor"
2744
- />
2808
+ <Section class="'o-chart-background-color'">
2809
+ <t t-set-slot="title">Background color</t>
2810
+ <div class="d-flex align-items-center">
2811
+ <span class="me-2">Select a color...</span>
2812
+ <RoundColorPicker
2813
+ currentColor="props.definition.background"
2814
+ onColorPicked.bind="updateBackgroundColor"
2815
+ title="backgroundColorTitle"
2816
+ />
2817
+ </div>
2818
+ </Section>
2745
2819
  <ChartTitle title="title" update.bind="updateTitle"/>
2746
2820
  <Section>
2747
2821
  <t t-set-slot="title">Range</t>
@@ -2806,12 +2880,9 @@ https://fontawesome.com/license -->
2806
2880
 
2807
2881
  <tr>
2808
2882
  <td>
2809
- <ColorPickerWidget
2883
+ <RoundColorPicker
2810
2884
  currentColor="sectionRule.colors.upperColor"
2811
- toggleColorPicker="(ev) => this.toggleMenu('sectionColor-upperColor', ev)"
2812
- showColorPicker="state.openedMenu === 'sectionColor-upperColor'"
2813
2885
  onColorPicked="(color) => this.updateSectionColor('upperColor', color)"
2814
- icon="'o-spreadsheet-Icon.FILL_COLOR'"
2815
2886
  />
2816
2887
  </td>
2817
2888
  <td>Else</td>
@@ -2826,12 +2897,9 @@ https://fontawesome.com/license -->
2826
2897
  <t t-name="o-spreadsheet-GaugeChartColorSectionTemplateRow">
2827
2898
  <tr>
2828
2899
  <td>
2829
- <ColorPickerWidget
2900
+ <RoundColorPicker
2830
2901
  currentColor="sectionColor"
2831
- toggleColorPicker="(ev) => this.toggleMenu('sectionColor-'+sectionType, ev)"
2832
- showColorPicker="state.openedMenu === 'sectionColor-'+sectionType"
2833
2902
  onColorPicked="(color) => this.updateSectionColor(sectionType, color)"
2834
- icon="'o-spreadsheet-Icon.FILL_COLOR'"
2835
2903
  />
2836
2904
  </td>
2837
2905
  <td>When value is below</td>
@@ -2888,10 +2956,17 @@ https://fontawesome.com/license -->
2888
2956
 
2889
2957
  <t t-name="o-spreadsheet-LineBarPieDesignPanel">
2890
2958
  <div>
2891
- <ChartColor
2892
- currentColor="props.definition.background"
2893
- onColorPicked.bind="updateBackgroundColor"
2894
- />
2959
+ <Section class="'o-chart-background-color'">
2960
+ <t t-set-slot="title">Background color</t>
2961
+ <div class="d-flex align-items-center">
2962
+ <span class="me-2">Select a color...</span>
2963
+ <RoundColorPicker
2964
+ currentColor="props.definition.background"
2965
+ onColorPicked.bind="updateBackgroundColor"
2966
+ title="backgroundColorTitle"
2967
+ />
2968
+ </div>
2969
+ </Section>
2895
2970
  <ChartTitle title="title" update.bind="updateTitle"/>
2896
2971
  <Section>
2897
2972
  <t t-set-slot="title">Legend position</t>
@@ -2952,10 +3027,17 @@ https://fontawesome.com/license -->
2952
3027
 
2953
3028
  <t t-name="o-spreadsheet-LineChartDesignPanel">
2954
3029
  <div>
2955
- <ChartColor
2956
- currentColor="props.definition.background"
2957
- onColorPicked.bind="updateBackgroundColor"
2958
- />
3030
+ <Section class="'o-chart-background-color'">
3031
+ <t t-set-slot="title">Background color</t>
3032
+ <div class="d-flex align-items-center">
3033
+ <span class="me-2">Select a color...</span>
3034
+ <RoundColorPicker
3035
+ currentColor="props.definition.background"
3036
+ onColorPicked.bind="updateBackgroundColor"
3037
+ title="backgroundColorTitle"
3038
+ />
3039
+ </div>
3040
+ </Section>
2959
3041
  <ChartTitle title="title" update.bind="updateTitle"/>
2960
3042
  <Section>
2961
3043
  <t t-set-slot="title">Vertical axis position</t>
@@ -3101,6 +3183,7 @@ https://fontawesome.com/license -->
3101
3183
  <option value="text">Absolute value</option>
3102
3184
  <option value="difference">Value change from key value</option>
3103
3185
  <option value="percentage">Percentage change from key value</option>
3186
+ <option value="progress">Progress bar</option>
3104
3187
  </select>
3105
3188
  </Section>
3106
3189
 
@@ -3112,10 +3195,17 @@ https://fontawesome.com/license -->
3112
3195
  <t t-set="color_up">Color Up</t>
3113
3196
  <t t-set="color_down">Color Down</t>
3114
3197
  <div>
3115
- <ChartColor
3116
- currentColor="props.definition.background"
3117
- onColorPicked="(color) => this.setColor(color, 'backgroundColor')"
3118
- />
3198
+ <Section class="'o-chart-background-color'">
3199
+ <t t-set-slot="title">Background color</t>
3200
+ <div class="d-flex align-items-center">
3201
+ <span class="me-2">Select a color...</span>
3202
+ <RoundColorPicker
3203
+ currentColor="props.definition.background"
3204
+ onColorPicked="(color) => this.setColor(color, 'backgroundColor')"
3205
+ title="backgroundColorTitle"
3206
+ />
3207
+ </div>
3208
+ </Section>
3119
3209
  <ChartTitle title="title" update.bind="updateTitle"/>
3120
3210
  <Section>
3121
3211
  <t t-set-slot="title">Baseline description</t>
@@ -3128,37 +3218,41 @@ https://fontawesome.com/license -->
3128
3218
  </Section>
3129
3219
  </div>
3130
3220
  <Section class="'o-chart-baseline-color'">
3131
- <t t-set-slot="title">Baseline color</t>
3132
- <div class="d-flex align-items-center">
3133
- <span class="pe-1">Color on value increase</span>
3134
- <ColorPickerWidget
3221
+ <t t-set-slot="title" t-esc="colorsSectionTitle"/>
3222
+ <div class="d-flex align-items-center mb-2">
3223
+ <RoundColorPicker
3135
3224
  currentColor="props.definition.baselineColorUp"
3136
- toggleColorPicker="() => this.toggleColorPicker('baselineColorUp')"
3137
- showColorPicker="state.openedColorPicker === 'baselineColorUp'"
3138
3225
  onColorPicked="(color) => this.setColor(color, 'baselineColorUp')"
3139
3226
  title="color_up"
3140
- icon="'o-spreadsheet-Icon.FILL_COLOR'"
3141
3227
  />
3228
+ <span class="ps-2">Color on value increase</span>
3142
3229
  </div>
3143
3230
  <div class="d-flex align-items-center">
3144
- <span class="pe-1">Color on value decrease</span>
3145
- <ColorPickerWidget
3231
+ <RoundColorPicker
3146
3232
  currentColor="props.definition.baselineColorDown"
3147
- toggleColorPicker="() => this.toggleColorPicker('baselineColorDown')"
3148
- showColorPicker="state.openedColorPicker === 'baselineColorDown'"
3149
3233
  onColorPicked="(color) => this.setColor(color, 'baselineColorDown')"
3150
3234
  title="color_down"
3151
- icon="'o-spreadsheet-Icon.FILL_COLOR'"
3152
3235
  />
3236
+ <span class="ps-2">Color on value decrease</span>
3153
3237
  </div>
3154
3238
  </Section>
3239
+ <Section class="'pt-1'">
3240
+ <t t-set-slot="title">Number formatting</t>
3241
+ <Checkbox
3242
+ name="'humanizeNumbers'"
3243
+ label="humanizeNumbersLabel"
3244
+ value="props.definition.humanize"
3245
+ onChange.bind="updateHumanizeNumbers"
3246
+ />
3247
+ </Section>
3155
3248
  </t>
3156
3249
 
3157
3250
  <t t-name="o-spreadsheet.Checkbox">
3158
3251
  <label
3159
3252
  class="o-checkbox"
3160
3253
  t-att-title="props.title"
3161
- t-att-class="{'text-muted': props.disabled }">
3254
+ t-att-class="{'text-muted': props.disabled }"
3255
+ t-attf-class="{{props.className}}">
3162
3256
  <input
3163
3257
  type="checkbox"
3164
3258
  t-att-disabled="props.disabled"
@@ -3171,6 +3265,22 @@ https://fontawesome.com/license -->
3171
3265
  </label>
3172
3266
  </t>
3173
3267
 
3268
+ <t t-name="o-spreadsheet.RoundColorPicker">
3269
+ <div
3270
+ class="o-round-color-picker-button rounded-circle"
3271
+ t-ref="colorPickerButton"
3272
+ t-on-click.stop="togglePicker"
3273
+ t-att-title="props.title"
3274
+ t-att-style="buttonStyle"
3275
+ />
3276
+ <ColorPicker
3277
+ t-if="state.pickerOpened"
3278
+ anchorRect="colorPickerAnchorRect"
3279
+ onColorPicked.bind="onColorPicked"
3280
+ currentColor="props.currentColor"
3281
+ />
3282
+ </t>
3283
+
3174
3284
  <t t-name="o_spreadsheet.Section">
3175
3285
  <div class="o-section" t-att-class="props.class">
3176
3286
  <t t-if="props.slots.title">
@@ -3405,19 +3515,22 @@ https://fontawesome.com/license -->
3405
3515
  type="text"
3406
3516
  class="o-input o-threshold-value o-required"
3407
3517
  t-model="rule[thresholdType].value"
3408
- t-att-class="{ 'o-invalid': isValueInvalid(thresholdType) }"
3518
+ t-att-class="{ 'o-invalid': isValueInvalid(thresholdType), 'invisible': threshold === undefined }"
3409
3519
  t-if="threshold !== undefined and threshold.type !== 'value'"
3410
3520
  />
3411
- <input type="text" class="o-input o-threshold-value" t-else="" disabled="1"/>
3412
- <ColorPickerWidget
3413
- currentColor="getThresholdColor(threshold)"
3414
- toggleColorPicker="(ev) => this.toggleMenu('colorScale-'+thresholdType+'Color', ev)"
3415
- showColorPicker="state.openedMenu === 'colorScale-'+thresholdType+'Color'"
3416
- onColorPicked="(color) => this.setColorScaleColor(thresholdType, color)"
3417
- title="fill_color"
3418
- icon="'o-spreadsheet-Icon.FILL_COLOR'"
3419
- disabled="threshold === undefined"
3521
+ <input
3522
+ type="text"
3523
+ t-attf-class="o-input o-threshold-value {{ threshold === undefined ? 'invisible' : ''}}"
3524
+ t-else=""
3525
+ disabled="1"
3420
3526
  />
3527
+ <div t-attf-class="flex-shrink-0 ms-1 {{ threshold === undefined ? 'invisible' : ''}}">
3528
+ <RoundColorPicker
3529
+ currentColor="getThresholdColor(threshold)"
3530
+ onColorPicked="(color) => this.setColorScaleColor(thresholdType, color)"
3531
+ title="fill_color"
3532
+ />
3533
+ </div>
3421
3534
  </div>
3422
3535
  </t>
3423
3536
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "17.3.0-alpha.1",
3
+ "version": "17.3.0-alpha.3",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
@@ -88,9 +88,9 @@
88
88
  "rollup-plugin-dts": "^5.3.1",
89
89
  "rollup-plugin-typescript2": "^0.35.0",
90
90
  "ts-jest": "^29.1.0",
91
- "typedoc": "0.24.8",
92
- "typedoc-plugin-markdown": "3.11.1",
93
- "typescript": "^5.1.6",
91
+ "typedoc": "0.25.12",
92
+ "typedoc-plugin-markdown": "3.17.1",
93
+ "typescript": "^5.4.3",
94
94
  "xml-formatter": "^2.4.0"
95
95
  },
96
96
  "prettier": {
@@ -100,7 +100,7 @@
100
100
  "xmlSelfClosingSpace": false
101
101
  },
102
102
  "dependencies": {
103
- "@odoo/owl": "2.2.7",
103
+ "@odoo/owl": "2.2.10",
104
104
  "bootstrap": "^5.1.3",
105
105
  "rbush": "^3.0.1"
106
106
  },