@odoo/o-spreadsheet 18.4.0-alpha.4 → 18.4.0-alpha.6

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.4
5
- @date 2025-05-20T05:58:32.778Z
6
- @hash 5c28bca
4
+ @version 18.4.0-alpha.6
5
+ @date 2025-05-30T08:45:20.500Z
6
+ @hash eecf7e4
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -2143,10 +2143,7 @@
2143
2143
  </t>
2144
2144
 
2145
2145
  <t t-name="o-spreadsheet-WaterfallChartDesignPanel">
2146
- <GeneralDesignEditor
2147
- figureId="props.figureId"
2148
- definition="props.definition"
2149
- updateChart="props.updateChart">
2146
+ <GeneralDesignEditor t-props="props">
2150
2147
  <t t-set-slot="general-extension">
2151
2148
  <Section class="'o-vertical-axis-selection pt-0'" title.translate="Vertical axis position">
2152
2149
  <RadioSelection
@@ -2156,18 +2153,9 @@
2156
2153
  onChange.bind="updateVerticalAxisPosition"
2157
2154
  />
2158
2155
  </Section>
2159
- <ChartLegend
2160
- figureId="props.figureId"
2161
- definition="props.definition"
2162
- updateChart="props.updateChart"
2163
- />
2156
+ <ChartLegend t-props="props"/>
2164
2157
  <Section class="'pt-0'" title.translate="Values">
2165
- <Checkbox
2166
- name="'showValues'"
2167
- label.translate="Show values"
2168
- value="props.definition.showValues"
2169
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2170
- />
2158
+ <ChartShowValues t-props="props"/>
2171
2159
  </Section>
2172
2160
  </t>
2173
2161
  </GeneralDesignEditor>
@@ -2236,11 +2224,7 @@
2236
2224
  </t>
2237
2225
 
2238
2226
  <t t-name="o-spreadsheet-TreeMapChartDesignPanel">
2239
- <GeneralDesignEditor
2240
- figureId="props.figureId"
2241
- definition="props.definition"
2242
- updateChart="props.updateChart"
2243
- />
2227
+ <GeneralDesignEditor t-props="props"/>
2244
2228
 
2245
2229
  <SidePanelCollapsible isInitiallyCollapsed="false" title.translate="Tree map colors">
2246
2230
  <t t-set-slot="content">
@@ -2297,12 +2281,7 @@
2297
2281
  value="showLabels"
2298
2282
  onChange="(showLabels) => props.updateChart(this.props.figureId, { showLabels })"
2299
2283
  />
2300
- <Checkbox
2301
- name="'showValues'"
2302
- label.translate="Show values"
2303
- value="showValues"
2304
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2305
- />
2284
+ <ChartShowValues t-props="props" defaultValue="defaults.showValues"/>
2306
2285
  </div>
2307
2286
  </Section>
2308
2287
  <Section class="'pt-0'" t-if="showValues || showLabels">
@@ -2371,16 +2350,9 @@
2371
2350
  </t>
2372
2351
 
2373
2352
  <t t-name="o-spreadsheet-SunburstChartDesignPanel">
2374
- <GeneralDesignEditor
2375
- figureId="props.figureId"
2376
- definition="props.definition"
2377
- updateChart="props.updateChart">
2353
+ <GeneralDesignEditor t-props="props">
2378
2354
  <t t-set-slot="general-extension">
2379
- <ChartLegend
2380
- figureId="props.figureId"
2381
- definition="props.definition"
2382
- updateChart="props.updateChart"
2383
- />
2355
+ <ChartLegend t-props="props"/>
2384
2356
  </t>
2385
2357
  </GeneralDesignEditor>
2386
2358
 
@@ -2408,12 +2380,7 @@
2408
2380
  value="showLabels"
2409
2381
  onChange="(showLabels) => props.updateChart(this.props.figureId, { showLabels })"
2410
2382
  />
2411
- <Checkbox
2412
- name="'showValues'"
2413
- label.translate="Show values"
2414
- value="showValues"
2415
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2416
- />
2383
+ <ChartShowValues t-props="props" defaultValue="defaults.showValues"/>
2417
2384
  </div>
2418
2385
  </Section>
2419
2386
  <Section class="'pt-0'" t-if="showValues || showLabels">
@@ -2435,11 +2402,7 @@
2435
2402
  <t t-name="o-spreadsheet-ScorecardChartDesignPanel">
2436
2403
  <t t-set="color_up">Color Up</t>
