@odoo/o-spreadsheet 18.4.0-alpha.3 → 18.4.0-alpha.5

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.4.0-alpha.3
5
- @date 2025-05-13T17:55:42.200Z
6
- @hash 70ad365
4
+ @version 18.4.0-alpha.5
5
+ @date 2025-05-26T12:37:23.183Z
6
+ @hash 398e610
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -352,6 +352,7 @@
352
352
  <div class="o-spreadsheet h-100 w-100" t-ref="spreadsheet" t-att-style="getStyle()">
353
353
  <t t-if="env.isDashboard()">
354
354
  <SpreadsheetDashboard/>
355
+ <FullScreenChart/>
355
356
  </t>
356
357
  <t t-else="">
357
358
  <TopBar onClick="() => this.focusGrid()" dropdownMaxHeight="gridHeight"/>
@@ -971,6 +972,7 @@
971
972
  defaultRangeSheetId="measure.computedBy.sheetId"
972
973
  contextualAutocomplete="getMeasureAutocomplete()"
973
974
  getContextualColoredSymbolToken.bind="getColoredSymbolToken"
975
+ invalid="isCalculatedMeasureInvalid"
974
976
  />
975
977
  </div>
976
978
  </div>
@@ -2141,10 +2143,7 @@
2141
2143
  </t>
2142
2144
 
2143
2145
  <t t-name="o-spreadsheet-WaterfallChartDesignPanel">
2144
- <GeneralDesignEditor
2145
- figureId="props.figureId"
2146
- definition="props.definition"
2147
- updateChart="props.updateChart">
2146
+ <GeneralDesignEditor t-props="props">
2148
2147
  <t t-set-slot="general-extension">
2149
2148
  <Section class="'o-vertical-axis-selection pt-0'" title.translate="Vertical axis position">
2150
2149
  <RadioSelection
@@ -2154,18 +2153,9 @@
2154
2153
  onChange.bind="updateVerticalAxisPosition"
2155
2154
  />
2156
2155
  </Section>
2157
- <ChartLegend
2158
- figureId="props.figureId"
2159
- definition="props.definition"
2160
- updateChart="props.updateChart"
2161
- />
2156
+ <ChartLegend t-props="props"/>
2162
2157
  <Section class="'pt-0'" title.translate="Values">
2163
- <Checkbox
2164
- name="'showValues'"
2165
- label.translate="Show values"
2166
- value="props.definition.showValues"
2167
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2168
- />
2158
+ <ChartShowValues t-props="props"/>
2169
2159
  </Section>
2170
2160
  </t>
2171
2161
  </GeneralDesignEditor>
@@ -2234,11 +2224,7 @@
2234
2224
  </t>
2235
2225
 
2236
2226
  <t t-name="o-spreadsheet-TreeMapChartDesignPanel">
2237
- <GeneralDesignEditor
2238
- figureId="props.figureId"
2239
- definition="props.definition"
2240
- updateChart="props.updateChart"
2241
- />
2227
+ <GeneralDesignEditor t-props="props"/>
2242
2228
 
2243
2229
  <SidePanelCollapsible isInitiallyCollapsed="false" title.translate="Tree map colors">
2244
2230
  <t t-set-slot="content">
@@ -2295,12 +2281,7 @@
2295
2281
  value="showLabels"
2296
2282
  onChange="(showLabels) => props.updateChart(this.props.figureId, { showLabels })"
2297
2283
  />
2298
- <Checkbox
2299
- name="'showValues'"
2300
- label.translate="Show values"
2301
- value="showValues"
2302
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2303
- />
2284
+ <ChartShowValues t-props="props" defaultValue="defaults.showValues"/>
2304
2285
  </div>
2305
2286
  </Section>
2306
2287
  <Section class="'pt-0'" t-if="showValues || showLabels">
@@ -2369,16 +2350,9 @@
2369
2350
  </t>
2370
2351
 
2371
2352
  <t t-name="o-spreadsheet-SunburstChartDesignPanel">
2372
- <GeneralDesignEditor
2373
- figureId="props.figureId"
2374
- definition="props.definition"
2375
- updateChart="props.updateChart">
2353
+ <GeneralDesignEditor t-props="props">
2376
2354
  <t t-set-slot="general-extension">
