@odoo/o-spreadsheet 18.1.0-alpha.1 → 18.1.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 18.1.0-alpha.1
5
- @date 2024-10-14T07:54:16.437Z
6
- @hash e9ce3aa
4
+ @version 18.1.0-alpha.3
5
+ @date 2024-11-08T12:19:23.924Z
6
+ @hash 96dcfab
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ActionButton">
@@ -2653,7 +2653,7 @@
2653
2653
  <Section class="'pt-0'">
2654
2654
  <Checkbox
2655
2655
  name="'stacked'"
2656
- label="chartTerms.StackedBarChart"
2656
+ label="stackedLabel"
2657
2657
  value="props.definition.stacked"
2658
2658
  onChange.bind="onUpdateStacked"
2659
2659
  />
@@ -2697,8 +2697,7 @@
2697
2697
  </t>
2698
2698
 
2699
2699
  <t t-name="o-spreadsheet.ChartDataSeries">
2700
- <Section class="'o-data-series'">
2701
- <t t-set-slot="title" t-esc="title"/>
2700
+ <Section class="'o-data-series'" title="title">
2702
2701
  <SelectionInput
2703
2702
  ranges="ranges"
2704
2703
  required="true"
@@ -2718,11 +2717,9 @@
2718
2717
 
2719
2718
  <t t-name="o-spreadsheet-GeneralDesignEditor">
2720
2719
  <t t-set="chart_title">Chart title</t>
2721
- <SidePanelCollapsible collapsedAtInit="false">
2722
- <t t-set-slot="title">General</t>
2720
+ <SidePanelCollapsible collapsedAtInit="false" title.translate="General">
2723
2721
  <t t-set-slot="content">
2724
- <Section class="'o-chart-background-color pt-0 pb-0'">
2725
- <t t-set-slot="title">Background color</t>
2722
+ <Section class="'o-chart-background-color pt-0 pb-0'" title.translate="Background color">
2726
2723
  <RoundColorPicker
2727
2724
  currentColor="props.definition.background"
2728
2725
  onColorPicked.bind="updateBackgroundColor"
@@ -2763,8 +2760,7 @@
2763
2760
  </t>
2764
2761
 
2765
2762
  <t t-name="o-spreadsheet.ChartLabelRange">
2766
- <Section class="'o-data-labels'">
2767
- <t t-set-slot="title" t-esc="props.title"/>
2763
+ <Section class="'o-data-labels'" title="props.title">
2768
2764
  <SelectionInput
2769
2765
  ranges="[props.range]"
2770
2766
  isInvalid="props.isInvalid"
@@ -2784,13 +2780,158 @@
2784
2780
  </Section>
2785
2781
  </t>
2786
2782
 
2783
+ <t t-name="o-spreadsheet-ChartLegend">
2784
+ <Section class="'pt-0'" title.translate="Legend position">
2785
+ <select
2786
+ t-att-value="props.definition.legendPosition ?? 'top'"
2787
+ class="o-input o-chart-legend-position"
2788
+ t-on-change="this.updateLegendPosition">
2789
+ <option value="none">None</option>
2790
+ <option value="top">Top</option>
2791
+ <option value="bottom">Bottom</option>
2792
+ <option value="left">Left</option>
2793
+ <option value="right">Right</option>
2794
+ </select>
2795
+ </Section>
2796
+ </t>
2797
+
2798
+ <t t-name="o-spreadsheet-SeriesDesignEditor">
2799
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Data Series">
2800
+ <t t-set-slot="content">
2801
+ <Section class="'pt-0 pb-0'">
2802
+ <select
2803
+ class="o-input data-series-selector"
2804
+ t-model="state.label"
2805
+ t-on-change="(ev) => this.updateSerieEditor(ev)">
2806
+ <t t-foreach="getDataSeries()" t-as="serie" t-key="serie_index">
2807
+ <option
2808
+ t-att-value="serie"
2809
+ t-att-selected="state.index === serie_index"
2810
+ t-esc="serie"
2811
+ />
2812
+ </t>
2813
+ </select>
2814
+ <Section class="'px-0'">
2815
+ <div class="d-flex align-items-center">
2816
+ <span class="o-section-title mb-0 pe-2">Series color</span>
2817
+ <RoundColorPicker
2818
+ currentColor="getDataSerieColor()"
2819
+ onColorPicked.bind="updateDataSeriesColor"
2820
+ />
2821
+ </div>
2822
+ </Section>
2823
+ <Section class="'pt-0 px-0'" title.translate="Series name">
2824
+ <input
2825
+ class="o-input o-serie-label-editor"
2826
+ type="text"
2827
+ t-att-value="getDataSerieLabel()"
2828
+ t-on-change="(ev) => this.updateDataSeriesLabel(ev)"
2829
+ />
2830
+ </Section>
2831
+ </Section>
2832
+ <t t-slot="data-series-extension" index="state.index"/>
2833
+ </t>
2834
+ </SidePanelCollapsible>
2835
+ </t>
2836
+
2837
+ <t t-name="o-spreadsheet-SeriesWithAxisDesignEditor">
2838
+ <SeriesDesignEditor t-props="props">
2839
+ <t t-set-slot="data-series-extension" t-slot-scope="scope">
2840
+ <t t-set="index" t-value="scope.index"/>
2841
+ <t t-slot="general-extension" index="index"/>
2842
+ <Section class="'pt-0 pb-0'">
2843
+ <Section
2844
+ class="'pt-0 px-0 o-vertical-axis-selection'"
2845
+ t-if="canHaveTwoVerticalAxis"
2846
+ title.translate="Vertical axis">
2847
+ <RadioSelection
2848
+ choices="axisChoices"
2849
+ selectedValue="getDataSerieAxis(index)"
2850
+ name="'axis'"
2851
+ onChange="(value) => this.updateDataSeriesAxis(index, value)"
2852
+ />
2853
+ </Section>
2854
+ <Section
2855
+ class="'pt-0 px-0 o-show-trend-line'"
2856
+ t-if="!props.definition.horizontal"
2857
+ title.translate="Trend line">
2858
+ <t t-set="showTrendLineLabel">Show trend line</t>
2859
+ <t t-set="trend" t-value="getTrendLineConfiguration(index)"/>
2860
+ <t t-set="trendType" t-value="getTrendType(trend)"/>
2861
+ <Checkbox
2862
+ name="'showTrendLine'"
2863
+ label="showTrendLineLabel"
2864
+ value="trend !== undefined and trend.display"
2865
+ onChange="(display) => this.toggleDataTrend(index, display)"
2866
+ />
2867
+ <div t-if="trend !== undefined and trend.display">
2868
+ <div class="d-flex py-2">
2869
+ <div class="w-100">
2870
+ <span class="o-section-subtitle">Type</span>
2871
+ <select
2872
+ class="o-input trend-type-selector"
2873
+ t-on-change="(ev) => this.onChangeTrendType(index, ev)">
2874
+ <option value="linear" t-att-selected="trendType === 'linear'">Linear</option>
2875
+ <option value="exponential" t-att-selected="trendType === 'exponential'">
2876
+ Exponential
2877
+ </option>
2878
+ <option value="polynomial" t-att-selected="trendType === 'polynomial'">
2879
+ Polynomial
2880
+ </option>
2881
+ <option value="logarithmic" t-att-selected="trendType === 'logarithmic'">
2882
+ Logarithmic
2883
+ </option>
2884
+ <option
2885
+ value="trailingMovingAverage"
2886
+ t-att-selected="trendType === 'trailingMovingAverage'">
2887
+ Trailing moving average
2888
+ </option>
2889
+ </select>
2890
+ </div>
2891
+ <div class="w-50 ms-3" t-if="trendType === 'trailingMovingAverage'">
2892
+ <span class="o-section-subtitle">Window</span>
2893
+ <input
2894
+ t-att-value="trend.window || this.defaultWindowSize"
2895
+ type="number"
2896
+ class="w-100 o-input trend-window-input"
2897
+ t-on-change="(ev) => this.onChangeMovingAverageWindow(index, ev)"
2898
+ />
2899
+ </div>
2900
+ <div class="w-50 ms-3" t-if="trendType === 'polynomial'">
2901
+ <span class="o-section-subtitle">Degree</span>
2902
+ <select
2903
+ t-att-value="trend.order"
2904
+ class="o-input trend-order-input"
2905
+ t-on-change="(ev) => this.onChangePolynomialDegree(index, ev)">
2906
+ <t t-foreach="getPolynomialDegrees(index)" t-as="degree" t-key="degree">
2907
+ <option t-att-value="degree">
2908
+ <t t-esc="degree"/>
2909
+ </option>
2910
+ </t>
2911
+ </select>
2912
+ </div>
2913
+ </div>
2914
+ <div class="d-flex align-items-center">
2915
+ <span class="o-section-subtitle my-0 pe-2">Trend line color</span>
2916
+ <RoundColorPicker
2917
+ currentColor="getTrendLineColor(index)"
2918
+ onColorPicked="(ev) => this.updateTrendLineColor(index, ev)"
2919
+ />
2920
+ </div>
2921
+ </div>
2922
+ </Section>
2923
+ </Section>
2924
+ </t>
2925
+ </SeriesDesignEditor>
2926
+ </t>
2927
+
2787
2928
  <t t-name="o-spreadsheet.ChartTitle">