2437
2404
  <t t-set="color_down">Color Down</t>
2438
- <GeneralDesignEditor
2439
- figureId="props.figureId"
2440
- definition="props.definition"
2441
- updateChart="props.updateChart"
2442
- defaultChartTitleFontSize="defaultScorecardTitleFontSize">
2405
+ <GeneralDesignEditor t-props="props" defaultChartTitleFontSize="defaultScorecardTitleFontSize">
2443
2406
  <t t-set-slot="general-extension">
2444
2407
  <Section class="'pt-1'" title.translate="Number formatting">
2445
2408
  <Checkbox
@@ -2553,23 +2516,12 @@
2553
2516
  </t>
2554
2517
 
2555
2518
  <t t-name="o-spreadsheet-RadarChartDesignPanel">
2556
- <GeneralDesignEditor
2557
- figureId="props.figureId"
2558
- definition="props.definition"
2559
- updateChart="props.updateChart">
2519
+ <GeneralDesignEditor t-props="props">
2560
2520
  <t t-set-slot="general-extension">
2561
- <ChartLegend
2562
- figureId="props.figureId"
2563
- definition="props.definition"
2564
- updateChart="props.updateChart"
2565
- />
2521
+ <ChartLegend t-props="props"/>
2566
2522
  <Section class="'pt-0'" title.translate="Values">
2567
- <Checkbox
2568
- name="'showValues'"
2569
- label.translate="Show values"
2570
- value="props.definition.showValues"
2571
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2572
- />
2523
+ <ChartShowValues t-props="props"/>
2524
+ <ChartShowDataMarkers t-props="props"/>
2573
2525
  </Section>
2574
2526
  </t>
2575
2527
  </GeneralDesignEditor>
@@ -2577,23 +2529,11 @@
2577
2529
  </t>
2578
2530
 
2579
2531
  <t t-name="o-spreadsheet-PieChartDesignPanel">
2580
- <GeneralDesignEditor
2581
- figureId="props.figureId"
2582
- definition="props.definition"
2583
- updateChart="props.updateChart">
2532
+ <GeneralDesignEditor t-props="props">
2584
2533
  <t t-set-slot="general-extension">
2585
- <ChartLegend
2586
- figureId="props.figureId"
2587
- definition="props.definition"
2588
- updateChart="props.updateChart"
2589
- />
2534
+ <ChartLegend t-props="props"/>
2590
2535
  <Section class="'pt-0'" title.translate="Values">
2591
- <Checkbox
2592
- name="'showValues'"
2593
- label.translate="Show values"
2594
- value="props.definition.showValues"
2595
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2596
- />
2536
+ <ChartShowValues t-props="props"/>
2597
2537
  </Section>
2598
2538
  <PieHoleSize
2599
2539
  t-if="props.definition.isDoughnut"
@@ -2648,6 +2588,29 @@
2648
2588
  </div>
2649
2589
  </t>
2650
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
+
2651
2614
  <t t-name="o-spreadsheet-LineConfigPanel">
2652
2615
  <div>
2653
2616
  <Section class="'pt-0'">
@@ -2725,10 +2688,7 @@
2725
2688
  </t>
2726
2689
 
2727
2690
  <t t-name="o-spreadsheet-GeoChartDesignPanel">
2728
- <GeneralDesignEditor
2729
- figureId="props.figureId"
2730
- definition="props.definition"
2731
- updateChart="props.updateChart">
2691
+ <GeneralDesignEditor t-props="props">
2732
2692
  <t t-set-slot="general-extension">
2733
2693
  <Section class="'pt-0'" title.translate="Legend position">
2734
2694
  <select
@@ -2830,11 +2790,7 @@
2830
2790
  </t>
2831
2791
 
2832
2792
  <t t-name="o-spreadsheet-GaugeChartDesignPanel">
2833
- <GeneralDesignEditor
2834
- figureId="props.figureId"
2835
- definition="props.definition"
2836
- updateChart="props.updateChart"
2837
- />
2793
+ <GeneralDesignEditor t-props="props"/>
2838
2794
  <SidePanelCollapsible isInitiallyCollapsed="false" title.translate="Gauge Design">
2839
2795
  <t t-set-slot="content">
2840
2796
  <Section class="'pt-0'" title.translate="Range">
@@ -2971,18 +2927,10 @@
2971
2927
  </t>
2972
2928
 
2973
2929
  <t t-name="o-spreadsheet-FunnelChartDesignPanel">
