@odoo/o-spreadsheet 16.1.10 → 16.1.11
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 -16
- package/dist/o-spreadsheet.d.ts +3 -2
- package/dist/o-spreadsheet.esm.js +44 -16
- package/dist/o-spreadsheet.iife.js +44 -16
- package/dist/o-spreadsheet.iife.min.js +76 -71
- package/package.json +1 -1
|
@@ -14117,7 +14117,11 @@ const LOOKUP = {
|
|
|
14117
14117
|
: getNormalizedValueFromRowRange;
|
|
14118
14118
|
const rangeLength = verticalSearch ? nbRow : nbCol;
|
|
14119
14119
|
const index = dichotomicSearch(searchArray, _searchKey, "nextSmaller", "asc", rangeLength, getElement);
|
|
14120
|
-
|
|
14120
|
+
if (index === -1)
|
|
14121
|
+
assertAvailable(undefined, searchKey);
|
|
14122
|
+
verticalSearch
|
|
14123
|
+
? assertAvailable(searchArray[0][index], searchKey)
|
|
14124
|
+
: assertAvailable(searchArray[index][nbRow - 1], searchKey);
|
|
14121
14125
|
if (resultRange === undefined) {
|
|
14122
14126
|
return (verticalSearch ? searchArray[nbCol - 1][index] : searchArray[index][nbRow - 1]);
|
|
14123
14127
|
}
|
|
@@ -19753,6 +19757,12 @@ css /* scss */ `
|
|
|
19753
19757
|
height: 25px;
|
|
19754
19758
|
}
|
|
19755
19759
|
}
|
|
19760
|
+
/** Make the character a bit bigger
|
|
19761
|
+
compared to its neighbor INPUT box */
|
|
19762
|
+
.o-remove-selection {
|
|
19763
|
+
font-weight: bold;
|
|
19764
|
+
font-size: calc(100% + 4px);
|
|
19765
|
+
}
|
|
19756
19766
|
}
|
|
19757
19767
|
`;
|
|
19758
19768
|
/**
|
|
@@ -19844,6 +19854,9 @@ class SelectionInput extends owl.Component {
|
|
|
19844
19854
|
}
|
|
19845
19855
|
}
|
|
19846
19856
|
}
|
|
19857
|
+
extractRanges(value) {
|
|
19858
|
+
return this.props.hasSingleRange ? value.split(",")[0] : value;
|
|
19859
|
+
}
|
|
19847
19860
|
focus(rangeId) {
|
|
19848
19861
|
this.state.isMissing = false;
|
|
19849
19862
|
this.state.mode = "select-range";
|
|
@@ -19863,15 +19876,16 @@ class SelectionInput extends owl.Component {
|
|
|
19863
19876
|
}
|
|
19864
19877
|
onInputChanged(rangeId, ev) {
|
|
19865
19878
|
const target = ev.target;
|
|
19879
|
+
const value = this.extractRanges(target.value);
|
|
19866
19880
|
this.env.model.dispatch("CHANGE_RANGE", {
|
|
19867
19881
|
id: this.id,
|
|
19868
19882
|
rangeId,
|
|
19869
|
-
value
|
|
19883
|
+
value,
|
|
19870
19884
|
});
|
|
19871
19885
|
target.blur();
|
|
19872
19886
|
this.triggerChange();
|
|
19873
19887
|
}
|
|
19874
|
-
|
|
19888
|
+
confirm() {
|
|
19875
19889
|
var _a, _b;
|
|
19876
19890
|
this.env.model.dispatch("UNFOCUS_SELECTION_INPUT");
|
|
19877
19891
|
const ranges = this.env.model.getters.getSelectionInputValue(this.id);
|
|
@@ -32353,7 +32367,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
32353
32367
|
// magic "empty" value
|
|
32354
32368
|
// Returning {value: null} instead of undefined will ensure that we don't
|
|
32355
32369
|
// fall back on the default value of the argument provided to the formula's compute function
|
|
32356
|
-
return { value: null };
|
|
32370
|
+
return { value: null, format: cell === null || cell === void 0 ? void 0 : cell.format };
|
|
32357
32371
|
}
|
|
32358
32372
|
return getEvaluatedCell(cell);
|
|
32359
32373
|
}
|
|
@@ -35904,6 +35918,9 @@ RendererPlugin.getters = ["getColDimensionsInViewport", "getRowDimensionsInViewp
|
|
|
35904
35918
|
*/
|
|
35905
35919
|
class SelectionInputPlugin extends UIPlugin {
|
|
35906
35920
|
constructor(config, initialRanges, inputHasSingleRange) {
|
|
35921
|
+
if (inputHasSingleRange && initialRanges.length > 1) {
|
|
35922
|
+
throw new Error("Input with a single range cannot be instantiated with several range references.");
|
|
35923
|
+
}
|
|
35907
35924
|
super(config);
|
|
35908
35925
|
this.inputHasSingleRange = inputHasSingleRange;
|
|
35909
35926
|
this.ranges = [];
|
|
@@ -35926,6 +35943,11 @@ class SelectionInputPlugin extends UIPlugin {
|
|
|
35926
35943
|
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35927
35944
|
}
|
|
35928
35945
|
break;
|
|
35946
|
+
case "CHANGE_RANGE":
|
|
35947
|
+
if (this.inputHasSingleRange && cmd.value.split(",").length > 1) {
|
|
35948
|
+
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35949
|
+
}
|
|
35950
|
+
break;
|
|
35929
35951
|
}
|
|
35930
35952
|
return 0 /* CommandResult.Success */;
|
|
35931
35953
|
}
|
|
@@ -36750,13 +36772,9 @@ class Session extends EventBus {
|
|
|
36750
36772
|
}
|
|
36751
36773
|
loadInitialMessages(messages) {
|
|
36752
36774
|
this.isReplayingInitialRevisions = true;
|
|
36753
|
-
this.on("unexpected-revision-id", this, ({ revisionId }) => {
|
|
36754
|
-
throw new Error(`The spreadsheet could not be loaded. Revision ${revisionId} is corrupted.`);
|
|
36755
|
-
});
|
|
36756
36775
|
for (const message of messages) {
|
|
36757
36776
|
this.onMessageReceived(message);
|
|
36758
36777
|
}
|
|
36759
|
-
this.off("unexpected-revision-id", this);
|
|
36760
36778
|
this.isReplayingInitialRevisions = false;
|
|
36761
36779
|
}
|
|
36762
36780
|
/**
|
|
@@ -36828,6 +36846,10 @@ class Session extends EventBus {
|
|
|
36828
36846
|
onMessageReceived(message) {
|
|
36829
36847
|
if (this.isAlreadyProcessed(message))
|
|
36830
36848
|
return;
|
|
36849
|
+
if (this.isWrongServerRevisionId(message)) {
|
|
36850
|
+
this.trigger("unexpected-revision-id");
|
|
36851
|
+
return;
|
|
36852
|
+
}
|
|
36831
36853
|
switch (message.type) {
|
|
36832
36854
|
case "CLIENT_MOVED":
|
|
36833
36855
|
this.onClientMoved(message);
|
|
@@ -36854,10 +36876,6 @@ class Session extends EventBus {
|
|
|
36854
36876
|
});
|
|
36855
36877
|
break;
|
|
36856
36878
|
case "REMOTE_REVISION":
|
|
36857
|
-
if (message.serverRevisionId !== this.serverRevisionId) {
|
|
36858
|
-
this.trigger("unexpected-revision-id", { revisionId: message.serverRevisionId });
|
|
36859
|
-
return;
|
|
36860
|
-
}
|
|
36861
36879
|
const { clientId, commands } = message;
|
|
36862
36880
|
const revision = new Revision(message.nextRevisionId, clientId, commands);
|
|
36863
36881
|
if (revision.clientId !== this.clientId) {
|
|
@@ -36989,6 +37007,17 @@ class Session extends EventBus {
|
|
|
36989
37007
|
return false;
|
|
36990
37008
|
}
|
|
36991
37009
|
}
|
|
37010
|
+
isWrongServerRevisionId(message) {
|
|
37011
|
+
switch (message.type) {
|
|
37012
|
+
case "REMOTE_REVISION":
|
|
37013
|
+
case "REVISION_REDONE":
|
|
37014
|
+
case "REVISION_UNDONE":
|
|
37015
|
+
case "SNAPSHOT_CREATED":
|
|
37016
|
+
return message.serverRevisionId !== this.serverRevisionId;
|
|
37017
|
+
default:
|
|
37018
|
+
return false;
|
|
37019
|
+
}
|
|
37020
|
+
}
|
|
36992
37021
|
dropPendingHistoryMessages() {
|
|
36993
37022
|
this.waitingUndoRedoAck = false;
|
|
36994
37023
|
this.pendingMessages = this.pendingMessages.filter(({ type }) => type !== "REVISION_REDONE" && type !== "REVISION_UNDONE");
|
|
@@ -39619,7 +39648,6 @@ css /* scss */ `
|
|
|
39619
39648
|
color: dimgrey;
|
|
39620
39649
|
}
|
|
39621
39650
|
.o-sidePanelClose {
|
|
39622
|
-
font-size: 1.5rem;
|
|
39623
39651
|
padding: 5px 10px;
|
|
39624
39652
|
cursor: pointer;
|
|
39625
39653
|
&:hover {
|
|
@@ -44231,6 +44259,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
44231
44259
|
exports.tokenize = tokenize;
|
|
44232
44260
|
|
|
44233
44261
|
|
|
44234
|
-
__info__.version = '16.1.
|
|
44235
|
-
__info__.date = '2023-
|
|
44236
|
-
__info__.hash = '
|
|
44262
|
+
__info__.version = '16.1.11';
|
|
44263
|
+
__info__.date = '2023-05-12T10:58:24.113Z';
|
|
44264
|
+
__info__.hash = 'd9a2cce';
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -855,7 +855,6 @@ interface CollaborativeEventReceived {
|
|
|
855
855
|
}
|
|
856
856
|
interface UnexpectedRevisionIdEvent {
|
|
857
857
|
type: "unexpected-revision-id";
|
|
858
|
-
revisionId: UID;
|
|
859
858
|
}
|
|
860
859
|
interface NewLocalStateUpdateEvent {
|
|
861
860
|
type: "new-local-state-update";
|
|
@@ -2892,6 +2891,7 @@ declare class Session extends EventBus<CollaborativeEvent> {
|
|
|
2892
2891
|
private sendPendingMessage;
|
|
2893
2892
|
private acknowledge;
|
|
2894
2893
|
private isAlreadyProcessed;
|
|
2894
|
+
isWrongServerRevisionId(message: CollaborationMessage): boolean;
|
|
2895
2895
|
private dropPendingHistoryMessages;
|
|
2896
2896
|
}
|
|
2897
2897
|
|
|
@@ -5014,11 +5014,12 @@ declare class SelectionInput extends Component<Props$x, SpreadsheetChildEnv> {
|
|
|
5014
5014
|
getColor(range: SelectionRange): string;
|
|
5015
5015
|
private triggerChange;
|
|
5016
5016
|
onKeydown(ev: KeyboardEvent): void;
|
|
5017
|
+
private extractRanges;
|
|
5017
5018
|
focus(rangeId: string): void;
|
|
5018
5019
|
addEmptyInput(): void;
|
|
5019
5020
|
removeInput(rangeId: string): void;
|
|
5020
5021
|
onInputChanged(rangeId: string, ev: InputEvent): void;
|
|
5021
|
-
|
|
5022
|
+
confirm(): void;
|
|
5022
5023
|
}
|
|
5023
5024
|
|
|
5024
5025
|
interface Props$w {
|
|
@@ -14113,7 +14113,11 @@ const LOOKUP = {
|
|
|
14113
14113
|
: getNormalizedValueFromRowRange;
|
|
14114
14114
|
const rangeLength = verticalSearch ? nbRow : nbCol;
|
|
14115
14115
|
const index = dichotomicSearch(searchArray, _searchKey, "nextSmaller", "asc", rangeLength, getElement);
|
|
14116
|
-
|
|
14116
|
+
if (index === -1)
|
|
14117
|
+
assertAvailable(undefined, searchKey);
|
|
14118
|
+
verticalSearch
|
|
14119
|
+
? assertAvailable(searchArray[0][index], searchKey)
|
|
14120
|
+
: assertAvailable(searchArray[index][nbRow - 1], searchKey);
|
|
14117
14121
|
if (resultRange === undefined) {
|
|
14118
14122
|
return (verticalSearch ? searchArray[nbCol - 1][index] : searchArray[index][nbRow - 1]);
|
|
14119
14123
|
}
|
|
@@ -19749,6 +19753,12 @@ css /* scss */ `
|
|
|
19749
19753
|
height: 25px;
|
|
19750
19754
|
}
|
|
19751
19755
|
}
|
|
19756
|
+
/** Make the character a bit bigger
|
|
19757
|
+
compared to its neighbor INPUT box */
|
|
19758
|
+
.o-remove-selection {
|
|
19759
|
+
font-weight: bold;
|
|
19760
|
+
font-size: calc(100% + 4px);
|
|
19761
|
+
}
|
|
19752
19762
|
}
|
|
19753
19763
|
`;
|
|
19754
19764
|
/**
|
|
@@ -19840,6 +19850,9 @@ class SelectionInput extends Component {
|
|
|
19840
19850
|
}
|
|
19841
19851
|
}
|
|
19842
19852
|
}
|
|
19853
|
+
extractRanges(value) {
|
|
19854
|
+
return this.props.hasSingleRange ? value.split(",")[0] : value;
|
|
19855
|
+
}
|
|
19843
19856
|
focus(rangeId) {
|
|
19844
19857
|
this.state.isMissing = false;
|
|
19845
19858
|
this.state.mode = "select-range";
|
|
@@ -19859,15 +19872,16 @@ class SelectionInput extends Component {
|
|
|
19859
19872
|
}
|
|
19860
19873
|
onInputChanged(rangeId, ev) {
|
|
19861
19874
|
const target = ev.target;
|
|
19875
|
+
const value = this.extractRanges(target.value);
|
|
19862
19876
|
this.env.model.dispatch("CHANGE_RANGE", {
|
|
19863
19877
|
id: this.id,
|
|
19864
19878
|
rangeId,
|
|
19865
|
-
value
|
|
19879
|
+
value,
|
|
19866
19880
|
});
|
|
19867
19881
|
target.blur();
|
|
19868
19882
|
this.triggerChange();
|
|
19869
19883
|
}
|
|
19870
|
-
|
|
19884
|
+
confirm() {
|
|
19871
19885
|
var _a, _b;
|
|
19872
19886
|
this.env.model.dispatch("UNFOCUS_SELECTION_INPUT");
|
|
19873
19887
|
const ranges = this.env.model.getters.getSelectionInputValue(this.id);
|
|
@@ -32349,7 +32363,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
32349
32363
|
// magic "empty" value
|
|
32350
32364
|
// Returning {value: null} instead of undefined will ensure that we don't
|
|
32351
32365
|
// fall back on the default value of the argument provided to the formula's compute function
|
|
32352
|
-
return { value: null };
|
|
32366
|
+
return { value: null, format: cell === null || cell === void 0 ? void 0 : cell.format };
|
|
32353
32367
|
}
|
|
32354
32368
|
return getEvaluatedCell(cell);
|
|
32355
32369
|
}
|
|
@@ -35900,6 +35914,9 @@ RendererPlugin.getters = ["getColDimensionsInViewport", "getRowDimensionsInViewp
|
|
|
35900
35914
|
*/
|
|
35901
35915
|
class SelectionInputPlugin extends UIPlugin {
|
|
35902
35916
|
constructor(config, initialRanges, inputHasSingleRange) {
|
|
35917
|
+
if (inputHasSingleRange && initialRanges.length > 1) {
|
|
35918
|
+
throw new Error("Input with a single range cannot be instantiated with several range references.");
|
|
35919
|
+
}
|
|
35903
35920
|
super(config);
|
|
35904
35921
|
this.inputHasSingleRange = inputHasSingleRange;
|
|
35905
35922
|
this.ranges = [];
|
|
@@ -35922,6 +35939,11 @@ class SelectionInputPlugin extends UIPlugin {
|
|
|
35922
35939
|
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35923
35940
|
}
|
|
35924
35941
|
break;
|
|
35942
|
+
case "CHANGE_RANGE":
|
|
35943
|
+
if (this.inputHasSingleRange && cmd.value.split(",").length > 1) {
|
|
35944
|
+
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35945
|
+
}
|
|
35946
|
+
break;
|
|
35925
35947
|
}
|
|
35926
35948
|
return 0 /* CommandResult.Success */;
|
|
35927
35949
|
}
|
|
@@ -36746,13 +36768,9 @@ class Session extends EventBus {
|
|
|
36746
36768
|
}
|
|
36747
36769
|
loadInitialMessages(messages) {
|
|
36748
36770
|
this.isReplayingInitialRevisions = true;
|
|
36749
|
-
this.on("unexpected-revision-id", this, ({ revisionId }) => {
|
|
36750
|
-
throw new Error(`The spreadsheet could not be loaded. Revision ${revisionId} is corrupted.`);
|
|
36751
|
-
});
|
|
36752
36771
|
for (const message of messages) {
|
|
36753
36772
|
this.onMessageReceived(message);
|
|
36754
36773
|
}
|
|
36755
|
-
this.off("unexpected-revision-id", this);
|
|
36756
36774
|
this.isReplayingInitialRevisions = false;
|
|
36757
36775
|
}
|
|
36758
36776
|
/**
|
|
@@ -36824,6 +36842,10 @@ class Session extends EventBus {
|
|
|
36824
36842
|
onMessageReceived(message) {
|
|
36825
36843
|
if (this.isAlreadyProcessed(message))
|
|
36826
36844
|
return;
|
|
36845
|
+
if (this.isWrongServerRevisionId(message)) {
|
|
36846
|
+
this.trigger("unexpected-revision-id");
|
|
36847
|
+
return;
|
|
36848
|
+
}
|
|
36827
36849
|
switch (message.type) {
|
|
36828
36850
|
case "CLIENT_MOVED":
|
|
36829
36851
|
this.onClientMoved(message);
|
|
@@ -36850,10 +36872,6 @@ class Session extends EventBus {
|
|
|
36850
36872
|
});
|
|
36851
36873
|
break;
|
|
36852
36874
|
case "REMOTE_REVISION":
|
|
36853
|
-
if (message.serverRevisionId !== this.serverRevisionId) {
|
|
36854
|
-
this.trigger("unexpected-revision-id", { revisionId: message.serverRevisionId });
|
|
36855
|
-
return;
|
|
36856
|
-
}
|
|
36857
36875
|
const { clientId, commands } = message;
|
|
36858
36876
|
const revision = new Revision(message.nextRevisionId, clientId, commands);
|
|
36859
36877
|
if (revision.clientId !== this.clientId) {
|
|
@@ -36985,6 +37003,17 @@ class Session extends EventBus {
|
|
|
36985
37003
|
return false;
|
|
36986
37004
|
}
|
|
36987
37005
|
}
|
|
37006
|
+
isWrongServerRevisionId(message) {
|
|
37007
|
+
switch (message.type) {
|
|
37008
|
+
case "REMOTE_REVISION":
|
|
37009
|
+
case "REVISION_REDONE":
|
|
37010
|
+
case "REVISION_UNDONE":
|
|
37011
|
+
case "SNAPSHOT_CREATED":
|
|
37012
|
+
return message.serverRevisionId !== this.serverRevisionId;
|
|
37013
|
+
default:
|
|
37014
|
+
return false;
|
|
37015
|
+
}
|
|
37016
|
+
}
|
|
36988
37017
|
dropPendingHistoryMessages() {
|
|
36989
37018
|
this.waitingUndoRedoAck = false;
|
|
36990
37019
|
this.pendingMessages = this.pendingMessages.filter(({ type }) => type !== "REVISION_REDONE" && type !== "REVISION_UNDONE");
|
|
@@ -39615,7 +39644,6 @@ css /* scss */ `
|
|
|
39615
39644
|
color: dimgrey;
|
|
39616
39645
|
}
|
|
39617
39646
|
.o-sidePanelClose {
|
|
39618
|
-
font-size: 1.5rem;
|
|
39619
39647
|
padding: 5px 10px;
|
|
39620
39648
|
cursor: pointer;
|
|
39621
39649
|
&:hover {
|
|
@@ -44199,6 +44227,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
44199
44227
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
44200
44228
|
|
|
44201
44229
|
|
|
44202
|
-
__info__.version = '16.1.
|
|
44203
|
-
__info__.date = '2023-
|
|
44204
|
-
__info__.hash = '
|
|
44230
|
+
__info__.version = '16.1.11';
|
|
44231
|
+
__info__.date = '2023-05-12T10:58:24.113Z';
|
|
44232
|
+
__info__.hash = 'd9a2cce';
|
|
@@ -14114,7 +14114,11 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
14114
14114
|
: getNormalizedValueFromRowRange;
|
|
14115
14115
|
const rangeLength = verticalSearch ? nbRow : nbCol;
|
|
14116
14116
|
const index = dichotomicSearch(searchArray, _searchKey, "nextSmaller", "asc", rangeLength, getElement);
|
|
14117
|
-
|
|
14117
|
+
if (index === -1)
|
|
14118
|
+
assertAvailable(undefined, searchKey);
|
|
14119
|
+
verticalSearch
|
|
14120
|
+
? assertAvailable(searchArray[0][index], searchKey)
|
|
14121
|
+
: assertAvailable(searchArray[index][nbRow - 1], searchKey);
|
|
14118
14122
|
if (resultRange === undefined) {
|
|
14119
14123
|
return (verticalSearch ? searchArray[nbCol - 1][index] : searchArray[index][nbRow - 1]);
|
|
14120
14124
|
}
|
|
@@ -19750,6 +19754,12 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
19750
19754
|
height: 25px;
|
|
19751
19755
|
}
|
|
19752
19756
|
}
|
|
19757
|
+
/** Make the character a bit bigger
|
|
19758
|
+
compared to its neighbor INPUT box */
|
|
19759
|
+
.o-remove-selection {
|
|
19760
|
+
font-weight: bold;
|
|
19761
|
+
font-size: calc(100% + 4px);
|
|
19762
|
+
}
|
|
19753
19763
|
}
|
|
19754
19764
|
`;
|
|
19755
19765
|
/**
|
|
@@ -19841,6 +19851,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
19841
19851
|
}
|
|
19842
19852
|
}
|
|
19843
19853
|
}
|
|
19854
|
+
extractRanges(value) {
|
|
19855
|
+
return this.props.hasSingleRange ? value.split(",")[0] : value;
|
|
19856
|
+
}
|
|
19844
19857
|
focus(rangeId) {
|
|
19845
19858
|
this.state.isMissing = false;
|
|
19846
19859
|
this.state.mode = "select-range";
|
|
@@ -19860,15 +19873,16 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
19860
19873
|
}
|
|
19861
19874
|
onInputChanged(rangeId, ev) {
|
|
19862
19875
|
const target = ev.target;
|
|
19876
|
+
const value = this.extractRanges(target.value);
|
|
19863
19877
|
this.env.model.dispatch("CHANGE_RANGE", {
|
|
19864
19878
|
id: this.id,
|
|
19865
19879
|
rangeId,
|
|
19866
|
-
value
|
|
19880
|
+
value,
|
|
19867
19881
|
});
|
|
19868
19882
|
target.blur();
|
|
19869
19883
|
this.triggerChange();
|
|
19870
19884
|
}
|
|
19871
|
-
|
|
19885
|
+
confirm() {
|
|
19872
19886
|
var _a, _b;
|
|
19873
19887
|
this.env.model.dispatch("UNFOCUS_SELECTION_INPUT");
|
|
19874
19888
|
const ranges = this.env.model.getters.getSelectionInputValue(this.id);
|
|
@@ -32350,7 +32364,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
32350
32364
|
// magic "empty" value
|
|
32351
32365
|
// Returning {value: null} instead of undefined will ensure that we don't
|
|
32352
32366
|
// fall back on the default value of the argument provided to the formula's compute function
|
|
32353
|
-
return { value: null };
|
|
32367
|
+
return { value: null, format: cell === null || cell === void 0 ? void 0 : cell.format };
|
|
32354
32368
|
}
|
|
32355
32369
|
return getEvaluatedCell(cell);
|
|
32356
32370
|
}
|
|
@@ -35901,6 +35915,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35901
35915
|
*/
|
|
35902
35916
|
class SelectionInputPlugin extends UIPlugin {
|
|
35903
35917
|
constructor(config, initialRanges, inputHasSingleRange) {
|
|
35918
|
+
if (inputHasSingleRange && initialRanges.length > 1) {
|
|
35919
|
+
throw new Error("Input with a single range cannot be instantiated with several range references.");
|
|
35920
|
+
}
|
|
35904
35921
|
super(config);
|
|
35905
35922
|
this.inputHasSingleRange = inputHasSingleRange;
|
|
35906
35923
|
this.ranges = [];
|
|
@@ -35923,6 +35940,11 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35923
35940
|
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35924
35941
|
}
|
|
35925
35942
|
break;
|
|
35943
|
+
case "CHANGE_RANGE":
|
|
35944
|
+
if (this.inputHasSingleRange && cmd.value.split(",").length > 1) {
|
|
35945
|
+
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35946
|
+
}
|
|
35947
|
+
break;
|
|
35926
35948
|
}
|
|
35927
35949
|
return 0 /* CommandResult.Success */;
|
|
35928
35950
|
}
|
|
@@ -36747,13 +36769,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36747
36769
|
}
|
|
36748
36770
|
loadInitialMessages(messages) {
|
|
36749
36771
|
this.isReplayingInitialRevisions = true;
|
|
36750
|
-
this.on("unexpected-revision-id", this, ({ revisionId }) => {
|
|
36751
|
-
throw new Error(`The spreadsheet could not be loaded. Revision ${revisionId} is corrupted.`);
|
|
36752
|
-
});
|
|
36753
36772
|
for (const message of messages) {
|
|
36754
36773
|
this.onMessageReceived(message);
|
|
36755
36774
|
}
|
|
36756
|
-
this.off("unexpected-revision-id", this);
|
|
36757
36775
|
this.isReplayingInitialRevisions = false;
|
|
36758
36776
|
}
|
|
36759
36777
|
/**
|
|
@@ -36825,6 +36843,10 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36825
36843
|
onMessageReceived(message) {
|
|
36826
36844
|
if (this.isAlreadyProcessed(message))
|
|
36827
36845
|
return;
|
|
36846
|
+
if (this.isWrongServerRevisionId(message)) {
|
|
36847
|
+
this.trigger("unexpected-revision-id");
|
|
36848
|
+
return;
|
|
36849
|
+
}
|
|
36828
36850
|
switch (message.type) {
|
|
36829
36851
|
case "CLIENT_MOVED":
|
|
36830
36852
|
this.onClientMoved(message);
|
|
@@ -36851,10 +36873,6 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36851
36873
|
});
|
|
36852
36874
|
break;
|
|
36853
36875
|
case "REMOTE_REVISION":
|
|
36854
|
-
if (message.serverRevisionId !== this.serverRevisionId) {
|
|
36855
|
-
this.trigger("unexpected-revision-id", { revisionId: message.serverRevisionId });
|
|
36856
|
-
return;
|
|
36857
|
-
}
|
|
36858
36876
|
const { clientId, commands } = message;
|
|
36859
36877
|
const revision = new Revision(message.nextRevisionId, clientId, commands);
|
|
36860
36878
|
if (revision.clientId !== this.clientId) {
|
|
@@ -36986,6 +37004,17 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36986
37004
|
return false;
|
|
36987
37005
|
}
|
|
36988
37006
|
}
|
|
37007
|
+
isWrongServerRevisionId(message) {
|
|
37008
|
+
switch (message.type) {
|
|
37009
|
+
case "REMOTE_REVISION":
|
|
37010
|
+
case "REVISION_REDONE":
|
|
37011
|
+
case "REVISION_UNDONE":
|
|
37012
|
+
case "SNAPSHOT_CREATED":
|
|
37013
|
+
return message.serverRevisionId !== this.serverRevisionId;
|
|
37014
|
+
default:
|
|
37015
|
+
return false;
|
|
37016
|
+
}
|
|
37017
|
+
}
|
|
36989
37018
|
dropPendingHistoryMessages() {
|
|
36990
37019
|
this.waitingUndoRedoAck = false;
|
|
36991
37020
|
this.pendingMessages = this.pendingMessages.filter(({ type }) => type !== "REVISION_REDONE" && type !== "REVISION_UNDONE");
|
|
@@ -39616,7 +39645,6 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
39616
39645
|
color: dimgrey;
|
|
39617
39646
|
}
|
|
39618
39647
|
.o-sidePanelClose {
|
|
39619
|
-
font-size: 1.5rem;
|
|
39620
39648
|
padding: 5px 10px;
|
|
39621
39649
|
cursor: pointer;
|
|
39622
39650
|
&:hover {
|
|
@@ -44230,9 +44258,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
44230
44258
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
44231
44259
|
|
|
44232
44260
|
|
|
44233
|
-
__info__.version = '16.1.
|
|
44234
|
-
__info__.date = '2023-
|
|
44235
|
-
__info__.hash = '
|
|
44261
|
+
__info__.version = '16.1.11';
|
|
44262
|
+
__info__.date = '2023-05-12T10:58:24.113Z';
|
|
44263
|
+
__info__.hash = 'd9a2cce';
|
|
44236
44264
|
|
|
44237
44265
|
|
|
44238
44266
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|