2788
2929
  <t t-set="placeholder">Add a title</t>
2789
- <Section class="'o-chart-title'">
2790
- <t t-set-slot="title">
2791
- <t t-if="props.name" t-esc="props.name"/>
2792
- <t t-else="">Title</t>
2793
- </t>
2930
+ <t t-set="title">
2931
+ <t t-if="props.name" t-esc="props.name"/>
2932
+ <t t-else="">Title</t>
2933
+ </t>
2934
+ <Section class="'o-chart-title'" title="title.toString()">
2794
2935
  <input
2795
2936
  type="text"
2796
2937
  class="o-input"
@@ -3086,11 +3227,36 @@
3086
3227
  <path fill="#444" d="M23,2 v43 h1 v-43 M2,45 h44 v1 h-44"/>
3087
3228
  </svg>
3088
3229
  </t>
3230
+ <t t-name="o-spreadsheet-ChartPreview.RADAR_CHART">
3231
+ <svg viewBox="0 0 48 48" class="o-chart-preview" xmlns="http://www.w3.org/2000/svg">
3232
+ <path fill="none" stroke="#0074d9" d="m24 16 14.27 3.36-1.93 21.63-18.22-8.9-3.63-11.18Z"/>
3233
+ <path fill="none" stroke="#eb6d00" d="m24 4 7.61 17.53-4.67 6.52-12.34 8.89-7.72-18.5Z"/>
3234
+ <path
3235
+ fill="none"
3236
+ stroke="#444"
3237
+ d="M24 2v22l20.92-6.8L24 24l12.93 17.8L24 24 11.07 41.8 24 24 3.08 17.2"
3238
+ />
3239
+ </svg>
3240
+ </t>
3241
+ <t t-name="o-spreadsheet-ChartPreview.FILLED_RADAR_CHART">
3242
+ <svg viewBox="0 0 48 48" class="o-chart-preview" xmlns="http://www.w3.org/2000/svg">
3243
+ <path
3244
+ fill="#0074d944"
3245
+ stroke="#0074d9"
3246
+ d="m24 16 14.27 3.36-1.93 21.63-18.22-8.9-3.63-11.18Z"
3247
+ />
3248
+ <path fill="#eb6d0044" stroke="#eb6d00" d="m24 4 7.61 17.53-4.67 6.52-12.34 8.89-7.72-18.5Z"/>
3249
+ <path
3250
+ fill="none"
3251
+ stroke="#444"
3252
+ d="M24 2v22l20.92-6.8L24 24l12.93 17.8L24 24 11.07 41.8 24 24 3.08 17.2"
3253
+ />
3254
+ </svg>
3255
+ </t>
3089
3256
 
3090
3257
  <t t-name="o-spreadsheet-ChartTypePicker">
3091
3258
  <t t-set="selectedChartProperties" t-value="getSelectedChartSubtypeProperties()"/>
3092
- <Section>
3093
- <t t-set-slot="title">Chart type</t>
3259
+ <Section title.translate="Chart type">
3094
3260
  <div class="position-relative">
3095
3261
  <select
3096
3262
  class="o-input o-type-selector"
@@ -3141,21 +3307,12 @@
3141
3307
  definition="props.definition"
3142
3308
  updateChart="props.updateChart">
3143
3309
  <t t-set-slot="general-extension">
3144
- <Section class="'pt-0'">
3145
- <t t-set-slot="title">Legend position</t>
3146
- <select
3147
- t-att-value="props.definition.legendPosition ?? 'top'"
3148
- class="o-input"
3149
- t-on-change="this.updateLegendPosition">
3150
- <option value="none">None</option>
3151
- <option value="top">Top</option>
3152
- <option value="bottom">Bottom</option>
3153
- <option value="left">Left</option>
3154
- <option value="right">Right</option>
3155
- </select>
3156
- </Section>
3157
- <Section class="'pt-0'">
3158
- <t t-set-slot="title">Values</t>
3310
+ <ChartLegend
3311
+ figureId="props.figureId"
3312
+ definition="props.definition"
3313
+ updateChart="props.updateChart"
3314
+ />
3315
+ <Section class="'pt-0'" title.translate="Values">
3159
3316
  <Checkbox
3160
3317
  name="'showValues'"
3161
3318
  label.translate="Show values"
@@ -3165,102 +3322,8 @@
3165
3322
  </Section>
3166
3323
  </t>
3167
3324
  </GeneralDesignEditor>
