@odoo/o-spreadsheet 15.2.2 → 15.2.4
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.
|
@@ -372,7 +372,7 @@ function formatJSTime(jsDate, format) {
|
|
|
372
372
|
* - it does not accept "," as thousand separator, because when we tokenize a
|
|
373
373
|
* formula, commas are used to separate arguments
|
|
374
374
|
*/
|
|
375
|
-
const formulaNumberRegexp =
|
|
375
|
+
const formulaNumberRegexp = /(^-?\d+(\.?\d*(e\d+)?)?(\s*%)?|^-?\.\d+(\s*%)?)(?!\w|!)/;
|
|
376
376
|
const numberRegexp = /^-?\d+(,\d+)*(\.?\d*(e\d+)?)?(\s*%)?$|^-?\.\d+(\s*%)?$/;
|
|
377
377
|
/**
|
|
378
378
|
* Return true if the argument is a "number string".
|
|
@@ -18461,6 +18461,7 @@ class EditionPlugin extends UIPlugin {
|
|
|
18461
18461
|
this.setContent(this.initialContent || "");
|
|
18462
18462
|
}
|
|
18463
18463
|
setContent(text, selection, raise) {
|
|
18464
|
+
text = text.replace(/[\r\n]/g, "");
|
|
18464
18465
|
const isNewCurrentContent = this.currentContent !== text;
|
|
18465
18466
|
this.currentContent = text;
|
|
18466
18467
|
if (selection) {
|
|
@@ -26030,7 +26031,7 @@ const { Portal } = owl.misc;
|
|
|
26030
26031
|
const { xml: xml$l } = owl.tags;
|
|
26031
26032
|
const TEMPLATE$j = xml$l /* xml */ `
|
|
26032
26033
|
<Portal target="'.o-spreadsheet'">
|
|
26033
|
-
<div t-att-style="style">
|
|
26034
|
+
<div class="o-popover" t-att-style="style">
|
|
26034
26035
|
<t t-slot="default"/>
|
|
26035
26036
|
</div>
|
|
26036
26037
|
</Portal>
|
|
@@ -26935,6 +26936,8 @@ class ContentEditableHelper {
|
|
|
26935
26936
|
start = 0;
|
|
26936
26937
|
if (end > this.el.textContent.length)
|
|
26937
26938
|
end = this.el.textContent.length;
|
|
26939
|
+
if (start > this.el.textContent.length)
|
|
26940
|
+
start = this.el.textContent.length;
|
|
26938
26941
|
}
|
|
26939
26942
|
let startNode = this.findChildAtCharacterIndex(start);
|
|
26940
26943
|
let endNode = this.findChildAtCharacterIndex(end);
|
|
@@ -27262,7 +27265,7 @@ const CSS$b = css$d /* scss */ `
|
|
|
27262
27265
|
padding: 0;
|
|
27263
27266
|
margin: 0;
|
|
27264
27267
|
border: 0;
|
|
27265
|
-
z-index:
|
|
27268
|
+
z-index: 6;
|
|
27266
27269
|
flex-grow: 1;
|
|
27267
27270
|
max-height: inherit;
|
|
27268
27271
|
.o-composer {
|
|
@@ -27831,6 +27834,10 @@ const CSS$9 = css$b /* scss */ `
|
|
|
27831
27834
|
border-left: 3px solid red;
|
|
27832
27835
|
padding: 10px;
|
|
27833
27836
|
}
|
|
27837
|
+
|
|
27838
|
+
.o-popover:has(.o-error-tooltip) {
|
|
27839
|
+
z-index: 4 !important;
|
|
27840
|
+
}
|
|
27834
27841
|
`;
|
|
27835
27842
|
class ErrorToolTip extends owl.Component {
|
|
27836
27843
|
}
|
|
@@ -30179,6 +30186,10 @@ class Grid extends owl.Component {
|
|
|
30179
30186
|
}
|
|
30180
30187
|
}
|
|
30181
30188
|
onInput(ev) {
|
|
30189
|
+
// the user meant to paste in the sheet, not open the composer with the pasted content
|
|
30190
|
+
if (!ev.isComposing && ev.inputType === "insertFromPaste") {
|
|
30191
|
+
return;
|
|
30192
|
+
}
|
|
30182
30193
|
if (ev.data) {
|
|
30183
30194
|
// if the user types a character on the grid, it means he wants to start composing the selected cell with that
|
|
30184
30195
|
// character
|
|
@@ -31291,6 +31302,6 @@ exports.registries = registries;
|
|
|
31291
31302
|
exports.setTranslationMethod = setTranslationMethod;
|
|
31292
31303
|
|
|
31293
31304
|
|
|
31294
|
-
__info__.version = '15.2.
|
|
31295
|
-
__info__.date = '2023-
|
|
31296
|
-
__info__.hash = '
|
|
31305
|
+
__info__.version = '15.2.4';
|
|
31306
|
+
__info__.date = '2023-04-13T08:15:24.992Z';
|
|
31307
|
+
__info__.hash = '23f0126';
|
|
@@ -349,7 +349,7 @@ function formatJSTime(jsDate, format) {
|
|
|
349
349
|
* - it does not accept "," as thousand separator, because when we tokenize a
|
|
350
350
|
* formula, commas are used to separate arguments
|
|
351
351
|
*/
|
|
352
|
-
const formulaNumberRegexp =
|
|
352
|
+
const formulaNumberRegexp = /(^-?\d+(\.?\d*(e\d+)?)?(\s*%)?|^-?\.\d+(\s*%)?)(?!\w|!)/;
|
|
353
353
|
const numberRegexp = /^-?\d+(,\d+)*(\.?\d*(e\d+)?)?(\s*%)?$|^-?\.\d+(\s*%)?$/;
|
|
354
354
|
/**
|
|
355
355
|
* Return true if the argument is a "number string".
|
|
@@ -18438,6 +18438,7 @@ class EditionPlugin extends UIPlugin {
|
|
|
18438
18438
|
this.setContent(this.initialContent || "");
|
|
18439
18439
|
}
|
|
18440
18440
|
setContent(text, selection, raise) {
|
|
18441
|
+
text = text.replace(/[\r\n]/g, "");
|
|
18441
18442
|
const isNewCurrentContent = this.currentContent !== text;
|
|
18442
18443
|
this.currentContent = text;
|
|
18443
18444
|
if (selection) {
|
|
@@ -26007,7 +26008,7 @@ const { Portal } = misc$1;
|
|
|
26007
26008
|
const { xml: xml$l } = tags;
|
|
26008
26009
|
const TEMPLATE$j = xml$l /* xml */ `
|
|
26009
26010
|
<Portal target="'.o-spreadsheet'">
|
|
26010
|
-
<div t-att-style="style">
|
|
26011
|
+
<div class="o-popover" t-att-style="style">
|
|
26011
26012
|
<t t-slot="default"/>
|
|
26012
26013
|
</div>
|
|
26013
26014
|
</Portal>
|
|
@@ -26912,6 +26913,8 @@ class ContentEditableHelper {
|
|
|
26912
26913
|
start = 0;
|
|
26913
26914
|
if (end > this.el.textContent.length)
|
|
26914
26915
|
end = this.el.textContent.length;
|
|
26916
|
+
if (start > this.el.textContent.length)
|
|
26917
|
+
start = this.el.textContent.length;
|
|
26915
26918
|
}
|
|
26916
26919
|
let startNode = this.findChildAtCharacterIndex(start);
|
|
26917
26920
|
let endNode = this.findChildAtCharacterIndex(end);
|
|
@@ -27239,7 +27242,7 @@ const CSS$b = css$d /* scss */ `
|
|
|
27239
27242
|
padding: 0;
|
|
27240
27243
|
margin: 0;
|
|
27241
27244
|
border: 0;
|
|
27242
|
-
z-index:
|
|
27245
|
+
z-index: 6;
|
|
27243
27246
|
flex-grow: 1;
|
|
27244
27247
|
max-height: inherit;
|
|
27245
27248
|
.o-composer {
|
|
@@ -27808,6 +27811,10 @@ const CSS$9 = css$b /* scss */ `
|
|
|
27808
27811
|
border-left: 3px solid red;
|
|
27809
27812
|
padding: 10px;
|
|
27810
27813
|
}
|
|
27814
|
+
|
|
27815
|
+
.o-popover:has(.o-error-tooltip) {
|
|
27816
|
+
z-index: 4 !important;
|
|
27817
|
+
}
|
|
27811
27818
|
`;
|
|
27812
27819
|
class ErrorToolTip extends Component {
|
|
27813
27820
|
}
|
|
@@ -30156,6 +30163,10 @@ class Grid extends Component {
|
|
|
30156
30163
|
}
|
|
30157
30164
|
}
|
|
30158
30165
|
onInput(ev) {
|
|
30166
|
+
// the user meant to paste in the sheet, not open the composer with the pasted content
|
|
30167
|
+
if (!ev.isComposing && ev.inputType === "insertFromPaste") {
|
|
30168
|
+
return;
|
|
30169
|
+
}
|
|
30159
30170
|
if (ev.data) {
|
|
30160
30171
|
// if the user types a character on the grid, it means he wants to start composing the selected cell with that
|
|
30161
30172
|
// character
|
|
@@ -31245,6 +31256,6 @@ const helpers = {
|
|
|
31245
31256
|
export { CommandResult, CorePlugin, DATETIME_FORMAT, DataSource, DispatchResult, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, DEBUG as __DEBUG__, __info__, astToFormula, cellTypes, compile, convertAstNodes, coreTypes, functionCache, helpers, invalidateEvaluationCommands, parse, readonlyAllowedCommands, registries, setTranslationMethod };
|
|
31246
31257
|
|
|
31247
31258
|
|
|
31248
|
-
__info__.version = '15.2.
|
|
31249
|
-
__info__.date = '2023-
|
|
31250
|
-
__info__.hash = '
|
|
31259
|
+
__info__.version = '15.2.4';
|
|
31260
|
+
__info__.date = '2023-04-13T08:15:24.992Z';
|
|
31261
|
+
__info__.hash = '23f0126';
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
* - it does not accept "," as thousand separator, because when we tokenize a
|
|
370
370
|
* formula, commas are used to separate arguments
|
|
371
371
|
*/
|
|
372
|
-
const formulaNumberRegexp =
|
|
372
|
+
const formulaNumberRegexp = /(^-?\d+(\.?\d*(e\d+)?)?(\s*%)?|^-?\.\d+(\s*%)?)(?!\w|!)/;
|
|
373
373
|
const numberRegexp = /^-?\d+(,\d+)*(\.?\d*(e\d+)?)?(\s*%)?$|^-?\.\d+(\s*%)?$/;
|
|
374
374
|
/**
|
|
375
375
|
* Return true if the argument is a "number string".
|
|
@@ -18458,6 +18458,7 @@
|
|
|
18458
18458
|
this.setContent(this.initialContent || "");
|
|
18459
18459
|
}
|
|
18460
18460
|
setContent(text, selection, raise) {
|
|
18461
|
+
text = text.replace(/[\r\n]/g, "");
|
|
18461
18462
|
const isNewCurrentContent = this.currentContent !== text;
|
|
18462
18463
|
this.currentContent = text;
|
|
18463
18464
|
if (selection) {
|
|
@@ -26027,7 +26028,7 @@
|
|
|
26027
26028
|
const { xml: xml$l } = owl.tags;
|
|
26028
26029
|
const TEMPLATE$j = xml$l /* xml */ `
|
|
26029
26030
|
<Portal target="'.o-spreadsheet'">
|
|
26030
|
-
<div t-att-style="style">
|
|
26031
|
+
<div class="o-popover" t-att-style="style">
|
|
26031
26032
|
<t t-slot="default"/>
|
|
26032
26033
|
</div>
|
|
26033
26034
|
</Portal>
|
|
@@ -26932,6 +26933,8 @@
|
|
|
26932
26933
|
start = 0;
|
|
26933
26934
|
if (end > this.el.textContent.length)
|
|
26934
26935
|
end = this.el.textContent.length;
|
|
26936
|
+
if (start > this.el.textContent.length)
|
|
26937
|
+
start = this.el.textContent.length;
|
|
26935
26938
|
}
|
|
26936
26939
|
let startNode = this.findChildAtCharacterIndex(start);
|
|
26937
26940
|
let endNode = this.findChildAtCharacterIndex(end);
|
|
@@ -27259,7 +27262,7 @@
|
|
|
27259
27262
|
padding: 0;
|
|
27260
27263
|
margin: 0;
|
|
27261
27264
|
border: 0;
|
|
27262
|
-
z-index:
|
|
27265
|
+
z-index: 6;
|
|
27263
27266
|
flex-grow: 1;
|
|
27264
27267
|
max-height: inherit;
|
|
27265
27268
|
.o-composer {
|
|
@@ -27828,6 +27831,10 @@
|
|
|
27828
27831
|
border-left: 3px solid red;
|
|
27829
27832
|
padding: 10px;
|
|
27830
27833
|
}
|
|
27834
|
+
|
|
27835
|
+
.o-popover:has(.o-error-tooltip) {
|
|
27836
|
+
z-index: 4 !important;
|
|
27837
|
+
}
|
|
27831
27838
|
`;
|
|
27832
27839
|
class ErrorToolTip extends owl.Component {
|
|
27833
27840
|
}
|
|
@@ -30176,6 +30183,10 @@
|
|
|
30176
30183
|
}
|
|
30177
30184
|
}
|
|
30178
30185
|
onInput(ev) {
|
|
30186
|
+
// the user meant to paste in the sheet, not open the composer with the pasted content
|
|
30187
|
+
if (!ev.isComposing && ev.inputType === "insertFromPaste") {
|
|
30188
|
+
return;
|
|
30189
|
+
}
|
|
30179
30190
|
if (ev.data) {
|
|
30180
30191
|
// if the user types a character on the grid, it means he wants to start composing the selected cell with that
|
|
30181
30192
|
// character
|
|
@@ -31290,9 +31301,9 @@
|
|
|
31290
31301
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
31291
31302
|
|
|
31292
31303
|
|
|
31293
|
-
__info__.version = '15.2.
|
|
31294
|
-
__info__.date = '2023-
|
|
31295
|
-
__info__.hash = '
|
|
31304
|
+
__info__.version = '15.2.4';
|
|
31305
|
+
__info__.date = '2023-04-13T08:15:24.992Z';
|
|
31306
|
+
__info__.hash = '23f0126';
|
|
31296
31307
|
|
|
31297
31308
|
|
|
31298
31309
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|