@gridsheet/functions 3.0.0-rc.2 → 3.0.0-rc.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/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +102 -112
- package/dist/index.js.map +1 -0
- package/dist/information/isblank.spec.d.ts +2 -0
- package/dist/information/isblank.spec.d.ts.map +1 -0
- package/dist/information/isdate.spec.d.ts +2 -0
- package/dist/information/isdate.spec.d.ts.map +1 -0
- package/dist/information/isemail.spec.d.ts +2 -0
- package/dist/information/isemail.spec.d.ts.map +1 -0
- package/dist/information/iserr.spec.d.ts +2 -0
- package/dist/information/iserr.spec.d.ts.map +1 -0
- package/dist/information/iserror.spec.d.ts +2 -0
- package/dist/information/iserror.spec.d.ts.map +1 -0
- package/dist/information/isformula.d.ts +2 -2
- package/dist/information/isformula.spec.d.ts +2 -0
- package/dist/information/isformula.spec.d.ts.map +1 -0
- package/dist/information/islogical.spec.d.ts +2 -0
- package/dist/information/islogical.spec.d.ts.map +1 -0
- package/dist/information/isna.spec.d.ts +2 -0
- package/dist/information/isna.spec.d.ts.map +1 -0
- package/dist/information/isnontext.spec.d.ts +2 -0
- package/dist/information/isnontext.spec.d.ts.map +1 -0
- package/dist/information/isref.d.ts +2 -2
- package/dist/information/isref.spec.d.ts +2 -0
- package/dist/information/isref.spec.d.ts.map +1 -0
- package/dist/information/istext.spec.d.ts +2 -0
- package/dist/information/istext.spec.d.ts.map +1 -0
- package/dist/information/n.spec.d.ts +2 -0
- package/dist/information/n.spec.d.ts.map +1 -0
- package/dist/information/na.spec.d.ts +2 -0
- package/dist/information/na.spec.d.ts.map +1 -0
- package/dist/information/sheets.spec.d.ts +2 -0
- package/dist/information/sheets.spec.d.ts.map +1 -0
- package/dist/logical/ifs.d.ts +3 -4
- package/dist/logical/ifs.d.ts.map +1 -1
- package/dist/lookup/column.spec.d.ts +2 -0
- package/dist/lookup/column.spec.d.ts.map +1 -0
- package/dist/lookup/columns.spec.d.ts +2 -0
- package/dist/lookup/columns.spec.d.ts.map +1 -0
- package/dist/lookup/hlookup.d.ts +2 -3
- package/dist/lookup/hlookup.d.ts.map +1 -1
- package/dist/lookup/hlookup.spec.d.ts +2 -0
- package/dist/lookup/hlookup.spec.d.ts.map +1 -0
- package/dist/lookup/index.js +139 -156
- package/dist/lookup/index.js.map +1 -0
- package/dist/lookup/indexFn.d.ts +2 -2
- package/dist/lookup/indexFn.spec.d.ts +2 -0
- package/dist/lookup/indexFn.spec.d.ts.map +1 -0
- package/dist/lookup/match.d.ts +2 -2
- package/dist/lookup/match.d.ts.map +1 -1
- package/dist/lookup/match.spec.d.ts +2 -0
- package/dist/lookup/match.spec.d.ts.map +1 -0
- package/dist/lookup/row.spec.d.ts +2 -0
- package/dist/lookup/row.spec.d.ts.map +1 -0
- package/dist/lookup/rows.spec.d.ts +2 -0
- package/dist/lookup/rows.spec.d.ts.map +1 -0
- package/dist/lookup/sheet.d.ts +2 -2
- package/dist/lookup/sheet.spec.d.ts +2 -0
- package/dist/lookup/sheet.spec.d.ts.map +1 -0
- package/dist/lookup/vlookup.d.ts +2 -3
- package/dist/lookup/vlookup.d.ts.map +1 -1
- package/dist/lookup/vlookup.spec.d.ts +2 -0
- package/dist/lookup/vlookup.spec.d.ts.map +1 -0
- package/dist/math/__matrix_base.d.ts +1 -1
- package/dist/math/acos.spec.d.ts +2 -0
- package/dist/math/acos.spec.d.ts.map +1 -0
- package/dist/math/asin.spec.d.ts +2 -0
- package/dist/math/asin.spec.d.ts.map +1 -0
- package/dist/math/atan.spec.d.ts +2 -0
- package/dist/math/atan.spec.d.ts.map +1 -0
- package/dist/math/atan2.spec.d.ts +2 -0
- package/dist/math/atan2.spec.d.ts.map +1 -0
- package/dist/math/base.spec.d.ts +2 -0
- package/dist/math/base.spec.d.ts.map +1 -0
- package/dist/math/cos.spec.d.ts +2 -0
- package/dist/math/cos.spec.d.ts.map +1 -0
- package/dist/math/countif.d.ts +2 -2
- package/dist/math/countif.spec.d.ts +2 -0
- package/dist/math/countif.spec.d.ts.map +1 -0
- package/dist/math/countifs.spec.d.ts +2 -0
- package/dist/math/countifs.spec.d.ts.map +1 -0
- package/dist/math/even.d.ts.map +1 -1
- package/dist/math/even.spec.d.ts +2 -0
- package/dist/math/even.spec.d.ts.map +1 -0
- package/dist/math/exp.spec.d.ts +2 -0
- package/dist/math/exp.spec.d.ts.map +1 -0
- package/dist/math/fact.spec.d.ts +2 -0
- package/dist/math/fact.spec.d.ts.map +1 -0
- package/dist/math/index.js +208 -206
- package/dist/math/index.js.map +1 -0
- package/dist/math/int.d.ts.map +1 -1
- package/dist/math/int.spec.d.ts +2 -0
- package/dist/math/int.spec.d.ts.map +1 -0
- package/dist/math/iseven.d.ts.map +1 -1
- package/dist/math/iseven.spec.d.ts +2 -0
- package/dist/math/iseven.spec.d.ts.map +1 -0
- package/dist/math/isodd.d.ts.map +1 -1
- package/dist/math/isodd.spec.d.ts +2 -0
- package/dist/math/isodd.spec.d.ts.map +1 -0
- package/dist/math/lcm.spec.d.ts +2 -0
- package/dist/math/lcm.spec.d.ts.map +1 -0
- package/dist/math/ln.d.ts.map +1 -1
- package/dist/math/ln.spec.d.ts +2 -0
- package/dist/math/ln.spec.d.ts.map +1 -0
- package/dist/math/log.d.ts +1 -0
- package/dist/math/log.d.ts.map +1 -1
- package/dist/math/log.spec.d.ts +2 -0
- package/dist/math/log.spec.d.ts.map +1 -0
- package/dist/math/log10.d.ts.map +1 -1
- package/dist/math/log10.spec.d.ts +2 -0
- package/dist/math/log10.spec.d.ts.map +1 -0
- package/dist/math/mod.spec.d.ts +2 -0
- package/dist/math/mod.spec.d.ts.map +1 -0
- package/dist/math/odd.d.ts.map +1 -1
- package/dist/math/odd.spec.d.ts +2 -0
- package/dist/math/odd.spec.d.ts.map +1 -0
- package/dist/math/pi.d.ts.map +1 -1
- package/dist/math/pi.spec.d.ts +2 -0
- package/dist/math/pi.spec.d.ts.map +1 -0
- package/dist/math/product.d.ts +1 -2
- package/dist/math/product.d.ts.map +1 -1
- package/dist/math/product.spec.d.ts +2 -0
- package/dist/math/product.spec.d.ts.map +1 -0
- package/dist/math/radians.d.ts.map +1 -1
- package/dist/math/radians.spec.d.ts +2 -0
- package/dist/math/radians.spec.d.ts.map +1 -0
- package/dist/math/rand.d.ts.map +1 -1
- package/dist/math/rand.spec.d.ts +2 -0
- package/dist/math/rand.spec.d.ts.map +1 -0
- package/dist/math/round.d.ts.map +1 -1
- package/dist/math/round.spec.d.ts +2 -0
- package/dist/math/round.spec.d.ts.map +1 -0
- package/dist/math/rounddown.d.ts.map +1 -1
- package/dist/math/rounddown.spec.d.ts +2 -0
- package/dist/math/rounddown.spec.d.ts.map +1 -0
- package/dist/math/roundup.d.ts.map +1 -1
- package/dist/math/roundup.spec.d.ts +2 -0
- package/dist/math/roundup.spec.d.ts.map +1 -0
- package/dist/math/sequence.spec.d.ts +2 -0
- package/dist/math/sequence.spec.d.ts.map +1 -0
- package/dist/math/sign.d.ts.map +1 -1
- package/dist/math/sign.spec.d.ts +2 -0
- package/dist/math/sign.spec.d.ts.map +1 -0
- package/dist/math/sin.d.ts.map +1 -1
- package/dist/math/sin.spec.d.ts +2 -0
- package/dist/math/sin.spec.d.ts.map +1 -0
- package/dist/math/sqrt.d.ts.map +1 -1
- package/dist/math/sqrt.spec.d.ts +2 -0
- package/dist/math/sqrt.spec.d.ts.map +1 -0
- package/dist/math/sumif.d.ts +2 -2
- package/dist/math/sumif.d.ts.map +1 -1
- package/dist/math/sumifs.d.ts +2 -2
- package/dist/math/sumifs.d.ts.map +1 -1
- package/dist/math/sumifs.spec.d.ts +2 -0
- package/dist/math/sumifs.spec.d.ts.map +1 -0
- package/dist/math/sumsq.spec.d.ts +2 -0
- package/dist/math/sumsq.spec.d.ts.map +1 -0
- package/dist/math/tan.d.ts.map +1 -1
- package/dist/math/tan.spec.d.ts +2 -0
- package/dist/math/tan.spec.d.ts.map +1 -0
- package/dist/math/trunc.d.ts.map +1 -1
- package/dist/math/trunc.spec.d.ts +2 -0
- package/dist/math/trunc.spec.d.ts.map +1 -0
- package/dist/math/unaryPercent.d.ts.map +1 -1
- package/dist/math/unaryPercent.spec.d.ts +2 -0
- package/dist/math/unaryPercent.spec.d.ts.map +1 -0
- package/dist/math/uplus.d.ts.map +1 -1
- package/dist/math/uplus.spec.d.ts +2 -0
- package/dist/math/uplus.spec.d.ts.map +1 -0
- package/dist/statistics/averageif.d.ts +2 -2
- package/dist/statistics/averageif.d.ts.map +1 -1
- package/dist/statistics/averageifs.d.ts +2 -2
- package/dist/statistics/averageifs.d.ts.map +1 -1
- package/dist/statistics/averageifs.spec.d.ts +2 -0
- package/dist/statistics/averageifs.spec.d.ts.map +1 -0
- package/dist/statistics/correl.spec.d.ts +2 -0
- package/dist/statistics/correl.spec.d.ts.map +1 -0
- package/dist/statistics/covariance_p.d.ts +10 -0
- package/dist/statistics/covariance_p.d.ts.map +1 -0
- package/dist/statistics/covariance_p.spec.d.ts +2 -0
- package/dist/statistics/covariance_p.spec.d.ts.map +1 -0
- package/dist/statistics/covariance_s.spec.d.ts +2 -0
- package/dist/statistics/covariance_s.spec.d.ts.map +1 -0
- package/dist/statistics/index.d.ts.map +1 -1
- package/dist/statistics/index.js +154 -111
- package/dist/statistics/index.js.map +1 -0
- package/dist/statistics/median.spec.d.ts +2 -0
- package/dist/statistics/median.spec.d.ts.map +1 -0
- package/dist/statistics/mode_sngl.spec.d.ts +2 -0
- package/dist/statistics/mode_sngl.spec.d.ts.map +1 -0
- package/dist/statistics/percentile_inc.spec.d.ts +2 -0
- package/dist/statistics/percentile_inc.spec.d.ts.map +1 -0
- package/dist/statistics/quartile_inc.spec.d.ts +2 -0
- package/dist/statistics/quartile_inc.spec.d.ts.map +1 -0
- package/dist/statistics/rank_eq.spec.d.ts +2 -0
- package/dist/statistics/rank_eq.spec.d.ts.map +1 -0
- package/dist/statistics/rsq.spec.d.ts +2 -0
- package/dist/statistics/rsq.spec.d.ts.map +1 -0
- package/dist/statistics/stdev_p.spec.d.ts +2 -0
- package/dist/statistics/stdev_p.spec.d.ts.map +1 -0
- package/dist/statistics/stdev_s.spec.d.ts +2 -0
- package/dist/statistics/stdev_s.spec.d.ts.map +1 -0
- package/dist/statistics/t_test.spec.d.ts +2 -0
- package/dist/statistics/t_test.spec.d.ts.map +1 -0
- package/dist/statistics/var_p.spec.d.ts +2 -0
- package/dist/statistics/var_p.spec.d.ts.map +1 -0
- package/dist/statistics/var_s.spec.d.ts +2 -0
- package/dist/statistics/var_s.spec.d.ts.map +1 -0
- package/dist/text/char.spec.d.ts +2 -0
- package/dist/text/char.spec.d.ts.map +1 -0
- package/dist/text/clean.spec.d.ts +2 -0
- package/dist/text/clean.spec.d.ts.map +1 -0
- package/dist/text/concatenate.d.ts.map +1 -1
- package/dist/text/concatenate.spec.d.ts +2 -0
- package/dist/text/concatenate.spec.d.ts.map +1 -0
- package/dist/text/exact.d.ts.map +1 -1
- package/dist/text/exact.spec.d.ts +2 -0
- package/dist/text/exact.spec.d.ts.map +1 -0
- package/dist/text/index.js +66 -69
- package/dist/text/index.js.map +1 -0
- package/dist/text/join.d.ts.map +1 -1
- package/dist/text/join.spec.d.ts +2 -0
- package/dist/text/join.spec.d.ts.map +1 -0
- package/dist/text/lenb.d.ts.map +1 -1
- package/dist/text/lenb.spec.d.ts +2 -0
- package/dist/text/lenb.spec.d.ts.map +1 -0
- package/dist/text/lower.spec.d.ts +2 -0
- package/dist/text/lower.spec.d.ts.map +1 -0
- package/dist/text/proper.spec.d.ts +2 -0
- package/dist/text/proper.spec.d.ts.map +1 -0
- package/dist/text/replace.d.ts.map +1 -1
- package/dist/text/replace.spec.d.ts +2 -0
- package/dist/text/replace.spec.d.ts.map +1 -0
- package/dist/text/rept.spec.d.ts +2 -0
- package/dist/text/rept.spec.d.ts.map +1 -0
- package/dist/text/trim.d.ts.map +1 -1
- package/dist/text/trim.spec.d.ts +2 -0
- package/dist/text/trim.spec.d.ts.map +1 -0
- package/dist/text/unichar.d.ts.map +1 -1
- package/dist/text/unichar.spec.d.ts +2 -0
- package/dist/text/unichar.spec.d.ts.map +1 -0
- package/dist/text/unicode.spec.d.ts +2 -0
- package/dist/text/unicode.spec.d.ts.map +1 -0
- package/dist/text/upper.d.ts.map +1 -1
- package/dist/text/upper.spec.d.ts +2 -0
- package/dist/text/upper.spec.d.ts.map +1 -0
- package/dist/time/date.d.ts.map +1 -1
- package/dist/time/day.d.ts.map +1 -1
- package/dist/time/days.d.ts.map +1 -1
- package/dist/time/hour.d.ts.map +1 -1
- package/dist/time/index.js +74 -80
- package/dist/time/index.js.map +1 -0
- package/dist/time/minute.d.ts.map +1 -1
- package/dist/time/month.d.ts.map +1 -1
- package/dist/time/second.d.ts.map +1 -1
- package/dist/time/time.d.ts.map +1 -1
- package/dist/time/today.d.ts.map +1 -1
- package/dist/time/workday.d.ts.map +1 -1
- package/dist/time/year.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { FunctionMapping } from '@gridsheet/react-core';
|
|
1
|
+
import { FunctionMapping, RegistryProps } from '@gridsheet/react-core';
|
|
2
2
|
/** All extended functions combined into a single FunctionMapping. */
|
|
3
3
|
export declare const allFunctions: FunctionMapping;
|
|
4
|
+
/** useBook with all extended functions pre-loaded. User-supplied additionalFunctions are merged on top. */
|
|
5
|
+
export declare const useSpellbook: ({ additionalFunctions, ...rest }?: RegistryProps) => import('@gridsheet/react-core').BookType;
|
|
6
|
+
/** createBook with all extended functions pre-loaded. User-supplied additionalFunctions are merged on top. */
|
|
7
|
+
export declare const createSpellbook: ({ additionalFunctions, ...rest }?: RegistryProps) => import('@gridsheet/react-core').BookType;
|
|
4
8
|
export default allFunctions;
|
|
5
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAU5E,qEAAqE;AACrE,eAAO,MAAM,YAAY,EAAE,eAQ1B,CAAC;AAEF,2GAA2G;AAC3G,eAAO,MAAM,YAAY,GAAI,mCAAkC,aAAkB,6CACO,CAAC;AAEzF,8GAA8G;AAC9G,eAAO,MAAM,eAAe,GAAI,mCAAkC,aAAkB,6CACO,CAAC;AAE5F,eAAe,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
1
|
+
import { BaseFunction as r, FormulaError as s, ensureBoolean as u, Sheet as l, ensureNumber as d, useBook as p, createBook as h } from "@gridsheet/react-core";
|
|
2
|
+
import { mathFunctions as m } from "./math/index.js";
|
|
3
|
+
import { statisticsFunctions as f } from "./statistics/index.js";
|
|
4
|
+
import { textFunctions as g } from "./text/index.js";
|
|
5
|
+
import { lookupFunctions as T } from "./lookup/index.js";
|
|
6
|
+
import { timeFunctions as y } from "./time/index.js";
|
|
7
|
+
const x = `Returns TRUE if an odd number of the arguments are logically true.
|
|
8
8
|
Returns FALSE if an even number of the arguments are logically true.`;
|
|
9
|
-
class A extends
|
|
9
|
+
class A extends r {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this.example = "XOR(A1=1, A2=2)", this.description =
|
|
11
|
+
super(...arguments), this.example = "XOR(A1=1, A2=2)", this.description = x, this.defs = [
|
|
12
12
|
{ name: "expression", description: "Logical expressions to evaluate.", acceptedTypes: ["boolean"], variadic: !0 }
|
|
13
13
|
], this.category = "logical";
|
|
14
14
|
}
|
|
@@ -16,9 +16,9 @@ class A extends t {
|
|
|
16
16
|
return e.reduce((n, i) => n !== i, !1);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const v = "Returns the first argument if it is not a #N/A error, otherwise returns the second argument.", a = class a extends r {
|
|
20
20
|
constructor() {
|
|
21
|
-
super(...arguments), this.example = 'IFNA(A1, "N/A error occurred")', this.description =
|
|
21
|
+
super(...arguments), this.example = 'IFNA(A1, "N/A error occurred")', this.description = v, this.defs = [
|
|
22
22
|
{
|
|
23
23
|
name: "value",
|
|
24
24
|
description: "The value to return if it is not a #N/A error.",
|
|
@@ -39,50 +39,37 @@ const x = "Returns the first argument if it is not a #N/A error, otherwise retur
|
|
|
39
39
|
};
|
|
40
40
|
a.__name = "IFNA";
|
|
41
41
|
let o = a;
|
|
42
|
-
const
|
|
42
|
+
const R = `Evaluates multiple conditions and returns the value corresponding to the first TRUE condition.
|
|
43
43
|
Arguments must be supplied in (condition, value) pairs.`;
|
|
44
|
-
class
|
|
45
|
-
constructor(
|
|
46
|
-
super(
|
|
47
|
-
{ name: "
|
|
48
|
-
{ name: "
|
|
49
|
-
|
|
50
|
-
name: "condition2",
|
|
51
|
-
description: "Additional conditions.",
|
|
52
|
-
acceptedTypes: ["boolean"],
|
|
53
|
-
optional: !0,
|
|
54
|
-
variadic: !0
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: "value2",
|
|
58
|
-
description: "Additional values.",
|
|
59
|
-
acceptedTypes: ["any"],
|
|
60
|
-
optional: !0,
|
|
61
|
-
variadic: !0
|
|
62
|
-
}
|
|
63
|
-
], this.category = "logical", this.lazyArgs = e.args;
|
|
44
|
+
class E extends r {
|
|
45
|
+
constructor() {
|
|
46
|
+
super(...arguments), this.example = 'IFS(A1>90, "A", A1>70, "B", A1>50, "C")', this.description = R, this.defs = [
|
|
47
|
+
{ name: "condition", description: "Condition to evaluate.", acceptedTypes: ["boolean"], variadic: !0 },
|
|
48
|
+
{ name: "value", description: "Value to return if condition is TRUE.", acceptedTypes: ["any"], variadic: !0 }
|
|
49
|
+
], this.category = "logical";
|
|
64
50
|
}
|
|
65
|
-
|
|
66
|
-
if (
|
|
51
|
+
validate(e) {
|
|
52
|
+
if (e.length < 2)
|
|
67
53
|
throw new s("#N/A", "IFS requires at least one condition-value pair.");
|
|
68
|
-
if (
|
|
54
|
+
if (e.length % 2 !== 0)
|
|
69
55
|
throw new s("#N/A", "IFS requires an even number of arguments (condition, value) pairs.");
|
|
70
|
-
for (let
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return c({ value: i.evaluate({ table: this.table }) });
|
|
74
|
-
}
|
|
56
|
+
for (let n = 0; n < e.length; n += 2)
|
|
57
|
+
if (u(e[n]))
|
|
58
|
+
return [e[n + 1]];
|
|
75
59
|
throw new s("#N/A", "No condition in IFS was met.");
|
|
76
60
|
}
|
|
61
|
+
main(e) {
|
|
62
|
+
return e;
|
|
63
|
+
}
|
|
77
64
|
}
|
|
78
|
-
const
|
|
65
|
+
const F = {
|
|
79
66
|
xor: A,
|
|
80
67
|
ifna: o,
|
|
81
|
-
ifs:
|
|
82
|
-
},
|
|
83
|
-
class
|
|
68
|
+
ifs: E
|
|
69
|
+
}, N = "Returns TRUE if the referenced cell contains a formula.";
|
|
70
|
+
class I extends r {
|
|
84
71
|
constructor() {
|
|
85
|
-
super(...arguments), this.example = "ISFORMULA(A1)", this.description =
|
|
72
|
+
super(...arguments), this.example = "ISFORMULA(A1)", this.description = N, this.defs = [
|
|
86
73
|
{
|
|
87
74
|
name: "reference",
|
|
88
75
|
description: "The cell reference to check for a formula.",
|
|
@@ -93,14 +80,14 @@ class N extends t {
|
|
|
93
80
|
], this.category = "information";
|
|
94
81
|
}
|
|
95
82
|
main(e) {
|
|
96
|
-
const n = e.
|
|
83
|
+
const n = e.getCell({ y: e.top, x: e.left }, { resolution: "SYSTEM" }), i = n == null ? void 0 : n.value;
|
|
97
84
|
return typeof i == "string" && i.startsWith("=");
|
|
98
85
|
}
|
|
99
86
|
}
|
|
100
|
-
const
|
|
101
|
-
class b extends
|
|
87
|
+
const S = "Returns TRUE if the referenced cell is empty.";
|
|
88
|
+
class b extends r {
|
|
102
89
|
constructor() {
|
|
103
|
-
super(...arguments), this.example = "ISBLANK(A1)", this.description =
|
|
90
|
+
super(...arguments), this.example = "ISBLANK(A1)", this.description = S, this.defs = [
|
|
104
91
|
{
|
|
105
92
|
name: "value",
|
|
106
93
|
description: "A reference to a cell to check for emptiness.",
|
|
@@ -113,10 +100,10 @@ class b extends t {
|
|
|
113
100
|
return e == null || e === "";
|
|
114
101
|
}
|
|
115
102
|
}
|
|
116
|
-
const
|
|
117
|
-
class U extends
|
|
103
|
+
const k = "Returns TRUE if the value is any error other than #N/A.";
|
|
104
|
+
class U extends r {
|
|
118
105
|
constructor() {
|
|
119
|
-
super(...arguments), this.example = "ISERR(A1)", this.description =
|
|
106
|
+
super(...arguments), this.example = "ISERR(A1)", this.description = k, this.defs = [
|
|
120
107
|
{
|
|
121
108
|
name: "value",
|
|
122
109
|
description: "The value to check for a non-#N/A error.",
|
|
@@ -129,10 +116,10 @@ class U extends t {
|
|
|
129
116
|
return e instanceof Error ? !0 : s.is(e) && e.code !== "#N/A";
|
|
130
117
|
}
|
|
131
118
|
}
|
|
132
|
-
const
|
|
133
|
-
class
|
|
119
|
+
const $ = "Returns TRUE if the value is any error value.";
|
|
120
|
+
class w extends r {
|
|
134
121
|
constructor() {
|
|
135
|
-
super(...arguments), this.example = "ISERROR(A1)", this.description =
|
|
122
|
+
super(...arguments), this.example = "ISERROR(A1)", this.description = $, this.defs = [
|
|
136
123
|
{
|
|
137
124
|
name: "value",
|
|
138
125
|
description: "The value to check for an error.",
|
|
@@ -145,10 +132,10 @@ class $ extends t {
|
|
|
145
132
|
return s.is(e) || e instanceof Error;
|
|
146
133
|
}
|
|
147
134
|
}
|
|
148
|
-
const
|
|
149
|
-
class
|
|
135
|
+
const L = "Returns TRUE if the value is TRUE or FALSE.";
|
|
136
|
+
class B extends r {
|
|
150
137
|
constructor() {
|
|
151
|
-
super(...arguments), this.example = "ISLOGICAL(TRUE)", this.description =
|
|
138
|
+
super(...arguments), this.example = "ISLOGICAL(TRUE)", this.description = L, this.defs = [
|
|
152
139
|
{
|
|
153
140
|
name: "value",
|
|
154
141
|
description: "The value to check for being logical (TRUE or FALSE).",
|
|
@@ -161,10 +148,10 @@ class L extends t {
|
|
|
161
148
|
return typeof e == "boolean";
|
|
162
149
|
}
|
|
163
150
|
}
|
|
164
|
-
const
|
|
165
|
-
class
|
|
151
|
+
const M = "Returns TRUE if the value is the #N/A error value.";
|
|
152
|
+
class O extends r {
|
|
166
153
|
constructor() {
|
|
167
|
-
super(...arguments), this.example = "ISNA(A1)", this.description =
|
|
154
|
+
super(...arguments), this.example = "ISNA(A1)", this.description = M, this.defs = [
|
|
168
155
|
{
|
|
169
156
|
name: "value",
|
|
170
157
|
description: "The value to check for the #N/A error.",
|
|
@@ -177,10 +164,10 @@ class z extends t {
|
|
|
177
164
|
return s.is(e) && e.code === "#N/A";
|
|
178
165
|
}
|
|
179
166
|
}
|
|
180
|
-
const
|
|
181
|
-
class
|
|
167
|
+
const X = "Returns TRUE if the value is not a text string.";
|
|
168
|
+
class C extends r {
|
|
182
169
|
constructor() {
|
|
183
|
-
super(...arguments), this.example = "ISNONTEXT(A1)", this.description =
|
|
170
|
+
super(...arguments), this.example = "ISNONTEXT(A1)", this.description = X, this.defs = [
|
|
184
171
|
{
|
|
185
172
|
name: "value",
|
|
186
173
|
description: "The value to check for being non-text.",
|
|
@@ -193,10 +180,10 @@ class O extends t {
|
|
|
193
180
|
return typeof e != "string";
|
|
194
181
|
}
|
|
195
182
|
}
|
|
196
|
-
const
|
|
197
|
-
class
|
|
183
|
+
const _ = "Returns TRUE if the value is a text string.";
|
|
184
|
+
class D extends r {
|
|
198
185
|
constructor() {
|
|
199
|
-
super(...arguments), this.example = "ISTEXT(A1)", this.description =
|
|
186
|
+
super(...arguments), this.example = "ISTEXT(A1)", this.description = _, this.defs = [
|
|
200
187
|
{
|
|
201
188
|
name: "value",
|
|
202
189
|
description: "The value to check for being text.",
|
|
@@ -209,10 +196,10 @@ class _ extends t {
|
|
|
209
196
|
return typeof e == "string";
|
|
210
197
|
}
|
|
211
198
|
}
|
|
212
|
-
const
|
|
213
|
-
class
|
|
199
|
+
const q = "Returns TRUE if the value is a valid cell reference.";
|
|
200
|
+
class G extends r {
|
|
214
201
|
constructor() {
|
|
215
|
-
super(...arguments), this.example = "ISREF(A1)", this.description =
|
|
202
|
+
super(...arguments), this.example = "ISREF(A1)", this.description = q, this.defs = [
|
|
216
203
|
{
|
|
217
204
|
name: "value",
|
|
218
205
|
description: "The value to check for being a cell reference.",
|
|
@@ -223,13 +210,13 @@ class D extends t {
|
|
|
223
210
|
], this.category = "information";
|
|
224
211
|
}
|
|
225
212
|
main(e) {
|
|
226
|
-
return
|
|
213
|
+
return l.is(e);
|
|
227
214
|
}
|
|
228
215
|
}
|
|
229
|
-
const
|
|
230
|
-
class
|
|
216
|
+
const j = "Returns the argument provided as a number.";
|
|
217
|
+
class H extends r {
|
|
231
218
|
constructor() {
|
|
232
|
-
super(...arguments), this.example = "N(A1)", this.description =
|
|
219
|
+
super(...arguments), this.example = "N(A1)", this.description = j, this.defs = [
|
|
233
220
|
{
|
|
234
221
|
name: "value",
|
|
235
222
|
description: "The value to convert to a number.",
|
|
@@ -245,25 +232,25 @@ class G extends t {
|
|
|
245
232
|
if (e == null || e === "")
|
|
246
233
|
return 0;
|
|
247
234
|
try {
|
|
248
|
-
return
|
|
235
|
+
return d(e);
|
|
249
236
|
} catch {
|
|
250
237
|
return 0;
|
|
251
238
|
}
|
|
252
239
|
}
|
|
253
240
|
}
|
|
254
|
-
const
|
|
255
|
-
class
|
|
241
|
+
const K = 'Returns the error value #N/A, meaning "value not available".';
|
|
242
|
+
class V extends r {
|
|
256
243
|
constructor() {
|
|
257
|
-
super(...arguments), this.example = "NA()", this.description =
|
|
244
|
+
super(...arguments), this.example = "NA()", this.description = K, this.defs = [], this.category = "information";
|
|
258
245
|
}
|
|
259
246
|
main() {
|
|
260
247
|
throw new s("#N/A", "N/A");
|
|
261
248
|
}
|
|
262
249
|
}
|
|
263
|
-
const
|
|
264
|
-
class
|
|
250
|
+
const W = "Returns TRUE if the value is a date.";
|
|
251
|
+
class Y extends r {
|
|
265
252
|
constructor() {
|
|
266
|
-
super(...arguments), this.example = "ISDATE(A1)", this.description =
|
|
253
|
+
super(...arguments), this.example = "ISDATE(A1)", this.description = W, this.defs = [
|
|
267
254
|
{
|
|
268
255
|
name: "value",
|
|
269
256
|
description: "The value to check for being a date.",
|
|
@@ -276,10 +263,10 @@ class P extends t {
|
|
|
276
263
|
return e instanceof Date && !isNaN(e.getTime());
|
|
277
264
|
}
|
|
278
265
|
}
|
|
279
|
-
const
|
|
280
|
-
class
|
|
266
|
+
const z = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, J = "Returns TRUE if the value is a valid email address.";
|
|
267
|
+
class P extends r {
|
|
281
268
|
constructor() {
|
|
282
|
-
super(...arguments), this.example = "ISEMAIL(A1)", this.description =
|
|
269
|
+
super(...arguments), this.example = "ISEMAIL(A1)", this.description = J, this.defs = [
|
|
283
270
|
{
|
|
284
271
|
name: "value",
|
|
285
272
|
description: "The value to check for being a valid email address.",
|
|
@@ -289,44 +276,47 @@ class Y extends t {
|
|
|
289
276
|
], this.category = "information";
|
|
290
277
|
}
|
|
291
278
|
main(e) {
|
|
292
|
-
return typeof e != "string" ? !1 :
|
|
279
|
+
return typeof e != "string" ? !1 : z.test(e);
|
|
293
280
|
}
|
|
294
281
|
}
|
|
295
|
-
const
|
|
296
|
-
class
|
|
282
|
+
const Q = "Returns the total number of sheets in the spreadsheet.";
|
|
283
|
+
class Z extends r {
|
|
297
284
|
constructor() {
|
|
298
|
-
super(...arguments), this.example = "SHEETS()", this.description =
|
|
285
|
+
super(...arguments), this.example = "SHEETS()", this.description = Q, this.defs = [], this.category = "information";
|
|
299
286
|
}
|
|
300
287
|
main() {
|
|
301
|
-
const e = this.
|
|
288
|
+
const e = this.sheet.registry.sheetIdsByName, n = Object.keys(e).length;
|
|
302
289
|
return n === 0 ? 1 : n;
|
|
303
290
|
}
|
|
304
291
|
}
|
|
305
|
-
const
|
|
306
|
-
isformula:
|
|
292
|
+
const ee = {
|
|
293
|
+
isformula: I,
|
|
307
294
|
isblank: b,
|
|
308
295
|
iserr: U,
|
|
309
|
-
iserror:
|
|
310
|
-
islogical:
|
|
311
|
-
isna:
|
|
312
|
-
isnontext:
|
|
313
|
-
istext:
|
|
314
|
-
isref:
|
|
315
|
-
n:
|
|
316
|
-
na:
|
|
317
|
-
isdate:
|
|
318
|
-
isemail:
|
|
319
|
-
sheets:
|
|
320
|
-
},
|
|
321
|
-
...l,
|
|
322
|
-
...d,
|
|
323
|
-
...p,
|
|
324
|
-
...h,
|
|
296
|
+
iserror: w,
|
|
297
|
+
islogical: B,
|
|
298
|
+
isna: O,
|
|
299
|
+
isnontext: C,
|
|
300
|
+
istext: D,
|
|
301
|
+
isref: G,
|
|
302
|
+
n: H,
|
|
303
|
+
na: V,
|
|
304
|
+
isdate: Y,
|
|
305
|
+
isemail: P,
|
|
306
|
+
sheets: Z
|
|
307
|
+
}, c = {
|
|
325
308
|
...m,
|
|
326
|
-
...
|
|
327
|
-
...
|
|
328
|
-
|
|
309
|
+
...f,
|
|
310
|
+
...g,
|
|
311
|
+
...T,
|
|
312
|
+
...y,
|
|
313
|
+
...F,
|
|
314
|
+
...ee
|
|
315
|
+
}, ae = ({ additionalFunctions: t, ...e } = {}) => p({ ...e, additionalFunctions: { ...c, ...t } }), ce = ({ additionalFunctions: t, ...e } = {}) => h({ ...e, additionalFunctions: { ...c, ...t } });
|
|
329
316
|
export {
|
|
330
|
-
|
|
331
|
-
|
|
317
|
+
c as allFunctions,
|
|
318
|
+
ce as createSpellbook,
|
|
319
|
+
c as default,
|
|
320
|
+
ae as useSpellbook
|
|
332
321
|
};
|
|
322
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/logical/xor.ts","../src/logical/ifna.ts","../src/logical/ifs.ts","../src/logical/index.ts","../src/information/isformula.ts","../src/information/isblank.ts","../src/information/iserr.ts","../src/information/iserror.ts","../src/information/islogical.ts","../src/information/isna.ts","../src/information/isnontext.ts","../src/information/istext.ts","../src/information/isref.ts","../src/information/n.ts","../src/information/na.ts","../src/information/isdate.ts","../src/information/isemail.ts","../src/information/sheets.ts","../src/information/index.ts","../src/index.ts"],"sourcesContent":["import { FormulaError } from '@gridsheet/react-core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport { ensureBoolean } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if an odd number of the arguments are logically true.\nReturns FALSE if an even number of the arguments are logically true.`;\n\nexport class XorFunction extends BaseFunction {\n example = 'XOR(A1=1, A2=2)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n { name: 'expression', description: 'Logical expressions to evaluate.', acceptedTypes: ['boolean'], variadic: true },\n ];\n category: FunctionCategory = 'logical';\n\n protected main(...values: boolean[]) {\n // XOR is true when an odd number of arguments are true\n return values.reduce((acc, val) => acc !== val, false as boolean);\n }\n}\n","import { BaseFunction, FormulaError } from '@gridsheet/react-core';\nimport { type FunctionArgumentDefinition } from '@gridsheet/react-core';\n\nconst description = `Returns the first argument if it is not a #N/A error, otherwise returns the second argument.`;\n\nexport class IfnaFunction extends BaseFunction {\n static __name = 'IFNA';\n example = 'IFNA(A1, \"N/A error occurred\")';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to return if it is not a #N/A error.',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n {\n name: 'value_if_na',\n description: 'The value to return if the first argument is a #N/A error.',\n optional: true,\n acceptedTypes: ['any'],\n },\n ];\n\n category = 'logical' as const;\n\n protected main(value: any, valueIfNa?: any) {\n if (FormulaError.is(value) && value.code === '#N/A') {\n return valueIfNa;\n }\n return value;\n }\n}\n","import { BaseFunction, FormulaError } from '@gridsheet/react-core';\nimport { type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport { ensureBoolean } from '@gridsheet/react-core';\n\nconst description = `Evaluates multiple conditions and returns the value corresponding to the first TRUE condition.\nArguments must be supplied in (condition, value) pairs.`;\n\nexport class IfsFunction extends BaseFunction {\n example = 'IFS(A1>90, \"A\", A1>70, \"B\", A1>50, \"C\")';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n { name: 'condition', description: 'Condition to evaluate.', acceptedTypes: ['boolean'], variadic: true },\n { name: 'value', description: 'Value to return if condition is TRUE.', acceptedTypes: ['any'], variadic: true },\n ];\n category = 'logical' as const;\n\n protected validate(args: any[]): any[] {\n if (args.length < 2) {\n throw new FormulaError('#N/A', 'IFS requires at least one condition-value pair.');\n }\n if (args.length % 2 !== 0) {\n throw new FormulaError('#N/A', 'IFS requires an even number of arguments (condition, value) pairs.');\n }\n for (let i = 0; i < args.length; i += 2) {\n if (ensureBoolean(args[i])) {\n return [args[i + 1]];\n }\n }\n throw new FormulaError('#N/A', 'No condition in IFS was met.');\n }\n\n protected main(result: any) {\n return result;\n }\n}\n","import type { FunctionMapping } from '@gridsheet/react-core';\nimport { XorFunction } from './xor';\nimport { IfnaFunction } from './ifna';\nimport { IfsFunction } from './ifs';\n\nexport const logicalFunctions: FunctionMapping = {\n xor: XorFunction,\n ifna: IfnaFunction,\n ifs: IfsFunction,\n};\n\nexport default logicalFunctions;\n","import { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport { Sheet } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the referenced cell contains a formula.`;\n\nexport class IsformulaFunction extends BaseFunction {\n example = 'ISFORMULA(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'reference',\n description: 'The cell reference to check for a formula.',\n acceptedTypes: ['reference'],\n takesMatrix: true,\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(ref: Sheet) {\n const cell = ref.getCell({ y: ref.top, x: ref.left }, { resolution: 'SYSTEM' });\n const raw = cell?.value;\n return typeof raw === 'string' && raw.startsWith('=');\n }\n}\n","import { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the referenced cell is empty.`;\n\nexport class IsblankFunction extends BaseFunction {\n example = 'ISBLANK(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'A reference to a cell to check for emptiness.',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n return value === null || value === undefined || value === '';\n }\n}\n","import { BaseFunction, FormulaError } from '@gridsheet/react-core';\nimport type { FunctionArgumentDefinition, FunctionProps } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\nimport { Sheet } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the value is any error other than #N/A.`;\n\nexport class IserrFunction extends BaseFunction {\n example = 'ISERR(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to check for a non-#N/A error.',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n if (value instanceof Error) {\n return true;\n }\n return FormulaError.is(value) && value.code !== '#N/A';\n }\n}\n","import { BaseFunction, FormulaError } from '@gridsheet/react-core';\nimport type { FunctionArgumentDefinition, FunctionProps } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the value is any error value.`;\n\nexport class IserrorFunction extends BaseFunction {\n example = 'ISERROR(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to check for an error.',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n return FormulaError.is(value) || value instanceof Error;\n }\n}\n","import { FormulaError } from '@gridsheet/react-core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the value is TRUE or FALSE.`;\n\nexport class IslogicalFunction extends BaseFunction {\n example = 'ISLOGICAL(TRUE)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to check for being logical (TRUE or FALSE).',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n return typeof value === 'boolean';\n }\n}\n","import { BaseFunction, FormulaError } from '@gridsheet/react-core';\nimport type { FunctionArgumentDefinition, FunctionProps } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\nimport { Sheet } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the value is the #N/A error value.`;\n\nexport class IsnaFunction extends BaseFunction {\n example = 'ISNA(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to check for the #N/A error.',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n return FormulaError.is(value) && value.code === '#N/A';\n }\n}\n","import { FormulaError } from '@gridsheet/react-core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the value is not a text string.`;\n\nexport class IsnontextFunction extends BaseFunction {\n example = 'ISNONTEXT(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to check for being non-text.',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n return typeof value !== 'string';\n }\n}\n","import { FormulaError } from '@gridsheet/react-core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the value is a text string.`;\n\nexport class IstextFunction extends BaseFunction {\n example = 'ISTEXT(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to check for being text.',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n return typeof value === 'string';\n }\n}\n","import { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport { Sheet } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the value is a valid cell reference.`;\n\nexport class IsrefFunction extends BaseFunction {\n example = 'ISREF(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to check for being a cell reference.',\n acceptedTypes: ['any'],\n takesMatrix: true,\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n return Sheet.is(value);\n }\n}\n","import { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport { ensureNumber } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns the argument provided as a number.`;\n\nexport class NFunction extends BaseFunction {\n example = 'N(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to convert to a number.',\n acceptedTypes: ['any'],\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n if (value instanceof Date) {\n return value.getTime();\n }\n if (value === null || value === undefined || value === '') {\n return 0;\n }\n try {\n return ensureNumber(value);\n } catch {\n return 0;\n }\n }\n}\n","import { FormulaError } from '@gridsheet/react-core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns the error value #N/A, meaning \"value not available\".`;\n\nexport class NaFunction extends BaseFunction {\n example = 'NA()';\n description = description;\n defs: FunctionArgumentDefinition[] = [];\n category: FunctionCategory = 'information';\n\n protected main() {\n throw new FormulaError('#N/A', 'N/A');\n }\n}\n","import { FormulaError } from '@gridsheet/react-core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns TRUE if the value is a date.`;\n\nexport class IsdateFunction extends BaseFunction {\n example = 'ISDATE(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to check for being a date.',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n return value instanceof Date && !isNaN(value.getTime());\n }\n}\n","import { FormulaError } from '@gridsheet/react-core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst EMAIL_REGEX = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\nconst description = `Returns TRUE if the value is a valid email address.`;\n\nexport class IsemailFunction extends BaseFunction {\n example = 'ISEMAIL(A1)';\n description = description;\n defs: FunctionArgumentDefinition[] = [\n {\n name: 'value',\n description: 'The value to check for being a valid email address.',\n acceptedTypes: ['any'],\n errorTolerant: true,\n },\n ];\n category: FunctionCategory = 'information';\n\n protected main(value: any) {\n if (typeof value !== 'string') {\n return false;\n }\n return EMAIL_REGEX.test(value);\n }\n}\n","import { FormulaError } from '@gridsheet/react-core';\nimport { BaseFunction, type FunctionArgumentDefinition } from '@gridsheet/react-core';\nimport type { FunctionCategory } from '@gridsheet/react-core';\n\nconst description = `Returns the total number of sheets in the spreadsheet.`;\n\nexport class SheetsFunction extends BaseFunction {\n example = 'SHEETS()';\n description = description;\n defs: FunctionArgumentDefinition[] = [];\n category: FunctionCategory = 'information';\n\n protected main() {\n const sheetIdsByName = this.sheet.registry.sheetIdsByName;\n const count = Object.keys(sheetIdsByName).length;\n // If wire has no registered sheets (e.g. standalone sheet), return 1\n return count === 0 ? 1 : count;\n }\n}\n","import type { FunctionMapping } from '@gridsheet/react-core';\nimport { IsformulaFunction } from './isformula';\nimport { IsblankFunction } from './isblank';\nimport { IserrFunction } from './iserr';\nimport { IserrorFunction } from './iserror';\nimport { IslogicalFunction } from './islogical';\nimport { IsnaFunction } from './isna';\nimport { IsnontextFunction } from './isnontext';\nimport { IstextFunction } from './istext';\nimport { IsrefFunction } from './isref';\nimport { NFunction } from './n';\nimport { NaFunction } from './na';\nimport { IsdateFunction } from './isdate';\nimport { IsemailFunction } from './isemail';\nimport { SheetsFunction } from './sheets';\n\nexport const informationFunctions: FunctionMapping = {\n isformula: IsformulaFunction,\n isblank: IsblankFunction,\n iserr: IserrFunction,\n iserror: IserrorFunction,\n islogical: IslogicalFunction,\n isna: IsnaFunction,\n isnontext: IsnontextFunction,\n istext: IstextFunction,\n isref: IsrefFunction,\n n: NFunction,\n na: NaFunction,\n isdate: IsdateFunction,\n isemail: IsemailFunction,\n sheets: SheetsFunction,\n};\n\nexport default informationFunctions;\n","import type { FunctionMapping, RegistryProps } from '@gridsheet/react-core';\nimport { useBook, createBook } from '@gridsheet/react-core';\nimport { mathFunctions } from './math';\nimport { statisticsFunctions } from './statistics';\nimport { textFunctions } from './text';\nimport { lookupFunctions } from './lookup';\nimport { timeFunctions } from './time';\nimport { logicalFunctions } from './logical';\nimport { informationFunctions } from './information';\n\n/** All extended functions combined into a single FunctionMapping. */\nexport const allFunctions: FunctionMapping = {\n ...mathFunctions,\n ...statisticsFunctions,\n ...textFunctions,\n ...lookupFunctions,\n ...timeFunctions,\n ...logicalFunctions,\n ...informationFunctions,\n};\n\n/** useBook with all extended functions pre-loaded. User-supplied additionalFunctions are merged on top. */\nexport const useSpellbook = ({ additionalFunctions, ...rest }: RegistryProps = {}) =>\n useBook({ ...rest, additionalFunctions: { ...allFunctions, ...additionalFunctions } });\n\n/** createBook with all extended functions pre-loaded. User-supplied additionalFunctions are merged on top. */\nexport const createSpellbook = ({ additionalFunctions, ...rest }: RegistryProps = {}) =>\n createBook({ ...rest, additionalFunctions: { ...allFunctions, ...additionalFunctions } });\n\nexport default allFunctions;\n"],"names":["description","XorFunction","BaseFunction","values","acc","val","_IfnaFunction","value","valueIfNa","FormulaError","IfnaFunction","IfsFunction","args","i","ensureBoolean","result","logicalFunctions","IsformulaFunction","ref","cell","raw","IsblankFunction","IserrFunction","IserrorFunction","IslogicalFunction","IsnaFunction","IsnontextFunction","IstextFunction","IsrefFunction","Sheet","NFunction","ensureNumber","NaFunction","IsdateFunction","EMAIL_REGEX","IsemailFunction","SheetsFunction","sheetIdsByName","count","informationFunctions","allFunctions","mathFunctions","statisticsFunctions","textFunctions","lookupFunctions","timeFunctions","useSpellbook","additionalFunctions","rest","useBook","createSpellbook","createBook"],"mappings":";;;;;;AAKA,MAAMA,IAAc;AAAA;AAGb,MAAMC,UAAoBC,EAAa;AAAA,EAAvC,cAAA;AAAA,UAAA,GAAA,SAAA,GACK,KAAA,UAAA,mBACI,KAAA,cAAAF,GACuB,KAAA,OAAA;AAAA,MACnC,EAAE,MAAM,cAAc,aAAa,oCAAoC,eAAe,CAAC,SAAS,GAAG,UAAU,GAAK;AAAA,IACpH,GAC6B,KAAA,WAAA;AAAA,EAAA;AAAA,EAEnB,QAAQG,GAAmB;AAEnC,WAAOA,EAAO,OAAO,CAACC,GAAKC,MAAQD,MAAQC,GAAK,EAAgB;AAAA,EAAA;AAEpE;ACjBA,MAAML,IAAc,gGAEPM,IAAN,MAAMA,UAAqBJ,EAAa;AAAA,EAAxC,cAAA;AAAA,UAAA,GAAA,SAAA,GAEK,KAAA,UAAA,kCACI,KAAA,cAAAF,GACuB,KAAA,OAAA;AAA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G1EG,KAAkB,CAAC,EAAE,qBAAAH,GAAqB,GAAGC,EAAK,IAAmB,CAAA,MAChFG,EAAW,EAAE,GAAGH,GAAM,qBAAqB,EAAE,GAAGR,GAAc,GAAGO,EAAA,EAAuB,CAAA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isblank.spec.d.ts","sourceRoot":"","sources":["../../src/information/isblank.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isdate.spec.d.ts","sourceRoot":"","sources":["../../src/information/isdate.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isemail.spec.d.ts","sourceRoot":"","sources":["../../src/information/isemail.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iserr.spec.d.ts","sourceRoot":"","sources":["../../src/information/iserr.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iserror.spec.d.ts","sourceRoot":"","sources":["../../src/information/iserror.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BaseFunction, FunctionArgumentDefinition,
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, Sheet, FunctionCategory } from '@gridsheet/react-core';
|
|
2
2
|
export declare class IsformulaFunction extends BaseFunction {
|
|
3
3
|
example: string;
|
|
4
4
|
description: string;
|
|
5
5
|
defs: FunctionArgumentDefinition[];
|
|
6
6
|
category: FunctionCategory;
|
|
7
|
-
protected main(ref:
|
|
7
|
+
protected main(ref: Sheet): boolean;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=isformula.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isformula.spec.d.ts","sourceRoot":"","sources":["../../src/information/isformula.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"islogical.spec.d.ts","sourceRoot":"","sources":["../../src/information/islogical.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isna.spec.d.ts","sourceRoot":"","sources":["../../src/information/isna.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isnontext.spec.d.ts","sourceRoot":"","sources":["../../src/information/isnontext.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BaseFunction, FunctionArgumentDefinition,
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition, Sheet, FunctionCategory } from '@gridsheet/react-core';
|
|
2
2
|
export declare class IsrefFunction extends BaseFunction {
|
|
3
3
|
example: string;
|
|
4
4
|
description: string;
|
|
5
5
|
defs: FunctionArgumentDefinition[];
|
|
6
6
|
category: FunctionCategory;
|
|
7
|
-
protected main(value: any): value is
|
|
7
|
+
protected main(value: any): value is Sheet;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=isref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isref.spec.d.ts","sourceRoot":"","sources":["../../src/information/isref.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"istext.spec.d.ts","sourceRoot":"","sources":["../../src/information/istext.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"n.spec.d.ts","sourceRoot":"","sources":["../../src/information/n.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"na.spec.d.ts","sourceRoot":"","sources":["../../src/information/na.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheets.spec.d.ts","sourceRoot":"","sources":["../../src/information/sheets.spec.ts"],"names":[],"mappings":""}
|
package/dist/logical/ifs.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { BaseFunction,
|
|
1
|
+
import { BaseFunction, FunctionArgumentDefinition } from '@gridsheet/react-core';
|
|
2
2
|
export declare class IfsFunction extends BaseFunction {
|
|
3
3
|
example: string;
|
|
4
4
|
description: string;
|
|
5
5
|
defs: FunctionArgumentDefinition[];
|
|
6
6
|
category: "logical";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
call(): any;
|
|
7
|
+
protected validate(args: any[]): any[];
|
|
8
|
+
protected main(result: any): any;
|
|
10
9
|
}
|
|
11
10
|
//# sourceMappingURL=ifs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifs.d.ts","sourceRoot":"","sources":["../../src/logical/ifs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"ifs.d.ts","sourceRoot":"","sources":["../../src/logical/ifs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAgB,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAMxE,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAA6C;IACpD,WAAW,SAAe;IAC1B,IAAI,EAAE,0BAA0B,EAAE,CAGhC;IACF,QAAQ,EAAG,SAAS,CAAU;IAE9B,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE;IAetC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG;CAG3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column.spec.d.ts","sourceRoot":"","sources":["../../src/lookup/column.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns.spec.d.ts","sourceRoot":"","sources":["../../src/lookup/columns.spec.ts"],"names":[],"mappings":""}
|