3168
- <SidePanelCollapsible collapsedAtInit="true">
3169
- <t t-set-slot="title">Data series</t>
3170
- <t t-set-slot="content">
3171
- <Section class="'pt-0 pb-0'">
3172
- <select
3173
- class="o-input data-series-selector"
3174
- t-model="state.label"
3175
- t-on-change="(ev) => this.updateSerieEditor(ev)">
3176
- <t t-foreach="getDataSeries()" t-as="serie" t-key="serie_index">
3177
- <option
3178
- t-att-value="serie"
3179
- t-att-selected="state.index === serie_index"
3180
- t-esc="serie"
3181
- />
3182
- </t>
3183
- </select>
3184
- <Section class="'px-0'">
3185
- <div class="d-flex align-items-center">
3186
- <t t-set-slot="title">Series color</t>
3187
- <RoundColorPicker
3188
- currentColor="getDataSerieColor()"
3189
- onColorPicked.bind="updateDataSeriesColor"
3190
- />
3191
- </div>
3192
- </Section>
3193
- <Section class="'pt-0 px-0 o-vertical-axis-selection'" t-if="canHaveTwoVerticalAxis">
3194
- <t t-set-slot="title">Vertical axis</t>
3195
- <RadioSelection
3196
- choices="axisChoices"
3197
- selectedValue="getDataSerieAxis()"
3198
- name="'axis'"
3199
- onChange.bind="updateDataSeriesAxis"
3200
- />
3201
- </Section>
3202
- <Section class="'pt-0 px-0'">
3203
- <t t-set-slot="title">Series name</t>
3204
- <input
3205
- class="o-input o-serie-label-editor"
3206
- type="text"
3207
- t-att-value="getDataSerieLabel()"
3208
- t-on-change="(ev) => this.updateDataSeriesLabel(ev)"
3209
- />
3210
- </Section>
3211
- <Section class="'pt-0 px-0 o-show-trend-line'" t-if="!props.definition.horizontal">
3212
- <t t-set-slot="title">Trend line</t>
3213
- <t t-set="showTrendLineLabel">Show trend line</t>
3214
- <t t-set="trend" t-value="getTrendLineConfiguration()"/>
3215
- <t t-set="trendType" t-value="getTrendType(trend)"/>
3216
- <Checkbox
3217
- name="'showTrendLine'"
3218
- label="showTrendLineLabel"
3219
- value="trend !== undefined and trend.display"
3220
- onChange.bind="toggleDataTrend"
3221
- />
3222
- <div t-if="trend !== undefined and trend.display">
3223
- <div class="d-flex py-2">
3224
- <div class="w-100">
3225
- <span class="o-section-subtitle">Type</span>
3226
- <select class="o-input trend-type-selector" t-on-change="this.onChangeTrendType">
3227
- <option value="linear" t-att-selected="trendType === 'linear'">Linear</option>
3228
- <option value="exponential" t-att-selected="trendType === 'exponential'">
3229
- Exponential
3230
- </option>
3231
- <option value="polynomial" t-att-selected="trendType === 'polynomial'">
3232
- Polynomial
3233
- </option>
3234
- <option value="logarithmic" t-att-selected="trendType === 'logarithmic'">
3235
- Logarithmic
3236
- </option>
3237
- </select>
3238
- </div>
3239
- <div class="w-50 ms-3" t-if="trendType === 'polynomial'">
3240
- <span class="o-section-subtitle">Degree</span>
3241
- <input
3242
- t-att-value="trend.order"
3243
- type="number"
3244
- class="w-100 o-input trend-order-input"
3245
- t-on-change="this.onChangePolynomialDegree"
3246
- min="1"
3247
- />
3248
- </div>
3249
- </div>
3250
- <div class="d-flex align-items-center">
3251
- <span class="o-section-subtitle my-0 pe-2">Trend line color</span>
3252
- <RoundColorPicker
3253
- currentColor="getTrendLineColor()"
3254
- onColorPicked.bind="updateTrendLineColor"
3255
- />
3256
- </div>
3257
- </div>
3258
- </Section>
3259
- </Section>
3260
- </t>
3261
- </SidePanelCollapsible>
3262
- <SidePanelCollapsible collapsedAtInit="true">
3263
- <t t-set-slot="title">Axes</t>
3325
+ <SeriesWithAxisDesignEditor t-props="props"/>
3326
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Axes">
3264
3327
  <t t-set-slot="content">
3265
3328
  <AxisDesignEditor
3266
3329
  axesList="axesList"
@@ -3297,135 +3360,35 @@
3297
3360
  definition="props.definition"
3298
3361
  updateChart="props.updateChart">
3299
3362
  <t t-set-slot="general-extension">
3300
- <Section class="'pt-0'">
3301
- <t t-set-slot="title">Legend position</t>
3302
- <select
3303
- t-att-value="props.definition.legendPosition ?? 'top'"
3304
- class="o-input"
3305
- t-on-change="this.updateLegendPosition">
3306
- <option value="none">None</option>
3307
- <option value="top">Top</option>
3308
- <option value="bottom">Bottom</option>
3309
- <option value="left">Left</option>
3310
- <option value="right">Right</option>
3311
- </select>
3312
- </Section>
3313
- <Section class="'pt-0'">
3314
- <t t-set-slot="title">Values</t>
3363
+ <ChartLegend
3364
+ figureId="props.figureId"
3365
+ definition="props.definition"
3366
+ updateChart="props.updateChart"
3367
+ />
3368
+ <Section class="'pt-0'" title.translate="Values">
3315
3369
  <Checkbox
3316
3370
  name="'showValues'"
3317
- label="showValuesLabel"
3371
+ label.translate="Show values"
3318
3372
  value="props.definition.showValues"
3319
3373
  onChange="showValues => props.updateChart(this.props.figureId, {showValues})"
3320
3374
  />
3321
3375
  </Section>
3322
3376
  </t>
3323
3377
  </GeneralDesignEditor>
3324
- <SidePanelCollapsible collapsedAtInit="true">
3325
- <t t-set-slot="title">Data series</t>
3326
- <t t-set-slot="content">
3327
- <Section class="'pt-0 pb-0'">
3328
- <select
3329
- class="o-input data-series-selector"
3330
- t-model="state.label"
3331
- t-on-change="(ev) => this.updateSerieEditor(ev)">
3332
- <t t-foreach="getDataSeries()" t-as="serie" t-key="serie_index">
3333
- <option
3334
- t-att-value="serie"
3335
- t-att-selected="state.index === serie_index"
3336
- t-esc="serie"
3337
- />
3338
- </t>
3339
- </select>
3340
- <Section class="'px-0'">
3341
- <div class="d-flex align-items-center">
3342
- <t t-set-slot="title">Series color</t>
3343
- <RoundColorPicker
3344
- currentColor="getDataSerieColor()"
3345
- onColorPicked.bind="updateDataSeriesColor"
3346
- />
3347
- </div>
3348
- </Section>
3349
- <Section class="'pt-0 px-0 o-vertical-axis-selection'" t-if="canHaveTwoVerticalAxis">
3350
- <t t-set-slot="title">Vertical axis</t>
3351
- <RadioSelection
3352
- choices="axisChoices"
3353
- selectedValue="getDataSerieAxis()"
3354
- name="'axis'"
3355
- onChange.bind="updateDataSeriesAxis"
3356
- />
3357
- </Section>
3358
- <Section class="'pt-0 px-0 o-series-type-selection'">
3359
- <t t-set-slot="title">Serie type</t>
3360
- <RadioSelection
3361
- choices="seriesTypeChoices"
3362
- selectedValue="getDataSeriesType()"
3363
- name="'seriesType'"
3364
- onChange.bind="updateDataSeriesType"
3365
- />
3366
- </Section>
3367
- <Section class="'pt-0 px-0'">
3368
- <t t-set-slot="title">Series name</t>
3369
- <input
3370
- class="o-input o-serie-label-editor"
3371
- type="text"
3372
- t-att-value="getDataSerieLabel()"
3373
- t-on-change="(ev) => this.updateDataSeriesLabel(ev)"
3374
- />
3375
- </Section>
3376
- <Section class="'pt-0 px-0 o-show-trend-line'" t-if="!props.definition.horizontal">
3377
- <t t-set-slot="title">Trend line</t>
3378
- <t t-set="showTrendLineLabel">Show trend line</t>
3379
- <t t-set="trend" t-value="getTrendLineConfiguration()"/>
3380
- <t t-set="trendType" t-value="getTrendType(trend)"/>
3381
- <Checkbox
3382
- name="'showTrendLine'"
3383
- label="showTrendLineLabel"
3384
- value="trend !== undefined and trend.display"
3385
- onChange.bind="toggleDataTrend"
3386
- />
3387
- <div t-if="trend !== undefined and trend.display">
3388
- <div class="d-flex py-2">
3389
- <div class="w-100">
3390
- <span class="o-section-subtitle">Type</span>
3391
- <select class="o-input trend-type-selector" t-on-change="this.onChangeTrendType">
3392
- <option value="linear" t-att-selected="trendType === 'linear'">Linear</option>
3393
- <option value="exponential" t-att-selected="trendType === 'exponential'">
3394
- Exponential
3395
- </option>
3396
- <option value="polynomial" t-att-selected="trendType === 'polynomial'">
3397
- Polynomial
3398
- </option>
3399
- <option value="logarithmic" t-att-selected="trendType === 'logarithmic'">
3400
- Logarithmic
3401
- </option>
3402
- </select>
3403
- </div>
3404
- <div class="w-50 ms-3" t-if="trendType === 'polynomial'">
3405
- <span class="o-section-subtitle">Degree</span>
3406
- <input
3407
- t-att-value="trend.order"
3408
- type="number"
3409
- class="w-100 o-input trend-order-input"
3410
- t-on-change="this.onChangePolynomialDegree"
3411
- min="1"
3412
- />
3413
- </div>
3414
- </div>
3415
- <div class="d-flex align-items-center">
3416
- <span class="o-section-subtitle my-0 pe-2">Trend line color</span>
3417
- <RoundColorPicker
3418
- currentColor="getTrendLineColor()"
3419
- onColorPicked.bind="updateTrendLineColor"
3420
- />
3421
- </div>
3422
- </div>
3423
- </Section>
3378
+ <SeriesWithAxisDesignEditor t-props="props">
3379
+ <t t-set-slot="general-extension" t-slot-scope="scope">
3380
+ <t t-set="index" t-value="scope.index"/>
3381
+ <Section class="'pt-0 o-series-type-selection'" title.translate="Serie type">
3382
+ <RadioSelection
3383
+ choices="seriesTypeChoices"
3384
+ selectedValue="getDataSeriesType(index)"
3385
+ name="'seriesType'"
3386
+ onChange="(type) => this.updateDataSeriesType(index, type)"
3387
+ />
3424
3388
  </Section>
