@odoo/o-spreadsheet 18.1.0-alpha.0 → 18.1.0-alpha.2

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.0
5
- @date 2024-09-25T13:18:46.133Z
6
- @hash 288f0b7
4
+ @version 18.1.0-alpha.2
5
+ @date 2024-10-24T08:54:19.283Z
6
+ @hash 2a01250
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ActionButton">
@@ -688,12 +688,11 @@
688
688
  </t>
689
689
 
690
690
  <t t-name="o-spreadsheet-DataValidationCheckbox">
691
- <input
692
- type="checkbox"
693
- class="o-dv-checkbox"
694
- t-att-class="{'pe-none': isDisabled}"
695
- t-on-change="onCheckboxChange"
696
- t-att-checked="checkBoxValue"
691
+ <Checkbox
692
+ name="'data-validation-checkbox'"
693
+ value="checkBoxValue"
694
+ onChange.bind="onCheckboxChange"
695
+ className="isDisabled ? 'pe-none o-dv-checkbox' : 'o-dv-checkbox'"
697
696
  />
698
697
  </t>
699
698
 
@@ -2698,8 +2697,7 @@
2698
2697
  </t>
2699
2698
 
2700
2699
  <t t-name="o-spreadsheet.ChartDataSeries">
2701
- <Section class="'o-data-series'">
2702
- <t t-set-slot="title" t-esc="title"/>
2700
+ <Section class="'o-data-series'" title="title">
2703
2701
  <SelectionInput
2704
2702
  ranges="ranges"
2705
2703
  required="true"
@@ -2719,11 +2717,9 @@
2719
2717
 
2720
2718
  <t t-name="o-spreadsheet-GeneralDesignEditor">
2721
2719
  <t t-set="chart_title">Chart title</t>
2722
- <SidePanelCollapsible collapsedAtInit="false">
2723
- <t t-set-slot="title">General</t>
2720
+ <SidePanelCollapsible collapsedAtInit="false" title.translate="General">
2724
2721
  <t t-set-slot="content">
2725
- <Section class="'o-chart-background-color pt-0 pb-0'">
2726
- <t t-set-slot="title">Background color</t>
2722
+ <Section class="'o-chart-background-color pt-0 pb-0'" title.translate="Background color">
2727
2723
  <RoundColorPicker
2728
2724
  currentColor="props.definition.background"
2729
2725
  onColorPicked.bind="updateBackgroundColor"
@@ -2764,8 +2760,7 @@
2764
2760
  </t>
2765
2761
 
2766
2762
  <t t-name="o-spreadsheet.ChartLabelRange">
2767
- <Section class="'o-data-labels'">
2768
- <t t-set-slot="title" t-esc="props.title"/>
2763
+ <Section class="'o-data-labels'" title="props.title">
2769
2764
  <SelectionInput
2770
2765
  ranges="[props.range]"
2771
2766
  isInvalid="props.isInvalid"
@@ -2785,13 +2780,140 @@
2785
2780
  </Section>
2786
2781
  </t>
2787
2782
 
2783
+ <t t-name="o-spreadsheet-SeriesDesignEditor">
2784
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Data Series">
2785
+ <t t-set-slot="content">
2786
+ <Section class="'pt-0 pb-0'">
2787
+ <select
2788
+ class="o-input data-series-selector"
2789
+ t-model="state.label"
2790
+ t-on-change="(ev) => this.updateSerieEditor(ev)">
2791
+ <t t-foreach="getDataSeries()" t-as="serie" t-key="serie_index">
2792
+ <option
2793
+ t-att-value="serie"
2794
+ t-att-selected="state.index === serie_index"
2795
+ t-esc="serie"
2796
+ />
2797
+ </t>
2798
+ </select>
2799
+ <Section class="'px-0'">
2800
+ <div class="d-flex align-items-center">
2801
+ <span class="o-section-title mb-0 pe-2">Series color</span>
2802
+ <RoundColorPicker
2803
+ currentColor="getDataSerieColor()"
2804
+ onColorPicked.bind="updateDataSeriesColor"
2805
+ />
2806
+ </div>
2807
+ </Section>
2808
+ <Section class="'pt-0 px-0'" title.translate="Series name">
2809
+ <input
2810
+ class="o-input o-serie-label-editor"
2811
+ type="text"
2812
+ t-att-value="getDataSerieLabel()"
2813
+ t-on-change="(ev) => this.updateDataSeriesLabel(ev)"
2814
+ />
2815
+ </Section>
2816
+ </Section>
2817
+ <t t-slot="data-series-extension" index="state.index"/>
2818
+ </t>
2819
+ </SidePanelCollapsible>
2820
+ </t>
2821
+
2822
+ <t t-name="o-spreadsheet-SeriesWithAxisDesignEditor">
2823
+ <SeriesDesignEditor t-props="props">
2824
+ <t t-set-slot="data-series-extension" t-slot-scope="scope">
2825
+ <t t-set="index" t-value="scope.index"/>
2826
+ <t t-slot="general-extension" index="index"/>
2827
+ <Section class="'pt-0 pb-0'">
2828
+ <Section
2829
+ class="'pt-0 px-0 o-vertical-axis-selection'"
2830
+ t-if="canHaveTwoVerticalAxis"
2831
+ title.translate="Vertical axis">
2832
+ <RadioSelection
2833
+ choices="axisChoices"
2834
+ selectedValue="getDataSerieAxis(index)"
2835
+ name="'axis'"
2836
+ onChange="(value) => this.updateDataSeriesAxis(index, value)"
2837
+ />
2838
+ </Section>
2839
+ <Section
2840
+ class="'pt-0 px-0 o-show-trend-line'"
2841
+ t-if="!props.definition.horizontal"
2842
+ title.translate="Trend line">
2843
+ <t t-set="showTrendLineLabel">Show trend line</t>
2844
+ <t t-set="trend" t-value="getTrendLineConfiguration(index)"/>
2845
+ <t t-set="trendType" t-value="getTrendType(trend)"/>
2846
+ <Checkbox
2847
+ name="'showTrendLine'"
2848
+ label="showTrendLineLabel"
2849
+ value="trend !== undefined and trend.display"
2850
+ onChange="(display) => this.toggleDataTrend(index, display)"
2851
+ />
2852
+ <div t-if="trend !== undefined and trend.display">
2853
+ <div class="d-flex py-2">
2854
+ <div class="w-100">
2855
+ <span class="o-section-subtitle">Type</span>
2856
+ <select
2857
+ class="o-input trend-type-selector"
2858
+ t-on-change="(ev) => this.onChangeTrendType(index, ev)">
2859
+ <option value="linear" t-att-selected="trendType === 'linear'">Linear</option>
2860
+ <option value="exponential" t-att-selected="trendType === 'exponential'">
2861
+ Exponential
2862
+ </option>
2863
+ <option value="polynomial" t-att-selected="trendType === 'polynomial'">
2864
+ Polynomial
2865
+ </option>
2866
+ <option value="logarithmic" t-att-selected="trendType === 'logarithmic'">
2867
+ Logarithmic
2868
+ </option>
2869
+ <option
2870
+ value="trailingMovingAverage"
2871
+ t-att-selected="trendType === 'trailingMovingAverage'">
2872
+ Trailing moving average
2873
+ </option>
2874
+ </select>
2875
+ </div>
2876
+ <div class="w-50 ms-3" t-if="trendType === 'trailingMovingAverage'">
2877
+ <span class="o-section-subtitle">Window</span>
2878
+ <input
2879
+ t-att-value="trend.window || this.defaultWindowSize"
2880
+ type="number"
2881
+ class="w-100 o-input trend-window-input"
2882
+ t-on-change="(ev) => this.onChangeMovingAverageWindow(index, ev)"
2883
+ />
2884
+ </div>
2885
+ <div class="w-50 ms-3" t-if="trendType === 'polynomial'">
2886
+ <span class="o-section-subtitle">Degree</span>
2887
+ <input
2888
+ t-att-value="trend.order"
2889
+ type="number"
2890
+ class="w-100 o-input trend-order-input"
2891
+ t-on-change="(ev) => this.onChangePolynomialDegree(index, ev)"
2892
+ min="1"
2893
+ />
2894
+ </div>
2895
+ </div>
2896
+ <div class="d-flex align-items-center">
2897
+ <span class="o-section-subtitle my-0 pe-2">Trend line color</span>
2898
+ <RoundColorPicker
2899
+ currentColor="getTrendLineColor(index)"
2900
+ onColorPicked="(ev) => this.updateTrendLineColor(index, ev)"
2901
+ />
2902
+ </div>
2903
+ </div>
2904
+ </Section>
2905
+ </Section>
2906
+ </t>
2907
+ </SeriesDesignEditor>
2908
+ </t>
2909
+
2788
2910
  <t t-name="o-spreadsheet.ChartTitle">
