@odoo/o-spreadsheet 19.1.0-alpha.1 → 19.1.0-alpha.11

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 19.1.0-alpha.1
5
- @date 2025-09-12T13:34:33.243Z
6
- @hash d3e4e7b
4
+ @version 19.1.0-alpha.11
5
+ @date 2025-11-03T12:35:22.290Z
6
+ @hash d9230f3
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -153,6 +153,21 @@
153
153
  </Popover>
154
154
  </t>
155
155
 
156
+ <div t-name="o-spreadsheet-TopBarZoom" t-ref="buttonRef" t-on-click.stop="">
157
+ <NumberEditor
158
+ currentValue="currentFontSize"
159
+ onValueChange.bind="this.setZoom"
160
+ class="props.class"
161
+ onToggle.bind="this.toggle"
162
+ onFocusInput.bind="this.onFocusInput"
163
+ valueIcon="'%'"
164
+ min="25"
165
+ max="300"
166
+ valueList="valueList"
167
+ title.translate="Zoom"
168
+ />
169
+ </div>
170
+
156
171
  <div t-name="o-spreadsheet-NumberFormatsTool" t-ref="buttonRef" t-on-click.stop="">
157
172
  <ActionButton
158
173
  action="formatNumberMenuItemSpec"
@@ -215,22 +230,20 @@
215
230
  </div>
216
231
  </t>
217
232
 
218
- <div t-name="o-spreadsheet-TextInput" class="w-100">
233
+ <t t-name="o-spreadsheet-TextInput">
219
234
  <input
220
- t-ref="input"
221
- class="os-input w-100"
222
235
  type="text"
236
+ t-ref="{{refName}}"
223
237
  t-att-class="inputClass"
224
238
  t-att-id="props.id"
225
239
  t-att-placeholder="props.placeholder"
226
- t-att-value="props.value"
227
240
  t-on-change="save"
228
241
  t-on-blur="save"
229
242
  t-on-pointerdown="onMouseDown"
230
243
  t-on-pointerup="onMouseUp"
231
244
  t-on-keydown="onKeyDown"
232
245
  />
233
- </div>
246
+ </t>
234
247
 
235
248
  <t t-name="o-spreadsheet-TableStylesPopover">
236
249
  <Popover t-if="props.popoverProps" t-props="props.popoverProps">
@@ -361,7 +374,7 @@
361
374
  t-att-style="getStyle()">
362
375
  <t t-if="env.isDashboard()">
363
376
  <SpreadsheetDashboard getGridSize.bind="getGridSize"/>
364
- <FullScreenChart/>
377
+ <FullScreenFigure/>
365
378
  </t>
366
379
  <t t-else="">
367
380
  <div class="o-spreadsheet-topbar-wrapper o-two-columns">
@@ -398,9 +411,14 @@
398
411
  <RibbonMenu onClose="() => this.menuState.isOpen=false"/>
399
412
  </t>
400
413
  <t t-else="">
401
- <div class="o-small-composer px-2 py-2">
414
+ <div class="o-small-composer px-2 py-2 position-relative">
402
415
  <div class="w-100" t-ref="bottombarComposer">
403
416
  <Composer t-props="composerProps"/>
417
+ <span
418
+ t-if="showFxIcon"
419
+ class="position-absolute top-50 translate-middle-y ps-2 pe-none">
420
+ <t t-call="o-spreadsheet-Icon.FX_SVG"/>
421
+ </span>
404
422
  </div>
405
423
  <span
406
424
  class="align-items-center d-flex justify-content-center o-selection-button"
@@ -448,7 +466,10 @@
448
466
  </div>
449
467
  <span class="d-flex align-items-center" t-esc="state.title"/>
450
468
  </div>
451
- <div class="o-ribbon-menu-wrapper overflow-auto">
469
+ <div
470
+ class="o-ribbon-menu-wrapper overflow-auto"
471
+ t-ref="container"
472
+ t-on-scroll="updateShadows">
452
473
  <Menu t-props="menuProps"/>
453
474
  </div>
454
475
  </div>
@@ -506,12 +527,12 @@
506
527
  value="tableConfig.numberOfHeaders > 0"
507
528
  onChange.bind="this.updateHasHeaders"
508
529
  />
509
- <input
530
+ <NumberInput
510
531
  t-if="tableConfig.numberOfHeaders > 0"
511
- t-att-value="tableConfig.numberOfHeaders"
512
- type="number"
513
- class="o-table-n-of-headers ms-2 o-input"
514
- t-on-change="onChangeNumberOfHeaders"
532
+ value="tableConfig.numberOfHeaders"
533
+ class="'o-table-n-of-headers ms-2'"
534
+ min="0"
535
+ onChange.bind="onChangeNumberOfHeaders"
515
536
  />
516
537
  </div>
517
538
  <Checkbox
@@ -856,12 +877,43 @@
856
877
  <CogWheelMenu items="cogWheelMenuItems"/>
857
878
  </div>
858
879
  </t>
859
- <TextInput class="'os-pivot-title'" value="name" onChange.bind="onNameChanged"/>
880
+ <TextInput
881
+ class="'os-pivot-title'"
882
+ value="name"
883
+ onChange.bind="onNameChanged"
884
+ selectContentOnFocus="true"
885
+ />
860
886
  </Section>
861
887
  </t>
862
888
 
863
889
  <t t-name="o-spreadsheet-PivotSidePanel">
864
- <t t-component="sidePanelEditor" t-props="props"/>
890
+ <div class="d-flex flex-column h-100">
891
+ <div class="o-panel d-flex">
892
+ <div
893
+ class="o-sidePanel-tab o-panel-configuration d-flew flex-grow-1 text-center"
894
+ t-att-class="state.panel !== 'configuration' ? 'inactive' : ''"
895
+ t-on-click="switchPanel.bind(this, 'configuration')">
896
+ <i class="fa fa-sliders me-1"/>
897
+ Configuration
898
+ </div>
899
+ <div
900
+ class="o-sidePanel-tab o-panel-design d-flew flex-grow-1 text-center"
901
+ t-att-class="state.panel !== 'design' ? 'inactive' : ''"
902
+ t-on-click="switchPanel.bind(this, 'design')">
903
+ <i class="fa fa-paint-brush me-1"/>
904
+ Design
905
+ </div>
906
+ </div>
907
+
908
+ <div class="o-panel-content overflow-y-auto h-100" t-ref="panelContent">
909
+ <div class="h-100" t-att-class="{ 'd-none': state.panel !== 'configuration' }">
910
+ <t t-component="sidePanelEditor" t-props="props"/>
911
+ </div>
912
+ <div t-att-class="state.panel !== 'design' ? 'd-none' : ''">
913
+ <PivotDesignPanel pivotId="props.pivotId"/>
914
+ </div>
915
+ </div>
916
+ </div>
865
917
  </t>
