@gridsheet/react-core 0.12.4-rc.0 → 0.12.4
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.d.ts.map +1 -1
- package/dist/components/Cell.js +181 -190
- package/dist/components/Cell.js.map +1 -1
- package/dist/components/ContextMenu.js +198 -208
- package/dist/components/ContextMenu.js.map +1 -1
- package/dist/components/Editor.d.ts.map +1 -1
- package/dist/components/Editor.js +262 -275
- package/dist/components/Editor.js.map +1 -1
- package/dist/components/Emitter.js +29 -39
- package/dist/components/Emitter.js.map +1 -1
- package/dist/components/GridSheet.d.ts.map +1 -1
- package/dist/components/GridSheet.js +109 -119
- package/dist/components/GridSheet.js.map +1 -1
- package/dist/components/HeaderLeftCell.js +61 -72
- package/dist/components/HeaderLeftCell.js.map +1 -1
- package/dist/components/HeaderTopCell.js +62 -73
- package/dist/components/HeaderTopCell.js.map +1 -1
- package/dist/components/Resizer.d.ts.map +1 -1
- package/dist/components/Resizer.js +79 -87
- package/dist/components/Resizer.js.map +1 -1
- package/dist/components/SearchBox.d.ts.map +1 -1
- package/dist/components/SearchBox.js +54 -62
- package/dist/components/SearchBox.js.map +1 -1
- package/dist/components/StoreInitializer.js +71 -81
- package/dist/components/StoreInitializer.js.map +1 -1
- package/dist/components/Tabular.d.ts +2 -2
- package/dist/components/Tabular.d.ts.map +1 -1
- package/dist/components/Tabular.js +85 -95
- package/dist/components/Tabular.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +26 -33
- package/dist/constants.js.map +1 -1
- package/dist/formula/evaluator.d.ts +1 -1
- package/dist/formula/evaluator.js +490 -500
- package/dist/formula/evaluator.js.map +1 -1
- package/dist/formula/functions/__base.js +17 -27
- package/dist/formula/functions/__base.js.map +1 -1
- package/dist/formula/functions/__utils.js +103 -113
- package/dist/formula/functions/__utils.js.map +1 -1
- package/dist/formula/functions/abs.js +21 -31
- package/dist/formula/functions/abs.js.map +1 -1
- package/dist/formula/functions/abs.spec.js +25 -35
- package/dist/formula/functions/abs.spec.js.map +1 -1
- package/dist/formula/functions/acos.js +28 -38
- package/dist/formula/functions/acos.js.map +1 -1
- package/dist/formula/functions/add.js +47 -57
- package/dist/formula/functions/add.js.map +1 -1
- package/dist/formula/functions/and.js +28 -38
- package/dist/formula/functions/and.js.map +1 -1
- package/dist/formula/functions/asin.js +28 -38
- package/dist/formula/functions/asin.js.map +1 -1
- package/dist/formula/functions/atan.js +26 -36
- package/dist/formula/functions/atan.js.map +1 -1
- package/dist/formula/functions/atan2.js +32 -42
- package/dist/formula/functions/atan2.js.map +1 -1
- package/dist/formula/functions/average.js +40 -50
- package/dist/formula/functions/average.js.map +1 -1
- package/dist/formula/functions/col.js +28 -38
- package/dist/formula/functions/col.js.map +1 -1
- package/dist/formula/functions/concat.js +27 -37
- package/dist/formula/functions/concat.js.map +1 -1
- package/dist/formula/functions/concatenate.js +25 -35
- package/dist/formula/functions/concatenate.js.map +1 -1
- package/dist/formula/functions/cos.js +26 -36
- package/dist/formula/functions/cos.js.map +1 -1
- package/dist/formula/functions/count.js +35 -45
- package/dist/formula/functions/count.js.map +1 -1
- package/dist/formula/functions/counta.js +35 -45
- package/dist/formula/functions/counta.js.map +1 -1
- package/dist/formula/functions/countif.js +30 -40
- package/dist/formula/functions/countif.js.map +1 -1
- package/dist/formula/functions/divide.js +32 -42
- package/dist/formula/functions/divide.js.map +1 -1
- package/dist/formula/functions/eq.js +25 -35
- package/dist/formula/functions/eq.js.map +1 -1
- package/dist/formula/functions/exp.js +28 -38
- package/dist/formula/functions/exp.js.map +1 -1
- package/dist/formula/functions/gt.js +27 -37
- package/dist/formula/functions/gt.js.map +1 -1
- package/dist/formula/functions/gte.js +27 -37
- package/dist/formula/functions/gte.js.map +1 -1
- package/dist/formula/functions/hlookup.js +67 -77
- package/dist/formula/functions/hlookup.js.map +1 -1
- package/dist/formula/functions/if.js +36 -46
- package/dist/formula/functions/if.js.map +1 -1
- package/dist/formula/functions/iferror.js +38 -48
- package/dist/formula/functions/iferror.js.map +1 -1
- package/dist/formula/functions/iferror.spec.js +53 -63
- package/dist/formula/functions/iferror.spec.js.map +1 -1
- package/dist/formula/functions/len.js +26 -36
- package/dist/formula/functions/len.js.map +1 -1
- package/dist/formula/functions/lenb.js +26 -36
- package/dist/formula/functions/lenb.js.map +1 -1
- package/dist/formula/functions/ln.js +28 -38
- package/dist/formula/functions/ln.js.map +1 -1
- package/dist/formula/functions/log.js +33 -43
- package/dist/formula/functions/log.js.map +1 -1
- package/dist/formula/functions/log10.js +28 -38
- package/dist/formula/functions/log10.js.map +1 -1
- package/dist/formula/functions/lt.js +27 -37
- package/dist/formula/functions/lt.js.map +1 -1
- package/dist/formula/functions/lte.js +27 -37
- package/dist/formula/functions/lte.js.map +1 -1
- package/dist/formula/functions/max.js +42 -52
- package/dist/formula/functions/max.js.map +1 -1
- package/dist/formula/functions/min.js +42 -52
- package/dist/formula/functions/min.js.map +1 -1
- package/dist/formula/functions/minus.js +47 -57
- package/dist/formula/functions/minus.js.map +1 -1
- package/dist/formula/functions/mod.js +30 -40
- package/dist/formula/functions/mod.js.map +1 -1
- package/dist/formula/functions/mod.spec.js +47 -57
- package/dist/formula/functions/mod.spec.js.map +1 -1
- package/dist/formula/functions/multiply.js +27 -37
- package/dist/formula/functions/multiply.js.map +1 -1
- package/dist/formula/functions/ne.js +25 -35
- package/dist/formula/functions/ne.js.map +1 -1
- package/dist/formula/functions/not.js +30 -40
- package/dist/formula/functions/not.js.map +1 -1
- package/dist/formula/functions/now.js +21 -31
- package/dist/formula/functions/now.js.map +1 -1
- package/dist/formula/functions/or.js +28 -38
- package/dist/formula/functions/or.js.map +1 -1
- package/dist/formula/functions/pi.js +19 -29
- package/dist/formula/functions/pi.js.map +1 -1
- package/dist/formula/functions/power.js +24 -34
- package/dist/formula/functions/power.js.map +1 -1
- package/dist/formula/functions/product.js +37 -47
- package/dist/formula/functions/product.js.map +1 -1
- package/dist/formula/functions/radians.js +26 -36
- package/dist/formula/functions/radians.js.map +1 -1
- package/dist/formula/functions/rand.js +19 -29
- package/dist/formula/functions/rand.js.map +1 -1
- package/dist/formula/functions/round.js +34 -44
- package/dist/formula/functions/round.js.map +1 -1
- package/dist/formula/functions/rounddown.js +34 -44
- package/dist/formula/functions/rounddown.js.map +1 -1
- package/dist/formula/functions/roundup.js +34 -44
- package/dist/formula/functions/roundup.js.map +1 -1
- package/dist/formula/functions/row.js +28 -38
- package/dist/formula/functions/row.js.map +1 -1
- package/dist/formula/functions/sin.js +26 -36
- package/dist/formula/functions/sin.js.map +1 -1
- package/dist/formula/functions/sqrt.js +28 -38
- package/dist/formula/functions/sqrt.js.map +1 -1
- package/dist/formula/functions/sum.js +42 -52
- package/dist/formula/functions/sum.js.map +1 -1
- package/dist/formula/functions/sum.spec.js +35 -45
- package/dist/formula/functions/sum.spec.js.map +1 -1
- package/dist/formula/functions/sumif.js +56 -66
- package/dist/formula/functions/sumif.js.map +1 -1
- package/dist/formula/functions/tan.js +26 -36
- package/dist/formula/functions/tan.js.map +1 -1
- package/dist/formula/functions/uminus.js +23 -33
- package/dist/formula/functions/uminus.js.map +1 -1
- package/dist/formula/functions/vlookup.js +67 -77
- package/dist/formula/functions/vlookup.js.map +1 -1
- package/dist/formula/mapping.js +116 -126
- package/dist/formula/mapping.js.map +1 -1
- package/dist/formula/solver.js +61 -71
- package/dist/formula/solver.js.map +1 -1
- package/dist/index.js +31 -41
- package/dist/index.js.map +1 -1
- package/dist/lib/autofill.js +334 -344
- package/dist/lib/autofill.js.map +1 -1
- package/dist/lib/clipboard.js +45 -55
- package/dist/lib/clipboard.js.map +1 -1
- package/dist/lib/converters.js +130 -140
- package/dist/lib/converters.js.map +1 -1
- package/dist/lib/hooks.d.ts +1 -0
- package/dist/lib/hooks.d.ts.map +1 -0
- package/dist/lib/hooks.js +2 -0
- package/dist/lib/hooks.js.map +1 -0
- package/dist/lib/structs.js +254 -264
- package/dist/lib/structs.js.map +1 -1
- package/dist/lib/table.d.ts +1 -3
- package/dist/lib/table.d.ts.map +1 -1
- package/dist/lib/table.js +897 -911
- package/dist/lib/table.js.map +1 -1
- package/dist/lib/time.d.ts.map +1 -1
- package/dist/lib/time.js +59 -69
- package/dist/lib/time.js.map +1 -1
- package/dist/lib/virtualization.d.ts +3 -12
- package/dist/lib/virtualization.d.ts.map +1 -1
- package/dist/lib/virtualization.js +116 -120
- package/dist/lib/virtualization.js.map +1 -1
- package/dist/parsers/core.js +109 -119
- package/dist/parsers/core.js.map +1 -1
- package/dist/renderers/checkbox.js +11 -21
- package/dist/renderers/checkbox.js.map +1 -1
- package/dist/renderers/core.d.ts +1 -1
- package/dist/renderers/core.d.ts.map +1 -1
- package/dist/renderers/core.js +129 -139
- package/dist/renderers/core.js.map +1 -1
- package/dist/renderers/thousand_separator.js +15 -25
- package/dist/renderers/thousand_separator.js.map +1 -1
- package/dist/store/actions.js +485 -495
- package/dist/store/actions.js.map +1 -1
- package/dist/store/helpers.js +78 -88
- package/dist/store/helpers.js.map +1 -1
- package/dist/store/index.js +5 -15
- package/dist/store/index.js.map +1 -1
- package/dist/styles/embedder.js +17 -27
- package/dist/styles/embedder.js.map +1 -1
- package/dist/styles/minified.js +6 -16
- package/dist/styles/minified.js.map +1 -1
- package/dist/types.d.ts +10 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -12
- package/dist/utils.js +9 -19
- package/dist/utils.js.map +1 -1
- package/package.json +9 -2
|
@@ -1,45 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModFunction = void 0;
|
|
4
|
+
const evaluator_1 = require("../evaluator");
|
|
5
|
+
const __base_1 = require("./__base");
|
|
6
|
+
const __utils_1 = require("./__utils");
|
|
7
|
+
class ModFunction extends __base_1.BaseFunction {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.example = "MOD(10, 4)";
|
|
11
|
+
this.helpText = ["Returns the result of the modulo operation."];
|
|
12
|
+
this.helpArgs = [
|
|
13
|
+
{
|
|
14
|
+
name: "dividend",
|
|
15
|
+
description: "A number that will be divided by divisor.",
|
|
16
|
+
},
|
|
17
|
+
{ name: "divisor", description: "A number that will divide a dividend." },
|
|
18
|
+
];
|
|
5
19
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ModFunction = void 0;
|
|
13
|
-
const evaluator_1 = require("../evaluator");
|
|
14
|
-
const __base_1 = require("./__base");
|
|
15
|
-
const __utils_1 = require("./__utils");
|
|
16
|
-
class ModFunction extends __base_1.BaseFunction {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.example = "MOD(10, 4)";
|
|
20
|
-
this.helpText = ["Returns the result of the modulo operation."];
|
|
21
|
-
this.helpArgs = [
|
|
22
|
-
{
|
|
23
|
-
name: "dividend",
|
|
24
|
-
description: "A number that will be divided by divisor.",
|
|
25
|
-
},
|
|
26
|
-
{ name: "divisor", description: "A number that will divide a dividend." },
|
|
27
|
-
];
|
|
28
|
-
}
|
|
29
|
-
validate() {
|
|
30
|
-
if (this.bareArgs.length !== 2) {
|
|
31
|
-
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for MOD is incorrect.");
|
|
32
|
-
}
|
|
33
|
-
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
34
|
-
if (this.bareArgs[1] === 0) {
|
|
35
|
-
throw new evaluator_1.FormulaError("#DIV/0!", "The second argument must be non-zero.");
|
|
36
|
-
}
|
|
20
|
+
validate() {
|
|
21
|
+
if (this.bareArgs.length !== 2) {
|
|
22
|
+
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for MOD is incorrect.");
|
|
37
23
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
24
|
+
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
25
|
+
if (this.bareArgs[1] === 0) {
|
|
26
|
+
throw new evaluator_1.FormulaError("#DIV/0!", "The second argument must be non-zero.");
|
|
41
27
|
}
|
|
42
28
|
}
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
main(v1, v2) {
|
|
30
|
+
// https://stackoverflow.com/questions/4467539/javascript-modulo-gives-a-negative-result-for-negative-numbers
|
|
31
|
+
return ((v1 % v2) + v2) % v2;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ModFunction = ModFunction;
|
|
45
35
|
//# sourceMappingURL=mod.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../../../src/formula/functions/mod.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../../../src/formula/functions/mod.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AACxC,uCAAyC;AAEzC,MAAa,WAAY,SAAQ,qBAAY;IAA7C;;QACE,YAAO,GAAG,YAAY,CAAC;QACvB,aAAQ,GAAG,CAAC,6CAA6C,CAAC,CAAC;QAC3D,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,2CAA2C;aACzD;YACD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,uCAAuC,EAAE;SAC1E,CAAC;IAsBJ,CAAC;IApBW,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;QAC9D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;YAC1B,MAAM,IAAI,wBAAY,CACpB,SAAS,EACT,uCAAuC,CACxC,CAAC;SACH;IACH,CAAC;IAES,IAAI,CAAC,EAAU,EAAE,EAAU;QACnC,6GAA6G;QAC7G,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;IAC/B,CAAC;CACF;AA/BD,kCA+BC"}
|
|
@@ -1,63 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mod_1 = require("./mod");
|
|
4
|
+
const table_1 = require("../../lib/table");
|
|
5
|
+
const evaluator_1 = require("../evaluator");
|
|
6
|
+
describe('mod', () => {
|
|
7
|
+
const table = new table_1.Table({
|
|
8
|
+
numRows: 2, numCols: 2,
|
|
9
|
+
cells: { A1: { value: 5 }, A2: { value: -3 }, B2: { value: 25 } },
|
|
10
|
+
});
|
|
11
|
+
describe('normal', () => {
|
|
12
|
+
it('divided by positive value', () => {
|
|
13
|
+
{
|
|
14
|
+
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Ref("B2"), new evaluator_1.Value(5)] });
|
|
15
|
+
expect(f.call()).toBe(0);
|
|
16
|
+
}
|
|
17
|
+
{
|
|
18
|
+
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(12), new evaluator_1.Ref("A1")] });
|
|
19
|
+
expect(f.call()).toBe(2);
|
|
20
|
+
}
|
|
21
|
+
{
|
|
22
|
+
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(-5), new evaluator_1.Value(4)] });
|
|
23
|
+
expect(f.call()).toBe(3);
|
|
24
|
+
}
|
|
19
25
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
{
|
|
31
|
-
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(-5), new evaluator_1.Value(4)] });
|
|
32
|
-
expect(f.call()).toBe(3);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
it('divided by negative value', () => {
|
|
36
|
-
{
|
|
37
|
-
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(10), new evaluator_1.Ref('A2')] });
|
|
38
|
-
expect(f.call()).toBe(-2);
|
|
39
|
-
}
|
|
40
|
-
{
|
|
41
|
-
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(-10), new evaluator_1.Ref('A2')] });
|
|
42
|
-
expect(f.call()).toBe(-1);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
26
|
+
it('divided by negative value', () => {
|
|
27
|
+
{
|
|
28
|
+
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(10), new evaluator_1.Ref('A2')] });
|
|
29
|
+
expect(f.call()).toBe(-2);
|
|
30
|
+
}
|
|
31
|
+
{
|
|
32
|
+
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(-10), new evaluator_1.Ref('A2')] });
|
|
33
|
+
expect(f.call()).toBe(-1);
|
|
34
|
+
}
|
|
45
35
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
{
|
|
53
|
-
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(3)] });
|
|
54
|
-
expect(f.call.bind(f)).toThrow(evaluator_1.FormulaError);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
it('division by zero', () => {
|
|
58
|
-
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(5), new evaluator_1.Value(0)] });
|
|
36
|
+
});
|
|
37
|
+
describe('validation error', () => {
|
|
38
|
+
it('missing argument', () => {
|
|
39
|
+
{
|
|
40
|
+
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(3)] });
|
|
59
41
|
expect(f.call.bind(f)).toThrow(evaluator_1.FormulaError);
|
|
60
|
-
}
|
|
42
|
+
}
|
|
43
|
+
{
|
|
44
|
+
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(3)] });
|
|
45
|
+
expect(f.call.bind(f)).toThrow(evaluator_1.FormulaError);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
it('division by zero', () => {
|
|
49
|
+
const f = new mod_1.ModFunction({ table, args: [new evaluator_1.Value(5), new evaluator_1.Value(0)] });
|
|
50
|
+
expect(f.call.bind(f)).toThrow(evaluator_1.FormulaError);
|
|
61
51
|
});
|
|
62
52
|
});
|
|
63
53
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.spec.js","sourceRoot":"","sources":["../../../src/formula/functions/mod.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mod.spec.js","sourceRoot":"","sources":["../../../src/formula/functions/mod.spec.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,41 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MultiplyFunction = void 0;
|
|
4
|
+
const evaluator_1 = require("../evaluator");
|
|
5
|
+
const __base_1 = require("./__base");
|
|
6
|
+
const __utils_1 = require("./__utils");
|
|
7
|
+
class MultiplyFunction extends __base_1.BaseFunction {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.example = "MULTIPLY(6, 7)";
|
|
11
|
+
this.helpText = [
|
|
12
|
+
"Returns the product of two numbers.",
|
|
13
|
+
"This is the same as the '*' operator.",
|
|
14
|
+
];
|
|
15
|
+
this.helpArgs = [
|
|
16
|
+
{ name: "factor1", description: "First factor." },
|
|
17
|
+
{ name: "factor2", description: "Second factor." },
|
|
18
|
+
];
|
|
5
19
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MultiplyFunction = void 0;
|
|
13
|
-
const evaluator_1 = require("../evaluator");
|
|
14
|
-
const __base_1 = require("./__base");
|
|
15
|
-
const __utils_1 = require("./__utils");
|
|
16
|
-
class MultiplyFunction extends __base_1.BaseFunction {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.example = "MULTIPLY(6, 7)";
|
|
20
|
-
this.helpText = [
|
|
21
|
-
"Returns the product of two numbers.",
|
|
22
|
-
"This is the same as the '*' operator.",
|
|
23
|
-
];
|
|
24
|
-
this.helpArgs = [
|
|
25
|
-
{ name: "factor1", description: "First factor." },
|
|
26
|
-
{ name: "factor2", description: "Second factor." },
|
|
27
|
-
];
|
|
28
|
-
}
|
|
29
|
-
validate() {
|
|
30
|
-
if (this.bareArgs.length !== 2) {
|
|
31
|
-
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for MULTIPLY is incorrect.");
|
|
32
|
-
}
|
|
33
|
-
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
34
|
-
}
|
|
35
|
-
main(v1, v2) {
|
|
36
|
-
return v1 * v2;
|
|
20
|
+
validate() {
|
|
21
|
+
if (this.bareArgs.length !== 2) {
|
|
22
|
+
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for MULTIPLY is incorrect.");
|
|
37
23
|
}
|
|
24
|
+
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
25
|
+
}
|
|
26
|
+
main(v1, v2) {
|
|
27
|
+
return v1 * v2;
|
|
38
28
|
}
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
}
|
|
30
|
+
exports.MultiplyFunction = MultiplyFunction;
|
|
41
31
|
//# sourceMappingURL=multiply.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiply.js","sourceRoot":"","sources":["../../../src/formula/functions/multiply.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"multiply.js","sourceRoot":"","sources":["../../../src/formula/functions/multiply.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AACxC,uCAAyC;AAEzC,MAAa,gBAAiB,SAAQ,qBAAY;IAAlD;;QACE,YAAO,GAAG,gBAAgB,CAAC;QAC3B,aAAQ,GAAG;YACT,qCAAqC;YACrC,uCAAuC;SACxC,CAAC;QACF,aAAQ,GAAG;YACT,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE;YACjD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE;SACnD,CAAC;IAeJ,CAAC;IAbW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CACpB,MAAM,EACN,gDAAgD,CACjD,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,EAAE,EAAU;QACnC,OAAO,EAAE,GAAG,EAAE,CAAC;IACjB,CAAC;CACF;AAxBD,4CAwBC"}
|
|
@@ -1,39 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NeFunction = void 0;
|
|
4
|
+
const evaluator_1 = require("../evaluator");
|
|
5
|
+
const __base_1 = require("./__base");
|
|
6
|
+
class NeFunction extends __base_1.BaseFunction {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.example = "NE(6, 7)";
|
|
10
|
+
this.helpText = [
|
|
11
|
+
"Returns TRUE if the two specified values are not equal, FALSE if they are.",
|
|
12
|
+
"This is the same as the '<>' operator.",
|
|
13
|
+
];
|
|
14
|
+
this.helpArgs = [
|
|
15
|
+
{ name: "value1", description: "First value." },
|
|
16
|
+
{ name: "value2", description: "A value to be compared with value1." },
|
|
17
|
+
];
|
|
5
18
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.NeFunction = void 0;
|
|
13
|
-
const evaluator_1 = require("../evaluator");
|
|
14
|
-
const __base_1 = require("./__base");
|
|
15
|
-
class NeFunction extends __base_1.BaseFunction {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.example = "NE(6, 7)";
|
|
19
|
-
this.helpText = [
|
|
20
|
-
"Returns TRUE if the two specified values are not equal, FALSE if they are.",
|
|
21
|
-
"This is the same as the '<>' operator.",
|
|
22
|
-
];
|
|
23
|
-
this.helpArgs = [
|
|
24
|
-
{ name: "value1", description: "First value." },
|
|
25
|
-
{ name: "value2", description: "A value to be compared with value1." },
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
validate() {
|
|
29
|
-
if (this.bareArgs.length !== 2) {
|
|
30
|
-
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for NE is incorrect.");
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
main(v1, v2) {
|
|
34
|
-
return v1 !== v2;
|
|
19
|
+
validate() {
|
|
20
|
+
if (this.bareArgs.length !== 2) {
|
|
21
|
+
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for NE is incorrect.");
|
|
35
22
|
}
|
|
36
23
|
}
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
main(v1, v2) {
|
|
25
|
+
return v1 !== v2;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.NeFunction = NeFunction;
|
|
39
29
|
//# sourceMappingURL=ne.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ne.js","sourceRoot":"","sources":["../../../src/formula/functions/ne.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ne.js","sourceRoot":"","sources":["../../../src/formula/functions/ne.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AAExC,MAAa,UAAW,SAAQ,qBAAY;IAA5C;;QACE,YAAO,GAAG,UAAU,CAAC;QACrB,aAAQ,GAAG;YACT,4EAA4E;YAC5E,wCAAwC;SACzC,CAAC;QACF,aAAQ,GAAG;YACT,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE;YAC/C,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qCAAqC,EAAE;SACvE,CAAC;IAcJ,CAAC;IAZW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CACpB,MAAM,EACN,0CAA0C,CAC3C,CAAC;SACH;IACH,CAAC;IAES,IAAI,CAAC,EAAU,EAAE,EAAU;QACnC,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;CACF;AAvBD,gCAuBC"}
|
|
@@ -1,44 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotFunction = void 0;
|
|
4
|
+
const evaluator_1 = require("../evaluator");
|
|
5
|
+
const __base_1 = require("./__base");
|
|
6
|
+
const __utils_1 = require("./__utils");
|
|
7
|
+
class NotFunction extends __base_1.BaseFunction {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.example = "NOT(TRUE)";
|
|
11
|
+
this.helpText = [
|
|
12
|
+
"Returns the inverse of the Boolean; if TRUE, NOT returns FALSE.",
|
|
13
|
+
"If FALSE, NOT returns TRUE.",
|
|
14
|
+
];
|
|
15
|
+
this.helpArgs = [
|
|
16
|
+
{
|
|
17
|
+
name: "logical expression",
|
|
18
|
+
description: "A logical expression as a boolean.",
|
|
19
|
+
},
|
|
20
|
+
];
|
|
5
21
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.NotFunction = void 0;
|
|
13
|
-
const evaluator_1 = require("../evaluator");
|
|
14
|
-
const __base_1 = require("./__base");
|
|
15
|
-
const __utils_1 = require("./__utils");
|
|
16
|
-
class NotFunction extends __base_1.BaseFunction {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.example = "NOT(TRUE)";
|
|
20
|
-
this.helpText = [
|
|
21
|
-
"Returns the inverse of the Boolean; if TRUE, NOT returns FALSE.",
|
|
22
|
-
"If FALSE, NOT returns TRUE.",
|
|
23
|
-
];
|
|
24
|
-
this.helpArgs = [
|
|
25
|
-
{
|
|
26
|
-
name: "logical expression",
|
|
27
|
-
description: "A logical expression as a boolean.",
|
|
28
|
-
},
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
validate() {
|
|
32
|
-
if (this.bareArgs.length === 1) {
|
|
33
|
-
this.bareArgs[0] = (0, __utils_1.ensureBoolean)(this.bareArgs[0]);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for NOT is incorrect. 1 argument must be specified.");
|
|
37
|
-
}
|
|
38
|
-
main(v1) {
|
|
39
|
-
return !v1;
|
|
22
|
+
validate() {
|
|
23
|
+
if (this.bareArgs.length === 1) {
|
|
24
|
+
this.bareArgs[0] = (0, __utils_1.ensureBoolean)(this.bareArgs[0]);
|
|
25
|
+
return;
|
|
40
26
|
}
|
|
27
|
+
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for NOT is incorrect. 1 argument must be specified.");
|
|
28
|
+
}
|
|
29
|
+
main(v1) {
|
|
30
|
+
return !v1;
|
|
41
31
|
}
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
}
|
|
33
|
+
exports.NotFunction = NotFunction;
|
|
44
34
|
//# sourceMappingURL=not.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not.js","sourceRoot":"","sources":["../../../src/formula/functions/not.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"not.js","sourceRoot":"","sources":["../../../src/formula/functions/not.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AACxC,uCAA0C;AAE1C,MAAa,WAAY,SAAQ,qBAAY;IAA7C;;QACE,YAAO,GAAG,WAAW,CAAC;QACtB,aAAQ,GAAG;YACT,iEAAiE;YACjE,6BAA6B;SAC9B,CAAC;QACF,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EAAE,oCAAoC;aAClD;SACF,CAAC;IAgBJ,CAAC;IAdW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAA,uBAAa,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;YACnD,OAAO;SACR;QACD,MAAM,IAAI,wBAAY,CACpB,MAAM,EACN,yEAAyE,CAC1E,CAAC;IACJ,CAAC;IAES,IAAI,CAAC,EAAW;QACxB,OAAO,CAAC,EAAE,CAAC;IACb,CAAC;CACF;AA3BD,kCA2BC"}
|
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NowFunction = void 0;
|
|
4
|
+
const evaluator_1 = require("../evaluator");
|
|
5
|
+
const __base_1 = require("./__base");
|
|
6
|
+
class NowFunction extends __base_1.BaseFunction {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.example = "NOW()";
|
|
10
|
+
this.helpText = [
|
|
11
|
+
"Returns a serial value corresponding to the current date and time.",
|
|
12
|
+
];
|
|
13
|
+
this.helpArgs = [];
|
|
5
14
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})(function (require, exports) {
|
|
10
|
-
"use strict";
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.NowFunction = void 0;
|
|
13
|
-
const evaluator_1 = require("../evaluator");
|
|
14
|
-
const __base_1 = require("./__base");
|
|
15
|
-
class NowFunction extends __base_1.BaseFunction {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.example = "NOW()";
|
|
19
|
-
this.helpText = [
|
|
20
|
-
"Returns a serial value corresponding to the current date and time.",
|
|
21
|
-
];
|
|
22
|
-
this.helpArgs = [];
|
|
23
|
-
}
|
|
24
|
-
validate() {
|
|
25
|
-
if (this.bareArgs.length !== 0) {
|
|
26
|
-
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for NOW is incorrect.");
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
main() {
|
|
30
|
-
return new Date();
|
|
15
|
+
validate() {
|
|
16
|
+
if (this.bareArgs.length !== 0) {
|
|
17
|
+
throw new evaluator_1.FormulaError("#N/A", "Number of arguments for NOW is incorrect.");
|
|
31
18
|
}
|
|
32
19
|
}
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
main() {
|
|
21
|
+
return new Date();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.NowFunction = NowFunction;
|
|
35
25
|
//# sourceMappingURL=now.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"now.js","sourceRoot":"","sources":["../../../src/formula/functions/now.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"now.js","sourceRoot":"","sources":["../../../src/formula/functions/now.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AAExC,MAAa,WAAY,SAAQ,qBAAY;IAA7C;;QACE,YAAO,GAAG,OAAO,CAAC;QAClB,aAAQ,GAAG;YACT,oEAAoE;SACrE,CAAC;QACF,aAAQ,GAAG,EAAE,CAAC;IAchB,CAAC;IAZW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CACpB,MAAM,EACN,2CAA2C,CAC5C,CAAC;SACH;IACH,CAAC;IAES,IAAI;QACZ,OAAO,IAAI,IAAI,EAAE,CAAC;IACpB,CAAC;CACF;AAnBD,kCAmBC"}
|
|
@@ -1,42 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrFunction = void 0;
|
|
4
|
+
const __base_1 = require("./__base");
|
|
5
|
+
const __utils_1 = require("./__utils");
|
|
6
|
+
class OrFunction extends __base_1.BaseFunction {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.example = "OR(A1=1, A2=2)";
|
|
10
|
+
this.helpText = [
|
|
11
|
+
"Returns TRUE if any argument is logically true.",
|
|
12
|
+
"Returns FALSE if all arguments are logically false.",
|
|
13
|
+
];
|
|
14
|
+
this.helpArgs = [
|
|
15
|
+
{ name: "expression1", description: "First logical expression." },
|
|
16
|
+
{
|
|
17
|
+
name: "expression2",
|
|
18
|
+
description: "Additional expressions",
|
|
19
|
+
optional: true,
|
|
20
|
+
iterable: true,
|
|
21
|
+
},
|
|
22
|
+
];
|
|
5
23
|
}
|
|
6
|
-
|
|
7
|
-
|
|
24
|
+
validate() {
|
|
25
|
+
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureBoolean)(arg));
|
|
8
26
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.OrFunction = void 0;
|
|
13
|
-
const __base_1 = require("./__base");
|
|
14
|
-
const __utils_1 = require("./__utils");
|
|
15
|
-
class OrFunction extends __base_1.BaseFunction {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.example = "OR(A1=1, A2=2)";
|
|
19
|
-
this.helpText = [
|
|
20
|
-
"Returns TRUE if any argument is logically true.",
|
|
21
|
-
"Returns FALSE if all arguments are logically false.",
|
|
22
|
-
];
|
|
23
|
-
this.helpArgs = [
|
|
24
|
-
{ name: "expression1", description: "First logical expression." },
|
|
25
|
-
{
|
|
26
|
-
name: "expression2",
|
|
27
|
-
description: "Additional expressions",
|
|
28
|
-
optional: true,
|
|
29
|
-
iterable: true,
|
|
30
|
-
},
|
|
31
|
-
];
|
|
32
|
-
}
|
|
33
|
-
validate() {
|
|
34
|
-
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureBoolean)(arg));
|
|
35
|
-
}
|
|
36
|
-
main(...values) {
|
|
37
|
-
return values.reduce((a, b) => a || b);
|
|
38
|
-
}
|
|
27
|
+
main(...values) {
|
|
28
|
+
return values.reduce((a, b) => a || b);
|
|
39
29
|
}
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
}
|
|
31
|
+
exports.OrFunction = OrFunction;
|
|
42
32
|
//# sourceMappingURL=or.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"or.js","sourceRoot":"","sources":["../../../src/formula/functions/or.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"or.js","sourceRoot":"","sources":["../../../src/formula/functions/or.ts"],"names":[],"mappings":";;;AAAA,qCAAwC;AACxC,uCAA0C;AAE1C,MAAa,UAAW,SAAQ,qBAAY;IAA5C;;QACE,YAAO,GAAG,gBAAgB,CAAC;QAC3B,aAAQ,GAAG;YACT,iDAAiD;YACjD,qDAAqD;SACtD,CAAC;QACF,aAAQ,GAAG;YACT,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,2BAA2B,EAAE;YACjE;gBACE,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,wBAAwB;gBACrC,QAAQ,EAAE,IAAI;gBACd,QAAQ,EAAE,IAAI;aACf;SACF,CAAC;IASJ,CAAC;IAPW,QAAQ;QAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAa,EAAC,GAAG,CAAC,CAAC,CAAC;IACjE,CAAC;IAES,IAAI,CAAC,GAAG,MAAiB;QACjC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACzC,CAAC;CACF;AAvBD,gCAuBC"}
|