2789
2911
  <t t-set="placeholder">Add a title</t>
2790
- <Section class="'o-chart-title'">
2791
- <t t-set-slot="title">
2792
- <t t-if="props.name" t-esc="props.name"/>
2793
- <t t-else="">Title</t>
2794
- </t>
2912
+ <t t-set="title">
2913
+ <t t-if="props.name" t-esc="props.name"/>
2914
+ <t t-else="">Title</t>
2915
+ </t>
2916
+ <Section class="'o-chart-title'" title="title.toString()">
2795
2917
  <input
2796
2918
  type="text"
2797
2919
  class="o-input"
@@ -3087,11 +3209,36 @@
3087
3209
  <path fill="#444" d="M23,2 v43 h1 v-43 M2,45 h44 v1 h-44"/>
3088
3210
  </svg>
3089
3211
  </t>
3212
+ <t t-name="o-spreadsheet-ChartPreview.RADAR_CHART">
3213
+ <svg viewBox="0 0 48 48" class="o-chart-preview" xmlns="http://www.w3.org/2000/svg">
3214
+ <path fill="none" stroke="#0074d9" d="m24 16 14.27 3.36-1.93 21.63-18.22-8.9-3.63-11.18Z"/>
3215
+ <path fill="none" stroke="#eb6d00" d="m24 4 7.61 17.53-4.67 6.52-12.34 8.89-7.72-18.5Z"/>
3216
+ <path
3217
+ fill="none"
3218
+ stroke="#444"
3219
+ d="M24 2v22l20.92-6.8L24 24l12.93 17.8L24 24 11.07 41.8 24 24 3.08 17.2"
3220
+ />
3221
+ </svg>
3222
+ </t>
3223
+ <t t-name="o-spreadsheet-ChartPreview.FILLED_RADAR_CHART">
3224
+ <svg viewBox="0 0 48 48" class="o-chart-preview" xmlns="http://www.w3.org/2000/svg">
3225
+ <path
3226
+ fill="#0074d944"
3227
+ stroke="#0074d9"
3228
+ d="m24 16 14.27 3.36-1.93 21.63-18.22-8.9-3.63-11.18Z"
3229
+ />
3230
+ <path fill="#eb6d0044" stroke="#eb6d00" d="m24 4 7.61 17.53-4.67 6.52-12.34 8.89-7.72-18.5Z"/>
3231
+ <path
3232
+ fill="none"
3233
+ stroke="#444"
3234
+ d="M24 2v22l20.92-6.8L24 24l12.93 17.8L24 24 11.07 41.8 24 24 3.08 17.2"
3235
+ />
3236
+ </svg>
3237
+ </t>
3090
3238
 
3091
3239
  <t t-name="o-spreadsheet-ChartTypePicker">
3092
3240
  <t t-set="selectedChartProperties" t-value="getSelectedChartSubtypeProperties()"/>
3093
- <Section>
3094
- <t t-set-slot="title">Chart type</t>
3241
+ <Section title.translate="Chart type">
3095
3242
  <div class="position-relative">
3096
3243
  <select
3097
3244
  class="o-input o-type-selector"
@@ -3142,8 +3289,7 @@
3142
3289
  definition="props.definition"