866
918
 
867
919
  <t t-name="o-spreadsheet-PivotSpreadsheetSidePanel">
@@ -913,6 +965,69 @@
913
965
  </div>
914
966
  </t>
915
967
 
968
+ <t t-name="o-spreadsheet-PivotDesignPanel">
969
+ <Section class="'o-pivot-design'" title.translate="Display options">
970
+ <div>
971
+ <div class="container-fluid p-0 pt-2">
972
+ <div class="row mb-2 align-items-center">
973
+ <div class="col-6">Max rows:</div>
974
+ <div class="col-6 d-flex align-items-center">
975
+ <input
976
+ t-att-value="pivotStyle.numberOfRows ?? ''"
977
+ type="number"
978
+ class="o-pivot-n-of-rows o-input"
979
+ placeholder="e.g. 10"
980
+ t-on-change="(ev) => this.updatePivotStyleProperty('numberOfRows', ev.target.valueAsNumber)"
981
+ />
982
+ </div>
983
+ </div>
984
+ <div class="row mb-2 align-items-center">
985
+ <div class="col-6">Max columns:</div>
986
+ <div class="col-6 d-flex align-items-center">
987
+ <input
988
+ t-att-value="pivotStyle.numberOfColumns ?? ''"
989
+ type="number"
990
+ class="o-pivot-n-of-columns o-input"
991
+ placeholder="e.g. 5"
992
+ t-on-change="(ev) => this.updatePivotStyleProperty('numberOfColumns', ev.target.valueAsNumber)"
993
+ />
994
+ </div>
995
+ </div>
996
+ <div class="row mb-2 align-items-center">
997
+ <div class="col-6">Show totals:</div>
998
+ <div class="col-6 d-flex align-items-center">
999
+ <Checkbox
1000
+ name="'displayTotals'"
1001
+ value="pivotStyle.displayTotals ?? defaultStyle.displayTotals"
1002
+ onChange="(val) => this.updatePivotStyleProperty('displayTotals', val)"
1003
+ />
1004
+ </div>
1005
+ </div>
1006
+ <div class="row mb-2 align-items-center">
1007
+ <div class="col-6">Show column titles:</div>
1008
+ <div class="col-6 d-flex align-items-center">
1009
+ <Checkbox
1010
+ name="'displayColumnHeaders'"
1011
+ value="pivotStyle.displayColumnHeaders ?? defaultStyle.displayColumnHeaders"
1012
+ onChange="(val) => this.updatePivotStyleProperty('displayColumnHeaders', val)"
1013
+ />
1014
+ </div>
1015
+ </div>
1016
+ <div class="row mb-2 align-items-center">
1017
+ <div class="col-6">Show measure titles:</div>
1018
+ <div class="col-6 d-flex align-items-center">
1019
+ <Checkbox
1020
+ name="'displayMeasuresRow'"
1021
+ value="pivotStyle.displayMeasuresRow ?? defaultStyle.displayMeasuresRow"
1022
+ onChange="(val) => this.updatePivotStyleProperty('displayMeasuresRow', val)"
1023
+ />
1024
+ </div>
1025
+ </div>
1026
+ </div>
1027
+ </div>
1028
+ </Section>
1029
+ </t>
1030
+
916
1031
  <t t-name="o-spreadsheet-PivotMeasureDisplayPanel">
917
1032
  <Section title.translate="Show measure as:">
918
1033
  <select
@@ -1218,6 +1333,7 @@
1218
1333
  value="props.dimension.displayName"
1219
1334
  onChange.bind="updateName"
1220
1335
  class="'o-fw-bold'"
1336
+ selectContentOnFocus="true"
1221
1337
  />
1222
1338
  <span t-else="1" class="o-fw-bold" t-esc="props.dimension.displayName"/>
1223
1339
  </div>
@@ -1302,6 +1418,7 @@
1302
1418
  <TextInput
1303
1419
  value="group.name"
1304
1420
  onChange="(newName) => this.onRenameGroup(group_index, newName)"
1421
+ selectContentOnFocus="true"
1305
1422
  />
1306
1423
  <i
1307
1424
  class="o-button-icon ps-3 fa fa-trash"
@@ -1505,6 +1622,7 @@
1505
1622
  t-key="state.rule.criterion.type"
1506
1623
  criterion="state.rule.criterion"
1507
1624
  onCriterionChanged.bind="onCriterionChanged"
1625
+ autofocus="state.isTypeUpdated"
1508
1626
  />
1509
1627
  </div>
1510
1628
  </Section>
@@ -1615,6 +1733,7 @@
1615
1733
  onSelectionChanged="(ranges) => this.onRangeChanged(ranges[0])"
1616
1734
  required="true"
1617
1735
  hasSingleRange="true"
1736
+ autofocus="props.autofocus"
1618
1737
  />
1619
1738
  <t t-foreach="values" t-as="value" t-key="value_index">
1620
1739
  <div class="o-dv-list-values p-1 d-flex align-items-center">
@@ -1684,6 +1803,7 @@
1684
1803
  onValueChanged.bind="onValueChanged"
1685
1804
  criterionType="props.criterion.type"
1686
1805
  disableFormulas="props.disableFormulas"
1806
+ focused="props.autofocus"
1687
1807
  />
1688
1808
  </t>
1689
1809
 
@@ -1693,6 +1813,7 @@
1693
1813
  onValueChanged.bind="onFirstValueChanged"
1694
1814
  criterionType="props.criterion.type"
1695
1815
  disableFormulas="props.disableFormulas"
1816
+ focused="props.autofocus"
1696
1817
  />
1697
1818
  <CriterionInput
1698
1819
  value="props.criterion.values[1]"
@@ -1720,6 +1841,7 @@
1720
1841
  onValueChanged.bind="onValueChanged"
1721
1842
  criterionType="props.criterion.type"
1722
1843
  disableFormulas="props.disableFormulas"
1844
+ focused="props.autofocus"
1723
1845
  />
1724
1846
  </t>
1725
1847
 
@@ -2176,6 +2298,7 @@
2176
2298
  t-key="state.rules.cellIs.operator"
2177
2299
  criterion="genericCriterion"
2178
2300
  onCriterionChanged.bind="onRuleValuesChanged"
2301
+ autofocus="this.state.hasEditedCf"
2179
2302
  />
2180
2303
 
2181
2304
  <div class="o-section-subtitle pt-3">Formatting style</div>
@@ -2382,6 +2505,9 @@
2382
2505
  className="'mb-2'"
2383
2506
  />
2384
2507
  </Section>
2508
+ <Section class="'pt-0'" title.translate="Number formatting">
2509
+ <ChartHumanizeNumbers t-props="props"/>
2510
+ </Section>
2385
2511
  </t>
2386
2512
  </GeneralDesignEditor>
2387
2513
  <SeriesWithAxisDesignEditor t-props="props"/>
