@odoo/o-spreadsheet 18.5.0-alpha.1 → 18.5.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.
- package/dist/o-spreadsheet.cjs.js +16230 -13081
- package/dist/o-spreadsheet.d.ts +1068 -547
- package/dist/o-spreadsheet.esm.js +16230 -13081
- package/dist/o-spreadsheet.iife.js +11713 -8564
- package/dist/o-spreadsheet.iife.min.js +565 -535
- package/dist/o_spreadsheet.xml +469 -114
- package/package.json +1 -1
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.0-alpha.
|
|
5
|
-
@date 2025-
|
|
6
|
-
@hash
|
|
4
|
+
@version 18.5.0-alpha.11
|
|
5
|
+
@date 2025-08-26T10:14:56.034Z
|
|
6
|
+
@hash b913e49
|
|
7
7
|
-->
|
|
8
8
|
<odoo>
|
|
9
9
|
<t t-name="o-spreadsheet-ValidationMessages">
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
t-ref="input"
|
|
216
216
|
class="os-input w-100"
|
|
217
217
|
type="text"
|
|
218
|
-
t-att-class="
|
|
218
|
+
t-att-class="inputClass"
|
|
219
219
|
t-att-id="props.id"
|
|
220
220
|
t-att-placeholder="props.placeholder"
|
|
221
221
|
t-att-value="props.value"
|
|
@@ -981,6 +981,15 @@
|
|
|
981
981
|
t-att-style="dragAndDrop.itemsStyle[col.nameWithGranularity]"
|
|
982
982
|
class="pt-1">
|
|
983
983
|
<PivotDimension dimension="col" onRemoved.bind="removeDimension">
|
|
984
|
+
<t t-set-slot="upper-right-icons">
|
|
985
|
+
<t t-set="errorMessage" t-value="getHugeDimensionErrorMessage(col)"/>
|
|
986
|
+
<i
|
|
987
|
+
t-if="errorMessage"
|
|
988
|
+
class="text-warning fa fa-exclamation-triangle"
|
|
989
|
+
t-att-title="errorMessage"
|
|
990
|
+
/>
|
|
991
|
+
</t>
|
|
992
|
+
|
|
984
993
|
<PivotDimensionGranularity
|
|
985
994
|
t-if="isDateOrDatetimeField(col)"
|
|
986
995
|
dimension="col"
|
|
@@ -989,6 +998,12 @@
|
|
|
989
998
|
allGranularities="getGranularitiesFor(col)"
|
|
990
999
|
/>
|
|
991
1000
|
<PivotDimensionOrder dimension="col" onUpdated.bind="this.updateOrder"/>
|
|
1001
|
+
<PivotCustomGroupsCollapsible
|
|
1002
|
+
t-if="col.isCustomField"
|
|
1003
|
+
pivotId="props.pivotId"
|
|
1004
|
+
customField="getCustomField(col)"
|
|
1005
|
+
onCustomFieldUpdated="props.onDimensionsUpdated"
|
|
1006
|
+
/>
|
|
992
1007
|
</PivotDimension>
|
|
993
1008
|
</div>
|
|
994
1009
|
</t>
|
|
@@ -1007,6 +1022,15 @@
|
|
|
1007
1022
|
t-att-style="dragAndDrop.itemsStyle[row.nameWithGranularity]"
|
|
1008
1023
|
class="pt-1">
|
|
1009
1024
|
<PivotDimension dimension="row" onRemoved.bind="removeDimension">
|
|
1025
|
+
<t t-set-slot="upper-right-icons">
|
|
1026
|
+
<t t-set="errorMessage" t-value="getHugeDimensionErrorMessage(row)"/>
|
|
1027
|
+
<i
|
|
1028
|
+
t-if="errorMessage"
|
|
1029
|
+
class="text-warning fa fa-exclamation-triangle"
|
|
1030
|
+
t-att-title="errorMessage"
|
|
1031
|
+
/>
|
|
1032
|
+
</t>
|
|
1033
|
+
|
|
1010
1034
|
<PivotDimensionGranularity
|
|
1011
1035
|
t-if="isDateOrDatetimeField(row)"
|
|
1012
1036
|
dimension="row"
|
|
@@ -1015,6 +1039,12 @@
|
|
|
1015
1039
|
allGranularities="getGranularitiesFor(row)"
|
|
1016
1040
|
/>
|
|
1017
1041
|
<PivotDimensionOrder dimension="row" onUpdated.bind="this.updateOrder"/>
|
|
1042
|
+
<PivotCustomGroupsCollapsible
|
|
1043
|
+
t-if="row.isCustomField"
|
|
1044
|
+
pivotId="props.pivotId"
|
|
1045
|
+
customField="getCustomField(row)"
|
|
1046
|
+
onCustomFieldUpdated="props.onDimensionsUpdated"
|
|
1047
|
+
/>
|
|
1018
1048
|
</PivotDimension>
|
|
1019
1049
|
</div>
|
|
1020
1050
|
</t>
|
|
@@ -1243,6 +1273,42 @@
|
|
|
1243
1273
|
</Section>
|
|
1244
1274
|
</t>
|
|
1245
1275
|
|
|
1276
|
+
<t t-name="o-spreadsheet-PivotCustomGroupsCollapsible">
|
|
1277
|
+
<SidePanelCollapsible
|
|
1278
|
+
class="'o-pivot-custom-groups'"
|
|
1279
|
+
isInitiallyCollapsed="true"
|
|
1280
|
+
title.translate="Groups">
|
|
1281
|
+
<t t-set-slot="content">
|
|
1282
|
+
<div class="ps-4">
|
|
1283
|
+
<div
|
|
1284
|
+
t-foreach="groups"
|
|
1285
|
+
t-as="group"
|
|
1286
|
+
t-key="group_index"
|
|
1287
|
+
class="o-pivot-custom-group pb-1">
|
|
1288
|
+
<div
|
|
1289
|
+
class="d-flex align-items-center justify-content-between small"
|
|
1290
|
+
t-on-pointerdown.stop="">
|
|
1291
|
+
<TextInput
|
|
1292
|
+
value="group.name"
|
|
1293
|
+
onChange="(newName) => this.onRenameGroup(group_index, newName)"
|
|
1294
|
+
/>
|
|
1295
|
+
<i
|
|
1296
|
+
class="o-button-icon ps-3 fa fa-trash"
|
|
1297
|
+
t-on-click="() => this.onDeleteGroup(group_index)"
|
|
1298
|
+
/>
|
|
1299
|
+
</div>
|
|
1300
|
+
</div>
|
|
1301
|
+
<div
|
|
1302
|
+
t-if="!hasOthersGroup"
|
|
1303
|
+
class="o-button-link o-add-others-group small pb-1"
|
|
1304
|
+
t-on-click="() => this.addOthersGroup()">
|
|
1305
|
+
<span>+ "Others" group</span>
|
|
1306
|
+
</div>
|
|
1307
|
+
</div>
|
|
1308
|
+
</t>
|
|
1309
|
+
</SidePanelCollapsible>
|
|
1310
|
+
</t>
|
|
1311
|
+
|
|
1246
1312
|
<t t-name="o-spreadsheet-MoreFormatsPanel">
|
|
1247
1313
|
<div class="o-more-formats-panel">
|
|
1248
1314
|
<div
|
|
@@ -1543,11 +1609,11 @@
|
|
|
1543
1609
|
<div class="o-dv-list-values p-1 d-flex align-items-center">
|
|
1544
1610
|
<div class="me-2">
|
|
1545
1611
|
<RoundColorPicker
|
|
1546
|
-
currentColor="props.criterion.colors?.[value] || '#E7E9ED'"
|
|
1547
|
-
onColorPicked="(c) => this.onColorChanged(c, value)"
|
|
1612
|
+
currentColor="props.criterion.colors?.[value.value] || '#E7E9ED'"
|
|
1613
|
+
onColorPicked="(c) => this.onColorChanged(c, value.value)"
|
|
1548
1614
|
/>
|
|
1549
1615
|
</div>
|
|
1550
|
-
<input type="text" class="o-input" t-att-value="value" disabled="1"/>
|
|
1616
|
+
<input type="text" class="o-input" t-att-value="value.label" disabled="1"/>
|
|
1551
1617
|
</div>
|
|
1552
1618
|
</t>
|
|
1553
1619
|
|
|
@@ -1688,8 +1754,9 @@
|
|
|
1688
1754
|
<t t-if="state.mode === 'edit'">
|
|
1689
1755
|
<ConditionalFormattingEditor
|
|
1690
1756
|
editedCf="editedCF"
|
|
1691
|
-
|
|
1757
|
+
onExit.bind="switchToList"
|
|
1692
1758
|
onCancel.bind="cancelEdition"
|
|
1759
|
+
isNewCf="originalEditedCf === undefined"
|
|
1693
1760
|
/>
|
|
1694
1761
|
</t>
|
|
1695
1762
|
</div>
|
|
@@ -1912,7 +1979,7 @@
|
|
|
1912
1979
|
<div class="o-cf-data-bar-editor">
|
|
1913
1980
|
<div class="o-section-subtitle">Color</div>
|
|
1914
1981
|
<RoundColorPicker
|
|
1915
|
-
currentColor="
|
|
1982
|
+
currentColor="colorNumberToHex(rule.color)"
|
|
1916
1983
|
onColorPicked.bind="updateDataBarColor"
|
|
1917
1984
|
disableNoColor="true"
|
|
1918
1985
|
/>
|
|
@@ -2053,7 +2120,7 @@
|
|
|
2053
2120
|
</Section>
|
|
2054
2121
|
<Section class="'pt-1'">
|
|
2055
2122
|
<div class="o-sidePanelButtons">
|
|
2056
|
-
<button t-on-click="
|
|
2123
|
+
<button t-on-click="onCancel" class="o-button o-cf-cancel">Cancel</button>
|
|
2057
2124
|
<button
|
|
2058
2125
|
t-on-click="onSave"
|
|
2059
2126
|
class="o-button primary o-cf-save"
|
|
@@ -2212,11 +2279,12 @@
|
|
|
2212
2279
|
|
|
2213
2280
|
<t t-name="o-spreadsheet-SidePanelCollapsible">
|
|
2214
2281
|
<div class="" t-att-class="props.class">
|
|
2215
|
-
<div
|
|
2282
|
+
<div
|
|
2283
|
+
class="o_side_panel_collapsible_title o-fw-bold d-flex align-items-center"
|
|
2284
|
+
t-on-click="() => this.toggle()">
|
|
2216
2285
|
<div
|
|
2217
2286
|
class="collapsor w-100 d-flex align-items-center ps-1"
|
|
2218
|
-
t-att-class="state.isCollapsed ? 'collapsed' : ''"
|
|
2219
|
-
t-on-click="() => this.toggle()">
|
|
2287
|
+
t-att-class="state.isCollapsed ? 'collapsed' : ''">
|
|
2220
2288
|
<span class="collapsor-arrow">
|
|
2221
2289
|
<t t-call="o-spreadsheet-Icon.ANGLE_DOWN"/>
|
|
2222
2290
|
</span>
|
|
@@ -2273,6 +2341,30 @@
|
|
|
2273
2341
|
</label>
|
|
2274
2342
|
</t>
|
|
2275
2343
|
|
|
2344
|
+
<t t-name="o-spreadsheet-CarouselItemTitleCollapsible">
|
|
2345
|
+
<SidePanelCollapsible
|
|
2346
|
+
class="'o-carousel-item-title'"
|
|
2347
|
+
isInitiallyCollapsed="true"
|
|
2348
|
+
title.translate="Carousel Title">
|
|
2349
|
+
<t t-set-slot="content">
|
|
2350
|
+
<div class="ps-4">
|
|
2351
|
+
<TextInput
|
|
2352
|
+
value="title"
|
|
2353
|
+
onChange.bind="updateTitle"
|
|
2354
|
+
placeholder.translate="Title"
|
|
2355
|
+
alwaysShowBorder="true"
|
|
2356
|
+
/>
|
|
2357
|
+
<TextStyler
|
|
2358
|
+
style="style"
|
|
2359
|
+
updateStyle.bind="updateStyle"
|
|
2360
|
+
defaultStyle="defaultStyle"
|
|
2361
|
+
hasHorizontalAlign="false"
|
|
2362
|
+
/>
|
|
2363
|
+
</div>
|
|
2364
|
+
</t>
|
|
2365
|
+
</SidePanelCollapsible>
|
|
2366
|
+
</t>
|
|
2367
|
+
|
|
2276
2368
|
<t t-name="o-spreadsheet.BadgeSelection">
|
|
2277
2369
|
<div class="d-flex w-100 o-badge-selection">
|
|
2278
2370
|
<t t-foreach="props.choices" t-as="choice" t-key="choice.value">
|
|
@@ -2287,6 +2379,37 @@
|
|
|
2287
2379
|
</div>
|
|
2288
2380
|
</t>
|
|
2289
2381
|
|
|
2382
|
+
<t t-name="o-spreadsheet-GenericZoomableChartDesignPanel">
|
|
2383
|
+
<GeneralDesignEditor t-props="props">
|
|
2384
|
+
<t t-set-slot="general-extension">
|
|
2385
|
+
<ChartLegend t-props="props"/>
|
|
2386
|
+
<Section class="'pt-0'" title.translate="Values">
|
|
2387
|
+
<ChartShowValues t-props="props"/>
|
|
2388
|
+
</Section>
|
|
2389
|
+
<Section class="'pt-0'" title.translate="Zoom">
|
|
2390
|
+
<Checkbox
|
|
2391
|
+
name="'zoomable'"
|
|
2392
|
+
label.translate="Show slicer"
|
|
2393
|
+
value="props.definition.zoomable"
|
|
2394
|
+
onChange.bind="onToggleZoom"
|
|
2395
|
+
className="'mb-2'"
|
|
2396
|
+
/>
|
|
2397
|
+
</Section>
|
|
2398
|
+
</t>
|
|
2399
|
+
</GeneralDesignEditor>
|
|
2400
|
+
<SeriesWithAxisDesignEditor t-props="props"/>
|
|
2401
|
+
<SidePanelCollapsible isInitiallyCollapsed="true" title.translate="Axes">
|
|
2402
|
+
<t t-set-slot="content">
|
|
2403
|
+
<AxisDesignEditor
|
|
2404
|
+
axesList="axesList"
|
|
2405
|
+
chartId="props.chartId"
|
|
2406
|
+
definition="props.definition"
|
|
2407
|
+
updateChart="props.updateChart"
|
|
2408
|
+
/>
|
|
2409
|
+
</t>
|
|
2410
|
+
</SidePanelCollapsible>
|
|
2411
|
+
</t>
|
|
2412
|
+
|
|
2290
2413
|
<t t-name="o-spreadsheet-WaterfallChartDesignPanel">
|
|
2291
2414
|
<GeneralDesignEditor t-props="props">
|
|
2292
2415
|
<t t-set-slot="general-extension">
|
|
@@ -2302,6 +2425,18 @@
|
|
|
2302
2425
|
<Section class="'pt-0'" title.translate="Values">
|
|
2303
2426
|
<ChartShowValues t-props="props"/>
|
|
2304
2427
|
</Section>
|
|
2428
|
+
<Section class="'pt-0'" title.translate="Zoom">
|
|
2429
|
+
<Checkbox
|
|
2430
|
+
name="'zoomable'"
|
|
2431
|
+
label.translate="Show slicer"
|
|
2432
|
+
value="props.definition.zoomable"
|
|
2433
|
+
onChange.bind="onToggleZoom"
|
|
2434
|
+
className="'mb-2'"
|
|
2435
|
+
/>
|
|
2436
|
+
</Section>
|
|
2437
|
+
<Section class="'pt-1'" title.translate="Number formatting">
|
|
2438
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
2439
|
+
</Section>
|
|
2305
2440
|
</t>
|
|
2306
2441
|
</GeneralDesignEditor>
|
|
2307
2442
|
<SidePanelCollapsible isInitiallyCollapsed="true" title.translate="Waterfall design">
|
|
@@ -2360,7 +2495,7 @@
|
|
|
2360
2495
|
<t t-set-slot="content">
|
|
2361
2496
|
<AxisDesignEditor
|
|
2362
2497
|
axesList="axesList"
|
|
2363
|
-
|
|
2498
|
+
chartId="props.chartId"
|
|
2364
2499
|
definition="props.definition"
|
|
2365
2500
|
updateChart="props.updateChart"
|
|
2366
2501
|
/>
|
|
@@ -2382,14 +2517,14 @@
|
|
|
2382
2517
|
|
|
2383
2518
|
<t t-if="coloringOptions.type === 'categoryColor'">
|
|
2384
2519
|
<TreeMapCategoryColors
|
|
2385
|
-
|
|
2520
|
+
chartId="props.chartId"
|
|
2386
2521
|
definition="props.definition"
|
|
2387
2522
|
onColorChanged.bind="onCategoryColorChange"
|
|
2388
2523
|
/>
|
|
2389
2524
|
</t>
|
|
2390
2525
|
<t t-else="">
|
|
2391
2526
|
<TreeMapColorScale
|
|
2392
|
-
|
|
2527
|
+
chartId="props.chartId"
|
|
2393
2528
|
definition="props.definition"
|
|
2394
2529
|
onColorChanged.bind="onColorScaleChange"
|
|
2395
2530
|
/>
|
|
@@ -2405,13 +2540,13 @@
|
|
|
2405
2540
|
name="'showHeaders'"
|
|
2406
2541
|
label.translate="Show headers"
|
|
2407
2542
|
value="showHeaders"
|
|
2408
|
-
onChange="(showHeaders) => props.updateChart(this.props.
|
|
2543
|
+
onChange="(showHeaders) => props.updateChart(this.props.chartId, { showHeaders })"
|
|
2409
2544
|
/>
|
|
2410
2545
|
</Section>
|
|
2411
2546
|
<Section class="'pt-0'" t-if="showHeaders">
|
|
2412
2547
|
<TextStyler
|
|
2413
2548
|
class="'pt-0 o-header-style'"
|
|
2414
|
-
updateStyle="(headerDesign) => props.updateChart(this.props.
|
|
2549
|
+
updateStyle="(headerDesign) => props.updateChart(this.props.chartId, { headerDesign })"
|
|
2415
2550
|
style="props.definition.headerDesign || {}"
|
|
2416
2551
|
defaultStyle="defaults.headerDesign"
|
|
2417
2552
|
hasBackgroundColor="true"
|
|
@@ -2424,7 +2559,7 @@
|
|
|
2424
2559
|
name="'showLabels'"
|
|
2425
2560
|
label.translate="Show labels"
|
|
2426
2561
|
value="showLabels"
|
|
2427
|
-
onChange="(showLabels) => props.updateChart(this.props.
|
|
2562
|
+
onChange="(showLabels) => props.updateChart(this.props.chartId, { showLabels })"
|
|
2428
2563
|
/>
|
|
2429
2564
|
<ChartShowValues t-props="props" defaultValue="defaults.showValues"/>
|
|
2430
2565
|
</div>
|
|
@@ -2432,7 +2567,7 @@
|
|
|
2432
2567
|
<Section class="'pt-0'" t-if="showValues || showLabels">
|
|
2433
2568
|
<TextStyler
|
|
2434
2569
|
class="'pt-0 o-values-style'"
|
|
2435
|
-
updateStyle="(valuesDesign) => props.updateChart(this.props.
|
|
2570
|
+
updateStyle="(valuesDesign) => props.updateChart(this.props.chartId, { valuesDesign })"
|
|
2436
2571
|
style="props.definition.valuesDesign || {}"
|
|
2437
2572
|
defaultStyle="defaults.valuesDesign"
|
|
2438
2573
|
hasVerticalAlign="true"
|
|
@@ -2523,7 +2658,7 @@
|
|
|
2523
2658
|
name="'showLabels'"
|
|
2524
2659
|
label.translate="Show labels"
|
|
2525
2660
|
value="showLabels"
|
|
2526
|
-
onChange="(showLabels) => props.updateChart(this.props.
|
|
2661
|
+
onChange="(showLabels) => props.updateChart(this.props.chartId, { showLabels })"
|
|
2527
2662
|
/>
|
|
2528
2663
|
<ChartShowValues t-props="props" defaultValue="defaults.showValues"/>
|
|
2529
2664
|
</div>
|
|
@@ -2531,7 +2666,7 @@
|
|
|
2531
2666
|
<Section class="'pt-0'" t-if="showValues || showLabels">
|
|
2532
2667
|
<TextStyler
|
|
2533
2668
|
class="'o-values-style'"
|
|
2534
|
-
updateStyle="(valuesDesign) => props.updateChart(this.props.
|
|
2669
|
+
updateStyle="(valuesDesign) => props.updateChart(this.props.chartId, { valuesDesign })"
|
|
2535
2670
|
style="props.definition.valuesDesign || {}"
|
|
2536
2671
|
defaultStyle="defaults.valuesDesign"
|
|
2537
2672
|
/>
|
|
@@ -2550,12 +2685,7 @@
|
|
|
2550
2685
|
<GeneralDesignEditor t-props="props" defaultChartTitleFontSize="defaultScorecardTitleFontSize">
|
|
2551
2686
|
<t t-set-slot="general-extension">
|
|
2552
2687
|
<Section class="'pt-1'" title.translate="Number formatting">
|
|
2553
|
-
<
|
|
2554
|
-
name="'humanizeNumbers'"
|
|
2555
|
-
label="humanizeNumbersLabel"
|
|
2556
|
-
value="props.definition.humanize"
|
|
2557
|
-
onChange.bind="updateHumanizeNumbers"
|
|
2558
|
-
/>
|
|
2688
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
2559
2689
|
</Section>
|
|
2560
2690
|
</t>
|
|
2561
2691
|
</GeneralDesignEditor>
|
|
@@ -2668,6 +2798,9 @@
|
|
|
2668
2798
|
<ChartShowValues t-props="props"/>
|
|
2669
2799
|
<ChartShowDataMarkers t-props="props"/>
|
|
2670
2800
|
</Section>
|
|
2801
|
+
<Section class="'pt-1'" title.translate="Number formatting">
|
|
2802
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
2803
|
+
</Section>
|
|
2671
2804
|
</t>
|
|
2672
2805
|
</GeneralDesignEditor>
|
|
2673
2806
|
<SeriesDesignEditor t-props="props"/>
|
|
@@ -2680,9 +2813,12 @@
|
|
|
2680
2813
|
<Section class="'pt-0'" title.translate="Values">
|
|
2681
2814
|
<ChartShowValues t-props="props"/>
|
|
2682
2815
|
</Section>
|
|
2816
|
+
<Section class="'pt-1'" title.translate="Number formatting">
|
|
2817
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
2818
|
+
</Section>
|
|
2683
2819
|
<PieHoleSize
|
|
2684
2820
|
t-if="props.definition.isDoughnut"
|
|
2685
|
-
value="props.definition.pieHolePercentage ??
|
|
2821
|
+
value="props.definition.pieHolePercentage ?? this.defaultHoleSize"
|
|
2686
2822
|
onValueChange.bind="onPieHoleSizeChange"
|
|
2687
2823
|
/>
|
|
2688
2824
|
</t>
|
|
@@ -2690,46 +2826,48 @@
|
|
|
2690
2826
|
</t>
|
|
2691
2827
|
|
|
2692
2828
|
<t t-name="o-spreadsheet-ChartPanel">
|
|
2693
|
-
<div class="o-chart" t-if="
|
|
2829
|
+
<div class="o-chart d-flex flex-column h-100" t-if="chartId">
|
|
2694
2830
|
<div class="o-panel">
|
|
2695
2831
|
<div
|
|
2696
2832
|
class="o-panel-element o-panel-configuration"
|
|
2697
2833
|
t-att-class="store.panel !== 'configuration' ? 'inactive' : ''"
|
|
2698
|
-
t-on-click="(
|
|
2834
|
+
t-on-click="switchPanel.bind(this, 'configuration')">
|
|
2699
2835
|
<i class="fa fa-sliders"/>
|
|
2700
2836
|
Configuration
|
|
2701
2837
|
</div>
|
|
2702
2838
|
<div
|
|
2703
2839
|
class="o-panel-element o-panel-design"
|
|
2704
2840
|
t-att-class="store.panel !== 'design' ? 'inactive' : ''"
|
|
2705
|
-
t-on-click="(
|
|
2841
|
+
t-on-click="switchPanel.bind(this, 'design')">
|
|
2706
2842
|
<i class="fa fa-paint-brush"/>
|
|
2707
2843
|
Design
|
|
2708
2844
|
</div>
|
|
2709
2845
|
</div>
|
|
2710
2846
|
|
|
2711
|
-
<t t-set="definition" t-value="getChartDefinition(this.
|
|
2712
|
-
<
|
|
2713
|
-
<
|
|
2714
|
-
|
|
2715
|
-
t
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
<t
|
|
2725
|
-
t
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2847
|
+
<t t-set="definition" t-value="getChartDefinition(this.chartId)"/>
|
|
2848
|
+
<div class="o-panel-content overflow-y-auto" t-ref="panelContent">
|
|
2849
|
+
<div t-att-class="store.panel !== 'configuration' ? 'd-none' : ''">
|
|
2850
|
+
<ChartTypePicker chartId="chartId" chartPanelStore="store"/>
|
|
2851
|
+
<t
|
|
2852
|
+
t-component="chartPanel.configuration"
|
|
2853
|
+
definition="definition"
|
|
2854
|
+
chartId="chartId"
|
|
2855
|
+
updateChart.bind="updateChart"
|
|
2856
|
+
canUpdateChart.bind="canUpdateChart"
|
|
2857
|
+
t-key="chartId + definition.type"
|
|
2858
|
+
/>
|
|
2859
|
+
</div>
|
|
2860
|
+
<div t-att-class="store.panel !== 'design' ? 'd-none' : ''">
|
|
2861
|
+
<t
|
|
2862
|
+
t-component="chartPanel.design"
|
|
2863
|
+
definition="definition"
|
|
2864
|
+
chartId="chartId"
|
|
2865
|
+
updateChart.bind="updateChart"
|
|
2866
|
+
canUpdateChart.bind="canUpdateChart"
|
|
2867
|
+
t-key="chartId + definition.type"
|
|
2868
|
+
/>
|
|
2869
|
+
</div>
|
|
2870
|
+
</div>
|
|
2733
2871
|
</div>
|
|
2734
2872
|
</t>
|
|
2735
2873
|
|
|
@@ -2741,6 +2879,18 @@
|
|
|
2741
2879
|
<ChartShowValues t-props="props"/>
|
|
2742
2880
|
<ChartShowDataMarkers t-props="props"/>
|
|
2743
2881
|
</Section>
|
|
2882
|
+
<Section class="'pt-0'" title.translate="Zoom">
|
|
2883
|
+
<Checkbox
|
|
2884
|
+
name="'zoomable'"
|
|
2885
|
+
label.translate="Show slicer"
|
|
2886
|
+
value="props.definition.zoomable"
|
|
2887
|
+
onChange.bind="onToggleZoom"
|
|
2888
|
+
className="'mb-2'"
|
|
2889
|
+
/>
|
|
2890
|
+
</Section>
|
|
2891
|
+
<Section class="'pt-1'" title.translate="Number formatting">
|
|
2892
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
2893
|
+
</Section>
|
|
2744
2894
|
</t>
|
|
2745
2895
|
</GeneralDesignEditor>
|
|
2746
2896
|
<SeriesWithAxisDesignEditor t-props="props"/>
|
|
@@ -2748,7 +2898,7 @@
|
|
|
2748
2898
|
<t t-set-slot="content">
|
|
2749
2899
|
<AxisDesignEditor
|
|
2750
2900
|
axesList="axesList"
|
|
2751
|
-
|
|
2901
|
+
chartId="props.chartId"
|
|
2752
2902
|
definition="props.definition"
|
|
2753
2903
|
updateChart="props.updateChart"
|
|
2754
2904
|
/>
|
|
@@ -2847,6 +2997,9 @@
|
|
|
2847
2997
|
<option value="left">Bottom left</option>
|
|
2848
2998
|
</select>
|
|
2849
2999
|
</Section>
|
|
3000
|
+
<Section class="'pt-1'" title.translate="Number formatting">
|
|
3001
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
3002
|
+
</Section>
|
|
2850
3003
|
</t>
|
|
2851
3004
|
</GeneralDesignEditor>
|
|
2852
3005
|
|
|
@@ -2905,7 +3058,7 @@
|
|
|
2905
3058
|
<t t-name="o-spreadsheet-GeoChartConfigPanel">
|
|
2906
3059
|
<div>
|
|
2907
3060
|
<GeoChartRegionSelectSection
|
|
2908
|
-
|
|
3061
|
+
chartId="props.chartId"
|
|
2909
3062
|
definition="props.definition"
|
|
2910
3063
|
updateChart="props.updateChart"
|
|
2911
3064
|
/>
|
|
@@ -2935,7 +3088,13 @@
|
|
|
2935
3088
|
</t>
|
|
2936
3089
|
|
|
2937
3090
|
<t t-name="o-spreadsheet-GaugeChartDesignPanel">
|
|
2938
|
-
<GeneralDesignEditor t-props="props"
|
|
3091
|
+
<GeneralDesignEditor t-props="props">
|
|
3092
|
+
<t t-set-slot="general-extension">
|
|
3093
|
+
<Section class="'pt-1'" title.translate="Number formatting">
|
|
3094
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
3095
|
+
</Section>
|
|
3096
|
+
</t>
|
|
3097
|
+
</GeneralDesignEditor>
|
|
2939
3098
|
<SidePanelCollapsible isInitiallyCollapsed="false" title.translate="Gauge Design">
|
|
2940
3099
|
<t t-set-slot="content">
|
|
2941
3100
|
<Section class="'pt-0'" title.translate="Range">
|
|
@@ -3077,6 +3236,9 @@
|
|
|
3077
3236
|
<Section class="'pt-0'" title.translate="Values">
|
|
3078
3237
|
<ChartShowValues t-props="props"/>
|
|
3079
3238
|
</Section>
|
|
3239
|
+
<Section class="'pt-1'" title.translate="Number formatting">
|
|
3240
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
3241
|
+
</Section>
|
|
3080
3242
|
</t>
|
|
3081
3243
|
</GeneralDesignEditor>
|
|
3082
3244
|
|
|
@@ -3105,6 +3267,18 @@
|
|
|
3105
3267
|
<ChartShowValues t-props="props"/>
|
|
3106
3268
|
<ChartShowDataMarkers t-props="props"/>
|
|
3107
3269
|
</Section>
|
|
3270
|
+
<Section class="'pt-0'" title.translate="Zoom">
|
|
3271
|
+
<Checkbox
|
|
3272
|
+
name="'zoomable'"
|
|
3273
|
+
label.translate="Show slicer"
|
|
3274
|
+
value="props.definition.zoomable"
|
|
3275
|
+
onChange.bind="onToggleZoom"
|
|
3276
|
+
className="'mb-2'"
|
|
3277
|
+
/>
|
|
3278
|
+
</Section>
|
|
3279
|
+
<Section class="'pt-1'" title.translate="Number formatting">
|
|
3280
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
3281
|
+
</Section>
|
|
3108
3282
|
</t>
|
|
3109
3283
|
</GeneralDesignEditor>
|
|
3110
3284
|
<SeriesWithAxisDesignEditor t-props="props">
|
|
@@ -3124,7 +3298,7 @@
|
|
|
3124
3298
|
<t t-set-slot="content">
|
|
3125
3299
|
<AxisDesignEditor
|
|
3126
3300
|
axesList="axesList"
|
|
3127
|
-
|
|
3301
|
+
chartId="props.chartId"
|
|
3128
3302
|
definition="props.definition"
|
|
3129
3303
|
updateChart="props.updateChart"
|
|
3130
3304
|
/>
|
|
@@ -3139,6 +3313,9 @@
|
|
|
3139
3313
|
<Section class="'pt-0'" title.translate="Values">
|
|
3140
3314
|
<ChartShowValues t-props="props"/>
|
|
3141
3315
|
</Section>
|
|
3316
|
+
<Section class="'pt-1'" title.translate="Number formatting">
|
|
3317
|
+
<ChartHumanizeNumbers t-props="props"/>
|
|
3318
|
+
</Section>
|
|
3142
3319
|
</t>
|
|
3143
3320
|
</GeneralDesignEditor>
|
|
3144
3321
|
<SeriesWithAxisDesignEditor t-props="props"/>
|
|
@@ -3146,7 +3323,7 @@
|
|
|
3146
3323
|
<t t-set-slot="content">
|
|
3147
3324
|
<AxisDesignEditor
|
|
3148
3325
|
axesList="axesList"
|
|
3149
|
-
|
|
3326
|
+
chartId="props.chartId"
|
|
3150
3327
|
definition="props.definition"
|
|
3151
3328
|
updateChart="props.updateChart"
|
|
3152
3329
|
/>
|
|
@@ -3580,7 +3757,7 @@
|
|
|
3580
3757
|
name="'showValues'"
|
|
3581
3758
|
label.translate="Show values"
|
|
3582
3759
|
value="props.definition.showValues ?? props.defaultValue"
|
|
3583
|
-
onChange="(showValues) => props.updateChart(this.props.
|
|
3760
|
+
onChange="(showValues) => props.updateChart(this.props.chartId, { showValues })"
|
|
3584
3761
|
/>
|
|
3585
3762
|
</t>
|
|
3586
3763
|
|
|
@@ -3589,7 +3766,7 @@
|
|
|
3589
3766
|
name="'showDataMarkers'"
|
|
3590
3767
|
label.translate="Show data markers"
|
|
3591
3768
|
value="!props.definition.hideDataMarkers"
|
|
3592
|
-
onChange="(showDataMarkers) => props.updateChart(this.props.
|
|
3769
|
+
onChange="(showDataMarkers) => props.updateChart(this.props.chartId, { hideDataMarkers: !showDataMarkers })"
|
|
3593
3770
|
/>
|
|
3594
3771
|
</t>
|
|
3595
3772
|
|
|
@@ -3776,6 +3953,15 @@
|
|
|
3776
3953
|
</Section>
|
|
3777
3954
|
</t>
|
|
3778
3955
|
|
|
3956
|
+
<t t-name="o-spreadsheet-ChartHumanizeNumbers">
|
|
3957
|
+
<Checkbox
|
|
3958
|
+
name="'humanizeNumbers'"
|
|
3959
|
+
label.translate="Make numbers human-readable"
|
|
3960
|
+
value="props.definition.humanize ?? true"
|
|
3961
|
+
onChange="(humanize) => props.updateChart(this.props.chartId, { humanize })"
|
|
3962
|
+
/>
|
|
3963
|
+
</t>
|
|
3964
|
+
|
|
3779
3965
|
<t t-name="o-spreadsheet-GenericChartConfigPanel">
|
|
3780
3966
|
<div>
|
|
3781
3967
|
<ChartDataSeries
|
|
@@ -3937,6 +4123,73 @@
|
|
|
3937
4123
|
</div>
|
|
3938
4124
|
</t>
|
|
3939
4125
|
|
|
4126
|
+
<t t-name="o-spreadsheet-CarouselPanel">
|
|
4127
|
+
<div class="o-carousel-panel h-100 overflow-auto">
|
|
4128
|
+
<div class="o-carousel-preview-list overflow-auto" t-ref="previewList">
|
|
4129
|
+
<div
|
|
4130
|
+
t-foreach="carouselItems"
|
|
4131
|
+
t-as="item"
|
|
4132
|
+
t-key="getItemId(item)"
|
|
4133
|
+
class="o-carousel-preview position-relative d-flex align-items-center border-bottom ps-1 pe-2 pt-3 pb-2 w-100"
|
|
4134
|
+
t-att-class="{ 'o-dragging': dragAndDrop.draggedItemId === getItemId(item) }"
|
|
4135
|
+
t-att-style="getPreviewDivStyle(item)">
|
|
4136
|
+
<div
|
|
4137
|
+
class="o-drag-handle position-absolute ps-1 flex-shrink-0"
|
|
4138
|
+
t-on-pointerdown.stop.prevent="(ev) => this.onDragHandleMouseDown(item, ev)">
|
|
4139
|
+
<t t-call="o-spreadsheet-Icon.THIN_DRAG_HANDLE"/>
|
|
4140
|
+
</div>
|
|
4141
|
+
<div class="flex-grow-1">
|
|
4142
|
+
<div class="d-flex align-items-center">
|
|
4143
|
+
<div
|
|
4144
|
+
class="o-carousel-preview-icon ms-3 flex-shrink-0 d-flex align-items-center justify-content-center">
|
|
4145
|
+
<t t-call="{{getItemPreview(item)}}"/>
|
|
4146
|
+
</div>
|
|
4147
|
+
<div class="o-carousel-preview-title text-truncate ms-2">
|
|
4148
|
+
<TextInput
|
|
4149
|
+
value="getItemTitle(item)"
|
|
4150
|
+
onChange="(newName) => this.renameCarouselItem(item, newName)"
|
|
4151
|
+
/>
|
|
4152
|
+
</div>
|
|
4153
|
+
<div class="ms-auto"/>
|
|
4154
|
+
<div
|
|
4155
|
+
t-if="item.type === 'chart'"
|
|
4156
|
+
class="o-edit-button o-button-icon pe-2 ps-1 flex-shrink-0 fa fa-pencil"
|
|
4157
|
+
t-on-click.stop="(ev) => this.editCarouselItem(item, ev)"
|
|
4158
|
+
title="Edit chart"
|
|
4159
|
+
/>
|
|
4160
|
+
<div
|
|
4161
|
+
class="o-delete-button o-button-icon pe-2 ps-1 flex-shrink-0"
|
|
4162
|
+
t-on-click.stop="(ev) => this.deleteCarouselItem(item, ev)"
|
|
4163
|
+
title="Remove chart">
|
|
4164
|
+
<t t-call="o-spreadsheet-Icon.TRASH_FILLED"/>
|
|
4165
|
+
</div>
|
|
4166
|
+
</div>
|
|
4167
|
+
<div class="ms-3">
|
|
4168
|
+
<CarouselItemTitleCollapsible
|
|
4169
|
+
carouselTitle="item.carouselTitle"
|
|
4170
|
+
onUpdateCarouselTitle="(style) => this.onUpdateCarouselTitle(item_index, style)"
|
|
4171
|
+
/>
|
|
4172
|
+
</div>
|
|
4173
|
+
</div>
|
|
4174
|
+
</div>
|
|
4175
|
+
</div>
|
|
4176
|
+
<div
|
|
4177
|
+
class="o-button-link o-carousel-add-chart float-end d-flex align-items-center pt-4 pe-4 gap-2"
|
|
4178
|
+
t-on-click="addNewChartToCarousel">
|
|
4179
|
+
+ Add chart
|
|
4180
|
+
<span t-att-title="carouselAddChartInfoMessage">
|
|
4181
|
+
<t t-call="o-spreadsheet-Icon.CIRCLE_INFO"/>
|
|
4182
|
+
</span>
|
|
4183
|
+
</div>
|
|
4184
|
+
<div
|
|
4185
|
+
t-if="!hasDataView"
|
|
4186
|
+
class="o-button-link o-carousel-add-data-view float-end pt-4 pe-4"
|
|
4187
|
+
t-on-click="addDataViewToCarousel">
|
|
4188
|
+
+ Add data view
|
|
4189
|
+
</div>
|
|
4190
|
+
</div>
|
|
4191
|
+
</t>
|
|
4192
|
+
|
|
3940
4193
|
<t t-name="o-spreadsheet-SelectionInput">
|
|
3941
4194
|
<div class="o-selection" t-ref="o-selection">
|
|
3942
4195
|
<div
|
|
@@ -4155,7 +4408,10 @@
|
|
|
4155
4408
|
t-att-style="getIconColor(menuItem)">
|
|
4156
4409
|
<t t-if="getIconName(menuItem)" t-call="{{getIconName(menuItem)}}"/>
|
|
4157
4410
|
</div>
|
|
4158
|
-
<div
|
|
4411
|
+
<div
|
|
4412
|
+
class="o-menu-item-name align-middle text-truncate align-items-center d-flex"
|
|
4413
|
+
t-esc="getName(menuItem)"
|
|
4414
|
+
/>
|
|
4159
4415
|
<t t-set="description" t-value="menuItem.description(env)"/>
|
|
4160
4416
|
<div
|
|
4161
4417
|
t-if="description"
|
|
@@ -4165,12 +4421,12 @@
|
|
|
4165
4421
|
<t t-set="secondaryIcon" t-value="menuItem.secondaryIcon(env)"/>
|
|
4166
4422
|
<div
|
|
4167
4423
|
t-if="isMenuRoot"
|
|
4168
|
-
class="o-menu-item-root align-
|
|
4424
|
+
class="o-menu-item-root ms-auto align-items-center d-flex"
|
|
4169
4425
|
t-call="o-spreadsheet-Icon.CARET_RIGHT"
|
|
4170
4426
|
/>
|
|
4171
4427
|
<div
|
|
4172
4428
|
t-elif="secondaryIcon"
|
|
4173
|
-
class="o-menu-item-root align-
|
|
4429
|
+
class="o-menu-item-root ms-auto align-items-center d-flex"
|
|
4174
4430
|
t-call="{{secondaryIcon}}"
|
|
4175
4431
|
/>
|
|
4176
4432
|
</div>
|
|
@@ -5099,12 +5355,26 @@
|
|
|
5099
5355
|
</svg>
|
|
5100
5356
|
</t>
|
|
5101
5357
|
<t t-name="o-spreadsheet-Icon.PLUS_IN_BOX">
|
|
5102
|
-
<svg
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5358
|
+
<svg class="o-icon" width="18" height="18" style="">
|
|
5359
|
+
<path
|
|
5360
|
+
fill="currentColor"
|
|
5361
|
+
d="
|
|
5362
|
+
M.5 2A1.5 1.5 0 0 1 2 .5h14A1.5 1.5 0 0 1 17.5 2v14a1.5 1.5 0 0 1-1.5 1.5H2A1.5 1.5 0 0 1 .5 16V2H2v14h14V2H2
|
|
5363
|
+
M4,9.5 h10 v-1.5 h-10
|
|
5364
|
+
M8.25,3.75 v10 h1.5 v-10
|
|
5365
|
+
"
|
|
5366
|
+
/>
|
|
5367
|
+
</svg>
|
|
5368
|
+
</t>
|
|
5369
|
+
<t t-name="o-spreadsheet-Icon.MINUS_IN_BOX">
|
|
5370
|
+
<svg class="o-icon" width="18" height="18" style="">
|
|
5371
|
+
<path
|
|
5372
|
+
fill="currentColor"
|
|
5373
|
+
d="
|
|
5374
|
+
M.5 2A1.5 1.5 0 0 1 2 .5h14A1.5 1.5 0 0 1 17.5 2v14a1.5 1.5 0 0 1-1.5 1.5H2A1.5 1.5 0 0 1 .5 16V2H2v14h14V2H2
|
|
5375
|
+
M4,9.5 h10 v-1.5 h-10
|
|
5376
|
+
"
|
|
5377
|
+
/>
|
|
5108
5378
|
</svg>
|
|
5109
5379
|
</t>
|
|
5110
5380
|
<t t-name="o-spreadsheet-Icon.GROUP_ROWS">
|
|
@@ -5279,6 +5549,14 @@
|
|
|
5279
5549
|
<i class="fa fa-download"/>
|
|
5280
5550
|
</div>
|
|
5281
5551
|
</t>
|
|
5552
|
+
<t t-name="o-spreadsheet-Icon.CAROUSEL">
|
|
5553
|
+
<svg class="o-icon" viewBox="0 0 122.88 99.75">
|
|
5554
|
+
<path
|
|
5555
|
+
fill="currentColor"
|
|
5556
|
+
d="M29.09,0h64.7A5.21,5.21,0,0,1,99,5.18v89.4a5.19,5.19,0,0,1-5.18,5.17H29.09a5.19,5.19,0,0,1-5.17-5.18V5.18A5.21,5.21,0,0,1,29.09,0Zm78.52,12.46,10.59-1.52a4.71,4.71,0,0,1,4.68,4.69v68.5a4.71,4.71,0,0,1-4.68,4.68L107.77,88a1.35,1.35,0,0,1-1.31-1.34V83.14a1.34,1.34,0,0,1,1.44-1.23l8.91.73V17.22l-9,1.34a1.34,1.34,0,0,1-1.34-1.34V13.78a1.34,1.34,0,0,1,1.15-1.32ZM5,11l10.31,1.49a1.33,1.33,0,0,1,1.14,1.32v3.44a1.34,1.34,0,0,1-1.34,1.34l-9-1.34V82.64L15,81.91a1.33,1.33,0,0,1,1.43,1.23v3.49A1.35,1.35,0,0,1,15.11,88l-10.43.84A4.71,4.71,0,0,1,0,84.13V15.63a4.73,4.73,0,0,1,4.68-4.69L5,11Zm87.93-4.9H30v87.6h62.9V6.07Z"
|
|
5557
|
+
/>
|
|
5558
|
+
</svg>
|
|
5559
|
+
</t>
|
|
5282
5560
|
|
|
5283
5561
|
<t t-name="o-spreadsheet-IconPicker">
|
|
5284
5562
|
<div class="o-icon-picker">
|
|
@@ -5759,28 +6037,23 @@
|
|
|
5759
6037
|
<t t-name="o-spreadsheet-FullScreenChart">
|
|
5760
6038
|
<div
|
|
5761
6039
|
class="position-absolute o-fullscreen-chart-overlay w-100 h-100 d-flex"
|
|
5762
|
-
t-if="
|
|
6040
|
+
t-if="chartId"
|
|
5763
6041
|
t-on-click="exitFullScreen">
|
|
5764
6042
|
<button
|
|
5765
|
-
class="o-exit top-0 end-0 position-absolute o-button primary m-1"
|
|
6043
|
+
class="o-exit top-0 end-0 position-absolute o-button primary m-1 shadow"
|
|
5766
6044
|
t-on-click="exitFullScreen">
|
|
5767
6045
|
Exit fullscreen
|
|
5768
6046
|
</button>
|
|
5769
6047
|
<div class="flex-fill">
|
|
5770
6048
|
<div
|
|
5771
|
-
class="o-fullscreen-chart o-figure position-relative"
|
|
6049
|
+
class="o-fullscreen-chart o-figure position-relative border rounded shadow"
|
|
5772
6050
|
tabindex="1"
|
|
5773
6051
|
t-ref="fullScreenChart"
|
|
5774
6052
|
t-on-click.stop=""
|
|
5775
6053
|
t-on-keydown="(ev) => this.onKeyDown(ev)">
|
|
5776
|
-
<t
|
|
5777
|
-
t-component="chartComponent"
|
|
5778
|
-
figureUI="this.figureUI"
|
|
5779
|
-
isFullScreen="true"
|
|
5780
|
-
t-key="this.figureUI.id"
|
|
5781
|
-
/>
|
|
6054
|
+
<t t-component="chartComponent" chartId="chartId" isFullScreen="true" t-key="chartId"/>
|
|
5782
6055
|
<div class="position-absolute top-0 end-0">
|
|
5783
|
-
<ChartDashboardMenu
|
|
6056
|
+
<ChartDashboardMenu chartId="chartId"/>
|
|
5784
6057
|
</div>
|
|
5785
6058
|
</div>
|
|
5786
6059
|
</div>
|
|
@@ -5981,6 +6254,7 @@
|
|
|
5981
6254
|
onFigureDeleted="this.props.onFigureDeleted"
|
|
5982
6255
|
figureUI="figureUI"
|
|
5983
6256
|
style="getFigureStyle(figureUI)"
|
|
6257
|
+
class="getFigureClass(figureUI)"
|
|
5984
6258
|
onMouseDown="(ev) => this.startDraggingFigure(figureUI, ev)"
|
|
5985
6259
|
onClickAnchor="(dirX, dirY, ev) => this.startResize(figureUI, dirX, dirY, ev)"
|
|
5986
6260
|
/>
|
|
@@ -6007,21 +6281,60 @@
|
|
|
6007
6281
|
|
|
6008
6282
|
<t t-name="o-spreadsheet-ChartFigure">
|
|
6009
6283
|
<div class="o-chart-container w-100 h-100" t-on-dblclick="onDoubleClick">
|
|
6010
|
-
<t
|
|
6011
|
-
t-component="chartComponent"
|
|
6012
|
-
figureUI="this.props.figureUI"
|
|
6013
|
-
t-key="this.props.figureUI.id"
|
|
6014
|
-
/>
|
|
6284
|
+
<t t-component="chartComponent" chartId="chartId" t-key="chartId"/>
|
|
6015
6285
|
</div>
|
|
6016
6286
|
<div t-if="env.isDashboard()" class="position-absolute top-0 end-0">
|
|
6017
|
-
<ChartDashboardMenu
|
|
6287
|
+
<ChartDashboardMenu chartId="chartId"/>
|
|
6288
|
+
</div>
|
|
6289
|
+
</t>
|
|
6290
|
+
|
|
6291
|
+
<t t-name="o-spreadsheet-CarouselFigure">
|
|
6292
|
+
<div class="o-carousel w-100 h-100 d-flex flex-column" t-on-dblclick="onCarouselDoubleClick">
|
|
6293
|
+
<t t-set="selectedItem" t-value="selectedCarouselItem"/>
|
|
6294
|
+
<div
|
|
6295
|
+
class="o-carousel-header d-flex flex-shrink-0 pe-1 rounded pe-auto"
|
|
6296
|
+
t-att-class="{
|
|
6297
|
+
'o-carousel-header-floating': !env.isDashboard() and selectedItem?.type === 'carouselDataView',
|
|
6298
|
+
}"
|
|
6299
|
+
t-att-style="headerStyle">
|
|
6300
|
+
<div
|
|
6301
|
+
class="o-carousel-title d-flex align-items-center"
|
|
6302
|
+
t-esc="title"
|
|
6303
|
+
t-att-style="titleStyle"
|
|
6304
|
+
/>
|
|
6305
|
+
<div class="ms-auto d-flex">
|
|
6306
|
+
<t t-foreach="carousel.items" t-as="item" t-key="item_index">
|
|
6307
|
+
<div
|
|
6308
|
+
class="o-carousel-tab text-truncate px-2 mt-1 mb-1 flex-shrink-0"
|
|
6309
|
+
t-att-class="{ 'selected': isItemSelected(item) }"
|
|
6310
|
+
t-esc="getItemTitle(item)"
|
|
6311
|
+
t-on-click.stop="() => this.onCarouselTabClick(item)"
|
|
6312
|
+
/>
|
|
6313
|
+
</t>
|
|
6314
|
+
</div>
|
|
6315
|
+
</div>
|
|
6316
|
+
<div
|
|
6317
|
+
t-if="!selectedItem"
|
|
6318
|
+
class="o-carousel-empty w-100 flex-fill d-flex align-items-center justify-content-center">
|
|
6319
|
+
<t t-call="o-spreadsheet-Icon.CAROUSEL"/>
|
|
6320
|
+
</div>
|
|
6321
|
+
<div t-elif="selectedItem.type === 'chart'" class="o-carousel-content w-100 flex-fill">
|
|
6322
|
+
<div class="o-chart-container w-100 h-100">
|
|
6323
|
+
<t
|
|
6324
|
+
t-component="chartComponent"
|
|
6325
|
+
chartId="selectedItem.chartId"
|
|
6326
|
+
t-key="selectedItem.chartId"
|
|
6327
|
+
/>
|
|
6328
|
+
</div>
|
|
6329
|
+
</div>
|
|
6018
6330
|
</div>
|
|
6019
6331
|
</t>
|
|
6020
6332
|
|
|
6021
6333
|
<t t-name="o-spreadsheet-FigureComponent">
|
|
6022
|
-
<div class="o-figure-wrapper
|
|
6334
|
+
<div class="o-figure-wrapper" t-att-style="wrapperStyle" t-ref="figureWrapper">
|
|
6023
6335
|
<div
|
|
6024
6336
|
class="o-figure w-100 h-100"
|
|
6337
|
+
t-att-class="props.class"
|
|
6025
6338
|
t-on-pointerdown.stop="(ev) => this.onMouseDown(ev)"
|
|
6026
6339
|
t-on-click="onClick"
|
|
6027
6340
|
t-on-contextmenu.prevent.stop="(ev) => !env.model.getters.isReadonly() and this.onContextMenu(ev)"
|
|
@@ -6036,11 +6349,12 @@
|
|
|
6036
6349
|
t-key="props.figureUI.id"
|
|
6037
6350
|
onFigureDeleted="props.onFigureDeleted"
|
|
6038
6351
|
figureUI="props.figureUI"
|
|
6352
|
+
editFigureStyle.bind="editWrapperStyle"
|
|
6039
6353
|
/>
|
|
6040
6354
|
<div class="o-figure-menu position-absolute m-2" t-if="!env.isDashboard()">
|
|
6041
6355
|
<div
|
|
6042
|
-
class="o-figure-menu-item"
|
|
6043
|
-
t-if="!env.model.getters.isReadonly()"
|
|
6356
|
+
class="o-figure-menu-item d-flex-align-items-center"
|
|
6357
|
+
t-if="!env.model.getters.isReadonly() and props.figureUI.tag !== 'carousel'"
|
|
6044
6358
|
t-on-click="showMenu"
|
|
6045
6359
|
t-ref="menuButton"
|
|
6046
6360
|
t-on-contextmenu.prevent.stop="showMenu">
|
|
@@ -6053,46 +6367,63 @@
|
|
|
6053
6367
|
onClose="() => this.menuState.isOpen=false"
|
|
6054
6368
|
/>
|
|
6055
6369
|
</div>
|
|
6370
|
+
<div t-if="!env.isDashboard()" class="position-absolute top-0 start-0 pe-none w-100 h-100">
|
|
6371
|
+
<div
|
|
6372
|
+
class="o-figure-border pe-auto w-100 h-0 position-absolute pb-2"
|
|
6373
|
+
t-att-style="getBorderStyle('top')"
|
|
6374
|
+
/>
|
|
6375
|
+
<div
|
|
6376
|
+
class="o-figure-border pe-auto h-100 position-absolute start-0 ps-2"
|
|
6377
|
+
t-att-style="getBorderStyle('left')"
|
|
6378
|
+
/>
|
|
6379
|
+
<div
|
|
6380
|
+
class="o-figure-border pe-auto w-100 position-absolute bottom-0 pt-2"
|
|
6381
|
+
t-att-style="getBorderStyle('bottom')"
|
|
6382
|
+
/>
|
|
6383
|
+
<div
|
|
6384
|
+
class="o-figure-border pe-auto h-100 position-absolute end-0 pe-2"
|
|
6385
|
+
t-att-style="getBorderStyle('right')"
|
|
6386
|
+
/>
|
|
6387
|
+
</div>
|
|
6056
6388
|
</div>
|
|
6057
|
-
<div class="o-figure-border w-100 h-100 position-absolute pe-none" t-att-style="borderStyle"/>
|
|
6058
6389
|
<t t-if="isSelected and !env.isMobile()">
|
|
6059
6390
|
<div
|
|
6060
|
-
class="o-fig-anchor o-top"
|
|
6391
|
+
class="o-fig-anchor o-top pe-auto"
|
|
6061
6392
|
t-att-style="this.getResizerPosition('top')"
|
|
6062
6393
|
t-on-pointerdown="(ev) => this.clickAnchor(0,-1, ev)"
|
|
6063
6394
|
/>
|
|
6064
6395
|
<div
|
|
6065
|
-
class="o-fig-anchor o-topRight"
|
|
6396
|
+
class="o-fig-anchor o-topRight pe-auto"
|
|
6066
6397
|
t-att-style="this.getResizerPosition('top right')"
|
|
6067
6398
|
t-on-pointerdown="(ev) => this.clickAnchor(1,-1, ev)"
|
|
6068
6399
|
/>
|
|
6069
6400
|
<div
|
|
6070
|
-
class="o-fig-anchor o-right"
|
|
6401
|
+
class="o-fig-anchor o-right pe-auto"
|
|
6071
6402
|
t-att-style="this.getResizerPosition('right')"
|
|
6072
6403
|
t-on-pointerdown="(ev) => this.clickAnchor(1,0, ev)"
|
|
6073
6404
|
/>
|
|
6074
6405
|
<div
|
|
6075
|
-
class="o-fig-anchor o-bottomRight"
|
|
6406
|
+
class="o-fig-anchor o-bottomRight pe-auto"
|
|
6076
6407
|
t-att-style="this.getResizerPosition('bottom right')"
|
|
6077
6408
|
t-on-pointerdown="(ev) => this.clickAnchor(1,1, ev)"
|
|
6078
6409
|
/>
|
|
6079
6410
|
<div
|
|
6080
|
-
class="o-fig-anchor o-bottom"
|
|
6411
|
+
class="o-fig-anchor o-bottom pe-auto"
|
|
6081
6412
|
t-att-style="this.getResizerPosition('bottom')"
|
|
6082
6413
|
t-on-pointerdown="(ev) => this.clickAnchor(0,1, ev)"
|
|
6083
6414
|
/>
|
|
6084
6415
|
<div
|
|
6085
|
-
class="o-fig-anchor o-bottomLeft"
|
|
6416
|
+
class="o-fig-anchor o-bottomLeft pe-auto"
|
|
6086
6417
|
t-att-style="this.getResizerPosition('bottom left')"
|
|
6087
6418
|
t-on-pointerdown="(ev) => this.clickAnchor(-1,1, ev)"
|
|
6088
6419
|
/>
|
|
6089
6420
|
<div
|
|
6090
|
-
class="o-fig-anchor o-left"
|
|
6421
|
+
class="o-fig-anchor o-left pe-auto"
|
|
6091
6422
|
t-att-style="this.getResizerPosition('left')"
|
|
6092
6423
|
t-on-pointerdown="(ev) => this.clickAnchor(-1,0, ev)"
|
|
6093
6424
|
/>
|
|
6094
6425
|
<div
|
|
6095
|
-
class="o-fig-anchor o-topLeft"
|
|
6426
|
+
class="o-fig-anchor o-topLeft pe-auto"
|
|
6096
6427
|
t-att-style="this.getResizerPosition('top left')"
|
|
6097
6428
|
t-on-pointerdown="(ev) => this.clickAnchor(-1,-1, ev)"
|
|
6098
6429
|
/>
|
|
@@ -6112,20 +6443,21 @@
|
|
|
6112
6443
|
<canvas class="o-figure-canvas o-gauge-chart w-100 h-100 d-block" t-ref="chartContainer"/>
|
|
6113
6444
|
</t>
|
|
6114
6445
|
|
|
6115
|
-
<t t-name="spreadsheet
|
|
6446
|
+
<t t-name="o-spreadsheet-ChartDashboardMenu">
|
|
6116
6447
|
<div class="o-dashboard-chart-select position-absolute top-0 end-0" t-on-click.stop="">
|
|
6117
|
-
<div class="d-flex
|
|
6448
|
+
<div class="d-flex align-items-center gap-1 p-1 rounded" t-att-style="backgroundColor">
|
|
6118
6449
|
<t t-foreach="getMenuItems()" t-as="item" t-key="item.id">
|
|
6119
|
-
<
|
|
6120
|
-
t-attf-class=" {{item.
|
|
6121
|
-
class="o-chart-dashboard-item btn
|
|
6450
|
+
<div
|
|
6451
|
+
t-attf-class=" {{item.class}}"
|
|
6452
|
+
class="o-chart-dashboard-item btn border-0 lh-1 p-1 d-flex align-items-center justify-content-center"
|
|
6122
6453
|
t-att-title="item.label"
|
|
6123
6454
|
t-on-click="item.onClick"
|
|
6124
|
-
t-att-data-id="item.id"
|
|
6125
|
-
|
|
6455
|
+
t-att-data-id="item.id">
|
|
6456
|
+
<t t-if="item.preview" t-call="{{item.preview}}"/>
|
|
6457
|
+
</div>
|
|
6126
6458
|
</t>
|
|
6127
6459
|
<button
|
|
6128
|
-
class="o-chart-dashboard-item btn
|
|
6460
|
+
class="o-chart-dashboard-item btn text-muted lh-1 p-1 fa fa-ellipsis-v"
|
|
6129
6461
|
t-on-click="openContextMenu"
|
|
6130
6462
|
/>
|
|
6131
6463
|
</div>
|
|
@@ -6142,6 +6474,24 @@
|
|
|
6142
6474
|
<canvas class="o-figure-canvas w-100 h-100" t-att-style="canvasStyle" t-ref="graphContainer"/>
|
|
6143
6475
|
</t>
|
|
6144
6476
|
|
|
6477
|
+
<t t-name="o-spreadsheet-ZoomableChartJsComponent">
|
|
6478
|
+
<div class="w-100 h-100" t-att-style="canvasStyle">
|
|
6479
|
+
<div t-att-style="containerStyle">
|
|
6480
|
+
<canvas class="o-figure-canvas w-100 h-100" t-ref="graphContainer"/>
|
|
6481
|
+
</div>
|
|
6482
|
+
<div t-if="sliceable" class="o-master-chart-container m-0">
|
|
6483
|
+
<canvas
|
|
6484
|
+
class="o-figure-canvas o-master-chart-canvas w-100 h-100"
|
|
6485
|
+
t-ref="masterChartCanvas"
|
|
6486
|
+
t-on-dblclick="onDoubleClickInMasterChart"
|
|
6487
|
+
t-on-pointerdown="onPointerDownInMasterChart"
|
|
6488
|
+
t-on-pointermove="onPointerMoveInMasterChart"
|
|
6489
|
+
t-on-mouseleave="onMouseLeaveMasterChart"
|
|
6490
|
+
/>
|
|
6491
|
+
</div>
|
|
6492
|
+
</div>
|
|
6493
|
+
</t>
|
|
6494
|
+
|
|
6145
6495
|
<t t-name="o-spreadsheet-ErrorToolTip">
|
|
6146
6496
|
<div class="o-error-tooltip">
|
|
6147
6497
|
<t t-if="evaluationError">
|
|
@@ -6280,11 +6630,14 @@
|
|
|
6280
6630
|
</t>
|
|
6281
6631
|
)
|
|
6282
6632
|
</div>
|
|
6283
|
-
<
|
|
6284
|
-
class="
|
|
6633
|
+
<div
|
|
6634
|
+
class="collapsor px-2 d-flex align-items-center rounded"
|
|
6285
6635
|
t-att-class="state.isCollapsed ? 'collapsed' : ''"
|
|
6286
|
-
t-on-click="() => this.toggle()"
|
|
6287
|
-
|
|
6636
|
+
t-on-click="() => this.toggle()">
|
|
6637
|
+
<span class="collapsor-arrow d-inline-block">
|
|
6638
|
+
<t t-call="o-spreadsheet-Icon.ANGLE_DOWN"/>
|
|
6639
|
+
</span>
|
|
6640
|
+
</div>
|
|
6288
6641
|
</div>
|
|
6289
6642
|
|
|
6290
6643
|
<Collapse isCollapsed="state.isCollapsed">
|
|
@@ -6321,13 +6674,14 @@
|
|
|
6321
6674
|
<t t-name="o-spreadsheet-Composer">
|
|
6322
6675
|
<div class="o-composer-container w-100 h-100">
|
|
6323
6676
|
<t t-set="autoCompleteProposals" t-value="props.composerStore.autoCompleteProposals"/>
|
|
6677
|
+
<t t-set="canBeToggled" t-value="props.composerStore.canBeToggled"/>
|
|
6324
6678
|
<t
|
|
6325
6679
|
t-set="assistantIsAvailable"
|
|
6326
6680
|
t-value="props.showAssistant and (autoCompleteProposals.length or functionDescriptionState.showDescription)"
|
|
6327
6681
|
/>
|
|
6328
6682
|
<div class="d-flex flex-row position-relative">
|
|
6329
6683
|
<span
|
|
6330
|
-
t-if="props.focus !== 'inactive' and assistantIsAvailable and assistant.forcedClosed"
|
|
6684
|
+
t-if="props.focus !== 'inactive' and assistantIsAvailable and canBeToggled and assistant.forcedClosed"
|
|
6331
6685
|
role="button"
|
|
6332
6686
|
title="Show formula help"
|
|
6333
6687
|
t-on-click="openAssistant"
|
|
@@ -6344,7 +6698,7 @@
|
|
|
6344
6698
|
t-att-style="props.inputStyle"
|
|
6345
6699
|
t-ref="o_composer"
|
|
6346
6700
|
tabindex="1"
|
|
6347
|
-
t-att-contenteditable="env.model.getters.isReadonly() ? 'false' : '
|
|
6701
|
+
t-att-contenteditable="env.model.getters.isReadonly() ? 'false' : 'plaintext-only'"
|
|
6348
6702
|
t-att-placeHolder="props.placeholder"
|
|
6349
6703
|
t-att-inputmode="props.inputMode"
|
|
6350
6704
|
spellcheck="false"
|
|
@@ -6367,12 +6721,13 @@
|
|
|
6367
6721
|
<div
|
|
6368
6722
|
class="o-composer-assistant-container shadow position-absolute z-1"
|
|
6369
6723
|
t-att-style="assistantContainerStyle"
|
|
6370
|
-
t-if="props.focus !== 'inactive' and !assistant.forcedClosed
|
|
6724
|
+
t-if="props.focus !== 'inactive' and assistantIsAvailable and !(canBeToggled and assistant.forcedClosed)"
|
|
6371
6725
|
t-on-wheel.stop=""
|
|
6372
6726
|
t-on-pointerdown.prevent.stop=""
|
|
6373
6727
|
t-on-pointerup.prevent.stop=""
|
|
6374
6728
|
t-on-click.prevent.stop="">
|
|
6375
6729
|
<span
|
|
6730
|
+
t-if="canBeToggled and !assistant.forcedClosed"
|
|
6376
6731
|
role="button"
|
|
6377
6732
|
t-on-click="closeAssistant"
|
|
6378
6733
|
class="fa-stack position-absolute top-0 start-100 translate-middle fs-4">
|
|
@@ -6693,7 +7048,7 @@
|
|
|
6693
7048
|
t-on-dblclick="() => this.onDblClick()"
|
|
6694
7049
|
t-on-focusout="() => this.onFocusOut()"
|
|
6695
7050
|
t-on-keydown="(ev) => this.onKeyDown(ev)"
|
|
6696
|
-
t-att-contenteditable="state.isEditing ? '
|
|
7051
|
+
t-att-contenteditable="state.isEditing ? 'plaintext-only': 'false'"
|
|
6697
7052
|
/>
|
|
6698
7053
|
<span
|
|
6699
7054
|
class="o-sheet-icon ms-1"
|