@odoo/o-spreadsheet 17.0.15 → 17.0.16
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 +64 -20
- package/dist/o-spreadsheet.d.ts +3 -1
- package/dist/o-spreadsheet.esm.js +64 -20
- package/dist/o-spreadsheet.iife.js +64 -20
- package/dist/o-spreadsheet.iife.min.js +20 -15
- package/dist/o_spreadsheet.xml +32 -20
- package/package.json +1 -1
|
@@ -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 17.0.
|
|
6
|
-
* @date 2024-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.16
|
|
6
|
+
* @date 2024-03-25T09:42:01.717Z
|
|
7
|
+
* @hash 9b128f8
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -11057,6 +11057,9 @@ function makeArg(str, description) {
|
|
|
11057
11057
|
result.default = true;
|
|
11058
11058
|
result.defaultValue = defaultValue;
|
|
11059
11059
|
}
|
|
11060
|
+
if (types.some((t) => t.startsWith("RANGE"))) {
|
|
11061
|
+
result.acceptMatrix = true;
|
|
11062
|
+
}
|
|
11060
11063
|
return result;
|
|
11061
11064
|
}
|
|
11062
11065
|
/**
|
|
@@ -19422,11 +19425,27 @@ class FunctionRegistry extends Registry {
|
|
|
19422
19425
|
}
|
|
19423
19426
|
const descr = addMetaInfoFromArg(addDescr);
|
|
19424
19427
|
validateArguments(descr.args);
|
|
19425
|
-
this.mapping[name] = createComputeFunctionFromDescription(descr);
|
|
19428
|
+
this.mapping[name] = addInputHandling(descr, createComputeFunctionFromDescription(descr));
|
|
19426
19429
|
super.add(name, descr);
|
|
19427
19430
|
return this;
|
|
19428
19431
|
}
|
|
19429
19432
|
}
|
|
19433
|
+
function addInputHandling(descr, computeFunction) {
|
|
19434
|
+
function computeWithInputHandling(...args) {
|
|
19435
|
+
for (let i = 0; i < args.length; i++) {
|
|
19436
|
+
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
|
19437
|
+
const arg = args[i];
|
|
19438
|
+
if (isMatrix(arg) && !argDefinition.acceptMatrix) {
|
|
19439
|
+
if (arg.length !== 1 || arg[0].length !== 1) {
|
|
19440
|
+
throw new EvaluationError(CellErrorType.GenericError, _t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be a single value or a single cell reference, not a range.", argDefinition.name));
|
|
19441
|
+
}
|
|
19442
|
+
args[i] = arg[0][0];
|
|
19443
|
+
}
|
|
19444
|
+
}
|
|
19445
|
+
return computeFunction.apply(this, args);
|
|
19446
|
+
}
|
|
19447
|
+
return computeWithInputHandling;
|
|
19448
|
+
}
|
|
19430
19449
|
function createComputeFunctionFromDescription(descr) {
|
|
19431
19450
|
const computeValueAndFormat = "computeValueAndFormat" in descr;
|
|
19432
19451
|
const computeValue = "compute" in descr;
|
|
@@ -19677,14 +19696,19 @@ const categorieFunctionAll = {
|
|
|
19677
19696
|
children: [allFunctionListMenuBuilder],
|
|
19678
19697
|
};
|
|
19679
19698
|
function allFunctionListMenuBuilder() {
|
|
19680
|
-
const fnNames = functionRegistry.getKeys();
|
|
19699
|
+
const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
|
|
19681
19700
|
return createFormulaFunctions(fnNames);
|
|
19682
19701
|
}
|
|
19683
19702
|
const categoriesFunctionListMenuBuilder = () => {
|
|
19684
19703
|
const functions = functionRegistry.content;
|
|
19685
|
-
const categories = [
|
|
19704
|
+
const categories = [
|
|
19705
|
+
...new Set(functionRegistry
|
|
19706
|
+
.getAll()
|
|
19707
|
+
.filter((fn) => !fn.hidden)
|
|
19708
|
+
.map((fn) => fn.category)),
|
|
19709
|
+
].filter(isDefined$1);
|
|
19686
19710
|
return categories.sort().map((category, i) => {
|
|
19687
|
-
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
|
|
19711
|
+
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
|
|
19688
19712
|
return {
|
|
19689
19713
|
name: category,
|
|
19690
19714
|
children: createFormulaFunctions(functionsInCategory),
|
|
@@ -23337,11 +23361,9 @@ css /* scss */ `
|
|
|
23337
23361
|
}
|
|
23338
23362
|
.o-cell-is-operator {
|
|
23339
23363
|
margin-bottom: 5px;
|
|
23340
|
-
width: 96%;
|
|
23341
23364
|
}
|
|
23342
23365
|
.o-cell-is-value {
|
|
23343
23366
|
margin-bottom: 5px;
|
|
23344
|
-
width: 96%;
|
|
23345
23367
|
}
|
|
23346
23368
|
.o-color-picker-widget .o-color-picker-button {
|
|
23347
23369
|
pointer-events: all;
|
|
@@ -25707,6 +25729,9 @@ class FigureComponent extends owl.Component {
|
|
|
25707
25729
|
el?.focus({ preventScroll: true });
|
|
25708
25730
|
}
|
|
25709
25731
|
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
|
25732
|
+
owl.onWillUnmount(() => {
|
|
25733
|
+
this.props.onFigureDeleted();
|
|
25734
|
+
});
|
|
25710
25735
|
}
|
|
25711
25736
|
clickAnchor(dirX, dirY, ev) {
|
|
25712
25737
|
this.props.onClickAnchor(dirX, dirY, ev);
|
|
@@ -25725,6 +25750,7 @@ class FigureComponent extends owl.Component {
|
|
|
25725
25750
|
this.props.onFigureDeleted();
|
|
25726
25751
|
ev.stopPropagation();
|
|
25727
25752
|
ev.preventDefault();
|
|
25753
|
+
ev.stopPropagation();
|
|
25728
25754
|
break;
|
|
25729
25755
|
case "ArrowDown":
|
|
25730
25756
|
case "ArrowLeft":
|
|
@@ -25745,6 +25771,7 @@ class FigureComponent extends owl.Component {
|
|
|
25745
25771
|
});
|
|
25746
25772
|
ev.stopPropagation();
|
|
25747
25773
|
ev.preventDefault();
|
|
25774
|
+
ev.stopPropagation();
|
|
25748
25775
|
break;
|
|
25749
25776
|
}
|
|
25750
25777
|
}
|
|
@@ -26426,6 +26453,7 @@ function compareContentToSpanElement(content, node) {
|
|
|
26426
26453
|
// -----------------------------------------------------------------------------
|
|
26427
26454
|
css /* scss */ `
|
|
26428
26455
|
.o-formula-assistant {
|
|
26456
|
+
background: #ffffff;
|
|
26429
26457
|
.o-formula-assistant-head {
|
|
26430
26458
|
background-color: #f2f2f2;
|
|
26431
26459
|
padding: 10px;
|
|
@@ -26476,6 +26504,9 @@ class FunctionDescriptionProvider extends owl.Component {
|
|
|
26476
26504
|
this.assistantState.allowCellSelectionBehind = false;
|
|
26477
26505
|
}, 2000);
|
|
26478
26506
|
}
|
|
26507
|
+
get formulaArgSeparator() {
|
|
26508
|
+
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
|
|
26509
|
+
}
|
|
26479
26510
|
}
|
|
26480
26511
|
FunctionDescriptionProvider.props = {
|
|
26481
26512
|
functionName: String,
|
|
@@ -26627,6 +26658,12 @@ class Composer extends owl.Component {
|
|
|
26627
26658
|
owl.useEffect(() => {
|
|
26628
26659
|
this.processContent();
|
|
26629
26660
|
});
|
|
26661
|
+
owl.onPatched(() => {
|
|
26662
|
+
// Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
|
|
26663
|
+
if (this.env.model.getters.getEditionMode() === "inactive") {
|
|
26664
|
+
this.processTokenAtCursor();
|
|
26665
|
+
}
|
|
26666
|
+
});
|
|
26630
26667
|
}
|
|
26631
26668
|
// ---------------------------------------------------------------------------
|
|
26632
26669
|
// Handlers
|
|
@@ -41587,7 +41624,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
41587
41624
|
? getItemId(newFormat, data.formats)
|
|
41588
41625
|
: exportedCellData.format;
|
|
41589
41626
|
let content;
|
|
41590
|
-
if (formulaCell instanceof FormulaCellWithDependencies) {
|
|
41627
|
+
if (isFormula && formulaCell instanceof FormulaCellWithDependencies) {
|
|
41591
41628
|
content = this.getters.getFormulaCellContent(exportedSheetData.id, formulaCell.compiledFormula, formulaCell.compiledFormula.dependencies, true);
|
|
41592
41629
|
}
|
|
41593
41630
|
else {
|
|
@@ -49297,6 +49334,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
49297
49334
|
this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
|
|
49298
49335
|
this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
|
|
49299
49336
|
this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
|
|
49337
|
+
this.selectedFigureId = null;
|
|
49300
49338
|
break;
|
|
49301
49339
|
}
|
|
49302
49340
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
@@ -52874,9 +52912,6 @@ css /* scss */ `
|
|
|
52874
52912
|
.text-muted {
|
|
52875
52913
|
color: grey !important;
|
|
52876
52914
|
}
|
|
52877
|
-
button {
|
|
52878
|
-
color: #333;
|
|
52879
|
-
}
|
|
52880
52915
|
.o-disabled {
|
|
52881
52916
|
opacity: 0.4;
|
|
52882
52917
|
pointer: default;
|
|
@@ -52997,17 +53032,17 @@ css /* scss */ `
|
|
|
52997
53032
|
}
|
|
52998
53033
|
|
|
52999
53034
|
.o-button {
|
|
53000
|
-
border: 1px solid
|
|
53035
|
+
border: 1px solid;
|
|
53001
53036
|
padding: 0px 20px 0px 20px;
|
|
53002
53037
|
border-radius: 4px;
|
|
53003
53038
|
font-weight: 500;
|
|
53004
53039
|
font-size: 14px;
|
|
53005
53040
|
height: 30px;
|
|
53006
53041
|
line-height: 16px;
|
|
53007
|
-
background: white;
|
|
53008
53042
|
margin-right: 8px;
|
|
53009
|
-
|
|
53010
|
-
|
|
53043
|
+
|
|
53044
|
+
&:not(:hover) {
|
|
53045
|
+
background-color: transparent;
|
|
53011
53046
|
}
|
|
53012
53047
|
|
|
53013
53048
|
&:enabled {
|
|
@@ -53021,6 +53056,15 @@ css /* scss */ `
|
|
|
53021
53056
|
&:last-child {
|
|
53022
53057
|
margin-right: 0px;
|
|
53023
53058
|
}
|
|
53059
|
+
|
|
53060
|
+
&.o-button-grey {
|
|
53061
|
+
border-color: lightgrey;
|
|
53062
|
+
background: #ffffff;
|
|
53063
|
+
color: #333;
|
|
53064
|
+
&:hover:enabled {
|
|
53065
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
53066
|
+
}
|
|
53067
|
+
}
|
|
53024
53068
|
}
|
|
53025
53069
|
|
|
53026
53070
|
.o-input {
|
|
@@ -56968,6 +57012,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
56968
57012
|
exports.tokenize = tokenize;
|
|
56969
57013
|
|
|
56970
57014
|
|
|
56971
|
-
__info__.version = "17.0.
|
|
56972
|
-
__info__.date = "2024-03-
|
|
56973
|
-
__info__.hash = "
|
|
57015
|
+
__info__.version = "17.0.16";
|
|
57016
|
+
__info__.date = "2024-03-25T09:42:01.717Z";
|
|
57017
|
+
__info__.hash = "9b128f8";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -3122,6 +3122,7 @@ interface SpreadsheetChildEnv extends SpreadsheetEnv {
|
|
|
3122
3122
|
|
|
3123
3123
|
type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
|
|
3124
3124
|
interface ArgDefinition {
|
|
3125
|
+
acceptMatrix?: boolean;
|
|
3125
3126
|
repeating?: boolean;
|
|
3126
3127
|
optional?: boolean;
|
|
3127
3128
|
lazy?: boolean;
|
|
@@ -7180,13 +7181,14 @@ interface Props$a {
|
|
|
7180
7181
|
interface AssistantState {
|
|
7181
7182
|
allowCellSelectionBehind: boolean;
|
|
7182
7183
|
}
|
|
7183
|
-
declare class FunctionDescriptionProvider extends Component<Props$a> {
|
|
7184
|
+
declare class FunctionDescriptionProvider extends Component<Props$a, SpreadsheetChildEnv> {
|
|
7184
7185
|
static template: string;
|
|
7185
7186
|
assistantState: AssistantState;
|
|
7186
7187
|
private timeOutId;
|
|
7187
7188
|
setup(): void;
|
|
7188
7189
|
getContext(): Props$a;
|
|
7189
7190
|
onMouseMove(): void;
|
|
7191
|
+
get formulaArgSeparator(): string;
|
|
7190
7192
|
}
|
|
7191
7193
|
|
|
7192
7194
|
type HtmlContent = {
|
|
@@ -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 17.0.
|
|
6
|
-
* @date 2024-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.16
|
|
6
|
+
* @date 2024-03-25T09:42:01.717Z
|
|
7
|
+
* @hash 9b128f8
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -11055,6 +11055,9 @@ function makeArg(str, description) {
|
|
|
11055
11055
|
result.default = true;
|
|
11056
11056
|
result.defaultValue = defaultValue;
|
|
11057
11057
|
}
|
|
11058
|
+
if (types.some((t) => t.startsWith("RANGE"))) {
|
|
11059
|
+
result.acceptMatrix = true;
|
|
11060
|
+
}
|
|
11058
11061
|
return result;
|
|
11059
11062
|
}
|
|
11060
11063
|
/**
|
|
@@ -19420,11 +19423,27 @@ class FunctionRegistry extends Registry {
|
|
|
19420
19423
|
}
|
|
19421
19424
|
const descr = addMetaInfoFromArg(addDescr);
|
|
19422
19425
|
validateArguments(descr.args);
|
|
19423
|
-
this.mapping[name] = createComputeFunctionFromDescription(descr);
|
|
19426
|
+
this.mapping[name] = addInputHandling(descr, createComputeFunctionFromDescription(descr));
|
|
19424
19427
|
super.add(name, descr);
|
|
19425
19428
|
return this;
|
|
19426
19429
|
}
|
|
19427
19430
|
}
|
|
19431
|
+
function addInputHandling(descr, computeFunction) {
|
|
19432
|
+
function computeWithInputHandling(...args) {
|
|
19433
|
+
for (let i = 0; i < args.length; i++) {
|
|
19434
|
+
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
|
19435
|
+
const arg = args[i];
|
|
19436
|
+
if (isMatrix(arg) && !argDefinition.acceptMatrix) {
|
|
19437
|
+
if (arg.length !== 1 || arg[0].length !== 1) {
|
|
19438
|
+
throw new EvaluationError(CellErrorType.GenericError, _t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be a single value or a single cell reference, not a range.", argDefinition.name));
|
|
19439
|
+
}
|
|
19440
|
+
args[i] = arg[0][0];
|
|
19441
|
+
}
|
|
19442
|
+
}
|
|
19443
|
+
return computeFunction.apply(this, args);
|
|
19444
|
+
}
|
|
19445
|
+
return computeWithInputHandling;
|
|
19446
|
+
}
|
|
19428
19447
|
function createComputeFunctionFromDescription(descr) {
|
|
19429
19448
|
const computeValueAndFormat = "computeValueAndFormat" in descr;
|
|
19430
19449
|
const computeValue = "compute" in descr;
|
|
@@ -19675,14 +19694,19 @@ const categorieFunctionAll = {
|
|
|
19675
19694
|
children: [allFunctionListMenuBuilder],
|
|
19676
19695
|
};
|
|
19677
19696
|
function allFunctionListMenuBuilder() {
|
|
19678
|
-
const fnNames = functionRegistry.getKeys();
|
|
19697
|
+
const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
|
|
19679
19698
|
return createFormulaFunctions(fnNames);
|
|
19680
19699
|
}
|
|
19681
19700
|
const categoriesFunctionListMenuBuilder = () => {
|
|
19682
19701
|
const functions = functionRegistry.content;
|
|
19683
|
-
const categories = [
|
|
19702
|
+
const categories = [
|
|
19703
|
+
...new Set(functionRegistry
|
|
19704
|
+
.getAll()
|
|
19705
|
+
.filter((fn) => !fn.hidden)
|
|
19706
|
+
.map((fn) => fn.category)),
|
|
19707
|
+
].filter(isDefined$1);
|
|
19684
19708
|
return categories.sort().map((category, i) => {
|
|
19685
|
-
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
|
|
19709
|
+
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
|
|
19686
19710
|
return {
|
|
19687
19711
|
name: category,
|
|
19688
19712
|
children: createFormulaFunctions(functionsInCategory),
|
|
@@ -23335,11 +23359,9 @@ css /* scss */ `
|
|
|
23335
23359
|
}
|
|
23336
23360
|
.o-cell-is-operator {
|
|
23337
23361
|
margin-bottom: 5px;
|
|
23338
|
-
width: 96%;
|
|
23339
23362
|
}
|
|
23340
23363
|
.o-cell-is-value {
|
|
23341
23364
|
margin-bottom: 5px;
|
|
23342
|
-
width: 96%;
|
|
23343
23365
|
}
|
|
23344
23366
|
.o-color-picker-widget .o-color-picker-button {
|
|
23345
23367
|
pointer-events: all;
|
|
@@ -25705,6 +25727,9 @@ class FigureComponent extends Component {
|
|
|
25705
25727
|
el?.focus({ preventScroll: true });
|
|
25706
25728
|
}
|
|
25707
25729
|
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
|
25730
|
+
onWillUnmount(() => {
|
|
25731
|
+
this.props.onFigureDeleted();
|
|
25732
|
+
});
|
|
25708
25733
|
}
|
|
25709
25734
|
clickAnchor(dirX, dirY, ev) {
|
|
25710
25735
|
this.props.onClickAnchor(dirX, dirY, ev);
|
|
@@ -25723,6 +25748,7 @@ class FigureComponent extends Component {
|
|
|
25723
25748
|
this.props.onFigureDeleted();
|
|
25724
25749
|
ev.stopPropagation();
|
|
25725
25750
|
ev.preventDefault();
|
|
25751
|
+
ev.stopPropagation();
|
|
25726
25752
|
break;
|
|
25727
25753
|
case "ArrowDown":
|
|
25728
25754
|
case "ArrowLeft":
|
|
@@ -25743,6 +25769,7 @@ class FigureComponent extends Component {
|
|
|
25743
25769
|
});
|
|
25744
25770
|
ev.stopPropagation();
|
|
25745
25771
|
ev.preventDefault();
|
|
25772
|
+
ev.stopPropagation();
|
|
25746
25773
|
break;
|
|
25747
25774
|
}
|
|
25748
25775
|
}
|
|
@@ -26424,6 +26451,7 @@ function compareContentToSpanElement(content, node) {
|
|
|
26424
26451
|
// -----------------------------------------------------------------------------
|
|
26425
26452
|
css /* scss */ `
|
|
26426
26453
|
.o-formula-assistant {
|
|
26454
|
+
background: #ffffff;
|
|
26427
26455
|
.o-formula-assistant-head {
|
|
26428
26456
|
background-color: #f2f2f2;
|
|
26429
26457
|
padding: 10px;
|
|
@@ -26474,6 +26502,9 @@ class FunctionDescriptionProvider extends Component {
|
|
|
26474
26502
|
this.assistantState.allowCellSelectionBehind = false;
|
|
26475
26503
|
}, 2000);
|
|
26476
26504
|
}
|
|
26505
|
+
get formulaArgSeparator() {
|
|
26506
|
+
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
|
|
26507
|
+
}
|
|
26477
26508
|
}
|
|
26478
26509
|
FunctionDescriptionProvider.props = {
|
|
26479
26510
|
functionName: String,
|
|
@@ -26625,6 +26656,12 @@ class Composer extends Component {
|
|
|
26625
26656
|
useEffect(() => {
|
|
26626
26657
|
this.processContent();
|
|
26627
26658
|
});
|
|
26659
|
+
onPatched(() => {
|
|
26660
|
+
// Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
|
|
26661
|
+
if (this.env.model.getters.getEditionMode() === "inactive") {
|
|
26662
|
+
this.processTokenAtCursor();
|
|
26663
|
+
}
|
|
26664
|
+
});
|
|
26628
26665
|
}
|
|
26629
26666
|
// ---------------------------------------------------------------------------
|
|
26630
26667
|
// Handlers
|
|
@@ -41585,7 +41622,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
41585
41622
|
? getItemId(newFormat, data.formats)
|
|
41586
41623
|
: exportedCellData.format;
|
|
41587
41624
|
let content;
|
|
41588
|
-
if (formulaCell instanceof FormulaCellWithDependencies) {
|
|
41625
|
+
if (isFormula && formulaCell instanceof FormulaCellWithDependencies) {
|
|
41589
41626
|
content = this.getters.getFormulaCellContent(exportedSheetData.id, formulaCell.compiledFormula, formulaCell.compiledFormula.dependencies, true);
|
|
41590
41627
|
}
|
|
41591
41628
|
else {
|
|
@@ -49295,6 +49332,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
49295
49332
|
this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
|
|
49296
49333
|
this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
|
|
49297
49334
|
this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
|
|
49335
|
+
this.selectedFigureId = null;
|
|
49298
49336
|
break;
|
|
49299
49337
|
}
|
|
49300
49338
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
@@ -52872,9 +52910,6 @@ css /* scss */ `
|
|
|
52872
52910
|
.text-muted {
|
|
52873
52911
|
color: grey !important;
|
|
52874
52912
|
}
|
|
52875
|
-
button {
|
|
52876
|
-
color: #333;
|
|
52877
|
-
}
|
|
52878
52913
|
.o-disabled {
|
|
52879
52914
|
opacity: 0.4;
|
|
52880
52915
|
pointer: default;
|
|
@@ -52995,17 +53030,17 @@ css /* scss */ `
|
|
|
52995
53030
|
}
|
|
52996
53031
|
|
|
52997
53032
|
.o-button {
|
|
52998
|
-
border: 1px solid
|
|
53033
|
+
border: 1px solid;
|
|
52999
53034
|
padding: 0px 20px 0px 20px;
|
|
53000
53035
|
border-radius: 4px;
|
|
53001
53036
|
font-weight: 500;
|
|
53002
53037
|
font-size: 14px;
|
|
53003
53038
|
height: 30px;
|
|
53004
53039
|
line-height: 16px;
|
|
53005
|
-
background: white;
|
|
53006
53040
|
margin-right: 8px;
|
|
53007
|
-
|
|
53008
|
-
|
|
53041
|
+
|
|
53042
|
+
&:not(:hover) {
|
|
53043
|
+
background-color: transparent;
|
|
53009
53044
|
}
|
|
53010
53045
|
|
|
53011
53046
|
&:enabled {
|
|
@@ -53019,6 +53054,15 @@ css /* scss */ `
|
|
|
53019
53054
|
&:last-child {
|
|
53020
53055
|
margin-right: 0px;
|
|
53021
53056
|
}
|
|
53057
|
+
|
|
53058
|
+
&.o-button-grey {
|
|
53059
|
+
border-color: lightgrey;
|
|
53060
|
+
background: #ffffff;
|
|
53061
|
+
color: #333;
|
|
53062
|
+
&:hover:enabled {
|
|
53063
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
53064
|
+
}
|
|
53065
|
+
}
|
|
53022
53066
|
}
|
|
53023
53067
|
|
|
53024
53068
|
.o-input {
|
|
@@ -56931,6 +56975,6 @@ const constants = {
|
|
|
56931
56975
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
56932
56976
|
|
|
56933
56977
|
|
|
56934
|
-
__info__.version = "17.0.
|
|
56935
|
-
__info__.date = "2024-03-
|
|
56936
|
-
__info__.hash = "
|
|
56978
|
+
__info__.version = "17.0.16";
|
|
56979
|
+
__info__.date = "2024-03-25T09:42:01.717Z";
|
|
56980
|
+
__info__.hash = "9b128f8";
|
|
@@ -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 17.0.
|
|
6
|
-
* @date 2024-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.16
|
|
6
|
+
* @date 2024-03-25T09:42:01.717Z
|
|
7
|
+
* @hash 9b128f8
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -11056,6 +11056,9 @@
|
|
|
11056
11056
|
result.default = true;
|
|
11057
11057
|
result.defaultValue = defaultValue;
|
|
11058
11058
|
}
|
|
11059
|
+
if (types.some((t) => t.startsWith("RANGE"))) {
|
|
11060
|
+
result.acceptMatrix = true;
|
|
11061
|
+
}
|
|
11059
11062
|
return result;
|
|
11060
11063
|
}
|
|
11061
11064
|
/**
|
|
@@ -19421,11 +19424,27 @@
|
|
|
19421
19424
|
}
|
|
19422
19425
|
const descr = addMetaInfoFromArg(addDescr);
|
|
19423
19426
|
validateArguments(descr.args);
|
|
19424
|
-
this.mapping[name] = createComputeFunctionFromDescription(descr);
|
|
19427
|
+
this.mapping[name] = addInputHandling(descr, createComputeFunctionFromDescription(descr));
|
|
19425
19428
|
super.add(name, descr);
|
|
19426
19429
|
return this;
|
|
19427
19430
|
}
|
|
19428
19431
|
}
|
|
19432
|
+
function addInputHandling(descr, computeFunction) {
|
|
19433
|
+
function computeWithInputHandling(...args) {
|
|
19434
|
+
for (let i = 0; i < args.length; i++) {
|
|
19435
|
+
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
|
19436
|
+
const arg = args[i];
|
|
19437
|
+
if (isMatrix(arg) && !argDefinition.acceptMatrix) {
|
|
19438
|
+
if (arg.length !== 1 || arg[0].length !== 1) {
|
|
19439
|
+
throw new EvaluationError(CellErrorType.GenericError, _t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be a single value or a single cell reference, not a range.", argDefinition.name));
|
|
19440
|
+
}
|
|
19441
|
+
args[i] = arg[0][0];
|
|
19442
|
+
}
|
|
19443
|
+
}
|
|
19444
|
+
return computeFunction.apply(this, args);
|
|
19445
|
+
}
|
|
19446
|
+
return computeWithInputHandling;
|
|
19447
|
+
}
|
|
19429
19448
|
function createComputeFunctionFromDescription(descr) {
|
|
19430
19449
|
const computeValueAndFormat = "computeValueAndFormat" in descr;
|
|
19431
19450
|
const computeValue = "compute" in descr;
|
|
@@ -19676,14 +19695,19 @@
|
|
|
19676
19695
|
children: [allFunctionListMenuBuilder],
|
|
19677
19696
|
};
|
|
19678
19697
|
function allFunctionListMenuBuilder() {
|
|
19679
|
-
const fnNames = functionRegistry.getKeys();
|
|
19698
|
+
const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
|
|
19680
19699
|
return createFormulaFunctions(fnNames);
|
|
19681
19700
|
}
|
|
19682
19701
|
const categoriesFunctionListMenuBuilder = () => {
|
|
19683
19702
|
const functions = functionRegistry.content;
|
|
19684
|
-
const categories = [
|
|
19703
|
+
const categories = [
|
|
19704
|
+
...new Set(functionRegistry
|
|
19705
|
+
.getAll()
|
|
19706
|
+
.filter((fn) => !fn.hidden)
|
|
19707
|
+
.map((fn) => fn.category)),
|
|
19708
|
+
].filter(isDefined$1);
|
|
19685
19709
|
return categories.sort().map((category, i) => {
|
|
19686
|
-
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
|
|
19710
|
+
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
|
|
19687
19711
|
return {
|
|
19688
19712
|
name: category,
|
|
19689
19713
|
children: createFormulaFunctions(functionsInCategory),
|
|
@@ -23336,11 +23360,9 @@
|
|
|
23336
23360
|
}
|
|
23337
23361
|
.o-cell-is-operator {
|
|
23338
23362
|
margin-bottom: 5px;
|
|
23339
|
-
width: 96%;
|
|
23340
23363
|
}
|
|
23341
23364
|
.o-cell-is-value {
|
|
23342
23365
|
margin-bottom: 5px;
|
|
23343
|
-
width: 96%;
|
|
23344
23366
|
}
|
|
23345
23367
|
.o-color-picker-widget .o-color-picker-button {
|
|
23346
23368
|
pointer-events: all;
|
|
@@ -25706,6 +25728,9 @@
|
|
|
25706
25728
|
el?.focus({ preventScroll: true });
|
|
25707
25729
|
}
|
|
25708
25730
|
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
|
25731
|
+
owl.onWillUnmount(() => {
|
|
25732
|
+
this.props.onFigureDeleted();
|
|
25733
|
+
});
|
|
25709
25734
|
}
|
|
25710
25735
|
clickAnchor(dirX, dirY, ev) {
|
|
25711
25736
|
this.props.onClickAnchor(dirX, dirY, ev);
|
|
@@ -25724,6 +25749,7 @@
|
|
|
25724
25749
|
this.props.onFigureDeleted();
|
|
25725
25750
|
ev.stopPropagation();
|
|
25726
25751
|
ev.preventDefault();
|
|
25752
|
+
ev.stopPropagation();
|
|
25727
25753
|
break;
|
|
25728
25754
|
case "ArrowDown":
|
|
25729
25755
|
case "ArrowLeft":
|
|
@@ -25744,6 +25770,7 @@
|
|
|
25744
25770
|
});
|
|
25745
25771
|
ev.stopPropagation();
|
|
25746
25772
|
ev.preventDefault();
|
|
25773
|
+
ev.stopPropagation();
|
|
25747
25774
|
break;
|
|
25748
25775
|
}
|
|
25749
25776
|
}
|
|
@@ -26425,6 +26452,7 @@
|
|
|
26425
26452
|
// -----------------------------------------------------------------------------
|
|
26426
26453
|
css /* scss */ `
|
|
26427
26454
|
.o-formula-assistant {
|
|
26455
|
+
background: #ffffff;
|
|
26428
26456
|
.o-formula-assistant-head {
|
|
26429
26457
|
background-color: #f2f2f2;
|
|
26430
26458
|
padding: 10px;
|
|
@@ -26475,6 +26503,9 @@
|
|
|
26475
26503
|
this.assistantState.allowCellSelectionBehind = false;
|
|
26476
26504
|
}, 2000);
|
|
26477
26505
|
}
|
|
26506
|
+
get formulaArgSeparator() {
|
|
26507
|
+
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
|
|
26508
|
+
}
|
|
26478
26509
|
}
|
|
26479
26510
|
FunctionDescriptionProvider.props = {
|
|
26480
26511
|
functionName: String,
|
|
@@ -26626,6 +26657,12 @@
|
|
|
26626
26657
|
owl.useEffect(() => {
|
|
26627
26658
|
this.processContent();
|
|
26628
26659
|
});
|
|
26660
|
+
owl.onPatched(() => {
|
|
26661
|
+
// Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
|
|
26662
|
+
if (this.env.model.getters.getEditionMode() === "inactive") {
|
|
26663
|
+
this.processTokenAtCursor();
|
|
26664
|
+
}
|
|
26665
|
+
});
|
|
26629
26666
|
}
|
|
26630
26667
|
// ---------------------------------------------------------------------------
|
|
26631
26668
|
// Handlers
|
|
@@ -41586,7 +41623,7 @@
|
|
|
41586
41623
|
? getItemId(newFormat, data.formats)
|
|
41587
41624
|
: exportedCellData.format;
|
|
41588
41625
|
let content;
|
|
41589
|
-
if (formulaCell instanceof FormulaCellWithDependencies) {
|
|
41626
|
+
if (isFormula && formulaCell instanceof FormulaCellWithDependencies) {
|
|
41590
41627
|
content = this.getters.getFormulaCellContent(exportedSheetData.id, formulaCell.compiledFormula, formulaCell.compiledFormula.dependencies, true);
|
|
41591
41628
|
}
|
|
41592
41629
|
else {
|
|
@@ -49296,6 +49333,7 @@
|
|
|
49296
49333
|
this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
|
|
49297
49334
|
this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
|
|
49298
49335
|
this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
|
|
49336
|
+
this.selectedFigureId = null;
|
|
49299
49337
|
break;
|
|
49300
49338
|
}
|
|
49301
49339
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
@@ -52873,9 +52911,6 @@
|
|
|
52873
52911
|
.text-muted {
|
|
52874
52912
|
color: grey !important;
|
|
52875
52913
|
}
|
|
52876
|
-
button {
|
|
52877
|
-
color: #333;
|
|
52878
|
-
}
|
|
52879
52914
|
.o-disabled {
|
|
52880
52915
|
opacity: 0.4;
|
|
52881
52916
|
pointer: default;
|
|
@@ -52996,17 +53031,17 @@
|
|
|
52996
53031
|
}
|
|
52997
53032
|
|
|
52998
53033
|
.o-button {
|
|
52999
|
-
border: 1px solid
|
|
53034
|
+
border: 1px solid;
|
|
53000
53035
|
padding: 0px 20px 0px 20px;
|
|
53001
53036
|
border-radius: 4px;
|
|
53002
53037
|
font-weight: 500;
|
|
53003
53038
|
font-size: 14px;
|
|
53004
53039
|
height: 30px;
|
|
53005
53040
|
line-height: 16px;
|
|
53006
|
-
background: white;
|
|
53007
53041
|
margin-right: 8px;
|
|
53008
|
-
|
|
53009
|
-
|
|
53042
|
+
|
|
53043
|
+
&:not(:hover) {
|
|
53044
|
+
background-color: transparent;
|
|
53010
53045
|
}
|
|
53011
53046
|
|
|
53012
53047
|
&:enabled {
|
|
@@ -53020,6 +53055,15 @@
|
|
|
53020
53055
|
&:last-child {
|
|
53021
53056
|
margin-right: 0px;
|
|
53022
53057
|
}
|
|
53058
|
+
|
|
53059
|
+
&.o-button-grey {
|
|
53060
|
+
border-color: lightgrey;
|
|
53061
|
+
background: #ffffff;
|
|
53062
|
+
color: #333;
|
|
53063
|
+
&:hover:enabled {
|
|
53064
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
53065
|
+
}
|
|
53066
|
+
}
|
|
53023
53067
|
}
|
|
53024
53068
|
|
|
53025
53069
|
.o-input {
|
|
@@ -56967,9 +57011,9 @@
|
|
|
56967
57011
|
exports.tokenize = tokenize;
|
|
56968
57012
|
|
|
56969
57013
|
|
|
56970
|
-
__info__.version = "17.0.
|
|
56971
|
-
__info__.date = "2024-03-
|
|
56972
|
-
__info__.hash = "
|
|
57014
|
+
__info__.version = "17.0.16";
|
|
57015
|
+
__info__.date = "2024-03-25T09:42:01.717Z";
|
|
57016
|
+
__info__.hash = "9b128f8";
|
|
56973
57017
|
|
|
56974
57018
|
|
|
56975
57019
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|