@@ -2421,7 +2547,7 @@
2421
2547
  className="'mb-2'"
2422
2548
  />
2423
2549
  </Section>
2424
- <Section class="'pt-1'" title.translate="Number formatting">
2550
+ <Section class="'pt-0'" title.translate="Number formatting">
2425
2551
  <ChartHumanizeNumbers t-props="props"/>
2426
2552
  </Section>
2427
2553
  </t>
@@ -2560,6 +2686,9 @@
2560
2686
  hasVerticalAlign="true"
2561
2687
  />
2562
2688
  </Section>
2689
+ <Section class="'pt-0'" title.translate="Number formatting">
2690
+ <ChartHumanizeNumbers t-props="props"/>
2691
+ </Section>
2563
2692
  </t>
2564
2693
  </SidePanelCollapsible>
2565
2694
  </t>
@@ -2620,6 +2749,9 @@
2620
2749
  <GeneralDesignEditor t-props="props">
2621
2750
  <t t-set-slot="general-extension">
2622
2751
  <ChartLegend t-props="props"/>
2752
+ <Section class="'pt-0'" title.translate="Number formatting">
2753
+ <ChartHumanizeNumbers t-props="props"/>
2754
+ </Section>
2623
2755
  </t>
2624
2756
  </GeneralDesignEditor>
2625
2757
 
@@ -2671,7 +2803,7 @@
2671
2803
  <t t-set="color_down">Color Down</t>
2672
2804
  <GeneralDesignEditor t-props="props" defaultChartTitleFontSize="defaultScorecardTitleFontSize">
2673
2805
  <t t-set-slot="general-extension">
2674
- <Section class="'pt-1'" title.translate="Number formatting">
2806
+ <Section class="'pt-0'" title.translate="Number formatting">
2675
2807
  <ChartHumanizeNumbers t-props="props"/>
2676
2808
  </Section>
2677
2809
  </t>
@@ -2785,7 +2917,7 @@
2785
2917
  <ChartShowValues t-props="props"/>
2786
2918
  <ChartShowDataMarkers t-props="props"/>
2787
2919
  </Section>
2788
- <Section class="'pt-1'" title.translate="Number formatting">
2920
+ <Section class="'pt-0'" title.translate="Number formatting">
2789
2921
  <ChartHumanizeNumbers t-props="props"/>
2790
2922
  </Section>
2791
2923
  </t>
@@ -2800,7 +2932,7 @@
2800
2932
  <Section class="'pt-0'" title.translate="Values">
2801
2933
  <ChartShowValues t-props="props"/>
2802
2934
  </Section>
2803
- <Section class="'pt-1'" title.translate="Number formatting">
2935
+ <Section class="'pt-0'" title.translate="Number formatting">
2804
2936
  <ChartHumanizeNumbers t-props="props"/>
2805
2937
  </Section>
2806
2938
  <PieHoleSize
@@ -2814,19 +2946,19 @@
2814
2946
 
2815
2947
  <t t-name="o-spreadsheet-ChartPanel">
2816
2948
  <div class="o-chart d-flex flex-column h-100" t-if="chartId">
2817
- <div class="o-panel">
2949
+ <div class="o-panel d-flex">
2818
2950
  <div
2819
- class="o-panel-element o-panel-configuration"
2951
+ class="o-sidePanel-tab o-panel-configuration d-flew flex-grow-1 text-center"
2820
2952
  t-att-class="store.panel !== 'configuration' ? 'inactive' : ''"
2821
2953
  t-on-click="switchPanel.bind(this, 'configuration')">
2822
- <i class="fa fa-sliders"/>
2954
+ <i class="fa fa-sliders me-1"/>
2823
2955
  Configuration
2824
2956
  </div>
2825
2957
  <div
2826
- class="o-panel-element o-panel-design"
2958
+ class="o-sidePanel-tab o-panel-design d-flew flex-grow-1 text-center"
2827
2959
  t-att-class="store.panel !== 'design' ? 'inactive' : ''"
2828
2960
  t-on-click="switchPanel.bind(this, 'design')">
2829
- <i class="fa fa-paint-brush"/>
2961
+ <i class="fa fa-paint-brush me-1"/>
2830
2962
  Design
2831
2963
  </div>
2832
2964
  </div>
@@ -2875,7 +3007,7 @@
2875
3007
  className="'mb-2'"
2876
3008
  />
2877
3009
  </Section>
2878
- <Section class="'pt-1'" title.translate="Number formatting">
3010
+ <Section class="'pt-0'" title.translate="Number formatting">
2879
3011
  <ChartHumanizeNumbers t-props="props"/>
2880
3012
  </Section>
2881
3013
  </t>
@@ -2984,7 +3116,7 @@
2984
3116
  <option value="left">Bottom left</option>
2985
3117
  </select>
2986
3118
  </Section>
2987
- <Section class="'pt-1'" title.translate="Number formatting">
3119
+ <Section class="'pt-0'" title.translate="Number formatting">
2988
3120
  <ChartHumanizeNumbers t-props="props"/>
2989
3121
  </Section>
2990
3122
  </t>
@@ -3077,7 +3209,7 @@
3077
3209
  <t t-name="o-spreadsheet-GaugeChartDesignPanel">
3078
3210
  <GeneralDesignEditor t-props="props">
3079
3211
  <t t-set-slot="general-extension">
3080
- <Section class="'pt-1'" title.translate="Number formatting">
3212
+ <Section class="'pt-0'" title.translate="Number formatting">
3081
3213
  <ChartHumanizeNumbers t-props="props"/>
3082
3214
  </Section>
3083
3215
  </t>
@@ -3223,7 +3355,7 @@
3223
3355
  <Section class="'pt-0'" title.translate="Values">
3224
3356
  <ChartShowValues t-props="props"/>
3225
3357
  </Section>
3226
- <Section class="'pt-1'" title.translate="Number formatting">
3358
+ <Section class="'pt-0'" title.translate="Number formatting">
3227
3359
  <ChartHumanizeNumbers t-props="props"/>
3228
3360
  </Section>
3229
3361
  </t>
@@ -3263,7 +3395,7 @@
3263
3395
  className="'mb-2'"
3264
3396
  />
3265
3397
  </Section>
3266
- <Section class="'pt-1'" title.translate="Number formatting">
3398
+ <Section class="'pt-0'" title.translate="Number formatting">
3267
3399
  <ChartHumanizeNumbers t-props="props"/>
3268
3400
  </Section>
3269
3401
  </t>
@@ -3813,11 +3945,11 @@
3813
3945
  </div>
3814
3946
  <div class="w-50 ms-3" t-if="trendType === 'trailingMovingAverage'">
3815
3947
  <span class="o-section-subtitle">Window</span>
