[FIX] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/9b128f8c [REL] 17.0.16 https://github.com/odoo/o-spreadsheet/commit/389177f9 [FIX] Composer: weird behavior of autocomplete dropdown https://github.com/odoo/o-spreadsheet/commit/7e7b0692 [FIX] formula assistant: localize argument separator Task: 3789860 https://github.com/odoo/o-spreadsheet/commit/2f96ca07 [FIX] TopBar: Remove hidden functions from the `insert` menu Task: 3810284 https://github.com/odoo/o-spreadsheet/commit/fa60ddf1 [FIX] Composer: force light mode of the formula assitant Task: 3806513 https://github.com/odoo/o-spreadsheet/commit/69ccee4f [FIX] cf_editor: remove broken css rule Task: 3806513 https://github.com/odoo/o-spreadsheet/commit/dd7584ec [FIX] Spreadsheet: split button style to form/color https://github.com/odoo/o-spreadsheet/commit/fe4ffe1d [FIX] export: export non-Excel formulas as value https://github.com/odoo/o-spreadsheet/commit/0be37a0d [FIX] FigureComponent: Undo/Redo broken after pasting figure https://github.com/odoo/o-spreadsheet/commit/d1e41517 [FIX] evaluation: accept 1x1 result array in sub-formula closes odoo/odoo#159066 Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
||||
* @see https://github.com/odoo/o-spreadsheet
|
||||
* @version 17.0.15
|
||||
* @date 2024-03-15T12:12:08.617Z
|
||||
* @hash e02add99e
|
||||
* @version 17.0.16
|
||||
* @date 2024-03-25T11:04:46.936Z
|
||||
* @hash 9b128f8c
|
||||
*/
|
||||
|
||||
(function (exports, owl) {
|
||||
@@ -11056,6 +11056,9 @@
|
||||
result.default = true;
|
||||
result.defaultValue = defaultValue;
|
||||
}
|
||||
if (types.some((t) => t.startsWith("RANGE"))) {
|
||||
result.acceptMatrix = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
@@ -19421,11 +19424,27 @@
|
||||
}
|
||||
const descr = addMetaInfoFromArg(addDescr);
|
||||
validateArguments(descr.args);
|
||||
this.mapping[name] = createComputeFunctionFromDescription(descr);
|
||||
this.mapping[name] = addInputHandling(descr, createComputeFunctionFromDescription(descr));
|
||||
super.add(name, descr);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
function addInputHandling(descr, computeFunction) {
|
||||
function computeWithInputHandling(...args) {
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1];
|
||||
const arg = args[i];
|
||||
if (isMatrix(arg) && !argDefinition.acceptMatrix) {
|
||||
if (arg.length !== 1 || arg[0].length !== 1) {
|
||||
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));
|
||||
}
|
||||
args[i] = arg[0][0];
|
||||
}
|
||||
}
|
||||
return computeFunction.apply(this, args);
|
||||
}
|
||||
return computeWithInputHandling;
|
||||
}
|
||||
function createComputeFunctionFromDescription(descr) {
|
||||
const computeValueAndFormat = "computeValueAndFormat" in descr;
|
||||
const computeValue = "compute" in descr;
|
||||
@@ -19676,14 +19695,19 @@
|
||||
children: [allFunctionListMenuBuilder],
|
||||
};
|
||||
function allFunctionListMenuBuilder() {
|
||||
const fnNames = functionRegistry.getKeys();
|
||||
const fnNames = functionRegistry.getKeys().filter((key) => !functionRegistry.get(key).hidden);
|
||||
return createFormulaFunctions(fnNames);
|
||||
}
|
||||
const categoriesFunctionListMenuBuilder = () => {
|
||||
const functions = functionRegistry.content;
|
||||
const categories = [...new Set(functionRegistry.getAll().map((fn) => fn.category))].filter(isDefined$1);
|
||||
const categories = [
|
||||
...new Set(functionRegistry
|
||||
.getAll()
|
||||
.filter((fn) => !fn.hidden)
|
||||
.map((fn) => fn.category)),
|
||||
].filter(isDefined$1);
|
||||
return categories.sort().map((category, i) => {
|
||||
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category);
|
||||
const functionsInCategory = Object.keys(functions).filter((key) => functions[key].category === category && !functions[key].hidden);
|
||||
return {
|
||||
name: category,
|
||||
children: createFormulaFunctions(functionsInCategory),
|
||||
@@ -23336,11 +23360,9 @@
|
||||
}
|
||||
.o-cell-is-operator {
|
||||
margin-bottom: 5px;
|
||||
width: 96%;
|
||||
}
|
||||
.o-cell-is-value {
|
||||
margin-bottom: 5px;
|
||||
width: 96%;
|
||||
}
|
||||
.o-color-picker-widget .o-color-picker-button {
|
||||
pointer-events: all;
|
||||
@@ -25706,6 +25728,9 @@
|
||||
el?.focus({ preventScroll: true });
|
||||
}
|
||||
}, () => [this.env.model.getters.getSelectedFigureId(), this.props.figure.id, this.figureRef.el]);
|
||||
owl.onWillUnmount(() => {
|
||||
this.props.onFigureDeleted();
|
||||
});
|
||||
}
|
||||
clickAnchor(dirX, dirY, ev) {
|
||||
this.props.onClickAnchor(dirX, dirY, ev);
|
||||
@@ -25724,6 +25749,7 @@
|
||||
this.props.onFigureDeleted();
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
break;
|
||||
case "ArrowDown":
|
||||
case "ArrowLeft":
|
||||
@@ -25744,6 +25770,7 @@
|
||||
});
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -26425,6 +26452,7 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
css /* scss */ `
|
||||
.o-formula-assistant {
|
||||
background: #ffffff;
|
||||
.o-formula-assistant-head {
|
||||
background-color: #f2f2f2;
|
||||
padding: 10px;
|
||||
@@ -26475,6 +26503,9 @@
|
||||
this.assistantState.allowCellSelectionBehind = false;
|
||||
}, 2000);
|
||||
}
|
||||
get formulaArgSeparator() {
|
||||
return this.env.model.getters.getLocale().formulaArgSeparator + " ";
|
||||
}
|
||||
}
|
||||
FunctionDescriptionProvider.props = {
|
||||
functionName: String,
|
||||
@@ -26626,6 +26657,12 @@
|
||||
owl.useEffect(() => {
|
||||
this.processContent();
|
||||
});
|
||||
owl.onPatched(() => {
|
||||
// Required because typing '=SUM' and double-clicking another cell leaves ShowProvider/ShowDescription true
|
||||
if (this.env.model.getters.getEditionMode() === "inactive") {
|
||||
this.processTokenAtCursor();
|
||||
}
|
||||
});
|
||||
}
|
||||
// ---------------------------------------------------------------------------
|
||||
// Handlers
|
||||
@@ -41586,7 +41623,7 @@
|
||||
? getItemId(newFormat, data.formats)
|
||||
: exportedCellData.format;
|
||||
let content;
|
||||
if (formulaCell instanceof FormulaCellWithDependencies) {
|
||||
if (isFormula && formulaCell instanceof FormulaCellWithDependencies) {
|
||||
content = this.getters.getFormulaCellContent(exportedSheetData.id, formulaCell.compiledFormula, formulaCell.compiledFormula.dependencies, true);
|
||||
}
|
||||
else {
|
||||
@@ -49296,6 +49333,7 @@
|
||||
this.gridSelection.zones = this.gridSelection.zones.map((z) => this.getters.expandZone(sheetId, z));
|
||||
this.gridSelection.anchor.zone = this.getters.expandZone(sheetId, this.gridSelection.anchor.zone);
|
||||
this.setSelectionMixin(this.gridSelection.anchor, this.gridSelection.zones);
|
||||
this.selectedFigureId = null;
|
||||
break;
|
||||
}
|
||||
/** Any change to the selection has to be reflected in the selection processor. */
|
||||
@@ -52873,9 +52911,6 @@
|
||||
.text-muted {
|
||||
color: grey !important;
|
||||
}
|
||||
button {
|
||||
color: #333;
|
||||
}
|
||||
.o-disabled {
|
||||
opacity: 0.4;
|
||||
pointer: default;
|
||||
@@ -52996,17 +53031,17 @@
|
||||
}
|
||||
|
||||
.o-button {
|
||||
border: 1px solid lightgrey;
|
||||
border: 1px solid;
|
||||
padding: 0px 20px 0px 20px;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
height: 30px;
|
||||
line-height: 16px;
|
||||
background: white;
|
||||
margin-right: 8px;
|
||||
&:hover:enabled {
|
||||
background-color: rgba(0, 0, 0, 0.08);
|
||||
|
||||
&:not(:hover) {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&:enabled {
|
||||
@@ -53020,6 +53055,15 @@
|
||||
&:last-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
&.o-button-grey {
|
||||
border-color: lightgrey;
|
||||
background: #ffffff;
|
||||
color: #333;
|
||||
&:hover:enabled {
|
||||
background-color: rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o-input {
|
||||
@@ -56967,9 +57011,9 @@
|
||||
exports.tokenize = tokenize;
|
||||
|
||||
|
||||
__info__.version = "17.0.15";
|
||||
__info__.date = "2024-03-15T12:12:08.617Z";
|
||||
__info__.hash = "e02add99e";
|
||||
__info__.version = "17.0.16";
|
||||
__info__.date = "2024-03-25T11:04:46.936Z";
|
||||
__info__.hash = "9b128f8c";
|
||||
|
||||
|
||||
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<!--
|
||||
This file is generated by o-spreadsheet build tools. Do not edit it.
|
||||
@see https://github.com/odoo/o-spreadsheet
|
||||
@version 17.0.15
|
||||
@date 2024-03-15T12:12:11.192Z
|
||||
@hash e02add99e
|
||||
@version 17.0.16
|
||||
@date 2024-03-25T11:04:49.559Z
|
||||
@hash 9b128f8c
|
||||
-->
|
||||
<odoo>
|
||||
<t t-name="o-spreadsheet-ActionButton">
|
||||
@@ -508,7 +508,7 @@
|
||||
}">
|
||||
<t t-set="context" t-value="getContext()"/>
|
||||
<div
|
||||
class="o-formula-assistant bg-white"
|
||||
class="o-formula-assistant"
|
||||
t-if="context.functionName"
|
||||
t-on-mousemove="onMouseMove"
|
||||
t-att-class="{'opacity-25': assistantState.allowCellSelectionBehind}">
|
||||
@@ -516,7 +516,7 @@
|
||||
<span t-esc="context.functionName"/>
|
||||
(
|
||||
<t t-foreach="context.functionDescription.args" t-as="arg" t-key="arg.name">
|
||||
<span t-if="arg_index > '0'">, </span>
|
||||
<span t-if="arg_index > '0'" t-esc="formulaArgSeparator"/>
|
||||
<span t-att-class="{ 'o-formula-assistant-focus': context.argToFocus === arg_index }">
|
||||
<span>
|
||||
<span t-if="arg.optional || arg.repeating || arg.default">[</span>
|
||||
@@ -1015,7 +1015,12 @@
|
||||
class="o-grid-add-rows mt-2 ms-2 w-100 d-flex position-relative align-items-center"
|
||||
t-att-style="addRowsPosition"
|
||||
t-on-mousedown.stop.prevent="">
|
||||
<button t-on-click="onConfirm" t-att-disabled="state.errorFlag" class="o-button">Add</button>
|
||||
<button
|
||||
t-on-click="onConfirm"
|
||||
t-att-disabled="state.errorFlag"
|
||||
class="o-button o-button-grey">
|
||||
Add
|
||||
</button>
|
||||
<input
|
||||
type="text"
|
||||
class="o-grid-add-rows-input o-input mt-0 me-2"
|
||||
@@ -2388,8 +2393,8 @@ https://fontawesome.com/license -->
|
||||
onClose="() => this.menu.isOpen=false"
|
||||
/>
|
||||
<div class="o-buttons">
|
||||
<button t-on-click="cancel" class="o-button o-cancel">Cancel</button>
|
||||
<button t-on-click="save" class="o-button o-save" t-att-disabled="!link.url">
|
||||
<button t-on-click="cancel" class="o-button o-button-grey o-cancel">Cancel</button>
|
||||
<button t-on-click="save" class="o-button o-button-grey o-save" t-att-disabled="!link.url">
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
@@ -3405,8 +3410,12 @@ https://fontawesome.com/license -->
|
||||
<t t-set="rule" t-value="state.rules.iconSet"/>
|
||||
</t>
|
||||
<div class="o-sidePanelButtons">
|
||||
<button t-on-click="props.onExitEdition" class="o-button o-cf-cancel">Cancel</button>
|
||||
<button t-on-click="saveConditionalFormat" class="o-button primary o-cf-save">
|
||||
<button t-on-click="props.onExitEdition" class="o-button o-button-grey o-cf-cancel">
|
||||
Cancel
|
||||
</button>
|
||||
<button
|
||||
t-on-click="saveConditionalFormat"
|
||||
class="o-button o-button-grey primary o-cf-save">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
@@ -3740,7 +3749,7 @@ https://fontawesome.com/license -->
|
||||
</div>
|
||||
<div class="o-sidePanelButtons">
|
||||
<button
|
||||
class="o-button"
|
||||
class="o-button o-button-grey"
|
||||
t-on-click="() => this.apply()"
|
||||
t-att-disabled="!formatProposals.length || isSameFormat">
|
||||
Apply
|
||||
@@ -3859,7 +3868,7 @@ https://fontawesome.com/license -->
|
||||
</div>
|
||||
<div class="mb-2"/>
|
||||
</t>
|
||||
<button class="o-dv-list-add-value o-button mb-3" t-on-click="onAddAnotherValue">
|
||||
<button class="o-dv-list-add-value o-button o-button-grey mb-3" t-on-click="onAddAnotherValue">
|
||||
Add another item
|
||||
</button>
|
||||
|
||||
@@ -3926,10 +3935,10 @@ https://fontawesome.com/license -->
|
||||
</div>
|
||||
|
||||
<div class="o-sidePanelButtons">
|
||||
<button t-on-click="props.onExit" class="o-dv-cancel o-button">Cancel</button>
|
||||
<button t-on-click="props.onExit" class="o-dv-cancel o-button o-button-grey">Cancel</button>
|
||||
<button
|
||||
t-on-click="onSave"
|
||||
class="o-dv-save o-button primary"
|
||||
class="o-dv-save o-button o-button-grey primary"
|
||||
t-att-class="{'o-disabled': !canSave }">
|
||||
Save
|
||||
</button>
|
||||
@@ -4004,10 +4013,13 @@ https://fontawesome.com/license -->
|
||||
<button
|
||||
t-att-disabled="!hasSearchResult"
|
||||
t-on-click="onSelectPreviousCell"
|
||||
class="o-button">
|
||||
class="o-button o-button-grey">
|
||||
Previous
|
||||
</button>
|
||||
<button t-att-disabled="!hasSearchResult" t-on-click="onSelectNextCell" class="o-button">
|
||||
<button
|
||||
t-att-disabled="!hasSearchResult"
|
||||
t-on-click="onSelectNextCell"
|
||||
class="o-button o-button-grey">
|
||||
Next
|
||||
</button>
|
||||
</div>
|
||||
@@ -4027,13 +4039,13 @@ https://fontawesome.com/license -->
|
||||
<button
|
||||
t-att-disabled="env.model.getters.getCurrentSelectedMatchIndex() === null"
|
||||
t-on-click="replace"
|
||||
class="o-button">
|
||||
class="o-button o-button-grey">
|
||||
Replace
|
||||
</button>
|
||||
<button
|
||||
t-att-disabled="env.model.getters.getCurrentSelectedMatchIndex() === null"
|
||||
t-on-click="replaceAll"
|
||||
class="o-button">
|
||||
class="o-button o-button-grey">
|
||||
Replace all
|
||||
</button>
|
||||
</div>
|
||||
@@ -4094,7 +4106,7 @@ https://fontawesome.com/license -->
|
||||
|
||||
<div class="o-sidePanelButtons">
|
||||
<button
|
||||
class="o-button"
|
||||
class="o-button o-button-grey"
|
||||
t-att-class="{'o-disabled': !canConfirm}"
|
||||
t-on-click="onRemoveDuplicates">
|
||||
Remove duplicates
|
||||
@@ -4219,7 +4231,7 @@ https://fontawesome.com/license -->
|
||||
|
||||
<div class="o-sidePanelButtons">
|
||||
<button
|
||||
class="o-button"
|
||||
class="o-button o-button-grey"
|
||||
t-att-class="{'o-disabled': isConfirmDisabled}"
|
||||
t-on-click="confirm">
|
||||
Confirm
|
||||
|
||||
Reference in New Issue
Block a user