@odoo/o-spreadsheet 17.3.2 → 17.3.3
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 +77 -87
- package/dist/o-spreadsheet.d.ts +14 -6
- package/dist/o-spreadsheet.esm.js +77 -87
- package/dist/o-spreadsheet.iife.js +77 -87
- package/dist/o-spreadsheet.iife.min.js +343 -343
- package/dist/o_spreadsheet.xml +6 -5
- package/package.json +1 -1
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
5
5
|
* @see https://github.com/odoo/o-spreadsheet
|
|
6
|
-
* @version 17.3.
|
|
7
|
-
* @date 2024-06-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.3.3
|
|
7
|
+
* @date 2024-06-14T10:02:58.082Z
|
|
8
|
+
* @hash c690e9f
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
@@ -2781,7 +2781,7 @@ function evaluatePredicate(value, criterion) {
|
|
|
2781
2781
|
return false;
|
|
2782
2782
|
}
|
|
2783
2783
|
if (typeof operand === "number" && operator === "=") {
|
|
2784
|
-
return toString(
|
|
2784
|
+
return value.toString() === operand.toString();
|
|
2785
2785
|
}
|
|
2786
2786
|
if (operator === "<>" || operator === "=") {
|
|
2787
2787
|
let result;
|
|
@@ -2841,14 +2841,13 @@ function visitMatchingRanges(args, cb, locale, isQuery = false) {
|
|
|
2841
2841
|
if (countArg % 2 === 1) {
|
|
2842
2842
|
throw new EvaluationError(_t("Function [[FUNCTION_NAME]] expects criteria_range and criterion to be in pairs."));
|
|
2843
2843
|
}
|
|
2844
|
-
const
|
|
2845
|
-
const
|
|
2844
|
+
const firstArg = toMatrix(args[0]);
|
|
2845
|
+
const dimRow = firstArg.length;
|
|
2846
|
+
const dimCol = firstArg[0].length;
|
|
2846
2847
|
let predicates = [];
|
|
2847
2848
|
for (let i = 0; i < countArg - 1; i += 2) {
|
|
2848
|
-
const criteriaRange = args[i];
|
|
2849
|
-
if (
|
|
2850
|
-
criteriaRange.length !== dimRow ||
|
|
2851
|
-
criteriaRange[0].length !== dimCol) {
|
|
2849
|
+
const criteriaRange = toMatrix(args[i]);
|
|
2850
|
+
if (criteriaRange.length !== dimRow || criteriaRange[0].length !== dimCol) {
|
|
2852
2851
|
throw new EvaluationError(_t("Function [[FUNCTION_NAME]] expects criteria_range to have the same dimension"));
|
|
2853
2852
|
}
|
|
2854
2853
|
const description = toString(args[i + 1]);
|
|
@@ -2862,7 +2861,7 @@ function visitMatchingRanges(args, cb, locale, isQuery = false) {
|
|
|
2862
2861
|
for (let j = 0; j < dimCol; j++) {
|
|
2863
2862
|
let validatedPredicates = true;
|
|
2864
2863
|
for (let k = 0; k < countArg - 1; k += 2) {
|
|
2865
|
-
const criteriaValue = args[k][i][j].value;
|
|
2864
|
+
const criteriaValue = toMatrix(args[k])[i][j].value;
|
|
2866
2865
|
const criterion = predicates[k / 2];
|
|
2867
2866
|
validatedPredicates = evaluatePredicate(criteriaValue ?? undefined, criterion);
|
|
2868
2867
|
if (!validatedPredicates) {
|
|
@@ -10990,6 +10989,9 @@ function makeArg(str, description) {
|
|
|
10990
10989
|
if (types.some((t) => t.startsWith("RANGE"))) {
|
|
10991
10990
|
result.acceptMatrix = true;
|
|
10992
10991
|
}
|
|
10992
|
+
if (types.every((t) => t.startsWith("RANGE"))) {
|
|
10993
|
+
result.acceptMatrixOnly = true;
|
|
10994
|
+
}
|
|
10993
10995
|
return result;
|
|
10994
10996
|
}
|
|
10995
10997
|
/**
|
|
@@ -11271,11 +11273,16 @@ const CHOOSECOLS = {
|
|
|
11271
11273
|
compute: function (array, ...columns) {
|
|
11272
11274
|
const _array = toMatrix(array);
|
|
11273
11275
|
const _columns = flattenRowFirst(columns, (item) => toInteger(item?.value, this.locale));
|
|
11274
|
-
|
|
11276
|
+
const argOutOfRange = _columns.filter((col) => col === 0 || _array.length < Math.abs(col));
|
|
11277
|
+
assert(() => argOutOfRange.length === 0, _t("The columns arguments must be between -%s and %s (got %s), excluding 0.", _array.length.toString(), _array.length.toString(), argOutOfRange.join(",")));
|
|
11275
11278
|
const result = Array(_columns.length);
|
|
11276
11279
|
for (let col = 0; col < _columns.length; col++) {
|
|
11277
|
-
|
|
11278
|
-
|
|
11280
|
+
if (_columns[col] > 0) {
|
|
11281
|
+
result[col] = _array[_columns[col] - 1]; // -1 because columns arguments are 1-indexed
|
|
11282
|
+
}
|
|
11283
|
+
else {
|
|
11284
|
+
result[col] = _array[_array.length + _columns[col]];
|
|
11285
|
+
}
|
|
11279
11286
|
}
|
|
11280
11287
|
return result;
|
|
11281
11288
|
},
|
|
@@ -11296,8 +11303,14 @@ const CHOOSEROWS = {
|
|
|
11296
11303
|
const _array = toMatrix(array);
|
|
11297
11304
|
const _rows = flattenRowFirst(rows, (item) => toInteger(item?.value, this.locale));
|
|
11298
11305
|
const _nbColumns = _array.length;
|
|
11299
|
-
|
|
11300
|
-
|
|
11306
|
+
const argOutOfRange = _rows.filter((row) => row === 0 || _array[0].length < Math.abs(row));
|
|
11307
|
+
assert(() => argOutOfRange.length === 0, _t("The rows arguments must be between -%s and %s (got %s), excluding 0.", _array[0].length.toString(), _array[0].length.toString(), argOutOfRange.join(",")));
|
|
11308
|
+
return generateMatrix(_nbColumns, _rows.length, (col, row) => {
|
|
11309
|
+
if (_rows[row] > 0) {
|
|
11310
|
+
return _array[col][_rows[row] - 1]; // -1 because columns arguments are 1-indexed
|
|
11311
|
+
}
|
|
11312
|
+
return _array[col][_array[col].length + _rows[row]];
|
|
11313
|
+
});
|
|
11301
11314
|
},
|
|
11302
11315
|
isExported: true,
|
|
11303
11316
|
};
|
|
@@ -19764,6 +19777,9 @@ function addInputHandling(descr) {
|
|
|
19764
19777
|
}
|
|
19765
19778
|
args[i] = arg[0][0];
|
|
19766
19779
|
}
|
|
19780
|
+
if (!isMatrix(arg) && argDefinition.acceptMatrixOnly) {
|
|
19781
|
+
throw new BadExpressionError(_t("Function [[FUNCTION_NAME]] expects the parameter '%s' to be reference to a cell or range.", (i + 1).toString()));
|
|
19782
|
+
}
|
|
19767
19783
|
}
|
|
19768
19784
|
return descr.compute.apply(this, args);
|
|
19769
19785
|
}
|
|
@@ -21358,12 +21374,6 @@ function compileTokens(tokens) {
|
|
|
21358
21374
|
// detect when an argument need to be evaluated as a meta argument
|
|
21359
21375
|
const isMeta = argTypes.includes("META");
|
|
21360
21376
|
const hasRange = argTypes.some((t) => isRangeType(t));
|
|
21361
|
-
const isRangeOnly = argTypes.every((t) => isRangeType(t));
|
|
21362
|
-
if (isRangeOnly) {
|
|
21363
|
-
if (!isRangeInput(currentArg)) {
|
|
21364
|
-
throw new BadExpressionError(_t("Function %(function_name)s expects the parameter %(arg_index)s to be a reference to a cell or a range.", { function_name: functionName, arg_index: i + 1 }));
|
|
21365
|
-
}
|
|
21366
|
-
}
|
|
21367
21377
|
compiledArgs.push(compileAST(currentArg, isMeta, hasRange));
|
|
21368
21378
|
}
|
|
21369
21379
|
return compiledArgs;
|
|
@@ -21528,16 +21538,6 @@ function assertEnoughArgs(ast) {
|
|
|
21528
21538
|
function isRangeType(type) {
|
|
21529
21539
|
return type.startsWith("RANGE");
|
|
21530
21540
|
}
|
|
21531
|
-
function isRangeInput(arg) {
|
|
21532
|
-
if (arg.type === "REFERENCE") {
|
|
21533
|
-
return true;
|
|
21534
|
-
}
|
|
21535
|
-
if (arg.type === "FUNCALL") {
|
|
21536
|
-
const fnDef = functions$1[arg.value.toUpperCase()];
|
|
21537
|
-
return fnDef && isRangeType(fnDef.returns[0]);
|
|
21538
|
-
}
|
|
21539
|
-
return false;
|
|
21540
|
-
}
|
|
21541
21541
|
|
|
21542
21542
|
const functions = functionRegistry.content;
|
|
21543
21543
|
function isExportableToExcel(tokens) {
|
|
@@ -21966,7 +21966,9 @@ autoCompleteProviders.add("pivot_group_values", {
|
|
|
21966
21966
|
if (!groupByField) {
|
|
21967
21967
|
return;
|
|
21968
21968
|
}
|
|
21969
|
-
return dataSource
|
|
21969
|
+
return dataSource
|
|
21970
|
+
.getPossibleFieldValues(groupByField.toString().split(":")[0])
|
|
21971
|
+
.map(({ value, label }) => {
|
|
21970
21972
|
const isString = typeof value === "string";
|
|
21971
21973
|
const text = isString ? `"${value}"` : value.toString();
|
|
21972
21974
|
const color = isString ? tokenColors.STRING : tokenColors.NUMBER;
|
|
@@ -25452,7 +25454,7 @@ class Popover extends owl.Component {
|
|
|
25452
25454
|
if (!anchor)
|
|
25453
25455
|
return;
|
|
25454
25456
|
const propsMaxSize = { width: this.props.maxWidth, height: this.props.maxHeight };
|
|
25455
|
-
|
|
25457
|
+
let elDims = {
|
|
25456
25458
|
width: el.getBoundingClientRect().width,
|
|
25457
25459
|
height: el.getBoundingClientRect().height,
|
|
25458
25460
|
};
|
|
@@ -25460,7 +25462,14 @@ class Popover extends owl.Component {
|
|
|
25460
25462
|
const popoverPositionHelper = this.props.positioning === "BottomLeft"
|
|
25461
25463
|
? new BottomLeftPopoverContext(anchor, this.containerRect, propsMaxSize, spreadsheetRect)
|
|
25462
25464
|
: new TopRightPopoverContext(anchor, this.containerRect, propsMaxSize, spreadsheetRect);
|
|
25463
|
-
|
|
25465
|
+
el.style["max-height"] = popoverPositionHelper.getMaxHeight(elDims.height) + "px";
|
|
25466
|
+
el.style["max-width"] = popoverPositionHelper.getMaxWidth(elDims.width) + "px";
|
|
25467
|
+
// Re-compute the dimensions after setting the max-width and max-height
|
|
25468
|
+
elDims = {
|
|
25469
|
+
width: el.getBoundingClientRect().width,
|
|
25470
|
+
height: el.getBoundingClientRect().height,
|
|
25471
|
+
};
|
|
25472
|
+
let style = popoverPositionHelper.getCss(elDims, this.props.verticalOffset);
|
|
25464
25473
|
for (const property of Object.keys(style)) {
|
|
25465
25474
|
el.style[property] = style[property];
|
|
25466
25475
|
}
|
|
@@ -25523,8 +25532,6 @@ class PopoverPositionContext {
|
|
|
25523
25532
|
const shouldRenderAtRight = this.shouldRenderAtRight(elDims.width);
|
|
25524
25533
|
verticalOffset = shouldRenderAtBottom ? verticalOffset : -verticalOffset;
|
|
25525
25534
|
const cssProperties = {
|
|
25526
|
-
"max-height": maxHeight + "px",
|
|
25527
|
-
"max-width": maxWidth + "px",
|
|
25528
25535
|
top: this.getTopCoordinate(actualHeight, shouldRenderAtBottom) -
|
|
25529
25536
|
this.spreadsheetOffset.y -
|
|
25530
25537
|
verticalOffset +
|
|
@@ -31338,10 +31345,8 @@ class ChartTitle extends owl.Component {
|
|
|
31338
31345
|
|
|
31339
31346
|
class AxisDesignEditor extends owl.Component {
|
|
31340
31347
|
static template = "o-spreadsheet-AxisDesignEditor";
|
|
31341
|
-
static components = {
|
|
31342
|
-
|
|
31343
|
-
ChartTitle,
|
|
31344
|
-
};
|
|
31348
|
+
static components = { Section, ChartTitle };
|
|
31349
|
+
static props = { figureId: String, definition: Object, updateChart: Function, axesList: Array };
|
|
31345
31350
|
state = owl.useState({ currentAxis: "x" });
|
|
31346
31351
|
get axisTitleStyle() {
|
|
31347
31352
|
const axisDesign = this.props.definition.axesDesign?.[this.state.currentAxis] ?? {};
|
|
@@ -31492,6 +31497,12 @@ class ChartWithAxisDesignPanel extends owl.Component {
|
|
|
31492
31497
|
AxisDesignEditor,
|
|
31493
31498
|
RoundColorPicker,
|
|
31494
31499
|
};
|
|
31500
|
+
static props = {
|
|
31501
|
+
figureId: String,
|
|
31502
|
+
definition: Object,
|
|
31503
|
+
canUpdateChart: Function,
|
|
31504
|
+
updateChart: Function,
|
|
31505
|
+
};
|
|
31495
31506
|
state = owl.useState({ index: 0 });
|
|
31496
31507
|
get axesList() {
|
|
31497
31508
|
const { useLeftAxis, useRightAxis } = getDefinedAxis(this.props.definition);
|
|
@@ -31673,14 +31684,6 @@ class GaugeChartDesignPanel extends owl.Component {
|
|
|
31673
31684
|
const cancelledReasons = [...(this.state.sectionRuleDispatchResult?.reasons || [])];
|
|
31674
31685
|
return cancelledReasons.map((error) => ChartTerms.Errors[error] || ChartTerms.Errors.Unexpected);
|
|
31675
31686
|
}
|
|
31676
|
-
updateBackgroundColor(color) {
|
|
31677
|
-
this.props.updateChart(this.props.figureId, {
|
|
31678
|
-
background: color,
|
|
31679
|
-
});
|
|
31680
|
-
}
|
|
31681
|
-
updateTitle(content) {
|
|
31682
|
-
this.props.updateChart(this.props.figureId, { title: { text: content } });
|
|
31683
|
-
}
|
|
31684
31687
|
isRangeMinInvalid() {
|
|
31685
31688
|
return !!(this.state.sectionRuleDispatchResult?.isCancelledBecause("EmptyGaugeRangeMin" /* CommandResult.EmptyGaugeRangeMin */) ||
|
|
31686
31689
|
this.state.sectionRuleDispatchResult?.isCancelledBecause("GaugeRangeMinNaN" /* CommandResult.GaugeRangeMinNaN */) ||
|
|
@@ -31720,9 +31723,6 @@ class GaugeChartDesignPanel extends owl.Component {
|
|
|
31720
31723
|
sectionRule,
|
|
31721
31724
|
});
|
|
31722
31725
|
}
|
|
31723
|
-
get backgroundColorTitle() {
|
|
31724
|
-
return ChartTerms.BackgroundColor;
|
|
31725
|
-
}
|
|
31726
31726
|
}
|
|
31727
31727
|
|
|
31728
31728
|
class LineConfigPanel extends GenericChartConfigPanel {
|
|
@@ -31905,9 +31905,6 @@ class ScorecardChartDesignPanel extends owl.Component {
|
|
|
31905
31905
|
get humanizeNumbersLabel() {
|
|
31906
31906
|
return _t("Humanize numbers");
|
|
31907
31907
|
}
|
|
31908
|
-
updateTitle(content) {
|
|
31909
|
-
this.props.updateChart(this.props.figureId, { title: { text: content } });
|
|
31910
|
-
}
|
|
31911
31908
|
updateHumanizeNumbers(humanize) {
|
|
31912
31909
|
this.props.updateChart(this.props.figureId, { humanize });
|
|
31913
31910
|
}
|
|
@@ -31930,9 +31927,6 @@ class ScorecardChartDesignPanel extends owl.Component {
|
|
|
31930
31927
|
break;
|
|
31931
31928
|
}
|
|
31932
31929
|
}
|
|
31933
|
-
get backgroundColorTitle() {
|
|
31934
|
-
return ChartTerms.BackgroundColor;
|
|
31935
|
-
}
|
|
31936
31930
|
}
|
|
31937
31931
|
|
|
31938
31932
|
class WaterfallChartDesignPanel extends owl.Component {
|
|
@@ -33433,13 +33427,17 @@ class SelectMenu extends owl.Component {
|
|
|
33433
33427
|
class: { type: String, optional: true },
|
|
33434
33428
|
};
|
|
33435
33429
|
static components = { Menu };
|
|
33430
|
+
menuId = new UuidGenerator().uuidv4();
|
|
33436
33431
|
selectRef = owl.useRef("select");
|
|
33437
33432
|
selectRect = useAbsoluteBoundingRect(this.selectRef);
|
|
33438
33433
|
state = owl.useState({
|
|
33439
33434
|
isMenuOpen: false,
|
|
33440
33435
|
});
|
|
33441
|
-
onClick() {
|
|
33442
|
-
this.
|
|
33436
|
+
onClick(ev) {
|
|
33437
|
+
if (ev.closedMenuId === this.menuId) {
|
|
33438
|
+
return;
|
|
33439
|
+
}
|
|
33440
|
+
this.state.isMenuOpen = !this.state.isMenuOpen;
|
|
33443
33441
|
}
|
|
33444
33442
|
onMenuClosed() {
|
|
33445
33443
|
this.state.isMenuOpen = false;
|
|
@@ -33447,7 +33445,7 @@ class SelectMenu extends owl.Component {
|
|
|
33447
33445
|
get menuPosition() {
|
|
33448
33446
|
return {
|
|
33449
33447
|
x: this.selectRect.x,
|
|
33450
|
-
y: this.selectRect.y,
|
|
33448
|
+
y: this.selectRect.y + this.selectRect.height,
|
|
33451
33449
|
};
|
|
33452
33450
|
}
|
|
33453
33451
|
}
|
|
@@ -34387,9 +34385,9 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
34387
34385
|
static props = {
|
|
34388
34386
|
onCloseSidePanel: Function,
|
|
34389
34387
|
};
|
|
34390
|
-
dataRange = "";
|
|
34391
34388
|
searchInput = owl.useRef("searchInput");
|
|
34392
34389
|
store;
|
|
34390
|
+
state;
|
|
34393
34391
|
get hasSearchResult() {
|
|
34394
34392
|
return this.store.selectedMatchIndex !== null;
|
|
34395
34393
|
}
|
|
@@ -34419,6 +34417,7 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
34419
34417
|
}
|
|
34420
34418
|
setup() {
|
|
34421
34419
|
this.store = useLocalStore(FindAndReplaceStore);
|
|
34420
|
+
this.state = owl.useState({ dataRange: "" });
|
|
34422
34421
|
owl.onMounted(() => this.searchInput.el?.focus());
|
|
34423
34422
|
}
|
|
34424
34423
|
onFocusSearch() {
|
|
@@ -34455,13 +34454,13 @@ class FindAndReplacePanel extends owl.Component {
|
|
|
34455
34454
|
this.store.updateSearchOptions({ searchScope });
|
|
34456
34455
|
}
|
|
34457
34456
|
onSearchRangeChanged(ranges) {
|
|
34458
|
-
this.dataRange = ranges[0];
|
|
34457
|
+
this.state.dataRange = ranges[0];
|
|
34459
34458
|
}
|
|
34460
34459
|
updateDataRange() {
|
|
34461
|
-
if (!this.dataRange || this.searchOptions.searchScope !== "specificRange") {
|
|
34460
|
+
if (!this.state.dataRange || this.searchOptions.searchScope !== "specificRange") {
|
|
34462
34461
|
return;
|
|
34463
34462
|
}
|
|
34464
|
-
const specificRange = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.dataRange);
|
|
34463
|
+
const specificRange = this.env.model.getters.getRangeFromSheetXC(this.env.model.getters.getActiveSheetId(), this.state.dataRange);
|
|
34465
34464
|
this.store.updateSearchOptions({ specificRange });
|
|
34466
34465
|
}
|
|
34467
34466
|
}
|
|
@@ -36132,6 +36131,7 @@ css /* scss */ `
|
|
|
36132
36131
|
class RemoveDuplicatesPanel extends owl.Component {
|
|
36133
36132
|
static template = "o-spreadsheet-RemoveDuplicatesPanel";
|
|
36134
36133
|
static components = { ValidationMessages, Section, Checkbox };
|
|
36134
|
+
static props = { onCloseSidePanel: Function };
|
|
36135
36135
|
state = owl.useState({
|
|
36136
36136
|
hasHeader: false,
|
|
36137
36137
|
columns: {},
|
|
@@ -38556,7 +38556,7 @@ class FiguresContainer extends owl.Component {
|
|
|
38556
38556
|
});
|
|
38557
38557
|
}
|
|
38558
38558
|
getContainerRect(container) {
|
|
38559
|
-
const { width: viewWidth, height: viewHeight } = this.env.model.getters.
|
|
38559
|
+
const { width: viewWidth, height: viewHeight } = this.env.model.getters.getSheetViewDimension();
|
|
38560
38560
|
const { x: viewportX, y: viewportY } = this.env.model.getters.getMainViewportCoordinates();
|
|
38561
38561
|
const x = ["bottomRight", "topRight"].includes(container) ? viewportX : 0;
|
|
38562
38562
|
const width = viewWidth - x;
|
|
@@ -51161,22 +51161,6 @@ class PivotCorePlugin extends CorePlugin {
|
|
|
51161
51161
|
this.addPivotFormula(cellPosition, formulaId, pivotCell);
|
|
51162
51162
|
}
|
|
51163
51163
|
}
|
|
51164
|
-
const pivotZone = {
|
|
51165
|
-
top: position.row,
|
|
51166
|
-
bottom: position.row + pivotCells[0].length - 1,
|
|
51167
|
-
left: position.col,
|
|
51168
|
-
right: position.col + pivotCells.length - 1,
|
|
51169
|
-
};
|
|
51170
|
-
const numberOfHeaders = table.columns.length - 1;
|
|
51171
|
-
const cmdContent = {
|
|
51172
|
-
sheetId: position.sheetId,
|
|
51173
|
-
ranges: [this.getters.getRangeDataFromZone(position.sheetId, pivotZone)],
|
|
51174
|
-
config: { ...PIVOT_TABLE_CONFIG, numberOfHeaders },
|
|
51175
|
-
tableType: "static",
|
|
51176
|
-
};
|
|
51177
|
-
if (this.canDispatch("CREATE_TABLE", cmdContent).isSuccessful) {
|
|
51178
|
-
this.dispatch("CREATE_TABLE", cmdContent);
|
|
51179
|
-
}
|
|
51180
51164
|
}
|
|
51181
51165
|
resizeSheet(sheetId, { col, row }, table) {
|
|
51182
51166
|
const colLimit = table.getNumberOfDataColumns() + 1; // +1 for the Top-Left
|
|
@@ -55902,7 +55886,10 @@ class Session extends EventBus {
|
|
|
55902
55886
|
/**
|
|
55903
55887
|
* Notify the server that the user client left the collaborative session
|
|
55904
55888
|
*/
|
|
55905
|
-
leave() {
|
|
55889
|
+
leave(data) {
|
|
55890
|
+
if (Object.keys(this.clients).length === 1 && this.processedRevisions.size) {
|
|
55891
|
+
this.snapshot(data);
|
|
55892
|
+
}
|
|
55906
55893
|
delete this.clients[this.clientId];
|
|
55907
55894
|
this.transportService.leave(this.clientId);
|
|
55908
55895
|
this.transportService.sendMessage({
|
|
@@ -55915,6 +55902,9 @@ class Session extends EventBus {
|
|
|
55915
55902
|
* Send a snapshot of the spreadsheet to the collaboration server
|
|
55916
55903
|
*/
|
|
55917
55904
|
snapshot(data) {
|
|
55905
|
+
if (this.pendingMessages.length !== 0) {
|
|
55906
|
+
return;
|
|
55907
|
+
}
|
|
55918
55908
|
const snapshotId = this.uuidGenerator.uuidv4();
|
|
55919
55909
|
this.transportService.sendMessage({
|
|
55920
55910
|
type: "SNAPSHOT",
|
|
@@ -66402,7 +66392,7 @@ class Model extends EventBus {
|
|
|
66402
66392
|
this.session.join(this.config.client);
|
|
66403
66393
|
}
|
|
66404
66394
|
leaveSession() {
|
|
66405
|
-
this.session.leave();
|
|
66395
|
+
this.session.leave(this.exportData());
|
|
66406
66396
|
}
|
|
66407
66397
|
setupUiPlugin(Plugin) {
|
|
66408
66398
|
const plugin = new Plugin(this.uiPluginConfig);
|
|
@@ -66993,6 +66983,6 @@ exports.tokenColors = tokenColors;
|
|
|
66993
66983
|
exports.tokenize = tokenize;
|
|
66994
66984
|
|
|
66995
66985
|
|
|
66996
|
-
__info__.version = "17.3.
|
|
66997
|
-
__info__.date = "2024-06-
|
|
66998
|
-
__info__.hash = "
|
|
66986
|
+
__info__.version = "17.3.3";
|
|
66987
|
+
__info__.date = "2024-06-14T10:02:58.082Z";
|
|
66988
|
+
__info__.hash = "c690e9f";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -3800,7 +3800,7 @@ declare class Session extends EventBus<CollaborativeEvent> {
|
|
|
3800
3800
|
/**
|
|
3801
3801
|
* Notify the server that the user client left the collaborative session
|
|
3802
3802
|
*/
|
|
3803
|
-
leave(): void;
|
|
3803
|
+
leave(data: WorkbookData): void;
|
|
3804
3804
|
/**
|
|
3805
3805
|
* Send a snapshot of the spreadsheet to the collaboration server
|
|
3806
3806
|
*/
|
|
@@ -5144,6 +5144,7 @@ type Getters = {
|
|
|
5144
5144
|
type ArgType = "ANY" | "BOOLEAN" | "NUMBER" | "STRING" | "DATE" | "RANGE" | "RANGE<BOOLEAN>" | "RANGE<NUMBER>" | "RANGE<DATE>" | "RANGE<STRING>" | "RANGE<ANY>" | "META";
|
|
5145
5145
|
interface ArgDefinition {
|
|
5146
5146
|
acceptMatrix?: boolean;
|
|
5147
|
+
acceptMatrixOnly?: boolean;
|
|
5147
5148
|
repeating?: boolean;
|
|
5148
5149
|
optional?: boolean;
|
|
5149
5150
|
description: string;
|
|
@@ -6986,6 +6987,12 @@ declare class AxisDesignEditor extends Component<Props$O, SpreadsheetChildEnv> {
|
|
|
6986
6987
|
Section: typeof Section;
|
|
6987
6988
|
ChartTitle: typeof ChartTitle;
|
|
6988
6989
|
};
|
|
6990
|
+
static props: {
|
|
6991
|
+
figureId: StringConstructor;
|
|
6992
|
+
definition: ObjectConstructor;
|
|
6993
|
+
updateChart: FunctionConstructor;
|
|
6994
|
+
axesList: ArrayConstructor;
|
|
6995
|
+
};
|
|
6989
6996
|
state: {
|
|
6990
6997
|
currentAxis: string;
|
|
6991
6998
|
};
|
|
@@ -7049,6 +7056,12 @@ declare class ChartWithAxisDesignPanel extends Component<Props$M, SpreadsheetChi
|
|
|
7049
7056
|
AxisDesignEditor: typeof AxisDesignEditor;
|
|
7050
7057
|
RoundColorPicker: typeof RoundColorPicker;
|
|
7051
7058
|
};
|
|
7059
|
+
static props: {
|
|
7060
|
+
figureId: StringConstructor;
|
|
7061
|
+
definition: ObjectConstructor;
|
|
7062
|
+
canUpdateChart: FunctionConstructor;
|
|
7063
|
+
updateChart: FunctionConstructor;
|
|
7064
|
+
};
|
|
7052
7065
|
private state;
|
|
7053
7066
|
get axesList(): AxisDefinition[];
|
|
7054
7067
|
updateLegendPosition(ev: any): void;
|
|
@@ -7120,8 +7133,6 @@ declare class GaugeChartDesignPanel extends Component<Props$K, SpreadsheetChildE
|
|
|
7120
7133
|
protected state: PanelState;
|
|
7121
7134
|
setup(): void;
|
|
7122
7135
|
get designErrorMessages(): string[];
|
|
7123
|
-
updateBackgroundColor(color: Color): void;
|
|
7124
|
-
updateTitle(content: string): void;
|
|
7125
7136
|
isRangeMinInvalid(): boolean;
|
|
7126
7137
|
isRangeMaxInvalid(): boolean;
|
|
7127
7138
|
get isLowerInflectionPointInvalid(): boolean;
|
|
@@ -7129,7 +7140,6 @@ declare class GaugeChartDesignPanel extends Component<Props$K, SpreadsheetChildE
|
|
|
7129
7140
|
updateSectionColor(target: string, color: Color): void;
|
|
7130
7141
|
updateSectionRule(sectionRule: SectionRule): void;
|
|
7131
7142
|
canUpdateSectionRule(sectionRule: SectionRule): void;
|
|
7132
|
-
get backgroundColorTitle(): string;
|
|
7133
7143
|
}
|
|
7134
7144
|
|
|
7135
7145
|
declare class LineConfigPanel extends GenericChartConfigPanel {
|
|
@@ -7210,12 +7220,10 @@ declare class ScorecardChartDesignPanel extends Component<Props$I, SpreadsheetCh
|
|
|
7210
7220
|
};
|
|
7211
7221
|
get colorsSectionTitle(): string;
|
|
7212
7222
|
get humanizeNumbersLabel(): string;
|
|
7213
|
-
updateTitle(content: string): void;
|
|
7214
7223
|
updateHumanizeNumbers(humanize: boolean): void;
|
|
7215
7224
|
translate(term: any): string;
|
|
7216
7225
|
updateBaselineDescr(ev: any): void;
|
|
7217
7226
|
setColor(color: Color, colorPickerId: ColorPickerId): void;
|
|
7218
|
-
get backgroundColorTitle(): string;
|
|
7219
7227
|
}
|
|
7220
7228
|
|
|
7221
7229
|
interface ChartSidePanel {
|