@odoo/o-spreadsheet 17.0.50 → 17.0.51
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 +37 -66
- package/dist/o-spreadsheet.d.ts +2 -3
- package/dist/o-spreadsheet.esm.js +37 -66
- package/dist/o-spreadsheet.iife.js +37 -66
- package/dist/o-spreadsheet.iife.min.js +245 -249
- package/dist/o_spreadsheet.xml +30 -26
- package/package.json +2 -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 2025-02-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.51
|
|
6
|
+
* @date 2025-02-25T05:56:10.869Z
|
|
7
|
+
* @hash b433912
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -4733,11 +4733,12 @@ class UuidGenerator {
|
|
|
4733
4733
|
if (this.isFastIdStrategy) {
|
|
4734
4734
|
this.fastIdStart++;
|
|
4735
4735
|
return String(this.fastIdStart);
|
|
4736
|
-
//@ts-ignore
|
|
4737
4736
|
}
|
|
4738
|
-
else if (window.crypto
|
|
4739
|
-
|
|
4740
|
-
|
|
4737
|
+
else if (window.crypto) {
|
|
4738
|
+
return "10000000-1000".replace(/[01]/g, (c) => {
|
|
4739
|
+
const n = Number(c);
|
|
4740
|
+
return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
|
|
4741
|
+
});
|
|
4741
4742
|
}
|
|
4742
4743
|
else {
|
|
4743
4744
|
// mainly for jest and other browsers that do not have the crypto functionality
|
|
@@ -4755,11 +4756,12 @@ class UuidGenerator {
|
|
|
4755
4756
|
if (this.isFastIdStrategy) {
|
|
4756
4757
|
this.fastIdStart++;
|
|
4757
4758
|
return String(this.fastIdStart);
|
|
4758
|
-
//@ts-ignore
|
|
4759
4759
|
}
|
|
4760
|
-
else if (window.crypto
|
|
4761
|
-
|
|
4762
|
-
|
|
4760
|
+
else if (window.crypto) {
|
|
4761
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
4762
|
+
const n = Number(c);
|
|
4763
|
+
return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
|
|
4764
|
+
});
|
|
4763
4765
|
}
|
|
4764
4766
|
else {
|
|
4765
4767
|
// mainly for jest and other browsers that do not have the crypto functionality
|
|
@@ -6985,10 +6987,6 @@ class Popover extends owl.Component {
|
|
|
6985
6987
|
this.currentDisplayValue = newDisplay;
|
|
6986
6988
|
if (!anchor)
|
|
6987
6989
|
return;
|
|
6988
|
-
el.style.top = "";
|
|
6989
|
-
el.style.left = "";
|
|
6990
|
-
el.style["max-height"] = "";
|
|
6991
|
-
el.style["max-width"] = "";
|
|
6992
6990
|
const propsMaxSize = { width: this.props.maxWidth, height: this.props.maxHeight };
|
|
6993
6991
|
let elDims = {
|
|
6994
6992
|
width: el.getBoundingClientRect().width,
|
|
@@ -9730,7 +9728,7 @@ function createPieChartRuntime(chart, getters) {
|
|
|
9730
9728
|
const dataset = {
|
|
9731
9729
|
label,
|
|
9732
9730
|
data,
|
|
9733
|
-
borderColor: "#FFFFFF",
|
|
9731
|
+
borderColor: chart.background || "#FFFFFF",
|
|
9734
9732
|
backgroundColor,
|
|
9735
9733
|
};
|
|
9736
9734
|
config.data.datasets.push(dataset);
|
|
@@ -26762,25 +26760,21 @@ css /* scss */ `
|
|
|
26762
26760
|
}
|
|
26763
26761
|
}
|
|
26764
26762
|
}
|
|
26763
|
+
}
|
|
26764
|
+
.o-spreadsheet .o-composer-assistant {
|
|
26765
|
+
pointer-events: none;
|
|
26765
26766
|
|
|
26766
|
-
.o-
|
|
26767
|
-
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
|
|
26772
|
-
.o-semi-bold {
|
|
26773
|
-
/** FIXME: to remove in favor of Bootstrap
|
|
26774
|
-
* 'fw-semibold' when we upgrade to Bootstrap 5.2
|
|
26775
|
-
*/
|
|
26776
|
-
font-weight: 600 !important;
|
|
26777
|
-
}
|
|
26767
|
+
.o-semi-bold {
|
|
26768
|
+
/** FIXME: to remove in favor of Bootstrap
|
|
26769
|
+
* 'fw-semibold' when we upgrade to Bootstrap 5.2
|
|
26770
|
+
*/
|
|
26771
|
+
font-weight: 600 !important;
|
|
26778
26772
|
}
|
|
26779
26773
|
}
|
|
26780
26774
|
`;
|
|
26781
26775
|
class Composer extends owl.Component {
|
|
26782
26776
|
static template = "o-spreadsheet-Composer";
|
|
26783
|
-
static components = { TextValueProvider, FunctionDescriptionProvider };
|
|
26777
|
+
static components = { TextValueProvider, FunctionDescriptionProvider, Popover };
|
|
26784
26778
|
static defaultProps = {
|
|
26785
26779
|
inputStyle: "",
|
|
26786
26780
|
isDefaultFocus: false,
|
|
@@ -26805,35 +26799,13 @@ class Composer extends owl.Component {
|
|
|
26805
26799
|
argToFocus: 0,
|
|
26806
26800
|
});
|
|
26807
26801
|
compositionActive = false;
|
|
26808
|
-
spreadsheetRect = useSpreadsheetRect();
|
|
26809
26802
|
get assistantStyle() {
|
|
26810
|
-
const composerRect = this.composerRef.el.getBoundingClientRect();
|
|
26811
26803
|
const assistantStyle = {};
|
|
26812
|
-
|
|
26804
|
+
const minWidth = Math.min(getBoundingRectAsPOJO(this.composerRef.el).width || Infinity, ASSISTANT_WIDTH);
|
|
26805
|
+
assistantStyle["min-width"] = `${minWidth}px`;
|
|
26813
26806
|
if (this.autoCompleteState.type === "function") {
|
|
26814
26807
|
assistantStyle.width = `${ASSISTANT_WIDTH}px`;
|
|
26815
26808
|
}
|
|
26816
|
-
if (this.props.delimitation && this.props.rect) {
|
|
26817
|
-
const { x: cellX, y: cellY, height: cellHeight } = this.props.rect;
|
|
26818
|
-
const remainingHeight = this.props.delimitation.height - (cellY + cellHeight);
|
|
26819
|
-
assistantStyle["max-height"] = `${remainingHeight}px`;
|
|
26820
|
-
if (cellY > remainingHeight) {
|
|
26821
|
-
const availableSpaceAbove = cellY;
|
|
26822
|
-
assistantStyle["max-height"] = `${availableSpaceAbove}px`;
|
|
26823
|
-
// render top
|
|
26824
|
-
// We compensate 2 px of margin on the assistant style + 1px for design reasons
|
|
26825
|
-
assistantStyle.top = `-3px`;
|
|
26826
|
-
assistantStyle.transform = `translate(0, -100%)`;
|
|
26827
|
-
}
|
|
26828
|
-
if (cellX + ASSISTANT_WIDTH > this.props.delimitation.width) {
|
|
26829
|
-
// render left
|
|
26830
|
-
assistantStyle.right = `0px`;
|
|
26831
|
-
}
|
|
26832
|
-
}
|
|
26833
|
-
if (this.props.focus === "contentFocus" &&
|
|
26834
|
-
composerRect.left + ASSISTANT_WIDTH > this.spreadsheetRect.width) {
|
|
26835
|
-
assistantStyle.right = "0px";
|
|
26836
|
-
}
|
|
26837
26809
|
return cssPropertiesToCss(assistantStyle);
|
|
26838
26810
|
}
|
|
26839
26811
|
// we can't allow input events to be triggered while we remove and add back the content of the composer in processContent
|
|
@@ -27082,7 +27054,7 @@ class Composer extends owl.Component {
|
|
|
27082
27054
|
this.autoCompleteState.selectedIndex = 0;
|
|
27083
27055
|
}
|
|
27084
27056
|
updateAutoCompleteIndex(index) {
|
|
27085
|
-
this.autoCompleteState.selectedIndex =
|
|
27057
|
+
this.autoCompleteState.selectedIndex = index;
|
|
27086
27058
|
}
|
|
27087
27059
|
/**
|
|
27088
27060
|
* This is required to ensure the content helper selection is
|
|
@@ -27370,11 +27342,16 @@ class Composer extends owl.Component {
|
|
|
27370
27342
|
this.autoCompleteState.values = values.map((value) => ({ text: value, description: "" }));
|
|
27371
27343
|
this.autoCompleteState.getHtmlContent = (value) => [{ value }];
|
|
27372
27344
|
}
|
|
27345
|
+
get popoverProps() {
|
|
27346
|
+
return {
|
|
27347
|
+
anchorRect: getBoundingRectAsPOJO(this.composerRef.el),
|
|
27348
|
+
positioning: "BottomLeft",
|
|
27349
|
+
verticalOffset: 0,
|
|
27350
|
+
};
|
|
27351
|
+
}
|
|
27373
27352
|
}
|
|
27374
27353
|
Composer.props = {
|
|
27375
27354
|
inputStyle: { type: String, optional: true },
|
|
27376
|
-
rect: { type: Object, optional: true },
|
|
27377
|
-
delimitation: { type: Object, optional: true },
|
|
27378
27355
|
focus: { validate: (value) => ["inactive", "cellFocus", "contentFocus"].includes(value) },
|
|
27379
27356
|
onComposerCellFocused: { type: Function, optional: true },
|
|
27380
27357
|
onComposerContentFocused: Function,
|
|
@@ -27444,13 +27421,7 @@ class GridComposer extends owl.Component {
|
|
|
27444
27421
|
});
|
|
27445
27422
|
}
|
|
27446
27423
|
get composerProps() {
|
|
27447
|
-
const { width, height } = this.env.model.getters.getSheetViewDimensionWithHeaders();
|
|
27448
27424
|
return {
|
|
27449
|
-
rect: { ...this.rect },
|
|
27450
|
-
delimitation: {
|
|
27451
|
-
width,
|
|
27452
|
-
height,
|
|
27453
|
-
},
|
|
27454
27425
|
focus: this.props.focus,
|
|
27455
27426
|
isDefaultFocus: true,
|
|
27456
27427
|
onComposerContentFocused: this.props.onComposerContentFocused,
|
|
@@ -33897,7 +33868,7 @@ function normalizeV9(formula) {
|
|
|
33897
33868
|
* a breaking change is made in the way the state is handled, and an upgrade
|
|
33898
33869
|
* function should be defined
|
|
33899
33870
|
*/
|
|
33900
|
-
const CURRENT_VERSION = 14;
|
|
33871
|
+
const CURRENT_VERSION = 14.5;
|
|
33901
33872
|
const INITIAL_SHEET_ID = "Sheet1";
|
|
33902
33873
|
/**
|
|
33903
33874
|
* This function tries to load anything that could look like a valid
|
|
@@ -57974,6 +57945,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
57974
57945
|
exports.tokenize = tokenize;
|
|
57975
57946
|
|
|
57976
57947
|
|
|
57977
|
-
__info__.version = "17.0.
|
|
57978
|
-
__info__.date = "2025-02-
|
|
57979
|
-
__info__.hash = "
|
|
57948
|
+
__info__.version = "17.0.51";
|
|
57949
|
+
__info__.date = "2025-02-25T05:56:10.869Z";
|
|
57950
|
+
__info__.hash = "b433912";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -7251,8 +7251,6 @@ interface AutocompleteValue {
|
|
|
7251
7251
|
interface ComposerProps {
|
|
7252
7252
|
focus: ComposerFocusType;
|
|
7253
7253
|
inputStyle?: string;
|
|
7254
|
-
rect?: Rect;
|
|
7255
|
-
delimitation?: DOMDimension;
|
|
7256
7254
|
onComposerContentFocused: () => void;
|
|
7257
7255
|
onComposerCellFocused?: (content: String) => void;
|
|
7258
7256
|
onInputContextMenu?: (event: MouseEvent) => void;
|
|
@@ -7280,6 +7278,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
7280
7278
|
static components: {
|
|
7281
7279
|
TextValueProvider: typeof TextValueProvider;
|
|
7282
7280
|
FunctionDescriptionProvider: typeof FunctionDescriptionProvider;
|
|
7281
|
+
Popover: typeof Popover;
|
|
7283
7282
|
};
|
|
7284
7283
|
static defaultProps: {
|
|
7285
7284
|
inputStyle: string;
|
|
@@ -7293,7 +7292,6 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
7293
7292
|
autoCompleteState: AutoCompleteState;
|
|
7294
7293
|
functionDescriptionState: FunctionDescriptionState;
|
|
7295
7294
|
private compositionActive;
|
|
7296
|
-
private spreadsheetRect;
|
|
7297
7295
|
get assistantStyle(): string;
|
|
7298
7296
|
shouldProcessInputEvents: boolean;
|
|
7299
7297
|
tokens: EnrichedToken[];
|
|
@@ -7352,6 +7350,7 @@ declare class Composer extends Component<ComposerProps, SpreadsheetChildEnv> {
|
|
|
7352
7350
|
private processTokenAtCursor;
|
|
7353
7351
|
private autoComplete;
|
|
7354
7352
|
private showDataValidationAutocomplete;
|
|
7353
|
+
get popoverProps(): PopoverProps;
|
|
7355
7354
|
}
|
|
7356
7355
|
|
|
7357
7356
|
interface Props$9 {
|
|
@@ -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 2025-02-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.51
|
|
6
|
+
* @date 2025-02-25T05:56:10.869Z
|
|
7
|
+
* @hash b433912
|
|
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';
|
|
@@ -4731,11 +4731,12 @@ class UuidGenerator {
|
|
|
4731
4731
|
if (this.isFastIdStrategy) {
|
|
4732
4732
|
this.fastIdStart++;
|
|
4733
4733
|
return String(this.fastIdStart);
|
|
4734
|
-
//@ts-ignore
|
|
4735
4734
|
}
|
|
4736
|
-
else if (window.crypto
|
|
4737
|
-
|
|
4738
|
-
|
|
4735
|
+
else if (window.crypto) {
|
|
4736
|
+
return "10000000-1000".replace(/[01]/g, (c) => {
|
|
4737
|
+
const n = Number(c);
|
|
4738
|
+
return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
|
|
4739
|
+
});
|
|
4739
4740
|
}
|
|
4740
4741
|
else {
|
|
4741
4742
|
// mainly for jest and other browsers that do not have the crypto functionality
|
|
@@ -4753,11 +4754,12 @@ class UuidGenerator {
|
|
|
4753
4754
|
if (this.isFastIdStrategy) {
|
|
4754
4755
|
this.fastIdStart++;
|
|
4755
4756
|
return String(this.fastIdStart);
|
|
4756
|
-
//@ts-ignore
|
|
4757
4757
|
}
|
|
4758
|
-
else if (window.crypto
|
|
4759
|
-
|
|
4760
|
-
|
|
4758
|
+
else if (window.crypto) {
|
|
4759
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
4760
|
+
const n = Number(c);
|
|
4761
|
+
return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
|
|
4762
|
+
});
|
|
4761
4763
|
}
|
|
4762
4764
|
else {
|
|
4763
4765
|
// mainly for jest and other browsers that do not have the crypto functionality
|
|
@@ -6983,10 +6985,6 @@ class Popover extends Component {
|
|
|
6983
6985
|
this.currentDisplayValue = newDisplay;
|
|
6984
6986
|
if (!anchor)
|
|
6985
6987
|
return;
|
|
6986
|
-
el.style.top = "";
|
|
6987
|
-
el.style.left = "";
|
|
6988
|
-
el.style["max-height"] = "";
|
|
6989
|
-
el.style["max-width"] = "";
|
|
6990
6988
|
const propsMaxSize = { width: this.props.maxWidth, height: this.props.maxHeight };
|
|
6991
6989
|
let elDims = {
|
|
6992
6990
|
width: el.getBoundingClientRect().width,
|
|
@@ -9728,7 +9726,7 @@ function createPieChartRuntime(chart, getters) {
|
|
|
9728
9726
|
const dataset = {
|
|
9729
9727
|
label,
|
|
9730
9728
|
data,
|
|
9731
|
-
borderColor: "#FFFFFF",
|
|
9729
|
+
borderColor: chart.background || "#FFFFFF",
|
|
9732
9730
|
backgroundColor,
|
|
9733
9731
|
};
|
|
9734
9732
|
config.data.datasets.push(dataset);
|
|
@@ -26760,25 +26758,21 @@ css /* scss */ `
|
|
|
26760
26758
|
}
|
|
26761
26759
|
}
|
|
26762
26760
|
}
|
|
26761
|
+
}
|
|
26762
|
+
.o-spreadsheet .o-composer-assistant {
|
|
26763
|
+
pointer-events: none;
|
|
26763
26764
|
|
|
26764
|
-
.o-
|
|
26765
|
-
|
|
26766
|
-
|
|
26767
|
-
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
.o-semi-bold {
|
|
26771
|
-
/** FIXME: to remove in favor of Bootstrap
|
|
26772
|
-
* 'fw-semibold' when we upgrade to Bootstrap 5.2
|
|
26773
|
-
*/
|
|
26774
|
-
font-weight: 600 !important;
|
|
26775
|
-
}
|
|
26765
|
+
.o-semi-bold {
|
|
26766
|
+
/** FIXME: to remove in favor of Bootstrap
|
|
26767
|
+
* 'fw-semibold' when we upgrade to Bootstrap 5.2
|
|
26768
|
+
*/
|
|
26769
|
+
font-weight: 600 !important;
|
|
26776
26770
|
}
|
|
26777
26771
|
}
|
|
26778
26772
|
`;
|
|
26779
26773
|
class Composer extends Component {
|
|
26780
26774
|
static template = "o-spreadsheet-Composer";
|
|
26781
|
-
static components = { TextValueProvider, FunctionDescriptionProvider };
|
|
26775
|
+
static components = { TextValueProvider, FunctionDescriptionProvider, Popover };
|
|
26782
26776
|
static defaultProps = {
|
|
26783
26777
|
inputStyle: "",
|
|
26784
26778
|
isDefaultFocus: false,
|
|
@@ -26803,35 +26797,13 @@ class Composer extends Component {
|
|
|
26803
26797
|
argToFocus: 0,
|
|
26804
26798
|
});
|
|
26805
26799
|
compositionActive = false;
|
|
26806
|
-
spreadsheetRect = useSpreadsheetRect();
|
|
26807
26800
|
get assistantStyle() {
|
|
26808
|
-
const composerRect = this.composerRef.el.getBoundingClientRect();
|
|
26809
26801
|
const assistantStyle = {};
|
|
26810
|
-
|
|
26802
|
+
const minWidth = Math.min(getBoundingRectAsPOJO(this.composerRef.el).width || Infinity, ASSISTANT_WIDTH);
|
|
26803
|
+
assistantStyle["min-width"] = `${minWidth}px`;
|
|
26811
26804
|
if (this.autoCompleteState.type === "function") {
|
|
26812
26805
|
assistantStyle.width = `${ASSISTANT_WIDTH}px`;
|
|
26813
26806
|
}
|
|
26814
|
-
if (this.props.delimitation && this.props.rect) {
|
|
26815
|
-
const { x: cellX, y: cellY, height: cellHeight } = this.props.rect;
|
|
26816
|
-
const remainingHeight = this.props.delimitation.height - (cellY + cellHeight);
|
|
26817
|
-
assistantStyle["max-height"] = `${remainingHeight}px`;
|
|
26818
|
-
if (cellY > remainingHeight) {
|
|
26819
|
-
const availableSpaceAbove = cellY;
|
|
26820
|
-
assistantStyle["max-height"] = `${availableSpaceAbove}px`;
|
|
26821
|
-
// render top
|
|
26822
|
-
// We compensate 2 px of margin on the assistant style + 1px for design reasons
|
|
26823
|
-
assistantStyle.top = `-3px`;
|
|
26824
|
-
assistantStyle.transform = `translate(0, -100%)`;
|
|
26825
|
-
}
|
|
26826
|
-
if (cellX + ASSISTANT_WIDTH > this.props.delimitation.width) {
|
|
26827
|
-
// render left
|
|
26828
|
-
assistantStyle.right = `0px`;
|
|
26829
|
-
}
|
|
26830
|
-
}
|
|
26831
|
-
if (this.props.focus === "contentFocus" &&
|
|
26832
|
-
composerRect.left + ASSISTANT_WIDTH > this.spreadsheetRect.width) {
|
|
26833
|
-
assistantStyle.right = "0px";
|
|
26834
|
-
}
|
|
26835
26807
|
return cssPropertiesToCss(assistantStyle);
|
|
26836
26808
|
}
|
|
26837
26809
|
// we can't allow input events to be triggered while we remove and add back the content of the composer in processContent
|
|
@@ -27080,7 +27052,7 @@ class Composer extends Component {
|
|
|
27080
27052
|
this.autoCompleteState.selectedIndex = 0;
|
|
27081
27053
|
}
|
|
27082
27054
|
updateAutoCompleteIndex(index) {
|
|
27083
|
-
this.autoCompleteState.selectedIndex =
|
|
27055
|
+
this.autoCompleteState.selectedIndex = index;
|
|
27084
27056
|
}
|
|
27085
27057
|
/**
|
|
27086
27058
|
* This is required to ensure the content helper selection is
|
|
@@ -27368,11 +27340,16 @@ class Composer extends Component {
|
|
|
27368
27340
|
this.autoCompleteState.values = values.map((value) => ({ text: value, description: "" }));
|
|
27369
27341
|
this.autoCompleteState.getHtmlContent = (value) => [{ value }];
|
|
27370
27342
|
}
|
|
27343
|
+
get popoverProps() {
|
|
27344
|
+
return {
|
|
27345
|
+
anchorRect: getBoundingRectAsPOJO(this.composerRef.el),
|
|
27346
|
+
positioning: "BottomLeft",
|
|
27347
|
+
verticalOffset: 0,
|
|
27348
|
+
};
|
|
27349
|
+
}
|
|
27371
27350
|
}
|
|
27372
27351
|
Composer.props = {
|
|
27373
27352
|
inputStyle: { type: String, optional: true },
|
|
27374
|
-
rect: { type: Object, optional: true },
|
|
27375
|
-
delimitation: { type: Object, optional: true },
|
|
27376
27353
|
focus: { validate: (value) => ["inactive", "cellFocus", "contentFocus"].includes(value) },
|
|
27377
27354
|
onComposerCellFocused: { type: Function, optional: true },
|
|
27378
27355
|
onComposerContentFocused: Function,
|
|
@@ -27442,13 +27419,7 @@ class GridComposer extends Component {
|
|
|
27442
27419
|
});
|
|
27443
27420
|
}
|
|
27444
27421
|
get composerProps() {
|
|
27445
|
-
const { width, height } = this.env.model.getters.getSheetViewDimensionWithHeaders();
|
|
27446
27422
|
return {
|
|
27447
|
-
rect: { ...this.rect },
|
|
27448
|
-
delimitation: {
|
|
27449
|
-
width,
|
|
27450
|
-
height,
|
|
27451
|
-
},
|
|
27452
27423
|
focus: this.props.focus,
|
|
27453
27424
|
isDefaultFocus: true,
|
|
27454
27425
|
onComposerContentFocused: this.props.onComposerContentFocused,
|
|
@@ -33895,7 +33866,7 @@ function normalizeV9(formula) {
|
|
|
33895
33866
|
* a breaking change is made in the way the state is handled, and an upgrade
|
|
33896
33867
|
* function should be defined
|
|
33897
33868
|
*/
|
|
33898
|
-
const CURRENT_VERSION = 14;
|
|
33869
|
+
const CURRENT_VERSION = 14.5;
|
|
33899
33870
|
const INITIAL_SHEET_ID = "Sheet1";
|
|
33900
33871
|
/**
|
|
33901
33872
|
* This function tries to load anything that could look like a valid
|
|
@@ -57937,6 +57908,6 @@ const constants = {
|
|
|
57937
57908
|
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 };
|
|
57938
57909
|
|
|
57939
57910
|
|
|
57940
|
-
__info__.version = "17.0.
|
|
57941
|
-
__info__.date = "2025-02-
|
|
57942
|
-
__info__.hash = "
|
|
57911
|
+
__info__.version = "17.0.51";
|
|
57912
|
+
__info__.date = "2025-02-25T05:56:10.869Z";
|
|
57913
|
+
__info__.hash = "b433912";
|
|
@@ -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 2025-02-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.51
|
|
6
|
+
* @date 2025-02-25T05:56:10.869Z
|
|
7
|
+
* @hash b433912
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -4732,11 +4732,12 @@
|
|
|
4732
4732
|
if (this.isFastIdStrategy) {
|
|
4733
4733
|
this.fastIdStart++;
|
|
4734
4734
|
return String(this.fastIdStart);
|
|
4735
|
-
//@ts-ignore
|
|
4736
4735
|
}
|
|
4737
|
-
else if (window.crypto
|
|
4738
|
-
|
|
4739
|
-
|
|
4736
|
+
else if (window.crypto) {
|
|
4737
|
+
return "10000000-1000".replace(/[01]/g, (c) => {
|
|
4738
|
+
const n = Number(c);
|
|
4739
|
+
return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
|
|
4740
|
+
});
|
|
4740
4741
|
}
|
|
4741
4742
|
else {
|
|
4742
4743
|
// mainly for jest and other browsers that do not have the crypto functionality
|
|
@@ -4754,11 +4755,12 @@
|
|
|
4754
4755
|
if (this.isFastIdStrategy) {
|
|
4755
4756
|
this.fastIdStart++;
|
|
4756
4757
|
return String(this.fastIdStart);
|
|
4757
|
-
//@ts-ignore
|
|
4758
4758
|
}
|
|
4759
|
-
else if (window.crypto
|
|
4760
|
-
|
|
4761
|
-
|
|
4759
|
+
else if (window.crypto) {
|
|
4760
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
4761
|
+
const n = Number(c);
|
|
4762
|
+
return (n ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (n / 4)))).toString(16);
|
|
4763
|
+
});
|
|
4762
4764
|
}
|
|
4763
4765
|
else {
|
|
4764
4766
|
// mainly for jest and other browsers that do not have the crypto functionality
|
|
@@ -6984,10 +6986,6 @@
|
|
|
6984
6986
|
this.currentDisplayValue = newDisplay;
|
|
6985
6987
|
if (!anchor)
|
|
6986
6988
|
return;
|
|
6987
|
-
el.style.top = "";
|
|
6988
|
-
el.style.left = "";
|
|
6989
|
-
el.style["max-height"] = "";
|
|
6990
|
-
el.style["max-width"] = "";
|
|
6991
6989
|
const propsMaxSize = { width: this.props.maxWidth, height: this.props.maxHeight };
|
|
6992
6990
|
let elDims = {
|
|
6993
6991
|
width: el.getBoundingClientRect().width,
|
|
@@ -9729,7 +9727,7 @@
|
|
|
9729
9727
|
const dataset = {
|
|
9730
9728
|
label,
|
|
9731
9729
|
data,
|
|
9732
|
-
borderColor: "#FFFFFF",
|
|
9730
|
+
borderColor: chart.background || "#FFFFFF",
|
|
9733
9731
|
backgroundColor,
|
|
9734
9732
|
};
|
|
9735
9733
|
config.data.datasets.push(dataset);
|
|
@@ -26761,25 +26759,21 @@
|
|
|
26761
26759
|
}
|
|
26762
26760
|
}
|
|
26763
26761
|
}
|
|
26762
|
+
}
|
|
26763
|
+
.o-spreadsheet .o-composer-assistant {
|
|
26764
|
+
pointer-events: none;
|
|
26764
26765
|
|
|
26765
|
-
.o-
|
|
26766
|
-
|
|
26767
|
-
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
.o-semi-bold {
|
|
26772
|
-
/** FIXME: to remove in favor of Bootstrap
|
|
26773
|
-
* 'fw-semibold' when we upgrade to Bootstrap 5.2
|
|
26774
|
-
*/
|
|
26775
|
-
font-weight: 600 !important;
|
|
26776
|
-
}
|
|
26766
|
+
.o-semi-bold {
|
|
26767
|
+
/** FIXME: to remove in favor of Bootstrap
|
|
26768
|
+
* 'fw-semibold' when we upgrade to Bootstrap 5.2
|
|
26769
|
+
*/
|
|
26770
|
+
font-weight: 600 !important;
|
|
26777
26771
|
}
|
|
26778
26772
|
}
|
|
26779
26773
|
`;
|
|
26780
26774
|
class Composer extends owl.Component {
|
|
26781
26775
|
static template = "o-spreadsheet-Composer";
|
|
26782
|
-
static components = { TextValueProvider, FunctionDescriptionProvider };
|
|
26776
|
+
static components = { TextValueProvider, FunctionDescriptionProvider, Popover };
|
|
26783
26777
|
static defaultProps = {
|
|
26784
26778
|
inputStyle: "",
|
|
26785
26779
|
isDefaultFocus: false,
|
|
@@ -26804,35 +26798,13 @@
|
|
|
26804
26798
|
argToFocus: 0,
|
|
26805
26799
|
});
|
|
26806
26800
|
compositionActive = false;
|
|
26807
|
-
spreadsheetRect = useSpreadsheetRect();
|
|
26808
26801
|
get assistantStyle() {
|
|
26809
|
-
const composerRect = this.composerRef.el.getBoundingClientRect();
|
|
26810
26802
|
const assistantStyle = {};
|
|
26811
|
-
|
|
26803
|
+
const minWidth = Math.min(getBoundingRectAsPOJO(this.composerRef.el).width || Infinity, ASSISTANT_WIDTH);
|
|
26804
|
+
assistantStyle["min-width"] = `${minWidth}px`;
|
|
26812
26805
|
if (this.autoCompleteState.type === "function") {
|
|
26813
26806
|
assistantStyle.width = `${ASSISTANT_WIDTH}px`;
|
|
26814
26807
|
}
|
|
26815
|
-
if (this.props.delimitation && this.props.rect) {
|
|
26816
|
-
const { x: cellX, y: cellY, height: cellHeight } = this.props.rect;
|
|
26817
|
-
const remainingHeight = this.props.delimitation.height - (cellY + cellHeight);
|
|
26818
|
-
assistantStyle["max-height"] = `${remainingHeight}px`;
|
|
26819
|
-
if (cellY > remainingHeight) {
|
|
26820
|
-
const availableSpaceAbove = cellY;
|
|
26821
|
-
assistantStyle["max-height"] = `${availableSpaceAbove}px`;
|
|
26822
|
-
// render top
|
|
26823
|
-
// We compensate 2 px of margin on the assistant style + 1px for design reasons
|
|
26824
|
-
assistantStyle.top = `-3px`;
|
|
26825
|
-
assistantStyle.transform = `translate(0, -100%)`;
|
|
26826
|
-
}
|
|
26827
|
-
if (cellX + ASSISTANT_WIDTH > this.props.delimitation.width) {
|
|
26828
|
-
// render left
|
|
26829
|
-
assistantStyle.right = `0px`;
|
|
26830
|
-
}
|
|
26831
|
-
}
|
|
26832
|
-
if (this.props.focus === "contentFocus" &&
|
|
26833
|
-
composerRect.left + ASSISTANT_WIDTH > this.spreadsheetRect.width) {
|
|
26834
|
-
assistantStyle.right = "0px";
|
|
26835
|
-
}
|
|
26836
26808
|
return cssPropertiesToCss(assistantStyle);
|
|
26837
26809
|
}
|
|
26838
26810
|
// we can't allow input events to be triggered while we remove and add back the content of the composer in processContent
|
|
@@ -27081,7 +27053,7 @@
|
|
|
27081
27053
|
this.autoCompleteState.selectedIndex = 0;
|
|
27082
27054
|
}
|
|
27083
27055
|
updateAutoCompleteIndex(index) {
|
|
27084
|
-
this.autoCompleteState.selectedIndex =
|
|
27056
|
+
this.autoCompleteState.selectedIndex = index;
|
|
27085
27057
|
}
|
|
27086
27058
|
/**
|
|
27087
27059
|
* This is required to ensure the content helper selection is
|
|
@@ -27369,11 +27341,16 @@
|
|
|
27369
27341
|
this.autoCompleteState.values = values.map((value) => ({ text: value, description: "" }));
|
|
27370
27342
|
this.autoCompleteState.getHtmlContent = (value) => [{ value }];
|
|
27371
27343
|
}
|
|
27344
|
+
get popoverProps() {
|
|
27345
|
+
return {
|
|
27346
|
+
anchorRect: getBoundingRectAsPOJO(this.composerRef.el),
|
|
27347
|
+
positioning: "BottomLeft",
|
|
27348
|
+
verticalOffset: 0,
|
|
27349
|
+
};
|
|
27350
|
+
}
|
|
27372
27351
|
}
|
|
27373
27352
|
Composer.props = {
|
|
27374
27353
|
inputStyle: { type: String, optional: true },
|
|
27375
|
-
rect: { type: Object, optional: true },
|
|
27376
|
-
delimitation: { type: Object, optional: true },
|
|
27377
27354
|
focus: { validate: (value) => ["inactive", "cellFocus", "contentFocus"].includes(value) },
|
|
27378
27355
|
onComposerCellFocused: { type: Function, optional: true },
|
|
27379
27356
|
onComposerContentFocused: Function,
|
|
@@ -27443,13 +27420,7 @@
|
|
|
27443
27420
|
});
|
|
27444
27421
|
}
|
|
27445
27422
|
get composerProps() {
|
|
27446
|
-
const { width, height } = this.env.model.getters.getSheetViewDimensionWithHeaders();
|
|
27447
27423
|
return {
|
|
27448
|
-
rect: { ...this.rect },
|
|
27449
|
-
delimitation: {
|
|
27450
|
-
width,
|
|
27451
|
-
height,
|
|
27452
|
-
},
|
|
27453
27424
|
focus: this.props.focus,
|
|
27454
27425
|
isDefaultFocus: true,
|
|
27455
27426
|
onComposerContentFocused: this.props.onComposerContentFocused,
|
|
@@ -33896,7 +33867,7 @@
|
|
|
33896
33867
|
* a breaking change is made in the way the state is handled, and an upgrade
|
|
33897
33868
|
* function should be defined
|
|
33898
33869
|
*/
|
|
33899
|
-
const CURRENT_VERSION = 14;
|
|
33870
|
+
const CURRENT_VERSION = 14.5;
|
|
33900
33871
|
const INITIAL_SHEET_ID = "Sheet1";
|
|
33901
33872
|
/**
|
|
33902
33873
|
* This function tries to load anything that could look like a valid
|
|
@@ -57973,9 +57944,9 @@
|
|
|
57973
57944
|
exports.tokenize = tokenize;
|
|
57974
57945
|
|
|
57975
57946
|
|
|
57976
|
-
__info__.version = "17.0.
|
|
57977
|
-
__info__.date = "2025-02-
|
|
57978
|
-
__info__.hash = "
|
|
57947
|
+
__info__.version = "17.0.51";
|
|
57948
|
+
__info__.date = "2025-02-25T05:56:10.869Z";
|
|
57949
|
+
__info__.hash = "b433912";
|
|
57979
57950
|
|
|
57980
57951
|
|
|
57981
57952
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|