3425
3389
  </t>
3426
- </SidePanelCollapsible>
3427
- <SidePanelCollapsible collapsedAtInit="true">
3428
- <t t-set-slot="title">Axes</t>
3390
+ </SeriesWithAxisDesignEditor>
3391
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Axes">
3429
3392
  <t t-set-slot="content">
3430
3393
  <AxisDesignEditor
3431
3394
  axesList="axesList"
@@ -3459,11 +3422,9 @@
3459
3422
  definition="props.definition"
3460
3423
  updateChart="props.updateChart"
3461
3424
  />
3462
- <SidePanelCollapsible collapsedAtInit="false">
3463
- <t t-set-slot="title">Gauge Design</t>
3425
+ <SidePanelCollapsible collapsedAtInit="false" title.translate="Gauge Design">
3464
3426
  <t t-set-slot="content">
3465
- <Section class="'pt-0'">
3466
- <t t-set-slot="title">Range</t>
3427
+ <Section class="'pt-0'" title.translate="Range">
3467
3428
  <div class="o-subsection-left">
3468
3429
  <input
3469
3430
  type="text"
@@ -3486,8 +3447,7 @@
3486
3447
  </div>
3487
3448
  </Section>
3488
3449
 
3489
- <Section>
3490
- <t t-set-slot="title">Thresholds</t>
3450
+ <Section title.translate="Thresholds">
3491
3451
  <t t-call="o-spreadsheet-GaugeChartColorSectionTemplate">
3492
3452
  <t t-set="sectionRule" t-value="state.sectionRule"/>
3493
3453
  </t>
@@ -3671,21 +3631,12 @@
3671
3631
  definition="props.definition"
3672
3632
  updateChart="props.updateChart">
3673
3633
  <t t-set-slot="general-extension">
3674
- <Section class="'pt-0'">
3675
- <t t-set-slot="title">Legend position</t>
3676
- <select
3677
- t-att-value="props.definition.legendPosition ?? 'top'"
3678
- class="o-input"
3679
- t-on-change="(ev) => this.updateLegendPosition(ev)">
3680
- <option value="none">None</option>
3681
- <option value="top">Top</option>
3682
- <option value="bottom">Bottom</option>
3683
- <option value="left">Left</option>
3684
- <option value="right">Right</option>
3685
- </select>
3686
- </Section>
3687
- <Section>
3688
- <t t-set-slot="title">Values</t>
3634
+ <ChartLegend
3635
+ figureId="props.figureId"
3636
+ definition="props.definition"
3637
+ updateChart="props.updateChart"
3638
+ />
3639
+ <Section class="'pt-0'" title.translate="Values">
3689
3640
  <Checkbox
3690
3641
  name="'showValues'"
3691
3642
  label.translate="Show values"
@@ -3697,6 +3648,22 @@
3697
3648
  </GeneralDesignEditor>
3698
3649
  </t>
3699
3650
 
3651
+ <t t-name="o-spreadsheet-RadarChartDesignPanel">
3652
+ <GeneralDesignEditor
3653
+ figureId="props.figureId"
3654
+ definition="props.definition"
3655
+ updateChart="props.updateChart">
3656
+ <t t-set-slot="general-extension">
3657
+ <ChartLegend
3658
+ figureId="props.figureId"
3659
+ definition="props.definition"
3660
+ updateChart="props.updateChart"
3661
+ />
3662
+ </t>
3663
+ </GeneralDesignEditor>
3664
+ <SeriesDesignEditor t-props="props"/>
3665
+ </t>
3666
+
3700
3667
  <t t-name="o-spreadsheet-ScatterConfigPanel">
3701
3668
  <div>
3702
3669
  <ChartDataSeries
@@ -3718,8 +3685,7 @@
3718
3685
 
3719
3686
  <t t-name="o-spreadsheet-ScorecardChartConfigPanel">
3720
3687
  <div>
3721
- <Section class="'o-data-series'">
3722
- <t t-set-slot="title">Key value</t>
3688
+ <Section class="'o-data-series'" title.translate="Key value">
3723
3689
  <SelectionInput
3724
3690
  ranges="[this.getKeyValueRange()]"
3725
3691
  isInvalid="isKeyValueInvalid"
@@ -3729,8 +3695,7 @@
3729
3695
  onSelectionConfirmed="() => this.updateKeyValueRange()"
3730
3696
  />
3731
3697
  </Section>
3732
- <Section class="'o-data-labels'">
3733
- <t t-set-slot="title">Baseline configuration</t>
3698
+ <Section class="'o-data-labels'" title.translate="Baseline configuration">
3734
3699
  <div class="o-section-subtitle">Value</div>
3735
3700
  <SelectionInput
3736
3701
  ranges="[this.getBaselineRange()]"
@@ -3763,8 +3728,7 @@
3763
3728
  definition="props.definition"
3764
3729
  updateChart="props.updateChart">
3765
3730
  <t t-set-slot="general-extension">
3766
- <Section class="'pt-1'">
3767
- <t t-set-slot="title">Number formatting</t>
3731
+ <Section class="'pt-1'" title.translate="Number formatting">
3768
3732
  <Checkbox
3769
3733
  name="'humanizeNumbers'"
3770
3734
  label="humanizeNumbersLabel"
@@ -3774,11 +3738,9 @@
3774
3738
  </Section>
3775
3739
  </t>
3776
3740
  </GeneralDesignEditor>
3777
- <SidePanelCollapsible collapsedAtInit="false">
3778
- <t t-set-slot="title">Baseline</t>
3741
+ <SidePanelCollapsible collapsedAtInit="false" title.translate="Baseline">
3779
3742
  <t t-set-slot="content">
3780
- <Section class="'pt-0'">
3781
- <t t-set-slot="title">Baseline description</t>
3743
+ <Section class="'pt-0'" title.translate="Baseline description">
3782
3744
  <input
3783
3745
  type="text"