3816
- <input
3817
- t-att-value="trend.window || this.defaultWindowSize"
3818
- type="number"
3819
- class="w-100 o-input trend-window-input"
3820
- t-on-change="(ev) => this.onChangeMovingAverageWindow(index, ev)"
3948
+ <NumberInput
3949
+ value="trend.window || this.defaultWindowSize"
3950
+ class="'w-100 trend-window-input'"
3951
+ min="2"
3952
+ onChange="(value) => this.onChangeMovingAverageWindow(index, value)"
3821
3953
  />
3822
3954
  </div>
3823
3955
  <div class="w-50 ms-3" t-if="trendType === 'polynomial'">
@@ -3890,13 +4022,12 @@
3890
4022
  <t t-name="o-spreadsheet.PieHoleSize">
3891
4023
  <Section class="'pt-0'" title.translate="Center radius">
3892
4024
  <div class="d-flex flex-row">
3893
- <input
3894
- t-att-value="props.value"
3895
- type="number"
3896
- class="o-input o-pie-hole-size-input"
4025
+ <NumberInput
4026
+ value="props.value"
4027
+ class="'o-pie-hole-size-input'"
3897
4028
  min="0"
3898
4029
  max="95"
3899
- t-on-change="(ev) => debouncedOnChange(ev.target.value)"
4030
+ onChange.bind="onChange"
3900
4031
  />
3901
4032
  %
3902
4033
  </div>
@@ -3943,7 +4074,8 @@
3943
4074
  <t t-name="o-spreadsheet-ChartHumanizeNumbers">
3944
4075
  <Checkbox
3945
4076
  name="'humanizeNumbers'"
3946
- label.translate="Make numbers human-readable"
4077
+ label.translate="Use compact format"
4078
+ title="title"
3947
4079
  value="props.definition.humanize ?? true"
3948
4080
  onChange="(humanize) => props.updateChart(this.props.chartId, { humanize })"
3949
4081
  />
@@ -4043,12 +4175,11 @@
4043
4175
 
4044
4176
  <t t-name="o-spreadsheet.ChartTitle">
4045
4177
  <Section class="'o-chart-title'" title="props.name">
4046
- <input
4047
- type="text"
4048
- class="o-input"
4049
- t-att-value="props.title"
4050
- t-on-change="updateTitle"
4051
- t-att-placeholder="props.placeholder"
4178
+ <TextInput
4179
+ value="props.title"
4180
+ onChange.bind="updateTitle"
4181
+ placeholder="props.placeholder"
4182
+ alwaysShowBorder="true"
4052
4183
  />
4053
4184
  <TextStyler
4054
4185
  style="props.style"
@@ -4118,6 +4249,7 @@
4118
4249
  onChange.bind="updateTitleText"
4119
4250
  placeholder.translate="Add a Title"
4120
4251
  alwaysShowBorder="true"
4252
+ selectContentOnFocus="true"
4121
4253
  />
4122
4254
  <TextStyler
4123
4255
  style="title ?? {}"
@@ -4151,10 +4283,11 @@
4151
4283
  <TextInput
4152
4284
  value="getItemTitle(item)"
4153
4285
  onChange="(newName) => this.renameCarouselItem(item, newName)"
4286
+ selectContentOnFocus="true"
4154
4287
  />
4155
4288
  </div>
4156
4289
  <div class="ms-auto"/>
4157
- <div class="flex-shrink-0 d-flex align-self-start me-1">
4290
+ <div class="flex-shrink-0 d-flex me-1">
4158
4291
  <CogWheelMenu items="getCogWheelMenuItems(item)"/>
4159
4292
  </div>
4160
4293
  </div>
@@ -4268,7 +4401,6 @@
4268
4401
  t-att-class="props.class"
4269
4402
  t-ref="popover"
4270
4403
  t-on-wheel="props.onMouseWheel"
4271
- t-att-style="popoverStyle"
4272
4404
  t-on-click.stop="">
4273
4405
  <div class="o-popover-content" t-ref="popoverContent">
4274
4406
  <t t-slot="default"/>
@@ -4340,6 +4472,60 @@
4340
4472
  </span>
4341
4473
  </t>
4342
4474
 
4475
+ <t t-name="o-spreadsheet-NumberInput">
4476
+ <input
4477
+ type="number"
4478
+ t-ref="{{refName}}"
4479
+ t-att-class="inputClass"
4480
+ t-att-id="props.id"
4481
+ t-att-placeholder="props.placeholder"
4482
+ t-on-change="save"
4483
+ t-on-blur="save"
4484
+ t-on-pointerdown="onMouseDown"
4485
+ t-on-pointerup="onMouseUp"
4486
+ t-on-keydown="onKeyDown"
4487
+ t-att-min="props.min"
4488
+ t-att-max="props.max"
4489
+ />
4490
+ </t>
4491
+
4492
+ <t t-name="o-spreadsheet-NumberEditor">
4493
+ <div class="o-dropdown" t-ref="NumberEditor">
4494
+ <div
4495
+ class="o-number-editor d-flex align-items-center"
4496
+ t-att-class="props.class"
4497
+ t-att-title="props.title"
4498
+ t-on-click="this.toggleList">
4499
+ <input
4500
+ type="number"
4501
+ t-att-min="props.min"
4502
+ t-att-max="props.max"
4503
+ class="o-font-size o-number-input bg-transparent border-0"
4504
+ t-on-keydown="onInputKeydown"
4505
+ t-on-wheel.prevent.stop=""
4506
+ t-on-click.stop="props.onFocusInput"
4507
+ t-on-focus.stop="onInputFocused"
4508
+ t-on-change="setValueFromInput"
4509
+ t-ref="inputNumber"
4510
+ />
4511
+ <t t-esc="props.valueIcon"/>
4512
+ <span>
4513
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
4514
+ </span>
4515
+ </div>
4516
+ <Popover t-if="dropdown.isOpen" t-props="popoverProps">
4517
+ <div class="o-text-options bg-white" t-on-click.stop="" t-ref="numberList">
4518
+ <t t-foreach="props.valueList" t-as="value" t-key="value">
4519
+ <div t-att-data-size="value" t-on-click="() => this.setValueFromList(value)">
4520
+ <t t-esc="value"/>
4521
+ <t t-esc="props.valueIcon"/>
4522
+ </div>
4523
+ </t>
4524
+ </div>
4525
+ </Popover>
4526
+ </div>
4527
+ </t>
4528
+
4343
4529
  <t t-name="o-spreadsheet-Menu-Popover">
4344
4530
  <Popover t-if="props.menuItems" t-props="popoverProps">
4345
4531
  <div t-ref="menu" class="o-menu-wrapper" t-on-mouseover="() => this.onMouseOverMainMenu()">
@@ -5276,6 +5462,11 @@
5276
5462
  <i class="fa fa-search"/>
5277
5463
  </div>
5278
5464
  </t>