3143
3290
  updateChart="props.updateChart">
3144
3291
  <t t-set-slot="general-extension">
3145
- <Section class="'pt-0'">
3146
- <t t-set-slot="title">Legend position</t>
3292
+ <Section class="'pt-0'" title.translate="Legend position">
3147
3293
  <select
3148
3294
  t-att-value="props.definition.legendPosition ?? 'top'"
3149
3295
  class="o-input"
@@ -3155,8 +3301,7 @@
3155
3301
  <option value="right">Right</option>
3156
3302
  </select>
3157
3303
  </Section>
3158
- <Section class="'pt-0'">
3159
- <t t-set-slot="title">Values</t>
3304
+ <Section class="'pt-0'" title.translate="Values">
3160
3305
  <Checkbox
3161
3306
  name="'showValues'"
3162
3307
  label.translate="Show values"
@@ -3166,102 +3311,8 @@
3166
3311
  </Section>
3167
3312
  </t>
3168
3313
  </GeneralDesignEditor>
3169
- <SidePanelCollapsible collapsedAtInit="true">
3170
- <t t-set-slot="title">Data series</t>
3171
- <t t-set-slot="content">
3172
- <Section class="'pt-0 pb-0'">
3173
- <select
3174
- class="o-input data-series-selector"
3175
- t-model="state.label"
3176
- t-on-change="(ev) => this.updateSerieEditor(ev)">
3177
- <t t-foreach="getDataSeries()" t-as="serie" t-key="serie_index">
3178
- <option
3179
- t-att-value="serie"
3180
- t-att-selected="state.index === serie_index"
3181
- t-esc="serie"
3182
- />
3183
- </t>
3184
- </select>
3185
- <Section class="'px-0'">
3186
- <div class="d-flex align-items-center">
3187
- <t t-set-slot="title">Series color</t>
3188
- <RoundColorPicker
3189
- currentColor="getDataSerieColor()"
3190
- onColorPicked.bind="updateDataSeriesColor"
3191
- />
3192
- </div>
3193
- </Section>
3194
- <Section class="'pt-0 px-0 o-vertical-axis-selection'" t-if="canHaveTwoVerticalAxis">
3195
- <t t-set-slot="title">Vertical axis</t>
3196
- <RadioSelection
3197
- choices="axisChoices"
3198
- selectedValue="getDataSerieAxis()"
3199
- name="'axis'"
3200
- onChange.bind="updateDataSeriesAxis"
3201
- />
3202
- </Section>
3203
- <Section class="'pt-0 px-0'">
3204
- <t t-set-slot="title">Series name</t>
3205
- <input
3206
- class="o-input o-serie-label-editor"
3207
- type="text"
3208
- t-att-value="getDataSerieLabel()"
3209
- t-on-change="(ev) => this.updateDataSeriesLabel(ev)"
3210
- />
3211
- </Section>
3212
- <Section class="'pt-0 px-0 o-show-trend-line'" t-if="!props.definition.horizontal">
3213
- <t t-set-slot="title">Trend line</t>
3214
- <t t-set="showTrendLineLabel">Show trend line</t>
3215
- <t t-set="trend" t-value="getTrendLineConfiguration()"/>
3216
- <t t-set="trendType" t-value="getTrendType(trend)"/>
3217
- <Checkbox
3218
- name="'showTrendLine'"
3219
- label="showTrendLineLabel"
3220
- value="trend !== undefined and trend.display"
3221
- onChange.bind="toggleDataTrend"
3222
- />
3223
- <div t-if="trend !== undefined and trend.display">
3224
- <div class="d-flex py-2">
3225
- <div class="w-100">
3226
- <span class="o-section-subtitle">Type</span>
3227
- <select class="o-input trend-type-selector" t-on-change="this.onChangeTrendType">
3228
- <option value="linear" t-att-selected="trendType === 'linear'">Linear</option>
3229
- <option value="exponential" t-att-selected="trendType === 'exponential'">
3230
- Exponential
3231
- </option>
3232
- <option value="polynomial" t-att-selected="trendType === 'polynomial'">
3233
- Polynomial
3234
- </option>
3235
- <option value="logarithmic" t-att-selected="trendType === 'logarithmic'">
3236
- Logarithmic
3237
- </option>
3238
- </select>
3239
- </div>
3240
- <div class="w-50 ms-3" t-if="trendType === 'polynomial'">
3241
- <span class="o-section-subtitle">Degree</span>
3242
- <input
3243
- t-att-value="trend.order"
3244
- type="number"
3245
- class="w-100 o-input trend-order-input"
3246
- t-on-change="this.onChangePolynomialDegree"
3247
- min="1"
3248
- />
3249
- </div>
3250
- </div>
3251
- <div class="d-flex align-items-center">
3252
- <span class="o-section-subtitle my-0 pe-2">Trend line color</span>
3253
- <RoundColorPicker
3254
- currentColor="getTrendLineColor()"
3255
- onColorPicked.bind="updateTrendLineColor"
3256
- />
3257
- </div>
3258
- </div>
3259
- </Section>
3260
- </Section>
3261
- </t>
3262
- </SidePanelCollapsible>
3263
- <SidePanelCollapsible collapsedAtInit="true">
3264
- <t t-set-slot="title">Axes</t>
3314
+ <SeriesWithAxisDesignEditor t-props="props"/>
3315
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Axes">
3265
3316
  <t t-set-slot="content">
3266
3317
  <AxisDesignEditor
3267
3318
  axesList="axesList"
@@ -3292,6 +3343,59 @@
3292
3343
  </div>
3293
3344
  </t>
3294
3345
 
