@odoo/o-spreadsheet 17.1.8 → 17.1.9
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 +63 -19
- package/dist/o-spreadsheet.d.ts +3 -1
- package/dist/o-spreadsheet.esm.js +63 -19
- package/dist/o-spreadsheet.iife.js +63 -19
- package/dist/o-spreadsheet.iife.min.js +20 -15
- package/dist/o_spreadsheet.xml +32 -20
- package/package.json +2 -2
|
@@ -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.1.
|
|
6
|
-
* @date 2024-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.9
|
|
6
|
+
* @date 2024-03-25T09:43:27.017Z
|
|
7
|
+
* @hash 5fb076e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -11129,6 +11129,9 @@ function makeArg(str, description) {
|
|
|
11129
11129
|
result.default = true;
|
|
11130
11130
|
result.defaultValue = defaultValue;
|
|
11131
11131
|
}
|
|
11132
|
+
if (types.some((t) => t.startsWith("RANGE"))) {
|
|
11133
|
+
result.acceptMatrix = true;
|
|
11134
|
+
}
|
|
11132
11135
|
return result;
|
|
11133
11136
|
}
|
|
11134
11137
|
/**
|
|
@@ -19724,11 +19727,27 @@ class FunctionRegistry extends Registry {
|
|
|
19724
19727
|
}
|
|
19725
19728
|
const descr = addMetaInfoFromArg(addDescr);
|
|
19726
19729
|
validateArguments(descr.args);
|
|
19727
|
-
this.mapping[name] = addErrorHandling(addResultHandling(descr
|
|
19730
|
+
this.mapping[name] = addErrorHandling(addResultHandling(addInputHandling(descr)), name);
|
|
19728
19731
|
super.add(name, descr);
|
|
19729
19732
|
return this;
|
|
19730
19733
|
}
|
|
19731
19734
|
}
|
|
19735
|
+
function addInputHandling(descr) {
|
|
19736
|
+
function computeWithInputHandling(...args) {
|
|
19737
|
+
for (let i = 0; i < args.length; i++) {
|
|
19738
|
+
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
|
19739
|
+
const arg = args[i];
|
|
19740
|
+
if (isMatrix(arg) && !argDefinition.acceptMatrix) {
|
|
19741
|
+
if (arg.length !== 1 || arg[0].length !== 1) {
|
|
19742
|
+
throw new EvaluationError(_t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be a single value or a single cell reference, not a range.", argDefinition.name));
|
|
19743
|
+
}
|
|
19744
|
+
args[i] = arg[0][0];
|
|
19745
|
+
}
|
|
19746
|
+
}
|
|
19747
|
+
return descr.compute.apply(this, args);
|
|
19748
|
+
}
|
|
19749
|
+
return computeWithInputHandling;
|
|
19750
|
+
}
|
|
19732
19751
|
function addErrorHandling(compute, functionName) {
|
|
19733
19752
|
return function (...args) {
|
|
19734
19753
|
try {
|
|
@@ -19979,14 +19998,19 @@ const categorieFunctionAll = {
|
|
|
19979
19998
|
children: [allFunctionListMenuBuilder],
|
|
19980
19999
|
};
|
|
19981
20000
|
function allFunctionListMenuBuilder() {
|
|
19982
|
-
const fnNames = functionRegistry.getKeys();
|
|
20001
|
+
const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
|
|
19983
20002
|
return createFormulaFunctions(fnNames);
|
|
19984
20003
|
}
|
|
19985
20004
|
const categoriesFunctionListMenuBuilder = () => {
|
|
19986
20005
|
const functions = functionRegistry.content;
|
|
19987
|
-
const categories = [
|
|
20006
|
+
const categories = [
|
|
20007
|
+
...new Set(functionRegistry
|
|
20008
|
+
.getAll()
|
|
20009
|
+
.filter((fn) => !fn.hidden)
|
|
20010
|
+
.map((fn) => fn.category)),
|
|
20011
|
+
].filter(isDefined$1);
|
|
19988
20012
|
return categories.sort().map((category, i) => {
|
|
19989
|
-
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
|
|
20013
|
+
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
|
|
19990
20014
|
return {
|
|
19991
20015
|
name: category,
|
|
19992
20016
|
children: createFormulaFunctions(functionsInCategory),
|
|
@@ -23775,11 +23799,9 @@ css /* scss */ `
|
|
|
23775
23799
|
}
|
|
23776
23800
|
.o-cell-is-operator {
|
|
23777
23801
|
margin-bottom: 5px;
|
|
23778
|
-
width: 96%;
|
|
23779
23802
|
}
|
|
23780
23803
|
.o-cell-is-value {
|
|
23781
23804
|
margin-bottom: 5px;
|
|
23782
|
-
width: 96%;
|
|
23783
23805
|
}
|
|
23784
23806
|
.o-color-picker-widget .o-color-picker-button {
|
|
23785
23807
|
pointer-events: all;
|
|
@@ -26199,6 +26221,9 @@ class FigureComponent extends owl.Component {
|
|
|
26199
26221
|
el?.focus({ preventScroll: true });
|
|
26200
26222
|
}
|
|
26201
26223
|
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
|
26224
|
+
owl.onWillUnmount(() => {
|
|
26225
|
+
this.props.onFigureDeleted();
|
|
26226
|
+
});
|
|
26202
26227
|
}
|
|
26203
26228
|
clickAnchor(dirX, dirY, ev) {
|
|
26204
26229
|
this.props.onClickAnchor(dirX, dirY, ev);
|
|
@@ -26217,6 +26242,7 @@ class FigureComponent extends owl.Component {
|
|
|
26217
26242
|
this.props.onFigureDeleted();
|
|
26218
26243
|
ev.stopPropagation();
|
|
26219
26244
|
ev.preventDefault();
|
|
26245
|
+
ev.stopPropagation();
|
|
26220
26246
|
break;
|
|
26221
26247
|
case "ArrowDown":
|
|
26222
26248
|
case "ArrowLeft":
|
|
@@ -26237,6 +26263,7 @@ class FigureComponent extends owl.Component {
|
|
|
26237
26263
|
});
|
|
26238
26264
|
ev.stopPropagation();
|
|
26239
26265
|
ev.preventDefault();
|
|
26266
|
+
ev.stopPropagation();
|
|
26240
26267
|
break;
|
|
26241
26268
|
}
|
|
26242
26269
|
}
|
|
@@ -26911,6 +26938,7 @@ function compareContentToSpanElement(content, node) {
|
|
|
26911
26938
|
// -----------------------------------------------------------------------------
|
|
26912
26939
|
css /* scss */ `
|
|
26913
26940
|
.o-formula-assistant {
|
|
26941
|
+
background: #ffffff;
|
|
26914
26942
|
.o-formula-assistant-head {
|
|
26915
26943
|
background-color: #f2f2f2;
|
|
26916
26944
|
padding: 10px;
|
|
@@ -26966,6 +26994,9 @@ class FunctionDescriptionProvider extends owl.Component {
|
|
|
26966
26994
|
this.assistantState.allowCellSelectionBehind = false;
|
|
26967
26995
|
}, 2000);
|
|
26968
26996
|
}
|
|
26997
|
+
get formulaArgSeparator() {
|
|
26998
|
+
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
|
|
26999
|
+
}
|
|
26969
27000
|
}
|
|
26970
27001
|
|
|
26971
27002
|
const functions$2 = functionRegistry.content;
|
|
@@ -27123,6 +27154,12 @@ class Composer extends owl.Component {
|
|
|
27123
27154
|
owl.useEffect(() => {
|
|
27124
27155
|
this.processContent();
|
|
27125
27156
|
});
|
|
27157
|
+
owl.onPatched(() => {
|
|
27158
|
+
// Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
|
|
27159
|
+
if (this.env.model.getters.getEditionMode() === "inactive") {
|
|
27160
|
+
this.processTokenAtCursor();
|
|
27161
|
+
}
|
|
27162
|
+
});
|
|
27126
27163
|
}
|
|
27127
27164
|
// ---------------------------------------------------------------------------
|
|
27128
27165
|
// Handlers
|
|
@@ -49686,6 +49723,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
49686
49723
|
this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
|
|
49687
49724
|
this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
|
|
49688
49725
|
this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
|
|
49726
|
+
this.selectedFigureId = null;
|
|
49689
49727
|
break;
|
|
49690
49728
|
}
|
|
49691
49729
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
@@ -53226,9 +53264,6 @@ css /* scss */ `
|
|
|
53226
53264
|
.text-muted {
|
|
53227
53265
|
color: grey !important;
|
|
53228
53266
|
}
|
|
53229
|
-
button {
|
|
53230
|
-
color: #333;
|
|
53231
|
-
}
|
|
53232
53267
|
.o-disabled {
|
|
53233
53268
|
opacity: 0.4;
|
|
53234
53269
|
pointer: default;
|
|
@@ -53349,17 +53384,17 @@ css /* scss */ `
|
|
|
53349
53384
|
}
|
|
53350
53385
|
|
|
53351
53386
|
.o-button {
|
|
53352
|
-
border: 1px solid
|
|
53387
|
+
border: 1px solid;
|
|
53353
53388
|
padding: 0px 20px 0px 20px;
|
|
53354
53389
|
border-radius: 4px;
|
|
53355
53390
|
font-weight: 500;
|
|
53356
53391
|
font-size: 14px;
|
|
53357
53392
|
height: 30px;
|
|
53358
53393
|
line-height: 16px;
|
|
53359
|
-
background: white;
|
|
53360
53394
|
margin-right: 8px;
|
|
53361
|
-
|
|
53362
|
-
|
|
53395
|
+
|
|
53396
|
+
&:not(:hover) {
|
|
53397
|
+
background-color: transparent;
|
|
53363
53398
|
}
|
|
53364
53399
|
|
|
53365
53400
|
&:enabled {
|
|
@@ -53373,6 +53408,15 @@ css /* scss */ `
|
|
|
53373
53408
|
&:last-child {
|
|
53374
53409
|
margin-right: 0px;
|
|
53375
53410
|
}
|
|
53411
|
+
|
|
53412
|
+
&.o-button-grey {
|
|
53413
|
+
border-color: lightgrey;
|
|
53414
|
+
background: #ffffff;
|
|
53415
|
+
color: #333;
|
|
53416
|
+
&:hover:enabled {
|
|
53417
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
53418
|
+
}
|
|
53419
|
+
}
|
|
53376
53420
|
}
|
|
53377
53421
|
|
|
53378
53422
|
.o-input {
|
|
@@ -57288,6 +57332,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
57288
57332
|
exports.tokenize = tokenize;
|
|
57289
57333
|
|
|
57290
57334
|
|
|
57291
|
-
__info__.version = "17.1.
|
|
57292
|
-
__info__.date = "2024-03-
|
|
57293
|
-
__info__.hash = "
|
|
57335
|
+
__info__.version = "17.1.9";
|
|
57336
|
+
__info__.date = "2024-03-25T09:43:27.017Z";
|
|
57337
|
+
__info__.hash = "5fb076e";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -5204,6 +5204,7 @@ type Getters = {
|
|
|
5204
5204
|
|
|
5205
5205
|
type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
|
|
5206
5206
|
interface ArgDefinition {
|
|
5207
|
+
acceptMatrix?: boolean;
|
|
5207
5208
|
repeating?: boolean;
|
|
5208
5209
|
optional?: boolean;
|
|
5209
5210
|
description: string;
|
|
@@ -7806,7 +7807,7 @@ interface Props$a {
|
|
|
7806
7807
|
interface AssistantState {
|
|
7807
7808
|
allowCellSelectionBehind: boolean;
|
|
7808
7809
|
}
|
|
7809
|
-
declare class FunctionDescriptionProvider extends Component<Props$a> {
|
|
7810
|
+
declare class FunctionDescriptionProvider extends Component<Props$a, SpreadsheetChildEnv> {
|
|
7810
7811
|
static template: string;
|
|
7811
7812
|
static props: {
|
|
7812
7813
|
functionName: StringConstructor;
|
|
@@ -7818,6 +7819,7 @@ declare class FunctionDescriptionProvider extends Component<Props$a> {
|
|
|
7818
7819
|
setup(): void;
|
|
7819
7820
|
getContext(): Props$a;
|
|
7820
7821
|
onMouseMove(): void;
|
|
7822
|
+
get formulaArgSeparator(): string;
|
|
7821
7823
|
}
|
|
7822
7824
|
|
|
7823
7825
|
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.1.
|
|
6
|
-
* @date 2024-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.9
|
|
6
|
+
* @date 2024-03-25T09:43:27.017Z
|
|
7
|
+
* @hash 5fb076e
|
|
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';
|
|
@@ -11127,6 +11127,9 @@ function makeArg(str, description) {
|
|
|
11127
11127
|
result.default = true;
|
|
11128
11128
|
result.defaultValue = defaultValue;
|
|
11129
11129
|
}
|
|
11130
|
+
if (types.some((t) => t.startsWith("RANGE"))) {
|
|
11131
|
+
result.acceptMatrix = true;
|
|
11132
|
+
}
|
|
11130
11133
|
return result;
|
|
11131
11134
|
}
|
|
11132
11135
|
/**
|
|
@@ -19722,11 +19725,27 @@ class FunctionRegistry extends Registry {
|
|
|
19722
19725
|
}
|
|
19723
19726
|
const descr = addMetaInfoFromArg(addDescr);
|
|
19724
19727
|
validateArguments(descr.args);
|
|
19725
|
-
this.mapping[name] = addErrorHandling(addResultHandling(descr
|
|
19728
|
+
this.mapping[name] = addErrorHandling(addResultHandling(addInputHandling(descr)), name);
|
|
19726
19729
|
super.add(name, descr);
|
|
19727
19730
|
return this;
|
|
19728
19731
|
}
|
|
19729
19732
|
}
|
|
19733
|
+
function addInputHandling(descr) {
|
|
19734
|
+
function computeWithInputHandling(...args) {
|
|
19735
|
+
for (let i = 0; i < args.length; i++) {
|
|
19736
|
+
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
|
19737
|
+
const arg = args[i];
|
|
19738
|
+
if (isMatrix(arg) && !argDefinition.acceptMatrix) {
|
|
19739
|
+
if (arg.length !== 1 || arg[0].length !== 1) {
|
|
19740
|
+
throw new EvaluationError(_t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be a single value or a single cell reference, not a range.", argDefinition.name));
|
|
19741
|
+
}
|
|
19742
|
+
args[i] = arg[0][0];
|
|
19743
|
+
}
|
|
19744
|
+
}
|
|
19745
|
+
return descr.compute.apply(this, args);
|
|
19746
|
+
}
|
|
19747
|
+
return computeWithInputHandling;
|
|
19748
|
+
}
|
|
19730
19749
|
function addErrorHandling(compute, functionName) {
|
|
19731
19750
|
return function (...args) {
|
|
19732
19751
|
try {
|
|
@@ -19977,14 +19996,19 @@ const categorieFunctionAll = {
|
|
|
19977
19996
|
children: [allFunctionListMenuBuilder],
|
|
19978
19997
|
};
|
|
19979
19998
|
function allFunctionListMenuBuilder() {
|
|
19980
|
-
const fnNames = functionRegistry.getKeys();
|
|
19999
|
+
const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
|
|
19981
20000
|
return createFormulaFunctions(fnNames);
|
|
19982
20001
|
}
|
|
19983
20002
|
const categoriesFunctionListMenuBuilder = () => {
|
|
19984
20003
|
const functions = functionRegistry.content;
|
|
19985
|
-
const categories = [
|
|
20004
|
+
const categories = [
|
|
20005
|
+
...new Set(functionRegistry
|
|
20006
|
+
.getAll()
|
|
20007
|
+
.filter((fn) => !fn.hidden)
|
|
20008
|
+
.map((fn) => fn.category)),
|
|
20009
|
+
].filter(isDefined$1);
|
|
19986
20010
|
return categories.sort().map((category, i) => {
|
|
19987
|
-
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
|
|
20011
|
+
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
|
|
19988
20012
|
return {
|
|
19989
20013
|
name: category,
|
|
19990
20014
|
children: createFormulaFunctions(functionsInCategory),
|
|
@@ -23773,11 +23797,9 @@ css /* scss */ `
|
|
|
23773
23797
|
}
|
|
23774
23798
|
.o-cell-is-operator {
|
|
23775
23799
|
margin-bottom: 5px;
|
|
23776
|
-
width: 96%;
|
|
23777
23800
|
}
|
|
23778
23801
|
.o-cell-is-value {
|
|
23779
23802
|
margin-bottom: 5px;
|
|
23780
|
-
width: 96%;
|
|
23781
23803
|
}
|
|
23782
23804
|
.o-color-picker-widget .o-color-picker-button {
|
|
23783
23805
|
pointer-events: all;
|
|
@@ -26197,6 +26219,9 @@ class FigureComponent extends Component {
|
|
|
26197
26219
|
el?.focus({ preventScroll: true });
|
|
26198
26220
|
}
|
|
26199
26221
|
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
|
26222
|
+
onWillUnmount(() => {
|
|
26223
|
+
this.props.onFigureDeleted();
|
|
26224
|
+
});
|
|
26200
26225
|
}
|
|
26201
26226
|
clickAnchor(dirX, dirY, ev) {
|
|
26202
26227
|
this.props.onClickAnchor(dirX, dirY, ev);
|
|
@@ -26215,6 +26240,7 @@ class FigureComponent extends Component {
|
|
|
26215
26240
|
this.props.onFigureDeleted();
|
|
26216
26241
|
ev.stopPropagation();
|
|
26217
26242
|
ev.preventDefault();
|
|
26243
|
+
ev.stopPropagation();
|
|
26218
26244
|
break;
|
|
26219
26245
|
case "ArrowDown":
|
|
26220
26246
|
case "ArrowLeft":
|
|
@@ -26235,6 +26261,7 @@ class FigureComponent extends Component {
|
|
|
26235
26261
|
});
|
|
26236
26262
|
ev.stopPropagation();
|
|
26237
26263
|
ev.preventDefault();
|
|
26264
|
+
ev.stopPropagation();
|
|
26238
26265
|
break;
|
|
26239
26266
|
}
|
|
26240
26267
|
}
|
|
@@ -26909,6 +26936,7 @@ function compareContentToSpanElement(content, node) {
|
|
|
26909
26936
|
// -----------------------------------------------------------------------------
|
|
26910
26937
|
css /* scss */ `
|
|
26911
26938
|
.o-formula-assistant {
|
|
26939
|
+
background: #ffffff;
|
|
26912
26940
|
.o-formula-assistant-head {
|
|
26913
26941
|
background-color: #f2f2f2;
|
|
26914
26942
|
padding: 10px;
|
|
@@ -26964,6 +26992,9 @@ class FunctionDescriptionProvider extends Component {
|
|
|
26964
26992
|
this.assistantState.allowCellSelectionBehind = false;
|
|
26965
26993
|
}, 2000);
|
|
26966
26994
|
}
|
|
26995
|
+
get formulaArgSeparator() {
|
|
26996
|
+
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
|
|
26997
|
+
}
|
|
26967
26998
|
}
|
|
26968
26999
|
|
|
26969
27000
|
const functions$2 = functionRegistry.content;
|
|
@@ -27121,6 +27152,12 @@ class Composer extends Component {
|
|
|
27121
27152
|
useEffect(() => {
|
|
27122
27153
|
this.processContent();
|
|
27123
27154
|
});
|
|
27155
|
+
onPatched(() => {
|
|
27156
|
+
// Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
|
|
27157
|
+
if (this.env.model.getters.getEditionMode() === "inactive") {
|
|
27158
|
+
this.processTokenAtCursor();
|
|
27159
|
+
}
|
|
27160
|
+
});
|
|
27124
27161
|
}
|
|
27125
27162
|
// ---------------------------------------------------------------------------
|
|
27126
27163
|
// Handlers
|
|
@@ -49684,6 +49721,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
49684
49721
|
this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
|
|
49685
49722
|
this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
|
|
49686
49723
|
this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
|
|
49724
|
+
this.selectedFigureId = null;
|
|
49687
49725
|
break;
|
|
49688
49726
|
}
|
|
49689
49727
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
@@ -53224,9 +53262,6 @@ css /* scss */ `
|
|
|
53224
53262
|
.text-muted {
|
|
53225
53263
|
color: grey !important;
|
|
53226
53264
|
}
|
|
53227
|
-
button {
|
|
53228
|
-
color: #333;
|
|
53229
|
-
}
|
|
53230
53265
|
.o-disabled {
|
|
53231
53266
|
opacity: 0.4;
|
|
53232
53267
|
pointer: default;
|
|
@@ -53347,17 +53382,17 @@ css /* scss */ `
|
|
|
53347
53382
|
}
|
|
53348
53383
|
|
|
53349
53384
|
.o-button {
|
|
53350
|
-
border: 1px solid
|
|
53385
|
+
border: 1px solid;
|
|
53351
53386
|
padding: 0px 20px 0px 20px;
|
|
53352
53387
|
border-radius: 4px;
|
|
53353
53388
|
font-weight: 500;
|
|
53354
53389
|
font-size: 14px;
|
|
53355
53390
|
height: 30px;
|
|
53356
53391
|
line-height: 16px;
|
|
53357
|
-
background: white;
|
|
53358
53392
|
margin-right: 8px;
|
|
53359
|
-
|
|
53360
|
-
|
|
53393
|
+
|
|
53394
|
+
&:not(:hover) {
|
|
53395
|
+
background-color: transparent;
|
|
53361
53396
|
}
|
|
53362
53397
|
|
|
53363
53398
|
&:enabled {
|
|
@@ -53371,6 +53406,15 @@ css /* scss */ `
|
|
|
53371
53406
|
&:last-child {
|
|
53372
53407
|
margin-right: 0px;
|
|
53373
53408
|
}
|
|
53409
|
+
|
|
53410
|
+
&.o-button-grey {
|
|
53411
|
+
border-color: lightgrey;
|
|
53412
|
+
background: #ffffff;
|
|
53413
|
+
color: #333;
|
|
53414
|
+
&:hover:enabled {
|
|
53415
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
53416
|
+
}
|
|
53417
|
+
}
|
|
53374
53418
|
}
|
|
53375
53419
|
|
|
53376
53420
|
.o-input {
|
|
@@ -57250,6 +57294,6 @@ const constants = {
|
|
|
57250
57294
|
export { AbstractChart, CellErrorType, 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 };
|
|
57251
57295
|
|
|
57252
57296
|
|
|
57253
|
-
__info__.version = "17.1.
|
|
57254
|
-
__info__.date = "2024-03-
|
|
57255
|
-
__info__.hash = "
|
|
57297
|
+
__info__.version = "17.1.9";
|
|
57298
|
+
__info__.date = "2024-03-25T09:43:27.017Z";
|
|
57299
|
+
__info__.hash = "5fb076e";
|
|
@@ -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.1.
|
|
6
|
-
* @date 2024-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.1.9
|
|
6
|
+
* @date 2024-03-25T09:43:27.017Z
|
|
7
|
+
* @hash 5fb076e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -11128,6 +11128,9 @@
|
|
|
11128
11128
|
result.default = true;
|
|
11129
11129
|
result.defaultValue = defaultValue;
|
|
11130
11130
|
}
|
|
11131
|
+
if (types.some((t) => t.startsWith("RANGE"))) {
|
|
11132
|
+
result.acceptMatrix = true;
|
|
11133
|
+
}
|
|
11131
11134
|
return result;
|
|
11132
11135
|
}
|
|
11133
11136
|
/**
|
|
@@ -19723,11 +19726,27 @@
|
|
|
19723
19726
|
}
|
|
19724
19727
|
const descr = addMetaInfoFromArg(addDescr);
|
|
19725
19728
|
validateArguments(descr.args);
|
|
19726
|
-
this.mapping[name] = addErrorHandling(addResultHandling(descr
|
|
19729
|
+
this.mapping[name] = addErrorHandling(addResultHandling(addInputHandling(descr)), name);
|
|
19727
19730
|
super.add(name, descr);
|
|
19728
19731
|
return this;
|
|
19729
19732
|
}
|
|
19730
19733
|
}
|
|
19734
|
+
function addInputHandling(descr) {
|
|
19735
|
+
function computeWithInputHandling(...args) {
|
|
19736
|
+
for (let i = 0; i < args.length; i++) {
|
|
19737
|
+
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
|
19738
|
+
const arg = args[i];
|
|
19739
|
+
if (isMatrix(arg) && !argDefinition.acceptMatrix) {
|
|
19740
|
+
if (arg.length !== 1 || arg[0].length !== 1) {
|
|
19741
|
+
throw new EvaluationError(_t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be a single value or a single cell reference, not a range.", argDefinition.name));
|
|
19742
|
+
}
|
|
19743
|
+
args[i] = arg[0][0];
|
|
19744
|
+
}
|
|
19745
|
+
}
|
|
19746
|
+
return descr.compute.apply(this, args);
|
|
19747
|
+
}
|
|
19748
|
+
return computeWithInputHandling;
|
|
19749
|
+
}
|
|
19731
19750
|
function addErrorHandling(compute, functionName) {
|
|
19732
19751
|
return function (...args) {
|
|
19733
19752
|
try {
|
|
@@ -19978,14 +19997,19 @@
|
|
|
19978
19997
|
children: [allFunctionListMenuBuilder],
|
|
19979
19998
|
};
|
|
19980
19999
|
function allFunctionListMenuBuilder() {
|
|
19981
|
-
const fnNames = functionRegistry.getKeys();
|
|
20000
|
+
const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
|
|
19982
20001
|
return createFormulaFunctions(fnNames);
|
|
19983
20002
|
}
|
|
19984
20003
|
const categoriesFunctionListMenuBuilder = () => {
|
|
19985
20004
|
const functions = functionRegistry.content;
|
|
19986
|
-
const categories = [
|
|
20005
|
+
const categories = [
|
|
20006
|
+
...new Set(functionRegistry
|
|
20007
|
+
.getAll()
|
|
20008
|
+
.filter((fn) => !fn.hidden)
|
|
20009
|
+
.map((fn) => fn.category)),
|
|
20010
|
+
].filter(isDefined$1);
|
|
19987
20011
|
return categories.sort().map((category, i) => {
|
|
19988
|
-
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
|
|
20012
|
+
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
|
|
19989
20013
|
return {
|
|
19990
20014
|
name: category,
|
|
19991
20015
|
children: createFormulaFunctions(functionsInCategory),
|
|
@@ -23774,11 +23798,9 @@
|
|
|
23774
23798
|
}
|
|
23775
23799
|
.o-cell-is-operator {
|
|
23776
23800
|
margin-bottom: 5px;
|
|
23777
|
-
width: 96%;
|
|
23778
23801
|
}
|
|
23779
23802
|
.o-cell-is-value {
|
|
23780
23803
|
margin-bottom: 5px;
|
|
23781
|
-
width: 96%;
|
|
23782
23804
|
}
|
|
23783
23805
|
.o-color-picker-widget .o-color-picker-button {
|
|
23784
23806
|
pointer-events: all;
|
|
@@ -26198,6 +26220,9 @@
|
|
|
26198
26220
|
el?.focus({ preventScroll: true });
|
|
26199
26221
|
}
|
|
26200
26222
|
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
|
26223
|
+
owl.onWillUnmount(() => {
|
|
26224
|
+
this.props.onFigureDeleted();
|
|
26225
|
+
});
|
|
26201
26226
|
}
|
|
26202
26227
|
clickAnchor(dirX, dirY, ev) {
|
|
26203
26228
|
this.props.onClickAnchor(dirX, dirY, ev);
|
|
@@ -26216,6 +26241,7 @@
|
|
|
26216
26241
|
this.props.onFigureDeleted();
|
|
26217
26242
|
ev.stopPropagation();
|
|
26218
26243
|
ev.preventDefault();
|
|
26244
|
+
ev.stopPropagation();
|
|
26219
26245
|
break;
|
|
26220
26246
|
case "ArrowDown":
|
|
26221
26247
|
case "ArrowLeft":
|
|
@@ -26236,6 +26262,7 @@
|
|
|
26236
26262
|
});
|
|
26237
26263
|
ev.stopPropagation();
|
|
26238
26264
|
ev.preventDefault();
|
|
26265
|
+
ev.stopPropagation();
|
|
26239
26266
|
break;
|
|
26240
26267
|
}
|
|
26241
26268
|
}
|
|
@@ -26910,6 +26937,7 @@
|
|
|
26910
26937
|
// -----------------------------------------------------------------------------
|
|
26911
26938
|
css /* scss */ `
|
|
26912
26939
|
.o-formula-assistant {
|
|
26940
|
+
background: #ffffff;
|
|
26913
26941
|
.o-formula-assistant-head {
|
|
26914
26942
|
background-color: #f2f2f2;
|
|
26915
26943
|
padding: 10px;
|
|
@@ -26965,6 +26993,9 @@
|
|
|
26965
26993
|
this.assistantState.allowCellSelectionBehind = false;
|
|
26966
26994
|
}, 2000);
|
|
26967
26995
|
}
|
|
26996
|
+
get formulaArgSeparator() {
|
|
26997
|
+
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
|
|
26998
|
+
}
|
|
26968
26999
|
}
|
|
26969
27000
|
|
|
26970
27001
|
const functions$2 = functionRegistry.content;
|
|
@@ -27122,6 +27153,12 @@
|
|
|
27122
27153
|
owl.useEffect(() => {
|
|
27123
27154
|
this.processContent();
|
|
27124
27155
|
});
|
|
27156
|
+
owl.onPatched(() => {
|
|
27157
|
+
// Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
|
|
27158
|
+
if (this.env.model.getters.getEditionMode() === "inactive") {
|
|
27159
|
+
this.processTokenAtCursor();
|
|
27160
|
+
}
|
|
27161
|
+
});
|
|
27125
27162
|
}
|
|
27126
27163
|
// ---------------------------------------------------------------------------
|
|
27127
27164
|
// Handlers
|
|
@@ -49685,6 +49722,7 @@
|
|
|
49685
49722
|
this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
|
|
49686
49723
|
this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
|
|
49687
49724
|
this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
|
|
49725
|
+
this.selectedFigureId = null;
|
|
49688
49726
|
break;
|
|
49689
49727
|
}
|
|
49690
49728
|
/** Any change to the selection has to be reflected in the selection processor. */
|
|
@@ -53225,9 +53263,6 @@
|
|
|
53225
53263
|
.text-muted {
|
|
53226
53264
|
color: grey !important;
|
|
53227
53265
|
}
|
|
53228
|
-
button {
|
|
53229
|
-
color: #333;
|
|
53230
|
-
}
|
|
53231
53266
|
.o-disabled {
|
|
53232
53267
|
opacity: 0.4;
|
|
53233
53268
|
pointer: default;
|
|
@@ -53348,17 +53383,17 @@
|
|
|
53348
53383
|
}
|
|
53349
53384
|
|
|
53350
53385
|
.o-button {
|
|
53351
|
-
border: 1px solid
|
|
53386
|
+
border: 1px solid;
|
|
53352
53387
|
padding: 0px 20px 0px 20px;
|
|
53353
53388
|
border-radius: 4px;
|
|
53354
53389
|
font-weight: 500;
|
|
53355
53390
|
font-size: 14px;
|
|
53356
53391
|
height: 30px;
|
|
53357
53392
|
line-height: 16px;
|
|
53358
|
-
background: white;
|
|
53359
53393
|
margin-right: 8px;
|
|
53360
|
-
|
|
53361
|
-
|
|
53394
|
+
|
|
53395
|
+
&:not(:hover) {
|
|
53396
|
+
background-color: transparent;
|
|
53362
53397
|
}
|
|
53363
53398
|
|
|
53364
53399
|
&:enabled {
|
|
@@ -53372,6 +53407,15 @@
|
|
|
53372
53407
|
&:last-child {
|
|
53373
53408
|
margin-right: 0px;
|
|
53374
53409
|
}
|
|
53410
|
+
|
|
53411
|
+
&.o-button-grey {
|
|
53412
|
+
border-color: lightgrey;
|
|
53413
|
+
background: #ffffff;
|
|
53414
|
+
color: #333;
|
|
53415
|
+
&:hover:enabled {
|
|
53416
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
53417
|
+
}
|
|
53418
|
+
}
|
|
53375
53419
|
}
|
|
53376
53420
|
|
|
53377
53421
|
.o-input {
|
|
@@ -57287,9 +57331,9 @@
|
|
|
57287
57331
|
exports.tokenize = tokenize;
|
|
57288
57332
|
|
|
57289
57333
|
|
|
57290
|
-
__info__.version = "17.1.
|
|
57291
|
-
__info__.date = "2024-03-
|
|
57292
|
-
__info__.hash = "
|
|
57334
|
+
__info__.version = "17.1.9";
|
|
57335
|
+
__info__.date = "2024-03-25T09:43:27.017Z";
|
|
57336
|
+
__info__.hash = "5fb076e";
|
|
57293
57337
|
|
|
57294
57338
|
|
|
57295
57339
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|