2974
- <GeneralDesignEditor
2975
- figureId="props.figureId"
2976
- definition="props.definition"
2977
- updateChart="props.updateChart">
2930
+ <GeneralDesignEditor t-props="props">
2978
2931
  <t t-set-slot="general-extension">
2979
2932
  <Section class="'pt-0'" title.translate="Values">
2980
- <Checkbox
2981
- name="'showValues'"
2982
- label.translate="Show values"
2983
- value="props.definition.showValues"
2984
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
2985
- />
2933
+ <ChartShowValues t-props="props"/>
2986
2934
  </Section>
2987
2935
  </t>
2988
2936
  </GeneralDesignEditor>
@@ -3005,23 +2953,12 @@
3005
2953
  </t>
3006
2954
 
3007
2955
  <t t-name="o-spreadsheet-ComboChartDesignPanel">
3008
- <GeneralDesignEditor
3009
- figureId="props.figureId"
3010
- definition="props.definition"
3011
- updateChart="props.updateChart">
2956
+ <GeneralDesignEditor t-props="props">
3012
2957
  <t t-set-slot="general-extension">
3013
- <ChartLegend
3014
- figureId="props.figureId"
3015
- definition="props.definition"
3016
- updateChart="props.updateChart"
3017
- />
2958
+ <ChartLegend t-props="props"/>
3018
2959
  <Section class="'pt-0'" title.translate="Values">
3019
- <Checkbox
3020
- name="'showValues'"
3021
- label.translate="Show values"
3022
- value="props.definition.showValues"
3023
- onChange="showValues => props.updateChart(this.props.figureId, {showValues})"
3024
- />
2960
+ <ChartShowValues t-props="props"/>
2961
+ <ChartShowDataMarkers t-props="props"/>
3025
2962
  </Section>
3026
2963
  </t>
3027
2964
  </GeneralDesignEditor>
@@ -3051,23 +2988,11 @@
3051
2988
  </t>
3052
2989
 
3053
2990
  <t t-name="o-spreadsheet-ChartWithAxisDesignPanel">
3054
- <GeneralDesignEditor
3055
- figureId="props.figureId"
3056
- definition="props.definition"
3057
- updateChart="props.updateChart">
2991
+ <GeneralDesignEditor t-props="props">
3058
2992
  <t t-set-slot="general-extension">
3059
- <ChartLegend
3060
- figureId="props.figureId"
3061
- definition="props.definition"
3062
- updateChart="props.updateChart"
3063
- />
2993
+ <ChartLegend t-props="props"/>
3064
2994
  <Section class="'pt-0'" title.translate="Values">
3065
- <Checkbox
3066
- name="'showValues'"
3067
- label.translate="Show values"
3068
- value="props.definition.showValues"
3069
- onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
3070
- />
2995
+ <ChartShowValues t-props="props"/>
3071
2996
  </Section>
3072
2997
  </t>
3073
2998
  </GeneralDesignEditor>
@@ -3505,6 +3430,24 @@
3505
3430
  </div>
3506
3431
  </t>
3507
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
+
3508
3451
  <t t-name="o-spreadsheet-SeriesWithAxisDesignEditor">
3509
3452
  <SeriesDesignEditor t-props="props">
3510
3453
  <t t-set-slot="data-series-extension" t-slot-scope="scope">
@@ -6017,14 +5960,14 @@
6017
5960
 
6018
5961
  <t t-name="o-spreadsheet-ScorecardChart">
6019
5962
  <canvas
6020
- class="o-figure-canvas o-scorecard w-100 h-100"
5963
+ class="o-figure-canvas o-scorecard w-100 h-100 d-block"
6021
5964
  t-ref="chartContainer"
6022
5965
  t-att-title="title"
6023
5966
  />
6024
5967
  </t>
6025
5968
 
6026
5969
  <t t-name="o-spreadsheet-GaugeChartComponent">
6027
- <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"/>
6028
5971
  </t>
6029
5972
 
6030
5973
  <t t-name="spreadsheet.ChartDashboardMenu">
@@ -6354,7 +6297,7 @@
6354
6297
  t-as="content"
6355
6298
  t-key="content_index"
6356
6299
  t-att-class="content.classes?.join(' ')"
6357
- t-attf-style="color: {{content.color || 'inherit'}};"
6300
+ t-attf-style="color: {{content.color || '#000000'}};"
6358
6301
  t-esc="content.value"
6359
6302
  />
6360
6303
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.4.0-alpha.4",
3
+ "version": "18.4.0-alpha.6",
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.