@odoo/o-spreadsheet 19.3.14 → 19.3.15
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 +118 -30
- package/dist/o_spreadsheet.css +3 -3
- package/dist/o_spreadsheet.esm.js +118 -30
- package/dist/o_spreadsheet.iife.js +118 -30
- package/dist/o_spreadsheet.min.iife.js +30 -30
- package/dist/o_spreadsheet.xml +3 -3
- package/dist/types/components/figures/chart/chartJs/chartjs_geo_projection_plugin.d.ts +12 -0
- 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.3.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.15
|
|
6
|
+
* @date 2026-08-10T12:32:40.247Z
|
|
7
|
+
* @hash 25f760e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -4259,19 +4259,58 @@ function applyVectorization(formula, args, acceptToVectorize = void 0) {
|
|
|
4259
4259
|
}
|
|
4260
4260
|
}
|
|
4261
4261
|
if (countVectorizedCol === 1 && countVectorizedRow === 1) return formula(...args);
|
|
4262
|
-
const
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4262
|
+
const argsBuffer = new Array(args.length);
|
|
4263
|
+
const argGetters = [];
|
|
4264
|
+
const vectorizedIndices = [];
|
|
4265
|
+
for (let k = 0; k < args.length; k++) {
|
|
4266
|
+
const arg = args[k];
|
|
4267
|
+
switch (vectorArgsType?.[k]) {
|
|
4268
|
+
case "matrix":
|
|
4269
|
+
argGetters.push((i, j) => arg[i][j]);
|
|
4270
|
+
vectorizedIndices.push(k);
|
|
4271
|
+
break;
|
|
4272
|
+
case "horizontal":
|
|
4273
|
+
argGetters.push((i) => arg[i][0]);
|
|
4274
|
+
vectorizedIndices.push(k);
|
|
4275
|
+
break;
|
|
4276
|
+
case "vertical":
|
|
4277
|
+
argGetters.push((_i, j) => arg[0][j]);
|
|
4278
|
+
vectorizedIndices.push(k);
|
|
4279
|
+
break;
|
|
4280
|
+
case void 0:
|
|
4281
|
+
argsBuffer[k] = arg;
|
|
4282
|
+
break;
|
|
4268
4283
|
}
|
|
4269
|
-
}
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4284
|
+
}
|
|
4285
|
+
const nbVectorized = vectorizedIndices.length;
|
|
4286
|
+
let callFormula;
|
|
4287
|
+
switch (argsBuffer.length) {
|
|
4288
|
+
case 1:
|
|
4289
|
+
callFormula = () => formula(argsBuffer[0]);
|
|
4290
|
+
break;
|
|
4291
|
+
case 2:
|
|
4292
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1]);
|
|
4293
|
+
break;
|
|
4294
|
+
case 3:
|
|
4295
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1], argsBuffer[2]);
|
|
4296
|
+
break;
|
|
4297
|
+
default: callFormula = () => formula(...argsBuffer);
|
|
4298
|
+
}
|
|
4299
|
+
const result = new Array(countVectorizedCol);
|
|
4300
|
+
for (let col = 0; col < countVectorizedCol; col++) {
|
|
4301
|
+
const column = new Array(countVectorizedRow);
|
|
4302
|
+
result[col] = column;
|
|
4303
|
+
for (let row = 0; row < countVectorizedRow; row++) {
|
|
4304
|
+
if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) {
|
|
4305
|
+
column[row] = new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
|
|
4306
|
+
continue;
|
|
4307
|
+
}
|
|
4308
|
+
for (let k = 0; k < nbVectorized; k++) argsBuffer[vectorizedIndices[k]] = argGetters[k](col, row);
|
|
4309
|
+
const singleCellComputeResult = callFormula();
|
|
4310
|
+
column[row] = isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4313
|
+
return result;
|
|
4275
4314
|
}
|
|
4276
4315
|
/**
|
|
4277
4316
|
* This function allows to visit arguments and stop the visit if necessary.
|
|
@@ -4618,12 +4657,15 @@ function emptyDataErrorMessage(argName) {
|
|
|
4618
4657
|
//#endregion
|
|
4619
4658
|
//#region src/functions/create_compute_function.ts
|
|
4620
4659
|
function createComputeFunction(descr) {
|
|
4660
|
+
let currentArgDefinitions = [];
|
|
4621
4661
|
function vectorizedCompute(...args) {
|
|
4622
4662
|
const acceptToVectorize = [];
|
|
4663
|
+
currentArgDefinitions = new Array(args.length);
|
|
4623
4664
|
const argsToFocus = argTargeting(descr, args.length);
|
|
4624
4665
|
for (let i = 0; i < args.length; i++) {
|
|
4625
4666
|
const argIndex = argsToFocus[i].index;
|
|
4626
4667
|
const argDefinition = descr.args[argIndex];
|
|
4668
|
+
currentArgDefinitions[i] = argDefinition;
|
|
4627
4669
|
const arg = args[i];
|
|
4628
4670
|
if (!isMatrix(arg) && argDefinition.acceptMatrixOnly) throw new BadExpressionError(_t("Function %s expects the parameter '%s' to be reference to a cell or range.", descr.name, (i + 1).toString()));
|
|
4629
4671
|
acceptToVectorize.push(!argDefinition.acceptMatrix);
|
|
@@ -4636,10 +4678,9 @@ function createComputeFunction(descr) {
|
|
|
4636
4678
|
return result;
|
|
4637
4679
|
}
|
|
4638
4680
|
function errorHandlingCompute(...args) {
|
|
4639
|
-
const argsToFocus = argTargeting(descr, args.length);
|
|
4640
4681
|
for (let i = 0; i < args.length; i++) {
|
|
4641
4682
|
const arg = args[i];
|
|
4642
|
-
if (!
|
|
4683
|
+
if (!currentArgDefinitions[i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
|
|
4643
4684
|
}
|
|
4644
4685
|
try {
|
|
4645
4686
|
return computeFunctionToObject.apply(this, args);
|
|
@@ -8968,6 +9009,25 @@ const funnelTooltipPositioner = function(elements) {
|
|
|
8968
9009
|
};
|
|
8969
9010
|
};
|
|
8970
9011
|
|
|
9012
|
+
//#endregion
|
|
9013
|
+
//#region src/components/figures/chart/chartJs/chartjs_geo_projection_plugin.ts
|
|
9014
|
+
/**
|
|
9015
|
+
* ChartJS plugin to apply custom changes to a d3 projection.
|
|
9016
|
+
*
|
|
9017
|
+
* We pass the projection as a string instead of a customized d3 object so
|
|
9018
|
+
* Chart.js creates a fresh projection instance. Custom changes (e.g. rotation)
|
|
9019
|
+
* are then applied in `beforeUpdate`.
|
|
9020
|
+
*
|
|
9021
|
+
* This is important because Chart.js mutates the projection instance at runtime,
|
|
9022
|
+
* and a customize d3 projection object would not be copied during deepCopy.
|
|
9023
|
+
*/
|
|
9024
|
+
const geoProjectionPlugin = {
|
|
9025
|
+
id: "geoProjection",
|
|
9026
|
+
beforeUpdate(chart) {
|
|
9027
|
+
if (chart.options?.scales?.projection?.projection === "conicConformal") chart.scales?.projection?.projection?.rotate([100, 0]);
|
|
9028
|
+
}
|
|
9029
|
+
};
|
|
9030
|
+
|
|
8971
9031
|
//#endregion
|
|
8972
9032
|
//#region src/components/figures/chart/chartJs/chartjs_minor_grid_plugin.ts
|
|
8973
9033
|
const chartMinorGridPlugin = {
|
|
@@ -10025,7 +10085,7 @@ function getGeoChartScales(definition, args) {
|
|
|
10025
10085
|
const format = axisFormats?.y || axisFormats?.y1;
|
|
10026
10086
|
return {
|
|
10027
10087
|
projection: {
|
|
10028
|
-
projection:
|
|
10088
|
+
projection: region?.defaultProjection || "mercator",
|
|
10029
10089
|
axis: "x"
|
|
10030
10090
|
},
|
|
10031
10091
|
color: {
|
|
@@ -10077,10 +10137,6 @@ function getFunnelChartScales(definition, args) {
|
|
|
10077
10137
|
}
|
|
10078
10138
|
};
|
|
10079
10139
|
}
|
|
10080
|
-
function getGeoChartProjection(projection) {
|
|
10081
|
-
if (projection === "conicConformal") return globalThis.ChartGeo.geoConicConformal().rotate([100, 0]);
|
|
10082
|
-
return projection;
|
|
10083
|
-
}
|
|
10084
10140
|
function getChartAxisTitleRuntime(design) {
|
|
10085
10141
|
if (design?.title?.text) {
|
|
10086
10142
|
const { text, color, align, italic, bold } = design.title;
|
|
@@ -10965,6 +11021,10 @@ chartJsExtensionRegistry.add("chartBackgroundPlugin", {
|
|
|
10965
11021
|
register: (Chart) => Chart.register(chartBackgroundPlugin),
|
|
10966
11022
|
unregister: (Chart) => Chart.unregister(chartBackgroundPlugin)
|
|
10967
11023
|
});
|
|
11024
|
+
chartJsExtensionRegistry.add("geoProjectionPlugin", {
|
|
11025
|
+
register: (Chart) => Chart.register(geoProjectionPlugin),
|
|
11026
|
+
unregister: (Chart) => Chart.unregister(geoProjectionPlugin)
|
|
11027
|
+
});
|
|
10968
11028
|
var ChartJsComponent = class extends _odoo_owl.Component {
|
|
10969
11029
|
static template = "o-spreadsheet-ChartJsComponent";
|
|
10970
11030
|
static props = {
|
|
@@ -18292,7 +18352,7 @@ var FigureComponent = class extends _odoo_owl.Component {
|
|
|
18292
18352
|
case "ArrowLeft":
|
|
18293
18353
|
case "ArrowRight":
|
|
18294
18354
|
case "ArrowUp":
|
|
18295
|
-
const { col, row, offset } = this.postionInBoundary(this.props.figureUI, ev.key);
|
|
18355
|
+
const { col, row, offset } = this.postionInBoundary(this.env.model.getters.getActiveSheetId(), this.props.figureUI, ev.key);
|
|
18296
18356
|
this.env.model.dispatch("UPDATE_FIGURE", {
|
|
18297
18357
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
18298
18358
|
figureId: this.props.figureUI.id,
|
|
@@ -18316,34 +18376,52 @@ var FigureComponent = class extends _odoo_owl.Component {
|
|
|
18316
18376
|
break;
|
|
18317
18377
|
}
|
|
18318
18378
|
}
|
|
18319
|
-
postionInBoundary(
|
|
18320
|
-
|
|
18321
|
-
let { col, row, offset } = position;
|
|
18379
|
+
postionInBoundary(sheetId, figure, key) {
|
|
18380
|
+
let { col, row, offset } = figure;
|
|
18322
18381
|
offset = { ...offset };
|
|
18382
|
+
const maxAnchor = this.env.model.getters.getMaxAnchorOffset(sheetId, figure.height, figure.width);
|
|
18323
18383
|
switch (key) {
|
|
18324
18384
|
case "ArrowUp":
|
|
18325
18385
|
if (offset.y === 0) {
|
|
18326
18386
|
row--;
|
|
18387
|
+
while (row > 0 && this.env.model.getters.isRowHiddenByUser(sheetId, row)) row--;
|
|
18327
18388
|
offset.y = this.env.model.getters.getRowSize(sheetId, row) - 1;
|
|
18328
18389
|
} else offset.y--;
|
|
18329
18390
|
break;
|
|
18330
18391
|
case "ArrowLeft":
|
|
18331
18392
|
if (offset.x === 0) {
|
|
18332
18393
|
col--;
|
|
18394
|
+
while (col > 0 && this.env.model.getters.isColHiddenByUser(sheetId, col)) col--;
|
|
18333
18395
|
offset.x = this.env.model.getters.getColSize(sheetId, col) - 1;
|
|
18334
18396
|
} else offset.x--;
|
|
18335
18397
|
break;
|
|
18336
18398
|
case "ArrowDown":
|
|
18337
18399
|
if (offset.y === this.env.model.getters.getRowSize(sheetId, row)) {
|
|
18338
18400
|
row++;
|
|
18401
|
+
while (row <= maxAnchor.row && this.env.model.getters.isRowHiddenByUser(sheetId, row)) row++;
|
|
18339
18402
|
offset.y = 0;
|
|
18340
18403
|
} else offset.y++;
|
|
18341
18404
|
break;
|
|
18342
18405
|
case "ArrowRight": if (offset.x === this.env.model.getters.getColSize(sheetId, row)) {
|
|
18343
18406
|
col++;
|
|
18407
|
+
while (col <= maxAnchor.col && this.env.model.getters.isColHiddenByUser(sheetId, col)) col++;
|
|
18344
18408
|
offset.x = 0;
|
|
18345
18409
|
} else offset.x++;
|
|
18346
18410
|
}
|
|
18411
|
+
if (col < 0) {
|
|
18412
|
+
col = 0;
|
|
18413
|
+
offset.x = 0;
|
|
18414
|
+
} else if (col > maxAnchor.col || col === maxAnchor.col && offset.x > maxAnchor.offset.x) {
|
|
18415
|
+
col = maxAnchor.col;
|
|
18416
|
+
offset.x = maxAnchor.offset.x;
|
|
18417
|
+
}
|
|
18418
|
+
if (row < 0) {
|
|
18419
|
+
row = 0;
|
|
18420
|
+
offset.y = 0;
|
|
18421
|
+
} else if (row > maxAnchor.row || row === maxAnchor.row && offset.y > maxAnchor.offset.y) {
|
|
18422
|
+
row = maxAnchor.row;
|
|
18423
|
+
offset.y = maxAnchor.offset.y;
|
|
18424
|
+
}
|
|
18347
18425
|
return {
|
|
18348
18426
|
col,
|
|
18349
18427
|
row,
|
|
@@ -44683,7 +44761,13 @@ var CellComposerStore = class extends AbstractComposerStore {
|
|
|
44683
44761
|
const cell = this.getters.getEvaluatedCell(position);
|
|
44684
44762
|
if (cell.link && !isFormula(content)) content = markdownLink(content, cell.link.url);
|
|
44685
44763
|
const currentFormat = this.getters.getCell(position)?.format;
|
|
44686
|
-
const
|
|
44764
|
+
const isCurrentFormatDate = currentFormat && isDateTimeFormat(currentFormat);
|
|
44765
|
+
const contentDateFormat = detectDateFormat(content, this.getters.getLocale());
|
|
44766
|
+
let afterFormat;
|
|
44767
|
+
if (currentFormat !== "@") {
|
|
44768
|
+
if (contentDateFormat && !isCurrentFormatDate) afterFormat = contentDateFormat;
|
|
44769
|
+
else if (isCurrentFormatDate && isNumber(content, this.getters.getLocale())) afterFormat = "";
|
|
44770
|
+
}
|
|
44687
44771
|
this.addHeadersForSpreadingFormula(content);
|
|
44688
44772
|
result = this.model.dispatch("UPDATE_CELL", {
|
|
44689
44773
|
...this.currentEditedCell,
|
|
@@ -66397,6 +66481,10 @@ function inverseCreateFigure(cmd) {
|
|
|
66397
66481
|
}
|
|
66398
66482
|
function inverseCreateChart(cmd) {
|
|
66399
66483
|
return [{
|
|
66484
|
+
type: "DELETE_CHART",
|
|
66485
|
+
chartId: cmd.chartId,
|
|
66486
|
+
sheetId: cmd.sheetId
|
|
66487
|
+
}, {
|
|
66400
66488
|
type: "DELETE_FIGURE",
|
|
66401
66489
|
figureId: cmd.figureId,
|
|
66402
66490
|
sheetId: cmd.sheetId
|
|
@@ -84861,6 +84949,6 @@ exports.stores = stores;
|
|
|
84861
84949
|
exports.tokenColors = tokenColors;
|
|
84862
84950
|
exports.tokenize = tokenize;
|
|
84863
84951
|
|
|
84864
|
-
__info__.version = "19.3.
|
|
84865
|
-
__info__.date = "2026-
|
|
84866
|
-
__info__.hash = "
|
|
84952
|
+
__info__.version = "19.3.15";
|
|
84953
|
+
__info__.date = "2026-08-10T12:32:40.247Z";
|
|
84954
|
+
__info__.hash = "25f760e";
|
package/dist/o_spreadsheet.css
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.3.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.15
|
|
6
|
+
* @date 2026-08-10T12:32:41.948Z
|
|
7
|
+
* @hash 25f760e
|
|
8
8
|
*/
|
|
9
9
|
:root {
|
|
10
10
|
--os-gray-100: light-dark(#f9fafb, #1b1d26);
|
|
@@ -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.3.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.15
|
|
6
|
+
* @date 2026-08-10T12:32:40.247Z
|
|
7
|
+
* @hash 25f760e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, whenReady, xml } from "@odoo/owl";
|
|
@@ -4258,19 +4258,58 @@ function applyVectorization(formula, args, acceptToVectorize = void 0) {
|
|
|
4258
4258
|
}
|
|
4259
4259
|
}
|
|
4260
4260
|
if (countVectorizedCol === 1 && countVectorizedRow === 1) return formula(...args);
|
|
4261
|
-
const
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4261
|
+
const argsBuffer = new Array(args.length);
|
|
4262
|
+
const argGetters = [];
|
|
4263
|
+
const vectorizedIndices = [];
|
|
4264
|
+
for (let k = 0; k < args.length; k++) {
|
|
4265
|
+
const arg = args[k];
|
|
4266
|
+
switch (vectorArgsType?.[k]) {
|
|
4267
|
+
case "matrix":
|
|
4268
|
+
argGetters.push((i, j) => arg[i][j]);
|
|
4269
|
+
vectorizedIndices.push(k);
|
|
4270
|
+
break;
|
|
4271
|
+
case "horizontal":
|
|
4272
|
+
argGetters.push((i) => arg[i][0]);
|
|
4273
|
+
vectorizedIndices.push(k);
|
|
4274
|
+
break;
|
|
4275
|
+
case "vertical":
|
|
4276
|
+
argGetters.push((_i, j) => arg[0][j]);
|
|
4277
|
+
vectorizedIndices.push(k);
|
|
4278
|
+
break;
|
|
4279
|
+
case void 0:
|
|
4280
|
+
argsBuffer[k] = arg;
|
|
4281
|
+
break;
|
|
4267
4282
|
}
|
|
4268
|
-
}
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4283
|
+
}
|
|
4284
|
+
const nbVectorized = vectorizedIndices.length;
|
|
4285
|
+
let callFormula;
|
|
4286
|
+
switch (argsBuffer.length) {
|
|
4287
|
+
case 1:
|
|
4288
|
+
callFormula = () => formula(argsBuffer[0]);
|
|
4289
|
+
break;
|
|
4290
|
+
case 2:
|
|
4291
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1]);
|
|
4292
|
+
break;
|
|
4293
|
+
case 3:
|
|
4294
|
+
callFormula = () => formula(argsBuffer[0], argsBuffer[1], argsBuffer[2]);
|
|
4295
|
+
break;
|
|
4296
|
+
default: callFormula = () => formula(...argsBuffer);
|
|
4297
|
+
}
|
|
4298
|
+
const result = new Array(countVectorizedCol);
|
|
4299
|
+
for (let col = 0; col < countVectorizedCol; col++) {
|
|
4300
|
+
const column = new Array(countVectorizedRow);
|
|
4301
|
+
result[col] = column;
|
|
4302
|
+
for (let row = 0; row < countVectorizedRow; row++) {
|
|
4303
|
+
if (col > vectorizedColLimit - 1 || row > vectorizedRowLimit - 1) {
|
|
4304
|
+
column[row] = new NotAvailableError(_t("Array arguments to [[FUNCTION_NAME]] are of different size."));
|
|
4305
|
+
continue;
|
|
4306
|
+
}
|
|
4307
|
+
for (let k = 0; k < nbVectorized; k++) argsBuffer[vectorizedIndices[k]] = argGetters[k](col, row);
|
|
4308
|
+
const singleCellComputeResult = callFormula();
|
|
4309
|
+
column[row] = isMatrix(singleCellComputeResult) ? singleCellComputeResult[0][0] : singleCellComputeResult;
|
|
4310
|
+
}
|
|
4311
|
+
}
|
|
4312
|
+
return result;
|
|
4274
4313
|
}
|
|
4275
4314
|
/**
|
|
4276
4315
|
* This function allows to visit arguments and stop the visit if necessary.
|
|
@@ -4617,12 +4656,15 @@ function emptyDataErrorMessage(argName) {
|
|
|
4617
4656
|
//#endregion
|
|
4618
4657
|
//#region src/functions/create_compute_function.ts
|
|
4619
4658
|
function createComputeFunction(descr) {
|
|
4659
|
+
let currentArgDefinitions = [];
|
|
4620
4660
|
function vectorizedCompute(...args) {
|
|
4621
4661
|
const acceptToVectorize = [];
|
|
4662
|
+
currentArgDefinitions = new Array(args.length);
|
|
4622
4663
|
const argsToFocus = argTargeting(descr, args.length);
|
|
4623
4664
|
for (let i = 0; i < args.length; i++) {
|
|
4624
4665
|
const argIndex = argsToFocus[i].index;
|
|
4625
4666
|
const argDefinition = descr.args[argIndex];
|
|
4667
|
+
currentArgDefinitions[i] = argDefinition;
|
|
4626
4668
|
const arg = args[i];
|
|
4627
4669
|
if (!isMatrix(arg) && argDefinition.acceptMatrixOnly) throw new BadExpressionError(_t("Function %s expects the parameter '%s' to be reference to a cell or range.", descr.name, (i + 1).toString()));
|
|
4628
4670
|
acceptToVectorize.push(!argDefinition.acceptMatrix);
|
|
@@ -4635,10 +4677,9 @@ function createComputeFunction(descr) {
|
|
|
4635
4677
|
return result;
|
|
4636
4678
|
}
|
|
4637
4679
|
function errorHandlingCompute(...args) {
|
|
4638
|
-
const argsToFocus = argTargeting(descr, args.length);
|
|
4639
4680
|
for (let i = 0; i < args.length; i++) {
|
|
4640
4681
|
const arg = args[i];
|
|
4641
|
-
if (!
|
|
4682
|
+
if (!currentArgDefinitions[i].acceptErrors && !isMatrix(arg) && isEvaluationError(arg?.value)) return arg;
|
|
4642
4683
|
}
|
|
4643
4684
|
try {
|
|
4644
4685
|
return computeFunctionToObject.apply(this, args);
|
|
@@ -8967,6 +9008,25 @@ const funnelTooltipPositioner = function(elements) {
|
|
|
8967
9008
|
};
|
|
8968
9009
|
};
|
|
8969
9010
|
|
|
9011
|
+
//#endregion
|
|
9012
|
+
//#region src/components/figures/chart/chartJs/chartjs_geo_projection_plugin.ts
|
|
9013
|
+
/**
|
|
9014
|
+
* ChartJS plugin to apply custom changes to a d3 projection.
|
|
9015
|
+
*
|
|
9016
|
+
* We pass the projection as a string instead of a customized d3 object so
|
|
9017
|
+
* Chart.js creates a fresh projection instance. Custom changes (e.g. rotation)
|
|
9018
|
+
* are then applied in `beforeUpdate`.
|
|
9019
|
+
*
|
|
9020
|
+
* This is important because Chart.js mutates the projection instance at runtime,
|
|
9021
|
+
* and a customize d3 projection object would not be copied during deepCopy.
|
|
9022
|
+
*/
|
|
9023
|
+
const geoProjectionPlugin = {
|
|
9024
|
+
id: "geoProjection",
|
|
9025
|
+
beforeUpdate(chart) {
|
|
9026
|
+
if (chart.options?.scales?.projection?.projection === "conicConformal") chart.scales?.projection?.projection?.rotate([100, 0]);
|
|
9027
|
+
}
|
|
9028
|
+
};
|
|
9029
|
+
|
|
8970
9030
|
//#endregion
|
|
8971
9031
|
//#region src/components/figures/chart/chartJs/chartjs_minor_grid_plugin.ts
|
|
8972
9032
|
const chartMinorGridPlugin = {
|
|
@@ -10024,7 +10084,7 @@ function getGeoChartScales(definition, args) {
|
|
|
10024
10084
|
const format = axisFormats?.y || axisFormats?.y1;
|
|
10025
10085
|
return {
|
|
10026
10086
|
projection: {
|
|
10027
|
-
projection:
|
|
10087
|
+
projection: region?.defaultProjection || "mercator",
|
|
10028
10088
|
axis: "x"
|
|
10029
10089
|
},
|
|
10030
10090
|
color: {
|
|
@@ -10076,10 +10136,6 @@ function getFunnelChartScales(definition, args) {
|
|
|
10076
10136
|
}
|
|
10077
10137
|
};
|
|
10078
10138
|
}
|
|
10079
|
-
function getGeoChartProjection(projection) {
|
|
10080
|
-
if (projection === "conicConformal") return globalThis.ChartGeo.geoConicConformal().rotate([100, 0]);
|
|
10081
|
-
return projection;
|
|
10082
|
-
}
|
|
10083
10139
|
function getChartAxisTitleRuntime(design) {
|
|
10084
10140
|
if (design?.title?.text) {
|
|
10085
10141
|
const { text, color, align, italic, bold } = design.title;
|
|
@@ -10964,6 +11020,10 @@ chartJsExtensionRegistry.add("chartBackgroundPlugin", {
|
|
|
10964
11020
|
register: (Chart) => Chart.register(chartBackgroundPlugin),
|
|
10965
11021
|
unregister: (Chart) => Chart.unregister(chartBackgroundPlugin)
|
|
10966
11022
|
});
|
|
11023
|
+
chartJsExtensionRegistry.add("geoProjectionPlugin", {
|
|
11024
|
+
register: (Chart) => Chart.register(geoProjectionPlugin),
|
|
11025
|
+
unregister: (Chart) => Chart.unregister(geoProjectionPlugin)
|
|
11026
|
+
});
|
|
10967
11027
|
var ChartJsComponent = class extends Component {
|
|
10968
11028
|
static template = "o-spreadsheet-ChartJsComponent";
|
|
10969
11029
|
static props = {
|
|
@@ -18291,7 +18351,7 @@ var FigureComponent = class extends Component {
|
|
|
18291
18351
|
case "ArrowLeft":
|
|
18292
18352
|
case "ArrowRight":
|
|
18293
18353
|
case "ArrowUp":
|
|
18294
|
-
const { col, row, offset } = this.postionInBoundary(this.props.figureUI, ev.key);
|
|
18354
|
+
const { col, row, offset } = this.postionInBoundary(this.env.model.getters.getActiveSheetId(), this.props.figureUI, ev.key);
|
|
18295
18355
|
this.env.model.dispatch("UPDATE_FIGURE", {
|
|
18296
18356
|
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
18297
18357
|
figureId: this.props.figureUI.id,
|
|
@@ -18315,34 +18375,52 @@ var FigureComponent = class extends Component {
|
|
|
18315
18375
|
break;
|
|
18316
18376
|
}
|
|
18317
18377
|
}
|
|
18318
|
-
postionInBoundary(
|
|
18319
|
-
|
|
18320
|
-
let { col, row, offset } = position;
|
|
18378
|
+
postionInBoundary(sheetId, figure, key) {
|
|
18379
|
+
let { col, row, offset } = figure;
|
|
18321
18380
|
offset = { ...offset };
|
|
18381
|
+
const maxAnchor = this.env.model.getters.getMaxAnchorOffset(sheetId, figure.height, figure.width);
|
|
18322
18382
|
switch (key) {
|
|
18323
18383
|
case "ArrowUp":
|
|
18324
18384
|
if (offset.y === 0) {
|
|
18325
18385
|
row--;
|
|
18386
|
+
while (row > 0 && this.env.model.getters.isRowHiddenByUser(sheetId, row)) row--;
|
|
18326
18387
|
offset.y = this.env.model.getters.getRowSize(sheetId, row) - 1;
|
|
18327
18388
|
} else offset.y--;
|
|
18328
18389
|
break;
|
|
18329
18390
|
case "ArrowLeft":
|
|
18330
18391
|
if (offset.x === 0) {
|
|
18331
18392
|
col--;
|
|
18393
|
+
while (col > 0 && this.env.model.getters.isColHiddenByUser(sheetId, col)) col--;
|
|
18332
18394
|
offset.x = this.env.model.getters.getColSize(sheetId, col) - 1;
|
|
18333
18395
|
} else offset.x--;
|
|
18334
18396
|
break;
|
|
18335
18397
|
case "ArrowDown":
|
|
18336
18398
|
if (offset.y === this.env.model.getters.getRowSize(sheetId, row)) {
|
|
18337
18399
|
row++;
|
|
18400
|
+
while (row <= maxAnchor.row && this.env.model.getters.isRowHiddenByUser(sheetId, row)) row++;
|
|
18338
18401
|
offset.y = 0;
|
|
18339
18402
|
} else offset.y++;
|
|
18340
18403
|
break;
|
|
18341
18404
|
case "ArrowRight": if (offset.x === this.env.model.getters.getColSize(sheetId, row)) {
|
|
18342
18405
|
col++;
|
|
18406
|
+
while (col <= maxAnchor.col && this.env.model.getters.isColHiddenByUser(sheetId, col)) col++;
|
|
18343
18407
|
offset.x = 0;
|
|
18344
18408
|
} else offset.x++;
|
|
18345
18409
|
}
|
|
18410
|
+
if (col < 0) {
|
|
18411
|
+
col = 0;
|
|
18412
|
+
offset.x = 0;
|
|
18413
|
+
} else if (col > maxAnchor.col || col === maxAnchor.col && offset.x > maxAnchor.offset.x) {
|
|
18414
|
+
col = maxAnchor.col;
|
|
18415
|
+
offset.x = maxAnchor.offset.x;
|
|
18416
|
+
}
|
|
18417
|
+
if (row < 0) {
|
|
18418
|
+
row = 0;
|
|
18419
|
+
offset.y = 0;
|
|
18420
|
+
} else if (row > maxAnchor.row || row === maxAnchor.row && offset.y > maxAnchor.offset.y) {
|
|
18421
|
+
row = maxAnchor.row;
|
|
18422
|
+
offset.y = maxAnchor.offset.y;
|
|
18423
|
+
}
|
|
18346
18424
|
return {
|
|
18347
18425
|
col,
|
|
18348
18426
|
row,
|
|
@@ -44682,7 +44760,13 @@ var CellComposerStore = class extends AbstractComposerStore {
|
|
|
44682
44760
|
const cell = this.getters.getEvaluatedCell(position);
|
|
44683
44761
|
if (cell.link && !isFormula(content)) content = markdownLink(content, cell.link.url);
|
|
44684
44762
|
const currentFormat = this.getters.getCell(position)?.format;
|
|
44685
|
-
const
|
|
44763
|
+
const isCurrentFormatDate = currentFormat && isDateTimeFormat(currentFormat);
|
|
44764
|
+
const contentDateFormat = detectDateFormat(content, this.getters.getLocale());
|
|
44765
|
+
let afterFormat;
|
|
44766
|
+
if (currentFormat !== "@") {
|
|
44767
|
+
if (contentDateFormat && !isCurrentFormatDate) afterFormat = contentDateFormat;
|
|
44768
|
+
else if (isCurrentFormatDate && isNumber(content, this.getters.getLocale())) afterFormat = "";
|
|
44769
|
+
}
|
|
44686
44770
|
this.addHeadersForSpreadingFormula(content);
|
|
44687
44771
|
result = this.model.dispatch("UPDATE_CELL", {
|
|
44688
44772
|
...this.currentEditedCell,
|
|
@@ -66212,6 +66296,10 @@ function inverseCreateFigure(cmd) {
|
|
|
66212
66296
|
}
|
|
66213
66297
|
function inverseCreateChart(cmd) {
|
|
66214
66298
|
return [{
|
|
66299
|
+
type: "DELETE_CHART",
|
|
66300
|
+
chartId: cmd.chartId,
|
|
66301
|
+
sheetId: cmd.sheetId
|
|
66302
|
+
}, {
|
|
66215
66303
|
type: "DELETE_FIGURE",
|
|
66216
66304
|
figureId: cmd.figureId,
|
|
66217
66305
|
sheetId: cmd.sheetId
|
|
@@ -84618,6 +84706,6 @@ const chartHelpers = {
|
|
|
84618
84706
|
//#endregion
|
|
84619
84707
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, canExecuteInReadonly, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
84620
84708
|
|
|
84621
|
-
__info__.version = "19.3.
|
|
84622
|
-
__info__.date = "2026-
|
|
84623
|
-
__info__.hash = "
|
|
84709
|
+
__info__.version = "19.3.15";
|
|
84710
|
+
__info__.date = "2026-08-10T12:32:40.247Z";
|
|
84711
|
+
__info__.hash = "25f760e";
|