@odoo/o-spreadsheet 16.0.13 → 16.0.14
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 +27 -12
- package/dist/o-spreadsheet.d.ts +158 -158
- package/dist/o-spreadsheet.esm.js +27 -12
- package/dist/o-spreadsheet.iife.js +27 -12
- package/dist/o-spreadsheet.iife.min.js +227 -227
- package/package.json +4 -4
|
@@ -723,12 +723,20 @@ function getDefaultCellHeight(style, numberOfLines) {
|
|
|
723
723
|
2 * PADDING_AUTORESIZE_VERTICAL);
|
|
724
724
|
}
|
|
725
725
|
function computeTextWidth(context, text, style) {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
726
|
+
const font = computeTextFont(style);
|
|
727
|
+
if (!textWidthCache[font]) {
|
|
728
|
+
textWidthCache[font] = {};
|
|
729
|
+
}
|
|
730
|
+
if (textWidthCache[font][text] === undefined) {
|
|
731
|
+
context.save();
|
|
732
|
+
context.font = font;
|
|
733
|
+
const textWidth = context.measureText(text).width;
|
|
734
|
+
context.restore();
|
|
735
|
+
textWidthCache[font][text] = textWidth;
|
|
736
|
+
}
|
|
737
|
+
return textWidthCache[font][text];
|
|
731
738
|
}
|
|
739
|
+
const textWidthCache = {};
|
|
732
740
|
function computeTextFont(style) {
|
|
733
741
|
const italic = style.italic ? "italic " : "";
|
|
734
742
|
const weight = style.bold ? "bold" : DEFAULT_FONT_WEIGHT;
|
|
@@ -28647,7 +28655,14 @@ class FiltersPlugin extends CorePlugin {
|
|
|
28647
28655
|
this.history.update("tables", filterTables);
|
|
28648
28656
|
break;
|
|
28649
28657
|
case "DUPLICATE_SHEET":
|
|
28650
|
-
|
|
28658
|
+
const tables = {};
|
|
28659
|
+
for (const filterTable of Object.values(this.tables[cmd.sheetId] || {})) {
|
|
28660
|
+
if (filterTable) {
|
|
28661
|
+
const newFilterTable = deepCopy(filterTable);
|
|
28662
|
+
tables[newFilterTable.id] = newFilterTable;
|
|
28663
|
+
}
|
|
28664
|
+
}
|
|
28665
|
+
this.history.update("tables", cmd.sheetIdTo, tables);
|
|
28651
28666
|
break;
|
|
28652
28667
|
case "ADD_COLUMNS_ROWS":
|
|
28653
28668
|
this.onAddColumnsRows(cmd);
|
|
@@ -35151,6 +35166,9 @@ SelectionInputPlugin.getters = [];
|
|
|
35151
35166
|
* This plugin handles this internal state.
|
|
35152
35167
|
*/
|
|
35153
35168
|
class SelectionInputsManagerPlugin extends UIPlugin {
|
|
35169
|
+
get currentInput() {
|
|
35170
|
+
return this.focusedInputId ? this.inputs[this.focusedInputId] : null;
|
|
35171
|
+
}
|
|
35154
35172
|
constructor(getters, state, dispatch, config, selection) {
|
|
35155
35173
|
super(getters, state, dispatch, config, selection);
|
|
35156
35174
|
this.state = state;
|
|
@@ -35158,9 +35176,6 @@ class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
35158
35176
|
this.inputs = {};
|
|
35159
35177
|
this.focusedInputId = null;
|
|
35160
35178
|
}
|
|
35161
|
-
get currentInput() {
|
|
35162
|
-
return this.focusedInputId ? this.inputs[this.focusedInputId] : null;
|
|
35163
|
-
}
|
|
35164
35179
|
// ---------------------------------------------------------------------------
|
|
35165
35180
|
// Command Handling
|
|
35166
35181
|
// ---------------------------------------------------------------------------
|
|
@@ -42817,6 +42832,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
42817
42832
|
exports.tokenize = tokenize;
|
|
42818
42833
|
|
|
42819
42834
|
|
|
42820
|
-
__info__.version = '16.0.
|
|
42821
|
-
__info__.date = '2023-06-
|
|
42822
|
-
__info__.hash = '
|
|
42835
|
+
__info__.version = '16.0.14';
|
|
42836
|
+
__info__.date = '2023-06-26T14:33:01.959Z';
|
|
42837
|
+
__info__.hash = '1e37a94';
|