5465
+ <t t-name="o-spreadsheet-Icon.ZOOM">
5466
+ <div class="o-icon">
5467
+ <i class="fa fa-search-plus"/>
5468
+ </div>
5469
+ </t>
5279
5470
  <t t-name="o-spreadsheet-Icon.CHECK">
5280
5471
  <svg class="o-icon" viewBox="0 0 24 24">
5281
5472
  <path
@@ -5333,7 +5524,7 @@
5333
5524
  </svg>
5334
5525
  </t>
5335
5526
  <t t-name="o-spreadsheet-Icon.COG">
5336
- <svg fill="currentColor" viewBox="0 0 16 16">
5527
+ <svg class="o-icon" fill="currentColor" viewBox="0 0 16 16">
5337
5528
  <path
5338
5529
  d="M8 4.754a3.246 3.246 0 1 0 0 6.492 3.246 3.246 0 0 0 0-6.492zM5.754 8a2.246 2.246 0 1 1 4.492 0 2.246 2.246 0 0 1-4.492 0z"
5339
5530
  />
@@ -5426,7 +5617,7 @@
5426
5617
  </svg>
5427
5618
  </t>
5428
5619
  <t t-name="o-spreadsheet-Icon.EDIT_TABLE">
5429
- <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18">
5620
+ <svg class="o-icon" xmlns="http://www.w3.org/2000/svg" width="18" height="18">
5430
5621
  <path
5431
5622
  fill="currentColor"
5432
5623
  d="M2.5 1A1.5 1.5 0 0 0 1 2.5v11A1.5 1.5 0 0 0 2.5 15H7l1.5-1.5H7v-2.75h3.5v.75l2.25-2.25H12v-2.5h3.5v.75c.1-.2.45-.05.5.02l1 1V2.5A1.5 1.5 0 0 0 15.5 1m-13 1.5h13v2.75h-13m0 1.5h3v2.5h-3M7 6.75h3.5v2.5H7m-4.5 1.5h3v2.75h-3 M8.2 15.7v1.8h1.8l5.4-5.4-1.8-1.8-5.4 5.4Zm8.8-5.2a.5.5 0 0 0 0-.7l-1.1-1.1a.5.5 0 0 0-.7 0l-.9.9 1.8 1.8.9-.9Z"
@@ -5434,7 +5625,7 @@
5434
5625
  </svg>
5435
5626
  </t>
5436
5627
  <t t-name="o-spreadsheet-Icon.DELETE_TABLE">
5437
- <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18">
5628
+ <svg class="o-icon" xmlns="http://www.w3.org/2000/svg" width="18" height="18">
5438
5629
  <path
5439
5630
  fill="currentColor"
5440
5631
  d="M2.5 1A1.5 1.5 0 0 0 1 2.5v11A1.5 1.5 0 0 0 2.5 15H7l1.5-1.5H7V6.75h3.5v.75L12 9V6.75h3.5l1.5 1.5V2.5A1.5 1.5 0 0 0 15.5 1m-13 1.5h13v2.75h-13m0 1.5h3v2.5h-3m0 1.5h3v2.75h-3m10-2.25 3-3 1.5 1.5-3 3 3 3-1.5 1.5-3-3-3 3-1.5-1.5 3-3-3-3 1.5-1.5"
@@ -5442,7 +5633,7 @@
5442
5633
  </svg>
5443
5634
  </t>
5444
5635
  <t t-name="o-spreadsheet-Icon.PAINT_TABLE">
5445
- <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18">
5636
+ <svg class="o-icon" xmlns="http://www.w3.org/2000/svg" width="18" height="18">
5446
5637
  <path
5447
5638
  fill="currentColor"
5448
5639
  d="M2.5 1A1.5 1.5 0 0 0 1 2.5v11A1.5 1.5 0 0 0 2.5 15h5c0-.5 0-1 .5-1.5H7v-2.75h3.5v.75l2.25-2.25H12v-2.5h3.5v.75c1-.7 1.5-.4 1.5-.4V2.5A1.5 1.5 0 0 0 15.5 1m-13 1.5h13v2.75h-13m0 1.5h3v2.5h-3M7 6.75h3.5v2.5H7m-4.5 1.5h3v2.75h-3m7.5-.3c.7-.3 1.5-.1 2.1.6.6.7.8 1.4.5 1.9-.6 1.4-3.7 1.6-4 1.7l-.6.1.3-.5s.5-.8.5-2.1c0-.7.5-1.4 1.1-1.7Zm6.7-5.1a.9.9 0 0 1 1 1c-.1 1.3-2.5 3.7-4.3 5.3a3.9 3.9 0 0 0-.6-1.1c-.4-.4-.8-.7-1.3-.8 1.5-1.7 4-4.3 5.4-4.4"
@@ -5553,6 +5744,30 @@
5553
5744
  />
5554
5745
  </svg>
5555
5746
  </t>
5747
+ <t t-name="o-spreadsheet-Icon.FX_SVG">
5748
+ <svg class="o-icon fx-icon" viewBox="0 0 121.8 122.9">
5749
+ <path
5750
+ fill="currentColor"
5751
+ d='m28 34-4 5v2h10l-6 40c-4 22-6 28-7 30-2 2-3 3-5 3-3 0-7-2-9-4H4c-2 2-4 4-4 7s4 6 8 6 9-2 15-8c8-7 13-17 18-39l7-35 13-1 3-6H49c4-23 7-27 11-27 2 0 5 2 8 6h4c1-1 4-4 4-7 0-2-3-6-9-6-5 0-13 4-20 10-6 7-9 14-11 24h-8zm41 16c4-5 7-7 8-7s2 1 5 9l3 12c-7 11-12 17-16 17l-3-1-2-1c-3 0-6 3-6 7s3 7 7 7c6 0 12-6 22-23l3 10c3 9 6 13 10 13 5 0 11-4 18-15l-3-4c-4 6-7 8-8 8-2 0-4-3-6-10l-5-15 8-10 6-4 3 1 3 2c2 0 6-3 6-7s-2-7-6-7c-6 0-11 5-21 20l-2-6c-3-9-5-14-9-14-5 0-12 6-18 15l3 3z'
5752
+ />
5753
+ </svg>
5754
+ </t>
5755
+ <t t-name="o-spreadsheet-Icon.COLLAPSE">
5756
+ <svg class="o-icon" viewBox="0 0 18 18">
5757
+ <path
5758
+ d="M12.124 2.576a.6.6 0 0 1 0 .848l-2.7 2.7a.6.6 0 0 1-.848 0l-2.7-2.7a.6.6 0 0 1 .848-.848L8.4 4.2V.9a.6.6 0 0 1 1.2 0v3.3l1.676-1.624a.6.6 0 0 1 .848 0M5.876 15.424a.6.6 0 0 1 0-.848l2.7-2.7a.6.6 0 0 1 .848 0l2.7 2.7a.6.6 0 0 1-.848.848L9.6 13.8v3.3a.6.6 0 0 1-1.2 0v-3.3l-1.676 1.624a.6.6 0 0 1-.848 0M2 7a.5.5 0 0 0 0 1h14a.5.5 0 0 0 0-1M2 10a.5.5 0 0 0 0 1h14a.5.5 0 0 0 0-1"
5759
+ fill="currentColor"
5760
+ />
5761
+ </svg>
5762
+ </t>
5763
+ <t t-name="o-spreadsheet-Icon.EXPAND">
5764
+ <svg class="o-icon" viewBox="0 0 18 18">
5765
+ <path
5766
+ d="M5.876 14.076a.6.6 0 0 0 0 .848l2.7 2.7a.6.6 0 0 0 .848 0l2.7-2.7a.6.6 0 0 0-.848-.848L9.6 15.7v-3.3a.6.6 0 0 0-1.2 0v3.3l-1.676-1.624a.6.6 0 0 0-.848 0m6.248-10.152a.6.6 0 0 0 0-.848l-2.7-2.7a.6.6 0 0 0-.848 0l-2.7 2.7a.6.6 0 0 0 .848.848L8.4 2.3v3.3a.6.6 0 0 0 1.2 0V2.3l1.676 1.624a.6.6 0 0 0 .848 0M2 10a.5.5 0 0 0 0 1h14a.5.5 0 0 0 0-1M2 7a.5.5 0 0 0 0 1h14a.5.5 0 0 0 0-1"
5767
+ fill="currentColor"
5768
+ />
5769
+ </svg>
5770
+ </t>
5556
5771
 
