@odoo/o-spreadsheet 19.5.0-alpha.15 → 19.5.0-alpha.17
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 +50 -37
- package/dist/o_spreadsheet.css +14 -13
- package/dist/o_spreadsheet.esm.js +51 -38
- package/dist/o_spreadsheet.iife.js +50 -37
- package/dist/o_spreadsheet.min.iife.js +282 -282
- package/dist/o_spreadsheet.xml +3 -4
- package/dist/types/components/popover/popover.d.ts +0 -1
- package/dist/types/components/popover/popover_container_owl_plugin.d.ts +5 -0
- package/dist/types/components/side_panel/chart/chart_type_picker_popover/chart_type_picker_popover.d.ts +0 -1
- package/dist/types/components/tables/table_styles_popover/table_styles_popover.d.ts +0 -1
- package/dist/types/plugins/core/range.d.ts +3 -1
- package/dist/types/stores/viewports_store.d.ts +0 -1
- package/package.json +1 -1
package/dist/o_spreadsheet.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.5.0-alpha.
|
|
6
|
-
* @date 2026-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.5.0-alpha.17
|
|
6
|
+
* @date 2026-09-07T05:58:42.129Z
|
|
7
|
+
* @hash 532243c
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -2657,7 +2657,7 @@ function unregisterChartJsExtensions() {
|
|
|
2657
2657
|
*
|
|
2658
2658
|
* The end goal is to eliminate all compatibility shims.
|
|
2659
2659
|
*/
|
|
2660
|
-
const { __ODOO_COMPATIBILITY_LAYER_ADDED__, blockDom: blockDom$1, config, onMounted: onMounted$26, onPatched: onPatched$5, onWillUnmount: onWillUnmount$20, App: OwlApp, Component: OwlComponent, EnvPlugin: OwlEnvPlugin, useComponent: OwlUseComponent, useEnv: OwlUseEnv, useLayoutEffect: OwlUseLayoutEffect, useSubEnv: OwlUseSubEnv, Plugin, usePlugin, useProps: useProps$171, providePlugins, useScope, xml: xml$5 } = _odoo_owl;
|
|
2660
|
+
const { __ODOO_COMPATIBILITY_LAYER_ADDED__, blockDom: blockDom$1, config, onMounted: onMounted$26, onPatched: onPatched$5, onWillUnmount: onWillUnmount$20, App: OwlApp, Component: OwlComponent, EnvPlugin: OwlEnvPlugin, useComponent: OwlUseComponent, useEnv: OwlUseEnv, useLayoutEffect: OwlUseLayoutEffect, useSubEnv: OwlUseSubEnv, Plugin: Plugin$1, usePlugin: usePlugin$1, useProps: useProps$171, providePlugins: providePlugins$3, useScope, xml: xml$5 } = _odoo_owl;
|
|
2661
2661
|
const isOdooCompatLoaded = __ODOO_COMPATIBILITY_LAYER_ADDED__ === true;
|
|
2662
2662
|
var _Component = class extends OwlComponent {
|
|
2663
2663
|
env;
|
|
@@ -2702,17 +2702,17 @@ function _useLayoutEffect(effect, computeDependencies = () => [NaN]) {
|
|
|
2702
2702
|
});
|
|
2703
2703
|
onWillUnmount$20(() => cleanup && cleanup());
|
|
2704
2704
|
}
|
|
2705
|
-
var _EnvPlugin = class extends Plugin {
|
|
2705
|
+
var _EnvPlugin = class extends Plugin$1 {
|
|
2706
2706
|
static id = "__ENV__";
|
|
2707
2707
|
env = config("env") ?? {};
|
|
2708
2708
|
};
|
|
2709
2709
|
function _useEnv() {
|
|
2710
|
-
return usePlugin(_EnvPlugin).env;
|
|
2710
|
+
return usePlugin$1(_EnvPlugin).env;
|
|
2711
2711
|
}
|
|
2712
2712
|
function _useSubEnv(extension) {
|
|
2713
2713
|
const subEnv = Object.create(_useEnv());
|
|
2714
2714
|
Object.defineProperties(subEnv, Object.getOwnPropertyDescriptors(extension));
|
|
2715
|
-
providePlugins([_EnvPlugin], { env: subEnv });
|
|
2715
|
+
providePlugins$3([_EnvPlugin], { env: subEnv });
|
|
2716
2716
|
const component = _useComponent();
|
|
2717
2717
|
component.env = subEnv;
|
|
2718
2718
|
}
|
|
@@ -2849,7 +2849,7 @@ var _App = class extends OwlApp {
|
|
|
2849
2849
|
createRoot(component, config = {}) {
|
|
2850
2850
|
if (config.env) component = { [component.name]: class extends component {
|
|
2851
2851
|
constructor(node) {
|
|
2852
|
-
providePlugins([_EnvPlugin], { env: config.env });
|
|
2852
|
+
providePlugins$3([_EnvPlugin], { env: config.env });
|
|
2853
2853
|
super(node);
|
|
2854
2854
|
}
|
|
2855
2855
|
} }[component.name];
|
|
@@ -13902,7 +13902,6 @@ var ViewportsStore = class extends SpreadsheetStore {
|
|
|
13902
13902
|
getFooterSize: this.getFooterSizeCallback
|
|
13903
13903
|
});
|
|
13904
13904
|
sheetsWithDirtyViewports = /* @__PURE__ */ new Set();
|
|
13905
|
-
shouldRepositionViewports = false;
|
|
13906
13905
|
displayedSheetId = this.model.getters.getActiveSheetId();
|
|
13907
13906
|
constructor(get) {
|
|
13908
13907
|
super(get);
|
|
@@ -13918,7 +13917,6 @@ var ViewportsStore = class extends SpreadsheetStore {
|
|
|
13918
13917
|
this.sheetsWithDirtyViewports.add(sheetId);
|
|
13919
13918
|
this.syncPaneDivision(sheetId);
|
|
13920
13919
|
}
|
|
13921
|
-
this.shouldRepositionViewports = !this.getters.getSelectedFigureIds().length;
|
|
13922
13920
|
break;
|
|
13923
13921
|
case "UNFREEZE_ROWS":
|
|
13924
13922
|
case "UNFREEZE_COLUMNS":
|
|
@@ -13961,17 +13959,8 @@ var ViewportsStore = class extends SpreadsheetStore {
|
|
|
13961
13959
|
}
|
|
13962
13960
|
}
|
|
13963
13961
|
finalize() {
|
|
13964
|
-
for (const sheetId of this.sheetsWithDirtyViewports)
|
|
13965
|
-
this.viewports.resetViewports(sheetId);
|
|
13966
|
-
if (this.shouldRepositionViewports) {
|
|
13967
|
-
const position = this.getters.getSheetPosition(sheetId);
|
|
13968
|
-
this.viewports.getSubViewports(sheetId).forEach((viewport) => {
|
|
13969
|
-
viewport.repositionViewport(position);
|
|
13970
|
-
});
|
|
13971
|
-
}
|
|
13972
|
-
}
|
|
13962
|
+
for (const sheetId of this.sheetsWithDirtyViewports) this.viewports.resetViewports(sheetId);
|
|
13973
13963
|
this.sheetsWithDirtyViewports = /* @__PURE__ */ new Set();
|
|
13974
|
-
this.shouldRepositionViewports = false;
|
|
13975
13964
|
this.setViewports();
|
|
13976
13965
|
}
|
|
13977
13966
|
setViewports() {
|
|
@@ -16220,6 +16209,12 @@ var Menu = class extends Component {
|
|
|
16220
16209
|
}
|
|
16221
16210
|
};
|
|
16222
16211
|
|
|
16212
|
+
//#endregion
|
|
16213
|
+
//#region src/components/popover/popover_container_owl_plugin.ts
|
|
16214
|
+
var PopoverContainerPlugin = class extends _odoo_owl.Plugin {
|
|
16215
|
+
getContainerRect = (0, _odoo_owl.useConfig)("getPopoverContainerRect");
|
|
16216
|
+
};
|
|
16217
|
+
|
|
16223
16218
|
//#endregion
|
|
16224
16219
|
//#region src/components/helpers/position_hook.ts
|
|
16225
16220
|
/**
|
|
@@ -16262,11 +16257,9 @@ function usePopoverContainer() {
|
|
|
16262
16257
|
width: 0,
|
|
16263
16258
|
height: 0
|
|
16264
16259
|
});
|
|
16265
|
-
const
|
|
16266
|
-
const spreadsheetRect = useSpreadsheetRect();
|
|
16260
|
+
const popoverContainerPlugin = (0, _odoo_owl.usePlugin)(PopoverContainerPlugin);
|
|
16267
16261
|
function updateRect() {
|
|
16268
|
-
const
|
|
16269
|
-
const newRect = "getPopoverContainerRect" in env && env.getPopoverContainerRect ? env.getPopoverContainerRect() : spreadsheetRect;
|
|
16262
|
+
const newRect = popoverContainerPlugin.getContainerRect();
|
|
16270
16263
|
container.x = newRect.x;
|
|
16271
16264
|
container.y = newRect.y;
|
|
16272
16265
|
container.width = newRect.width;
|
|
@@ -16284,7 +16277,6 @@ var Popover = class extends Component {
|
|
|
16284
16277
|
static template = "o-spreadsheet-Popover";
|
|
16285
16278
|
props = (0, _odoo_owl.useProps)({
|
|
16286
16279
|
anchorRect: types.Rect(),
|
|
16287
|
-
containerRect: types.object({}).optional(),
|
|
16288
16280
|
positioning: types.or([types.literal("top-right"), types.literal("bottom-left")]).optional("bottom-left"),
|
|
16289
16281
|
maxWidth: types.Pixel().optional(),
|
|
16290
16282
|
maxHeight: types.Pixel().optional(),
|
|
@@ -34193,7 +34185,8 @@ function getLineChartData(definition, { labelValues, dataSetsValues }, getters,
|
|
|
34193
34185
|
format,
|
|
34194
34186
|
locale: getters.getLocale()
|
|
34195
34187
|
}));
|
|
34196
|
-
|
|
34188
|
+
const invalidDataValue = definition.fillArea ? ZERO : EMPTY$1;
|
|
34189
|
+
({labels, dataSetsValues} = filterInvalidDataPoints(labels, dataSetsValues, invalidDataValue));
|
|
34197
34190
|
if (axisType === "time") ({labels, dataSetsValues} = fixEmptyLabelsForDateCharts(labels, dataSetsValues));
|
|
34198
34191
|
if (definition.aggregated) ({labels, dataSetsValues} = aggregateDataForLabels(labels, dataSetsValues));
|
|
34199
34192
|
if (definition.cumulative) dataSetsValues = makeDatasetsCumulative(dataSetsValues, "asc");
|
|
@@ -34570,7 +34563,7 @@ function fixEmptyLabelsForDateCharts(labels, dataSetsValues) {
|
|
|
34570
34563
|
* - have neither a label nor a value
|
|
34571
34564
|
* - have no label and a non-numeric value
|
|
34572
34565
|
*/
|
|
34573
|
-
function filterInvalidDataPoints(labels, datasets) {
|
|
34566
|
+
function filterInvalidDataPoints(labels, datasets, invalidDataValue = EMPTY$1) {
|
|
34574
34567
|
const dataPointsIndexes = range(0, Math.max(labels.length, ...datasets.map((dataset) => dataset.data?.length || 0))).filter((dataPointIndex) => {
|
|
34575
34568
|
const label = labels[dataPointIndex];
|
|
34576
34569
|
const values = datasets.map((dataset) => dataset.data?.[dataPointIndex]);
|
|
@@ -34580,7 +34573,7 @@ function filterInvalidDataPoints(labels, datasets) {
|
|
|
34580
34573
|
labels: dataPointsIndexes.map((i) => labels[i] || ""),
|
|
34581
34574
|
dataSetsValues: datasets.map((dataset) => ({
|
|
34582
34575
|
...dataset,
|
|
34583
|
-
data: dataPointsIndexes.map((i) => isNumberResult(dataset.data[i]) ? dataset.data[i] :
|
|
34576
|
+
data: dataPointsIndexes.map((i) => isNumberResult(dataset.data[i]) ? dataset.data[i] : invalidDataValue)
|
|
34584
34577
|
}))
|
|
34585
34578
|
};
|
|
34586
34579
|
}
|
|
@@ -55524,7 +55517,7 @@ var Grid = class extends Component {
|
|
|
55524
55517
|
this.checkboxToggleStore = useStore(CheckboxToggleStore);
|
|
55525
55518
|
useStore(ArrayFormulaHighlight);
|
|
55526
55519
|
this.automaticSumStore = useLocalStore(AutomaticSumStore);
|
|
55527
|
-
|
|
55520
|
+
(0, _odoo_owl.providePlugins)([PopoverContainerPlugin], { getPopoverContainerRect: () => this.getGridRect() });
|
|
55528
55521
|
(0, _odoo_owl.useListener)(document.body, "cut", this.copy.bind(this, true));
|
|
55529
55522
|
(0, _odoo_owl.useListener)(document.body, "copy", this.copy.bind(this, false));
|
|
55530
55523
|
(0, _odoo_owl.useListener)(document.body, "paste", this.paste.bind(this));
|
|
@@ -63452,7 +63445,7 @@ var CompilationParametersBuilder = class {
|
|
|
63452
63445
|
if (rangeError) return [[rangeError]];
|
|
63453
63446
|
const sheetId = range.sheetId;
|
|
63454
63447
|
const zone = range.zone;
|
|
63455
|
-
const _zone =
|
|
63448
|
+
const _zone = this.getters.clipRangeToSheet(range)?.zone;
|
|
63456
63449
|
if (!_zone) return [[]];
|
|
63457
63450
|
const { top, left, bottom, right } = zone;
|
|
63458
63451
|
const cacheKey = `${sheetId}-${top}-${left}-${bottom}-${right}`;
|
|
@@ -64626,10 +64619,10 @@ var Evaluator = class {
|
|
|
64626
64619
|
updateDependencies(position) {
|
|
64627
64620
|
this.formulaDependencies().removeAllDependencies(position);
|
|
64628
64621
|
const dependencies = this.getDirectDependencies(position);
|
|
64629
|
-
this.formulaDependencies().addDependencies(position, dependencies);
|
|
64622
|
+
this.formulaDependencies().addDependencies(position, this.getters.clipRangesToSheet(dependencies));
|
|
64630
64623
|
}
|
|
64631
64624
|
addDependencies(position, dependencies) {
|
|
64632
|
-
this.formulaDependencies().addDependencies(position, dependencies);
|
|
64625
|
+
this.formulaDependencies().addDependencies(position, this.getters.clipRangesToSheet(dependencies));
|
|
64633
64626
|
this.computeDependencies(dependencies);
|
|
64634
64627
|
}
|
|
64635
64628
|
computeDependencies(dependencies) {
|
|
@@ -64702,7 +64695,8 @@ var Evaluator = class {
|
|
|
64702
64695
|
const graph = new FormulaDependencyGraph();
|
|
64703
64696
|
for (const sheetId of this.getters.getSheetIds()) for (const cell of this.getters.getCells(sheetId)) if (cell.isFormula) {
|
|
64704
64697
|
const cellPosition = this.getters.getCellPosition(cell.id);
|
|
64705
|
-
|
|
64698
|
+
const dependencies = this.getters.clipRangesToSheet(cell.compiledFormula.rangeDependencies);
|
|
64699
|
+
graph.addDependencies(cellPosition, dependencies);
|
|
64706
64700
|
}
|
|
64707
64701
|
return graph;
|
|
64708
64702
|
});
|
|
@@ -72848,7 +72842,7 @@ var SpreadsheetDashboard = class extends Component {
|
|
|
72848
72842
|
this.zoomStore = useStore(ZoomStore);
|
|
72849
72843
|
useLocalStore(HoveredTableStore);
|
|
72850
72844
|
const rendererStore = useLocalStore(RendererStore, OrderedLayers().filter((layer) => layer !== "Headers"));
|
|
72851
|
-
|
|
72845
|
+
(0, _odoo_owl.providePlugins)([PopoverContainerPlugin], { getPopoverContainerRect: () => this.zoomStore.getZoomedRect(this.getGridRect()) });
|
|
72852
72846
|
useGridDrawing({
|
|
72853
72847
|
canvasRef: this.canvasRef,
|
|
72854
72848
|
rendererStore,
|
|
@@ -75223,6 +75217,7 @@ var Spreadsheet = class extends Component {
|
|
|
75223
75217
|
stores.inject(ModelStore, this.model);
|
|
75224
75218
|
this.viewStore = useStore(ViewportsStore);
|
|
75225
75219
|
this.zoomStore = useStore(ZoomStore);
|
|
75220
|
+
(0, _odoo_owl.providePlugins)([PopoverContainerPlugin], { getPopoverContainerRect: () => getElBoundingRect(this.spreadsheetRef()) });
|
|
75226
75221
|
const env = this.env;
|
|
75227
75222
|
stores.get(ScreenWidthStore).setSmallThreshhold(() => {
|
|
75228
75223
|
return env.isSmall;
|
|
@@ -76265,6 +76260,8 @@ var RangeAdapterPlugin = class {
|
|
|
76265
76260
|
"extendRange",
|
|
76266
76261
|
"getRangeString",
|
|
76267
76262
|
"getRangeFromSheetXC",
|
|
76263
|
+
"clipRangesToSheet",
|
|
76264
|
+
"clipRangeToSheet",
|
|
76268
76265
|
"createAdaptedRanges",
|
|
76269
76266
|
"getRangeData",
|
|
76270
76267
|
"getRangeDataFromXc",
|
|
@@ -76303,6 +76300,22 @@ var RangeAdapterPlugin = class {
|
|
|
76303
76300
|
addRangeProvider(provider) {
|
|
76304
76301
|
this.providers.push(provider);
|
|
76305
76302
|
}
|
|
76303
|
+
clipRangeToSheet(range) {
|
|
76304
|
+
if (range.invalidXc) return range;
|
|
76305
|
+
const sheetZone = this.getters.getSheetZone(range.sheetId);
|
|
76306
|
+
if (isZoneInside(range.zone, sheetZone)) return range;
|
|
76307
|
+
const newZone = intersection(range.zone, sheetZone);
|
|
76308
|
+
if (!newZone) return;
|
|
76309
|
+
return this.getters.getRangeFromZone(range.sheetId, newZone);
|
|
76310
|
+
}
|
|
76311
|
+
clipRangesToSheet(ranges) {
|
|
76312
|
+
const clippedRanges = [];
|
|
76313
|
+
for (const range of ranges) {
|
|
76314
|
+
const clippedRange = this.clipRangeToSheet(range);
|
|
76315
|
+
if (clippedRange) clippedRanges.push(clippedRange);
|
|
76316
|
+
}
|
|
76317
|
+
return clippedRanges;
|
|
76318
|
+
}
|
|
76306
76319
|
createAdaptedRanges(ranges, offsetX, offsetY, sheetId) {
|
|
76307
76320
|
return ranges.map((range) => {
|
|
76308
76321
|
if (!isZoneValid(range.zone)) return range;
|
|
@@ -91438,6 +91451,6 @@ exports.stores = stores;
|
|
|
91438
91451
|
exports.tokenColors = tokenColors;
|
|
91439
91452
|
exports.tokenize = tokenize;
|
|
91440
91453
|
|
|
91441
|
-
__info__.version = "19.5.0-alpha.
|
|
91442
|
-
__info__.date = "2026-09-
|
|
91443
|
-
__info__.hash = "
|
|
91454
|
+
__info__.version = "19.5.0-alpha.17";
|
|
91455
|
+
__info__.date = "2026-09-07T05:58:42.129Z";
|
|
91456
|
+
__info__.hash = "532243c";
|
package/dist/o_spreadsheet.css
CHANGED
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.5.0-alpha.
|
|
6
|
-
* @date 2026-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.5.0-alpha.17
|
|
6
|
+
* @date 2026-09-07T05:58:43.972Z
|
|
7
|
+
* @hash 532243c
|
|
8
8
|
*/
|
|
9
9
|
:root {
|
|
10
|
-
--os-gray-100: light-dark(#
|
|
11
|
-
--os-gray-200: light-dark(#
|
|
12
|
-
--os-gray-300: light-dark(#
|
|
13
|
-
--os-gray-400: light-dark(#ced4da, #
|
|
14
|
-
--os-gray-500: light-dark(#
|
|
15
|
-
--os-gray-600: light-dark(#
|
|
16
|
-
--os-gray-700: light-dark(#
|
|
17
|
-
--os-gray-800: light-dark(#
|
|
18
|
-
--os-gray-900: light-dark(#
|
|
10
|
+
--os-gray-100: light-dark(#f8f9fa, #1c1c20);
|
|
11
|
+
--os-gray-200: light-dark(#e7ebed, #25262b); /* GRAY_200 */
|
|
12
|
+
--os-gray-300: light-dark(#dee2e6, #3a3b41); /* GRAY_300 */
|
|
13
|
+
--os-gray-400: light-dark(#ced4da, #56575e);
|
|
14
|
+
--os-gray-500: light-dark(#adb5bd, #6e6f77);
|
|
15
|
+
--os-gray-600: light-dark(#6c757d, #88898f);
|
|
16
|
+
--os-gray-700: light-dark(#495057, #b3b4b8);
|
|
17
|
+
--os-gray-800: light-dark(#343a40, #d1d1d3);
|
|
18
|
+
--os-gray-900: light-dark(#212529, #e4e4e5); /* GRAY_900 */
|
|
19
19
|
|
|
20
20
|
--os-white: light-dark(#ffffff, #000000);
|
|
21
21
|
--os-black: light-dark(#000000, #ffffff);
|
|
22
22
|
--os-white-bg: light-dark(#ffffff, var(--os-gray-200));
|
|
23
23
|
--os-popover-bg: light-dark(#ffffff, var(--os-gray-200));
|
|
24
24
|
|
|
25
|
-
--os-default-font: "Roboto", "Arial";
|
|
25
|
+
--os-default-font: "Roboto", "Arial", "Liberation Sans";
|
|
26
26
|
--os-default-font-size: 10px;
|
|
27
27
|
--os-link-color: light-dark(#017e84, #02c7b5);
|
|
28
28
|
--os-link-hover-color: light-dark(#01585c, #4ed8cb);
|
|
@@ -207,6 +207,7 @@
|
|
|
207
207
|
|
|
208
208
|
.o-topbar-top {
|
|
209
209
|
padding: 2px 10px;
|
|
210
|
+
background-color: var(--os-gray-100);
|
|
210
211
|
|
|
211
212
|
/* Menus */
|
|
212
213
|
.o-topbar-topleft {
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.5.0-alpha.
|
|
6
|
-
* @date 2026-09-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.5.0-alpha.17
|
|
6
|
+
* @date 2026-09-07T05:58:42.129Z
|
|
7
|
+
* @hash 532243c
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import * as owl from "@odoo/owl";
|
|
11
|
-
import { App, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, proxy, signal, status, toRaw, types, useEffect, useListener, useProps, whenReady, xml } from "@odoo/owl";
|
|
11
|
+
import { App, Plugin, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, providePlugins, proxy, signal, status, toRaw, types, useConfig, useEffect, useListener, usePlugin, useProps, whenReady, xml } from "@odoo/owl";
|
|
12
12
|
|
|
13
13
|
//#region \0rolldown/runtime.js
|
|
14
14
|
var __create = Object.create;
|
|
@@ -2656,7 +2656,7 @@ function unregisterChartJsExtensions() {
|
|
|
2656
2656
|
*
|
|
2657
2657
|
* The end goal is to eliminate all compatibility shims.
|
|
2658
2658
|
*/
|
|
2659
|
-
const { __ODOO_COMPATIBILITY_LAYER_ADDED__, blockDom: blockDom$1, config, onMounted: onMounted$1, onPatched: onPatched$1, onWillUnmount: onWillUnmount$1, App: OwlApp, Component: OwlComponent, EnvPlugin: OwlEnvPlugin, useComponent: OwlUseComponent, useEnv: OwlUseEnv, useLayoutEffect: OwlUseLayoutEffect, useSubEnv: OwlUseSubEnv, Plugin, usePlugin, useProps: useProps$1, providePlugins, useScope, xml: xml$1 } = owl;
|
|
2659
|
+
const { __ODOO_COMPATIBILITY_LAYER_ADDED__, blockDom: blockDom$1, config, onMounted: onMounted$1, onPatched: onPatched$1, onWillUnmount: onWillUnmount$1, App: OwlApp, Component: OwlComponent, EnvPlugin: OwlEnvPlugin, useComponent: OwlUseComponent, useEnv: OwlUseEnv, useLayoutEffect: OwlUseLayoutEffect, useSubEnv: OwlUseSubEnv, Plugin: Plugin$1, usePlugin: usePlugin$1, useProps: useProps$1, providePlugins: providePlugins$1, useScope, xml: xml$1 } = owl;
|
|
2660
2660
|
const isOdooCompatLoaded = __ODOO_COMPATIBILITY_LAYER_ADDED__ === true;
|
|
2661
2661
|
var _Component = class extends OwlComponent {
|
|
2662
2662
|
env;
|
|
@@ -2701,17 +2701,17 @@ function _useLayoutEffect(effect, computeDependencies = () => [NaN]) {
|
|
|
2701
2701
|
});
|
|
2702
2702
|
onWillUnmount$1(() => cleanup && cleanup());
|
|
2703
2703
|
}
|
|
2704
|
-
var _EnvPlugin = class extends Plugin {
|
|
2704
|
+
var _EnvPlugin = class extends Plugin$1 {
|
|
2705
2705
|
static id = "__ENV__";
|
|
2706
2706
|
env = config("env") ?? {};
|
|
2707
2707
|
};
|
|
2708
2708
|
function _useEnv() {
|
|
2709
|
-
return usePlugin(_EnvPlugin).env;
|
|
2709
|
+
return usePlugin$1(_EnvPlugin).env;
|
|
2710
2710
|
}
|
|
2711
2711
|
function _useSubEnv(extension) {
|
|
2712
2712
|
const subEnv = Object.create(_useEnv());
|
|
2713
2713
|
Object.defineProperties(subEnv, Object.getOwnPropertyDescriptors(extension));
|
|
2714
|
-
providePlugins([_EnvPlugin], { env: subEnv });
|
|
2714
|
+
providePlugins$1([_EnvPlugin], { env: subEnv });
|
|
2715
2715
|
const component = _useComponent();
|
|
2716
2716
|
component.env = subEnv;
|
|
2717
2717
|
}
|
|
@@ -2848,7 +2848,7 @@ var _App = class extends OwlApp {
|
|
|
2848
2848
|
createRoot(component, config = {}) {
|
|
2849
2849
|
if (config.env) component = { [component.name]: class extends component {
|
|
2850
2850
|
constructor(node) {
|
|
2851
|
-
providePlugins([_EnvPlugin], { env: config.env });
|
|
2851
|
+
providePlugins$1([_EnvPlugin], { env: config.env });
|
|
2852
2852
|
super(node);
|
|
2853
2853
|
}
|
|
2854
2854
|
} }[component.name];
|
|
@@ -13901,7 +13901,6 @@ var ViewportsStore = class extends SpreadsheetStore {
|
|
|
13901
13901
|
getFooterSize: this.getFooterSizeCallback
|
|
13902
13902
|
});
|
|
13903
13903
|
sheetsWithDirtyViewports = /* @__PURE__ */ new Set();
|
|
13904
|
-
shouldRepositionViewports = false;
|
|
13905
13904
|
displayedSheetId = this.model.getters.getActiveSheetId();
|
|
13906
13905
|
constructor(get) {
|
|
13907
13906
|
super(get);
|
|
@@ -13917,7 +13916,6 @@ var ViewportsStore = class extends SpreadsheetStore {
|
|
|
13917
13916
|
this.sheetsWithDirtyViewports.add(sheetId);
|
|
13918
13917
|
this.syncPaneDivision(sheetId);
|
|
13919
13918
|
}
|
|
13920
|
-
this.shouldRepositionViewports = !this.getters.getSelectedFigureIds().length;
|
|
13921
13919
|
break;
|
|
13922
13920
|
case "UNFREEZE_ROWS":
|
|
13923
13921
|
case "UNFREEZE_COLUMNS":
|
|
@@ -13960,17 +13958,8 @@ var ViewportsStore = class extends SpreadsheetStore {
|
|
|
13960
13958
|
}
|
|
13961
13959
|
}
|
|
13962
13960
|
finalize() {
|
|
13963
|
-
for (const sheetId of this.sheetsWithDirtyViewports)
|
|
13964
|
-
this.viewports.resetViewports(sheetId);
|
|
13965
|
-
if (this.shouldRepositionViewports) {
|
|
13966
|
-
const position = this.getters.getSheetPosition(sheetId);
|
|
13967
|
-
this.viewports.getSubViewports(sheetId).forEach((viewport) => {
|
|
13968
|
-
viewport.repositionViewport(position);
|
|
13969
|
-
});
|
|
13970
|
-
}
|
|
13971
|
-
}
|
|
13961
|
+
for (const sheetId of this.sheetsWithDirtyViewports) this.viewports.resetViewports(sheetId);
|
|
13972
13962
|
this.sheetsWithDirtyViewports = /* @__PURE__ */ new Set();
|
|
13973
|
-
this.shouldRepositionViewports = false;
|
|
13974
13963
|
this.setViewports();
|
|
13975
13964
|
}
|
|
13976
13965
|
setViewports() {
|
|
@@ -16219,6 +16208,12 @@ var Menu = class extends Component {
|
|
|
16219
16208
|
}
|
|
16220
16209
|
};
|
|
16221
16210
|
|
|
16211
|
+
//#endregion
|
|
16212
|
+
//#region src/components/popover/popover_container_owl_plugin.ts
|
|
16213
|
+
var PopoverContainerPlugin = class extends Plugin {
|
|
16214
|
+
getContainerRect = useConfig("getPopoverContainerRect");
|
|
16215
|
+
};
|
|
16216
|
+
|
|
16222
16217
|
//#endregion
|
|
16223
16218
|
//#region src/components/helpers/position_hook.ts
|
|
16224
16219
|
/**
|
|
@@ -16261,11 +16256,9 @@ function usePopoverContainer() {
|
|
|
16261
16256
|
width: 0,
|
|
16262
16257
|
height: 0
|
|
16263
16258
|
});
|
|
16264
|
-
const
|
|
16265
|
-
const spreadsheetRect = useSpreadsheetRect();
|
|
16259
|
+
const popoverContainerPlugin = usePlugin(PopoverContainerPlugin);
|
|
16266
16260
|
function updateRect() {
|
|
16267
|
-
const
|
|
16268
|
-
const newRect = "getPopoverContainerRect" in env && env.getPopoverContainerRect ? env.getPopoverContainerRect() : spreadsheetRect;
|
|
16261
|
+
const newRect = popoverContainerPlugin.getContainerRect();
|
|
16269
16262
|
container.x = newRect.x;
|
|
16270
16263
|
container.y = newRect.y;
|
|
16271
16264
|
container.width = newRect.width;
|
|
@@ -16283,7 +16276,6 @@ var Popover = class extends Component {
|
|
|
16283
16276
|
static template = "o-spreadsheet-Popover";
|
|
16284
16277
|
props = useProps({
|
|
16285
16278
|
anchorRect: types$1.Rect(),
|
|
16286
|
-
containerRect: types$1.object({}).optional(),
|
|
16287
16279
|
positioning: types$1.or([types$1.literal("top-right"), types$1.literal("bottom-left")]).optional("bottom-left"),
|
|
16288
16280
|
maxWidth: types$1.Pixel().optional(),
|
|
16289
16281
|
maxHeight: types$1.Pixel().optional(),
|
|
@@ -34192,7 +34184,8 @@ function getLineChartData(definition, { labelValues, dataSetsValues }, getters,
|
|
|
34192
34184
|
format,
|
|
34193
34185
|
locale: getters.getLocale()
|
|
34194
34186
|
}));
|
|
34195
|
-
|
|
34187
|
+
const invalidDataValue = definition.fillArea ? ZERO : EMPTY$1;
|
|
34188
|
+
({labels, dataSetsValues} = filterInvalidDataPoints(labels, dataSetsValues, invalidDataValue));
|
|
34196
34189
|
if (axisType === "time") ({labels, dataSetsValues} = fixEmptyLabelsForDateCharts(labels, dataSetsValues));
|
|
34197
34190
|
if (definition.aggregated) ({labels, dataSetsValues} = aggregateDataForLabels(labels, dataSetsValues));
|
|
34198
34191
|
if (definition.cumulative) dataSetsValues = makeDatasetsCumulative(dataSetsValues, "asc");
|
|
@@ -34569,7 +34562,7 @@ function fixEmptyLabelsForDateCharts(labels, dataSetsValues) {
|
|
|
34569
34562
|
* - have neither a label nor a value
|
|
34570
34563
|
* - have no label and a non-numeric value
|
|
34571
34564
|
*/
|
|
34572
|
-
function filterInvalidDataPoints(labels, datasets) {
|
|
34565
|
+
function filterInvalidDataPoints(labels, datasets, invalidDataValue = EMPTY$1) {
|
|
34573
34566
|
const dataPointsIndexes = range(0, Math.max(labels.length, ...datasets.map((dataset) => dataset.data?.length || 0))).filter((dataPointIndex) => {
|
|
34574
34567
|
const label = labels[dataPointIndex];
|
|
34575
34568
|
const values = datasets.map((dataset) => dataset.data?.[dataPointIndex]);
|
|
@@ -34579,7 +34572,7 @@ function filterInvalidDataPoints(labels, datasets) {
|
|
|
34579
34572
|
labels: dataPointsIndexes.map((i) => labels[i] || ""),
|
|
34580
34573
|
dataSetsValues: datasets.map((dataset) => ({
|
|
34581
34574
|
...dataset,
|
|
34582
|
-
data: dataPointsIndexes.map((i) => isNumberResult(dataset.data[i]) ? dataset.data[i] :
|
|
34575
|
+
data: dataPointsIndexes.map((i) => isNumberResult(dataset.data[i]) ? dataset.data[i] : invalidDataValue)
|
|
34583
34576
|
}))
|
|
34584
34577
|
};
|
|
34585
34578
|
}
|
|
@@ -55523,7 +55516,7 @@ var Grid = class extends Component {
|
|
|
55523
55516
|
this.checkboxToggleStore = useStore(CheckboxToggleStore);
|
|
55524
55517
|
useStore(ArrayFormulaHighlight);
|
|
55525
55518
|
this.automaticSumStore = useLocalStore(AutomaticSumStore);
|
|
55526
|
-
|
|
55519
|
+
providePlugins([PopoverContainerPlugin], { getPopoverContainerRect: () => this.getGridRect() });
|
|
55527
55520
|
useListener(document.body, "cut", this.copy.bind(this, true));
|
|
55528
55521
|
useListener(document.body, "copy", this.copy.bind(this, false));
|
|
55529
55522
|
useListener(document.body, "paste", this.paste.bind(this));
|
|
@@ -63451,7 +63444,7 @@ var CompilationParametersBuilder = class {
|
|
|
63451
63444
|
if (rangeError) return [[rangeError]];
|
|
63452
63445
|
const sheetId = range.sheetId;
|
|
63453
63446
|
const zone = range.zone;
|
|
63454
|
-
const _zone =
|
|
63447
|
+
const _zone = this.getters.clipRangeToSheet(range)?.zone;
|
|
63455
63448
|
if (!_zone) return [[]];
|
|
63456
63449
|
const { top, left, bottom, right } = zone;
|
|
63457
63450
|
const cacheKey = `${sheetId}-${top}-${left}-${bottom}-${right}`;
|
|
@@ -64441,10 +64434,10 @@ var Evaluator = class {
|
|
|
64441
64434
|
updateDependencies(position) {
|
|
64442
64435
|
this.formulaDependencies().removeAllDependencies(position);
|
|
64443
64436
|
const dependencies = this.getDirectDependencies(position);
|
|
64444
|
-
this.formulaDependencies().addDependencies(position, dependencies);
|
|
64437
|
+
this.formulaDependencies().addDependencies(position, this.getters.clipRangesToSheet(dependencies));
|
|
64445
64438
|
}
|
|
64446
64439
|
addDependencies(position, dependencies) {
|
|
64447
|
-
this.formulaDependencies().addDependencies(position, dependencies);
|
|
64440
|
+
this.formulaDependencies().addDependencies(position, this.getters.clipRangesToSheet(dependencies));
|
|
64448
64441
|
this.computeDependencies(dependencies);
|
|
64449
64442
|
}
|
|
64450
64443
|
computeDependencies(dependencies) {
|
|
@@ -64517,7 +64510,8 @@ var Evaluator = class {
|
|
|
64517
64510
|
const graph = new FormulaDependencyGraph();
|
|
64518
64511
|
for (const sheetId of this.getters.getSheetIds()) for (const cell of this.getters.getCells(sheetId)) if (cell.isFormula) {
|
|
64519
64512
|
const cellPosition = this.getters.getCellPosition(cell.id);
|
|
64520
|
-
|
|
64513
|
+
const dependencies = this.getters.clipRangesToSheet(cell.compiledFormula.rangeDependencies);
|
|
64514
|
+
graph.addDependencies(cellPosition, dependencies);
|
|
64521
64515
|
}
|
|
64522
64516
|
return graph;
|
|
64523
64517
|
});
|
|
@@ -72663,7 +72657,7 @@ var SpreadsheetDashboard = class extends Component {
|
|
|
72663
72657
|
this.zoomStore = useStore(ZoomStore);
|
|
72664
72658
|
useLocalStore(HoveredTableStore);
|
|
72665
72659
|
const rendererStore = useLocalStore(RendererStore, OrderedLayers().filter((layer) => layer !== "Headers"));
|
|
72666
|
-
|
|
72660
|
+
providePlugins([PopoverContainerPlugin], { getPopoverContainerRect: () => this.zoomStore.getZoomedRect(this.getGridRect()) });
|
|
72667
72661
|
useGridDrawing({
|
|
72668
72662
|
canvasRef: this.canvasRef,
|
|
72669
72663
|
rendererStore,
|
|
@@ -75038,6 +75032,7 @@ var Spreadsheet = class extends Component {
|
|
|
75038
75032
|
stores.inject(ModelStore, this.model);
|
|
75039
75033
|
this.viewStore = useStore(ViewportsStore);
|
|
75040
75034
|
this.zoomStore = useStore(ZoomStore);
|
|
75035
|
+
providePlugins([PopoverContainerPlugin], { getPopoverContainerRect: () => getElBoundingRect(this.spreadsheetRef()) });
|
|
75041
75036
|
const env = this.env;
|
|
75042
75037
|
stores.get(ScreenWidthStore).setSmallThreshhold(() => {
|
|
75043
75038
|
return env.isSmall;
|
|
@@ -76080,6 +76075,8 @@ var RangeAdapterPlugin = class {
|
|
|
76080
76075
|
"extendRange",
|
|
76081
76076
|
"getRangeString",
|
|
76082
76077
|
"getRangeFromSheetXC",
|
|
76078
|
+
"clipRangesToSheet",
|
|
76079
|
+
"clipRangeToSheet",
|
|
76083
76080
|
"createAdaptedRanges",
|
|
76084
76081
|
"getRangeData",
|
|
76085
76082
|
"getRangeDataFromXc",
|
|
@@ -76118,6 +76115,22 @@ var RangeAdapterPlugin = class {
|
|
|
76118
76115
|
addRangeProvider(provider) {
|
|
76119
76116
|
this.providers.push(provider);
|
|
76120
76117
|
}
|
|
76118
|
+
clipRangeToSheet(range) {
|
|
76119
|
+
if (range.invalidXc) return range;
|
|
76120
|
+
const sheetZone = this.getters.getSheetZone(range.sheetId);
|
|
76121
|
+
if (isZoneInside(range.zone, sheetZone)) return range;
|
|
76122
|
+
const newZone = intersection(range.zone, sheetZone);
|
|
76123
|
+
if (!newZone) return;
|
|
76124
|
+
return this.getters.getRangeFromZone(range.sheetId, newZone);
|
|
76125
|
+
}
|
|
76126
|
+
clipRangesToSheet(ranges) {
|
|
76127
|
+
const clippedRanges = [];
|
|
76128
|
+
for (const range of ranges) {
|
|
76129
|
+
const clippedRange = this.clipRangeToSheet(range);
|
|
76130
|
+
if (clippedRange) clippedRanges.push(clippedRange);
|
|
76131
|
+
}
|
|
76132
|
+
return clippedRanges;
|
|
76133
|
+
}
|
|
76121
76134
|
createAdaptedRanges(ranges, offsetX, offsetY, sheetId) {
|
|
76122
76135
|
return ranges.map((range) => {
|
|
76123
76136
|
if (!isZoneValid(range.zone)) return range;
|
|
@@ -91155,6 +91168,6 @@ const chartHelpers = {
|
|
|
91155
91168
|
//#endregion
|
|
91156
91169
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, BadExpressionError, CHART_TYPES, CellErrorType, CellValueType, CircularDependencyError, ClientDisconnectedError, ClipboardMIMEType, CommandResult, CompiledFormula, CorePlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DEFAULT_LOCALE_DIGIT_GROUPING, DIRECTION, DispatchResult, DivisionByZeroError, EvaluationError, EvaluationPlugin, InvalidReferenceError, LocalTransportService, Model, NEXT_VALUE, NotAvailableError, NumberTooLargeError, OrderedLayers, PREVIOUS_VALUE, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, SplillBlockedError, Spreadsheet, SpreadsheetPivotTable, UIPlugin, UnknownFunctionError, __info__, addFunction, addRenderingLayer, astToFormula, availableConditionalFormatOperators, availableDataValidationOperators, availableFiltersOperators, borderPositions, borderStyles, canExecuteInReadonly, categories, chartHelpers, compatibility, components, composerFocusTypes, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, dispatcheableEvaluationCommandTypes, errorTypes, evaluationCommandTypes, filterDateCriterionOperators, filterNumberCriterionOperators, filterTextCriterionOperators, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidSubtotalFormulasCommands, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isDispatcheableEvaluationCommand, isEvaluationCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, schemeToColorScale, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
91157
91170
|
|
|
91158
|
-
__info__.version = "19.5.0-alpha.
|
|
91159
|
-
__info__.date = "2026-09-
|
|
91160
|
-
__info__.hash = "
|
|
91171
|
+
__info__.version = "19.5.0-alpha.17";
|
|
91172
|
+
__info__.date = "2026-09-07T05:58:42.129Z";
|
|
91173
|
+
__info__.hash = "532243c";
|