@odoo/o-spreadsheet 17.0.79 → 17.0.83
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 +48 -29
- package/dist/o-spreadsheet.esm.js +48 -29
- package/dist/o-spreadsheet.iife.js +48 -29
- package/dist/o-spreadsheet.iife.min.js +5 -17
- package/dist/o_spreadsheet.xml +32 -34
- 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 17.0.
|
|
6
|
-
* @date
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.83
|
|
6
|
+
* @date 2026-01-07T16:21:02.501Z
|
|
7
|
+
* @hash bd315c8
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -2879,17 +2879,41 @@ function toCriterionDateNumber(dateValue) {
|
|
|
2879
2879
|
const today = DateTime.now();
|
|
2880
2880
|
switch (dateValue) {
|
|
2881
2881
|
case "today":
|
|
2882
|
-
return jsDateToNumber(today);
|
|
2883
|
-
case "yesterday":
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2882
|
+
return Math.floor(jsDateToNumber(today));
|
|
2883
|
+
case "yesterday": {
|
|
2884
|
+
today.setDate(today.getDate() - 1);
|
|
2885
|
+
return Math.floor(jsDateToNumber(today));
|
|
2886
|
+
}
|
|
2887
|
+
case "tomorrow": {
|
|
2888
|
+
today.setDate(today.getDate() + 1);
|
|
2889
|
+
return Math.floor(jsDateToNumber(today));
|
|
2890
|
+
}
|
|
2887
2891
|
case "lastWeek":
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2892
|
+
today.setDate(today.getDate() - 6);
|
|
2893
|
+
return Math.floor(jsDateToNumber(today));
|
|
2894
|
+
case "lastMonth": {
|
|
2895
|
+
const lastMonth = today.getMonth() === 0 ? 11 : today.getMonth() - 1;
|
|
2896
|
+
const dateInLastMonth = new DateTime(today.getFullYear(), lastMonth, 1);
|
|
2897
|
+
if (today.getDate() > getDaysInMonth(dateInLastMonth)) {
|
|
2898
|
+
today.setDate(1);
|
|
2899
|
+
}
|
|
2900
|
+
else {
|
|
2901
|
+
today.setDate(today.getDate() + 1);
|
|
2902
|
+
today.setMonth(today.getMonth() - 1);
|
|
2903
|
+
}
|
|
2904
|
+
return Math.floor(jsDateToNumber(today));
|
|
2905
|
+
}
|
|
2891
2906
|
case "lastYear":
|
|
2892
|
-
|
|
2907
|
+
// Handle leap year case
|
|
2908
|
+
if (today.getMonth() === 1 && today.getDate() === 29) {
|
|
2909
|
+
today.setDate(28);
|
|
2910
|
+
today.setFullYear(today.getFullYear() - 1);
|
|
2911
|
+
}
|
|
2912
|
+
else {
|
|
2913
|
+
today.setDate(today.getDate() + 1);
|
|
2914
|
+
today.setFullYear(today.getFullYear() - 1);
|
|
2915
|
+
}
|
|
2916
|
+
return Math.floor(jsDateToNumber(today));
|
|
2893
2917
|
}
|
|
2894
2918
|
}
|
|
2895
2919
|
/** Get all the dates values of a criterion converted to numbers, converting date values such as "today" to actual dates */
|
|
@@ -23479,17 +23503,10 @@ css /* scss */ `
|
|
|
23479
23503
|
}
|
|
23480
23504
|
.o-cf-preview-icon {
|
|
23481
23505
|
border: 1px solid lightgrey;
|
|
23482
|
-
position: absolute;
|
|
23483
23506
|
height: 50px;
|
|
23484
23507
|
width: 50px;
|
|
23485
23508
|
}
|
|
23486
23509
|
.o-cf-preview-description {
|
|
23487
|
-
left: 65px;
|
|
23488
|
-
margin-bottom: auto;
|
|
23489
|
-
margin-right: 8px;
|
|
23490
|
-
margin-top: auto;
|
|
23491
|
-
position: relative;
|
|
23492
|
-
width: 142px;
|
|
23493
23510
|
.o-cf-preview-description-rule {
|
|
23494
23511
|
margin-bottom: 4px;
|
|
23495
23512
|
font-weight: 600;
|
|
@@ -23501,16 +23518,11 @@ css /* scss */ `
|
|
|
23501
23518
|
font-size: 12px;
|
|
23502
23519
|
}
|
|
23503
23520
|
}
|
|
23504
|
-
.o-cf-delete {
|
|
23505
|
-
left: 90%;
|
|
23506
|
-
top: 39%;
|
|
23507
|
-
position: absolute;
|
|
23508
|
-
}
|
|
23509
23521
|
&:not(:hover):not(.o-cf-dragging) .o-cf-drag-handle {
|
|
23510
23522
|
display: none !important;
|
|
23511
23523
|
}
|
|
23512
23524
|
.o-cf-drag-handle {
|
|
23513
|
-
left:
|
|
23525
|
+
left: 2px;
|
|
23514
23526
|
cursor: move;
|
|
23515
23527
|
.o-icon {
|
|
23516
23528
|
width: 6px;
|
|
@@ -24653,7 +24665,7 @@ dataValidationEvaluatorRegistry.add("dateIs", {
|
|
|
24653
24665
|
return false;
|
|
24654
24666
|
}
|
|
24655
24667
|
if (["lastWeek", "lastMonth", "lastYear"].includes(criterion.dateValue)) {
|
|
24656
|
-
const today =
|
|
24668
|
+
const today = Math.floor(jsDateToNumber(DateTime.now()));
|
|
24657
24669
|
return isDateBetween(dateValue, today, criterionValue);
|
|
24658
24670
|
}
|
|
24659
24671
|
return areDatesSameDay(dateValue, criterionValue);
|
|
@@ -42299,6 +42311,13 @@ class Evaluator {
|
|
|
42299
42311
|
this.assertSheetHasEnoughSpaceToSpreadFormulaResult(formulaPosition, formulaReturn);
|
|
42300
42312
|
const nbColumns = formulaReturn.length;
|
|
42301
42313
|
const nbRows = formulaReturn[0].length;
|
|
42314
|
+
if (nbRows === 0) {
|
|
42315
|
+
// empty matrix
|
|
42316
|
+
return createEvaluatedCell(null, {
|
|
42317
|
+
format: cellData.format,
|
|
42318
|
+
locale: this.getters.getLocale(),
|
|
42319
|
+
});
|
|
42320
|
+
}
|
|
42302
42321
|
forEachSpreadPositionInMatrix(nbColumns, nbRows, this.updateSpreadRelation(formulaPosition));
|
|
42303
42322
|
forEachSpreadPositionInMatrix(nbColumns, nbRows, this.checkCollision(formulaPosition));
|
|
42304
42323
|
forEachSpreadPositionInMatrix(nbColumns, nbRows,
|
|
@@ -58520,6 +58539,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
58520
58539
|
exports.tokenize = tokenize;
|
|
58521
58540
|
|
|
58522
58541
|
|
|
58523
|
-
__info__.version = "17.0.
|
|
58524
|
-
__info__.date = "
|
|
58525
|
-
__info__.hash = "
|
|
58542
|
+
__info__.version = "17.0.83";
|
|
58543
|
+
__info__.date = "2026-01-07T16:21:02.501Z";
|
|
58544
|
+
__info__.hash = "bd315c8";
|
|
@@ -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.0.
|
|
6
|
-
* @date
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.83
|
|
6
|
+
* @date 2026-01-07T16:21:02.501Z
|
|
7
|
+
* @hash bd315c8
|
|
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';
|
|
@@ -2877,17 +2877,41 @@ function toCriterionDateNumber(dateValue) {
|
|
|
2877
2877
|
const today = DateTime.now();
|
|
2878
2878
|
switch (dateValue) {
|
|
2879
2879
|
case "today":
|
|
2880
|
-
return jsDateToNumber(today);
|
|
2881
|
-
case "yesterday":
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2880
|
+
return Math.floor(jsDateToNumber(today));
|
|
2881
|
+
case "yesterday": {
|
|
2882
|
+
today.setDate(today.getDate() - 1);
|
|
2883
|
+
return Math.floor(jsDateToNumber(today));
|
|
2884
|
+
}
|
|
2885
|
+
case "tomorrow": {
|
|
2886
|
+
today.setDate(today.getDate() + 1);
|
|
2887
|
+
return Math.floor(jsDateToNumber(today));
|
|
2888
|
+
}
|
|
2885
2889
|
case "lastWeek":
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2890
|
+
today.setDate(today.getDate() - 6);
|
|
2891
|
+
return Math.floor(jsDateToNumber(today));
|
|
2892
|
+
case "lastMonth": {
|
|
2893
|
+
const lastMonth = today.getMonth() === 0 ? 11 : today.getMonth() - 1;
|
|
2894
|
+
const dateInLastMonth = new DateTime(today.getFullYear(), lastMonth, 1);
|
|
2895
|
+
if (today.getDate() > getDaysInMonth(dateInLastMonth)) {
|
|
2896
|
+
today.setDate(1);
|
|
2897
|
+
}
|
|
2898
|
+
else {
|
|
2899
|
+
today.setDate(today.getDate() + 1);
|
|
2900
|
+
today.setMonth(today.getMonth() - 1);
|
|
2901
|
+
}
|
|
2902
|
+
return Math.floor(jsDateToNumber(today));
|
|
2903
|
+
}
|
|
2889
2904
|
case "lastYear":
|
|
2890
|
-
|
|
2905
|
+
// Handle leap year case
|
|
2906
|
+
if (today.getMonth() === 1 && today.getDate() === 29) {
|
|
2907
|
+
today.setDate(28);
|
|
2908
|
+
today.setFullYear(today.getFullYear() - 1);
|
|
2909
|
+
}
|
|
2910
|
+
else {
|
|
2911
|
+
today.setDate(today.getDate() + 1);
|
|
2912
|
+
today.setFullYear(today.getFullYear() - 1);
|
|
2913
|
+
}
|
|
2914
|
+
return Math.floor(jsDateToNumber(today));
|
|
2891
2915
|
}
|
|
2892
2916
|
}
|
|
2893
2917
|
/** Get all the dates values of a criterion converted to numbers, converting date values such as "today" to actual dates */
|
|
@@ -23477,17 +23501,10 @@ css /* scss */ `
|
|
|
23477
23501
|
}
|
|
23478
23502
|
.o-cf-preview-icon {
|
|
23479
23503
|
border: 1px solid lightgrey;
|
|
23480
|
-
position: absolute;
|
|
23481
23504
|
height: 50px;
|
|
23482
23505
|
width: 50px;
|
|
23483
23506
|
}
|
|
23484
23507
|
.o-cf-preview-description {
|
|
23485
|
-
left: 65px;
|
|
23486
|
-
margin-bottom: auto;
|
|
23487
|
-
margin-right: 8px;
|
|
23488
|
-
margin-top: auto;
|
|
23489
|
-
position: relative;
|
|
23490
|
-
width: 142px;
|
|
23491
23508
|
.o-cf-preview-description-rule {
|
|
23492
23509
|
margin-bottom: 4px;
|
|
23493
23510
|
font-weight: 600;
|
|
@@ -23499,16 +23516,11 @@ css /* scss */ `
|
|
|
23499
23516
|
font-size: 12px;
|
|
23500
23517
|
}
|
|
23501
23518
|
}
|
|
23502
|
-
.o-cf-delete {
|
|
23503
|
-
left: 90%;
|
|
23504
|
-
top: 39%;
|
|
23505
|
-
position: absolute;
|
|
23506
|
-
}
|
|
23507
23519
|
&:not(:hover):not(.o-cf-dragging) .o-cf-drag-handle {
|
|
23508
23520
|
display: none !important;
|
|
23509
23521
|
}
|
|
23510
23522
|
.o-cf-drag-handle {
|
|
23511
|
-
left:
|
|
23523
|
+
left: 2px;
|
|
23512
23524
|
cursor: move;
|
|
23513
23525
|
.o-icon {
|
|
23514
23526
|
width: 6px;
|
|
@@ -24651,7 +24663,7 @@ dataValidationEvaluatorRegistry.add("dateIs", {
|
|
|
24651
24663
|
return false;
|
|
24652
24664
|
}
|
|
24653
24665
|
if (["lastWeek", "lastMonth", "lastYear"].includes(criterion.dateValue)) {
|
|
24654
|
-
const today =
|
|
24666
|
+
const today = Math.floor(jsDateToNumber(DateTime.now()));
|
|
24655
24667
|
return isDateBetween(dateValue, today, criterionValue);
|
|
24656
24668
|
}
|
|
24657
24669
|
return areDatesSameDay(dateValue, criterionValue);
|
|
@@ -42297,6 +42309,13 @@ class Evaluator {
|
|
|
42297
42309
|
this.assertSheetHasEnoughSpaceToSpreadFormulaResult(formulaPosition, formulaReturn);
|
|
42298
42310
|
const nbColumns = formulaReturn.length;
|
|
42299
42311
|
const nbRows = formulaReturn[0].length;
|
|
42312
|
+
if (nbRows === 0) {
|
|
42313
|
+
// empty matrix
|
|
42314
|
+
return createEvaluatedCell(null, {
|
|
42315
|
+
format: cellData.format,
|
|
42316
|
+
locale: this.getters.getLocale(),
|
|
42317
|
+
});
|
|
42318
|
+
}
|
|
42300
42319
|
forEachSpreadPositionInMatrix(nbColumns, nbRows, this.updateSpreadRelation(formulaPosition));
|
|
42301
42320
|
forEachSpreadPositionInMatrix(nbColumns, nbRows, this.checkCollision(formulaPosition));
|
|
42302
42321
|
forEachSpreadPositionInMatrix(nbColumns, nbRows,
|
|
@@ -58483,6 +58502,6 @@ const constants = {
|
|
|
58483
58502
|
export { AbstractChart, 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 };
|
|
58484
58503
|
|
|
58485
58504
|
|
|
58486
|
-
__info__.version = "17.0.
|
|
58487
|
-
__info__.date = "
|
|
58488
|
-
__info__.hash = "
|
|
58505
|
+
__info__.version = "17.0.83";
|
|
58506
|
+
__info__.date = "2026-01-07T16:21:02.501Z";
|
|
58507
|
+
__info__.hash = "bd315c8";
|
|
@@ -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.0.
|
|
6
|
-
* @date
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.83
|
|
6
|
+
* @date 2026-01-07T16:21:02.501Z
|
|
7
|
+
* @hash bd315c8
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -2878,17 +2878,41 @@
|
|
|
2878
2878
|
const today = DateTime.now();
|
|
2879
2879
|
switch (dateValue) {
|
|
2880
2880
|
case "today":
|
|
2881
|
-
return jsDateToNumber(today);
|
|
2882
|
-
case "yesterday":
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2881
|
+
return Math.floor(jsDateToNumber(today));
|
|
2882
|
+
case "yesterday": {
|
|
2883
|
+
today.setDate(today.getDate() - 1);
|
|
2884
|
+
return Math.floor(jsDateToNumber(today));
|
|
2885
|
+
}
|
|
2886
|
+
case "tomorrow": {
|
|
2887
|
+
today.setDate(today.getDate() + 1);
|
|
2888
|
+
return Math.floor(jsDateToNumber(today));
|
|
2889
|
+
}
|
|
2886
2890
|
case "lastWeek":
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2891
|
+
today.setDate(today.getDate() - 6);
|
|
2892
|
+
return Math.floor(jsDateToNumber(today));
|
|
2893
|
+
case "lastMonth": {
|
|
2894
|
+
const lastMonth = today.getMonth() === 0 ? 11 : today.getMonth() - 1;
|
|
2895
|
+
const dateInLastMonth = new DateTime(today.getFullYear(), lastMonth, 1);
|
|
2896
|
+
if (today.getDate() > getDaysInMonth(dateInLastMonth)) {
|
|
2897
|
+
today.setDate(1);
|
|
2898
|
+
}
|
|
2899
|
+
else {
|
|
2900
|
+
today.setDate(today.getDate() + 1);
|
|
2901
|
+
today.setMonth(today.getMonth() - 1);
|
|
2902
|
+
}
|
|
2903
|
+
return Math.floor(jsDateToNumber(today));
|
|
2904
|
+
}
|
|
2890
2905
|
case "lastYear":
|
|
2891
|
-
|
|
2906
|
+
// Handle leap year case
|
|
2907
|
+
if (today.getMonth() === 1 && today.getDate() === 29) {
|
|
2908
|
+
today.setDate(28);
|
|
2909
|
+
today.setFullYear(today.getFullYear() - 1);
|
|
2910
|
+
}
|
|
2911
|
+
else {
|
|
2912
|
+
today.setDate(today.getDate() + 1);
|
|
2913
|
+
today.setFullYear(today.getFullYear() - 1);
|
|
2914
|
+
}
|
|
2915
|
+
return Math.floor(jsDateToNumber(today));
|
|
2892
2916
|
}
|
|
2893
2917
|
}
|
|
2894
2918
|
/** Get all the dates values of a criterion converted to numbers, converting date values such as "today" to actual dates */
|
|
@@ -23478,17 +23502,10 @@
|
|
|
23478
23502
|
}
|
|
23479
23503
|
.o-cf-preview-icon {
|
|
23480
23504
|
border: 1px solid lightgrey;
|
|
23481
|
-
position: absolute;
|
|
23482
23505
|
height: 50px;
|
|
23483
23506
|
width: 50px;
|
|
23484
23507
|
}
|
|
23485
23508
|
.o-cf-preview-description {
|
|
23486
|
-
left: 65px;
|
|
23487
|
-
margin-bottom: auto;
|
|
23488
|
-
margin-right: 8px;
|
|
23489
|
-
margin-top: auto;
|
|
23490
|
-
position: relative;
|
|
23491
|
-
width: 142px;
|
|
23492
23509
|
.o-cf-preview-description-rule {
|
|
23493
23510
|
margin-bottom: 4px;
|
|
23494
23511
|
font-weight: 600;
|
|
@@ -23500,16 +23517,11 @@
|
|
|
23500
23517
|
font-size: 12px;
|
|
23501
23518
|
}
|
|
23502
23519
|
}
|
|
23503
|
-
.o-cf-delete {
|
|
23504
|
-
left: 90%;
|
|
23505
|
-
top: 39%;
|
|
23506
|
-
position: absolute;
|
|
23507
|
-
}
|
|
23508
23520
|
&:not(:hover):not(.o-cf-dragging) .o-cf-drag-handle {
|
|
23509
23521
|
display: none !important;
|
|
23510
23522
|
}
|
|
23511
23523
|
.o-cf-drag-handle {
|
|
23512
|
-
left:
|
|
23524
|
+
left: 2px;
|
|
23513
23525
|
cursor: move;
|
|
23514
23526
|
.o-icon {
|
|
23515
23527
|
width: 6px;
|
|
@@ -24652,7 +24664,7 @@
|
|
|
24652
24664
|
return false;
|
|
24653
24665
|
}
|
|
24654
24666
|
if (["lastWeek", "lastMonth", "lastYear"].includes(criterion.dateValue)) {
|
|
24655
|
-
const today =
|
|
24667
|
+
const today = Math.floor(jsDateToNumber(DateTime.now()));
|
|
24656
24668
|
return isDateBetween(dateValue, today, criterionValue);
|
|
24657
24669
|
}
|
|
24658
24670
|
return areDatesSameDay(dateValue, criterionValue);
|
|
@@ -42298,6 +42310,13 @@
|
|
|
42298
42310
|
this.assertSheetHasEnoughSpaceToSpreadFormulaResult(formulaPosition, formulaReturn);
|
|
42299
42311
|
const nbColumns = formulaReturn.length;
|
|
42300
42312
|
const nbRows = formulaReturn[0].length;
|
|
42313
|
+
if (nbRows === 0) {
|
|
42314
|
+
// empty matrix
|
|
42315
|
+
return createEvaluatedCell(null, {
|
|
42316
|
+
format: cellData.format,
|
|
42317
|
+
locale: this.getters.getLocale(),
|
|
42318
|
+
});
|
|
42319
|
+
}
|
|
42301
42320
|
forEachSpreadPositionInMatrix(nbColumns, nbRows, this.updateSpreadRelation(formulaPosition));
|
|
42302
42321
|
forEachSpreadPositionInMatrix(nbColumns, nbRows, this.checkCollision(formulaPosition));
|
|
42303
42322
|
forEachSpreadPositionInMatrix(nbColumns, nbRows,
|
|
@@ -58519,9 +58538,9 @@
|
|
|
58519
58538
|
exports.tokenize = tokenize;
|
|
58520
58539
|
|
|
58521
58540
|
|
|
58522
|
-
__info__.version = "17.0.
|
|
58523
|
-
__info__.date = "
|
|
58524
|
-
__info__.hash = "
|
|
58541
|
+
__info__.version = "17.0.83";
|
|
58542
|
+
__info__.date = "2026-01-07T16:21:02.501Z";
|
|
58543
|
+
__info__.hash = "bd315c8";
|
|
58525
58544
|
|
|
58526
58545
|
|
|
58527
58546
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|