@odoo/o-spreadsheet 17.4.0 → 17.4.1
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.
|
@@ -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.4.
|
|
6
|
-
* @date 2024-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.1
|
|
6
|
+
* @date 2024-07-18T14:25:54.421Z
|
|
7
|
+
* @hash fd7deaa
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -2724,7 +2724,7 @@ function getPredicate(descr, locale) {
|
|
|
2724
2724
|
operand = descr;
|
|
2725
2725
|
}
|
|
2726
2726
|
}
|
|
2727
|
-
if (isNumber(operand, locale)) {
|
|
2727
|
+
if (isNumber(operand, locale) || isDateTime(operand, locale)) {
|
|
2728
2728
|
operand = toNumber(operand, locale);
|
|
2729
2729
|
}
|
|
2730
2730
|
else if (operand === "TRUE" || operand === "FALSE") {
|
|
@@ -35974,9 +35974,15 @@ class PivotLayoutConfigurator extends owl.Component {
|
|
|
35974
35974
|
addMeasureDimension(fieldName) {
|
|
35975
35975
|
const { measures } = this.props.definition;
|
|
35976
35976
|
this.props.onDimensionsUpdated({
|
|
35977
|
-
measures: measures.concat([
|
|
35977
|
+
measures: measures.concat([
|
|
35978
|
+
{ name: fieldName, aggregator: this.getDefaultMeasureAggregator(fieldName) },
|
|
35979
|
+
]),
|
|
35978
35980
|
});
|
|
35979
35981
|
}
|
|
35982
|
+
getDefaultMeasureAggregator(fieldName) {
|
|
35983
|
+
const field = this.props.unusedMeasureFields.find((f) => f.name === fieldName);
|
|
35984
|
+
return field?.aggregator ? field.aggregator : "count";
|
|
35985
|
+
}
|
|
35980
35986
|
updateAggregator(updatedMeasure, aggregator) {
|
|
35981
35987
|
const { measures } = this.props.definition;
|
|
35982
35988
|
this.props.onDimensionsUpdated({
|
|
@@ -36200,7 +36206,7 @@ function createMeasure(fields, measure) {
|
|
|
36200
36206
|
const field = name === "__count"
|
|
36201
36207
|
? { name: "__count", string: _t("Count"), type: "integer", aggregator: "sum" }
|
|
36202
36208
|
: fields[name];
|
|
36203
|
-
const aggregator = measure.aggregator
|
|
36209
|
+
const aggregator = measure.aggregator;
|
|
36204
36210
|
return {
|
|
36205
36211
|
nameWithAggregator: name + (aggregator ? `:${aggregator}` : ""),
|
|
36206
36212
|
/**
|
|
@@ -36936,7 +36942,7 @@ class SpreadsheetPivot {
|
|
|
36936
36942
|
.map((value) => value[measure])
|
|
36937
36943
|
.filter((cell) => cell && cell.type !== CellValueType.empty)
|
|
36938
36944
|
.filter(isDefined);
|
|
36939
|
-
const aggregator = this.getMeasure(measure).aggregator
|
|
36945
|
+
const aggregator = this.getMeasure(measure).aggregator;
|
|
36940
36946
|
const operator = AGGREGATORS_FN[aggregator];
|
|
36941
36947
|
if (!operator) {
|
|
36942
36948
|
throw new Error(`Aggregator ${aggregator} does not exist`);
|
|
@@ -54204,9 +54210,9 @@ class Evaluator {
|
|
|
54204
54210
|
assertNoMergedCellsInSpreadZone({ sheetId, col, row }, matrixResult) {
|
|
54205
54211
|
const mergedCells = this.getters.getMergesInZone(sheetId, {
|
|
54206
54212
|
top: row,
|
|
54207
|
-
bottom: row + matrixResult.length,
|
|
54213
|
+
bottom: row + matrixResult[0].length - 1,
|
|
54208
54214
|
left: col,
|
|
54209
|
-
right: col + matrixResult
|
|
54215
|
+
right: col + matrixResult.length - 1,
|
|
54210
54216
|
});
|
|
54211
54217
|
if (mergedCells.length === 0) {
|
|
54212
54218
|
return;
|
|
@@ -68393,6 +68399,6 @@ exports.tokenColors = tokenColors;
|
|
|
68393
68399
|
exports.tokenize = tokenize;
|
|
68394
68400
|
|
|
68395
68401
|
|
|
68396
|
-
__info__.version = "17.4.
|
|
68397
|
-
__info__.date = "2024-07-
|
|
68398
|
-
__info__.hash = "
|
|
68402
|
+
__info__.version = "17.4.1";
|
|
68403
|
+
__info__.date = "2024-07-18T14:25:54.421Z";
|
|
68404
|
+
__info__.hash = "fd7deaa";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -531,7 +531,7 @@ interface PivotCoreDimension {
|
|
|
531
531
|
}
|
|
532
532
|
interface PivotCoreMeasure {
|
|
533
533
|
name: string;
|
|
534
|
-
aggregator
|
|
534
|
+
aggregator: Aggregator | string;
|
|
535
535
|
}
|
|
536
536
|
interface CommonPivotCoreDefinition {
|
|
537
537
|
columns: PivotCoreDimension[];
|
|
@@ -9354,6 +9354,7 @@ declare class PivotLayoutConfigurator extends Component<Props$d, SpreadsheetChil
|
|
|
9354
9354
|
addColumnDimension(fieldName: string): void;
|
|
9355
9355
|
addRowDimension(fieldName: string): void;
|
|
9356
9356
|
addMeasureDimension(fieldName: string): void;
|
|
9357
|
+
private getDefaultMeasureAggregator;
|
|
9357
9358
|
updateAggregator(updatedMeasure: PivotMeasure, aggregator: string): void;
|
|
9358
9359
|
updateOrder(updateDimension: PivotDimension$1, order?: "asc" | "desc"): void;
|
|
9359
9360
|
updateGranularity(dimension: PivotDimension$1, granularity: Granularity): void;
|
|
@@ -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.4.
|
|
6
|
-
* @date 2024-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.1
|
|
6
|
+
* @date 2024-07-18T14:25:54.421Z
|
|
7
|
+
* @hash fd7deaa
|
|
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';
|
|
@@ -2722,7 +2722,7 @@ function getPredicate(descr, locale) {
|
|
|
2722
2722
|
operand = descr;
|
|
2723
2723
|
}
|
|
2724
2724
|
}
|
|
2725
|
-
if (isNumber(operand, locale)) {
|
|
2725
|
+
if (isNumber(operand, locale) || isDateTime(operand, locale)) {
|
|
2726
2726
|
operand = toNumber(operand, locale);
|
|
2727
2727
|
}
|
|
2728
2728
|
else if (operand === "TRUE" || operand === "FALSE") {
|
|
@@ -35972,9 +35972,15 @@ class PivotLayoutConfigurator extends Component {
|
|
|
35972
35972
|
addMeasureDimension(fieldName) {
|
|
35973
35973
|
const { measures } = this.props.definition;
|
|
35974
35974
|
this.props.onDimensionsUpdated({
|
|
35975
|
-
measures: measures.concat([
|
|
35975
|
+
measures: measures.concat([
|
|
35976
|
+
{ name: fieldName, aggregator: this.getDefaultMeasureAggregator(fieldName) },
|
|
35977
|
+
]),
|
|
35976
35978
|
});
|
|
35977
35979
|
}
|
|
35980
|
+
getDefaultMeasureAggregator(fieldName) {
|
|
35981
|
+
const field = this.props.unusedMeasureFields.find((f) => f.name === fieldName);
|
|
35982
|
+
return field?.aggregator ? field.aggregator : "count";
|
|
35983
|
+
}
|
|
35978
35984
|
updateAggregator(updatedMeasure, aggregator) {
|
|
35979
35985
|
const { measures } = this.props.definition;
|
|
35980
35986
|
this.props.onDimensionsUpdated({
|
|
@@ -36198,7 +36204,7 @@ function createMeasure(fields, measure) {
|
|
|
36198
36204
|
const field = name === "__count"
|
|
36199
36205
|
? { name: "__count", string: _t("Count"), type: "integer", aggregator: "sum" }
|
|
36200
36206
|
: fields[name];
|
|
36201
|
-
const aggregator = measure.aggregator
|
|
36207
|
+
const aggregator = measure.aggregator;
|
|
36202
36208
|
return {
|
|
36203
36209
|
nameWithAggregator: name + (aggregator ? `:${aggregator}` : ""),
|
|
36204
36210
|
/**
|
|
@@ -36934,7 +36940,7 @@ class SpreadsheetPivot {
|
|
|
36934
36940
|
.map((value) => value[measure])
|
|
36935
36941
|
.filter((cell) => cell && cell.type !== CellValueType.empty)
|
|
36936
36942
|
.filter(isDefined);
|
|
36937
|
-
const aggregator = this.getMeasure(measure).aggregator
|
|
36943
|
+
const aggregator = this.getMeasure(measure).aggregator;
|
|
36938
36944
|
const operator = AGGREGATORS_FN[aggregator];
|
|
36939
36945
|
if (!operator) {
|
|
36940
36946
|
throw new Error(`Aggregator ${aggregator} does not exist`);
|
|
@@ -54202,9 +54208,9 @@ class Evaluator {
|
|
|
54202
54208
|
assertNoMergedCellsInSpreadZone({ sheetId, col, row }, matrixResult) {
|
|
54203
54209
|
const mergedCells = this.getters.getMergesInZone(sheetId, {
|
|
54204
54210
|
top: row,
|
|
54205
|
-
bottom: row + matrixResult.length,
|
|
54211
|
+
bottom: row + matrixResult[0].length - 1,
|
|
54206
54212
|
left: col,
|
|
54207
|
-
right: col + matrixResult
|
|
54213
|
+
right: col + matrixResult.length - 1,
|
|
54208
54214
|
});
|
|
54209
54215
|
if (mergedCells.length === 0) {
|
|
54210
54216
|
return;
|
|
@@ -68348,6 +68354,6 @@ const constants = {
|
|
|
68348
68354
|
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 };
|
|
68349
68355
|
|
|
68350
68356
|
|
|
68351
|
-
__info__.version = "17.4.
|
|
68352
|
-
__info__.date = "2024-07-
|
|
68353
|
-
__info__.hash = "
|
|
68357
|
+
__info__.version = "17.4.1";
|
|
68358
|
+
__info__.date = "2024-07-18T14:25:54.421Z";
|
|
68359
|
+
__info__.hash = "fd7deaa";
|
|
@@ -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.4.
|
|
6
|
-
* @date 2024-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.1
|
|
6
|
+
* @date 2024-07-18T14:25:54.421Z
|
|
7
|
+
* @hash fd7deaa
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -2723,7 +2723,7 @@
|
|
|
2723
2723
|
operand = descr;
|
|
2724
2724
|
}
|
|
2725
2725
|
}
|
|
2726
|
-
if (isNumber(operand, locale)) {
|
|
2726
|
+
if (isNumber(operand, locale) || isDateTime(operand, locale)) {
|
|
2727
2727
|
operand = toNumber(operand, locale);
|
|
2728
2728
|
}
|
|
2729
2729
|
else if (operand === "TRUE" || operand === "FALSE") {
|
|
@@ -35973,9 +35973,15 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35973
35973
|
addMeasureDimension(fieldName) {
|
|
35974
35974
|
const { measures } = this.props.definition;
|
|
35975
35975
|
this.props.onDimensionsUpdated({
|
|
35976
|
-
measures: measures.concat([
|
|
35976
|
+
measures: measures.concat([
|
|
35977
|
+
{ name: fieldName, aggregator: this.getDefaultMeasureAggregator(fieldName) },
|
|
35978
|
+
]),
|
|
35977
35979
|
});
|
|
35978
35980
|
}
|
|
35981
|
+
getDefaultMeasureAggregator(fieldName) {
|
|
35982
|
+
const field = this.props.unusedMeasureFields.find((f) => f.name === fieldName);
|
|
35983
|
+
return field?.aggregator ? field.aggregator : "count";
|
|
35984
|
+
}
|
|
35979
35985
|
updateAggregator(updatedMeasure, aggregator) {
|
|
35980
35986
|
const { measures } = this.props.definition;
|
|
35981
35987
|
this.props.onDimensionsUpdated({
|
|
@@ -36199,7 +36205,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36199
36205
|
const field = name === "__count"
|
|
36200
36206
|
? { name: "__count", string: _t("Count"), type: "integer", aggregator: "sum" }
|
|
36201
36207
|
: fields[name];
|
|
36202
|
-
const aggregator = measure.aggregator
|
|
36208
|
+
const aggregator = measure.aggregator;
|
|
36203
36209
|
return {
|
|
36204
36210
|
nameWithAggregator: name + (aggregator ? `:${aggregator}` : ""),
|
|
36205
36211
|
/**
|
|
@@ -36935,7 +36941,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36935
36941
|
.map((value) => value[measure])
|
|
36936
36942
|
.filter((cell) => cell && cell.type !== CellValueType.empty)
|
|
36937
36943
|
.filter(isDefined);
|
|
36938
|
-
const aggregator = this.getMeasure(measure).aggregator
|
|
36944
|
+
const aggregator = this.getMeasure(measure).aggregator;
|
|
36939
36945
|
const operator = AGGREGATORS_FN[aggregator];
|
|
36940
36946
|
if (!operator) {
|
|
36941
36947
|
throw new Error(`Aggregator ${aggregator} does not exist`);
|
|
@@ -54203,9 +54209,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54203
54209
|
assertNoMergedCellsInSpreadZone({ sheetId, col, row }, matrixResult) {
|
|
54204
54210
|
const mergedCells = this.getters.getMergesInZone(sheetId, {
|
|
54205
54211
|
top: row,
|
|
54206
|
-
bottom: row + matrixResult.length,
|
|
54212
|
+
bottom: row + matrixResult[0].length - 1,
|
|
54207
54213
|
left: col,
|
|
54208
|
-
right: col + matrixResult
|
|
54214
|
+
right: col + matrixResult.length - 1,
|
|
54209
54215
|
});
|
|
54210
54216
|
if (mergedCells.length === 0) {
|
|
54211
54217
|
return;
|
|
@@ -68392,9 +68398,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68392
68398
|
exports.tokenize = tokenize;
|
|
68393
68399
|
|
|
68394
68400
|
|
|
68395
|
-
__info__.version = "17.4.
|
|
68396
|
-
__info__.date = "2024-07-
|
|
68397
|
-
__info__.hash = "
|
|
68401
|
+
__info__.version = "17.4.1";
|
|
68402
|
+
__info__.date = "2024-07-18T14:25:54.421Z";
|
|
68403
|
+
__info__.hash = "fd7deaa";
|
|
68398
68404
|
|
|
68399
68405
|
|
|
68400
68406
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|