@gridsheet/functions 3.0.0-rc.2
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/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +332 -0
- package/dist/information/index.d.ts +4 -0
- package/dist/information/index.d.ts.map +1 -0
- package/dist/information/isblank.d.ts +9 -0
- package/dist/information/isblank.d.ts.map +1 -0
- package/dist/information/isdate.d.ts +9 -0
- package/dist/information/isdate.d.ts.map +1 -0
- package/dist/information/isemail.d.ts +9 -0
- package/dist/information/isemail.d.ts.map +1 -0
- package/dist/information/iserr.d.ts +9 -0
- package/dist/information/iserr.d.ts.map +1 -0
- package/dist/information/iserror.d.ts +9 -0
- package/dist/information/iserror.d.ts.map +1 -0
- package/dist/information/isformula.d.ts +9 -0
- package/dist/information/isformula.d.ts.map +1 -0
- package/dist/information/islogical.d.ts +9 -0
- package/dist/information/islogical.d.ts.map +1 -0
- package/dist/information/isna.d.ts +9 -0
- package/dist/information/isna.d.ts.map +1 -0
- package/dist/information/isnontext.d.ts +9 -0
- package/dist/information/isnontext.d.ts.map +1 -0
- package/dist/information/isref.d.ts +9 -0
- package/dist/information/isref.d.ts.map +1 -0
- package/dist/information/istext.d.ts +9 -0
- package/dist/information/istext.d.ts.map +1 -0
- package/dist/information/n.d.ts +9 -0
- package/dist/information/n.d.ts.map +1 -0
- package/dist/information/na.d.ts +9 -0
- package/dist/information/na.d.ts.map +1 -0
- package/dist/information/sheets.d.ts +9 -0
- package/dist/information/sheets.d.ts.map +1 -0
- package/dist/logical/ifna.d.ts +10 -0
- package/dist/logical/ifna.d.ts.map +1 -0
- package/dist/logical/ifs.d.ts +11 -0
- package/dist/logical/ifs.d.ts.map +1 -0
- package/dist/logical/index.d.ts +4 -0
- package/dist/logical/index.d.ts.map +1 -0
- package/dist/logical/xor.d.ts +9 -0
- package/dist/logical/xor.d.ts.map +1 -0
- package/dist/lookup/column.d.ts +12 -0
- package/dist/lookup/column.d.ts.map +1 -0
- package/dist/lookup/columns.d.ts +9 -0
- package/dist/lookup/columns.d.ts.map +1 -0
- package/dist/lookup/hlookup.d.ts +10 -0
- package/dist/lookup/hlookup.d.ts.map +1 -0
- package/dist/lookup/index.d.ts +4 -0
- package/dist/lookup/index.d.ts.map +1 -0
- package/dist/lookup/index.js +377 -0
- package/dist/lookup/indexFn.d.ts +10 -0
- package/dist/lookup/indexFn.d.ts.map +1 -0
- package/dist/lookup/match.d.ts +10 -0
- package/dist/lookup/match.d.ts.map +1 -0
- package/dist/lookup/row.d.ts +12 -0
- package/dist/lookup/row.d.ts.map +1 -0
- package/dist/lookup/rows.d.ts +9 -0
- package/dist/lookup/rows.d.ts.map +1 -0
- package/dist/lookup/sheet.d.ts +9 -0
- package/dist/lookup/sheet.d.ts.map +1 -0
- package/dist/lookup/vlookup.d.ts +10 -0
- package/dist/lookup/vlookup.d.ts.map +1 -0
- package/dist/math/__matrix_base.d.ts +15 -0
- package/dist/math/__matrix_base.d.ts.map +1 -0
- package/dist/math/acos.d.ts +9 -0
- package/dist/math/acos.d.ts.map +1 -0
- package/dist/math/asin.d.ts +9 -0
- package/dist/math/asin.d.ts.map +1 -0
- package/dist/math/atan.d.ts +9 -0
- package/dist/math/atan.d.ts.map +1 -0
- package/dist/math/atan2.d.ts +9 -0
- package/dist/math/atan2.d.ts.map +1 -0
- package/dist/math/base.d.ts +10 -0
- package/dist/math/base.d.ts.map +1 -0
- package/dist/math/cos.d.ts +9 -0
- package/dist/math/cos.d.ts.map +1 -0
- package/dist/math/countif.d.ts +9 -0
- package/dist/math/countif.d.ts.map +1 -0
- package/dist/math/countifs.d.ts +10 -0
- package/dist/math/countifs.d.ts.map +1 -0
- package/dist/math/even.d.ts +9 -0
- package/dist/math/even.d.ts.map +1 -0
- package/dist/math/exp.d.ts +10 -0
- package/dist/math/exp.d.ts.map +1 -0
- package/dist/math/fact.d.ts +9 -0
- package/dist/math/fact.d.ts.map +1 -0
- package/dist/math/index.d.ts +4 -0
- package/dist/math/index.d.ts.map +1 -0
- package/dist/math/index.js +1019 -0
- package/dist/math/int.d.ts +9 -0
- package/dist/math/int.d.ts.map +1 -0
- package/dist/math/iseven.d.ts +9 -0
- package/dist/math/iseven.d.ts.map +1 -0
- package/dist/math/isodd.d.ts +9 -0
- package/dist/math/isodd.d.ts.map +1 -0
- package/dist/math/lcm.d.ts +10 -0
- package/dist/math/lcm.d.ts.map +1 -0
- package/dist/math/ln.d.ts +9 -0
- package/dist/math/ln.d.ts.map +1 -0
- package/dist/math/log.d.ts +9 -0
- package/dist/math/log.d.ts.map +1 -0
- package/dist/math/log10.d.ts +9 -0
- package/dist/math/log10.d.ts.map +1 -0
- package/dist/math/mdeterm.d.ts +11 -0
- package/dist/math/mdeterm.d.ts.map +1 -0
- package/dist/math/minverse.d.ts +12 -0
- package/dist/math/minverse.d.ts.map +1 -0
- package/dist/math/mmult.d.ts +11 -0
- package/dist/math/mmult.d.ts.map +1 -0
- package/dist/math/mod.d.ts +10 -0
- package/dist/math/mod.d.ts.map +1 -0
- package/dist/math/odd.d.ts +9 -0
- package/dist/math/odd.d.ts.map +1 -0
- package/dist/math/pi.d.ts +9 -0
- package/dist/math/pi.d.ts.map +1 -0
- package/dist/math/product.d.ts +10 -0
- package/dist/math/product.d.ts.map +1 -0
- package/dist/math/radians.d.ts +9 -0
- package/dist/math/radians.d.ts.map +1 -0
- package/dist/math/rand.d.ts +9 -0
- package/dist/math/rand.d.ts.map +1 -0
- package/dist/math/round.d.ts +9 -0
- package/dist/math/round.d.ts.map +1 -0
- package/dist/math/rounddown.d.ts +9 -0
- package/dist/math/rounddown.d.ts.map +1 -0
- package/dist/math/roundup.d.ts +9 -0
- package/dist/math/roundup.d.ts.map +1 -0
- package/dist/math/sequence.d.ts +11 -0
- package/dist/math/sequence.d.ts.map +1 -0
- package/dist/math/sign.d.ts +9 -0
- package/dist/math/sign.d.ts.map +1 -0
- package/dist/math/sin.d.ts +9 -0
- package/dist/math/sin.d.ts.map +1 -0
- package/dist/math/sqrt.d.ts +9 -0
- package/dist/math/sqrt.d.ts.map +1 -0
- package/dist/math/sumif.d.ts +9 -0
- package/dist/math/sumif.d.ts.map +1 -0
- package/dist/math/sumifs.d.ts +10 -0
- package/dist/math/sumifs.d.ts.map +1 -0
- package/dist/math/sumproduct.d.ts +10 -0
- package/dist/math/sumproduct.d.ts.map +1 -0
- package/dist/math/sumsq.d.ts +9 -0
- package/dist/math/sumsq.d.ts.map +1 -0
- package/dist/math/tan.d.ts +9 -0
- package/dist/math/tan.d.ts.map +1 -0
- package/dist/math/transpose.d.ts +11 -0
- package/dist/math/transpose.d.ts.map +1 -0
- package/dist/math/trunc.d.ts +9 -0
- package/dist/math/trunc.d.ts.map +1 -0
- package/dist/math/unaryPercent.d.ts +9 -0
- package/dist/math/unaryPercent.d.ts.map +1 -0
- package/dist/math/uplus.d.ts +9 -0
- package/dist/math/uplus.d.ts.map +1 -0
- package/dist/statistics/averageif.d.ts +9 -0
- package/dist/statistics/averageif.d.ts.map +1 -0
- package/dist/statistics/averageifs.d.ts +10 -0
- package/dist/statistics/averageifs.d.ts.map +1 -0
- package/dist/statistics/correl.d.ts +10 -0
- package/dist/statistics/correl.d.ts.map +1 -0
- package/dist/statistics/covariance_s.d.ts +10 -0
- package/dist/statistics/covariance_s.d.ts.map +1 -0
- package/dist/statistics/index.d.ts +4 -0
- package/dist/statistics/index.d.ts.map +1 -0
- package/dist/statistics/index.js +663 -0
- package/dist/statistics/median.d.ts +10 -0
- package/dist/statistics/median.d.ts.map +1 -0
- package/dist/statistics/mode_sngl.d.ts +10 -0
- package/dist/statistics/mode_sngl.d.ts.map +1 -0
- package/dist/statistics/percentile_inc.d.ts +10 -0
- package/dist/statistics/percentile_inc.d.ts.map +1 -0
- package/dist/statistics/quartile_inc.d.ts +10 -0
- package/dist/statistics/quartile_inc.d.ts.map +1 -0
- package/dist/statistics/rank_eq.d.ts +10 -0
- package/dist/statistics/rank_eq.d.ts.map +1 -0
- package/dist/statistics/rsq.d.ts +10 -0
- package/dist/statistics/rsq.d.ts.map +1 -0
- package/dist/statistics/stdev_p.d.ts +10 -0
- package/dist/statistics/stdev_p.d.ts.map +1 -0
- package/dist/statistics/stdev_s.d.ts +10 -0
- package/dist/statistics/stdev_s.d.ts.map +1 -0
- package/dist/statistics/t_test.d.ts +10 -0
- package/dist/statistics/t_test.d.ts.map +1 -0
- package/dist/statistics/var_p.d.ts +10 -0
- package/dist/statistics/var_p.d.ts.map +1 -0
- package/dist/statistics/var_s.d.ts +10 -0
- package/dist/statistics/var_s.d.ts.map +1 -0
- package/dist/text/char.d.ts +9 -0
- package/dist/text/char.d.ts.map +1 -0
- package/dist/text/clean.d.ts +9 -0
- package/dist/text/clean.d.ts.map +1 -0
- package/dist/text/concatenate.d.ts +9 -0
- package/dist/text/concatenate.d.ts.map +1 -0
- package/dist/text/exact.d.ts +9 -0
- package/dist/text/exact.d.ts.map +1 -0
- package/dist/text/index.d.ts +4 -0
- package/dist/text/index.d.ts.map +1 -0
- package/dist/text/index.js +261 -0
- package/dist/text/join.d.ts +10 -0
- package/dist/text/join.d.ts.map +1 -0
- package/dist/text/lenb.d.ts +9 -0
- package/dist/text/lenb.d.ts.map +1 -0
- package/dist/text/lower.d.ts +9 -0
- package/dist/text/lower.d.ts.map +1 -0
- package/dist/text/proper.d.ts +9 -0
- package/dist/text/proper.d.ts.map +1 -0
- package/dist/text/replace.d.ts +10 -0
- package/dist/text/replace.d.ts.map +1 -0
- package/dist/text/rept.d.ts +10 -0
- package/dist/text/rept.d.ts.map +1 -0
- package/dist/text/trim.d.ts +9 -0
- package/dist/text/trim.d.ts.map +1 -0
- package/dist/text/unichar.d.ts +9 -0
- package/dist/text/unichar.d.ts.map +1 -0
- package/dist/text/unicode.d.ts +9 -0
- package/dist/text/unicode.d.ts.map +1 -0
- package/dist/text/upper.d.ts +9 -0
- package/dist/text/upper.d.ts.map +1 -0
- package/dist/time/__utils.d.ts +6 -0
- package/dist/time/__utils.d.ts.map +1 -0
- package/dist/time/date.d.ts +9 -0
- package/dist/time/date.d.ts.map +1 -0
- package/dist/time/day.d.ts +9 -0
- package/dist/time/day.d.ts.map +1 -0
- package/dist/time/days.d.ts +9 -0
- package/dist/time/days.d.ts.map +1 -0
- package/dist/time/hour.d.ts +9 -0
- package/dist/time/hour.d.ts.map +1 -0
- package/dist/time/index.d.ts +4 -0
- package/dist/time/index.d.ts.map +1 -0
- package/dist/time/index.js +212 -0
- package/dist/time/minute.d.ts +9 -0
- package/dist/time/minute.d.ts.map +1 -0
- package/dist/time/month.d.ts +9 -0
- package/dist/time/month.d.ts.map +1 -0
- package/dist/time/second.d.ts +9 -0
- package/dist/time/second.d.ts.map +1 -0
- package/dist/time/time.d.ts +9 -0
- package/dist/time/time.d.ts.map +1 -0
- package/dist/time/today.d.ts +9 -0
- package/dist/time/today.d.ts.map +1 -0
- package/dist/time/workday.d.ts +9 -0
- package/dist/time/workday.d.ts.map +1 -0
- package/dist/time/year.d.ts +9 -0
- package/dist/time/year.d.ts.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +86 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, Table, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class HlookupFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected validate(args: any[]): any[];
|
|
8
|
+
protected main(key: any, range: Table, index: number, isSorted: boolean): any;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=hlookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hlookup.d.ts","sourceRoot":"","sources":["../../src/lookup/hlookup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,KAAK,EAAuD,MAAM,uBAAuB,CAAC;AACnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,SAAqC;IAC5C,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAoBhC;IACF,QAAQ,EAAE,gBAAgB,CAAY;IAEtC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAetC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO;CA2BxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lookup/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAW7D,eAAO,MAAM,eAAe,EAAE,eAW7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { BaseFunction as m, FormulaError as o, Table as l, stripTable as b, ensureNumber as w, ensureBoolean as y, solveTable as g } from "@gridsheet/react-core";
|
|
2
|
+
const A = "Searches vertically for the specified key in the first column of the range and returns the value of the specified cell in the same row.";
|
|
3
|
+
class T extends m {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments), this.example = "VLOOKUP(10003, A2:B26, 2, FALSE)", this.description = A, this.defs = [
|
|
6
|
+
{ name: "key", description: "Search key.", acceptedTypes: ["any"] },
|
|
7
|
+
{
|
|
8
|
+
name: "range",
|
|
9
|
+
description: "A range for search",
|
|
10
|
+
takesMatrix: !0,
|
|
11
|
+
acceptedTypes: ["matrix"]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "index",
|
|
15
|
+
description: "The index of the column in the range.",
|
|
16
|
+
acceptedTypes: ["number"]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "is_sorted",
|
|
20
|
+
description: "FALSE: Exact match. This is recommended. TRUE: Approximate match. Before you use an approximate match, sort your search key in ascending order. Otherwise, you may likely get a wrong return value.",
|
|
21
|
+
acceptedTypes: ["boolean"],
|
|
22
|
+
optional: !0
|
|
23
|
+
}
|
|
24
|
+
], this.category = "lookup";
|
|
25
|
+
}
|
|
26
|
+
validate(e) {
|
|
27
|
+
if (e.length !== 3 && e.length !== 4)
|
|
28
|
+
throw new o("#N/A", "Number of arguments for VLOOKUP is incorrect.");
|
|
29
|
+
if (e[0] instanceof l && (e[0] = b({ value: e[0] })), !(e[1] instanceof l))
|
|
30
|
+
throw new o("#REF!", "2nd argument must be range");
|
|
31
|
+
return e[2] = w(e[2]), e[3] = y(e[3], { alternative: !0 }), e;
|
|
32
|
+
}
|
|
33
|
+
main(e, t, i, n) {
|
|
34
|
+
var c, u, p, s;
|
|
35
|
+
const a = g({ table: t });
|
|
36
|
+
if (n) {
|
|
37
|
+
let r = -1;
|
|
38
|
+
for (let h = 0; h <= t.getNumRows(); h++) {
|
|
39
|
+
const d = (c = a[h]) == null ? void 0 : c[0];
|
|
40
|
+
if (d != null)
|
|
41
|
+
if (d <= e)
|
|
42
|
+
r = h;
|
|
43
|
+
else
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
if (r !== -1)
|
|
47
|
+
return (u = a[r]) == null ? void 0 : u[i - 1];
|
|
48
|
+
} else
|
|
49
|
+
for (let r = 0; r <= t.getNumRows(); r++)
|
|
50
|
+
if (((p = a[r]) == null ? void 0 : p[0]) === e)
|
|
51
|
+
return (s = a[r]) == null ? void 0 : s[i - 1];
|
|
52
|
+
throw new o("#N/A", `No values found for '${e}'.`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const N = "Searches horizontally for the specified key in the first row of the range and returns the value of the specified cell in the same column.";
|
|
56
|
+
class k extends m {
|
|
57
|
+
constructor() {
|
|
58
|
+
super(...arguments), this.example = "HLOOKUP(10003, A2:Z6, 2, FALSE)", this.description = N, this.defs = [
|
|
59
|
+
{ name: "key", description: "Search key." },
|
|
60
|
+
{
|
|
61
|
+
name: "range",
|
|
62
|
+
description: "A range for search",
|
|
63
|
+
takesMatrix: !0,
|
|
64
|
+
acceptedTypes: ["matrix"]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "index",
|
|
68
|
+
description: "The index of the row in the range.",
|
|
69
|
+
acceptedTypes: ["number"]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "is_sorted",
|
|
73
|
+
description: "FALSE: Exact match. This is recommended. TRUE: Approximate match. Before you use an approximate match, sort your search key in ascending order. Otherwise, you may likely get a wrong return value.",
|
|
74
|
+
optional: !0,
|
|
75
|
+
acceptedTypes: ["boolean"]
|
|
76
|
+
}
|
|
77
|
+
], this.category = "lookup";
|
|
78
|
+
}
|
|
79
|
+
validate(e) {
|
|
80
|
+
if (e.length !== 3 && e.length !== 4)
|
|
81
|
+
throw new o("#N/A", "Number of arguments for HLOOKUP is incorrect.");
|
|
82
|
+
if (e[0] instanceof l && (e[0] = b({ value: e[0] })), !(e[1] instanceof l))
|
|
83
|
+
throw new o("#REF!", "2nd argument must be range");
|
|
84
|
+
return e[2] = w(e[2]), e[3] = y(e[3], { alternative: !0 }), e;
|
|
85
|
+
}
|
|
86
|
+
main(e, t, i, n) {
|
|
87
|
+
var c, u, p, s;
|
|
88
|
+
const a = g({ table: t });
|
|
89
|
+
if (n) {
|
|
90
|
+
let r = -1;
|
|
91
|
+
for (let h = 0; h <= t.getNumCols(); h++) {
|
|
92
|
+
const d = (c = a[0]) == null ? void 0 : c[h];
|
|
93
|
+
if (d != null)
|
|
94
|
+
if (d <= e)
|
|
95
|
+
r = h;
|
|
96
|
+
else
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
if (r !== -1)
|
|
100
|
+
return (u = a[i - 1]) == null ? void 0 : u[r];
|
|
101
|
+
} else
|
|
102
|
+
for (let r = 0; r <= t.getNumCols(); r++)
|
|
103
|
+
if (((p = a[0]) == null ? void 0 : p[r]) === e)
|
|
104
|
+
return (s = a[i - 1]) == null ? void 0 : s[r];
|
|
105
|
+
throw new o("#N/A", `No values found for '${e}'.`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const E = `Returns a trimmed table based on row and column indices.
|
|
109
|
+
If row or column is 0 or omitted, returns all rows or columns.`;
|
|
110
|
+
class M extends m {
|
|
111
|
+
constructor() {
|
|
112
|
+
super(...arguments), this.example = "INDEX(A1:C10, 2, 3)", this.description = E, this.defs = [
|
|
113
|
+
{ name: "range", description: "A range of cells.", takesMatrix: !0, acceptedTypes: ["matrix"] },
|
|
114
|
+
{
|
|
115
|
+
name: "row_num",
|
|
116
|
+
description: "The row number in the range (0 or omitted for all rows).",
|
|
117
|
+
optional: !0,
|
|
118
|
+
acceptedTypes: ["number"]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: "column_num",
|
|
122
|
+
description: "The column number in the range (0 or omitted for all columns).",
|
|
123
|
+
optional: !0,
|
|
124
|
+
acceptedTypes: ["number"]
|
|
125
|
+
}
|
|
126
|
+
], this.category = "lookup";
|
|
127
|
+
}
|
|
128
|
+
validate(e) {
|
|
129
|
+
if (e.length < 1 || e.length > 3)
|
|
130
|
+
throw new o("#N/A", "Number of arguments for INDEX is incorrect.");
|
|
131
|
+
if (!(e[0] instanceof l))
|
|
132
|
+
throw new o("#VALUE!", "First argument must be a range.");
|
|
133
|
+
if (e.length >= 2 && (e[1] = w(e[1]), e[1] < 0))
|
|
134
|
+
throw new o("#VALUE!", "Row number must be greater than or equal to 0.");
|
|
135
|
+
if (e.length === 3 && (e[2] = w(e[2]), e[2] < 0))
|
|
136
|
+
throw new o("#VALUE!", "Column number must be greater than or equal to 0.");
|
|
137
|
+
return e;
|
|
138
|
+
}
|
|
139
|
+
main(e, t, i) {
|
|
140
|
+
const n = e.getArea();
|
|
141
|
+
if (t) {
|
|
142
|
+
if (t < 0 || t > e.getNumRows(1))
|
|
143
|
+
throw new o("#NUM!", `Row number ${t} is out of range.`);
|
|
144
|
+
n.top = n.bottom = n.top + t - 1;
|
|
145
|
+
}
|
|
146
|
+
if (i) {
|
|
147
|
+
if (i < 0 || i > e.getNumCols(1))
|
|
148
|
+
throw new o("#NUM!", `Column number ${i} is out of range.`);
|
|
149
|
+
n.left = n.right = n.left + i - 1;
|
|
150
|
+
}
|
|
151
|
+
return e.trim(n);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
const R = `Searches for a value in a table and returns its position.
|
|
155
|
+
Returns the position of the matched value (1-based index).`;
|
|
156
|
+
class S extends m {
|
|
157
|
+
constructor() {
|
|
158
|
+
super(...arguments), this.example = 'MATCH("apple", A1:A10, 0)', this.description = R, this.defs = [
|
|
159
|
+
{ name: "search_key", description: "The value to search for.", acceptedTypes: ["any"] },
|
|
160
|
+
{ name: "range", description: "The range to search in.", takesMatrix: !0, acceptedTypes: ["matrix"] },
|
|
161
|
+
{
|
|
162
|
+
name: "search_type",
|
|
163
|
+
description: "0 for exact match, 1 for less than or equal, -1 for greater than or equal.",
|
|
164
|
+
acceptedTypes: ["number"],
|
|
165
|
+
optional: !0
|
|
166
|
+
}
|
|
167
|
+
], this.category = "lookup";
|
|
168
|
+
}
|
|
169
|
+
validate(e) {
|
|
170
|
+
if (e.length < 2 || e.length > 3)
|
|
171
|
+
throw new o("#N/A", "Number of arguments for MATCH is incorrect.");
|
|
172
|
+
if (e[0] instanceof l && (e[0] = b({ value: e[0] })), !(e[1] instanceof l))
|
|
173
|
+
throw new o("#VALUE!", "Second argument must be a range.");
|
|
174
|
+
if (e.length === 3) {
|
|
175
|
+
if (e[2] = w(e[2]), ![-1, 0, 1].includes(e[2]))
|
|
176
|
+
throw new o("#VALUE!", "Match type must be -1, 0, or 1.");
|
|
177
|
+
} else
|
|
178
|
+
e[2] = 1;
|
|
179
|
+
return e;
|
|
180
|
+
}
|
|
181
|
+
main(e, t, i = 1) {
|
|
182
|
+
var p;
|
|
183
|
+
const n = g({ table: t }), a = n.length, c = ((p = n[0]) == null ? void 0 : p.length) || 0;
|
|
184
|
+
if (!(a === 1 && c >= 1 || c === 1 && a >= 1))
|
|
185
|
+
throw new o("#N/A", "Range must be a single row or single column.");
|
|
186
|
+
const u = n.reduce((s, r) => s.concat(r), []);
|
|
187
|
+
if (u.length === 0)
|
|
188
|
+
throw new o("#N/A", "range is empty.");
|
|
189
|
+
switch (i) {
|
|
190
|
+
case 0:
|
|
191
|
+
for (let s = 0; s < u.length; s++)
|
|
192
|
+
if (u[s] === e)
|
|
193
|
+
return s + 1;
|
|
194
|
+
throw new o("#N/A", "Value not found in range.");
|
|
195
|
+
case 1: {
|
|
196
|
+
let s = -1;
|
|
197
|
+
for (let r = 0; r < u.length && u[r] <= e; r++)
|
|
198
|
+
s = r;
|
|
199
|
+
if (s === -1)
|
|
200
|
+
throw new o("#N/A", "Value not found in range.");
|
|
201
|
+
return s + 1;
|
|
202
|
+
}
|
|
203
|
+
case -1: {
|
|
204
|
+
let s = -1;
|
|
205
|
+
for (let r = 0; r < u.length && u[r] >= e; r++)
|
|
206
|
+
s = r;
|
|
207
|
+
if (s === -1)
|
|
208
|
+
throw new o("#N/A", "Value not found in range.");
|
|
209
|
+
return s + 1;
|
|
210
|
+
}
|
|
211
|
+
default:
|
|
212
|
+
throw new o("#VALUE!", "Invalid match type.");
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const F = "Returns the row number of a specified cell.";
|
|
217
|
+
class L extends m {
|
|
218
|
+
constructor() {
|
|
219
|
+
super(...arguments), this.example = "ROW(A9)", this.description = F, this.defs = [
|
|
220
|
+
{
|
|
221
|
+
name: "cell_reference",
|
|
222
|
+
description: "The cell whose row number will be returned.",
|
|
223
|
+
acceptedTypes: ["reference"],
|
|
224
|
+
optional: !0
|
|
225
|
+
}
|
|
226
|
+
], this.category = "lookup";
|
|
227
|
+
}
|
|
228
|
+
toMatrix(e) {
|
|
229
|
+
if (e instanceof l) {
|
|
230
|
+
const t = e.getArea(), i = [];
|
|
231
|
+
for (let n = t.top; n <= t.bottom; n++) {
|
|
232
|
+
const a = [];
|
|
233
|
+
for (let c = t.left; c <= t.right; c++)
|
|
234
|
+
a.push(e.trim({ top: n, left: c, bottom: n, right: c }));
|
|
235
|
+
i.push(a);
|
|
236
|
+
}
|
|
237
|
+
return i;
|
|
238
|
+
}
|
|
239
|
+
return super.toMatrix(e);
|
|
240
|
+
}
|
|
241
|
+
toScalar(e) {
|
|
242
|
+
if (e instanceof l) {
|
|
243
|
+
const t = e.getArea();
|
|
244
|
+
return e.trim({ ...t, bottom: t.top });
|
|
245
|
+
}
|
|
246
|
+
return super.toScalar(e);
|
|
247
|
+
}
|
|
248
|
+
validate(e) {
|
|
249
|
+
if (e.length === 0) {
|
|
250
|
+
const t = this.table.getPointById(this.at);
|
|
251
|
+
return [(t == null ? void 0 : t.y) ?? 1];
|
|
252
|
+
} else {
|
|
253
|
+
if (e.length === 1)
|
|
254
|
+
return [e[0].top];
|
|
255
|
+
throw new o("#N/A", "Number of arguments for ROW is incorrect.");
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
main(e) {
|
|
259
|
+
return e;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
const U = "Returns the column number of a specified cell.";
|
|
263
|
+
class x extends m {
|
|
264
|
+
constructor() {
|
|
265
|
+
super(...arguments), this.example = "COLUMN(A9)", this.description = U, this.defs = [
|
|
266
|
+
{
|
|
267
|
+
name: "cell_reference",
|
|
268
|
+
description: "The cell whose column number will be returned.",
|
|
269
|
+
optional: !0,
|
|
270
|
+
acceptedTypes: ["reference"]
|
|
271
|
+
}
|
|
272
|
+
], this.category = "lookup";
|
|
273
|
+
}
|
|
274
|
+
toMatrix(e) {
|
|
275
|
+
if (e instanceof l) {
|
|
276
|
+
const t = e.getArea(), i = [];
|
|
277
|
+
for (let n = t.top; n <= t.bottom; n++) {
|
|
278
|
+
const a = [];
|
|
279
|
+
for (let c = t.left; c <= t.right; c++)
|
|
280
|
+
a.push(e.trim({ top: n, left: c, bottom: n, right: c }));
|
|
281
|
+
i.push(a);
|
|
282
|
+
}
|
|
283
|
+
return i;
|
|
284
|
+
}
|
|
285
|
+
return super.toMatrix(e);
|
|
286
|
+
}
|
|
287
|
+
toScalar(e) {
|
|
288
|
+
if (e instanceof l) {
|
|
289
|
+
const t = e.getArea();
|
|
290
|
+
return e.trim({ ...t, right: t.left });
|
|
291
|
+
}
|
|
292
|
+
return super.toScalar(e);
|
|
293
|
+
}
|
|
294
|
+
validate(e) {
|
|
295
|
+
if (e.length === 0) {
|
|
296
|
+
const t = this.table.getPointById(this.at);
|
|
297
|
+
return [(t == null ? void 0 : t.x) ?? 1];
|
|
298
|
+
} else {
|
|
299
|
+
if (e.length === 1)
|
|
300
|
+
return [e[0].left];
|
|
301
|
+
throw new o("#N/A", "Number of arguments for COLUMN is incorrect.");
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
main(e) {
|
|
305
|
+
return e;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
const v = "Returns the sheet number of the specified sheet or reference.";
|
|
309
|
+
class O extends m {
|
|
310
|
+
constructor() {
|
|
311
|
+
super(...arguments), this.example = "SHEET(Sheet2!A1)", this.description = v, this.defs = [
|
|
312
|
+
{
|
|
313
|
+
name: "value",
|
|
314
|
+
description: "The reference or sheet whose sheet number will be returned. If omitted, returns the sheet number of the current sheet.",
|
|
315
|
+
optional: !0,
|
|
316
|
+
takesMatrix: !0,
|
|
317
|
+
acceptedTypes: ["reference"]
|
|
318
|
+
}
|
|
319
|
+
], this.category = "lookup";
|
|
320
|
+
}
|
|
321
|
+
main(e) {
|
|
322
|
+
if (e == null)
|
|
323
|
+
return this.table.sheetId;
|
|
324
|
+
if (e instanceof l)
|
|
325
|
+
return e.sheetId;
|
|
326
|
+
throw new o("#VALUE!", "Invalid argument for SHEET.");
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const C = "Returns the number of columns in a specified array or range.";
|
|
330
|
+
class V extends m {
|
|
331
|
+
constructor() {
|
|
332
|
+
super(...arguments), this.example = "COLUMNS(A1:D5)", this.description = C, this.defs = [
|
|
333
|
+
{
|
|
334
|
+
name: "range",
|
|
335
|
+
description: "The array or range whose number of columns will be returned.",
|
|
336
|
+
takesMatrix: !0,
|
|
337
|
+
acceptedTypes: ["matrix"]
|
|
338
|
+
}
|
|
339
|
+
], this.category = "lookup";
|
|
340
|
+
}
|
|
341
|
+
main(e) {
|
|
342
|
+
var i;
|
|
343
|
+
return ((i = this.toMatrix(e)[0]) == null ? void 0 : i.length) || 0;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
const $ = "Returns the number of rows in a specified array or range.";
|
|
347
|
+
class I extends m {
|
|
348
|
+
constructor() {
|
|
349
|
+
super(...arguments), this.example = "ROWS(A1:D5)", this.description = $, this.defs = [
|
|
350
|
+
{
|
|
351
|
+
name: "range",
|
|
352
|
+
description: "The array or range whose number of rows will be returned.",
|
|
353
|
+
takesMatrix: !0,
|
|
354
|
+
acceptedTypes: ["matrix", "reference"]
|
|
355
|
+
}
|
|
356
|
+
], this.category = "lookup";
|
|
357
|
+
}
|
|
358
|
+
main(e) {
|
|
359
|
+
return this.toMatrix(e).length;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
const B = {
|
|
363
|
+
vlookup: T,
|
|
364
|
+
hlookup: k,
|
|
365
|
+
index: M,
|
|
366
|
+
match: S,
|
|
367
|
+
row: L,
|
|
368
|
+
col: x,
|
|
369
|
+
column: x,
|
|
370
|
+
sheet: O,
|
|
371
|
+
columns: V,
|
|
372
|
+
rows: I
|
|
373
|
+
};
|
|
374
|
+
export {
|
|
375
|
+
B as default,
|
|
376
|
+
B as lookupFunctions
|
|
377
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, Table, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class IndexFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected validate(args: any[]): any[];
|
|
8
|
+
protected main(table: Table, y?: number, x?: number): Table;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=indexFn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexFn.d.ts","sourceRoot":"","sources":["../../src/lookup/indexFn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAK9D,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,SAAyB;IAChC,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAchC;IACF,QAAQ,EAAE,gBAAgB,CAAY;IAEtC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAyBtC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM;CAgBpD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, Table, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class MatchFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected validate(args: any[]): any[];
|
|
8
|
+
protected main(searchKey: any, range: Table, searchType?: number): number;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../src/lookup/match.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,KAAK,EAAwC,MAAM,uBAAuB,CAAC;AACpF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAK9D,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,SAA+B;IACtC,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAShC;IACF,QAAQ,EAAE,gBAAgB,CAAY;IAEtC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAwBtC,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAE,MAAU;CA2DpE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class RowFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected toMatrix(value: any): any[][];
|
|
8
|
+
protected toScalar(value: any): any;
|
|
9
|
+
protected validate(args: any[]): any[];
|
|
10
|
+
protected main(top: number): number;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../src/lookup/row.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAa;IACpB,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAOhC;IACF,QAAQ,EAAE,gBAAgB,CAAY;IAEtC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,EAAE,EAAE;IAgBvC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG;IAQnC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAYtC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM;CAG3B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class RowsFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected main(value: any): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../../src/lookup/rows.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,SAAiB;IACxB,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAOhC;IACF,QAAQ,EAAE,gBAAgB,CAAY;IAEtC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG;CAI1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, Table, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class SheetFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected main(ref?: Table | any): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/lookup/sheet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,SAAsB;IAC7B,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAShC;IACF,QAAQ,EAAE,gBAAgB,CAAY;IAEtC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG;CAWjC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, Table, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class VlookupFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected validate(args: any[]): any[];
|
|
8
|
+
protected main(key: any, range: Table, index: number, isSorted: boolean): any;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=vlookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vlookup.d.ts","sourceRoot":"","sources":["../../src/lookup/vlookup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,KAAK,EAAuD,MAAM,uBAAuB,CAAC;AACnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,SAAsC;IAC7C,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAoBhC;IACF,QAAQ,EAAE,gBAAgB,CAAY;IAEtC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAetC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO;CA2BxE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseFunction, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
/**
|
|
3
|
+
* Common base class for matrix functions (MMULT, TRANSPOSE, MINVERSE, MDETERM).
|
|
4
|
+
*
|
|
5
|
+
* Provides:
|
|
6
|
+
* - `extractNumberMatrix()` to convert a Table/Spilling/2D-array arg into number[][]
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class MatrixFunction extends BaseFunction {
|
|
9
|
+
category: FunctionCategory;
|
|
10
|
+
/** Convert a matrix argument to a 2D number array using eachMatrix. */
|
|
11
|
+
protected extractNumberMatrix(value: any, argName: string): number[][];
|
|
12
|
+
/** Require the matrix to be square. Throws if not. */
|
|
13
|
+
protected requireSquare(matrix: number[][], funcName: string): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=__matrix_base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__matrix_base.d.ts","sourceRoot":"","sources":["../../src/math/__matrix_base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;GAKG;AACH,8BAAsB,cAAe,SAAQ,YAAY;IACvD,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,uEAAuE;IACvE,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE;IAkBtE,sDAAsD;IACtD,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAMpE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class AcosFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected main(value: number): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=acos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acos.d.ts","sourceRoot":"","sources":["../../src/math/acos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,SAAa;IACpB,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAMhC;IACF,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;CAM7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class AsinFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected main(value: number): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=asin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asin.d.ts","sourceRoot":"","sources":["../../src/math/asin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,SAAa;IACpB,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAMhC;IACF,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;CAM7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class AtanFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected main(value: number): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=atan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atan.d.ts","sourceRoot":"","sources":["../../src/math/atan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,SAAa;IACpB,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAMhC;IACF,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;CAG7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class Atan2Function extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected main(x: number, y: number): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=atan2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atan2.d.ts","sourceRoot":"","sources":["../../src/math/atan2.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,SAAgB;IACvB,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAWhC;IACF,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;CAGpC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class BaseConvFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected validate(args: any[]): any[];
|
|
8
|
+
protected main(value: number, base: number, minLength?: number): string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/math/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,SAAmB;IAC1B,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAShC;IACF,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAqBtC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;CAO/D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class CosFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected main(angle: number): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=cos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cos.d.ts","sourceRoot":"","sources":["../../src/math/cos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAe;IACtB,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAMhC;IACF,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;CAG7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, Table, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class CountifFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected main(table: Table, condition: any): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=countif.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countif.d.ts","sourceRoot":"","sources":["../../src/math/countif.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,KAAK,EAAiD,MAAM,uBAAuB,CAAC;AAC7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,SAA2B;IAClC,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAGhC;IACF,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG;CAc5C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class CountifsFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected validate(args: any[]): any[];
|
|
8
|
+
protected main(mask: boolean[][]): number;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=countifs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countifs.d.ts","sourceRoot":"","sources":["../../src/math/countifs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAgB,MAAM,uBAAuB,CAAC;AAEpG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,SAA2C;IAClD,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAYhC;IACF,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IA6BtC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;CAWjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, FunctionCategory } from '@gridsheet/react-core';
|
|
2
|
+
export declare class EvenFunction extends BaseFunction {
|
|
3
|
+
example: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defs: FunctionArgumentDefinition[];
|
|
6
|
+
category: FunctionCategory;
|
|
7
|
+
protected main(value: number): number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=even.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"even.d.ts","sourceRoot":"","sources":["../../src/math/even.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,SAAe;IACtB,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAEhC;IACF,QAAQ,EAAE,gBAAgB,CAAU;IAEpC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;CAW7B"}
|