@fileverse-dev/formulajs 4.4.20-mod-3 → 4.4.20-mod-5
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/lib/browser/formula.js +9 -20
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +3 -14
- package/lib/esm/index.mjs +3 -14
- package/package.json +1 -1
- package/types/cjs/index.d.cts +1 -1
- package/types/esm/index.d.mts +1 -1
package/lib/browser/formula.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @fileverse-dev/formulajs v4.4.20-mod-
|
|
1
|
+
/* @fileverse-dev/formulajs v4.4.20-mod-5 */
|
|
2
2
|
var _excluded = [ "confirmations", "dataDecoded" ];
|
|
3
3
|
|
|
4
4
|
function _objectWithoutProperties(e, t) {
|
|
@@ -4962,7 +4962,8 @@ function _typeof(o) {
|
|
|
4962
4962
|
}
|
|
4963
4963
|
return result;
|
|
4964
4964
|
}
|
|
4965
|
-
function XLOOKUP(search_key, lookup_range, result_range, missing_value,
|
|
4965
|
+
function XLOOKUP(search_key, lookup_range, result_range, missing_value, isColV, match_mode, search_mode) {
|
|
4966
|
+
var isCol = isColV === "true" ? true : false;
|
|
4966
4967
|
console.log("XLOOKUP parameters:", {
|
|
4967
4968
|
search_key: search_key,
|
|
4968
4969
|
lookup_range: lookup_range,
|
|
@@ -5063,7 +5064,6 @@ function _typeof(o) {
|
|
|
5063
5064
|
isCol: isCol
|
|
5064
5065
|
});
|
|
5065
5066
|
var foundIndex = -1;
|
|
5066
|
-
var isSingleResultRow = result_array.length === 1;
|
|
5067
5067
|
switch (match_mode) {
|
|
5068
5068
|
case 0:
|
|
5069
5069
|
foundIndex = findExactMatch(search_key, lookup_array, search_mode);
|
|
@@ -5084,24 +5084,13 @@ function _typeof(o) {
|
|
|
5084
5084
|
if (foundIndex === -1) {
|
|
5085
5085
|
return missing_value;
|
|
5086
5086
|
}
|
|
5087
|
-
if (
|
|
5088
|
-
var
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
}));
|
|
5093
|
-
} else {
|
|
5094
|
-
return resultRow;
|
|
5095
|
-
}
|
|
5087
|
+
if (isCol) {
|
|
5088
|
+
var columnValues = result_array.map((function(row) {
|
|
5089
|
+
return row[foundIndex];
|
|
5090
|
+
}));
|
|
5091
|
+
return columnValues;
|
|
5096
5092
|
} else {
|
|
5097
|
-
|
|
5098
|
-
var columnValues = result_array.map((function(row) {
|
|
5099
|
-
return row[foundIndex];
|
|
5100
|
-
}));
|
|
5101
|
-
return columnValues;
|
|
5102
|
-
} else {
|
|
5103
|
-
return result_array[foundIndex];
|
|
5104
|
-
}
|
|
5093
|
+
return result_array[foundIndex];
|
|
5105
5094
|
}
|
|
5106
5095
|
}
|
|
5107
5096
|
function findExactMatch(search_key, lookup_array, search_mode) {
|