@odoo/o-spreadsheet 18.3.2 → 18.4.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.
- package/dist/o-spreadsheet.cjs.js +42272 -41398
- package/dist/o-spreadsheet.d.ts +319 -203
- package/dist/o-spreadsheet.esm.js +42273 -41399
- package/dist/o-spreadsheet.iife.js +42355 -41481
- package/dist/o-spreadsheet.iife.min.js +1743 -1718
- package/dist/o_spreadsheet.xml +80 -14
- package/package.json +11 -6
package/dist/o_spreadsheet.xml
CHANGED
|
@@ -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.
|
|
5
|
-
@date 2025-05-12T05:
|
|
6
|
-
@hash
|
|
4
|
+
@version 18.4.0-alpha.2
|
|
5
|
+
@date 2025-05-12T05:28:52.249Z
|
|
6
|
+
@hash a11158e
|
|
7
7
|
-->
|
|
8
8
|
<odoo>
|
|
9
9
|
<t t-name="o-spreadsheet-ValidationMessages">
|
|
@@ -2426,6 +2426,10 @@
|
|
|
2426
2426
|
defaultStyle="defaults.valuesDesign"
|
|
2427
2427
|
/>
|
|
2428
2428
|
</Section>
|
|
2429
|
+
<PieHoleSize
|
|
2430
|
+
value="props.definition.pieHolePercentage ?? 25"
|
|
2431
|
+
onValueChange.bind="onPieHoleSizeChange"
|
|
2432
|
+
/>
|
|
2429
2433
|
</t>
|
|
2430
2434
|
</SidePanelCollapsible>
|
|
2431
2435
|
</t>
|
|
@@ -2583,6 +2587,11 @@
|
|
|
2583
2587
|
onChange="(showValues) => props.updateChart(this.props.figureId, { showValues })"
|
|
2584
2588
|
/>
|
|
2585
2589
|
</Section>
|
|
2590
|
+
<PieHoleSize
|
|
2591
|
+
t-if="props.definition.isDoughnut"
|
|
2592
|
+
value="props.definition.pieHolePercentage ?? 50"
|
|
2593
|
+
onValueChange.bind="onPieHoleSizeChange"
|
|
2594
|
+
/>
|
|
2586
2595
|
</t>
|
|
2587
2596
|
</GeneralDesignEditor>
|
|
2588
2597
|
</t>
|
|
@@ -2787,9 +2796,11 @@
|
|
|
2787
2796
|
|
|
2788
2797
|
<ChartDataSeries
|
|
2789
2798
|
ranges="dataRanges"
|
|
2790
|
-
onSelectionChanged="
|
|
2791
|
-
onSelectionConfirmed="
|
|
2792
|
-
|
|
2799
|
+
onSelectionChanged.bind="onDataSeriesRangesChanged"
|
|
2800
|
+
onSelectionConfirmed.bind="onDataSeriesConfirmed"
|
|
2801
|
+
onSelectionReordered.bind="onDataSeriesReordered"
|
|
2802
|
+
onSelectionRemoved.bind="onDataSeriesRemoved"
|
|
2803
|
+
maxNumberOfUsedRanges="maxNumberOfUsedRanges"
|
|
2793
2804
|
/>
|
|
2794
2805
|
<ChartLabelRange
|
|
2795
2806
|
range="this.getLabelRange()"
|
|
@@ -3610,6 +3621,22 @@
|
|
|
3610
3621
|
</SidePanelCollapsible>
|
|
3611
3622
|
</t>
|
|
3612
3623
|
|
|
3624
|
+
<t t-name="o-spreadsheet.PieHoleSize">
|
|
3625
|
+
<Section class="'pt-0'" title.translate="Center radius">
|
|
3626
|
+
<div class="d-flex flex-row">
|
|
3627
|
+
<input
|
|
3628
|
+
t-att-value="props.value"
|
|
3629
|
+
type="number"
|
|
3630
|
+
class="o-input o-pie-hole-size-input"
|
|
3631
|
+
min="0"
|
|
3632
|
+
max="95"
|
|
3633
|
+
t-on-change="(ev) => debouncedOnChange(ev.target.value)"
|
|
3634
|
+
/>
|
|
3635
|
+
%
|
|
3636
|
+
</div>
|
|
3637
|
+
</Section>
|
|
3638
|
+
</t>
|
|
3639
|
+
|
|
3613
3640
|
<t t-name="o-spreadsheet-ChartLegend">
|
|
3614
3641
|
<Section class="'pt-0'" title.translate="Legend position">
|
|
3615
3642
|
<select
|
|
@@ -3654,6 +3681,7 @@
|
|
|
3654
3681
|
onSelectionConfirmed.bind="onDataSeriesConfirmed"
|
|
3655
3682
|
onSelectionReordered.bind="onDataSeriesReordered"
|
|
3656
3683
|
onSelectionRemoved.bind="onDataSeriesRemoved"
|
|
3684
|
+
maxNumberOfUsedRanges="maxNumberOfUsedRanges"
|
|
3657
3685
|
/>
|
|
3658
3686
|
<ChartLabelRange
|
|
3659
3687
|
range="this.getLabelRange()"
|
|
@@ -3707,6 +3735,8 @@
|
|
|
3707
3735
|
onSelectionReordered="props.onSelectionReordered"
|
|
3708
3736
|
onSelectionRemoved="props.onSelectionRemoved"
|
|
3709
3737
|
colors="colors"
|
|
3738
|
+
disabledRanges="disabledRanges"
|
|
3739
|
+
disabledRangeTitle.translate="Excluded due to chart limits. Drag to swap with another range."
|
|
3710
3740
|
/>
|
|
3711
3741
|
</Section>
|
|
3712
3742
|
</t>
|
|
@@ -3810,6 +3840,7 @@
|
|
|
3810
3840
|
t-att-style="getColor(range)"
|
|
3811
3841
|
class="o-input mb-2"
|
|
3812
3842
|
t-att-class="{
|
|
3843
|
+
'o-disabled-ranges' : range.disabled and !range.isFocused,
|
|
3813
3844
|
'o-focused' : range.isFocused,
|
|
3814
3845
|
'o-invalid border-danger position-relative': isInvalid || !range.isValidRange,
|
|
3815
3846
|
'text-decoration-underline': range.xc and range.isFocused and state.mode === 'select-range'
|
|
@@ -3818,10 +3849,16 @@
|
|
|
3818
3849
|
/>
|
|
3819
3850
|
<span
|
|
3820
3851
|
t-if="isInvalid || !range.isValidRange"
|
|
3821
|
-
class="
|
|
3852
|
+
class="input-icon text-danger position-absolute d-flex align-items-center"
|
|
3822
3853
|
title="This range is invalid">
|
|
3823
3854
|
<t t-call="o-spreadsheet-Icon.ERROR"/>
|
|
3824
3855
|
</span>
|
|
3856
|
+
<span
|
|
3857
|
+
class="input-icon o-disabled-ranges position-absolute d-flex align-items-center"
|
|
3858
|
+
t-if="!range.isFocused and range.disabled"
|
|
3859
|
+
t-att-title="props.disabledRangeTitle">
|
|
3860
|
+
<t t-call="o-spreadsheet-Icon.CIRCLE_INFO"/>
|
|
3861
|
+
</span>
|
|
3825
3862
|
</div>
|
|
3826
3863
|
<button
|
|
3827
3864
|
class="border-0 bg-transparent fw-bold o-remove-selection o-button-icon pe-0"
|
|
@@ -3830,7 +3867,6 @@
|
|
|
3830
3867
|
<t t-call="o-spreadsheet-Icon.TRASH_FILLED"/>
|
|
3831
3868
|
</button>
|
|
3832
3869
|
</div>
|
|
3833
|
-
|
|
3834
3870
|
<div class="d-flex flex-row w-100 o-selection-input">
|
|
3835
3871
|
<button class="o-button o-add-selection" t-if="canAddRange" t-on-click="addEmptyInput">
|
|
3836
3872
|
Add range
|
|
@@ -5716,6 +5752,9 @@
|
|
|
5716
5752
|
t-key="this.props.figureUI.id"
|
|
5717
5753
|
/>
|
|
5718
5754
|
</div>
|
|
5755
|
+
<div t-if="env.isDashboard()" class="position-absolute top-0 end-0">
|
|
5756
|
+
<ChartDashboardMenu figureUI="props.figureUI"/>
|
|
5757
|
+
</div>
|
|
5719
5758
|
</t>
|
|
5720
5759
|
|
|
5721
5760
|
<t t-name="o-spreadsheet-FigureComponent">
|
|
@@ -5811,6 +5850,32 @@
|
|
|
5811
5850
|
<canvas class="o-figure-canvas o-gauge-chart w-100 h-100" t-ref="chartContainer"/>
|
|
5812
5851
|
</t>
|
|
5813
5852
|
|
|
5853
|
+
<t t-name="spreadsheet.ChartDashboardMenu">
|
|
5854
|
+
<div class="o-dashboard-chart-select position-absolute top-0 end-0" t-on-click.stop="">
|
|
5855
|
+
<div class="d-flex flex-row px-1" t-att-style="backgroundColor">
|
|
5856
|
+
<t t-foreach="getAvailableTypes()" t-as="type" t-key="type.chartSubtype">
|
|
5857
|
+
<button
|
|
5858
|
+
t-attf-class=" {{type.icon}} {{type.chartType === selectedChartType ? 'active' : ''}}"
|
|
5859
|
+
class="o-chart-dashboard-item btn mt-1 me-1 p-1 "
|
|
5860
|
+
t-att-title="type.displayName"
|
|
5861
|
+
t-on-click="() => this.onTypeChange(type.chartSubtype)"
|
|
5862
|
+
t-att-data-id="type.chartSubtype"
|
|
5863
|
+
/>
|
|
5864
|
+
</t>
|
|
5865
|
+
<button
|
|
5866
|
+
class="o-chart-dashboard-item btn mt-1 p-1 fa fa-ellipsis-v"
|
|
5867
|
+
t-on-click="openContextMenu"
|
|
5868
|
+
/>
|
|
5869
|
+
</div>
|
|
5870
|
+
<Menu
|
|
5871
|
+
t-if="menuState.isOpen"
|
|
5872
|
+
anchorRect="menuState.anchorRect"
|
|
5873
|
+
menuItems="menuState.menuItems"
|
|
5874
|
+
onClose="() => this.menuState.isOpen=false"
|
|
5875
|
+
/>
|
|
5876
|
+
</div>
|
|
5877
|
+
</t>
|
|
5878
|
+
|
|
5814
5879
|
<t t-name="o-spreadsheet-ChartJsComponent">
|
|
5815
5880
|
<canvas class="o-figure-canvas w-100 h-100" t-att-style="canvasStyle" t-ref="graphContainer"/>
|
|
5816
5881
|
</t>
|
|
@@ -6023,9 +6088,10 @@
|
|
|
6023
6088
|
|
|
6024
6089
|
<t t-name="o-spreadsheet-Composer">
|
|
6025
6090
|
<div class="o-composer-container w-100 h-100">
|
|
6091
|
+
<t t-set="autoCompleteProposals" t-value="props.composerStore.autoCompleteProposals"/>
|
|
6026
6092
|
<t
|
|
6027
6093
|
t-set="assistantIsAvailable"
|
|
6028
|
-
t-value="
|
|
6094
|
+
t-value="autoCompleteProposals.length or functionDescriptionState.showDescription"
|
|
6029
6095
|
/>
|
|
6030
6096
|
<div class="d-flex flex-row position-relative">
|
|
6031
6097
|
<span
|
|
@@ -6089,15 +6155,15 @@
|
|
|
6089
6155
|
argsToFocus="functionDescriptionState.argsToFocus"
|
|
6090
6156
|
/>
|
|
6091
6157
|
<div
|
|
6092
|
-
t-if="functionDescriptionState.showDescription and
|
|
6158
|
+
t-if="functionDescriptionState.showDescription and autoCompleteProposals.length"
|
|
6093
6159
|
class="border-top"
|
|
6094
6160
|
/>
|
|
6095
6161
|
<TextValueProvider
|
|
6096
|
-
t-if="
|
|
6097
|
-
proposals="
|
|
6098
|
-
selectedIndex="
|
|
6162
|
+
t-if="autoCompleteProposals.length"
|
|
6163
|
+
proposals="autoCompleteProposals"
|
|
6164
|
+
selectedIndex="props.composerStore.autoCompleteSelectedIndex"
|
|
6099
6165
|
onValueSelected.bind="this.autoComplete"
|
|
6100
|
-
onValueHovered.bind="
|
|
6166
|
+
onValueHovered.bind="props.composerStore.selectAutoCompleteIndex"
|
|
6101
6167
|
/>
|
|
6102
6168
|
</div>
|
|
6103
6169
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odoo/o-spreadsheet",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.4.0-alpha.2",
|
|
4
4
|
"description": "A spreadsheet component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/o-spreadsheet.cjs.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "tsc --noEmit --project tsconfig.jest.json && jest",
|
|
27
27
|
"test:watch": "jest --watch",
|
|
28
28
|
"prettier": "prettier . --write",
|
|
29
|
-
"check-formatting": "prettier . --check",
|
|
29
|
+
"check-formatting": "prettier . --check && eslint",
|
|
30
30
|
"prepare": "husky install",
|
|
31
31
|
"watch": "npm-run-all -p watch:*",
|
|
32
32
|
"watch:bundle": "npm run bundle:iife -- --watch",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"watch:scss": "node tools/bundle_scss/watch_scss_files.cjs",
|
|
36
36
|
"unzipXlsx": "node tools/bundle_xlsx/unzip_xlsx_demo.cjs",
|
|
37
37
|
"zipXlsx": "node tools/bundle_xlsx/zip_xlsx_demo.cjs",
|
|
38
|
-
"build": "npm-run-all build:js bundle:esm \"bundle:xml -- --outDir build\" && node tools/bundle_scss/main.cjs --out build"
|
|
38
|
+
"build": "npm-run-all build:js bundle:esm \"bundle:xml -- --outDir build\" && node tools/bundle_scss/main.cjs --out build",
|
|
39
|
+
"lint": "eslint --fix"
|
|
39
40
|
},
|
|
40
41
|
"browserslist": [
|
|
41
42
|
"last 1 Chrome versions"
|
|
@@ -64,13 +65,13 @@
|
|
|
64
65
|
"@types/jest": "^27.0.1",
|
|
65
66
|
"@types/node": "^20.17.24",
|
|
66
67
|
"@types/rbush": "^3.0.3",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
|
67
69
|
"babel-eslint": "^10.1.0",
|
|
68
70
|
"body-parser": "^1.19.0",
|
|
69
71
|
"chart.js": "4.4.5",
|
|
70
72
|
"chartjs-adapter-luxon": "^1.3.1",
|
|
71
73
|
"chartjs-chart-geo": "^4.3.2",
|
|
72
74
|
"cors": "^2.8.5",
|
|
73
|
-
"eslint": "^6.8.0",
|
|
74
75
|
"express": "^4.17.1",
|
|
75
76
|
"express-form-data": "^2.0.19",
|
|
76
77
|
"express-ws": "^4.0.0",
|
|
@@ -96,6 +97,7 @@
|
|
|
96
97
|
"sass": "^1.62.1",
|
|
97
98
|
"seedrandom": "^3.0.5",
|
|
98
99
|
"typescript": "^5.8.2",
|
|
100
|
+
"typescript-eslint": "^8.30.1",
|
|
99
101
|
"xml-formatter": "^2.4.0"
|
|
100
102
|
},
|
|
101
103
|
"prettier": {
|
|
@@ -139,9 +141,12 @@
|
|
|
139
141
|
]
|
|
140
142
|
},
|
|
141
143
|
"lint-staged": {
|
|
142
|
-
"*":
|
|
144
|
+
"*": [
|
|
145
|
+
"prettier --write",
|
|
146
|
+
"eslint --fix"
|
|
147
|
+
]
|
|
143
148
|
},
|
|
144
149
|
"publishConfig": {
|
|
145
|
-
"tag": "
|
|
150
|
+
"tag": "alpha"
|
|
146
151
|
}
|
|
147
152
|
}
|