@gridsheet/react-core 0.12.4-beta.0 → 0.12.4-beta.1
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/components/Cell.js +56 -50
- package/dist/components/Cell.js.map +1 -1
- package/dist/components/ContextMenu.js +67 -60
- package/dist/components/ContextMenu.js.map +1 -1
- package/dist/components/Editor.js +51 -44
- package/dist/components/Editor.js.map +1 -1
- package/dist/components/Emitter.js +14 -7
- package/dist/components/Emitter.js.map +1 -1
- package/dist/components/GridSheet.js +64 -37
- package/dist/components/GridSheet.js.map +1 -1
- package/dist/components/HeaderLeftCell.js +30 -24
- package/dist/components/HeaderLeftCell.js.map +1 -1
- package/dist/components/HeaderTopCell.js +31 -25
- package/dist/components/HeaderTopCell.js.map +1 -1
- package/dist/components/Resizer.js +37 -31
- package/dist/components/Resizer.js.map +1 -1
- package/dist/components/SearchBox.js +25 -18
- package/dist/components/SearchBox.js.map +1 -1
- package/dist/components/StoreInitializer.js +37 -30
- package/dist/components/StoreInitializer.js.map +1 -1
- package/dist/components/Tabular.js +53 -45
- package/dist/components/Tabular.js.map +1 -1
- package/dist/constants.js +20 -16
- package/dist/constants.js.map +1 -1
- package/dist/formula/evaluator.js +34 -18
- package/dist/formula/evaluator.js.map +1 -1
- package/dist/formula/functions/__base.js +5 -1
- package/dist/formula/functions/__base.js.map +1 -1
- package/dist/formula/functions/__utils.js +29 -21
- package/dist/formula/functions/__utils.js.map +1 -1
- package/dist/formula/functions/abs.js +10 -6
- package/dist/formula/functions/abs.js.map +1 -1
- package/dist/formula/functions/abs.spec.js +11 -9
- package/dist/formula/functions/abs.spec.js.map +1 -1
- package/dist/formula/functions/acos.js +11 -7
- package/dist/formula/functions/acos.js.map +1 -1
- package/dist/formula/functions/add.js +20 -16
- package/dist/formula/functions/add.js.map +1 -1
- package/dist/formula/functions/and.js +8 -4
- package/dist/formula/functions/and.js.map +1 -1
- package/dist/formula/functions/asin.js +11 -7
- package/dist/formula/functions/asin.js.map +1 -1
- package/dist/formula/functions/atan.js +10 -6
- package/dist/formula/functions/atan.js.map +1 -1
- package/dist/formula/functions/atan2.js +10 -6
- package/dist/formula/functions/atan2.js.map +1 -1
- package/dist/formula/functions/average.js +14 -10
- package/dist/formula/functions/average.js.map +1 -1
- package/dist/formula/functions/col.js +8 -4
- package/dist/formula/functions/col.js.map +1 -1
- package/dist/formula/functions/concat.js +10 -6
- package/dist/formula/functions/concat.js.map +1 -1
- package/dist/formula/functions/concatenate.js +8 -4
- package/dist/formula/functions/concatenate.js.map +1 -1
- package/dist/formula/functions/cos.js +10 -6
- package/dist/formula/functions/cos.js.map +1 -1
- package/dist/formula/functions/count.js +12 -8
- package/dist/formula/functions/count.js.map +1 -1
- package/dist/formula/functions/counta.js +12 -8
- package/dist/formula/functions/counta.js.map +1 -1
- package/dist/formula/functions/countif.js +12 -8
- package/dist/formula/functions/countif.js.map +1 -1
- package/dist/formula/functions/divide.js +11 -7
- package/dist/formula/functions/divide.js.map +1 -1
- package/dist/formula/functions/eq.js +8 -4
- package/dist/formula/functions/eq.js.map +1 -1
- package/dist/formula/functions/exp.js +10 -6
- package/dist/formula/functions/exp.js.map +1 -1
- package/dist/formula/functions/gt.js +10 -6
- package/dist/formula/functions/gt.js.map +1 -1
- package/dist/formula/functions/gte.js +10 -6
- package/dist/formula/functions/gte.js.map +1 -1
- package/dist/formula/functions/hlookup.js +19 -15
- package/dist/formula/functions/hlookup.js.map +1 -1
- package/dist/formula/functions/if.js +10 -6
- package/dist/formula/functions/if.js.map +1 -1
- package/dist/formula/functions/iferror.js +10 -6
- package/dist/formula/functions/iferror.js.map +1 -1
- package/dist/formula/functions/iferror.spec.js +20 -18
- package/dist/formula/functions/iferror.spec.js.map +1 -1
- package/dist/formula/functions/len.js +10 -6
- package/dist/formula/functions/len.js.map +1 -1
- package/dist/formula/functions/lenb.js +10 -6
- package/dist/formula/functions/lenb.js.map +1 -1
- package/dist/formula/functions/ln.js +11 -7
- package/dist/formula/functions/ln.js.map +1 -1
- package/dist/formula/functions/log.js +12 -8
- package/dist/formula/functions/log.js.map +1 -1
- package/dist/formula/functions/log10.js +11 -7
- package/dist/formula/functions/log10.js.map +1 -1
- package/dist/formula/functions/lt.js +10 -6
- package/dist/formula/functions/lt.js.map +1 -1
- package/dist/formula/functions/lte.js +10 -6
- package/dist/formula/functions/lte.js.map +1 -1
- package/dist/formula/functions/max.js +14 -10
- package/dist/formula/functions/max.js.map +1 -1
- package/dist/formula/functions/min.js +14 -10
- package/dist/formula/functions/min.js.map +1 -1
- package/dist/formula/functions/minus.js +20 -16
- package/dist/formula/functions/minus.js.map +1 -1
- package/dist/formula/functions/mod.js +11 -7
- package/dist/formula/functions/mod.js.map +1 -1
- package/dist/formula/functions/mod.spec.js +17 -15
- package/dist/formula/functions/mod.spec.js.map +1 -1
- package/dist/formula/functions/multiply.js +10 -6
- package/dist/formula/functions/multiply.js.map +1 -1
- package/dist/formula/functions/ne.js +8 -4
- package/dist/formula/functions/ne.js.map +1 -1
- package/dist/formula/functions/not.js +10 -6
- package/dist/formula/functions/not.js.map +1 -1
- package/dist/formula/functions/now.js +8 -4
- package/dist/formula/functions/now.js.map +1 -1
- package/dist/formula/functions/or.js +8 -4
- package/dist/formula/functions/or.js.map +1 -1
- package/dist/formula/functions/pi.js +8 -4
- package/dist/formula/functions/pi.js.map +1 -1
- package/dist/formula/functions/power.js +10 -6
- package/dist/formula/functions/power.js.map +1 -1
- package/dist/formula/functions/product.js +12 -8
- package/dist/formula/functions/product.js.map +1 -1
- package/dist/formula/functions/radians.js +10 -6
- package/dist/formula/functions/radians.js.map +1 -1
- package/dist/formula/functions/rand.js +8 -4
- package/dist/formula/functions/rand.js.map +1 -1
- package/dist/formula/functions/round.js +10 -6
- package/dist/formula/functions/round.js.map +1 -1
- package/dist/formula/functions/rounddown.js +10 -6
- package/dist/formula/functions/rounddown.js.map +1 -1
- package/dist/formula/functions/roundup.js +10 -6
- package/dist/formula/functions/roundup.js.map +1 -1
- package/dist/formula/functions/row.js +8 -4
- package/dist/formula/functions/row.js.map +1 -1
- package/dist/formula/functions/sin.js +10 -6
- package/dist/formula/functions/sin.js.map +1 -1
- package/dist/formula/functions/sqrt.js +11 -7
- package/dist/formula/functions/sqrt.js.map +1 -1
- package/dist/formula/functions/sum.js +14 -10
- package/dist/formula/functions/sum.js.map +1 -1
- package/dist/formula/functions/sum.spec.js +15 -13
- package/dist/formula/functions/sum.spec.js.map +1 -1
- package/dist/formula/functions/sumif.js +18 -14
- package/dist/formula/functions/sumif.js.map +1 -1
- package/dist/formula/functions/tan.js +10 -6
- package/dist/formula/functions/tan.js.map +1 -1
- package/dist/formula/functions/uminus.js +10 -6
- package/dist/formula/functions/uminus.js.map +1 -1
- package/dist/formula/functions/vlookup.js +19 -15
- package/dist/formula/functions/vlookup.js.map +1 -1
- package/dist/formula/mapping.js +115 -112
- package/dist/formula/mapping.js.map +1 -1
- package/dist/formula/solver.js +20 -15
- package/dist/formula/solver.js.map +1 -1
- package/dist/index.js +31 -10
- package/dist/index.js.map +1 -1
- package/dist/lib/autofill.js +21 -17
- package/dist/lib/autofill.js.map +1 -1
- package/dist/lib/clipboard.js +9 -5
- package/dist/lib/clipboard.js.map +1 -1
- package/dist/lib/converters.js +24 -13
- package/dist/lib/converters.js.map +1 -1
- package/dist/lib/structs.js +67 -39
- package/dist/lib/structs.js.map +1 -1
- package/dist/lib/table.js +76 -72
- package/dist/lib/table.js.map +1 -1
- package/dist/lib/time.js +11 -7
- package/dist/lib/time.js.map +1 -1
- package/dist/lib/virtualization.js +26 -19
- package/dist/lib/virtualization.js.map +1 -1
- package/dist/parsers/core.js +12 -8
- package/dist/parsers/core.js.map +1 -1
- package/dist/renderers/checkbox.js +9 -3
- package/dist/renderers/checkbox.js.map +1 -1
- package/dist/renderers/core.js +20 -16
- package/dist/renderers/core.js.map +1 -1
- package/dist/renderers/thousand_separator.js +4 -1
- package/dist/renderers/thousand_separator.js.map +1 -1
- package/dist/store/actions.js +81 -76
- package/dist/store/actions.js.map +1 -1
- package/dist/store/helpers.js +11 -5
- package/dist/store/helpers.js.map +1 -1
- package/dist/store/index.js +28 -2
- package/dist/store/index.js.map +1 -1
- package/dist/styles/embedder.js +9 -5
- package/dist/styles/embedder.js.map +1 -1
- package/dist/styles/minified.js +5 -2
- package/dist/styles/minified.js.map +1 -1
- package/dist/types.js +2 -1
- package/dist/utils.js +5 -1
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SumFunction = void 0;
|
|
4
|
+
const solver_1 = require("../solver");
|
|
5
|
+
const table_1 = require("../../lib/table");
|
|
6
|
+
const __base_1 = require("./__base");
|
|
7
|
+
const __utils_1 = require("./__utils");
|
|
8
|
+
const evaluator_1 = require("../evaluator");
|
|
9
|
+
class SumFunction extends __base_1.BaseFunction {
|
|
7
10
|
constructor() {
|
|
8
11
|
super(...arguments);
|
|
9
12
|
this.example = "SUM(A2:A100, 101)";
|
|
@@ -20,17 +23,17 @@ export class SumFunction extends BaseFunction {
|
|
|
20
23
|
}
|
|
21
24
|
validate() {
|
|
22
25
|
if (this.bareArgs.length === 0) {
|
|
23
|
-
throw new FormulaError("#N/A", "One or more arguments are required.");
|
|
26
|
+
throw new evaluator_1.FormulaError("#N/A", "One or more arguments are required.");
|
|
24
27
|
}
|
|
25
28
|
const spreaded = [];
|
|
26
29
|
this.bareArgs.forEach((arg) => {
|
|
27
|
-
if (arg instanceof Table) {
|
|
28
|
-
spreaded.push(...solveTable({ table: arg })
|
|
30
|
+
if (arg instanceof table_1.Table) {
|
|
31
|
+
spreaded.push(...(0, solver_1.solveTable)({ table: arg })
|
|
29
32
|
.reduce((a, b) => a.concat(b))
|
|
30
33
|
.filter((v) => typeof v === "number"));
|
|
31
34
|
return;
|
|
32
35
|
}
|
|
33
|
-
spreaded.push(ensureNumber(arg));
|
|
36
|
+
spreaded.push((0, __utils_1.ensureNumber)(arg));
|
|
34
37
|
});
|
|
35
38
|
this.bareArgs = spreaded;
|
|
36
39
|
}
|
|
@@ -41,4 +44,5 @@ export class SumFunction extends BaseFunction {
|
|
|
41
44
|
return values.reduce((a, b) => a + b);
|
|
42
45
|
}
|
|
43
46
|
}
|
|
47
|
+
exports.SumFunction = SumFunction;
|
|
44
48
|
//# sourceMappingURL=sum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sum.js","sourceRoot":"","sources":["../../../src/formula/functions/sum.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"sum.js","sourceRoot":"","sources":["../../../src/formula/functions/sum.ts"],"names":[],"mappings":";;;AAAA,sCAAuC;AACvC,2CAAwC;AACxC,qCAAwC;AACxC,uCAAyC;AACzC,4CAA0C;AAE1C,MAAa,WAAY,SAAQ,qBAAY;IAA7C;;QACE,YAAO,GAAG,mBAAmB,CAAC;QAC9B,aAAQ,GAAG,CAAC,kDAAkD,CAAC,CAAC;QAChE,aAAQ,GAAG;YACT,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wBAAwB,EAAE;YACzD;gBACE,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;gBAC3C,QAAQ,EAAE,IAAI;gBACd,QAAQ,EAAE,IAAI;aACf;SACF,CAAC;IA8BJ,CAAC;IA5BW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CACpB,MAAM,EACN,qCAAqC,CACtC,CAAC;SACH;QACD,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC5B,IAAI,GAAG,YAAY,aAAK,EAAE;gBACxB,QAAQ,CAAC,IAAI,CACX,GAAG,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;qBAC1B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;qBAC7B,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAC7C,CAAC;gBACF,OAAO;aACR;YACD,QAAQ,CAAC,IAAI,CAAC,IAAA,sBAAY,EAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAES,IAAI,CAAC,GAAG,MAAgB;QAChC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACvB,OAAO,CAAC,CAAC;SACV;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACxC,CAAC;CACF;AAzCD,kCAyCC"}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sum_1 = require("./sum");
|
|
4
|
+
const table_1 = require("../../lib/table");
|
|
5
|
+
const evaluator_1 = require("../evaluator");
|
|
4
6
|
describe('sum', () => {
|
|
5
|
-
const table = new Table({
|
|
7
|
+
const table = new table_1.Table({
|
|
6
8
|
numRows: 100, numCols: 100,
|
|
7
9
|
cells: { A1: { value: 5 }, A2: { value: "=-(9 * 10) - 4" }, B50: { value: 25 }, C15: { value: "not a number" }, C20: { value: 10 } },
|
|
8
10
|
});
|
|
9
11
|
describe('normal', () => {
|
|
10
12
|
it('sum single values', () => {
|
|
11
|
-
const f = new SumFunction({
|
|
13
|
+
const f = new sum_1.SumFunction({
|
|
12
14
|
table,
|
|
13
15
|
args: [
|
|
14
|
-
new Ref("B50"),
|
|
15
|
-
new Value(5),
|
|
16
|
-
new Value(-3),
|
|
16
|
+
new evaluator_1.Ref("B50"),
|
|
17
|
+
new evaluator_1.Value(5),
|
|
18
|
+
new evaluator_1.Value(-3),
|
|
17
19
|
]
|
|
18
20
|
});
|
|
19
21
|
expect(f.call()).toBe(27);
|
|
20
22
|
});
|
|
21
23
|
it('sum range', () => {
|
|
22
|
-
const f = new SumFunction({
|
|
24
|
+
const f = new sum_1.SumFunction({
|
|
23
25
|
table,
|
|
24
26
|
args: [
|
|
25
|
-
new Range("A2:E20"),
|
|
26
|
-
new Value(30),
|
|
27
|
+
new evaluator_1.Range("A2:E20"),
|
|
28
|
+
new evaluator_1.Value(30),
|
|
27
29
|
]
|
|
28
30
|
});
|
|
29
31
|
// -90 - 4 + 10 + 30
|
|
@@ -32,8 +34,8 @@ describe('sum', () => {
|
|
|
32
34
|
});
|
|
33
35
|
describe('validation error', () => {
|
|
34
36
|
it('missing argument', () => {
|
|
35
|
-
const f = new SumFunction({ table, args: [] });
|
|
36
|
-
expect(f.call.bind(f)).toThrow(FormulaError);
|
|
37
|
+
const f = new sum_1.SumFunction({ table, args: [] });
|
|
38
|
+
expect(f.call.bind(f)).toThrow(evaluator_1.FormulaError);
|
|
37
39
|
});
|
|
38
40
|
});
|
|
39
41
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sum.spec.js","sourceRoot":"","sources":["../../../src/formula/functions/sum.spec.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sum.spec.js","sourceRoot":"","sources":["../../../src/formula/functions/sum.spec.ts"],"names":[],"mappings":";;AAAA,+BAAkC;AAClC,2CAAsC;AACtC,4CAA6D;AAE7D,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;IACnB,MAAM,KAAK,GAAG,IAAI,aAAK,CAAC;QACtB,OAAO,E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W,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC;YAC7C,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,wBAAY,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SumifFunction = void 0;
|
|
4
|
+
const evaluator_1 = require("../evaluator");
|
|
5
|
+
const solver_1 = require("../solver");
|
|
6
|
+
const table_1 = require("../../lib/table");
|
|
7
|
+
const __base_1 = require("./__base");
|
|
8
|
+
const __utils_1 = require("./__utils");
|
|
9
|
+
class SumifFunction extends __base_1.BaseFunction {
|
|
7
10
|
constructor() {
|
|
8
11
|
super(...arguments);
|
|
9
12
|
this.example = 'SUMIF(A1:A10,">20")';
|
|
@@ -23,17 +26,17 @@ export class SumifFunction extends BaseFunction {
|
|
|
23
26
|
}
|
|
24
27
|
validate() {
|
|
25
28
|
if (this.bareArgs.length !== 2 && this.bareArgs.length !== 3) {
|
|
26
|
-
throw new FormulaError("#N/A", "Number of arguments for SUMIF is incorrect.");
|
|
29
|
+
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for SUMIF is incorrect.");
|
|
27
30
|
}
|
|
28
|
-
if (this.bareArgs[2] != undefined && this.bareArgs[2] instanceof Table) {
|
|
29
|
-
throw new FormulaError("#N/A", "3rd argument must be range.");
|
|
31
|
+
if (this.bareArgs[2] != undefined && this.bareArgs[2] instanceof table_1.Table) {
|
|
32
|
+
throw new evaluator_1.FormulaError("#N/A", "3rd argument must be range.");
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
main(range, condition, sumRange) {
|
|
33
|
-
if (!(range instanceof Table)) {
|
|
34
|
-
return check(range, condition) ? range : 0;
|
|
36
|
+
if (!(range instanceof table_1.Table)) {
|
|
37
|
+
return (0, __utils_1.check)(range, condition) ? range : 0;
|
|
35
38
|
}
|
|
36
|
-
const conditionMatrix = solveTable({ table: range });
|
|
39
|
+
const conditionMatrix = (0, solver_1.solveTable)({ table: range });
|
|
37
40
|
let sumMatrix = conditionMatrix;
|
|
38
41
|
if (sumRange) {
|
|
39
42
|
const [top, left] = [sumRange.top, sumRange.left];
|
|
@@ -43,17 +46,18 @@ export class SumifFunction extends BaseFunction {
|
|
|
43
46
|
bottom: top + sumRange.getNumRows(),
|
|
44
47
|
right: left + sumRange.getNumCols(),
|
|
45
48
|
};
|
|
46
|
-
sumMatrix = solveTable({ table: this.table.trim(area) });
|
|
49
|
+
sumMatrix = (0, solver_1.solveTable)({ table: this.table.trim(area) });
|
|
47
50
|
}
|
|
48
51
|
let total = 0;
|
|
49
52
|
conditionMatrix.forEach((row, y) => row.forEach((c, x) => {
|
|
50
53
|
var _a;
|
|
51
54
|
const s = ((_a = sumMatrix[y]) === null || _a === void 0 ? void 0 : _a[x]) || 0;
|
|
52
|
-
if (typeof s === "number" && check(c, condition)) {
|
|
55
|
+
if (typeof s === "number" && (0, __utils_1.check)(c, condition)) {
|
|
53
56
|
total += s;
|
|
54
57
|
}
|
|
55
58
|
}));
|
|
56
59
|
return total;
|
|
57
60
|
}
|
|
58
61
|
}
|
|
62
|
+
exports.SumifFunction = SumifFunction;
|
|
59
63
|
//# sourceMappingURL=sumif.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sumif.js","sourceRoot":"","sources":["../../../src/formula/functions/sumif.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"sumif.js","sourceRoot":"","sources":["../../../src/formula/functions/sumif.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,sCAAuC;AACvC,2CAAwC;AACxC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C,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;YAClD,MAAM,IAAI,GAAa;gBACrB,GAAG;gBACH,IAAI;gBACJ,MAAM,EAAE,GAAG,GAAG,QAAQ,CAAC,UAAU,EAAE;gBACnC,KAAK,EAAE,IAAI,GAAG,QAAQ,CAAC,UAAU,EAAE;aACpC,CAAC;YACF,SAAS,GAAG,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SAC1D;QACD,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,eAAe,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CACjC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;;YACnB,MAAM,CAAC,GAAG,CAAA,MAAA,SAAS,CAAC,CAAC,CAAC,0CAAG,CAAC,CAAC,KAAI,CAAC,CAAC;YACjC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,IAAA,eAAK,EAAC,CAAC,EAAE,SAAS,CAAC,EAAE;gBAChD,KAAK,IAAI,CAAC,CAAC;aACZ;QACH,CAAC,CAAC,CACH,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAvDD,sCAuDC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TanFunction = void 0;
|
|
4
|
+
const evaluator_1 = require("../evaluator");
|
|
5
|
+
const __base_1 = require("./__base");
|
|
6
|
+
const __utils_1 = require("./__utils");
|
|
7
|
+
class TanFunction extends __base_1.BaseFunction {
|
|
5
8
|
constructor() {
|
|
6
9
|
super(...arguments);
|
|
7
10
|
this.example = "TAN(1)";
|
|
@@ -15,12 +18,13 @@ export class TanFunction extends BaseFunction {
|
|
|
15
18
|
}
|
|
16
19
|
validate() {
|
|
17
20
|
if (this.bareArgs.length !== 1) {
|
|
18
|
-
throw new FormulaError("#N/A", "Number of arguments for TAN is incorrect.");
|
|
21
|
+
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for TAN is incorrect.");
|
|
19
22
|
}
|
|
20
|
-
this.bareArgs = this.bareArgs.map((arg) => ensureNumber(arg));
|
|
23
|
+
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
21
24
|
}
|
|
22
25
|
main(angle) {
|
|
23
26
|
return Math.tan(angle);
|
|
24
27
|
}
|
|
25
28
|
}
|
|
29
|
+
exports.TanFunction = TanFunction;
|
|
26
30
|
//# sourceMappingURL=tan.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tan.js","sourceRoot":"","sources":["../../../src/formula/functions/tan.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"tan.js","sourceRoot":"","sources":["../../../src/formula/functions/tan.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AACxC,uCAAyC;AAEzC,MAAa,WAAY,SAAQ,qBAAY;IAA7C;;QACE,YAAO,GAAG,QAAQ,CAAC;QACnB,aAAQ,GAAG,CAAC,oDAAoD,CAAC,CAAC;QAClE,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,iDAAiD;aAC/D;SACF,CAAC;IAeJ,CAAC;IAbW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CACpB,MAAM,EACN,2CAA2C,CAC5C,CAAC;SACH;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,sBAAY,EAAC,GAAG,CAAC,CAAC,CAAC;IAChE,CAAC;IAES,IAAI,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;CACF;AAvBD,kCAuBC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UminusFunction = void 0;
|
|
4
|
+
const evaluator_1 = require("../evaluator");
|
|
5
|
+
const __base_1 = require("./__base");
|
|
6
|
+
const __utils_1 = require("./__utils");
|
|
7
|
+
class UminusFunction extends __base_1.BaseFunction {
|
|
5
8
|
constructor() {
|
|
6
9
|
super(...arguments);
|
|
7
10
|
this.example = "UMINUS(4)";
|
|
@@ -12,12 +15,13 @@ export class UminusFunction extends BaseFunction {
|
|
|
12
15
|
}
|
|
13
16
|
validate() {
|
|
14
17
|
if (this.bareArgs.length !== 1) {
|
|
15
|
-
throw new FormulaError("#N/A", "A single numerical value is only required.");
|
|
18
|
+
throw new evaluator_1.FormulaError("#N/A", "A single numerical value is only required.");
|
|
16
19
|
}
|
|
17
|
-
this.bareArgs = this.bareArgs.map((arg) => ensureNumber(arg));
|
|
20
|
+
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
18
21
|
}
|
|
19
22
|
main(v1) {
|
|
20
23
|
return -v1;
|
|
21
24
|
}
|
|
22
25
|
}
|
|
26
|
+
exports.UminusFunction = UminusFunction;
|
|
23
27
|
//# sourceMappingURL=uminus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uminus.js","sourceRoot":"","sources":["../../../src/formula/functions/uminus.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"uminus.js","sourceRoot":"","sources":["../../../src/formula/functions/uminus.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AACxC,uCAAyC;AAEzC,MAAa,cAAe,SAAQ,qBAAY;IAAhD;;QACE,YAAO,GAAG,WAAW,CAAC;QACtB,aAAQ,GAAG,CAAC,8DAA8D,CAAC,CAAC;QAC5E,aAAQ,GAAG;YACT,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mCAAmC,EAAE;SACrE,CAAC;IAeJ,CAAC;IAbW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CACpB,MAAM,EACN,4CAA4C,CAC7C,CAAC;SACH;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,sBAAY,EAAC,GAAG,CAAC,CAAC,CAAC;IAChE,CAAC;IAES,IAAI,CAAC,EAAU;QACvB,OAAO,CAAC,EAAE,CAAC;IACb,CAAC;CACF;AApBD,wCAoBC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VlookupFunction = void 0;
|
|
4
|
+
const evaluator_1 = require("../evaluator");
|
|
5
|
+
const solver_1 = require("../solver");
|
|
6
|
+
const table_1 = require("../../lib/table");
|
|
7
|
+
const __base_1 = require("./__base");
|
|
8
|
+
const __utils_1 = require("./__utils");
|
|
9
|
+
class VlookupFunction extends __base_1.BaseFunction {
|
|
7
10
|
constructor() {
|
|
8
11
|
super(...arguments);
|
|
9
12
|
this.example = "VLOOKUP(10003, A2:B26, 2, FALSE)";
|
|
@@ -29,20 +32,20 @@ export class VlookupFunction extends BaseFunction {
|
|
|
29
32
|
}
|
|
30
33
|
validate() {
|
|
31
34
|
if (this.bareArgs.length !== 3 && this.bareArgs.length !== 4) {
|
|
32
|
-
throw new FormulaError("#N/A", "Number of arguments for VLOOKUP is incorrect.");
|
|
35
|
+
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for VLOOKUP is incorrect.");
|
|
33
36
|
}
|
|
34
|
-
if (this.bareArgs[0] instanceof Table) {
|
|
35
|
-
this.bareArgs[0] = stripTable(this.bareArgs[0]);
|
|
37
|
+
if (this.bareArgs[0] instanceof table_1.Table) {
|
|
38
|
+
this.bareArgs[0] = (0, __utils_1.stripTable)(this.bareArgs[0]);
|
|
36
39
|
}
|
|
37
|
-
if (!(this.bareArgs[1] instanceof Table)) {
|
|
38
|
-
throw new FormulaError("#REF!", "2nd argument must be range");
|
|
40
|
+
if (!(this.bareArgs[1] instanceof table_1.Table)) {
|
|
41
|
+
throw new evaluator_1.FormulaError("#REF!", "2nd argument must be range");
|
|
39
42
|
}
|
|
40
|
-
this.bareArgs[2] = ensureNumber(this.bareArgs[2]);
|
|
41
|
-
this.bareArgs[3] = ensureBoolean(this.bareArgs[3], true);
|
|
43
|
+
this.bareArgs[2] = (0, __utils_1.ensureNumber)(this.bareArgs[2]);
|
|
44
|
+
this.bareArgs[3] = (0, __utils_1.ensureBoolean)(this.bareArgs[3], true);
|
|
42
45
|
}
|
|
43
46
|
main(key, range, index, isSorted) {
|
|
44
47
|
var _a, _b, _c, _d;
|
|
45
|
-
const matrix = solveTable({ table: range });
|
|
48
|
+
const matrix = (0, solver_1.solveTable)({ table: range });
|
|
46
49
|
if (isSorted) {
|
|
47
50
|
let last = -1;
|
|
48
51
|
for (let y = 0; y <= range.getNumRows(); y++) {
|
|
@@ -68,7 +71,8 @@ export class VlookupFunction extends BaseFunction {
|
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
|
-
throw new FormulaError("#N/A", `No values found for '${key}'.`);
|
|
74
|
+
throw new evaluator_1.FormulaError("#N/A", `No values found for '${key}'.`);
|
|
72
75
|
}
|
|
73
76
|
}
|
|
77
|
+
exports.VlookupFunction = VlookupFunction;
|
|
74
78
|
//# sourceMappingURL=vlookup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vlookup.js","sourceRoot":"","sources":["../../../src/formula/functions/vlookup.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"vlookup.js","sourceRoot":"","sources":["../../../src/formula/functions/vlookup.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,sCAAuC;AACvC,2CAAwC;AACxC,qCAAwC;AACxC,uCAAoE;AAEpE,MAAa,eAAgB,SAAQ,qBAAY;IAAjD;;QACE,YAAO,GAAG,kCAAkC,CAAC;QAC7C,aAAQ,GAAG;YACT,yIAAyI;SAC1I,CAAC;QACF,aAAQ,GAAG;YACT,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE;YAC3C;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,oBAAoB;aAClC;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,uCAAuC;aACrD;YACD;gBACE,IAAI,EAAE,WAAW;gBACjB,WAAW,EACT,qMAAqM;gBACvM,MAAM,EAAE,IAAI;aACb;SACF,CAAC;IA8CJ,CAAC;IA5CW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5D,MAAM,IAAI,wBAAY,CACpB,MAAM,EACN,+CAA+C,CAChD,CAAC;SACH;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,aAAK,EAAE;YACrC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAA,oBAAU,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;SACjD;QACD,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,aAAK,CAAC,EAAE;YACxC,MAAM,IAAI,wBAAY,CAAC,OAAO,EAAE,4BAA4B,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,CAAC,CAAC;iBAC/B;aACF;SACF;QACD,MAAM,IAAI,wBAAY,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC,CAAC;IAClE,CAAC;CACF;AAnED,0CAmEC"}
|
package/dist/formula/mapping.js
CHANGED
|
@@ -1,114 +1,117 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.functions = void 0;
|
|
4
|
+
const add_1 = require("./functions/add");
|
|
5
|
+
const minus_1 = require("./functions/minus");
|
|
6
|
+
const multiply_1 = require("./functions/multiply");
|
|
7
|
+
const divide_1 = require("./functions/divide");
|
|
8
|
+
const mod_1 = require("./functions/mod");
|
|
9
|
+
const sum_1 = require("./functions/sum");
|
|
10
|
+
const concat_1 = require("./functions/concat");
|
|
11
|
+
const concatenate_1 = require("./functions/concatenate");
|
|
12
|
+
const eq_1 = require("./functions/eq");
|
|
13
|
+
const ne_1 = require("./functions/ne");
|
|
14
|
+
const gt_1 = require("./functions/gt");
|
|
15
|
+
const gte_1 = require("./functions/gte");
|
|
16
|
+
const lt_1 = require("./functions/lt");
|
|
17
|
+
const lte_1 = require("./functions/lte");
|
|
18
|
+
const now_1 = require("./functions/now");
|
|
19
|
+
const and_1 = require("./functions/and");
|
|
20
|
+
const or_1 = require("./functions/or");
|
|
21
|
+
const if_1 = require("./functions/if");
|
|
22
|
+
const iferror_1 = require("./functions/iferror");
|
|
23
|
+
const not_1 = require("./functions/not");
|
|
24
|
+
const count_1 = require("./functions/count");
|
|
25
|
+
const countif_1 = require("./functions/countif");
|
|
26
|
+
const sumif_1 = require("./functions/sumif");
|
|
27
|
+
const vlookup_1 = require("./functions/vlookup");
|
|
28
|
+
const hlookup_1 = require("./functions/hlookup");
|
|
29
|
+
const log_1 = require("./functions/log");
|
|
30
|
+
const log10_1 = require("./functions/log10");
|
|
31
|
+
const ln_1 = require("./functions/ln");
|
|
32
|
+
const abs_1 = require("./functions/abs");
|
|
33
|
+
const product_1 = require("./functions/product");
|
|
34
|
+
const rand_1 = require("./functions/rand");
|
|
35
|
+
const pi_1 = require("./functions/pi");
|
|
36
|
+
const exp_1 = require("./functions/exp");
|
|
37
|
+
const radians_1 = require("./functions/radians");
|
|
38
|
+
const power_1 = require("./functions/power");
|
|
39
|
+
const sqrt_1 = require("./functions/sqrt");
|
|
40
|
+
const round_1 = require("./functions/round");
|
|
41
|
+
const roundup_1 = require("./functions/roundup");
|
|
42
|
+
const rounddown_1 = require("./functions/rounddown");
|
|
43
|
+
const sin_1 = require("./functions/sin");
|
|
44
|
+
const cos_1 = require("./functions/cos");
|
|
45
|
+
const tan_1 = require("./functions/tan");
|
|
46
|
+
const asin_1 = require("./functions/asin");
|
|
47
|
+
const acos_1 = require("./functions/acos");
|
|
48
|
+
const atan_1 = require("./functions/atan");
|
|
49
|
+
const atan2_1 = require("./functions/atan2");
|
|
50
|
+
const counta_1 = require("./functions/counta");
|
|
51
|
+
const average_1 = require("./functions/average");
|
|
52
|
+
const max_1 = require("./functions/max");
|
|
53
|
+
const min_1 = require("./functions/min");
|
|
54
|
+
const len_1 = require("./functions/len");
|
|
55
|
+
const lenb_1 = require("./functions/lenb");
|
|
56
|
+
const uminus_1 = require("./functions/uminus");
|
|
57
|
+
const row_1 = require("./functions/row");
|
|
58
|
+
const col_1 = require("./functions/col");
|
|
59
|
+
exports.functions = {
|
|
60
|
+
abs: abs_1.AbsFunction,
|
|
61
|
+
add: add_1.AddFunction,
|
|
62
|
+
divide: divide_1.DivideFunction,
|
|
63
|
+
mod: mod_1.ModFunction,
|
|
64
|
+
minus: minus_1.MinusFunction,
|
|
65
|
+
uminus: uminus_1.UminusFunction,
|
|
66
|
+
multiply: multiply_1.MultiplyFunction,
|
|
67
|
+
pow: power_1.PowerFunction,
|
|
68
|
+
power: power_1.PowerFunction,
|
|
69
|
+
sqrt: sqrt_1.SqrtFunction,
|
|
70
|
+
sum: sum_1.SumFunction,
|
|
71
|
+
sumif: sumif_1.SumifFunction,
|
|
72
|
+
max: max_1.MaxFunction,
|
|
73
|
+
min: min_1.MinFunction,
|
|
74
|
+
average: average_1.AverageFunction,
|
|
75
|
+
count: count_1.CountFunction,
|
|
76
|
+
counta: counta_1.CountaFunction,
|
|
77
|
+
countif: countif_1.CountifFunction,
|
|
78
|
+
product: product_1.ProductFunction,
|
|
79
|
+
concat: concat_1.ConcatFunction,
|
|
80
|
+
concatenate: concatenate_1.ConcatenateFunction,
|
|
81
|
+
eq: eq_1.EqFunction,
|
|
82
|
+
ne: ne_1.NeFunction,
|
|
83
|
+
gt: gt_1.GtFunction,
|
|
84
|
+
gte: gte_1.GteFunction,
|
|
85
|
+
lt: lt_1.LtFunction,
|
|
86
|
+
lte: lte_1.LteFunction,
|
|
87
|
+
and: and_1.AndFunction,
|
|
88
|
+
or: or_1.OrFunction,
|
|
89
|
+
round: round_1.RoundFunction,
|
|
90
|
+
rounddown: rounddown_1.RounddownFunction,
|
|
91
|
+
roundup: roundup_1.RoundupFunction,
|
|
92
|
+
if: if_1.IfFunction,
|
|
93
|
+
iferror: iferror_1.IfErrorFunction,
|
|
94
|
+
not: not_1.NotFunction,
|
|
95
|
+
vlookup: vlookup_1.VlookupFunction,
|
|
96
|
+
hlookup: hlookup_1.HlookupFunction,
|
|
97
|
+
row: row_1.RowFunction,
|
|
98
|
+
col: col_1.ColFunction,
|
|
99
|
+
now: now_1.NowFunction,
|
|
100
|
+
rand: rand_1.RandFunction,
|
|
101
|
+
log: log_1.LogFunction,
|
|
102
|
+
log10: log10_1.Log10Function,
|
|
103
|
+
ln: ln_1.LnFunction,
|
|
104
|
+
exp: exp_1.ExpFunction,
|
|
105
|
+
pi: pi_1.PiFunction,
|
|
106
|
+
radians: radians_1.RadiansFunction,
|
|
107
|
+
sin: sin_1.SinFunction,
|
|
108
|
+
cos: cos_1.CosFunction,
|
|
109
|
+
tan: tan_1.TanFunction,
|
|
110
|
+
asin: asin_1.AsinFunction,
|
|
111
|
+
acos: acos_1.AcosFunction,
|
|
112
|
+
atan: atan_1.AtanFunction,
|
|
113
|
+
atan2: atan2_1.Atan2Function,
|
|
114
|
+
len: len_1.LenFunction,
|
|
115
|
+
lenb: lenb_1.LenbFunction,
|
|
113
116
|
};
|
|
114
117
|
//# sourceMappingURL=mapping.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../src/formula/mapping.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"mapping.js","sourceRoot":"","sources":["../../src/formula/mapping.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAC9C,6CAAkD;AAClD,mDAAwD;AACxD,+CAAoD;AACpD,yCAA8C;AAC9C,yCAA8C;AAC9C,+CAAoD;AACpD,yDAA8D;AAC9D,uCAA4C;AAC5C,uCAA4C;AAC5C,uCAA4C;AAC5C,yCAA8C;AAC9C,uCAA4C;AAC5C,yCAA8C;AAC9C,yCAA8C;AAC9C,yCAA8C;AAC9C,uCAA4C;AAC5C,uCAA4C;AAC5C,iDAAsD;AACtD,yCAA8C;AAC9C,6CAAkD;AAClD,iDAAsD;AACtD,6CAAkD;AAClD,iDAAsD;AACtD,iDAAsD;AACtD,yCAA8C;AAC9C,6CAAkD;AAClD,uCAA4C;AAC5C,yCAA8C;AAC9C,iDAAsD;AACtD,2CAAgD;AAChD,uCAA4C;AAC5C,yCAA8C;AAC9C,iDAAsD;AACtD,6CAAkD;AAClD,2CAAgD;AAChD,6CAAkD;AAClD,iDAAsD;AACtD,qDAA0D;AAC1D,yCAA8C;AAC9C,yCAA8C;AAC9C,yCAA8C;AAC9C,2CAAgD;AAChD,2CAAgD;AAChD,2CAAgD;AAChD,6CAAkD;AAClD,+CAAoD;AACpD,iDAAsD;AACtD,yCAA8C;AAC9C,yCAA8C;AAC9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