2377
- <ChartLegend
2378
- figureId="props.figureId"
2379
- definition="props.definition"
2380
- updateChart="props.updateChart"
2381
- />
2355
+ <ChartLegend t-props="props"/>
2382
2356
  </t>
2383
2357
  </GeneralDesignEditor>
2384
2358
 
@@ -2406,12 +2380,7 @@
2406
2380
  value="showLabels"
2407
2381
  onChange="(showLabels) => props.updateChart(this.props.figureId, { showLabels })"
2408
2382
  />
2409
- <Checkbox
2410
- name="'showValues'"
2411
- label.translate="Show values"
2412
- value="showValues"
2413
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2414
- />
2383
+ <ChartShowValues t-props="props" defaultValue="defaults.showValues"/>
2415
2384
  </div>
2416
2385
  </Section>
2417
2386
  <Section class="'pt-0'" t-if="showValues || showLabels">
@@ -2433,11 +2402,7 @@
2433
2402
  <t t-name="o-spreadsheet-ScorecardChartDesignPanel">
2434
2403
  <t t-set="color_up">Color Up</t>
2435
2404
  <t t-set="color_down">Color Down</t>
2436
- <GeneralDesignEditor
2437
- figureId="props.figureId"
2438
- definition="props.definition"
2439
- updateChart="props.updateChart"
2440
- defaultChartTitleFontSize="defaultScorecardTitleFontSize">
2405
+ <GeneralDesignEditor t-props="props" defaultChartTitleFontSize="defaultScorecardTitleFontSize">
2441
2406
  <t t-set-slot="general-extension">
2442
2407
  <Section class="'pt-1'" title.translate="Number formatting">
2443
2408
  <Checkbox
@@ -2449,17 +2414,24 @@
2449
2414
  </Section>
2450
2415
  </t>
2451
2416
  </GeneralDesignEditor>
2417
+ <ChartTitle
2418
+ title="this.props.definition.keyDescr?.text ?? ''"
2419
+ updateTitle="(text) => this.setKeyText(text)"
2420
+ name.translate="Key Value Style"
2421
+ placeholder.translate="Add a key value description"
2422
+ updateStyle.bind="updateKeyStyle"
2423
+ style="keyStyle"
2424
+ />
2452
2425
  <SidePanelCollapsible isInitiallyCollapsed="false" title.translate="Baseline">
2453
2426
  <t t-set-slot="content">
2454
- <Section class="'pt-0'" title.translate="Baseline description">
2455
- <input
2456
- type="text"
2457
- t-att-value="translate(props.definition.baselineDescr)"
2458
- t-on-change="updateBaselineDescr"
2459
- class="o-input"
2460
- placeholder="Baseline description"
2461
- />
2462
- </Section>
2427
+ <ChartTitle
2428
+ title="this.props.definition.baselineDescr?.text ?? ''"
2429
+ updateTitle="(text) => this.setBaselineText(text)"
2430
+ name.translate="Baseline Style"
2431
+ placeholder.translate="Add a baseline description"
2432
+ updateStyle.bind="updateBaselineStyle"
2433
+ style="baselineStyle"
2434
+ />
2463
2435
  <Section class="'o-chart-baseline-color pt-0'" title="colorsSectionTitle">
2464
2436
  <div class="d-flex align-items-center mb-2">
2465
2437
  <RoundColorPicker
@@ -2544,23 +2516,12 @@
2544
2516
  </t>
2545
2517
 
2546
2518
  <t t-name="o-spreadsheet-RadarChartDesignPanel">
2547
- <GeneralDesignEditor
2548
- figureId="props.figureId"
2549
- definition="props.definition"
2550
- updateChart="props.updateChart">
2519
+ <GeneralDesignEditor t-props="props">
2551
2520
  <t t-set-slot="general-extension">
2552
- <ChartLegend
2553
- figureId="props.figureId"
2554
- definition="props.definition"
2555
- updateChart="props.updateChart"
2556
- />
2521
+ <ChartLegend t-props="props"/>
2557
2522
  <Section class="'pt-0'" title.translate="Values">
