@odoo/o-spreadsheet 18.5.0-alpha.1 → 18.5.0-alpha.2
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 +155 -53
- package/dist/o-spreadsheet.d.ts +39 -2
- package/dist/o-spreadsheet.esm.js +155 -53
- package/dist/o-spreadsheet.iife.js +155 -53
- package/dist/o-spreadsheet.iife.min.js +391 -391
- package/dist/o_spreadsheet.xml +29 -27
- 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.5.0-alpha.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.5.0-alpha.2
|
|
6
|
+
* @date 2025-07-11T11:13:53.317Z
|
|
7
|
+
* @hash 6d42178
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -854,6 +854,7 @@ const specialWhiteSpaceSpecialCharacters = [
|
|
|
854
854
|
];
|
|
855
855
|
const specialWhiteSpaceRegexp = new RegExp(specialWhiteSpaceSpecialCharacters.join("|"), "g");
|
|
856
856
|
const newLineRegexp = /(\r\n|\r)/g;
|
|
857
|
+
const whiteSpaceCharacters = specialWhiteSpaceSpecialCharacters.concat([" "]);
|
|
857
858
|
/**
|
|
858
859
|
* Replace all different newlines characters by \n
|
|
859
860
|
*/
|
|
@@ -1990,8 +1991,9 @@ const INITIAL_JS_DAY = DateTime.fromTimestamp(0);
|
|
|
1990
1991
|
const DATE_JS_1900_OFFSET = INITIAL_JS_DAY.getTime() - INITIAL_1900_DAY.getTime();
|
|
1991
1992
|
const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
|
|
1992
1993
|
const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
|
|
1993
|
-
const
|
|
1994
|
-
const
|
|
1994
|
+
const whiteSpaceChars = whiteSpaceCharacters.join("");
|
|
1995
|
+
const dateSeparatorsRegex = new RegExp(`\/|-|${whiteSpaceCharacters.join("|")}`);
|
|
1996
|
+
const dateRegexp = new RegExp(`^(\\d{1,4})[\/${whiteSpaceChars}\-](\\d{1,4})([\/${whiteSpaceChars}\-](\\d{1,4}))?$`);
|
|
1995
1997
|
const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
|
|
1996
1998
|
/** Convert a value number representing a date, or return undefined if it isn't possible */
|
|
1997
1999
|
function valueToDateNumber(value, locale) {
|
|
@@ -6926,6 +6928,8 @@ function splitWordToSpecificWidth(ctx, word, width, style) {
|
|
|
6926
6928
|
function splitTextToWidth(ctx, text, style, width) {
|
|
6927
6929
|
if (!style)
|
|
6928
6930
|
style = {};
|
|
6931
|
+
if (isMarkdownLink(text))
|
|
6932
|
+
text = parseMarkdownLink(text).label;
|
|
6929
6933
|
const brokenText = [];
|
|
6930
6934
|
// Checking if text contains NEWLINE before split makes it very slightly slower if text contains it,
|
|
6931
6935
|
// but 5-10x faster if it doesn't
|
|
@@ -8766,6 +8770,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
|
|
|
8766
8770
|
if (groupValue === null || groupValue === "null") {
|
|
8767
8771
|
return null;
|
|
8768
8772
|
}
|
|
8773
|
+
const extractedGroupValue = typeof groupValue === "object" ? groupValue.value : groupValue;
|
|
8774
|
+
if (isEvaluationError(extractedGroupValue)) {
|
|
8775
|
+
return extractedGroupValue;
|
|
8776
|
+
}
|
|
8769
8777
|
const groupValueString = typeof groupValue === "boolean"
|
|
8770
8778
|
? toString(groupValue).toLocaleLowerCase()
|
|
8771
8779
|
: toString(groupValue);
|
|
@@ -27448,7 +27456,9 @@ function getSectionThresholdValue(sheetId, threshold, minValue, maxValue, getter
|
|
|
27448
27456
|
}
|
|
27449
27457
|
function getFormulaNumberValue(sheetId, formula, getters) {
|
|
27450
27458
|
const value = getters.evaluateFormula(sheetId, formula);
|
|
27451
|
-
return
|
|
27459
|
+
return isMultipleElementMatrix(value)
|
|
27460
|
+
? undefined
|
|
27461
|
+
: tryToNumber(toScalar(value), getters.getLocale());
|
|
27452
27462
|
}
|
|
27453
27463
|
function getInvalidGaugeRuntime(chart, getters) {
|
|
27454
27464
|
return {
|
|
@@ -31073,6 +31083,9 @@ class ErrorToolTip extends owl.Component {
|
|
|
31073
31083
|
return undefined;
|
|
31074
31084
|
}
|
|
31075
31085
|
get errorOriginPositionString() {
|
|
31086
|
+
if (this.env.model.getters.isDashboard()) {
|
|
31087
|
+
return "";
|
|
31088
|
+
}
|
|
31076
31089
|
const evaluationError = this.evaluationError;
|
|
31077
31090
|
const position = evaluationError?.errorOriginPosition;
|
|
31078
31091
|
if (!position || deepEquals(position, this.props.cellPosition)) {
|
|
@@ -39221,40 +39234,112 @@ function convertPivotTableConfig(pivotTable) {
|
|
|
39221
39234
|
* In all the sheets, replace the table-only references in the formula cells with standard references.
|
|
39222
39235
|
*/
|
|
39223
39236
|
function convertTableFormulaReferences(convertedSheets, xlsxSheets) {
|
|
39237
|
+
let deconstructedSheets = null;
|
|
39224
39238
|
for (const tableSheet of convertedSheets) {
|
|
39225
39239
|
const tables = xlsxSheets.find((s) => isSheetNameEqual(s.sheetName, tableSheet.name)).tables;
|
|
39240
|
+
if (!tables || tables.length === 0) {
|
|
39241
|
+
continue;
|
|
39242
|
+
}
|
|
39243
|
+
// Only deconstruct sheets if we are sure there are tables to process
|
|
39244
|
+
if (!deconstructedSheets) {
|
|
39245
|
+
deconstructedSheets = deconstructSheets(convertedSheets);
|
|
39246
|
+
}
|
|
39226
39247
|
for (const table of tables) {
|
|
39227
|
-
const
|
|
39228
|
-
|
|
39229
|
-
for (const xc in
|
|
39230
|
-
const
|
|
39231
|
-
let
|
|
39232
|
-
|
|
39233
|
-
|
|
39234
|
-
|
|
39235
|
-
let endIndex = refIndex + tabRef.length;
|
|
39236
|
-
let openBrackets = 1;
|
|
39237
|
-
while (openBrackets > 0 && endIndex < cellContent.length) {
|
|
39238
|
-
if (cellContent[endIndex] === "[") {
|
|
39239
|
-
openBrackets++;
|
|
39240
|
-
}
|
|
39241
|
-
else if (cellContent[endIndex] === "]") {
|
|
39242
|
-
openBrackets--;
|
|
39243
|
-
}
|
|
39244
|
-
endIndex++;
|
|
39245
|
-
}
|
|
39246
|
-
const reference = cellContent.slice(refIndex + tabRef.length, endIndex - 1);
|
|
39247
|
-
const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
|
|
39248
|
-
const convertedRef = convertTableReference(sheetPrefix, reference, table, xc);
|
|
39249
|
-
cellContent =
|
|
39250
|
-
cellContent.slice(0, refIndex) + convertedRef + cellContent.slice(endIndex);
|
|
39248
|
+
for (const sheetId in deconstructedSheets) {
|
|
39249
|
+
const sheet = convertedSheets.find((s) => s.id === sheetId);
|
|
39250
|
+
for (const xc in deconstructedSheets[sheetId]) {
|
|
39251
|
+
const deconstructedCell = deconstructedSheets[sheetId][xc];
|
|
39252
|
+
for (let i = deconstructedCell.length - 3; i >= 0; i -= 2) {
|
|
39253
|
+
const possibleTable = deconstructedSheets[sheetId][xc][i];
|
|
39254
|
+
if (!possibleTable.endsWith(table.name)) {
|
|
39255
|
+
continue;
|
|
39251
39256
|
}
|
|
39257
|
+
const possibleRef = deconstructedSheets[sheetId][xc][i + 1];
|
|
39258
|
+
const sheetPrefix = tableSheet.id === sheet.id ? "" : tableSheet.name + "!";
|
|
39259
|
+
const convertedRef = convertTableReference(sheetPrefix, possibleRef, table, xc);
|
|
39260
|
+
deconstructedSheets[sheetId][xc][i + 2] =
|
|
39261
|
+
possibleTable.slice(0, possibleTable.indexOf(table.name)) +
|
|
39262
|
+
convertedRef +
|
|
39263
|
+
deconstructedSheets[sheetId][xc][i + 2];
|
|
39264
|
+
deconstructedSheets[sheetId][xc].splice(i, 2);
|
|
39252
39265
|
}
|
|
39253
|
-
sheet.cells[xc] = cellContent;
|
|
39266
|
+
// sheet.cells[xc] = cellContent;
|
|
39254
39267
|
}
|
|
39255
39268
|
}
|
|
39256
39269
|
}
|
|
39257
39270
|
}
|
|
39271
|
+
if (!deconstructedSheets) {
|
|
39272
|
+
return;
|
|
39273
|
+
}
|
|
39274
|
+
for (const sheetId in deconstructedSheets) {
|
|
39275
|
+
const sheet = convertedSheets.find((s) => s.id === sheetId);
|
|
39276
|
+
for (const xc in deconstructedSheets[sheetId]) {
|
|
39277
|
+
const deconstructedCell = deconstructedSheets[sheetId][xc];
|
|
39278
|
+
if (deconstructedCell.length === 1) {
|
|
39279
|
+
sheet.cells[xc] = deconstructedCell[0];
|
|
39280
|
+
continue;
|
|
39281
|
+
}
|
|
39282
|
+
let newContent = "";
|
|
39283
|
+
for (let i = 0; i < deconstructedCell.length; i += 2) {
|
|
39284
|
+
newContent += deconstructedCell[i] + "[" + deconstructedCell[i + 1] + "]";
|
|
39285
|
+
}
|
|
39286
|
+
newContent += deconstructedCell[deconstructedCell.length - 1];
|
|
39287
|
+
sheet.cells[xc] = newContent;
|
|
39288
|
+
}
|
|
39289
|
+
}
|
|
39290
|
+
}
|
|
39291
|
+
/**
|
|
39292
|
+
* Deconstruct the content of the cells in the sheets to extract possible table references.
|
|
39293
|
+
* Example from "=AVERAGE(Table1[colName1])-AVERAGE(Table2[colName2])":
|
|
39294
|
+
* return --> ["=AVERAGE(Table1", "colName1", ")-AVERAGE(Table2", "colName2", ")"]
|
|
39295
|
+
*/
|
|
39296
|
+
function deconstructSheets(convertedSheets) {
|
|
39297
|
+
const deconstructedSheets = {};
|
|
39298
|
+
for (const sheet of convertedSheets) {
|
|
39299
|
+
for (const xc in sheet.cells) {
|
|
39300
|
+
const cellContent = sheet.cells[xc];
|
|
39301
|
+
if (!cellContent || !cellContent.startsWith("=")) {
|
|
39302
|
+
continue;
|
|
39303
|
+
}
|
|
39304
|
+
const startIndex = cellContent.indexOf("[");
|
|
39305
|
+
if (startIndex === -1) {
|
|
39306
|
+
continue;
|
|
39307
|
+
}
|
|
39308
|
+
const deconstructedCell = [];
|
|
39309
|
+
let possibleTable = cellContent.slice(0, startIndex);
|
|
39310
|
+
let possibleRef = "";
|
|
39311
|
+
let openBrackets = 1;
|
|
39312
|
+
let mainPossibleTableIndex = 0;
|
|
39313
|
+
let mainOpenBracketIndex = startIndex;
|
|
39314
|
+
for (let index = startIndex + 1; index < cellContent.length; index++) {
|
|
39315
|
+
if (cellContent[index] === "[") {
|
|
39316
|
+
if (openBrackets === 0) {
|
|
39317
|
+
possibleTable = cellContent.slice(mainPossibleTableIndex, index);
|
|
39318
|
+
mainOpenBracketIndex = index;
|
|
39319
|
+
}
|
|
39320
|
+
openBrackets++;
|
|
39321
|
+
continue;
|
|
39322
|
+
}
|
|
39323
|
+
if (cellContent[index] === "]") {
|
|
39324
|
+
openBrackets--;
|
|
39325
|
+
if (openBrackets === 0) {
|
|
39326
|
+
possibleRef = cellContent.slice(mainOpenBracketIndex + 1, index);
|
|
39327
|
+
deconstructedCell.push(possibleTable);
|
|
39328
|
+
deconstructedCell.push(possibleRef);
|
|
39329
|
+
mainPossibleTableIndex = index + 1;
|
|
39330
|
+
}
|
|
39331
|
+
}
|
|
39332
|
+
}
|
|
39333
|
+
if (deconstructedCell.length) {
|
|
39334
|
+
if (!deconstructedSheets[sheet.id]) {
|
|
39335
|
+
deconstructedSheets[sheet.id] = {};
|
|
39336
|
+
}
|
|
39337
|
+
deconstructedCell.push(cellContent.slice(mainPossibleTableIndex));
|
|
39338
|
+
deconstructedSheets[sheet.id][xc] = [...deconstructedCell];
|
|
39339
|
+
}
|
|
39340
|
+
}
|
|
39341
|
+
}
|
|
39342
|
+
return deconstructedSheets;
|
|
39258
39343
|
}
|
|
39259
39344
|
/**
|
|
39260
39345
|
* Convert table-specific references in formulas into standard references. A table reference is composed of columns names,
|
|
@@ -45566,10 +45651,10 @@ class CellComposerStore extends AbstractComposerStore {
|
|
|
45566
45651
|
const cellValue = isFormula(content)
|
|
45567
45652
|
? this.getters.evaluateFormula(this.sheetId, content)
|
|
45568
45653
|
: parseLiteral(content, this.getters.getLocale());
|
|
45569
|
-
if (
|
|
45654
|
+
if (isMultipleElementMatrix(cellValue)) {
|
|
45570
45655
|
return true;
|
|
45571
45656
|
}
|
|
45572
|
-
const validationResult = this.getters.getValidationResultForCellValue(cellValue, cellPosition);
|
|
45657
|
+
const validationResult = this.getters.getValidationResultForCellValue(toScalar(cellValue), cellPosition);
|
|
45573
45658
|
if (!validationResult.isValid && validationResult.rule.isBlocking) {
|
|
45574
45659
|
return false;
|
|
45575
45660
|
}
|
|
@@ -50681,10 +50766,10 @@ class GaugeChartDesignPanel extends owl.Component {
|
|
|
50681
50766
|
return tryToNumber(value, locale) !== undefined;
|
|
50682
50767
|
}
|
|
50683
50768
|
const evaluatedValue = this.env.model.getters.evaluateFormula(this.sheetId, value);
|
|
50684
|
-
if (
|
|
50769
|
+
if (isMultipleElementMatrix(evaluatedValue)) {
|
|
50685
50770
|
return false;
|
|
50686
50771
|
}
|
|
50687
|
-
return tryToNumber(evaluatedValue, locale) !== undefined;
|
|
50772
|
+
return tryToNumber(toScalar(evaluatedValue), locale) !== undefined;
|
|
50688
50773
|
}
|
|
50689
50774
|
get sheetId() {
|
|
50690
50775
|
const chart = this.env.model.getters.getChart(this.props.figureId);
|
|
@@ -51538,12 +51623,32 @@ class ChartPanel extends owl.Component {
|
|
|
51538
51623
|
static template = "o-spreadsheet-ChartPanel";
|
|
51539
51624
|
static components = { Section, ChartTypePicker };
|
|
51540
51625
|
static props = { onCloseSidePanel: Function, figureId: String };
|
|
51626
|
+
panelContentRef;
|
|
51627
|
+
scrollPositions = {
|
|
51628
|
+
configuration: 0,
|
|
51629
|
+
design: 0,
|
|
51630
|
+
};
|
|
51541
51631
|
store;
|
|
51542
51632
|
get figureId() {
|
|
51543
51633
|
return this.props.figureId;
|
|
51544
51634
|
}
|
|
51545
51635
|
setup() {
|
|
51546
51636
|
this.store = useLocalStore(MainChartPanelStore);
|
|
51637
|
+
this.panelContentRef = owl.useRef("panelContent");
|
|
51638
|
+
owl.useEffect(() => {
|
|
51639
|
+
const el = this.panelContentRef.el;
|
|
51640
|
+
const activePanel = this.store.panel;
|
|
51641
|
+
if (el) {
|
|
51642
|
+
el.scrollTop = this.scrollPositions[activePanel];
|
|
51643
|
+
}
|
|
51644
|
+
}, () => [this.store.panel]);
|
|
51645
|
+
}
|
|
51646
|
+
switchPanel(panel) {
|
|
51647
|
+
const el = this.panelContentRef.el;
|
|
51648
|
+
if (el) {
|
|
51649
|
+
this.scrollPositions[this.store.panel] = el.scrollTop;
|
|
51650
|
+
}
|
|
51651
|
+
this.store.activatePanel(panel);
|
|
51547
51652
|
}
|
|
51548
51653
|
updateChart(figureId, updateDefinition) {
|
|
51549
51654
|
if (figureId !== this.figureId) {
|
|
@@ -55495,10 +55600,7 @@ class SpreadsheetPivot {
|
|
|
55495
55600
|
if (finalCell.value === null) {
|
|
55496
55601
|
return { value: _t("(Undefined)") };
|
|
55497
55602
|
}
|
|
55498
|
-
return
|
|
55499
|
-
value: finalCell.value,
|
|
55500
|
-
format: finalCell.format,
|
|
55501
|
-
};
|
|
55603
|
+
return finalCell;
|
|
55502
55604
|
}
|
|
55503
55605
|
getPivotCellValueAndFormat(measureId, domain) {
|
|
55504
55606
|
const dataEntries = this.filterDataEntriesFromDomain(this.dataEntries, domain);
|
|
@@ -55736,7 +55838,6 @@ pivotRegistry.add("SPREADSHEET", {
|
|
|
55736
55838
|
ui: SpreadsheetPivot,
|
|
55737
55839
|
definition: SpreadsheetPivotRuntimeDefinition,
|
|
55738
55840
|
externalData: false,
|
|
55739
|
-
onIterationEndEvaluation: (pivot) => pivot.markAsDirtyForEvaluation(),
|
|
55740
55841
|
dateGranularities: [...dateGranularities],
|
|
55741
55842
|
datetimeGranularities: [...dateGranularities, "hour_number", "minute_number", "second_number"],
|
|
55742
55843
|
isMeasureCandidate: (field) => field.type !== "boolean",
|
|
@@ -64387,7 +64488,7 @@ const onIterationEndEvaluationRegistry = new Registry();
|
|
|
64387
64488
|
onIterationEndEvaluationRegistry.add("pivots", (getters) => {
|
|
64388
64489
|
for (const pivotId of getters.getPivotIds()) {
|
|
64389
64490
|
const pivot = getters.getPivot(pivotId);
|
|
64390
|
-
|
|
64491
|
+
pivot.markAsDirtyForEvaluation?.();
|
|
64391
64492
|
}
|
|
64392
64493
|
});
|
|
64393
64494
|
|
|
@@ -66851,12 +66952,12 @@ class EvaluationConditionalFormatPlugin extends CoreViewPlugin {
|
|
|
66851
66952
|
}
|
|
66852
66953
|
return this.getters.evaluateFormula(sheetId, value) ?? "";
|
|
66853
66954
|
});
|
|
66854
|
-
if (evaluatedCriterionValues.some(
|
|
66955
|
+
if (evaluatedCriterionValues.some(isMultipleElementMatrix)) {
|
|
66855
66956
|
return false;
|
|
66856
66957
|
}
|
|
66857
66958
|
const evaluatedCriterion = {
|
|
66858
66959
|
type: rule.operator,
|
|
66859
|
-
values: evaluatedCriterionValues,
|
|
66960
|
+
values: evaluatedCriterionValues.map(toScalar),
|
|
66860
66961
|
};
|
|
66861
66962
|
return evaluator.isValueValid(cell.value ?? "", evaluatedCriterion, this.getters, sheetId);
|
|
66862
66963
|
}
|
|
@@ -67016,10 +67117,10 @@ class EvaluationDataValidationPlugin extends CoreViewPlugin {
|
|
|
67016
67117
|
const evaluator = criterionEvaluatorRegistry.get(criterion.type);
|
|
67017
67118
|
const offset = this.getCellOffsetInRule(cellPosition, rule);
|
|
67018
67119
|
const evaluatedCriterionValues = this.getEvaluatedCriterionValues(sheetId, offset, criterion);
|
|
67019
|
-
if (evaluatedCriterionValues.some(
|
|
67120
|
+
if (evaluatedCriterionValues.some(isMultipleElementMatrix)) {
|
|
67020
67121
|
return undefined;
|
|
67021
67122
|
}
|
|
67022
|
-
const evaluatedCriterion = { ...criterion, values: evaluatedCriterionValues };
|
|
67123
|
+
const evaluatedCriterion = { ...criterion, values: evaluatedCriterionValues.map(toScalar) };
|
|
67023
67124
|
if (evaluator.isValueValid(cellValue, evaluatedCriterion, this.getters, sheetId)) {
|
|
67024
67125
|
return undefined;
|
|
67025
67126
|
}
|
|
@@ -67662,13 +67763,13 @@ function withPivotPresentationLayer (PivotClass) {
|
|
|
67662
67763
|
super(custom, params);
|
|
67663
67764
|
this.getters = params.getters;
|
|
67664
67765
|
}
|
|
67665
|
-
|
|
67766
|
+
markAsDirtyForEvaluation() {
|
|
67666
67767
|
this.cache = {};
|
|
67667
67768
|
this.rankAsc = {};
|
|
67668
67769
|
this.rankDesc = {};
|
|
67669
67770
|
this.runningTotal = {};
|
|
67670
67771
|
this.runningTotalInPercent = {};
|
|
67671
|
-
super.
|
|
67772
|
+
super.markAsDirtyForEvaluation?.();
|
|
67672
67773
|
}
|
|
67673
67774
|
getPivotCellValueAndFormat(measureName, domain) {
|
|
67674
67775
|
return this.getMeasureDisplayValue(measureName, domain);
|
|
@@ -67793,7 +67894,7 @@ function withPivotPresentationLayer (PivotClass) {
|
|
|
67793
67894
|
return this.getSubTreeMatchingDomain(node.children, domain, domainLevel + 1);
|
|
67794
67895
|
}
|
|
67795
67896
|
}
|
|
67796
|
-
return
|
|
67897
|
+
return [];
|
|
67797
67898
|
}
|
|
67798
67899
|
treeToLeafDomains(tree, parentDomain = []) {
|
|
67799
67900
|
const domains = [];
|
|
@@ -73532,12 +73633,12 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
73532
73633
|
}
|
|
73533
73634
|
return this.getters.evaluateFormula(sheetId, value) ?? "";
|
|
73534
73635
|
});
|
|
73535
|
-
if (evaluatedCriterionValues.some(
|
|
73636
|
+
if (evaluatedCriterionValues.some(isMultipleElementMatrix)) {
|
|
73536
73637
|
continue;
|
|
73537
73638
|
}
|
|
73538
73639
|
const evaluatedCriterion = {
|
|
73539
73640
|
type: filterValue.type,
|
|
73540
|
-
values: evaluatedCriterionValues,
|
|
73641
|
+
values: evaluatedCriterionValues.map(toScalar),
|
|
73541
73642
|
dateValue: filterValue.dateValue,
|
|
73542
73643
|
};
|
|
73543
73644
|
for (let row = filteredZone.top; row <= filteredZone.bottom; row++) {
|
|
@@ -84465,6 +84566,7 @@ const stores = {
|
|
|
84465
84566
|
PivotSidePanelStore,
|
|
84466
84567
|
PivotMeasureDisplayPanelStore,
|
|
84467
84568
|
ClientFocusStore,
|
|
84569
|
+
GridRenderer,
|
|
84468
84570
|
};
|
|
84469
84571
|
function addFunction(functionName, functionDescription) {
|
|
84470
84572
|
functionRegistry.add(functionName, functionDescription);
|
|
@@ -84531,6 +84633,6 @@ exports.tokenColors = tokenColors;
|
|
|
84531
84633
|
exports.tokenize = tokenize;
|
|
84532
84634
|
|
|
84533
84635
|
|
|
84534
|
-
__info__.version = "18.5.0-alpha.
|
|
84535
|
-
__info__.date = "2025-
|
|
84536
|
-
__info__.hash = "
|
|
84636
|
+
__info__.version = "18.5.0-alpha.2";
|
|
84637
|
+
__info__.date = "2025-07-11T11:13:53.317Z";
|
|
84638
|
+
__info__.hash = "6d42178";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -5835,6 +5835,7 @@ interface Pivot<T = PivotRuntimeDefinition> {
|
|
|
5835
5835
|
label: string;
|
|
5836
5836
|
}[];
|
|
5837
5837
|
needsReevaluation: boolean;
|
|
5838
|
+
markAsDirtyForEvaluation?(): void;
|
|
5838
5839
|
}
|
|
5839
5840
|
|
|
5840
5841
|
declare class PivotUIPlugin extends CoreViewPlugin {
|
|
@@ -6750,7 +6751,6 @@ interface PivotRegistryItem {
|
|
|
6750
6751
|
ui: PivotUIConstructor;
|
|
6751
6752
|
definition: PivotDefinitionConstructor;
|
|
6752
6753
|
externalData: boolean;
|
|
6753
|
-
onIterationEndEvaluation: (pivot: Pivot) => void;
|
|
6754
6754
|
dateGranularities: string[];
|
|
6755
6755
|
datetimeGranularities: string[];
|
|
6756
6756
|
isMeasureCandidate: (field: PivotField) => boolean;
|
|
@@ -10515,9 +10515,12 @@ declare class ChartPanel extends Component<Props$u, SpreadsheetChildEnv> {
|
|
|
10515
10515
|
onCloseSidePanel: FunctionConstructor;
|
|
10516
10516
|
figureId: StringConstructor;
|
|
10517
10517
|
};
|
|
10518
|
+
private panelContentRef;
|
|
10519
|
+
private scrollPositions;
|
|
10518
10520
|
store: Store<MainChartPanelStore>;
|
|
10519
10521
|
get figureId(): UID;
|
|
10520
10522
|
setup(): void;
|
|
10523
|
+
switchPanel(panel: "configuration" | "design"): void;
|
|
10521
10524
|
updateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
|
|
10522
10525
|
canUpdateChart<T extends ChartDefinition>(figureId: UID, updateDefinition: Partial<T>): DispatchResult | undefined;
|
|
10523
10526
|
onTypeChange(type: ChartType): void;
|
|
@@ -10855,7 +10858,7 @@ declare function createPivotFormula(formulaId: string, cell: PivotTableCell): st
|
|
|
10855
10858
|
* e.g. given the following formula PIVOT.VALUE("1", "stage_id", "42", "status", "won"),
|
|
10856
10859
|
* the two group values are "42" and "won".
|
|
10857
10860
|
*/
|
|
10858
|
-
declare function toNormalizedPivotValue(dimension: Pick<PivotDimension$1, "type" | "displayName" | "granularity">, groupValue:
|
|
10861
|
+
declare function toNormalizedPivotValue(dimension: Pick<PivotDimension$1, "type" | "displayName" | "granularity">, groupValue: Maybe<CellValue | FunctionResultObject>): CellValue;
|
|
10859
10862
|
declare function toFunctionPivotValue(value: CellValue, dimension: Pick<PivotDimension$1, "type" | "granularity">): string;
|
|
10860
10863
|
|
|
10861
10864
|
interface Props$k {
|
|
@@ -11668,6 +11671,39 @@ declare class ClientFocusStore extends SpreadsheetStore {
|
|
|
11668
11671
|
unfocusClient(clientId: ClientId): void;
|
|
11669
11672
|
}
|
|
11670
11673
|
|
|
11674
|
+
declare class GridRenderer extends SpreadsheetStore {
|
|
11675
|
+
private fingerprints;
|
|
11676
|
+
private hoveredTables;
|
|
11677
|
+
private hoveredIcon;
|
|
11678
|
+
private lastRenderBoxes;
|
|
11679
|
+
private preventNewAnimationsInNextFrame;
|
|
11680
|
+
private zonesWithPreventedAnimationsInNextFrame;
|
|
11681
|
+
private animations;
|
|
11682
|
+
constructor(get: Get);
|
|
11683
|
+
handle(cmd: Command): void;
|
|
11684
|
+
get renderingLayers(): readonly ["Background", "Headers"];
|
|
11685
|
+
drawLayer(renderingContext: GridRenderingContext, layer: LayerName, timeStamp: number | undefined): void;
|
|
11686
|
+
private drawGlobalBackground;
|
|
11687
|
+
private drawBackground;
|
|
11688
|
+
private drawCellBackground;
|
|
11689
|
+
private drawOverflowingCellBackground;
|
|
11690
|
+
private drawBorders;
|
|
11691
|
+
private drawTexts;
|
|
11692
|
+
private drawIcon;
|
|
11693
|
+
private drawHeaders;
|
|
11694
|
+
private drawFrozenPanesHeaders;
|
|
11695
|
+
private drawFrozenPanes;
|
|
11696
|
+
private findNextEmptyCol;
|
|
11697
|
+
private findPreviousEmptyCol;
|
|
11698
|
+
private computeCellAlignment;
|
|
11699
|
+
private createZoneBox;
|
|
11700
|
+
private getGridBoxes;
|
|
11701
|
+
private getBoxesWithAnimations;
|
|
11702
|
+
private updateBoxesWithAnimations;
|
|
11703
|
+
private updateAnimationsProgress;
|
|
11704
|
+
private addNewAnimations;
|
|
11705
|
+
}
|
|
11706
|
+
|
|
11671
11707
|
declare class LocalTransportService implements TransportService<CollaborationMessage> {
|
|
11672
11708
|
private listeners;
|
|
11673
11709
|
sendMessage(message: CollaborationMessage): Promise<void>;
|
|
@@ -12585,6 +12621,7 @@ declare const stores: {
|
|
|
12585
12621
|
PivotSidePanelStore: typeof PivotSidePanelStore;
|
|
12586
12622
|
PivotMeasureDisplayPanelStore: typeof PivotMeasureDisplayPanelStore;
|
|
12587
12623
|
ClientFocusStore: typeof ClientFocusStore;
|
|
12624
|
+
GridRenderer: typeof GridRenderer;
|
|
12588
12625
|
};
|
|
12589
12626
|
|
|
12590
12627
|
declare function addFunction(functionName: string, functionDescription: AddFunctionDescription): {
|