5557
5772
  <t t-name="o-spreadsheet-IconPicker">
5558
5773
  <div class="o-icon-picker">
@@ -5715,7 +5930,7 @@
5715
5930
 
5716
5931
  <t t-name="o-spreadsheet-RowResizer">
5717
5932
  <div
5718
- class="o-row-resizer"
5933
+ class="o-row-resizer o-zoomable"
5719
5934
  t-ref="rowResizer"
5720
5935
  t-on-pointermove.self="onMouseMove"
5721
5936
  t-on-mouseleave="onMouseLeave"
@@ -5759,7 +5974,7 @@
5759
5974
 
5760
5975
  <t t-name="o-spreadsheet-ColResizer">
5761
5976
  <div
5762
- class="o-col-resizer d-flex"
5977
+ class="o-col-resizer d-flex o-zoomable"
5763
5978
  t-ref="colResizer"
5764
5979
  t-on-pointermove.self="onMouseMove"
5765
5980
  t-on-mouseleave="onMouseLeave"
@@ -5904,7 +6119,7 @@
5904
6119
  anchorRect="cellPopover.anchorRect"
5905
6120
  containerRect="env.getPopoverContainerRect()"
5906
6121
  onMouseWheel="props.onMouseWheel"
5907
- zIndex="zIndex">
6122
+ class="'o-popover-grid-index'">
5908
6123
  <t
5909
6124
  t-component="cellPopover.Component"
5910
6125
  t-props="{...cellPopover.props, onClosed : () => props.onClosePopover()}"
@@ -5918,7 +6133,7 @@
5918
6133
  </div>
5919
6134
  <div
5920
6135
  t-ref="gridOverlay"
5921
- class="o-grid-overlay overflow-hidden"
6136
+ class="o-grid-overlay overflow-hidden o-zoomable"
5922
6137
  t-att-class="{'o-paint-format-cursor': isPaintingFormat}"
5923
6138
  t-att-style="style"
5924
6139
  t-on-pointerdown="onPointerDown"
@@ -5963,7 +6178,7 @@
5963
6178
 
5964
6179
  <t t-name="o-spreadsheet-Grid">
5965
6180
  <div
5966
- class="o-grid w-100 h-100"
6181
+ class="o-grid w-100 h-100 o-zoomable"
5967
6182
  tabindex="-1"
5968
6183
  composerFocusableElement="true"
5969
6184
  t-on-click="focusDefaultElement"
@@ -6030,8 +6245,8 @@
6030
6245
  </div>
6031
6246
  </t>
6032
6247
 
6033
- <t t-name="o-spreadsheet-FullScreenChart">
6034
- <div class="position-absolute o-fullscreen-chart-overlay w-100 h-100 d-flex" t-if="chartId">
6248
+ <t t-name="o-spreadsheet-FullScreenFigure">
6249
+ <div class="position-absolute o-fullscreen-figure-overlay w-100 h-100 d-flex" t-if="figureUI">
6035
6250
  <div
6036
6251
  class="position-absolute top-0 start-0 end-0 bottom-0"
6037
6252
  t-on-click="exitFullScreen"
@@ -6044,56 +6259,37 @@
6044
6259
  </button>
6045
6260
  <div class="flex-fill">
6046
6261
  <div
6047
- class="o-fullscreen-chart o-figure position-relative border rounded shadow"
6262
+ class="o-fullscreen-figure o-figure position-relative border rounded shadow"
6048
6263
  tabindex="1"
6049
- t-ref="fullScreenChart"
6264
+ t-ref="fullScreenFigure"
6050
6265
  t-on-click.stop=""
6051
6266
  t-on-keydown="(ev) => this.onKeyDown(ev)">
6052
- <t t-component="chartComponent" chartId="chartId" isFullScreen="true" t-key="chartId"/>
6053
- <div class="position-absolute top-0 end-0">
6054
- <ChartDashboardMenu chartId="chartId"/>
6055
- </div>
6267
+ <t>
6268
+ <t
6269
+ t-component="figureComponent"
6270
+ figureUI="figureUI"
6271
+ isFullScreen="true"
6272
+ onFigureDeleted="() => {}"
6273
+ t-key="figureUI.id"
6274
+ />
6275
+ </t>
6056
6276
  </div>
6057
6277
  </div>
6058
6278
  </div>
6059
6279
  </t>
6060
6280
 
6061
6281
  <t t-name="o-spreadsheet-FontSizeEditor">