2558
- <Checkbox
2559
- name="'showValues'"
2560
- label.translate="Show values"
2561
- value="props.definition.showValues"
2562
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2563
- />
2523
+ <ChartShowValues t-props="props"/>
2524
+ <ChartShowDataMarkers t-props="props"/>
2564
2525
  </Section>
2565
2526
  </t>
2566
2527
  </GeneralDesignEditor>
@@ -2568,23 +2529,11 @@
2568
2529
  </t>
2569
2530
 
2570
2531
  <t t-name="o-spreadsheet-PieChartDesignPanel">
2571
- <GeneralDesignEditor
2572
- figureId="props.figureId"
2573
- definition="props.definition"
2574
- updateChart="props.updateChart">
2532
+ <GeneralDesignEditor t-props="props">
2575
2533
  <t t-set-slot="general-extension">
2576
- <ChartLegend
2577
- figureId="props.figureId"
2578
- definition="props.definition"
2579
- updateChart="props.updateChart"
2580
- />
2534
+ <ChartLegend t-props="props"/>
2581
2535
  <Section class="'pt-0'" title.translate="Values">
2582
- <Checkbox
2583
- name="'showValues'"
2584
- label.translate="Show values"
2585
- value="props.definition.showValues"
2586
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2587
- />
2536
+ <ChartShowValues t-props="props"/>
2588
2537
  </Section>
2589
2538
  <PieHoleSize
2590
2539
  t-if="props.definition.isDoughnut"
@@ -2639,6 +2588,29 @@
2639
2588
  </div>
2640
2589
  </t>
2641
2590
 
2591
+ <t t-name="o-spreadsheet-LineChartDesignPanel">
2592
+ <GeneralDesignEditor t-props="props">
2593
+ <t t-set-slot="general-extension">
2594
+ <ChartLegend t-props="props"/>
2595
+ <Section class="'pt-0'" title.translate="Values">
2596
+ <ChartShowValues t-props="props"/>
2597
+ <ChartShowDataMarkers t-props="props"/>
2598
+ </Section>
2599
+ </t>
2600
+ </GeneralDesignEditor>
2601
+ <SeriesWithAxisDesignEditor t-props="props"/>
2602
+ <SidePanelCollapsible isInitiallyCollapsed="true" title.translate="Axes">
2603
+ <t t-set-slot="content">
2604
+ <AxisDesignEditor
2605
+ axesList="axesList"
2606
+ figureId="props.figureId"
2607
+ definition="props.definition"
2608
+ updateChart="props.updateChart"
2609
+ />
2610
+ </t>
2611
+ </SidePanelCollapsible>
2612
+ </t>
2613
+
2642
2614
  <t t-name="o-spreadsheet-LineConfigPanel">
2643
2615
  <div>
2644
2616
  <Section class="'pt-0'">
@@ -2716,10 +2688,7 @@
2716
2688
  </t>
2717
2689
 
2718
2690
  <t t-name="o-spreadsheet-GeoChartDesignPanel">
2719
- <GeneralDesignEditor
2720
- figureId="props.figureId"
2721
- definition="props.definition"
2722
- updateChart="props.updateChart">
2691
+ <GeneralDesignEditor t-props="props">
2723
2692
  <t t-set-slot="general-extension">
2724
2693
  <Section class="'pt-0'" title.translate="Legend position">
2725
2694
  <select
@@ -2821,11 +2790,7 @@
2821
2790
  </t>
2822
2791
 
2823
2792
  <t t-name="o-spreadsheet-GaugeChartDesignPanel">
2824
- <GeneralDesignEditor
2825
- figureId="props.figureId"
2826
- definition="props.definition"
2827
- updateChart="props.updateChart"
2828
- />
2793
+ <GeneralDesignEditor t-props="props"/>
2829
2794
  <SidePanelCollapsible isInitiallyCollapsed="false" title.translate="Gauge Design">
2830
2795
  <t t-set-slot="content">
2831
2796
  <Section class="'pt-0'" title.translate="Range">
@@ -2962,18 +2927,10 @@
2962
2927
  </t>
2963
2928
 