3784
3746
  t-att-value="translate(props.definition.baselineDescr)"
@@ -3787,8 +3749,7 @@
3787
3749
  placeholder="Baseline description"
3788
3750
  />
3789
3751
  </Section>
3790
- <Section class="'o-chart-baseline-color'">
3791
- <t t-set-slot="title" t-esc="colorsSectionTitle"/>
3752
+ <Section class="'o-chart-baseline-color pt-0'" title="colorsSectionTitle">
3792
3753
  <div class="d-flex align-items-center mb-2">
3793
3754
  <RoundColorPicker
3794
3755
  currentColor="props.definition.baselineColorUp"
@@ -3816,8 +3777,7 @@
3816
3777
  definition="props.definition"
3817
3778
  updateChart="props.updateChart">
3818
3779
  <t t-set-slot="general-extension">
3819
- <Section class="'o-vertical-axis-selection'">
3820
- <t t-set-slot="title">Vertical axis position</t>
3780
+ <Section class="'o-vertical-axis-selection pt-0'" title.translate="Vertical axis position">
3821
3781
  <RadioSelection
3822
3782
  choices="axisChoices"
3823
3783
  selectedValue="props.definition.verticalAxisPosition"
@@ -3825,21 +3785,12 @@
3825
3785
  onChange.bind="updateVerticalAxisPosition"
3826
3786
  />
3827
3787
  </Section>
3828
- <Section>
3829
- <t t-set-slot="title">Legend position</t>
3830
- <select
3831
- t-att-value="props.definition.legendPosition"
3832
- class="o-input o-chart-legend-position"
3833
- t-on-change="(ev) => this.updateLegendPosition(ev)">
3834
- <option value="none">None</option>
3835
- <option value="top">Top</option>
3836
- <option value="bottom">Bottom</option>
3837
- <option value="left">Left</option>
3838
- <option value="right">Right</option>
3839
- </select>
3840
- </Section>
3841
- <Section>
3842
- <t t-set-slot="title">Values</t>
3788
+ <ChartLegend
3789
+ figureId="props.figureId"
3790
+ definition="props.definition"
3791
+ updateChart="props.updateChart"
3792
+ />
3793
+ <Section class="'pt-0'" title.translate="Values">
3843
3794
  <Checkbox
3844
3795
  name="'showValues'"
3845
3796
  label.translate="Show values"
@@ -3849,11 +3800,9 @@
3849
3800
  </Section>
3850
3801
  </t>
3851
3802
  </GeneralDesignEditor>
3852
- <SidePanelCollapsible collapsedAtInit="true">
3853
- <t t-set-slot="title">Waterfall design</t>
3803
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Waterfall design">
3854
3804
  <t t-set-slot="content">
3855
- <Section class="'pt-0'">
3856
- <t t-set-slot="title">Options</t>
3805
+ <Section class="'pt-0'" title.translate="Options">
3857
3806
  <t t-set="firstValueAsSubtotal">Use first value as subtotal</t>
3858
3807
  <Checkbox
3859
3808
  className="'mb-2'"
@@ -3878,8 +3827,7 @@
3878
3827
  onChange.bind="onUpdateShowConnectorLines"
3879
3828
  />
3880
3829
  </Section>
3881
- <Section>
3882
- <t t-set-slot="title">Colors</t>
3830
+ <Section class="'pt-0'" title.translate="Colors">
3883
3831
  <div class="o-waterfall-positive-color d-flex align-items-center mb-2">
3884
3832
  <RoundColorPicker
3885
3833
  currentColor="positiveValuesColor"
@@ -3904,8 +3852,7 @@
3904
3852
  </Section>
3905
3853
  </t>
3906
3854
  </SidePanelCollapsible>
3907
- <SidePanelCollapsible collapsedAtInit="true">
3908
- <t t-set-slot="title">Axes</t>
3855
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Axes">
3909
3856
  <t t-set-slot="content">
3910
3857
  <AxisDesignEditor
3911
3858
  axesList="axesList"
@@ -3967,7 +3914,7 @@
3967
3914
 
3968
3915
  <t t-name="o-spreadsheet-SidePanelCollapsible">
3969
3916
  <div class="" t-att-class="props.class">
3970
- <div class="o_side_panel_collapsible_title d-flex align-items-center">
3917
+ <div class="o_side_panel_collapsible_title o-fw-bold d-flex align-items-center">
3971
3918
  <div
3972
3919
  t-att-id="'btn-collapse-'+currentId"
3973
3920
  t-att-class="{ 'collapsed': props.collapsedAtInit }"
@@ -3977,9 +3924,7 @@
3977
3924
  <span class="collapsor-arrow">
3978
3925
  <t t-call="o-spreadsheet-Icon.ANGLE_DOWN"/>
3979
3926
  </span>
3980
- <div class="ps-2">
3981
- <t t-slot="title"/>
3982
- </div>
3927
+ <div class="ps-2" t-esc="props.title"/>
3983
3928
  </div>
3984
3929
  </div>
3985
3930
  <div
@@ -4035,8 +3980,9 @@
4035
3980
 
4036
3981
  <t t-name="o_spreadsheet.Section">
4037
3982
  <div class="o-section" t-att-class="props.class">
4038
- <t t-if="props.slots.title">
3983
+ <t t-if="props.slots.title or props.title">
4039
3984
  <div class="o-section-title">
3985
+ <t t-esc="props.title"/>
4040
3986
  <t t-slot="title"/>
4041
3987
  </div>
4042
3988
  </t>
@@ -4062,9 +4008,15 @@
4062
4008
  <t t-set="text_color">Text Color</t>
4063
4009
  <div class="o-cf-cell-is-rule">
4064
4010
  <div class="o-section-subtitle">Format cells if...</div>
4065
- <select t-model="rule.operator" class="o-input o-cell-is-operator mb-3">
4066
- <t t-foreach="Object.keys(cellIsOperators)" t-as="op" t-key="op_index">
4067
- <option t-att-value="op" t-esc="cellIsOperators[op]"/>
4011
+ <select
4012
+ class="o-input o-cell-is-operator mb-3"
4013
+ t-on-change="(ev) => this.editOperator(ev.target.value)">
4014
+ <t t-foreach="cellIsOperators" t-as="op" t-key="op_index">
4015
+ <option
4016
+ t-att-value="op"
4017
+ t-esc="cellIsOperators[op]"
4018
+ t-att-selected="rule.operator === op"
4019
+ />
4068
4020
  </t>
4069
4021
  </select>
4070
4022
  <t t-if="rule.operator !== 'IsEmpty' and rule.operator !== 'IsNotEmpty'">
@@ -4136,20 +4088,19 @@
4136
4088
 
4137
4089
  <t t-name="o-spreadsheet-ConditionalFormattingEditor">
4138
4090
  <div class="o-cf-ruleEditor">
4139
- <Section class="'o-cf-range pb-0'">
4140
- <t t-set-slot="title">Apply to range</t>
4091
+ <Section class="'o-cf-range pb-0'" title.translate="Apply to range">
4141
4092
  <div class="o-selection-cf">
4142
4093
  <SelectionInput
4143
- ranges="state.currentCF.ranges"
4094
+ ranges="state.ranges"
4144
4095
  class="'o-range'"
4145
4096
  isInvalid="isRangeValid"
4146
- onSelectionChanged="(ranges) => this.onRangesChanged(ranges)"
4097
+ onSelectionChanged.bind="onRangeUpdate"
4098
+ onSelectionConfirmed.bind="onRangeConfirmed"
4147
4099
  required="true"
4148
4100
  />
4149
4101
  </div>
4150
4102
  </Section>