6062
- <div class="o-dropdown" t-ref="FontSizeEditor">
6063
- <div
6064
- class=" o-font-size-editor d-flex align-items-center"
6065
- t-att-class="props.class"
6066
- title="Font Size"
6067
- t-on-click="this.toggleFontList">
6068
- <input
6069
- type="number"
6070
- min="1"
6071
- max="400"
6072
- class="o-font-size o-number-input bg-transparent border-0"
6073
- t-on-keydown="onInputKeydown"
6074
- t-on-wheel.prevent.stop=""
6075
- t-on-click.stop="props.onFocusInput"
6076
- t-on-focus.stop="onInputFocused"
6077
- t-att-value="props.currentFontSize"
6078
- t-on-change="setSizeFromInput"
6079
- t-ref="inputFontSize"
6080
- />
6081
- <span>
6082
- <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
6083
- </span>
6084
- </div>
6085
- <Popover t-if="dropdown.isOpen" t-props="popoverProps">
6086
- <div class="o-text-options bg-white" t-on-click.stop="" t-ref="fontSizeList">
6087
- <t t-foreach="fontSizes" t-as="fontSize" t-key="fontSize">
6088
- <div
6089
- t-esc="fontSize"
6090
- t-att-data-size="fontSize"
6091
- t-on-click="() => this.setSizeFromList(fontSize)"
6092
- />
6093
- </t>
6094
- </div>
6095
- </Popover>
6096
- </div>
6282
+ <NumberEditor
6283
+ currentValue="props.currentFontSize"
6284
+ onValueChange="props.onFontSizeChanged"
6285
+ class="props.class"
6286
+ onToggle="props.onToggle"
6287
+ onFocusInput="props.onFocusInput"
6288
+ min="1"
6289
+ max="400"
6290
+ valueList="fontSizes"
6291
+ title.translate="Font Size"
6292
+ />
6097
6293
  </t>
6098
6294
 
6099
6295
  <t t-name="o-spreadsheet-FilterMenuValueList">
@@ -6137,7 +6333,7 @@
6137
6333
  </div>
6138
6334
  <div
6139
6335
  t-if="state.displayedValues.length === 0"
6140
- class="o-filter-menu-no-values d-flex align-items-center justify-content-center w-100 h-100 ">
6336
+ class="o-filter-menu-no-values d-flex align-items-center justify-content-center w-100 h-100 text-muted fst-italic">
6141
6337
  No results
6142
6338
  </div>
6143
6339
  </div>
@@ -6178,6 +6374,7 @@
6178
6374
  criterion="state.criterion"
6179
6375
  onCriterionChanged.bind="onCriterionChanged"
6180
6376
  disableFormulas="true"
6377
+ autofocus="true"
6181
6378
  />
6182
6379
  </t>
6183
6380
 
@@ -6279,7 +6476,12 @@
6279
6476
 
6280
6477
  <t t-name="o-spreadsheet-ChartFigure">
6281
6478
  <div class="o-chart-container w-100 h-100" t-on-dblclick="onDoubleClick">
6282
- <t t-component="chartComponent" chartId="chartId" t-key="chartId"/>
6479
+ <t
6480
+ t-component="chartComponent"
6481
+ chartId="chartId"
6482
+ t-key="chartId"
6483
+ isFullScreen="props.isFullScreen"
6484
+ />
6283
6485
  </div>
6284
6486
  <div t-if="env.isDashboard()" class="position-absolute top-0 end-0">
6285
6487
  <ChartDashboardMenu chartId="chartId"/>
@@ -6303,7 +6505,7 @@
6303
6505
  t-att-style="titleStyle"
6304
6506
  />
6305
6507
  <div class="o-carousel-tabs d-flex flex-fill justify-content-end" t-ref="carouselTabs">
6306
- <t t-foreach="carousel.items" t-as="item" t-key="item_index">
6508
+ <t t-foreach="visibleCarouselItems" t-as="item" t-key="item_index">
6307
6509
  <div
6308
6510
  class="o-carousel-tab text-truncate px-2 mt-1 flex-shrink-0"
6309
6511
  t-att-class="{ 'selected': isItemSelected(item) }"
@@ -6313,7 +6515,7 @@
6313
6515
  </t>
6314
6516
  </div>
6315
6517
  <div
6316
- class="o-carousel-tabs-dropdown flex-shrink-0 rounded"
6518
+ class="o-carousel-tabs-dropdown o-carousel-button flex-shrink-0 rounded p-1"
6317
6519
  t-att-class="{'active': menuState.isOpen}"
6318
6520
  t-ref="carouselTabsDropdown"
6319
6521
  t-on-click="toggleMenu">
@@ -6327,6 +6529,22 @@
6327
6529
  popoverPositioning="'bottom-left'"
6328
6530
  />
6329
6531
  </div>
6532
+ <div
6533
+ t-if="env.isDashboard()"
6534
+ t-att-title="fullScreenButtonTitle"
6535
+ class="o-carousel-full-screen-button fa o-carousel-button rounded p-1 ms-1"
6536
+ t-att-class="{
6537
+ 'fa-compress': props.isFullScreen,
6538
+ 'fa-expand': !props.isFullScreen,
6539
+ 'invisible': selectedCarouselItem?.type !== 'chart',
6540
+ }"
6541
+ t-on-click="toggleFullScreen"
6542
+ />
6543
+ <div
6544
+ t-if="!env.isDashboard()"
6545
+ class="o-carousel-menu-button o-carousel-button fa fa-ellipsis-v rounded ms-1"
6546
+ t-on-click="openContextMenu"
6547
+ />
6330
6548
  </div>
6331
6549
  <div
6332
6550
  t-if="!selectedItem"
@@ -6340,12 +6558,14 @@
6340
6558
  <t
6341
6559
  t-component="chartComponent"
6342
6560
  chartId="selectedItem.chartId"
6561
+ isFullScreen="props.isFullScreen"
6343
6562
  t-key="selectedItem.chartId"
6344
6563
  />
6345
6564
  </div>
6346
6565
  <ChartDashboardMenu
6347
6566
  t-if="env.isDashboard()"
6348
6567
  chartId="selectedItem.chartId"
6568
+ hasFullScreenButton="false"
6349
6569
  t-key="selectedItem.chartId"
6350
6570
  />
6351
6571
  </div>
@@ -6353,7 +6573,11 @@
6353
6573
  </t>
6354
6574
 
6355
6575
  <t t-name="o-spreadsheet-FigureComponent">
6356
- <div class="o-figure-wrapper" t-att-style="wrapperStyle" t-ref="figureWrapper">
6576
+ <div
6577
+ class="o-figure-wrapper"
6578
+ t-att-class="{'o-figure-selected': isSelected}"
6579
+ t-att-style="wrapperStyle"
6580
+ t-ref="figureWrapper">
6357
6581
  <div
6358
6582
  class="o-figure w-100 h-100"
6359
6583
  t-att-class="props.class"
@@ -6372,6 +6596,7 @@
6372
6596
  onFigureDeleted="props.onFigureDeleted"
6373
6597
  figureUI="props.figureUI"
6374
6598
  editFigureStyle.bind="editWrapperStyle"
6599
+ openContextMenu.bind="openContextMenu"
6375
6600
  />
6376
6601
  <div class="o-figure-menu position-absolute m-2" t-if="!env.isDashboard()">
6377
6602
  <div
@@ -6392,18 +6617,22 @@
6392
6617
  <div t-if="!env.isDashboard()" class="position-absolute top-0 start-0 pe-none w-100 h-100">
6393
6618
  <div
