@odoo/o-spreadsheet 17.3.0-alpha.2 → 17.3.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.
- package/dist/o-spreadsheet.cjs.js +1267 -456
- package/dist/o-spreadsheet.d.ts +285 -215
- package/dist/o-spreadsheet.esm.js +1267 -456
- package/dist/o-spreadsheet.iife.js +1267 -456
- package/dist/o-spreadsheet.iife.min.js +404 -344
- package/dist/o_spreadsheet.xml +240 -92
- package/package.json +2 -1
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 17.3.0-alpha.
|
|
5
|
-
@date 2024-04-
|
|
6
|
-
@hash
|
|
4
|
+
@version 17.3.0-alpha.4
|
|
5
|
+
@date 2024-04-15T11:03:33.066Z
|
|
6
|
+
@hash a32a1df
|
|
7
7
|
-->
|
|
8
8
|
<odoo>
|
|
9
9
|
<t t-name="o-spreadsheet-ActionButton">
|
|
@@ -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
|
|
@@ -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
|
|
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-
|
|
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
|
|
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
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
<
|
|
822
|
-
|
|
823
|
-
|
|
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
|
|
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,9 @@
|
|
|
996
1005
|
position="menuState.position"
|
|
997
1006
|
onClose="() => this.closeMenu()"
|
|
998
1007
|
/>
|
|
999
|
-
<
|
|
1008
|
+
<t t-foreach="staticTables" t-as="table" t-key="table.id">
|
|
1009
|
+
<TableResizer table="table"/>
|
|
1010
|
+
</t>
|
|
1000
1011
|
<VerticalScrollBar topOffset="HEADER_HEIGHT"/>
|
|
1001
1012
|
<HorizontalScrollBar leftOffset="HEADER_WIDTH"/>
|
|
1002
1013
|
<div class="o-scrollbar corner"/>
|
|
@@ -1049,6 +1060,7 @@
|
|
|
1049
1060
|
t-on-contextmenu.stop.prevent="onContextMenu">
|
|
1050
1061
|
<FiguresContainer onFigureDeleted="props.onFigureDeleted"/>
|
|
1051
1062
|
<DataValidationOverlay/>
|
|
1063
|
+
<FilterIconsOverlay onMouseDown="(ev) => this.onMouseDown(ev, {closePopover: false})"/>
|
|
1052
1064
|
<GridAddRowsFooter
|
|
1053
1065
|
t-if="!env.model.getters.isReadonly()"
|
|
1054
1066
|
t-key="env.model.getters.getActiveSheetId()"
|
|
@@ -2610,10 +2622,17 @@ https://fontawesome.com/license -->
|
|
|
2610
2622
|
|
|
2611
2623
|
<t t-name="o-spreadsheet-BarChartDesignPanel">
|
|
2612
2624
|
<div>
|
|
2613
|
-
<
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2625
|
+
<Section class="'o-chart-background-color'">
|
|
2626
|
+
<t t-set-slot="title">Background color</t>
|
|
2627
|
+
<div class="d-flex align-items-center">
|
|
2628
|
+
<span class="me-2">Select a color...</span>
|
|
2629
|
+
<RoundColorPicker
|
|
2630
|
+
currentColor="props.definition.background"
|
|
2631
|
+
onColorPicked.bind="updateBackgroundColor"
|
|
2632
|
+
title="backgroundColorTitle"
|
|
2633
|
+
/>
|
|
2634
|
+
</div>
|
|
2635
|
+
</Section>
|
|
2617
2636
|
<ChartTitle title="title" update.bind="updateTitle"/>
|
|
2618
2637
|
<Section>
|
|
2619
2638
|
<t t-set-slot="title">Vertical axis position</t>
|
|
@@ -2641,24 +2660,6 @@ https://fontawesome.com/license -->
|
|
|
2641
2660
|
</div>
|
|
2642
2661
|
</t>
|
|
2643
2662
|
|
|
2644
|
-
<t t-name="o-spreadsheet.ChartColor">
|
|
2645
|
-
<Section class="'o-chart-background-color'">
|
|
2646
|
-
<t t-set-slot="title">Background color</t>
|
|
2647
|
-
<div class="d-flex align-items-center">
|
|
2648
|
-
<span class="pe-1">Select a color...</span>
|
|
2649
|
-
<t t-set="background_color">Background color</t>
|
|
2650
|
-
<ColorPickerWidget
|
|
2651
|
-
currentColor="props.currentColor"
|
|
2652
|
-
showColorPicker="state.pickerOpened"
|
|
2653
|
-
toggleColorPicker.bind="togglePicker"
|
|
2654
|
-
onColorPicked="props.onColorPicked"
|
|
2655
|
-
title="background_color"
|
|
2656
|
-
icon="'o-spreadsheet-Icon.FILL_COLOR'"
|
|
2657
|
-
/>
|
|
2658
|
-
</div>
|
|
2659
|
-
</Section>
|
|
2660
|
-
</t>
|
|
2661
|
-
|
|
2662
2663
|
<t t-name="o-spreadsheet.ChartDataSeries">
|
|
2663
2664
|
<Section class="'o-data-series'">
|
|
2664
2665
|
<t t-set-slot="title" t-esc="title"/>
|
|
@@ -2751,10 +2752,17 @@ https://fontawesome.com/license -->
|
|
|
2751
2752
|
|
|
2752
2753
|
<t t-name="o-spreadsheet-ComboChartDesignPanel">
|
|
2753
2754
|
<div>
|
|
2754
|
-
<
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2755
|
+
<Section class="'o-chart-background-color'">
|
|
2756
|
+
<t t-set-slot="title">Background color</t>
|
|
2757
|
+
<div class="d-flex align-items-center">
|
|
2758
|
+
<span class="me-2">Select a color...</span>
|
|
2759
|
+
<RoundColorPicker
|
|
2760
|
+
currentColor="props.definition.background"
|
|
2761
|
+
onColorPicked.bind="updateBackgroundColor"
|
|
2762
|
+
title="backgroundColorTitle"
|
|
2763
|
+
/>
|
|
2764
|
+
</div>
|
|
2765
|
+
</Section>
|
|
2758
2766
|
<ChartTitle title="title" update.bind="updateTitle"/>
|
|
2759
2767
|
<Section t-if="!props.definition.useBothYAxis">
|
|
2760
2768
|
<t t-set-slot="title">Vertical axis position</t>
|
|
@@ -2800,10 +2808,17 @@ https://fontawesome.com/license -->
|
|
|
2800
2808
|
|
|
2801
2809
|
<t t-name="o-spreadsheet-GaugeChartDesignPanel">
|
|
2802
2810
|
<div>
|
|
2803
|
-
<
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2811
|
+
<Section class="'o-chart-background-color'">
|
|
2812
|
+
<t t-set-slot="title">Background color</t>
|
|
2813
|
+
<div class="d-flex align-items-center">
|
|
2814
|
+
<span class="me-2">Select a color...</span>
|
|
2815
|
+
<RoundColorPicker
|
|
2816
|
+
currentColor="props.definition.background"
|
|
2817
|
+
onColorPicked.bind="updateBackgroundColor"
|
|
2818
|
+
title="backgroundColorTitle"
|
|
2819
|
+
/>
|
|
2820
|
+
</div>
|
|
2821
|
+
</Section>
|
|
2807
2822
|
<ChartTitle title="title" update.bind="updateTitle"/>
|
|
2808
2823
|
<Section>
|
|
2809
2824
|
<t t-set-slot="title">Range</t>
|
|
@@ -2868,12 +2883,9 @@ https://fontawesome.com/license -->
|
|
|
2868
2883
|
|
|
2869
2884
|
<tr>
|
|
2870
2885
|
<td>
|
|
2871
|
-
<
|
|
2886
|
+
<RoundColorPicker
|
|
2872
2887
|
currentColor="sectionRule.colors.upperColor"
|
|
2873
|
-
toggleColorPicker="(ev) => this.toggleMenu('sectionColor-upperColor', ev)"
|
|
2874
|
-
showColorPicker="state.openedMenu === 'sectionColor-upperColor'"
|
|
2875
2888
|
onColorPicked="(color) => this.updateSectionColor('upperColor', color)"
|
|
2876
|
-
icon="'o-spreadsheet-Icon.FILL_COLOR'"
|
|
2877
2889
|
/>
|
|
2878
2890
|
</td>
|
|
2879
2891
|
<td>Else</td>
|
|
@@ -2888,12 +2900,9 @@ https://fontawesome.com/license -->
|
|
|
2888
2900
|
<t t-name="o-spreadsheet-GaugeChartColorSectionTemplateRow">
|
|
2889
2901
|
<tr>
|
|
2890
2902
|
<td>
|
|
2891
|
-
<
|
|
2903
|
+
<RoundColorPicker
|
|
2892
2904
|
currentColor="sectionColor"
|
|
2893
|
-
toggleColorPicker="(ev) => this.toggleMenu('sectionColor-'+sectionType, ev)"
|
|
2894
|
-
showColorPicker="state.openedMenu === 'sectionColor-'+sectionType"
|
|
2895
2905
|
onColorPicked="(color) => this.updateSectionColor(sectionType, color)"
|
|
2896
|
-
icon="'o-spreadsheet-Icon.FILL_COLOR'"
|
|
2897
2906
|
/>
|
|
2898
2907
|
</td>
|
|
2899
2908
|
<td>When value is below</td>
|
|
@@ -2921,7 +2930,7 @@ https://fontawesome.com/license -->
|
|
|
2921
2930
|
</tr>
|
|
2922
2931
|
</t>
|
|
2923
2932
|
|
|
2924
|
-
<t t-name="o-spreadsheet-
|
|
2933
|
+
<t t-name="o-spreadsheet-GenericChartConfigPanel">
|
|
2925
2934
|
<div>
|
|
2926
2935
|
<ChartDataSeries
|
|
2927
2936
|
ranges="this.getDataSeriesRanges()"
|
|
@@ -2948,12 +2957,19 @@ https://fontawesome.com/license -->
|
|
|
2948
2957
|
</div>
|
|
2949
2958
|
</t>
|
|
2950
2959
|
|
|
2951
|
-
<t t-name="o-spreadsheet-
|
|
2960
|
+
<t t-name="o-spreadsheet-GenericChartDesignPanel">
|
|
2952
2961
|
<div>
|
|
2953
|
-
<
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2962
|
+
<Section class="'o-chart-background-color'">
|
|
2963
|
+
<t t-set-slot="title">Background color</t>
|
|
2964
|
+
<div class="d-flex align-items-center">
|
|
2965
|
+
<span class="me-2">Select a color...</span>
|
|
2966
|
+
<RoundColorPicker
|
|
2967
|
+
currentColor="props.definition.background"
|
|
2968
|
+
onColorPicked.bind="updateBackgroundColor"
|
|
2969
|
+
title="backgroundColorTitle"
|
|
2970
|
+
/>
|
|
2971
|
+
</div>
|
|
2972
|
+
</Section>
|
|
2957
2973
|
<ChartTitle title="title" update.bind="updateTitle"/>
|
|
2958
2974
|
<Section>
|
|
2959
2975
|
<t t-set-slot="title">Legend position</t>
|
|
@@ -3014,10 +3030,17 @@ https://fontawesome.com/license -->
|
|
|
3014
3030
|
|
|
3015
3031
|
<t t-name="o-spreadsheet-LineChartDesignPanel">
|
|
3016
3032
|
<div>
|
|
3017
|
-
<
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3033
|
+
<Section class="'o-chart-background-color'">
|
|
3034
|
+
<t t-set-slot="title">Background color</t>
|
|
3035
|
+
<div class="d-flex align-items-center">
|
|
3036
|
+
<span class="me-2">Select a color...</span>
|
|
3037
|
+
<RoundColorPicker
|
|
3038
|
+
currentColor="props.definition.background"
|
|
3039
|
+
onColorPicked.bind="updateBackgroundColor"
|
|
3040
|
+
title="backgroundColorTitle"
|
|
3041
|
+
/>
|
|
3042
|
+
</div>
|
|
3043
|
+
</Section>
|
|
3021
3044
|
<ChartTitle title="title" update.bind="updateTitle"/>
|
|
3022
3045
|
<Section>
|
|
3023
3046
|
<t t-set-slot="title">Vertical axis position</t>
|
|
@@ -3163,6 +3186,7 @@ https://fontawesome.com/license -->
|
|
|
3163
3186
|
<option value="text">Absolute value</option>
|
|
3164
3187
|
<option value="difference">Value change from key value</option>
|
|
3165
3188
|
<option value="percentage">Percentage change from key value</option>
|
|
3189
|
+
<option value="progress">Progress bar</option>
|
|
3166
3190
|
</select>
|
|
3167
3191
|
</Section>
|
|
3168
3192
|
|
|
@@ -3174,10 +3198,17 @@ https://fontawesome.com/license -->
|
|
|
3174
3198
|
<t t-set="color_up">Color Up</t>
|
|
3175
3199
|
<t t-set="color_down">Color Down</t>
|
|
3176
3200
|
<div>
|
|
3177
|
-
<
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3201
|
+
<Section class="'o-chart-background-color'">
|
|
3202
|
+
<t t-set-slot="title">Background color</t>
|
|
3203
|
+
<div class="d-flex align-items-center">
|
|
3204
|
+
<span class="me-2">Select a color...</span>
|
|
3205
|
+
<RoundColorPicker
|
|
3206
|
+
currentColor="props.definition.background"
|
|
3207
|
+
onColorPicked="(color) => this.setColor(color, 'backgroundColor')"
|
|
3208
|
+
title="backgroundColorTitle"
|
|
3209
|
+
/>
|
|
3210
|
+
</div>
|
|
3211
|
+
</Section>
|
|
3181
3212
|
<ChartTitle title="title" update.bind="updateTitle"/>
|
|
3182
3213
|
<Section>
|
|
3183
3214
|
<t t-set-slot="title">Baseline description</t>
|
|
@@ -3190,30 +3221,120 @@ https://fontawesome.com/license -->
|
|
|
3190
3221
|
</Section>
|
|
3191
3222
|
</div>
|
|
3192
3223
|
<Section class="'o-chart-baseline-color'">
|
|
3193
|
-
<t t-set-slot="title"
|
|
3194
|
-
<div class="d-flex align-items-center">
|
|
3195
|
-
<
|
|
3196
|
-
<ColorPickerWidget
|
|
3224
|
+
<t t-set-slot="title" t-esc="colorsSectionTitle"/>
|
|
3225
|
+
<div class="d-flex align-items-center mb-2">
|
|
3226
|
+
<RoundColorPicker
|
|
3197
3227
|
currentColor="props.definition.baselineColorUp"
|
|
3198
|
-
toggleColorPicker="() => this.toggleColorPicker('baselineColorUp')"
|
|
3199
|
-
showColorPicker="state.openedColorPicker === 'baselineColorUp'"
|
|
3200
3228
|
onColorPicked="(color) => this.setColor(color, 'baselineColorUp')"
|
|
3201
3229
|
title="color_up"
|
|
3202
|
-
icon="'o-spreadsheet-Icon.FILL_COLOR'"
|
|
3203
3230
|
/>
|
|
3231
|
+
<span class="ps-2">Color on value increase</span>
|
|
3204
3232
|
</div>
|
|
3205
3233
|
<div class="d-flex align-items-center">
|
|
3206
|
-
<
|
|
3207
|
-
<ColorPickerWidget
|
|
3234
|
+
<RoundColorPicker
|
|
3208
3235
|
currentColor="props.definition.baselineColorDown"
|
|
3209
|
-
toggleColorPicker="() => this.toggleColorPicker('baselineColorDown')"
|
|
3210
|
-
showColorPicker="state.openedColorPicker === 'baselineColorDown'"
|
|
3211
3236
|
onColorPicked="(color) => this.setColor(color, 'baselineColorDown')"
|
|
3212
3237
|
title="color_down"
|
|
3213
|
-
icon="'o-spreadsheet-Icon.FILL_COLOR'"
|
|
3214
3238
|
/>
|
|
3239
|
+
<span class="ps-2">Color on value decrease</span>
|
|
3215
3240
|
</div>
|
|
3216
3241
|
</Section>
|
|
3242
|
+
<Section class="'pt-1'">
|
|
3243
|
+
<t t-set-slot="title">Number formatting</t>
|
|
3244
|
+
<Checkbox
|
|
3245
|
+
name="'humanizeNumbers'"
|
|
3246
|
+
label="humanizeNumbersLabel"
|
|
3247
|
+
value="props.definition.humanize"
|
|
3248
|
+
onChange.bind="updateHumanizeNumbers"
|
|
3249
|
+
/>
|
|
3250
|
+
</Section>
|
|
3251
|
+
</t>
|
|
3252
|
+
|
|
3253
|
+
<t t-name="o-spreadsheet-WaterfallChartDesignPanel">
|
|
3254
|
+
<div>
|
|
3255
|
+
<Section class="'o-chart-background-color'">
|
|
3256
|
+
<t t-set-slot="title">Background color</t>
|
|
3257
|
+
<div class="d-flex align-items-center">
|
|
3258
|
+
<span class="me-2">Select a color...</span>
|
|
3259
|
+
<RoundColorPicker
|
|
3260
|
+
currentColor="props.definition.background"
|
|
3261
|
+
onColorPicked="(color) => this.updateColor('background', color)"
|
|
3262
|
+
/>
|
|
3263
|
+
</div>
|
|
3264
|
+
</Section>
|
|
3265
|
+
<ChartTitle title="title" update.bind="updateTitle"/>
|
|
3266
|
+
<Section>
|
|
3267
|
+
<t t-set-slot="title">Vertical axis position</t>
|
|
3268
|
+
<select
|
|
3269
|
+
t-att-value="props.definition.verticalAxisPosition"
|
|
3270
|
+
class="o-input o-chart-vertical-axis-position"
|
|
3271
|
+
t-on-change="(ev) => this.updateSelect('verticalAxisPosition', ev)">
|
|
3272
|
+
<option value="left">Left</option>
|
|
3273
|
+
<option value="right">Right</option>
|
|
3274
|
+
</select>
|
|
3275
|
+
</Section>
|
|
3276
|
+
<Section>
|
|
3277
|
+
<t t-set-slot="title">Legend position</t>
|
|
3278
|
+
<select
|
|
3279
|
+
t-att-value="props.definition.legendPosition"
|
|
3280
|
+
class="o-input o-chart-legend-position"
|
|
3281
|
+
t-on-change="(ev) => this.updateSelect('legendPosition', ev)">
|
|
3282
|
+
<option value="none">None</option>
|
|
3283
|
+
<option value="top">Top</option>
|
|
3284
|
+
<option value="bottom">Bottom</option>
|
|
3285
|
+
<option value="left">Left</option>
|
|
3286
|
+
<option value="right">Right</option>
|
|
3287
|
+
</select>
|
|
3288
|
+
</Section>
|
|
3289
|
+
<Section>
|
|
3290
|
+
<t t-set-slot="title">Waterfall options</t>
|
|
3291
|
+
<t t-set="firstValueAsSubtotal">Use first value as subtotal</t>
|
|
3292
|
+
<Checkbox
|
|
3293
|
+
name="'firstValueAsSubtotal'"
|
|
3294
|
+
label="firstValueAsSubtotal"
|
|
3295
|
+
value="props.definition.firstValueAsSubtotal"
|
|
3296
|
+
onChange.bind="onUpdateFirstValueAsSubtotal"
|
|
3297
|
+
/>
|
|
3298
|
+
<t t-set="showSubTotalsLabel">Show subtotals at the end of series</t>
|
|
3299
|
+
<Checkbox
|
|
3300
|
+
name="'showSubTotals'"
|
|
3301
|
+
label="showSubTotalsLabel"
|
|
3302
|
+
value="props.definition.showSubTotals"
|
|
3303
|
+
onChange.bind="onUpdateShowSubTotals"
|
|
3304
|
+
/>
|
|
3305
|
+
<t t-set="showConnectorLinesLabel">Show connector lines</t>
|
|
3306
|
+
<Checkbox
|
|
3307
|
+
name="'showConnectorLines'"
|
|
3308
|
+
label="showConnectorLinesLabel"
|
|
3309
|
+
value="props.definition.showConnectorLines"
|
|
3310
|
+
onChange.bind="onUpdateShowConnectorLines"
|
|
3311
|
+
/>
|
|
3312
|
+
</Section>
|
|
3313
|
+
<Section>
|
|
3314
|
+
<t t-set-slot="title">Waterfall colors</t>
|
|
3315
|
+
<div class="o-waterfall-positive-color d-flex align-items-center mb-1">
|
|
3316
|
+
<RoundColorPicker
|
|
3317
|
+
currentColor="positiveValuesColor"
|
|
3318
|
+
onColorPicked="(color) => this.updateColor('positiveValuesColor', color)"
|
|
3319
|
+
/>
|
|
3320
|
+
<span class="ps-2">Color of positive values</span>
|
|
3321
|
+
</div>
|
|
3322
|
+
<div class="o-waterfall-negative-color d-flex align-items-center mb-1">
|
|
3323
|
+
<RoundColorPicker
|
|
3324
|
+
currentColor="negativeValuesColor"
|
|
3325
|
+
onColorPicked="(color) => this.updateColor('negativeValuesColor', color)"
|
|
3326
|
+
/>
|
|
3327
|
+
<span class="ps-2">Color of negative values</span>
|
|
3328
|
+
</div>
|
|
3329
|
+
<div class="o-waterfall-subtotal-color d-flex align-items-center">
|
|
3330
|
+
<RoundColorPicker
|
|
3331
|
+
currentColor="subTotalValuesColor"
|
|
3332
|
+
onColorPicked="(color) => this.updateColor('subTotalValuesColor', color)"
|
|
3333
|
+
/>
|
|
3334
|
+
<span class="ps-2">Color of subtotals</span>
|
|
3335
|
+
</div>
|
|
3336
|
+
</Section>
|
|
3337
|
+
</div>
|
|
3217
3338
|
</t>
|
|
3218
3339
|
|
|
3219
3340
|
<t t-name="o-spreadsheet.Checkbox">
|
|
@@ -3234,6 +3355,22 @@ https://fontawesome.com/license -->
|
|
|
3234
3355
|
</label>
|
|
3235
3356
|
</t>
|
|
3236
3357
|
|
|
3358
|
+
<t t-name="o-spreadsheet.RoundColorPicker">
|
|
3359
|
+
<div
|
|
3360
|
+
class="o-round-color-picker-button rounded-circle"
|
|
3361
|
+
t-ref="colorPickerButton"
|
|
3362
|
+
t-on-click.stop="togglePicker"
|
|
3363
|
+
t-att-title="props.title"
|
|
3364
|
+
t-att-style="buttonStyle"
|
|
3365
|
+
/>
|
|
3366
|
+
<ColorPicker
|
|
3367
|
+
t-if="state.pickerOpened"
|
|
3368
|
+
anchorRect="colorPickerAnchorRect"
|
|
3369
|
+
onColorPicked.bind="onColorPicked"
|
|
3370
|
+
currentColor="props.currentColor"
|
|
3371
|
+
/>
|
|
3372
|
+
</t>
|
|
3373
|
+
|
|
3237
3374
|
<t t-name="o_spreadsheet.Section">
|
|
3238
3375
|
<div class="o-section" t-att-class="props.class">
|
|
3239
3376
|
<t t-if="props.slots.title">
|
|
@@ -3468,19 +3605,22 @@ https://fontawesome.com/license -->
|
|
|
3468
3605
|
type="text"
|
|
3469
3606
|
class="o-input o-threshold-value o-required"
|
|
3470
3607
|
t-model="rule[thresholdType].value"
|
|
3471
|
-
t-att-class="{ 'o-invalid': isValueInvalid(thresholdType) }"
|
|
3608
|
+
t-att-class="{ 'o-invalid': isValueInvalid(thresholdType), 'invisible': threshold === undefined }"
|
|
3472
3609
|
t-if="threshold !== undefined and threshold.type !== 'value'"
|
|
3473
3610
|
/>
|
|
3474
|
-
<input
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
onColorPicked="(color) => this.setColorScaleColor(thresholdType, color)"
|
|
3480
|
-
title="fill_color"
|
|
3481
|
-
icon="'o-spreadsheet-Icon.FILL_COLOR'"
|
|
3482
|
-
disabled="threshold === undefined"
|
|
3611
|
+
<input
|
|
3612
|
+
type="text"
|
|
3613
|
+
t-attf-class="o-input o-threshold-value {{ threshold === undefined ? 'invisible' : ''}}"
|
|
3614
|
+
t-else=""
|
|
3615
|
+
disabled="1"
|
|
3483
3616
|
/>
|
|
3617
|
+
<div t-attf-class="flex-shrink-0 ms-1 {{ threshold === undefined ? 'invisible' : ''}}">
|
|
3618
|
+
<RoundColorPicker
|
|
3619
|
+
currentColor="getThresholdColor(threshold)"
|
|
3620
|
+
onColorPicked="(color) => this.setColorScaleColor(thresholdType, color)"
|
|
3621
|
+
title="fill_color"
|
|
3622
|
+
/>
|
|
3623
|
+
</div>
|
|
3484
3624
|
</div>
|
|
3485
3625
|
</t>
|
|
3486
3626
|
|
|
@@ -4428,6 +4568,14 @@ https://fontawesome.com/license -->
|
|
|
4428
4568
|
/>
|
|
4429
4569
|
</t>
|
|
4430
4570
|
|
|
4571
|
+
<t t-name="o-spreadsheet-TableResizer">
|
|
4572
|
+
<div
|
|
4573
|
+
class="o-table-resizer position-absolute"
|
|
4574
|
+
t-att-style="containerStyle"
|
|
4575
|
+
t-on-pointerdown="onMouseDown"
|
|
4576
|
+
/>
|
|
4577
|
+
</t>
|
|
4578
|
+
|
|
4431
4579
|
<t t-name="o-spreadsheet-TableStylePicker">
|
|
4432
4580
|
<div class="o-table-style-picker d-flex flew-row justify-content-between ps-1">
|
|
4433
4581
|
<div class="d-flex flex-row overflow-hidden">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odoo/o-spreadsheet",
|
|
3
|
-
"version": "17.3.0-alpha.
|
|
3
|
+
"version": "17.3.0-alpha.4",
|
|
4
4
|
"description": "A spreadsheet component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/o-spreadsheet.cjs.js",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"dependencies": {
|
|
103
103
|
"@odoo/owl": "2.2.10",
|
|
104
104
|
"bootstrap": "^5.1.3",
|
|
105
|
+
"font-awesome": "^4.7.0",
|
|
105
106
|
"rbush": "^3.0.1"
|
|
106
107
|
},
|
|
107
108
|
"jest": {
|