4151
- <Section class="'pb-0'">
4152
- <t t-set-slot="title">Format rules</t>
4103
+ <Section class="'pb-0'" title.translate="Format rules">
4153
4104
  <div class="o-cf-type-selector">
4154
4105
  <BadgeSelection
4155
4106
  choices="cfTypesValues"
@@ -4176,8 +4127,11 @@
4176
4127
  </Section>
4177
4128
  <Section class="'pt-1'">
4178
4129
  <div class="o-sidePanelButtons">
4179
- <button t-on-click="props.onExitEdition" class="o-button o-cf-cancel">Cancel</button>
4180
- <button t-on-click="saveConditionalFormat" class="o-button primary o-cf-save">
4130
+ <button t-on-click="props.onCancel" class="o-button o-cf-cancel">Cancel</button>
4131
+ <button
4132
+ t-on-click="onSave"
4133
+ class="o-button primary o-cf-save"
4134
+ t-att-disabled="state.errors.length !== 0">
4181
4135
  Save
4182
4136
  </button>
4183
4137
  </div>
@@ -4211,14 +4165,18 @@
4211
4165
  <select
4212
4166
  class="o-input me-2"
4213
4167
  name="valueType"
4214
- t-model="threshold.type"
4168
+ t-on-change="(ev) => this.updateThresholdType(thresholdType, ev.target.value)"
4215
4169
  t-on-click="closeMenus"
4216
4170
  t-att-class="{ 'o-select-with-input': threshold?.type !== 'value' }">
4217
- <option value="value">Cell values</option>
4218
- <option value="number">Number</option>
4219
- <option value="percentage">Percentage</option>
4220
- <option value="percentile">Percentile</option>
4221
- <option value="formula">Formula</option>
4171
+ <option value="value" t-att-selected="threshold.type === 'value'">Cell values</option>
4172
+ <option value="number" t-att-selected="threshold.type === 'number'">Number</option>
4173
+ <option value="percentage" t-att-selected="threshold.type === 'percentage'">
4174
+ Percentage
4175
+ </option>
4176
+ <option value="percentile" t-att-selected="threshold.type === 'percentile'">
4177
+ Percentile
4178
+ </option>
4179
+ <option value="formula" t-att-selected="threshold.type === 'formula'">Formula</option>
4222
4180
  </select>
4223
4181
  </t>
4224
4182
  <div class="o-threshold-value me-2" t-if="threshold and threshold.type !== 'value'">
@@ -4226,7 +4184,8 @@
4226
4184
  t-if="threshold.type !== 'formula'"
4227
4185
  type="text"
4228
4186
  class="o-input"
4229
- t-model="rule[thresholdType].value"
4187
+ t-att-value="threshold.value"
4188
+ t-on-change="(ev) => this.updateThresholdValue(thresholdType, ev.target.value)"
4230
4189
  t-att-class="{ 'o-invalid': isValueInvalid(thresholdType), 'invisible': threshold === undefined }"
4231
4190
  />
4232
4191
  <StandaloneComposer t-else="" t-props="getColorScaleComposerProps(thresholdType)"/>
@@ -4278,7 +4237,8 @@
4278
4237
  class="'o-range'"
4279
4238
  isInvalid="false"
4280
4239
  hasSingleRange="true"
4281
- onSelectionChanged="(ranges) => this.onDataBarRangeUpdate(ranges)"
4240
+ onSelectionChanged.bind="onDataBarRangeUpdate"
4241
+ onSelectionConfirmed.bind="onDataBarRangeChange"
4282
4242
  required="false"
4283
4243
  />
4284
4244
  </div>
@@ -4323,11 +4283,14 @@
4323
4283
  </td>
4324
4284
  <td>When value is</td>
4325
4285
  <td>
4326
- <select class="o-input" name="valueType" t-model="inflectionPointValue.operator">
4327
- <option value="gt">
4286
+ <select
4287
+ class="o-input"
4288
+ name="valueType"
4289
+ t-on-change="(ev) => this.setInflectionOperator(inflectionPoint, ev.target.value)">
4290
+ <option value="gt" t-att-selected="inflectionPointValue.operator === 'gt'">
4328
4291
  <span>&#62;</span>
4329
4292
  </option>
4330
- <option value="ge">
4293
+ <option value="ge" t-att-selected="inflectionPointValue.operator === 'ge'">
4331
4294
  <span>&#8805;</span>
4332
4295
  </option>
4333
4296
  </select>
@@ -4339,17 +4302,29 @@
4339
4302
  t-if="inflectionPointValue.type !== 'formula'"
4340
4303
  class="o-input"
4341
4304
  t-att-class="{ 'o-invalid': isInflectionPointInvalid(inflectionPoint) }"
4342
- t-model="rule[inflectionPoint].value"
4305
+ t-att-value="rule[inflectionPoint].value"
4306
+ t-on-change="(ev) => this.setInflectionValue(inflectionPoint, ev.target.value)"
4343
4307
  />
4344
4308
  <StandaloneComposer t-else="" t-props="getColorIconSetComposerProps(inflectionPoint)"/>
4345
4309
  </div>
4346
4310
  </td>
4347
4311
  <td>
4348
- <select class="o-input" name="valueType" t-model="inflectionPointValue.type">
4349
- <option value="number">Number</option>
4350
- <option value="percentage">Percentage</option>
4351
- <option value="percentile">Percentile</option>
4352
- <option value="formula">Formula</option>
4312
+ <select
4313
+ class="o-input"
4314
+ name="valueType"
4315
+ t-on-change="(ev) => this.setInflectionType(inflectionPoint, ev.target.value, ev)">
4316
+ <option value="number" t-att-selected="inflectionPointValue.type === 'number'">
4317
+ Number
4318
+ </option>
4319
+ <option value="percentage" t-att-selected="inflectionPointValue.type === 'percentage'">
4320
+ Percentage
4321
+ </option>
4322
+ <option value="percentile" t-att-selected="inflectionPointValue.type === 'percentile'">
4323
+ Percentile
4324
+ </option>
4325
+ <option value="formula" t-att-selected="inflectionPointValue.type === 'formula'">
4326
+ Formula
4327
+ </option>
4353
4328
  </select>
4354
4329
  </td>
4355
4330
  </tr>
@@ -4442,7 +4417,7 @@
4442
4417
  </t>
4443
4418
  <div class="o-cf-preview-description">
4444
4419
  <div class="o-cf-preview-ruletype">
4445
- <div class="o-cf-preview-description-rule text-truncate">
4420
+ <div class="o-cf-preview-description-rule o-fw-bold text-truncate">
4446
4421
  <t t-esc="getDescription(cf)"/>
4447
4422
  </div>
4448
4423
  </div>
@@ -4492,15 +4467,18 @@
4492
4467
  />
4493
4468
  </t>
4494
4469
  <t t-if="state.mode === 'edit'">
4495
- <ConditionalFormattingEditor editedCf="state.editedCf" onExitEdition.bind="switchToList"/>
4470
+ <ConditionalFormattingEditor
4471
+ editedCf="editedCF"
4472
+ onSave.bind="switchToList"
4473
+ onCancel.bind="cancelEdition"
4474
+ />
4496
4475
  </t>
4497
4476
  </div>
4498
4477
  </t>
4499
4478
 
4500
4479
  <t t-name="o-spreadsheet-CustomCurrencyPanel">
4501
4480
  <div class="o-custom-currency">
4502
- <Section t-if="availableCurrencies.length > 1">
4503
- <t t-set-slot="title">Currency</t>
4481
+ <Section t-if="availableCurrencies.length > 1" title.translate="Currency">
4504
4482
  <select
4505
4483
  class="o-input o-available-currencies"