3346
+ <t t-name="o-spreadsheet-ComboChartDesignPanel">
3347
+ <GeneralDesignEditor
3348
+ figureId="props.figureId"
3349
+ definition="props.definition"
3350
+ updateChart="props.updateChart">
3351
+ <t t-set-slot="general-extension">
3352
+ <Section class="'pt-0'" title.translate="Legend position">
3353
+ <select
3354
+ t-att-value="props.definition.legendPosition ?? 'top'"
3355
+ class="o-input"
3356
+ t-on-change="this.updateLegendPosition">
3357
+ <option value="none">None</option>
3358
+ <option value="top">Top</option>
3359
+ <option value="bottom">Bottom</option>
3360
+ <option value="left">Left</option>
3361
+ <option value="right">Right</option>
3362
+ </select>
3363
+ </Section>
3364
+ <Section class="'pt-0'" title.translate="Values">
3365
+ <Checkbox
3366
+ name="'showValues'"
3367
+ label="showValuesLabel"
3368
+ value="props.definition.showValues"
3369
+ onChange="showValues => props.updateChart(this.props.figureId, {showValues})"
3370
+ />
3371
+ </Section>
3372
+ </t>
3373
+ </GeneralDesignEditor>
3374
+ <SeriesWithAxisDesignEditor t-props="props">
3375
+ <t t-set-slot="general-extension" t-slot-scope="scope">
3376
+ <t t-set="index" t-value="scope.index"/>
3377
+ <Section class="'pt-0 o-series-type-selection'" title.translate="Serie type">
3378
+ <RadioSelection
3379
+ choices="seriesTypeChoices"
3380
+ selectedValue="getDataSeriesType(index)"
3381
+ name="'seriesType'"
3382
+ onChange="(type) => this.updateDataSeriesType(index, type)"
3383
+ />
3384
+ </Section>
3385
+ </t>
3386
+ </SeriesWithAxisDesignEditor>
3387
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Axes">
3388
+ <t t-set-slot="content">
3389
+ <AxisDesignEditor
3390
+ axesList="axesList"
3391
+ figureId="props.figureId"
3392
+ definition="props.definition"
3393
+ updateChart="props.updateChart"
3394
+ />
3395
+ </t>
3396
+ </SidePanelCollapsible>
3397
+ </t>
3398
+
3295
3399
  <t t-name="o-spreadsheet-GaugeChartConfigPanel">
3296
3400
  <div>
3297
3401
  <ChartDataSeries
@@ -3314,11 +3418,9 @@
3314
3418
  definition="props.definition"
3315
3419
  updateChart="props.updateChart"
3316
3420
  />
3317
- <SidePanelCollapsible collapsedAtInit="false">
3318
- <t t-set-slot="title">Gauge Design</t>
3421
+ <SidePanelCollapsible collapsedAtInit="false" title.translate="Gauge Design">
3319
3422
  <t t-set-slot="content">
3320
- <Section class="'pt-0'">
3321
- <t t-set-slot="title">Range</t>
3423
+ <Section class="'pt-0'" title.translate="Range">
3322
3424
  <div class="o-subsection-left">
3323
3425
  <input
3324
3426
  type="text"
@@ -3341,8 +3443,7 @@
3341
3443
  </div>
3342
3444
  </Section>
3343
3445
 
3344
- <Section>
3345
- <t t-set-slot="title">Thresholds</t>
3446
+ <Section title.translate="Thresholds">
3346
3447
  <t t-call="o-spreadsheet-GaugeChartColorSectionTemplate">
3347
3448
  <t t-set="sectionRule" t-value="state.sectionRule"/>
3348
3449
  </t>
@@ -3526,8 +3627,7 @@
3526
3627
  definition="props.definition"
3527
3628
  updateChart="props.updateChart">
3528
3629
  <t t-set-slot="general-extension">
3529
- <Section class="'pt-0'">
3530
- <t t-set-slot="title">Legend position</t>
3630
+ <Section class="'pt-0'" title.translate="Legend position">
3531
3631
  <select
3532
3632
  t-att-value="props.definition.legendPosition ?? 'top'"
3533
3633
  class="o-input"
@@ -3539,8 +3639,7 @@
3539
3639
  <option value="right">Right</option>
3540
3640
  </select>
3541
3641
  </Section>
3542
- <Section>
3543
- <t t-set-slot="title">Values</t>
3642
+ <Section title.translate="Values">
3544
3643
  <Checkbox
3545
3644
  name="'showValues'"
3546
3645
  label.translate="Show values"
@@ -3552,6 +3651,29 @@
3552
3651
  </GeneralDesignEditor>
3553
3652
  </t>
3554
3653
 
3654
+ <t t-name="o-spreadsheet-RadarChartDesignPanel">
3655
+ <GeneralDesignEditor
3656
+ figureId="props.figureId"
3657
+ definition="props.definition"
3658
+ updateChart="props.updateChart">
3659
+ <t t-set-slot="general-extension">
3660
+ <Section class="'pt-0'" title.translate="Legend Position">
3661
+ <select
3662
+ t-att-value="props.definition.legendPosition ?? 'top'"
3663
+ class="o-input"
3664
+ t-on-change="this.updateLegendPosition">
3665
+ <option value="none">None</option>
3666
+ <option value="top">Top</option>
3667
+ <option value="bottom">Bottom</option>
3668
+ <option value="left">Left</option>
3669
+ <option value="right">Right</option>
3670
+ </select>
3671
+ </Section>
3672
+ </t>
3673
+ </GeneralDesignEditor>
3674
+ <SeriesDesignEditor t-props="props"/>
3675
+ </t>
3676
+
3555
3677
  <t t-name="o-spreadsheet-ScatterConfigPanel">
3556
3678
  <div>
3557
3679
  <ChartDataSeries
@@ -3573,8 +3695,7 @@
3573
3695
 
3574
3696
  <t t-name="o-spreadsheet-ScorecardChartConfigPanel">
3575
3697
  <div>
3576
- <Section class="'o-data-series'">
3577
- <t t-set-slot="title">Key value</t>
3698
+ <Section class="'o-data-series'" title.translate="Key value">
3578
3699
  <SelectionInput
3579
3700
  ranges="[this.getKeyValueRange()]"
3580
3701
  isInvalid="isKeyValueInvalid"
@@ -3584,8 +3705,7 @@
3584
3705
  onSelectionConfirmed="() => this.updateKeyValueRange()"
3585
3706
  />
