@odoo/o-spreadsheet 19.0.7 → 19.0.9
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 +44 -11
- package/dist/o-spreadsheet.d.ts +3 -0
- package/dist/o-spreadsheet.esm.js +44 -11
- package/dist/o-spreadsheet.iife.js +44 -11
- package/dist/o-spreadsheet.iife.min.js +248 -248
- package/dist/o_spreadsheet.xml +23 -13
- package/package.json +1 -1
- package/readme.md +1 -0
|
@@ -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 19.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.0.9
|
|
6
|
+
* @date 2025-11-03T12:32:15.473Z
|
|
7
|
+
* @hash 10359f4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -6266,10 +6266,18 @@ function _roundFormat(internalFormat) {
|
|
|
6266
6266
|
};
|
|
6267
6267
|
}
|
|
6268
6268
|
function humanizeNumber({ value, format }, locale) {
|
|
6269
|
-
const
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
}
|
|
6269
|
+
const numberValue = tryToNumber(value, locale);
|
|
6270
|
+
if (numberValue === undefined) {
|
|
6271
|
+
return "";
|
|
6272
|
+
}
|
|
6273
|
+
let numberFormat = format;
|
|
6274
|
+
if (Math.abs(numberValue) < 1000) {
|
|
6275
|
+
const hasDecimal = numberValue % 1 !== 0;
|
|
6276
|
+
numberFormat = !format && hasDecimal ? "0.####" : format;
|
|
6277
|
+
}
|
|
6278
|
+
else {
|
|
6279
|
+
numberFormat = formatLargeNumber({ value, format }, undefined, locale);
|
|
6280
|
+
}
|
|
6273
6281
|
return formatValue(value, { format: numberFormat, locale });
|
|
6274
6282
|
}
|
|
6275
6283
|
function formatLargeNumber(arg, unit, locale) {
|
|
@@ -34125,7 +34133,7 @@ class ContentEditableHelper {
|
|
|
34125
34133
|
else {
|
|
34126
34134
|
text += NEWLINE;
|
|
34127
34135
|
}
|
|
34128
|
-
emptyParagraph =
|
|
34136
|
+
emptyParagraph = isEmptyParagraph(current.value);
|
|
34129
34137
|
continue;
|
|
34130
34138
|
}
|
|
34131
34139
|
if (!current.value.hasChildNodes()) {
|
|
@@ -34146,6 +34154,21 @@ function compareContentToSpanElement(content, node) {
|
|
|
34146
34154
|
const sameContent = node.innerText === content.value;
|
|
34147
34155
|
return sameColor && sameClass && sameContent;
|
|
34148
34156
|
}
|
|
34157
|
+
const doc = new DOMParser();
|
|
34158
|
+
const brNode = doc.parseFromString("<br>", "text/html").body.firstChild;
|
|
34159
|
+
const spanBrNode = doc.parseFromString("<span><br></span>", "text/html").body.firstChild;
|
|
34160
|
+
function isEmptyParagraph(node) {
|
|
34161
|
+
if (node.childNodes.length > 1)
|
|
34162
|
+
return false;
|
|
34163
|
+
const node2 = node.firstChild?.cloneNode(true);
|
|
34164
|
+
if (!node2)
|
|
34165
|
+
return true;
|
|
34166
|
+
if (!(node2 instanceof Element))
|
|
34167
|
+
return false;
|
|
34168
|
+
node2.removeAttribute("class");
|
|
34169
|
+
node2.removeAttribute("style");
|
|
34170
|
+
return node2.isEqualNode(brNode) || node2.isEqualNode(spanBrNode) || false;
|
|
34171
|
+
}
|
|
34149
34172
|
|
|
34150
34173
|
class FunctionDescriptionProvider extends owl.Component {
|
|
34151
34174
|
static template = "o-spreadsheet-FunctionDescriptionProvider";
|
|
@@ -43995,8 +44018,10 @@ const LEGACY_VERSION_MAPPING = {
|
|
|
43995
44018
|
17: "17.4",
|
|
43996
44019
|
16: "17.3",
|
|
43997
44020
|
15: "17.2",
|
|
44021
|
+
"14.5": "16.4.1",
|
|
43998
44022
|
14: "16.4",
|
|
43999
44023
|
13: "16.3",
|
|
44024
|
+
"12.5": "15.4.1",
|
|
44000
44025
|
12: "15.4",
|
|
44001
44026
|
// not accurate starting at this point
|
|
44002
44027
|
11: "0.10",
|
|
@@ -54904,6 +54929,12 @@ class ChartHumanizeNumbers extends owl.Component {
|
|
|
54904
54929
|
updateChart: Function,
|
|
54905
54930
|
canUpdateChart: Function,
|
|
54906
54931
|
};
|
|
54932
|
+
get title() {
|
|
54933
|
+
const locale = this.env.model.getters.getLocale();
|
|
54934
|
+
const format = formatLargeNumber({ value: 1234567 }, undefined, locale);
|
|
54935
|
+
const value = formatValue(1234567, { format, locale });
|
|
54936
|
+
return _t("E.g. 1234567 -> %(value)s", { value });
|
|
54937
|
+
}
|
|
54907
54938
|
}
|
|
54908
54939
|
|
|
54909
54940
|
class ChartLegend extends owl.Component {
|
|
@@ -55891,6 +55922,7 @@ class SunburstChartDesignPanel extends owl.Component {
|
|
|
55891
55922
|
RoundColorPicker,
|
|
55892
55923
|
ChartLegend,
|
|
55893
55924
|
PieHoleSize,
|
|
55925
|
+
ChartHumanizeNumbers,
|
|
55894
55926
|
};
|
|
55895
55927
|
static props = {
|
|
55896
55928
|
chartId: String,
|
|
@@ -56004,6 +56036,7 @@ class TreeMapChartDesignPanel extends owl.Component {
|
|
|
56004
56036
|
BadgeSelection,
|
|
56005
56037
|
TreeMapCategoryColors,
|
|
56006
56038
|
TreeMapColorScale,
|
|
56039
|
+
ChartHumanizeNumbers,
|
|
56007
56040
|
};
|
|
56008
56041
|
static props = {
|
|
56009
56042
|
chartId: String,
|
|
@@ -88936,6 +88969,6 @@ exports.tokenColors = tokenColors;
|
|
|
88936
88969
|
exports.tokenize = tokenize;
|
|
88937
88970
|
|
|
88938
88971
|
|
|
88939
|
-
__info__.version = "19.0.
|
|
88940
|
-
__info__.date = "2025-
|
|
88941
|
-
__info__.hash = "
|
|
88972
|
+
__info__.version = "19.0.9";
|
|
88973
|
+
__info__.date = "2025-11-03T12:32:15.473Z";
|
|
88974
|
+
__info__.hash = "10359f4";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -8330,6 +8330,7 @@ declare class ChartHumanizeNumbers extends Component<Props$19, SpreadsheetChildE
|
|
|
8330
8330
|
updateChart: FunctionConstructor;
|
|
8331
8331
|
canUpdateChart: FunctionConstructor;
|
|
8332
8332
|
};
|
|
8333
|
+
get title(): string;
|
|
8333
8334
|
}
|
|
8334
8335
|
|
|
8335
8336
|
interface Props$18 {
|
|
@@ -11779,6 +11780,7 @@ declare class SunburstChartDesignPanel extends Component<Props$c, SpreadsheetChi
|
|
|
11779
11780
|
RoundColorPicker: typeof RoundColorPicker;
|
|
11780
11781
|
ChartLegend: typeof ChartLegend;
|
|
11781
11782
|
PieHoleSize: typeof PieHoleSize;
|
|
11783
|
+
ChartHumanizeNumbers: typeof ChartHumanizeNumbers;
|
|
11782
11784
|
};
|
|
11783
11785
|
static props: {
|
|
11784
11786
|
chartId: StringConstructor;
|
|
@@ -11864,6 +11866,7 @@ declare class TreeMapChartDesignPanel extends Component<Props$9, SpreadsheetChil
|
|
|
11864
11866
|
BadgeSelection: typeof BadgeSelection;
|
|
11865
11867
|
TreeMapCategoryColors: typeof TreeMapCategoryColors;
|
|
11866
11868
|
TreeMapColorScale: typeof TreeMapColorScale;
|
|
11869
|
+
ChartHumanizeNumbers: typeof ChartHumanizeNumbers;
|
|
11867
11870
|
};
|
|
11868
11871
|
static props: {
|
|
11869
11872
|
chartId: StringConstructor;
|
|
@@ -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 19.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.0.9
|
|
6
|
+
* @date 2025-11-03T12:32:15.473Z
|
|
7
|
+
* @hash 10359f4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -6264,10 +6264,18 @@ function _roundFormat(internalFormat) {
|
|
|
6264
6264
|
};
|
|
6265
6265
|
}
|
|
6266
6266
|
function humanizeNumber({ value, format }, locale) {
|
|
6267
|
-
const
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
}
|
|
6267
|
+
const numberValue = tryToNumber(value, locale);
|
|
6268
|
+
if (numberValue === undefined) {
|
|
6269
|
+
return "";
|
|
6270
|
+
}
|
|
6271
|
+
let numberFormat = format;
|
|
6272
|
+
if (Math.abs(numberValue) < 1000) {
|
|
6273
|
+
const hasDecimal = numberValue % 1 !== 0;
|
|
6274
|
+
numberFormat = !format && hasDecimal ? "0.####" : format;
|
|
6275
|
+
}
|
|
6276
|
+
else {
|
|
6277
|
+
numberFormat = formatLargeNumber({ value, format }, undefined, locale);
|
|
6278
|
+
}
|
|
6271
6279
|
return formatValue(value, { format: numberFormat, locale });
|
|
6272
6280
|
}
|
|
6273
6281
|
function formatLargeNumber(arg, unit, locale) {
|
|
@@ -34123,7 +34131,7 @@ class ContentEditableHelper {
|
|
|
34123
34131
|
else {
|
|
34124
34132
|
text += NEWLINE;
|
|
34125
34133
|
}
|
|
34126
|
-
emptyParagraph =
|
|
34134
|
+
emptyParagraph = isEmptyParagraph(current.value);
|
|
34127
34135
|
continue;
|
|
34128
34136
|
}
|
|
34129
34137
|
if (!current.value.hasChildNodes()) {
|
|
@@ -34144,6 +34152,21 @@ function compareContentToSpanElement(content, node) {
|
|
|
34144
34152
|
const sameContent = node.innerText === content.value;
|
|
34145
34153
|
return sameColor && sameClass && sameContent;
|
|
34146
34154
|
}
|
|
34155
|
+
const doc = new DOMParser();
|
|
34156
|
+
const brNode = doc.parseFromString("<br>", "text/html").body.firstChild;
|
|
34157
|
+
const spanBrNode = doc.parseFromString("<span><br></span>", "text/html").body.firstChild;
|
|
34158
|
+
function isEmptyParagraph(node) {
|
|
34159
|
+
if (node.childNodes.length > 1)
|
|
34160
|
+
return false;
|
|
34161
|
+
const node2 = node.firstChild?.cloneNode(true);
|
|
34162
|
+
if (!node2)
|
|
34163
|
+
return true;
|
|
34164
|
+
if (!(node2 instanceof Element))
|
|
34165
|
+
return false;
|
|
34166
|
+
node2.removeAttribute("class");
|
|
34167
|
+
node2.removeAttribute("style");
|
|
34168
|
+
return node2.isEqualNode(brNode) || node2.isEqualNode(spanBrNode) || false;
|
|
34169
|
+
}
|
|
34147
34170
|
|
|
34148
34171
|
class FunctionDescriptionProvider extends Component {
|
|
34149
34172
|
static template = "o-spreadsheet-FunctionDescriptionProvider";
|
|
@@ -43993,8 +44016,10 @@ const LEGACY_VERSION_MAPPING = {
|
|
|
43993
44016
|
17: "17.4",
|
|
43994
44017
|
16: "17.3",
|
|
43995
44018
|
15: "17.2",
|
|
44019
|
+
"14.5": "16.4.1",
|
|
43996
44020
|
14: "16.4",
|
|
43997
44021
|
13: "16.3",
|
|
44022
|
+
"12.5": "15.4.1",
|
|
43998
44023
|
12: "15.4",
|
|
43999
44024
|
// not accurate starting at this point
|
|
44000
44025
|
11: "0.10",
|
|
@@ -54902,6 +54927,12 @@ class ChartHumanizeNumbers extends Component {
|
|
|
54902
54927
|
updateChart: Function,
|
|
54903
54928
|
canUpdateChart: Function,
|
|
54904
54929
|
};
|
|
54930
|
+
get title() {
|
|
54931
|
+
const locale = this.env.model.getters.getLocale();
|
|
54932
|
+
const format = formatLargeNumber({ value: 1234567 }, undefined, locale);
|
|
54933
|
+
const value = formatValue(1234567, { format, locale });
|
|
54934
|
+
return _t("E.g. 1234567 -> %(value)s", { value });
|
|
54935
|
+
}
|
|
54905
54936
|
}
|
|
54906
54937
|
|
|
54907
54938
|
class ChartLegend extends Component {
|
|
@@ -55889,6 +55920,7 @@ class SunburstChartDesignPanel extends Component {
|
|
|
55889
55920
|
RoundColorPicker,
|
|
55890
55921
|
ChartLegend,
|
|
55891
55922
|
PieHoleSize,
|
|
55923
|
+
ChartHumanizeNumbers,
|
|
55892
55924
|
};
|
|
55893
55925
|
static props = {
|
|
55894
55926
|
chartId: String,
|
|
@@ -56002,6 +56034,7 @@ class TreeMapChartDesignPanel extends Component {
|
|
|
56002
56034
|
BadgeSelection,
|
|
56003
56035
|
TreeMapCategoryColors,
|
|
56004
56036
|
TreeMapColorScale,
|
|
56037
|
+
ChartHumanizeNumbers,
|
|
56005
56038
|
};
|
|
56006
56039
|
static props = {
|
|
56007
56040
|
chartId: String,
|
|
@@ -88884,6 +88917,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
88884
88917
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
88885
88918
|
|
|
88886
88919
|
|
|
88887
|
-
__info__.version = "19.0.
|
|
88888
|
-
__info__.date = "2025-
|
|
88889
|
-
__info__.hash = "
|
|
88920
|
+
__info__.version = "19.0.9";
|
|
88921
|
+
__info__.date = "2025-11-03T12:32:15.473Z";
|
|
88922
|
+
__info__.hash = "10359f4";
|
|
@@ -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 19.0.
|
|
6
|
-
* @date 2025-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.0.9
|
|
6
|
+
* @date 2025-11-03T12:32:15.473Z
|
|
7
|
+
* @hash 10359f4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -6265,10 +6265,18 @@
|
|
|
6265
6265
|
};
|
|
6266
6266
|
}
|
|
6267
6267
|
function humanizeNumber({ value, format }, locale) {
|
|
6268
|
-
const
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
}
|
|
6268
|
+
const numberValue = tryToNumber(value, locale);
|
|
6269
|
+
if (numberValue === undefined) {
|
|
6270
|
+
return "";
|
|
6271
|
+
}
|
|
6272
|
+
let numberFormat = format;
|
|
6273
|
+
if (Math.abs(numberValue) < 1000) {
|
|
6274
|
+
const hasDecimal = numberValue % 1 !== 0;
|
|
6275
|
+
numberFormat = !format && hasDecimal ? "0.####" : format;
|
|
6276
|
+
}
|
|
6277
|
+
else {
|
|
6278
|
+
numberFormat = formatLargeNumber({ value, format }, undefined, locale);
|
|
6279
|
+
}
|
|
6272
6280
|
return formatValue(value, { format: numberFormat, locale });
|
|
6273
6281
|
}
|
|
6274
6282
|
function formatLargeNumber(arg, unit, locale) {
|
|
@@ -34124,7 +34132,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
34124
34132
|
else {
|
|
34125
34133
|
text += NEWLINE;
|
|
34126
34134
|
}
|
|
34127
|
-
emptyParagraph =
|
|
34135
|
+
emptyParagraph = isEmptyParagraph(current.value);
|
|
34128
34136
|
continue;
|
|
34129
34137
|
}
|
|
34130
34138
|
if (!current.value.hasChildNodes()) {
|
|
@@ -34145,6 +34153,21 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
34145
34153
|
const sameContent = node.innerText === content.value;
|
|
34146
34154
|
return sameColor && sameClass && sameContent;
|
|
34147
34155
|
}
|
|
34156
|
+
const doc = new DOMParser();
|
|
34157
|
+
const brNode = doc.parseFromString("<br>", "text/html").body.firstChild;
|
|
34158
|
+
const spanBrNode = doc.parseFromString("<span><br></span>", "text/html").body.firstChild;
|
|
34159
|
+
function isEmptyParagraph(node) {
|
|
34160
|
+
if (node.childNodes.length > 1)
|
|
34161
|
+
return false;
|
|
34162
|
+
const node2 = node.firstChild?.cloneNode(true);
|
|
34163
|
+
if (!node2)
|
|
34164
|
+
return true;
|
|
34165
|
+
if (!(node2 instanceof Element))
|
|
34166
|
+
return false;
|
|
34167
|
+
node2.removeAttribute("class");
|
|
34168
|
+
node2.removeAttribute("style");
|
|
34169
|
+
return node2.isEqualNode(brNode) || node2.isEqualNode(spanBrNode) || false;
|
|
34170
|
+
}
|
|
34148
34171
|
|
|
34149
34172
|
class FunctionDescriptionProvider extends owl.Component {
|
|
34150
34173
|
static template = "o-spreadsheet-FunctionDescriptionProvider";
|
|
@@ -43994,8 +44017,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
43994
44017
|
17: "17.4",
|
|
43995
44018
|
16: "17.3",
|
|
43996
44019
|
15: "17.2",
|
|
44020
|
+
"14.5": "16.4.1",
|
|
43997
44021
|
14: "16.4",
|
|
43998
44022
|
13: "16.3",
|
|
44023
|
+
"12.5": "15.4.1",
|
|
43999
44024
|
12: "15.4",
|
|
44000
44025
|
// not accurate starting at this point
|
|
44001
44026
|
11: "0.10",
|
|
@@ -54903,6 +54928,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54903
54928
|
updateChart: Function,
|
|
54904
54929
|
canUpdateChart: Function,
|
|
54905
54930
|
};
|
|
54931
|
+
get title() {
|
|
54932
|
+
const locale = this.env.model.getters.getLocale();
|
|
54933
|
+
const format = formatLargeNumber({ value: 1234567 }, undefined, locale);
|
|
54934
|
+
const value = formatValue(1234567, { format, locale });
|
|
54935
|
+
return _t("E.g. 1234567 -> %(value)s", { value });
|
|
54936
|
+
}
|
|
54906
54937
|
}
|
|
54907
54938
|
|
|
54908
54939
|
class ChartLegend extends owl.Component {
|
|
@@ -55890,6 +55921,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
55890
55921
|
RoundColorPicker,
|
|
55891
55922
|
ChartLegend,
|
|
55892
55923
|
PieHoleSize,
|
|
55924
|
+
ChartHumanizeNumbers,
|
|
55893
55925
|
};
|
|
55894
55926
|
static props = {
|
|
55895
55927
|
chartId: String,
|
|
@@ -56003,6 +56035,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56003
56035
|
BadgeSelection,
|
|
56004
56036
|
TreeMapCategoryColors,
|
|
56005
56037
|
TreeMapColorScale,
|
|
56038
|
+
ChartHumanizeNumbers,
|
|
56006
56039
|
};
|
|
56007
56040
|
static props = {
|
|
56008
56041
|
chartId: String,
|
|
@@ -88935,9 +88968,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
88935
88968
|
exports.tokenize = tokenize;
|
|
88936
88969
|
|
|
88937
88970
|
|
|
88938
|
-
__info__.version = "19.0.
|
|
88939
|
-
__info__.date = "2025-
|
|
88940
|
-
__info__.hash = "
|
|
88971
|
+
__info__.version = "19.0.9";
|
|
88972
|
+
__info__.date = "2025-11-03T12:32:15.473Z";
|
|
88973
|
+
__info__.hash = "10359f4";
|
|
88941
88974
|
|
|
88942
88975
|
|
|
88943
88976
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|