6394
6619
  class="o-figure-border pe-auto w-100 h-0 position-absolute pb-2"
6620
+ t-att-class="{'o-selected': isSelected}"
6395
6621
  t-att-style="getBorderStyle('top')"
6396
6622
  />
6397
6623
  <div
6398
6624
  class="o-figure-border pe-auto h-100 position-absolute start-0 ps-2"
6625
+ t-att-class="{'o-selected': isSelected}"
6399
6626
  t-att-style="getBorderStyle('left')"
6400
6627
  />
6401
6628
  <div
6402
6629
  class="o-figure-border pe-auto w-100 position-absolute bottom-0 pt-2"
6630
+ t-att-class="{'o-selected': isSelected}"
6403
6631
  t-att-style="getBorderStyle('bottom')"
6404
6632
  />
6405
6633
  <div
6406
6634
  class="o-figure-border pe-auto h-100 position-absolute end-0 pe-2"
6635
+ t-att-class="{'o-selected': isSelected}"
6407
6636
  t-att-style="getBorderStyle('right')"
6408
6637
  />
6409
6638
  </div>
@@ -6595,9 +6824,10 @@
6595
6824
  class="o-topbar-composer position-relative bg-white user-select-text d-flex"
6596
6825
  t-att-class="{
6597
6826
  'o-topbar-composer-readonly': env.model.getters.isReadonly(),
6827
+ 'o-topbar-composer-active': focus !== 'inactive',
6828
+ 'o-topbar-composer-inactive': focus === 'inactive',
6598
6829
  }"
6599
- t-on-click.stop=""
6600
- t-att-style="containerStyle">
6830
+ t-on-click.stop="">
6601
6831
  <Composer
6602
6832
  focus="focus"
6603
6833
  inputStyle="composerStyle"
@@ -6605,6 +6835,9 @@
6605
6835
  composerStore="composerStore"
6606
6836
  placeholder="composerStore.placeholder"
6607
6837
  />
6838
+ <span t-if="showFxIcon" class="position-absolute top-50 translate-middle-y ps-2 pe-none">
6839
+ <t t-call="o-spreadsheet-Icon.FX_SVG"/>
6840
+ </span>
6608
6841
  </div>
6609
6842
  </div>
6610
6843
  </t>
@@ -6652,21 +6885,12 @@
6652
6885
  <div class="o-formula-assistant" t-if="context.functionDescription.name">
6653
6886
  <div class="o-formula-assistant-head d-flex flex-row justify-content-between">
6654
6887
  <div>
6655
- <span t-esc="context.functionDescription.name"/>
6656
- (
6657
- <t t-foreach="context.functionDescription.args" t-as="arg" t-key="arg.name">
6658
- <span t-if="arg_index > '0'" t-esc="formulaArgSeparator"/>
6888
+ <t t-foreach="formulaHeaderContent" t-as="part" t-key="part_index">
6659
6889
  <span
6660
- t-att-class="{ 'o-formula-assistant-focus': context.argsToFocus.includes(arg_index) }">
6661
- <span>
6662
- <span t-if="arg.optional || arg.repeating || arg.default">[</span>
6663
- <span t-esc="arg.name"/>
6664
- <span t-if="arg.repeating">, ...</span>
6665
- <span t-if="arg.optional || arg.repeating || arg.default">]</span>
6666
- </span>
6667
- </span>
6890
+ t-esc="part.content"
6891
+ t-att-class="part.focused ? 'o-formula-assistant-focus' : ''"
6892
+ />
6668
6893
  </t>
6669
- )
6670
6894
  </div>
6671
6895
  <div
6672
6896
  class="collapsor px-2 d-flex align-items-center rounded"
@@ -6684,22 +6908,29 @@
6684
6908
  <div t-esc="context.functionDescription.description"/>
6685
6909
  </div>
6686
6910
 
6911
+ <t
6912
+ t-set="firstRepeatableGroupOptional"
6913
+ t-value="context.functionDescription.args.some(arg => arg.repeating and arg.optional)"
6914
+ />
6915
+
6687
6916
  <t t-foreach="context.functionDescription.args" t-as="arg" t-key="arg.name">
6688
6917
  <div
6689
6918
  class="o-formula-assistant-arg p-3 pt-0 display-flex flex-column"
6690
- t-att-class="{
6691
- 'o-formula-assistant-gray': context.argsToFocus.length > 0,
6692
- 'o-formula-assistant-focus': context.argsToFocus.includes(arg_index),
6693
- }">
6694
- <div>
6695
- <span t-esc="arg.name"/>
6919
+ t-att-class="{'o-formula-assistant-gray': context.argsToFocus.length > 0}">
6920
+ <div
6921
+ t-att-class="{'o-formula-assistant-focus': context.argsToFocus.includes(arg_index)}">
6922
+ <span t-if="arg.repeating">
6923
+ <span t-esc="arg.name + (context.repeatingArgGroupIndex + 1)"/>
6924
+ </span>
6925
+ <span t-else="">
6926
+ <span t-esc="arg.name"/>
6927
+ </span>
6696
6928
  <span
6697
- t-if="arg.optional || arg.repeating || arg.default ">&#xA0;- [optional]&#xA0;</span>
6929
+ t-if="arg.optional || arg.default || (arg.repeating and (firstRepeatableGroupOptional or context.repeatingArgGroupIndex > 0))">&#xA0;- [optional]&#xA0;</span>
6698
6930
  <span t-if="arg.default">
6699
6931
  <span>default:&#xA0;</span>
6700
6932
  <t t-esc="arg.defaultValue"/>
6701
6933
  </span>
6702
- <span t-if="arg.repeating">repeatable</span>
6703
6934
  </div>
6704
6935
  <div class="o-formula-assistant-arg-description" t-esc="arg.description"/>
6705
6936
  </div>
@@ -6777,6 +7008,7 @@
6777
7008
  t-if="functionDescriptionState.showDescription"
6778
7009
  functionDescription="functionDescriptionState.functionDescription"
6779
7010
  argsToFocus="functionDescriptionState.argsToFocus"
7011
+ repeatingArgGroupIndex="functionDescriptionState.repeatingArgGroupIndex"
6780
7012
  />
6781
7013
  <div
6782
7014
  t-if="functionDescriptionState.showDescription and autoCompleteProposals.length"
@@ -7083,6 +7315,7 @@
7083
7315
  t-ref="sheetNameSpan"
7084
7316
  t-esc="sheetName"
7085
7317
  t-on-pointerdown="(ev) => this.onMouseEventSheetName(ev)"
7318
+ t-on-click="(ev) => this.onMouseEventSheetName(ev)"
7086
7319
  t-on-dblclick="() => this.onDblClick()"
7087
7320
  t-on-focusout="() => this.onFocusOut()"
7088
7321
  t-on-keydown="(ev) => this.onKeyDown(ev)"