@odoo/o-spreadsheet 16.1.10 → 16.1.12
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 +56 -16
- package/dist/o-spreadsheet.d.ts +3 -2
- package/dist/o-spreadsheet.esm.js +56 -16
- package/dist/o-spreadsheet.iife.js +56 -16
- package/dist/o-spreadsheet.iife.min.js +88 -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);
|
|
@@ -20019,6 +20033,18 @@ css /* scss */ `
|
|
|
20019
20033
|
grid-template-columns: repeat(${ITEMS_PER_LINE}, 1fr);
|
|
20020
20034
|
grid-gap: ${ITEM_HORIZONTAL_MARGIN * 2}px;
|
|
20021
20035
|
}
|
|
20036
|
+
.o-color-picker-toggler {
|
|
20037
|
+
display: flex;
|
|
20038
|
+
.o-color-picker-toggler-sign {
|
|
20039
|
+
margin: auto auto;
|
|
20040
|
+
width: 55%;
|
|
20041
|
+
height: 55%;
|
|
20042
|
+
.o-icon {
|
|
20043
|
+
width: 100%;
|
|
20044
|
+
height: 100%;
|
|
20045
|
+
}
|
|
20046
|
+
}
|
|
20047
|
+
}
|
|
20022
20048
|
.o-color-picker-line-item {
|
|
20023
20049
|
width: ${ITEM_EDGE_LENGTH}px;
|
|
20024
20050
|
height: ${ITEM_EDGE_LENGTH}px;
|
|
@@ -32353,7 +32379,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
32353
32379
|
// magic "empty" value
|
|
32354
32380
|
// Returning {value: null} instead of undefined will ensure that we don't
|
|
32355
32381
|
// fall back on the default value of the argument provided to the formula's compute function
|
|
32356
|
-
return { value: null };
|
|
32382
|
+
return { value: null, format: cell === null || cell === void 0 ? void 0 : cell.format };
|
|
32357
32383
|
}
|
|
32358
32384
|
return getEvaluatedCell(cell);
|
|
32359
32385
|
}
|
|
@@ -35904,6 +35930,9 @@ RendererPlugin.getters = ["getColDimensionsInViewport", "getRowDimensionsInViewp
|
|
|
35904
35930
|
*/
|
|
35905
35931
|
class SelectionInputPlugin extends UIPlugin {
|
|
35906
35932
|
constructor(config, initialRanges, inputHasSingleRange) {
|
|
35933
|
+
if (inputHasSingleRange && initialRanges.length > 1) {
|
|
35934
|
+
throw new Error("Input with a single range cannot be instantiated with several range references.");
|
|
35935
|
+
}
|
|
35907
35936
|
super(config);
|
|
35908
35937
|
this.inputHasSingleRange = inputHasSingleRange;
|
|
35909
35938
|
this.ranges = [];
|
|
@@ -35926,6 +35955,11 @@ class SelectionInputPlugin extends UIPlugin {
|
|
|
35926
35955
|
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35927
35956
|
}
|
|
35928
35957
|
break;
|
|
35958
|
+
case "CHANGE_RANGE":
|
|
35959
|
+
if (this.inputHasSingleRange && cmd.value.split(",").length > 1) {
|
|
35960
|
+
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35961
|
+
}
|
|
35962
|
+
break;
|
|
35929
35963
|
}
|
|
35930
35964
|
return 0 /* CommandResult.Success */;
|
|
35931
35965
|
}
|
|
@@ -36750,13 +36784,9 @@ class Session extends EventBus {
|
|
|
36750
36784
|
}
|
|
36751
36785
|
loadInitialMessages(messages) {
|
|
36752
36786
|
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
36787
|
for (const message of messages) {
|
|
36757
36788
|
this.onMessageReceived(message);
|
|
36758
36789
|
}
|
|
36759
|
-
this.off("unexpected-revision-id", this);
|
|
36760
36790
|
this.isReplayingInitialRevisions = false;
|
|
36761
36791
|
}
|
|
36762
36792
|
/**
|
|
@@ -36828,6 +36858,10 @@ class Session extends EventBus {
|
|
|
36828
36858
|
onMessageReceived(message) {
|
|
36829
36859
|
if (this.isAlreadyProcessed(message))
|
|
36830
36860
|
return;
|
|
36861
|
+
if (this.isWrongServerRevisionId(message)) {
|
|
36862
|
+
this.trigger("unexpected-revision-id");
|
|
36863
|
+
return;
|
|
36864
|
+
}
|
|
36831
36865
|
switch (message.type) {
|
|
36832
36866
|
case "CLIENT_MOVED":
|
|
36833
36867
|
this.onClientMoved(message);
|
|
@@ -36854,10 +36888,6 @@ class Session extends EventBus {
|
|
|
36854
36888
|
});
|
|
36855
36889
|
break;
|
|
36856
36890
|
case "REMOTE_REVISION":
|
|
36857
|
-
if (message.serverRevisionId !== this.serverRevisionId) {
|
|
36858
|
-
this.trigger("unexpected-revision-id", { revisionId: message.serverRevisionId });
|
|
36859
|
-
return;
|
|
36860
|
-
}
|
|
36861
36891
|
const { clientId, commands } = message;
|
|
36862
36892
|
const revision = new Revision(message.nextRevisionId, clientId, commands);
|
|
36863
36893
|
if (revision.clientId !== this.clientId) {
|
|
@@ -36989,6 +37019,17 @@ class Session extends EventBus {
|
|
|
36989
37019
|
return false;
|
|
36990
37020
|
}
|
|
36991
37021
|
}
|
|
37022
|
+
isWrongServerRevisionId(message) {
|
|
37023
|
+
switch (message.type) {
|
|
37024
|
+
case "REMOTE_REVISION":
|
|
37025
|
+
case "REVISION_REDONE":
|
|
37026
|
+
case "REVISION_UNDONE":
|
|
37027
|
+
case "SNAPSHOT_CREATED":
|
|
37028
|
+
return message.serverRevisionId !== this.serverRevisionId;
|
|
37029
|
+
default:
|
|
37030
|
+
return false;
|
|
37031
|
+
}
|
|
37032
|
+
}
|
|
36992
37033
|
dropPendingHistoryMessages() {
|
|
36993
37034
|
this.waitingUndoRedoAck = false;
|
|
36994
37035
|
this.pendingMessages = this.pendingMessages.filter(({ type }) => type !== "REVISION_REDONE" && type !== "REVISION_UNDONE");
|
|
@@ -39619,7 +39660,6 @@ css /* scss */ `
|
|
|
39619
39660
|
color: dimgrey;
|
|
39620
39661
|
}
|
|
39621
39662
|
.o-sidePanelClose {
|
|
39622
|
-
font-size: 1.5rem;
|
|
39623
39663
|
padding: 5px 10px;
|
|
39624
39664
|
cursor: pointer;
|
|
39625
39665
|
&:hover {
|
|
@@ -44231,6 +44271,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
44231
44271
|
exports.tokenize = tokenize;
|
|
44232
44272
|
|
|
44233
44273
|
|
|
44234
|
-
__info__.version = '16.1.
|
|
44235
|
-
__info__.date = '2023-
|
|
44236
|
-
__info__.hash = '
|
|
44274
|
+
__info__.version = '16.1.12';
|
|
44275
|
+
__info__.date = '2023-05-25T12:56:29.735Z';
|
|
44276
|
+
__info__.hash = 'b80dc51';
|
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);
|
|
@@ -20015,6 +20029,18 @@ css /* scss */ `
|
|
|
20015
20029
|
grid-template-columns: repeat(${ITEMS_PER_LINE}, 1fr);
|
|
20016
20030
|
grid-gap: ${ITEM_HORIZONTAL_MARGIN * 2}px;
|
|
20017
20031
|
}
|
|
20032
|
+
.o-color-picker-toggler {
|
|
20033
|
+
display: flex;
|
|
20034
|
+
.o-color-picker-toggler-sign {
|
|
20035
|
+
margin: auto auto;
|
|
20036
|
+
width: 55%;
|
|
20037
|
+
height: 55%;
|
|
20038
|
+
.o-icon {
|
|
20039
|
+
width: 100%;
|
|
20040
|
+
height: 100%;
|
|
20041
|
+
}
|
|
20042
|
+
}
|
|
20043
|
+
}
|
|
20018
20044
|
.o-color-picker-line-item {
|
|
20019
20045
|
width: ${ITEM_EDGE_LENGTH}px;
|
|
20020
20046
|
height: ${ITEM_EDGE_LENGTH}px;
|
|
@@ -32349,7 +32375,7 @@ class EvaluationPlugin extends UIPlugin {
|
|
|
32349
32375
|
// magic "empty" value
|
|
32350
32376
|
// Returning {value: null} instead of undefined will ensure that we don't
|
|
32351
32377
|
// fall back on the default value of the argument provided to the formula's compute function
|
|
32352
|
-
return { value: null };
|
|
32378
|
+
return { value: null, format: cell === null || cell === void 0 ? void 0 : cell.format };
|
|
32353
32379
|
}
|
|
32354
32380
|
return getEvaluatedCell(cell);
|
|
32355
32381
|
}
|
|
@@ -35900,6 +35926,9 @@ RendererPlugin.getters = ["getColDimensionsInViewport", "getRowDimensionsInViewp
|
|
|
35900
35926
|
*/
|
|
35901
35927
|
class SelectionInputPlugin extends UIPlugin {
|
|
35902
35928
|
constructor(config, initialRanges, inputHasSingleRange) {
|
|
35929
|
+
if (inputHasSingleRange && initialRanges.length > 1) {
|
|
35930
|
+
throw new Error("Input with a single range cannot be instantiated with several range references.");
|
|
35931
|
+
}
|
|
35903
35932
|
super(config);
|
|
35904
35933
|
this.inputHasSingleRange = inputHasSingleRange;
|
|
35905
35934
|
this.ranges = [];
|
|
@@ -35922,6 +35951,11 @@ class SelectionInputPlugin extends UIPlugin {
|
|
|
35922
35951
|
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35923
35952
|
}
|
|
35924
35953
|
break;
|
|
35954
|
+
case "CHANGE_RANGE":
|
|
35955
|
+
if (this.inputHasSingleRange && cmd.value.split(",").length > 1) {
|
|
35956
|
+
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35957
|
+
}
|
|
35958
|
+
break;
|
|
35925
35959
|
}
|
|
35926
35960
|
return 0 /* CommandResult.Success */;
|
|
35927
35961
|
}
|
|
@@ -36746,13 +36780,9 @@ class Session extends EventBus {
|
|
|
36746
36780
|
}
|
|
36747
36781
|
loadInitialMessages(messages) {
|
|
36748
36782
|
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
36783
|
for (const message of messages) {
|
|
36753
36784
|
this.onMessageReceived(message);
|
|
36754
36785
|
}
|
|
36755
|
-
this.off("unexpected-revision-id", this);
|
|
36756
36786
|
this.isReplayingInitialRevisions = false;
|
|
36757
36787
|
}
|
|
36758
36788
|
/**
|
|
@@ -36824,6 +36854,10 @@ class Session extends EventBus {
|
|
|
36824
36854
|
onMessageReceived(message) {
|
|
36825
36855
|
if (this.isAlreadyProcessed(message))
|
|
36826
36856
|
return;
|
|
36857
|
+
if (this.isWrongServerRevisionId(message)) {
|
|
36858
|
+
this.trigger("unexpected-revision-id");
|
|
36859
|
+
return;
|
|
36860
|
+
}
|
|
36827
36861
|
switch (message.type) {
|
|
36828
36862
|
case "CLIENT_MOVED":
|
|
36829
36863
|
this.onClientMoved(message);
|
|
@@ -36850,10 +36884,6 @@ class Session extends EventBus {
|
|
|
36850
36884
|
});
|
|
36851
36885
|
break;
|
|
36852
36886
|
case "REMOTE_REVISION":
|
|
36853
|
-
if (message.serverRevisionId !== this.serverRevisionId) {
|
|
36854
|
-
this.trigger("unexpected-revision-id", { revisionId: message.serverRevisionId });
|
|
36855
|
-
return;
|
|
36856
|
-
}
|
|
36857
36887
|
const { clientId, commands } = message;
|
|
36858
36888
|
const revision = new Revision(message.nextRevisionId, clientId, commands);
|
|
36859
36889
|
if (revision.clientId !== this.clientId) {
|
|
@@ -36985,6 +37015,17 @@ class Session extends EventBus {
|
|
|
36985
37015
|
return false;
|
|
36986
37016
|
}
|
|
36987
37017
|
}
|
|
37018
|
+
isWrongServerRevisionId(message) {
|
|
37019
|
+
switch (message.type) {
|
|
37020
|
+
case "REMOTE_REVISION":
|
|
37021
|
+
case "REVISION_REDONE":
|
|
37022
|
+
case "REVISION_UNDONE":
|
|
37023
|
+
case "SNAPSHOT_CREATED":
|
|
37024
|
+
return message.serverRevisionId !== this.serverRevisionId;
|
|
37025
|
+
default:
|
|
37026
|
+
return false;
|
|
37027
|
+
}
|
|
37028
|
+
}
|
|
36988
37029
|
dropPendingHistoryMessages() {
|
|
36989
37030
|
this.waitingUndoRedoAck = false;
|
|
36990
37031
|
this.pendingMessages = this.pendingMessages.filter(({ type }) => type !== "REVISION_REDONE" && type !== "REVISION_UNDONE");
|
|
@@ -39615,7 +39656,6 @@ css /* scss */ `
|
|
|
39615
39656
|
color: dimgrey;
|
|
39616
39657
|
}
|
|
39617
39658
|
.o-sidePanelClose {
|
|
39618
|
-
font-size: 1.5rem;
|
|
39619
39659
|
padding: 5px 10px;
|
|
39620
39660
|
cursor: pointer;
|
|
39621
39661
|
&:hover {
|
|
@@ -44199,6 +44239,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
44199
44239
|
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
44240
|
|
|
44201
44241
|
|
|
44202
|
-
__info__.version = '16.1.
|
|
44203
|
-
__info__.date = '2023-
|
|
44204
|
-
__info__.hash = '
|
|
44242
|
+
__info__.version = '16.1.12';
|
|
44243
|
+
__info__.date = '2023-05-25T12:56:29.735Z';
|
|
44244
|
+
__info__.hash = 'b80dc51';
|
|
@@ -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);
|
|
@@ -20016,6 +20030,18 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
20016
20030
|
grid-template-columns: repeat(${ITEMS_PER_LINE}, 1fr);
|
|
20017
20031
|
grid-gap: ${ITEM_HORIZONTAL_MARGIN * 2}px;
|
|
20018
20032
|
}
|
|
20033
|
+
.o-color-picker-toggler {
|
|
20034
|
+
display: flex;
|
|
20035
|
+
.o-color-picker-toggler-sign {
|
|
20036
|
+
margin: auto auto;
|
|
20037
|
+
width: 55%;
|
|
20038
|
+
height: 55%;
|
|
20039
|
+
.o-icon {
|
|
20040
|
+
width: 100%;
|
|
20041
|
+
height: 100%;
|
|
20042
|
+
}
|
|
20043
|
+
}
|
|
20044
|
+
}
|
|
20019
20045
|
.o-color-picker-line-item {
|
|
20020
20046
|
width: ${ITEM_EDGE_LENGTH}px;
|
|
20021
20047
|
height: ${ITEM_EDGE_LENGTH}px;
|
|
@@ -32350,7 +32376,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
32350
32376
|
// magic "empty" value
|
|
32351
32377
|
// Returning {value: null} instead of undefined will ensure that we don't
|
|
32352
32378
|
// fall back on the default value of the argument provided to the formula's compute function
|
|
32353
|
-
return { value: null };
|
|
32379
|
+
return { value: null, format: cell === null || cell === void 0 ? void 0 : cell.format };
|
|
32354
32380
|
}
|
|
32355
32381
|
return getEvaluatedCell(cell);
|
|
32356
32382
|
}
|
|
@@ -35901,6 +35927,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35901
35927
|
*/
|
|
35902
35928
|
class SelectionInputPlugin extends UIPlugin {
|
|
35903
35929
|
constructor(config, initialRanges, inputHasSingleRange) {
|
|
35930
|
+
if (inputHasSingleRange && initialRanges.length > 1) {
|
|
35931
|
+
throw new Error("Input with a single range cannot be instantiated with several range references.");
|
|
35932
|
+
}
|
|
35904
35933
|
super(config);
|
|
35905
35934
|
this.inputHasSingleRange = inputHasSingleRange;
|
|
35906
35935
|
this.ranges = [];
|
|
@@ -35923,6 +35952,11 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
35923
35952
|
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35924
35953
|
}
|
|
35925
35954
|
break;
|
|
35955
|
+
case "CHANGE_RANGE":
|
|
35956
|
+
if (this.inputHasSingleRange && cmd.value.split(",").length > 1) {
|
|
35957
|
+
return 30 /* CommandResult.MaximumRangesReached */;
|
|
35958
|
+
}
|
|
35959
|
+
break;
|
|
35926
35960
|
}
|
|
35927
35961
|
return 0 /* CommandResult.Success */;
|
|
35928
35962
|
}
|
|
@@ -36747,13 +36781,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36747
36781
|
}
|
|
36748
36782
|
loadInitialMessages(messages) {
|
|
36749
36783
|
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
36784
|
for (const message of messages) {
|
|
36754
36785
|
this.onMessageReceived(message);
|
|
36755
36786
|
}
|
|
36756
|
-
this.off("unexpected-revision-id", this);
|
|
36757
36787
|
this.isReplayingInitialRevisions = false;
|
|
36758
36788
|
}
|
|
36759
36789
|
/**
|
|
@@ -36825,6 +36855,10 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36825
36855
|
onMessageReceived(message) {
|
|
36826
36856
|
if (this.isAlreadyProcessed(message))
|
|
36827
36857
|
return;
|
|
36858
|
+
if (this.isWrongServerRevisionId(message)) {
|
|
36859
|
+
this.trigger("unexpected-revision-id");
|
|
36860
|
+
return;
|
|
36861
|
+
}
|
|
36828
36862
|
switch (message.type) {
|
|
36829
36863
|
case "CLIENT_MOVED":
|
|
36830
36864
|
this.onClientMoved(message);
|
|
@@ -36851,10 +36885,6 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36851
36885
|
});
|
|
36852
36886
|
break;
|
|
36853
36887
|
case "REMOTE_REVISION":
|
|
36854
|
-
if (message.serverRevisionId !== this.serverRevisionId) {
|
|
36855
|
-
this.trigger("unexpected-revision-id", { revisionId: message.serverRevisionId });
|
|
36856
|
-
return;
|
|
36857
|
-
}
|
|
36858
36888
|
const { clientId, commands } = message;
|
|
36859
36889
|
const revision = new Revision(message.nextRevisionId, clientId, commands);
|
|
36860
36890
|
if (revision.clientId !== this.clientId) {
|
|
@@ -36986,6 +37016,17 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
36986
37016
|
return false;
|
|
36987
37017
|
}
|
|
36988
37018
|
}
|
|
37019
|
+
isWrongServerRevisionId(message) {
|
|
37020
|
+
switch (message.type) {
|
|
37021
|
+
case "REMOTE_REVISION":
|
|
37022
|
+
case "REVISION_REDONE":
|
|
37023
|
+
case "REVISION_UNDONE":
|
|
37024
|
+
case "SNAPSHOT_CREATED":
|
|
37025
|
+
return message.serverRevisionId !== this.serverRevisionId;
|
|
37026
|
+
default:
|
|
37027
|
+
return false;
|
|
37028
|
+
}
|
|
37029
|
+
}
|
|
36989
37030
|
dropPendingHistoryMessages() {
|
|
36990
37031
|
this.waitingUndoRedoAck = false;
|
|
36991
37032
|
this.pendingMessages = this.pendingMessages.filter(({ type }) => type !== "REVISION_REDONE" && type !== "REVISION_UNDONE");
|
|
@@ -39616,7 +39657,6 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
39616
39657
|
color: dimgrey;
|
|
39617
39658
|
}
|
|
39618
39659
|
.o-sidePanelClose {
|
|
39619
|
-
font-size: 1.5rem;
|
|
39620
39660
|
padding: 5px 10px;
|
|
39621
39661
|
cursor: pointer;
|
|
39622
39662
|
&:hover {
|
|
@@ -44230,9 +44270,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
44230
44270
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
44231
44271
|
|
|
44232
44272
|
|
|
44233
|
-
__info__.version = '16.1.
|
|
44234
|
-
__info__.date = '2023-
|
|
44235
|
-
__info__.hash = '
|
|
44273
|
+
__info__.version = '16.1.12';
|
|
44274
|
+
__info__.date = '2023-05-25T12:56:29.735Z';
|
|
44275
|
+
__info__.hash = 'b80dc51';
|
|
44236
44276
|
|
|
44237
44277
|
|
|
44238
44278
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|