2964
2929
  <t t-name="o-spreadsheet-FunnelChartDesignPanel">
2965
- <GeneralDesignEditor
2966
- figureId="props.figureId"
2967
- definition="props.definition"
2968
- updateChart="props.updateChart">
2930
+ <GeneralDesignEditor t-props="props">
2969
2931
  <t t-set-slot="general-extension">
2970
2932
  <Section class="'pt-0'" title.translate="Values">
2971
- <Checkbox
2972
- name="'showValues'"
2973
- label.translate="Show values"
2974
- value="props.definition.showValues"
2975
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2976
- />
2933
+ <ChartShowValues t-props="props"/>
2977
2934
  </Section>
2978
2935
  </t>
2979
2936
  </GeneralDesignEditor>
@@ -2996,23 +2953,12 @@
2996
2953
  </t>
2997
2954
 
2998
2955
  <t t-name="o-spreadsheet-ComboChartDesignPanel">
2999
- <GeneralDesignEditor
3000
- figureId="props.figureId"
3001
- definition="props.definition"
3002
- updateChart="props.updateChart">
2956
+ <GeneralDesignEditor t-props="props">
3003
2957
  <t t-set-slot="general-extension">
3004
- <ChartLegend
3005
- figureId="props.figureId"
3006
- definition="props.definition"
3007
- updateChart="props.updateChart"
3008
- />
2958
+ <ChartLegend t-props="props"/>
3009
2959
  <Section class="'pt-0'" title.translate="Values">
3010
- <Checkbox
3011
- name="'showValues'"
3012
- label.translate="Show values"
3013
- value="props.definition.showValues"
3014
- onChange="showValues => props.updateChart(this.props.figureId, {showValues})"
3015
- />
2960
+ <ChartShowValues t-props="props"/>
2961
+ <ChartShowDataMarkers t-props="props"/>
3016
2962
  </Section>
3017
2963
  </t>
3018
2964
  </GeneralDesignEditor>
@@ -3042,23 +2988,11 @@
3042
2988
  </t>
3043
2989
 
3044
2990
  <t t-name="o-spreadsheet-ChartWithAxisDesignPanel">
3045
- <GeneralDesignEditor
3046
- figureId="props.figureId"
3047
- definition="props.definition"
3048
- updateChart="props.updateChart">
2991
+ <GeneralDesignEditor t-props="props">
3049
2992
  <t t-set-slot="general-extension">
3050
- <ChartLegend
3051
- figureId="props.figureId"
3052
- definition="props.definition"
3053
- updateChart="props.updateChart"
3054
- />
2993
+ <ChartLegend t-props="props"/>
3055
2994
  <Section class="'pt-0'" title.translate="Values">
3056
- <Checkbox
3057
- name="'showValues'"
3058
- label.translate="Show values"
3059
- value="props.definition.showValues"
3060
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
3061
- />
2995
+ <ChartShowValues t-props="props"/>
3062
2996
  </Section>
3063
2997
  </t>
3064
2998
  </GeneralDesignEditor>
@@ -3496,6 +3430,24 @@
3496
3430
  </div>
3497
3431
  </t>
3498
3432
 
3433
+ <t t-name="o-spreadsheet-ChartShowValues">
3434
+ <Checkbox
3435
+ name="'showValues'"
3436
+ label.translate="Show values"
3437
+ value="props.definition.showValues ?? props.defaultValue"
3438
+ onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
3439
+ />
3440
+ </t>
3441
+
3442
+ <t t-name="o-spreadsheet-ChartShowDataMarkers">
3443
+ <Checkbox
3444
+ name="'showDataMarkers'"
3445
+ label.translate="Show data markers"
3446
+ value="!props.definition.hideDataMarkers"
3447
+ onChange="(showDataMarkers) => props.updateChart(this.props.figureId, { hideDataMarkers: !showDataMarkers })"
3448
+ />
3449
+ </t>
3450
+
3499
3451
  <t t-name="o-spreadsheet-SeriesWithAxisDesignEditor">
3500
3452
  <SeriesDesignEditor t-props="props">
3501
3453
  <t t-set-slot="data-series-extension" t-slot-scope="scope">