3586
3707
  </Section>
3587
- <Section class="'o-data-labels'">
3588
- <t t-set-slot="title">Baseline configuration</t>
3708
+ <Section class="'o-data-labels'" title.translate="Baseline configuration">
3589
3709
  <div class="o-section-subtitle">Value</div>
3590
3710
  <SelectionInput
3591
3711
  ranges="[this.getBaselineRange()]"
@@ -3618,8 +3738,7 @@
3618
3738
  definition="props.definition"
3619
3739
  updateChart="props.updateChart">
3620
3740
  <t t-set-slot="general-extension">
3621
- <Section class="'pt-1'">
3622
- <t t-set-slot="title">Number formatting</t>
3741
+ <Section class="'pt-1'" title.translate="Number formatting">
3623
3742
  <Checkbox
3624
3743
  name="'humanizeNumbers'"
3625
3744
  label="humanizeNumbersLabel"
@@ -3629,11 +3748,9 @@
3629
3748
  </Section>
3630
3749
  </t>
3631
3750
  </GeneralDesignEditor>
3632
- <SidePanelCollapsible collapsedAtInit="false">
3633
- <t t-set-slot="title">Baseline</t>
3751
+ <SidePanelCollapsible collapsedAtInit="false" title.translate="Baseline">
3634
3752
  <t t-set-slot="content">
3635
- <Section class="'pt-0'">
3636
- <t t-set-slot="title">Baseline description</t>
3753
+ <Section class="'pt-0'" title.translate="Baseline description">
3637
3754
  <input
3638
3755
  type="text"
3639
3756
  t-att-value="translate(props.definition.baselineDescr)"
@@ -3642,8 +3759,7 @@
3642
3759
  placeholder="Baseline description"
3643
3760
  />
3644
3761
  </Section>
3645
- <Section class="'o-chart-baseline-color'">
3646
- <t t-set-slot="title" t-esc="colorsSectionTitle"/>
3762
+ <Section class="'o-chart-baseline-color'" title="colorsSectionTitle">
3647
3763
  <div class="d-flex align-items-center mb-2">
3648
3764
  <RoundColorPicker
3649
3765
  currentColor="props.definition.baselineColorUp"
@@ -3671,8 +3787,7 @@
3671
3787
  definition="props.definition"
3672
3788
  updateChart="props.updateChart">
3673
3789
  <t t-set-slot="general-extension">
3674
- <Section class="'o-vertical-axis-selection'">
3675
- <t t-set-slot="title">Vertical axis position</t>
3790
+ <Section class="'o-vertical-axis-selection'" title.translate="Vertical axis position">
3676
3791
  <RadioSelection
3677
3792
  choices="axisChoices"
3678
3793
  selectedValue="props.definition.verticalAxisPosition"
@@ -3680,8 +3795,7 @@
3680
3795
  onChange.bind="updateVerticalAxisPosition"
3681
3796
  />
3682
3797
  </Section>
3683
- <Section>
3684
- <t t-set-slot="title">Legend position</t>
3798
+ <Section title.translate="Legend position">
3685
3799
  <select
3686
3800
  t-att-value="props.definition.legendPosition"
3687
3801
  class="o-input o-chart-legend-position"
@@ -3693,8 +3807,7 @@
3693
3807
  <option value="right">Right</option>
3694
3808
  </select>
3695
3809
  </Section>
3696
- <Section>
3697
- <t t-set-slot="title">Values</t>
3810
+ <Section title.translate="Values">
3698
3811
  <Checkbox
3699
3812
  name="'showValues'"
3700
3813
  label.translate="Show values"
@@ -3704,11 +3817,9 @@
3704
3817
  </Section>
3705
3818
  </t>
3706
3819
  </GeneralDesignEditor>
3707
- <SidePanelCollapsible collapsedAtInit="true">
3708
- <t t-set-slot="title">Waterfall design</t>
3820
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Waterfall design">
3709
3821
  <t t-set-slot="content">
3710
- <Section class="'pt-0'">
3711
- <t t-set-slot="title">Options</t>
3822
+ <Section class="'pt-0'" title.translate="Options">
3712
3823
  <t t-set="firstValueAsSubtotal">Use first value as subtotal</t>
3713
3824
  <Checkbox
3714
3825
  className="'mb-2'"
@@ -3733,8 +3844,7 @@
3733
3844
  onChange.bind="onUpdateShowConnectorLines"
3734
3845
  />
3735
3846
  </Section>
3736
- <Section>
3737
- <t t-set-slot="title">Colors</t>
3847
+ <Section title.translate="Colors">
3738
3848
  <div class="o-waterfall-positive-color d-flex align-items-center mb-2">
3739
3849
  <RoundColorPicker
3740
3850
  currentColor="positiveValuesColor"
@@ -3759,8 +3869,7 @@
3759
3869
  </Section>
3760
3870
  </t>
3761
3871
  </SidePanelCollapsible>
3762
- <SidePanelCollapsible collapsedAtInit="true">
3763
- <t t-set-slot="title">Axes</t>
3872
+ <SidePanelCollapsible collapsedAtInit="true" title.translate="Axes">
3764
3873
  <t t-set-slot="content">
3765
3874
  <AxisDesignEditor
3766
3875
  axesList="axesList"
@@ -3822,7 +3931,7 @@
3822
3931
 
3823
3932
  <t t-name="o-spreadsheet-SidePanelCollapsible">
3824
3933
  <div class="" t-att-class="props.class">
3825
- <div class="o_side_panel_collapsible_title d-flex align-items-center">
3934
+ <div class="o_side_panel_collapsible_title o-fw-bold d-flex align-items-center">
3826
3935
  <div
3827
3936
  t-att-id="'btn-collapse-'+currentId"
3828
3937
  t-att-class="{ 'collapsed': props.collapsedAtInit }"
@@ -3832,9 +3941,7 @@
3832
3941
  <span class="collapsor-arrow">
3833
3942
  <t t-call="o-spreadsheet-Icon.ANGLE_DOWN"/>
3834
3943
  </span>
