@odoo/o-spreadsheet 18.0.38 → 18.0.40
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 +36 -27
- package/dist/o-spreadsheet.esm.js +36 -27
- package/dist/o-spreadsheet.iife.js +36 -27
- package/dist/o-spreadsheet.iife.min.js +3 -3
- package/dist/o_spreadsheet.xml +3 -3
- 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 18.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.40
|
|
6
|
+
* @date 2025-08-18T08:15:29.422Z
|
|
7
|
+
* @hash ec79db4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -17385,31 +17385,40 @@ autoCompleteProviders.add("dataValidation", {
|
|
|
17385
17385
|
if (!this.composer.currentEditedCell) {
|
|
17386
17386
|
return [];
|
|
17387
17387
|
}
|
|
17388
|
-
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
|
|
17392
|
-
|
|
17393
|
-
}
|
|
17394
|
-
let values;
|
|
17395
|
-
if (rule.criterion.type === "isValueInList") {
|
|
17396
|
-
values = rule.criterion.values;
|
|
17397
|
-
}
|
|
17398
|
-
else {
|
|
17399
|
-
const range = this.getters.getRangeFromSheetXC(position.sheetId, rule.criterion.values[0]);
|
|
17400
|
-
values = Array.from(new Set(this.getters
|
|
17401
|
-
.getRangeValues(range)
|
|
17402
|
-
.filter(isNotNull)
|
|
17403
|
-
.map((value) => value.toString())
|
|
17404
|
-
.filter((val) => val !== "")));
|
|
17405
|
-
}
|
|
17406
|
-
return values.map((value) => ({ text: value }));
|
|
17388
|
+
return getProposedValues(this.getters, this.composer.currentEditedCell).map((value) => ({
|
|
17389
|
+
text: value.value?.toString() || "",
|
|
17390
|
+
htmlContent: [{ value: value.label }],
|
|
17391
|
+
fuzzySearchKey: value.label,
|
|
17392
|
+
}));
|
|
17407
17393
|
},
|
|
17408
17394
|
selectProposal(tokenAtCursor, value) {
|
|
17409
17395
|
this.composer.setCurrentContent(value);
|
|
17410
17396
|
this.composer.stopEdition();
|
|
17411
17397
|
},
|
|
17412
17398
|
});
|
|
17399
|
+
function getProposedValues(getters, position) {
|
|
17400
|
+
const rule = getters.getValidationRuleForCell(position);
|
|
17401
|
+
if (!rule ||
|
|
17402
|
+
(rule.criterion.type !== "isValueInList" && rule.criterion.type !== "isValueInRange")) {
|
|
17403
|
+
return [];
|
|
17404
|
+
}
|
|
17405
|
+
let values = [];
|
|
17406
|
+
if (rule.criterion.type === "isValueInList") {
|
|
17407
|
+
values = rule.criterion.values.map((value) => ({ label: value, value }));
|
|
17408
|
+
}
|
|
17409
|
+
else {
|
|
17410
|
+
const labelsSet = new Set();
|
|
17411
|
+
const range = getters.getRangeFromSheetXC(position.sheetId, rule.criterion.values[0]);
|
|
17412
|
+
for (const p of positions(range.zone)) {
|
|
17413
|
+
const cell = getters.getEvaluatedCell({ ...p, sheetId: range.sheetId });
|
|
17414
|
+
if (cell.formattedValue && !labelsSet.has(cell.formattedValue)) {
|
|
17415
|
+
labelsSet.add(cell.formattedValue);
|
|
17416
|
+
values.push({ label: cell.formattedValue, value: cell.value });
|
|
17417
|
+
}
|
|
17418
|
+
}
|
|
17419
|
+
}
|
|
17420
|
+
return values;
|
|
17421
|
+
}
|
|
17413
17422
|
|
|
17414
17423
|
function getHtmlContentFromPattern(pattern, value, highlightColor, className) {
|
|
17415
17424
|
const pendingHtmlContent = [];
|
|
@@ -25582,7 +25591,7 @@ const OFFSET = {
|
|
|
25582
25591
|
right: startingCol + offsetWidth - 1,
|
|
25583
25592
|
bottom: startingRow + offsetHeight - 1,
|
|
25584
25593
|
};
|
|
25585
|
-
const range = this.getters.getRangeFromZone(
|
|
25594
|
+
const range = this.getters.getRangeFromZone(sheetId, dependencyZone);
|
|
25586
25595
|
if (range.invalidXc || range.invalidSheetName) {
|
|
25587
25596
|
return new InvalidReferenceError();
|
|
25588
25597
|
}
|
|
@@ -43588,7 +43597,7 @@ class PivotLayoutConfigurator extends owl.Component {
|
|
|
43588
43597
|
});
|
|
43589
43598
|
}
|
|
43590
43599
|
getMeasureId(fieldName, aggregator) {
|
|
43591
|
-
const baseId = fieldName + (aggregator ? `:${aggregator}` : "");
|
|
43600
|
+
const baseId = fieldName.replaceAll("'", "") + (aggregator ? `:${aggregator}` : "");
|
|
43592
43601
|
let id = baseId;
|
|
43593
43602
|
let i = 2;
|
|
43594
43603
|
while (this.props.definition.measures.some((m) => m.id === id)) {
|
|
@@ -74640,6 +74649,6 @@ exports.tokenColors = tokenColors;
|
|
|
74640
74649
|
exports.tokenize = tokenize;
|
|
74641
74650
|
|
|
74642
74651
|
|
|
74643
|
-
__info__.version = "18.0.
|
|
74644
|
-
__info__.date = "2025-
|
|
74645
|
-
__info__.hash = "
|
|
74652
|
+
__info__.version = "18.0.40";
|
|
74653
|
+
__info__.date = "2025-08-18T08:15:29.422Z";
|
|
74654
|
+
__info__.hash = "ec79db4";
|
|
@@ -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 18.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.40
|
|
6
|
+
* @date 2025-08-18T08:15:29.422Z
|
|
7
|
+
* @hash ec79db4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -17383,31 +17383,40 @@ autoCompleteProviders.add("dataValidation", {
|
|
|
17383
17383
|
if (!this.composer.currentEditedCell) {
|
|
17384
17384
|
return [];
|
|
17385
17385
|
}
|
|
17386
|
-
|
|
17387
|
-
|
|
17388
|
-
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
}
|
|
17392
|
-
let values;
|
|
17393
|
-
if (rule.criterion.type === "isValueInList") {
|
|
17394
|
-
values = rule.criterion.values;
|
|
17395
|
-
}
|
|
17396
|
-
else {
|
|
17397
|
-
const range = this.getters.getRangeFromSheetXC(position.sheetId, rule.criterion.values[0]);
|
|
17398
|
-
values = Array.from(new Set(this.getters
|
|
17399
|
-
.getRangeValues(range)
|
|
17400
|
-
.filter(isNotNull)
|
|
17401
|
-
.map((value) => value.toString())
|
|
17402
|
-
.filter((val) => val !== "")));
|
|
17403
|
-
}
|
|
17404
|
-
return values.map((value) => ({ text: value }));
|
|
17386
|
+
return getProposedValues(this.getters, this.composer.currentEditedCell).map((value) => ({
|
|
17387
|
+
text: value.value?.toString() || "",
|
|
17388
|
+
htmlContent: [{ value: value.label }],
|
|
17389
|
+
fuzzySearchKey: value.label,
|
|
17390
|
+
}));
|
|
17405
17391
|
},
|
|
17406
17392
|
selectProposal(tokenAtCursor, value) {
|
|
17407
17393
|
this.composer.setCurrentContent(value);
|
|
17408
17394
|
this.composer.stopEdition();
|
|
17409
17395
|
},
|
|
17410
17396
|
});
|
|
17397
|
+
function getProposedValues(getters, position) {
|
|
17398
|
+
const rule = getters.getValidationRuleForCell(position);
|
|
17399
|
+
if (!rule ||
|
|
17400
|
+
(rule.criterion.type !== "isValueInList" && rule.criterion.type !== "isValueInRange")) {
|
|
17401
|
+
return [];
|
|
17402
|
+
}
|
|
17403
|
+
let values = [];
|
|
17404
|
+
if (rule.criterion.type === "isValueInList") {
|
|
17405
|
+
values = rule.criterion.values.map((value) => ({ label: value, value }));
|
|
17406
|
+
}
|
|
17407
|
+
else {
|
|
17408
|
+
const labelsSet = new Set();
|
|
17409
|
+
const range = getters.getRangeFromSheetXC(position.sheetId, rule.criterion.values[0]);
|
|
17410
|
+
for (const p of positions(range.zone)) {
|
|
17411
|
+
const cell = getters.getEvaluatedCell({ ...p, sheetId: range.sheetId });
|
|
17412
|
+
if (cell.formattedValue && !labelsSet.has(cell.formattedValue)) {
|
|
17413
|
+
labelsSet.add(cell.formattedValue);
|
|
17414
|
+
values.push({ label: cell.formattedValue, value: cell.value });
|
|
17415
|
+
}
|
|
17416
|
+
}
|
|
17417
|
+
}
|
|
17418
|
+
return values;
|
|
17419
|
+
}
|
|
17411
17420
|
|
|
17412
17421
|
function getHtmlContentFromPattern(pattern, value, highlightColor, className) {
|
|
17413
17422
|
const pendingHtmlContent = [];
|
|
@@ -25580,7 +25589,7 @@ const OFFSET = {
|
|
|
25580
25589
|
right: startingCol + offsetWidth - 1,
|
|
25581
25590
|
bottom: startingRow + offsetHeight - 1,
|
|
25582
25591
|
};
|
|
25583
|
-
const range = this.getters.getRangeFromZone(
|
|
25592
|
+
const range = this.getters.getRangeFromZone(sheetId, dependencyZone);
|
|
25584
25593
|
if (range.invalidXc || range.invalidSheetName) {
|
|
25585
25594
|
return new InvalidReferenceError();
|
|
25586
25595
|
}
|
|
@@ -43586,7 +43595,7 @@ class PivotLayoutConfigurator extends Component {
|
|
|
43586
43595
|
});
|
|
43587
43596
|
}
|
|
43588
43597
|
getMeasureId(fieldName, aggregator) {
|
|
43589
|
-
const baseId = fieldName + (aggregator ? `:${aggregator}` : "");
|
|
43598
|
+
const baseId = fieldName.replaceAll("'", "") + (aggregator ? `:${aggregator}` : "");
|
|
43590
43599
|
let id = baseId;
|
|
43591
43600
|
let i = 2;
|
|
43592
43601
|
while (this.props.definition.measures.some((m) => m.id === id)) {
|
|
@@ -74595,6 +74604,6 @@ const constants = {
|
|
|
74595
74604
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
74596
74605
|
|
|
74597
74606
|
|
|
74598
|
-
__info__.version = "18.0.
|
|
74599
|
-
__info__.date = "2025-
|
|
74600
|
-
__info__.hash = "
|
|
74607
|
+
__info__.version = "18.0.40";
|
|
74608
|
+
__info__.date = "2025-08-18T08:15:29.422Z";
|
|
74609
|
+
__info__.hash = "ec79db4";
|
|
@@ -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 18.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.40
|
|
6
|
+
* @date 2025-08-18T08:15:29.422Z
|
|
7
|
+
* @hash ec79db4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -17384,31 +17384,40 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
17384
17384
|
if (!this.composer.currentEditedCell) {
|
|
17385
17385
|
return [];
|
|
17386
17386
|
}
|
|
17387
|
-
|
|
17388
|
-
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
|
|
17392
|
-
}
|
|
17393
|
-
let values;
|
|
17394
|
-
if (rule.criterion.type === "isValueInList") {
|
|
17395
|
-
values = rule.criterion.values;
|
|
17396
|
-
}
|
|
17397
|
-
else {
|
|
17398
|
-
const range = this.getters.getRangeFromSheetXC(position.sheetId, rule.criterion.values[0]);
|
|
17399
|
-
values = Array.from(new Set(this.getters
|
|
17400
|
-
.getRangeValues(range)
|
|
17401
|
-
.filter(isNotNull)
|
|
17402
|
-
.map((value) => value.toString())
|
|
17403
|
-
.filter((val) => val !== "")));
|
|
17404
|
-
}
|
|
17405
|
-
return values.map((value) => ({ text: value }));
|
|
17387
|
+
return getProposedValues(this.getters, this.composer.currentEditedCell).map((value) => ({
|
|
17388
|
+
text: value.value?.toString() || "",
|
|
17389
|
+
htmlContent: [{ value: value.label }],
|
|
17390
|
+
fuzzySearchKey: value.label,
|
|
17391
|
+
}));
|
|
17406
17392
|
},
|
|
17407
17393
|
selectProposal(tokenAtCursor, value) {
|
|
17408
17394
|
this.composer.setCurrentContent(value);
|
|
17409
17395
|
this.composer.stopEdition();
|
|
17410
17396
|
},
|
|
17411
17397
|
});
|
|
17398
|
+
function getProposedValues(getters, position) {
|
|
17399
|
+
const rule = getters.getValidationRuleForCell(position);
|
|
17400
|
+
if (!rule ||
|
|
17401
|
+
(rule.criterion.type !== "isValueInList" && rule.criterion.type !== "isValueInRange")) {
|
|
17402
|
+
return [];
|
|
17403
|
+
}
|
|
17404
|
+
let values = [];
|
|
17405
|
+
if (rule.criterion.type === "isValueInList") {
|
|
17406
|
+
values = rule.criterion.values.map((value) => ({ label: value, value }));
|
|
17407
|
+
}
|
|
17408
|
+
else {
|
|
17409
|
+
const labelsSet = new Set();
|
|
17410
|
+
const range = getters.getRangeFromSheetXC(position.sheetId, rule.criterion.values[0]);
|
|
17411
|
+
for (const p of positions(range.zone)) {
|
|
17412
|
+
const cell = getters.getEvaluatedCell({ ...p, sheetId: range.sheetId });
|
|
17413
|
+
if (cell.formattedValue && !labelsSet.has(cell.formattedValue)) {
|
|
17414
|
+
labelsSet.add(cell.formattedValue);
|
|
17415
|
+
values.push({ label: cell.formattedValue, value: cell.value });
|
|
17416
|
+
}
|
|
17417
|
+
}
|
|
17418
|
+
}
|
|
17419
|
+
return values;
|
|
17420
|
+
}
|
|
17412
17421
|
|
|
17413
17422
|
function getHtmlContentFromPattern(pattern, value, highlightColor, className) {
|
|
17414
17423
|
const pendingHtmlContent = [];
|
|
@@ -25581,7 +25590,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25581
25590
|
right: startingCol + offsetWidth - 1,
|
|
25582
25591
|
bottom: startingRow + offsetHeight - 1,
|
|
25583
25592
|
};
|
|
25584
|
-
const range = this.getters.getRangeFromZone(
|
|
25593
|
+
const range = this.getters.getRangeFromZone(sheetId, dependencyZone);
|
|
25585
25594
|
if (range.invalidXc || range.invalidSheetName) {
|
|
25586
25595
|
return new InvalidReferenceError();
|
|
25587
25596
|
}
|
|
@@ -43587,7 +43596,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
43587
43596
|
});
|
|
43588
43597
|
}
|
|
43589
43598
|
getMeasureId(fieldName, aggregator) {
|
|
43590
|
-
const baseId = fieldName + (aggregator ? `:${aggregator}` : "");
|
|
43599
|
+
const baseId = fieldName.replaceAll("'", "") + (aggregator ? `:${aggregator}` : "");
|
|
43591
43600
|
let id = baseId;
|
|
43592
43601
|
let i = 2;
|
|
43593
43602
|
while (this.props.definition.measures.some((m) => m.id === id)) {
|
|
@@ -74639,9 +74648,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
74639
74648
|
exports.tokenize = tokenize;
|
|
74640
74649
|
|
|
74641
74650
|
|
|
74642
|
-
__info__.version = "18.0.
|
|
74643
|
-
__info__.date = "2025-
|
|
74644
|
-
__info__.hash = "
|
|
74651
|
+
__info__.version = "18.0.40";
|
|
74652
|
+
__info__.date = "2025-08-18T08:15:29.422Z";
|
|
74653
|
+
__info__.hash = "ec79db4";
|
|
74645
74654
|
|
|
74646
74655
|
|
|
74647
74656
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|