@@ -3705,7 +3657,6 @@
3705
3657
  </t>
3706
3658
 
3707
3659
  <t t-name="o-spreadsheet-GeneralDesignEditor">
3708
- <t t-set="chart_title">Chart title</t>
3709
3660
  <SidePanelCollapsible isInitiallyCollapsed="false" title.translate="General">
3710
3661
  <t t-set-slot="content">
3711
3662
  <Section class="'o-chart-background-color pt-0 pb-0'" title.translate="Background color">
@@ -3717,7 +3668,8 @@
3717
3668
  <ChartTitle
3718
3669
  title="title.text"
3719
3670
  updateTitle.bind="updateTitle"
3720
- name="chart_title"
3671
+ name.translate="Chart title"
3672
+ placeholder.translate="Add a Title"
3721
3673
  updateStyle.bind="updateChartTitleStyle"
3722
3674
  style="title"
3723
3675
  defaultStyle="{align: 'left', fontSize: this.props.defaultChartTitleFontSize}"
@@ -3772,18 +3724,13 @@
3772
3724
  </t>
3773
3725
 
3774
3726
  <t t-name="o-spreadsheet.ChartTitle">
3775
- <t t-set="placeholder">Add a title</t>
3776
- <t t-set="title">
3777
- <t t-if="props.name" t-esc="props.name"/>
3778
- <t t-else="">Title</t>
3779
- </t>
3780
- <Section class="'o-chart-title'" title="title.toString()">
3727
+ <Section class="'o-chart-title'" title="props.name">
3781
3728
  <input
3782
3729
  type="text"
3783
3730
  class="o-input"
3784
3731
  t-att-value="props.title"
3785
3732
  t-on-change="updateTitle"
3786
- t-att-placeholder="placeholder"
3733
+ t-att-placeholder="props.placeholder"
3787
3734
  />
3788
3735
  <TextStyler
3789
3736
  style="props.style"
@@ -3991,6 +3938,15 @@
3991
3938
  </div>
3992
3939
  </t>
3993
3940
 
3941
+ <t t-name="o-spreadsheet-PivotCollapseIcon">
3942
+ <div
3943
+ class="o-pivot-collapse-icon o-hoverable-button d-flex align-items-center justify-content-center"
3944
+ t-on-click="onClick">
3945
+ <t t-if="isCollapsed" t-call="o-spreadsheet-Icon.PLUS"/>
3946
+ <t t-else="" t-call="o-spreadsheet-Icon.MINUS"/>
3947
+ </div>
3948
+ </t>
3949
+
3994
3950
  <t t-name="o-spreadsheet-PaintFormatButton">
3995
3951
  <span
3996
3952
  class="o-menu-item-button"
@@ -5538,8 +5494,7 @@
5538
5494
  t-on-pointerdown="onMouseDown"
5539
5495
  t-on-dblclick.self="onDoubleClick"
5540
5496
  t-on-contextmenu.stop.prevent="onContextMenu">
5541
- <DataValidationOverlay/>
5542
- <FilterIconsOverlay/>
5497
+ <GridCellIconOverlay/>
5543
5498
  <GridAddRowsFooter
5544
5499
  t-if="!env.model.getters.isReadonly()"
5545
5500
  t-key="env.model.getters.getActiveSheetId()"
@@ -5549,10 +5504,18 @@
5549
5504
  </div>
5550
5505
  </t>
5551
5506
 
5507
+ <t t-name="o-spreadsheet-GridCellIconOverlay">
5508
+ <t t-foreach="icons" t-as="icon" t-key="icon_index">
5509
+ <GridCellIcon icon="icon">
5510
+ <t t-component="icon.component" cellPosition="icon.position"/>
5511
+ </GridCellIcon>
5512
+ </t>
5513
+ </t>
5514
+
5552
5515
  <t t-name="o-spreadsheet-GridCellIcon">
5553
5516
  <div
5554
5517
  class="o-grid-cell-icon position-absolute overflow-hidden"
5555
- t-if="isPositionVisible(this.props.cellPosition)"
5518
+ t-if="isPositionVisible(this.props.icon.position)"
5556
5519
  t-att-style="iconStyle">