3835
- <div class="ps-2">
3836
- <t t-slot="title"/>
3837
- </div>
3944
+ <div class="ps-2" t-esc="props.title"/>
3838
3945
  </div>
3839
3946
  </div>
3840
3947
  <div
@@ -3890,8 +3997,9 @@
3890
3997
 
3891
3998
  <t t-name="o_spreadsheet.Section">
3892
3999
  <div class="o-section" t-att-class="props.class">
3893
- <t t-if="props.slots.title">
4000
+ <t t-if="props.slots.title or props.title">
3894
4001
  <div class="o-section-title">
4002
+ <t t-esc="props.title"/>
3895
4003
  <t t-slot="title"/>
3896
4004
  </div>
3897
4005
  </t>
@@ -3991,8 +4099,7 @@
3991
4099
 
3992
4100
  <t t-name="o-spreadsheet-ConditionalFormattingEditor">
3993
4101
  <div class="o-cf-ruleEditor">
3994
- <Section class="'o-cf-range pb-0'">
3995
- <t t-set-slot="title">Apply to range</t>
4102
+ <Section class="'o-cf-range pb-0'" title.translate="Apply to range">
3996
4103
  <div class="o-selection-cf">
3997
4104
  <SelectionInput
3998
4105
  ranges="state.currentCF.ranges"
@@ -4003,8 +4110,7 @@
4003
4110
  />
4004
4111
  </div>
4005
4112
  </Section>
4006
- <Section class="'pb-0'">
4007
- <t t-set-slot="title">Format rules</t>
4113
+ <Section class="'pb-0'" title.translate="Format rules">
4008
4114
  <div class="o-cf-type-selector">
4009
4115
  <BadgeSelection
4010
4116
  choices="cfTypesValues"
@@ -4297,7 +4403,7 @@
4297
4403
  </t>
4298
4404
  <div class="o-cf-preview-description">
4299
4405
  <div class="o-cf-preview-ruletype">
4300
- <div class="o-cf-preview-description-rule text-truncate">
4406
+ <div class="o-cf-preview-description-rule o-fw-bold text-truncate">
4301
4407
  <t t-esc="getDescription(cf)"/>
4302
4408
  </div>
4303
4409
  </div>
@@ -4354,8 +4460,7 @@
4354
4460
 
4355
4461
  <t t-name="o-spreadsheet-CustomCurrencyPanel">
4356
4462
  <div class="o-custom-currency">
4357
- <Section t-if="availableCurrencies.length > 1">
4358
- <t t-set-slot="title">Currency</t>
4463
+ <Section t-if="availableCurrencies.length > 1" title.translate="Currency">
4359
4464
  <select
4360
4465
  class="o-input o-available-currencies"
4361
4466
  t-on-change="(ev) => this.updateSelectCurrency(ev)">
@@ -4390,8 +4495,7 @@
4390
4495
  />
4391
4496
  </div>
4392
4497
  </Section>
4393
- <Section>
4394
- <t t-set-slot="title">Format</t>
4498
+ <Section title.translate="Format">
4395
4499
  <select
4396
4500
  class="o-input o-format-proposals mb-1"
4397
4501
  t-on-change="(ev) => this.updateSelectFormat(ev)"
@@ -4415,7 +4519,7 @@
4415
4519
  <table>
4416
4520
  <t t-foreach="getFormatExamples()" t-as="example" t-key="example_index">
4417
4521
  <tr>
4418
- <td class="pe-3 fw-bolder" t-esc="example.label"/>
4522
+ <td class="pe-3 o-fw-bold" t-esc="example.label"/>
4419
4523
  <td t-esc="example.value"/>
4420
4524
  </tr>
4421
4525
  </t>
@@ -4575,8 +4679,7 @@
4575
4679
 
4576
4680
  <t t-name="o-spreadsheet-DataValidationEditor">
4577
4681
  <div class="o-dv-form w-100 h-100">
4578
- <Section class="'o-dv-range'">
4579
- <t t-set-slot="title">Apply to range</t>
4682
+ <Section class="'o-dv-range'" title.translate="Apply to range">
4580
4683
  <SelectionInput
4581
4684
  ranges="state.rule.ranges"
4582
4685
  onSelectionChanged="(ranges) => this.onRangesChanged(ranges)"
@@ -4602,8 +4705,7 @@
4602
4705
  </div>
4603
4706
  </Section>
4604
4707
 
4605
- <Section class="'o-dv-invalid-option pt-0'">
4606
- <t t-set-slot="title">If the data is invalid</t>
4708
+ <Section class="'o-dv-invalid-option pt-0'" title.translate="If the data is invalid">
4607
4709
  <select class="o-dv-reject-input o-input" t-on-change="changeRuleIsBlocking">
4608
4710
  <option t-att-selected="!state.rule.isBlocking" value="false">Show a warning</option>
4609
4711
  <option t-att-selected="state.rule.isBlocking" value="true">Reject the input</option>
@@ -4628,7 +4730,7 @@
4628
4730
  <div class="o-dv-preview p-3" t-on-click="props.onClick" t-ref="dvPreview">
4629
4731
  <div class="d-flex justify-content-between">
4630
4732
  <div class="o-dv-container d-flex flex-column">
4631
- <div class="o-dv-preview-description fw-bold text-truncate" t-esc="descriptionString"/>
4733
+ <div class="o-dv-preview-description o-fw-bold text-truncate" t-esc="descriptionString"/>
4632
4734
  <div class="o-dv-preview-ranges text-truncate" t-esc="rangesString"/>
4633
4735
  </div>
4634
4736
  <div
@@ -4642,8 +4744,7 @@
4642
4744
 
4643
4745
  <t t-name="o-spreadsheet-FindAndReplacePanel">
4644
4746
  <div class="o-find-and-replace">
4645
- <Section>
4646
- <t t-set-slot="title">Search</t>
4747
+ <Section title.translate="Search">
4647
4748
  <div class="o-input-search-container">
4648
4749
  <input
4649
4750
  type="text"