4506
4484
  t-on-change="(ev) => this.updateSelectCurrency(ev)">
@@ -4535,8 +4513,7 @@
4535
4513
  />
4536
4514
  </div>
4537
4515
  </Section>
4538
- <Section>
4539
- <t t-set-slot="title">Format</t>
4516
+ <Section title.translate="Format">
4540
4517
  <select
4541
4518
  class="o-input o-format-proposals mb-1"
4542
4519
  t-on-change="(ev) => this.updateSelectFormat(ev)"
@@ -4560,7 +4537,7 @@
4560
4537
  <table>
4561
4538
  <t t-foreach="getFormatExamples()" t-as="example" t-key="example_index">
4562
4539
  <tr>
4563
- <td class="pe-3 fw-bolder" t-esc="example.label"/>
4540
+ <td class="pe-3 o-fw-bold" t-esc="example.label"/>
4564
4541
  <td t-esc="example.value"/>
4565
4542
  </tr>
4566
4543
  </t>
@@ -4720,8 +4697,7 @@
4720
4697
 
4721
4698
  <t t-name="o-spreadsheet-DataValidationEditor">
4722
4699
  <div class="o-dv-form w-100 h-100">
4723
- <Section class="'o-dv-range'">
4724
- <t t-set-slot="title">Apply to range</t>
4700
+ <Section class="'o-dv-range'" title.translate="Apply to range">
4725
4701
  <SelectionInput
4726
4702
  ranges="state.rule.ranges"
4727
4703
  onSelectionChanged="(ranges) => this.onRangesChanged(ranges)"
@@ -4747,8 +4723,7 @@
4747
4723
  </div>
4748
4724
  </Section>
4749
4725
 
4750
- <Section class="'o-dv-invalid-option pt-0'">
4751
- <t t-set-slot="title">If the data is invalid</t>
4726
+ <Section class="'o-dv-invalid-option pt-0'" title.translate="If the data is invalid">
4752
4727
  <select class="o-dv-reject-input o-input" t-on-change="changeRuleIsBlocking">
4753
4728
  <option t-att-selected="!state.rule.isBlocking" value="false">Show a warning</option>
4754
4729
  <option t-att-selected="state.rule.isBlocking" value="true">Reject the input</option>
@@ -4773,7 +4748,7 @@
4773
4748
  <div class="o-dv-preview p-3" t-on-click="props.onClick" t-ref="dvPreview">
4774
4749
  <div class="d-flex justify-content-between">
4775
4750
  <div class="o-dv-container d-flex flex-column">
4776
- <div class="o-dv-preview-description fw-bold text-truncate" t-esc="descriptionString"/>
4751
+ <div class="o-dv-preview-description o-fw-bold text-truncate" t-esc="descriptionString"/>
4777
4752
  <div class="o-dv-preview-ranges text-truncate" t-esc="rangesString"/>
4778
4753
  </div>
4779
4754
  <div
@@ -4787,8 +4762,7 @@
4787
4762
 
4788
4763
  <t t-name="o-spreadsheet-FindAndReplacePanel">
4789
4764
  <div class="o-find-and-replace">
4790
- <Section>
4791
- <t t-set-slot="title">Search</t>
4765
+ <Section title.translate="Search">
4792
4766
  <div class="o-input-search-container">
4793
4767
  <input
4794
4768
  type="text"
@@ -4863,8 +4837,7 @@
4863
4837
  <ValidationMessages msgType="'info'" messages="searchInfo" singleBox="true"/>
4864
4838
  </div>
4865
4839
  </Section>
4866
- <Section class="'pt-0'" t-if="!env.model.getters.isReadonly()">
4867
- <t t-set-slot="title">Replace</t>
4840
+ <Section class="'pt-0'" t-if="!env.model.getters.isReadonly()" title.translate="Replace">
4868
4841
  <div class="o-input-search-container">
4869
4842
  <input
4870
4843
  type="text"
@@ -4911,22 +4884,6 @@
4911
4884
  </div>
4912
4885
  </t>
4913
4886
 
4914
- <t t-name="o-spreadsheet-EditableName">
4915
- <t t-if="state.isEditing">
4916
- <div>
4917
- <input type="text" class="o-input o_sp_en_name" t-model="state.name"/>
4918
- </div>
4919
- <div class="o-button-link o_sp_en_save" t-on-click="save">Save</div>
4920
- </t>
4921
- <t t-else="">
4922
- <div class="o_sp_en_display_name" t-esc="props.displayName"/>
4923
- <div class="o-button-link o_sp_en_rename" t-on-click="rename">
4924
- <i class="fa fa-pencil me-1"/>
4925
- Rename
4926
- </div>
4927
- </t>
4928
- </t>
4929
-
4930
4887
  <t t-name="o-spreadsheet-PivotDeferUpdate">
4931
4888
  <Section
4932
4889
  class="'align-items-center border-top d-flex flex-row justify-content-between py-1 pivot-defer-update'">
@@ -4990,9 +4947,9 @@
4990
4947
  t-if="props.onNameUpdated"
4991
4948
  value="props.dimension.displayName"
4992
4949
  onChange.bind="updateName"
4993
- class="'fw-bold'"
4950
+ class="'o-fw-bold'"
4994
4951
  />
4995
- <span t-else="1" class="fw-bold" t-esc="props.dimension.displayName"/>
4952
+ <span t-else="1" class="o-fw-bold" t-esc="props.dimension.displayName"/>
4996
4953
  </div>
4997
4954
  <div class="d-flex flex-rows">
4998
4955
  <t t-slot="upper-right-icons"/>
@@ -5050,9 +5007,9 @@
5050
5007
  </t>
5051
5008
 
5052
5009
  <t t-name="o-spreadsheet-PivotLayoutConfigurator">
5053
- <div class="o_side_panel_section pivot-dimensions o-section" t-ref="pivot-dimensions">
5010
+ <div class="pivot-dimensions o-section" t-ref="pivot-dimensions">
5054
5011
  <div
5055
- class="fw-bold py-1 d-flex flex-row justify-content-between align-items-center o-section-title">
5012
+ class="o-fw-bold py-1 d-flex flex-row justify-content-between align-items-center o-section-title">
5056
5013
  Columns
5057
5014
  <AddDimensionButton
5058
5015
  onFieldPicked.bind="addColumnDimension"
@@ -5077,7 +5034,7 @@
5077
5034
  </div>
5078
5035
  </t>
5079
5036
  <div
5080
- class="fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center o-section-title"
5037
+ class="o-fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center o-section-title"
5081
5038
  t-att-style="dragAndDrop.itemsStyle['__rows_title__']">
5082
5039
  Rows
5083
5040
  <AddDimensionButton
@@ -5103,7 +5060,7 @@
5103
5060
  </div>
5104
5061
  </t>
5105
5062
  <div
5106
- class="fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center o-section-title o-pivot-measure">
5063
+ class="o-fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center o-section-title o-pivot-measure">
5107
5064
  Measures
5108
5065
  <AddDimensionButton onFieldPicked.bind="addMeasureDimension" fields="props.measureFields">
5109
5066
  <div
@@ -5185,8 +5142,7 @@
5185
5142
  </t>
5186
5143
 
5187
5144
  <t t-name="o-spreadsheet-PivotMeasureDisplayPanel">
5188
- <Section>
5189
- <t t-set-slot="title">Show measure as:</t>
5145
+ <Section title.translate="Show measure as:">
5190
5146
  <select
5191
5147
  class="o-pivot-measure-display-type o-input"
5192
5148
  t-on-change="(ev) => this.store.updateMeasureDisplayType(ev.target.value)">