5557
5520
  <t t-slot="default"/>
5558
5521
  </div>
@@ -5608,6 +5571,7 @@
5608
5571
  onInputContextMenu.bind="onInputContextMenu"
5609
5572
  />
5610
5573
  <canvas t-ref="canvas"/>
5574
+ <t t-set="focused" t-value="focusedClients"/>
5611
5575
  <t
5612
5576
  t-foreach="env.model.getters.getClientsToDisplay()"
5613
5577
  t-as="client"
@@ -5617,7 +5581,7 @@
5617
5581
  color="client.color"
5618
5582
  col="client.position.col"
5619
5583
  row="client.position.row"
5620
- active="isCellHovered(client.position.col, client.position.row)"
5584
+ active="isCellHovered(client.position.col, client.position.row) || focused.has(client.id)"
5621
5585
  />
5622
5586
  </t>
5623
5587
  <GridPopover
@@ -5650,6 +5614,37 @@
5650
5614
  </div>
5651
5615
  </t>
5652
5616
 
5617
+ <t t-name="o-spreadsheet-FullScreenChart">
5618
+ <div
5619
+ class="position-absolute o-fullscreen-chart-overlay w-100 h-100 d-flex"
5620
+ t-if="figureUI"
5621
+ t-on-click="exitFullScreen">
5622
+ <button
5623
+ class="o-exit top-0 end-0 position-absolute o-button primary m-1"
5624
+ t-on-click="exitFullScreen">
5625
+ Exit fullscreen
5626
+ </button>
5627
+ <div class="flex-fill">
5628
+ <div
5629
+ class="o-fullscreen-chart o-figure position-relative"
5630
+ tabindex="1"
5631
+ t-ref="fullScreenChart"
5632
+ t-on-click.stop=""
5633
+ t-on-keydown="(ev) => this.onKeyDown(ev)">
5634
+ <t
5635
+ t-component="chartComponent"
5636
+ figureUI="this.figureUI"
5637
+ isFullScreen="true"
5638
+ t-key="this.figureUI.id"
5639
+ />
5640
+ <div class="position-absolute top-0 end-0">
5641
+ <ChartDashboardMenu figureUI="figureUI"/>
5642
+ </div>
5643
+ </div>
5644
+ </div>
5645
+ </div>
5646
+ </t>
5647
+
5653
5648
  <t t-name="o-spreadsheet-FontSizeEditor">
5654
5649
  <div class="o-dropdown" t-ref="FontSizeEditor">
5655
5650
  <div
@@ -5819,17 +5814,6 @@
5819
5814
  </div>
5820
5815
  </t>
5821
5816
 
5822
- <t t-name="o-spreadsheet-FilterIconsOverlay">
5823
- <t
5824
- t-foreach="getFilterHeadersPositions()"
5825
- t-as="position"
5826
- t-key="'filter'+position.col + '_' + position.row">
5827
- <GridCellIcon cellPosition="position" horizontalAlign="'right'">
5828
- <FilterIcon cellPosition="position"/>
5829
- </GridCellIcon>
5830
- </t>
5831
- </t>
5832
-
5833
5817
  <t t-name="o-spreadsheet-FilterIcon">
5834
5818
  <div class="o-filter-icon" t-att-class="iconClass" t-on-click="onClick">
5835
5819
  <t t-if="isFilterActive" t-call="o-spreadsheet-Icon.FILTER_ICON_ACTIVE"/>
@@ -5976,26 +5960,26 @@
5976
5960
 
5977
5961
  <t t-name="o-spreadsheet-ScorecardChart">
5978
5962
  <canvas
5979
- class="o-figure-canvas o-scorecard w-100 h-100"
5963
+ class="o-figure-canvas o-scorecard w-100 h-100 d-block"
5980
5964
  t-ref="chartContainer"
5981
5965
  t-att-title="title"
5982
5966
  />
5983
5967
  </t>
5984
5968
 
5985
5969
  <t t-name="o-spreadsheet-GaugeChartComponent">
5986
- <canvas class="o-figure-canvas o-gauge-chart w-100 h-100" t-ref="chartContainer"/>
5970
+ <canvas class="o-figure-canvas o-gauge-chart w-100 h-100 d-block" t-ref="chartContainer"/>
5987
5971
  </t>