@@ -4718,8 +4819,7 @@
4718
4819
  <ValidationMessages msgType="'info'" messages="searchInfo" singleBox="true"/>
4719
4820
  </div>
4720
4821
  </Section>
4721
- <Section class="'pt-0'" t-if="!env.model.getters.isReadonly()">
4722
- <t t-set-slot="title">Replace</t>
4822
+ <Section class="'pt-0'" t-if="!env.model.getters.isReadonly()" title.translate="Replace">
4723
4823
  <div class="o-input-search-container">
4724
4824
  <input
4725
4825
  type="text"
@@ -4766,22 +4866,6 @@
4766
4866
  </div>
4767
4867
  </t>
4768
4868
 
4769
- <t t-name="o-spreadsheet-EditableName">
4770
- <t t-if="state.isEditing">
4771
- <div>
4772
- <input type="text" class="o-input o_sp_en_name" t-model="state.name"/>
4773
- </div>
4774
- <div class="o-button-link o_sp_en_save" t-on-click="save">Save</div>
4775
- </t>
4776
- <t t-else="">
4777
- <div class="o_sp_en_display_name" t-esc="props.displayName"/>
4778
- <div class="o-button-link o_sp_en_rename" t-on-click="rename">
4779
- <i class="fa fa-pencil me-1"/>
4780
- Rename
4781
- </div>
4782
- </t>
4783
- </t>
4784
-
4785
4869
  <t t-name="o-spreadsheet-PivotDeferUpdate">
4786
4870
  <Section
4787
4871
  class="'align-items-center border-top d-flex flex-row justify-content-between py-1 pivot-defer-update'">
@@ -4845,9 +4929,9 @@
4845
4929
  t-if="props.onNameUpdated"
4846
4930
  value="props.dimension.displayName"
4847
4931
  onChange.bind="updateName"
4848
- class="'fw-bold'"
4932
+ class="'o-fw-bold'"
4849
4933
  />
4850
- <span t-else="1" class="fw-bold" t-esc="props.dimension.displayName"/>
4934
+ <span t-else="1" class="o-fw-bold" t-esc="props.dimension.displayName"/>
4851
4935
  </div>
4852
4936
  <div class="d-flex flex-rows">
4853
4937
  <t t-slot="upper-right-icons"/>
@@ -4905,9 +4989,9 @@
4905
4989
  </t>
4906
4990
 
4907
4991
  <t t-name="o-spreadsheet-PivotLayoutConfigurator">
4908
- <div class="o_side_panel_section pivot-dimensions o-section" t-ref="pivot-dimensions">
4992
+ <div class="pivot-dimensions o-section" t-ref="pivot-dimensions">
4909
4993
  <div
4910
- class="fw-bold py-1 d-flex flex-row justify-content-between align-items-center o-section-title">
4994
+ class="o-fw-bold py-1 d-flex flex-row justify-content-between align-items-center o-section-title">
4911
4995
  Columns
4912
4996
  <AddDimensionButton
4913
4997
  onFieldPicked.bind="addColumnDimension"
@@ -4932,7 +5016,7 @@
4932
5016
  </div>
4933
5017
  </t>
4934
5018
  <div
4935
- class="fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center o-section-title"
5019
+ class="o-fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center o-section-title"
4936
5020
  t-att-style="dragAndDrop.itemsStyle['__rows_title__']">
4937
5021
  Rows
4938
5022
  <AddDimensionButton
@@ -4958,7 +5042,7 @@
4958
5042
  </div>
4959
5043
  </t>
4960
5044
  <div
4961
- class="fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center o-section-title o-pivot-measure">
5045
+ class="o-fw-bold pt-4 pb-1 d-flex flex-row justify-content-between align-items-center o-section-title o-pivot-measure">
4962
5046
  Measures
4963
5047
  <AddDimensionButton onFieldPicked.bind="addMeasureDimension" fields="props.measureFields">
4964
5048
  <div
@@ -5040,8 +5124,7 @@
5040
5124
  </t>
5041
5125
 
5042
5126
  <t t-name="o-spreadsheet-PivotMeasureDisplayPanel">
5043
- <Section>
5044
- <t t-set-slot="title">Show measure as:</t>
5127
+ <Section title.translate="Show measure as:">
5045
5128
  <select
5046
5129
  class="o-pivot-measure-display-type o-input"
5047
5130
  t-on-change="(ev) => this.store.updateMeasureDisplayType(ev.target.value)">
@@ -5059,8 +5142,7 @@
5059
5142
  />
5060
5143
  </Section>
5061
5144
 
5062
- <Section t-if="store.doesDisplayNeedsField">
5063
- <t t-set-slot="title">Base field:</t>
5145
+ <Section t-if="store.doesDisplayNeedsField" title.translate="Base field:">
5064
5146
  <div class="o-pivot-measure-display-field w-100 py-1 px-3">
5065
5147
  <t t-if="store.fields.length">
5066
5148
  <RadioSelection
@@ -5078,8 +5160,7 @@
5078
5160
  </Section>
5079
5161
 
5080
5162
  <t t-set="values" t-value="store.values"/>
5081
- <Section t-if="store.doesDisplayNeedsValue and values.length">
5082
- <t t-set-slot="title">Base item:</t>
5163
+ <Section t-if="store.doesDisplayNeedsValue and values.length" title.translate="Base item:">
5083
5164
  <div class="o-pivot-measure-display-value w-100 py-1 px-3">
5084
5165
  <RadioSelection
5085
5166
  choices="values"
@@ -5107,8 +5188,7 @@
5107
5188
  <div class="d-flex flex-column h-100 justify-content-between overflow-hidden">
5108
5189
  <div class="h-100 position-relative overflow-x-hidden overflow-y-auto">
5109
5190
  <PivotTitleSection pivotId="props.pivotId" flipAxis.bind="flipAxis"/>
5110
- <Section>
5111
- <t t-set-slot="title">Range</t>
5191
+ <Section title.translate="Range">
5112
5192
  <SelectionInput
5113
5193
  ranges="ranges"
5114
5194
  required="true"