@@ -5204,8 +5160,7 @@
5204
5160
  />
5205
5161
  </Section>
5206
5162
 
5207
- <Section t-if="store.doesDisplayNeedsField">
5208
- <t t-set-slot="title">Base field:</t>
5163
+ <Section t-if="store.doesDisplayNeedsField" title.translate="Base field:">
5209
5164
  <div class="o-pivot-measure-display-field w-100 py-1 px-3">
5210
5165
  <t t-if="store.fields.length">
5211
5166
  <RadioSelection
@@ -5223,8 +5178,7 @@
5223
5178
  </Section>
5224
5179
 
5225
5180
  <t t-set="values" t-value="store.values"/>
5226
- <Section t-if="store.doesDisplayNeedsValue and values.length">
5227
- <t t-set-slot="title">Base item:</t>
5181
+ <Section t-if="store.doesDisplayNeedsValue and values.length" title.translate="Base item:">
5228
5182
  <div class="o-pivot-measure-display-value w-100 py-1 px-3">
5229
5183
  <RadioSelection
5230
5184
  choices="values"
@@ -5252,8 +5206,7 @@
5252
5206
  <div class="d-flex flex-column h-100 justify-content-between overflow-hidden">
5253
5207
  <div class="h-100 position-relative overflow-x-hidden overflow-y-auto">
5254
5208
  <PivotTitleSection pivotId="props.pivotId" flipAxis.bind="flipAxis"/>
5255
- <Section>
5256
- <t t-set-slot="title">Range</t>
5209
+ <Section title.translate="Range">
5257
5210
  <SelectionInput
5258
5211
  ranges="ranges"
5259
5212
  required="true"
@@ -5318,8 +5271,7 @@
5318
5271
  />
5319
5272
  </Section>
5320
5273
 
5321
- <Section class="'pt-0'">
5322
- <t t-set-slot="title">Columns to analyze</t>
5274
+ <Section class="'pt-0'" title.translate="Columns to analyze">
5323
5275
  <div class="o-checkbox-selection overflow-auto">
5324
5276
  <t t-set="selectAllLabel">Select all</t>
5325
5277
  <Checkbox
@@ -5373,8 +5325,7 @@
5373
5325
 
5374
5326
  <t t-name="o-spreadsheet-SettingsPanel">
5375
5327
  <div class="o-settings-panel">
5376
- <Section>
5377
- <t t-set-slot="title">Locale</t>
5328
+ <Section title.translate="Locale">
5378
5329
  <select class="o-input" t-on-change="(ev) => this.onLocaleChange(ev.target.value)">
5379
5330
  <option
5380
5331
  t-foreach="supportedLocales"
@@ -5387,19 +5338,19 @@
5387
5338
  </select>
5388
5339
  <div class="o-locale-preview mt-4 p-3 rounded">
5389
5340
  <div>
5390
- <span class="fw-bold me-1">Number:</span>
5341
+ <span class="o-fw-bold me-1">Number:</span>
5391
5342
  <span t-esc="numberFormatPreview"/>
5392
5343
  </div>
5393
5344
  <div>
5394
- <span class="fw-bold me-1">Date:</span>
5345
+ <span class="o-fw-bold me-1">Date:</span>
5395
5346
  <span t-esc="dateFormatPreview"/>
5396
5347
  </div>
5397
5348
  <div>
5398
- <span class="fw-bold me-1">Date time:</span>
5349
+ <span class="o-fw-bold me-1">Date time:</span>
5399
5350
  <span t-esc="dateTimeFormatPreview"/>
5400
5351
  </div>
5401
5352
  <div>
5402
- <span class="fw-bold me-1">First day of week:</span>
5353
+ <span class="o-fw-bold me-1">First day of week:</span>
5403
5354
  <span t-esc="firstDayOfWeek"/>
5404
5355
  </div>
5405
5356
  </div>
@@ -5414,7 +5365,7 @@
5414
5365
  <t t-name="o-spreadsheet-SidePanel">
5415
5366
  <div class="o-sidePanel" t-if="sidePanelStore.isOpen">
5416
5367
  <div class="o-sidePanelHeader">
5417
- <div class="o-sidePanelTitle o-heading-3" t-esc="getTitle()"/>
5368
+ <div class="o-sidePanelTitle o-fw-bold" t-esc="getTitle()"/>
5418
5369
  <div class="o-sidePanelClose" t-on-click="close">✕</div>
5419
5370
  </div>
5420
5371
  <div class="o-sidePanelBody-container d-flex flex-grow-1 ">
@@ -5447,8 +5398,7 @@
5447
5398
 
5448
5399
  <t t-name="o-spreadsheet-SplitIntoColumnsPanel">
5449
5400
  <div class="o-split-to-cols-panel">
5450
- <Section>
5451
- <t t-set-slot="title">Separator</t>
5401
+ <Section title.translate="Separator">
5452
5402
  <select class="o-input mb-3" t-on-change="(ev) => this.onSeparatorChange(ev.target.value)">
5453
5403
  <option
5454
5404
  t-foreach="separators"
@@ -5495,8 +5445,7 @@
5495
5445
 
5496
5446
  <t t-name="o-spreadsheet-TablePanel">
5497
5447
  <div class="o-table-panel">
5498
- <Section>
5499
- <t t-set-slot="title">Style options</t>
5448
+ <Section title.translate="Style options">
5500
5449
  <div class="d-flex flex-row">
5501
5450
  <div class="w-50">
5502
5451
  <div class="d-flex align-items-center">
@@ -5560,8 +5509,7 @@
5560
5509
  <Section>
5561
5510
  <TableStylePicker table="props.table"/>
5562
5511
  </Section>
5563
- <Section>
5564
- <t t-set-slot="title">Data range</t>
5512
+ <Section title.translate="Data range">
5565
5513
  <SelectionInput
5566
5514
  t-key="props.table.type"
5567
5515
  ranges="[this.state.tableXc]"
@@ -5609,16 +5557,13 @@
5609
5557
 
5610
5558
  <t t-name="o-spreadsheet-TableStyleEditorPanel">
5611
5559
  <div class="o-table-style-editor-panel">
5612
- <Section>
5613
- <t t-set-slot="title">Style name</t>
5560
+ <Section title.translate="Style name">
5614
5561
  <input type="text" class="o-input" t-model="state.styleName"/>
5615
5562
  </Section>
5616
- <Section class="'pt-1'">
5617
- <t t-set-slot="title">Style color</t>
5563
+ <Section class="'pt-1'" title.translate="Style color">
5618
5564
  <RoundColorPicker currentColor="state.primaryColor" onColorPicked.bind="onColorPicked"/>
5619
5565
  </Section>
5620
- <Section class="'pt-1'">
5621
- <t t-set-slot="title">Style template</t>
5566
+ <Section class="'pt-1'" title.translate="Style template">
5622
5567
  <div class="d-flex flex-wrap">
5623
5568
  <t t-foreach="tableTemplates" t-as="templateName" t-key="templateName">
5624
5569
  <TableStylePreview
@@ -5647,11 +5592,7 @@
5647
5592
  </t>
5648
5593
 
5649
5594
  <t t-name="o-spreadsheet-Spreadsheet">
5650
- <div
5651
- class="o-spreadsheet"
5652
- t-on-keydown="(ev) => !env.isDashboard() and this.onKeydown(ev)"
5653
- t-ref="spreadsheet"
5654
- t-att-style="getStyle()">
5595
+ <div class="o-spreadsheet" t-ref="spreadsheet" t-att-style="getStyle()">
5655
5596
  <t t-if="env.isDashboard()">
5656
5597
  <SpreadsheetDashboard/>
5657
5598
  </t>