5988
5972
 
5989
5973
  <t t-name="spreadsheet.ChartDashboardMenu">
5990
5974
  <div class="o-dashboard-chart-select position-absolute top-0 end-0" t-on-click.stop="">
5991
5975
  <div class="d-flex flex-row px-1" t-att-style="backgroundColor">
5992
- <t t-foreach="getAvailableTypes()" t-as="type" t-key="type.chartSubtype">
5976
+ <t t-foreach="getMenuItems()" t-as="item" t-key="item.id">
5993
5977
  <button
5994
- t-attf-class=" {{type.icon}} {{type.chartType === selectedChartType ? 'active' : ''}}"
5978
+ t-attf-class=" {{item.iconClass}} {{item.isSelected ? 'active' : ''}}"
5995
5979
  class="o-chart-dashboard-item btn mt-1 me-1 p-1 "
5996
- t-att-title="type.displayName"
5997
- t-on-click="() => this.onTypeChange(type.chartSubtype)"
5998
- t-att-data-id="type.chartSubtype"
5980
+ t-att-title="item.label"
5981
+ t-on-click="item.onClick"
5982
+ t-att-data-id="item.id"
5999
5983
  />
6000
5984
  </t>
6001
5985
  <button
@@ -6042,20 +6026,6 @@
6042
6026
  </div>
6043
6027
  </t>
6044
6028
 
6045
- <t t-name="o-spreadsheet-DataValidationOverlay">
6046
- <t t-foreach="checkBoxCellPositions" t-as="position" t-key="'checkbox'+position_index">
6047
- <GridCellIcon cellPosition="position">
6048
- <DataValidationCheckbox cellPosition="position"/>
6049
- </GridCellIcon>
6050
- </t>
6051
-
6052
- <t t-foreach="listIconsCellPositions" t-as="position" t-key="'list'+position_index">
6053
- <GridCellIcon cellPosition="position" horizontalAlign="'right'">
6054
- <DataValidationListIcon cellPosition="position"/>
6055
- </GridCellIcon>
6056
- </t>
6057
- </t>
6058
-
6059
6029
  <t t-name="o-spreadsheet-DataValidationListIcon">
6060
6030
  <div
6061
6031
  class="o-dv-list-icon d-flex align-items-center justify-content-center"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.4.0-alpha.3",
3
+ "version": "18.4.0-alpha.5",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
package/readme.md CHANGED
@@ -15,6 +15,23 @@ a.k.a. "[Owly](https://github.com/odoo/owl) Sheet" 🦉
15
15
 
16
16
  ![o-spreadsheet screenshot](doc/o-spreadsheet.png "o-spreadsheet demo")
17
17
 
18
+ ## Run it!
19
+
20
+ ```bash
21
+ # install dependencies
22
+ npm install
23
+
24
+ # build stuff, start a live server, start a collaborative server, build with --watch
25
+ npm run dev
26
+ ```
27
+
28
+ ## Test it!
29
+
30
+ ```bash
31
+ npm run test # run all tests
32
+ npm run test -- --watch # run all tests, rerun on file change
33
+ ```
34
+
18
35
  ## Integrating o-spreadsheet
19
36
 
20
37
  1. [Getting started](doc/integrating/integration.md#getting-started)
@@ -42,26 +59,6 @@ a.k.a. "[Owly](https://github.com/odoo/owl) Sheet" 🦉
42
59
  10. [Translations](doc/extending/translations.md)
43
60
  11. [API](doc/tsdoc/README.md)
44
61
 
45
- ## Run it!
46
-
47
- ```bash
48
- # install dependencies
49
- npm install
50
-
51
- # build o_spreadsheet.js in dist/
52
- npm run build
53
-
54
- # build stuff, start a live server, start a collaborative server, build with --watch
55
- npm run dev
56
-
57
- # run the test suite
58
- npm run test
59
- npm run test -- --watch
60
-
61
- # build documentation
62
- npm run doc
63
- ```
64
-
65
62
  ## Contributing
66
63
 
67
64
  - Open a pull request or an issue on this repository.