@@ -5173,8 +5253,7 @@
5173
5253
  />
5174
5254
  </Section>
5175
5255
 
5176
- <Section class="'pt-0'">
5177
- <t t-set-slot="title">Columns to analyze</t>
5256
+ <Section class="'pt-0'" title.translate="Columns to analyze">
5178
5257
  <div class="o-checkbox-selection overflow-auto">
5179
5258
  <t t-set="selectAllLabel">Select all</t>
5180
5259
  <Checkbox
@@ -5228,8 +5307,7 @@
5228
5307
 
5229
5308
  <t t-name="o-spreadsheet-SettingsPanel">
5230
5309
  <div class="o-settings-panel">
5231
- <Section>
5232
- <t t-set-slot="title">Locale</t>
5310
+ <Section title.translate="Locale">
5233
5311
  <select class="o-input" t-on-change="(ev) => this.onLocaleChange(ev.target.value)">
5234
5312
  <option
5235
5313
  t-foreach="supportedLocales"
@@ -5242,19 +5320,19 @@
5242
5320
  </select>
5243
5321
  <div class="o-locale-preview mt-4 p-3 rounded">
5244
5322
  <div>
5245
- <span class="fw-bold me-1">Number:</span>
5323
+ <span class="o-fw-bold me-1">Number:</span>
5246
5324
  <span t-esc="numberFormatPreview"/>
5247
5325
  </div>
5248
5326
  <div>
5249
- <span class="fw-bold me-1">Date:</span>
5327
+ <span class="o-fw-bold me-1">Date:</span>
5250
5328
  <span t-esc="dateFormatPreview"/>
5251
5329
  </div>
5252
5330
  <div>
5253
- <span class="fw-bold me-1">Date time:</span>
5331
+ <span class="o-fw-bold me-1">Date time:</span>
5254
5332
  <span t-esc="dateTimeFormatPreview"/>
5255
5333
  </div>
5256
5334
  <div>
5257
- <span class="fw-bold me-1">First day of week:</span>
5335
+ <span class="o-fw-bold me-1">First day of week:</span>
5258
5336
  <span t-esc="firstDayOfWeek"/>
5259
5337
  </div>
5260
5338
  </div>
@@ -5269,7 +5347,7 @@
5269
5347
  <t t-name="o-spreadsheet-SidePanel">
5270
5348
  <div class="o-sidePanel" t-if="sidePanelStore.isOpen">
5271
5349
  <div class="o-sidePanelHeader">
5272
- <div class="o-sidePanelTitle o-heading-3" t-esc="getTitle()"/>
5350
+ <div class="o-sidePanelTitle o-fw-bold" t-esc="getTitle()"/>
5273
5351
  <div class="o-sidePanelClose" t-on-click="close">✕</div>
5274
5352
  </div>
5275
5353
  <div class="o-sidePanelBody-container d-flex flex-grow-1 ">
@@ -5302,8 +5380,7 @@
5302
5380
 
5303
5381
  <t t-name="o-spreadsheet-SplitIntoColumnsPanel">
5304
5382
  <div class="o-split-to-cols-panel">
5305
- <Section>
5306
- <t t-set-slot="title">Separator</t>
5383
+ <Section title.translate="Separator">
5307
5384
  <select class="o-input mb-3" t-on-change="(ev) => this.onSeparatorChange(ev.target.value)">
5308
5385
  <option
5309
5386
  t-foreach="separators"
@@ -5350,8 +5427,7 @@
5350
5427
 
5351
5428
  <t t-name="o-spreadsheet-TablePanel">
5352
5429
  <div class="o-table-panel">
5353
- <Section>
5354
- <t t-set-slot="title">Style options</t>
5430
+ <Section title.translate="Style options">
5355
5431
  <div class="d-flex flex-row">
5356
5432
  <div class="w-50">
5357
5433
  <div class="d-flex align-items-center">
@@ -5415,8 +5491,7 @@
5415
5491
  <Section>
5416
5492
  <TableStylePicker table="props.table"/>
5417
5493
  </Section>
5418
- <Section>
5419
- <t t-set-slot="title">Data range</t>
5494
+ <Section title.translate="Data range">
5420
5495
  <SelectionInput
5421
5496
  t-key="props.table.type"
5422
5497
  ranges="[this.state.tableXc]"
@@ -5464,16 +5539,13 @@
5464
5539
 
5465
5540
  <t t-name="o-spreadsheet-TableStyleEditorPanel">
5466
5541
  <div class="o-table-style-editor-panel">
5467
- <Section>
5468
- <t t-set-slot="title">Style name</t>
5542
+ <Section title.translate="Style name">
5469
5543
  <input type="text" class="o-input" t-model="state.styleName"/>
5470
5544
  </Section>
5471
- <Section class="'pt-1'">
5472
- <t t-set-slot="title">Style color</t>
5545
+ <Section class="'pt-1'" title.translate="Style color">
5473
5546
  <RoundColorPicker currentColor="state.primaryColor" onColorPicked.bind="onColorPicked"/>
5474
5547
  </Section>
5475
- <Section class="'pt-1'">
5476
- <t t-set-slot="title">Style template</t>
5548
+ <Section class="'pt-1'" title.translate="Style template">
5477
5549
  <div class="d-flex flex-wrap">
5478
5550
  <t t-foreach="tableTemplates" t-as="templateName" t-key="templateName">
5479
5551
  <TableStylePreview
@@ -5502,11 +5574,7 @@
5502
5574
  </t>
5503
5575
 
5504
5576
  <t t-name="o-spreadsheet-Spreadsheet">
5505
- <div
5506
- class="o-spreadsheet"
5507
- t-on-keydown="(ev) => !env.isDashboard() and this.onKeydown(ev)"
5508
- t-ref="spreadsheet"
5509
- t-att-style="getStyle()">
5577
+ <div class="o-spreadsheet" t-ref="spreadsheet" t-att-style="getStyle()">
5510
5578
  <t t-if="env.isDashboard()">
5511
5579
  <SpreadsheetDashboard/>
5512
5580
  </t>