@gridsheet/react-core 1.0.0-alpha.1 → 1.0.0
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/README.md +11 -3
- package/dist/components/Cell.d.ts +1 -1
- package/dist/components/Cell.d.ts.map +1 -1
- package/dist/components/Cell.js +30 -25
- package/dist/components/Cell.js.map +1 -1
- package/dist/components/ContextMenu.d.ts +1 -1
- package/dist/components/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu.js +33 -47
- package/dist/components/ContextMenu.js.map +1 -1
- package/dist/components/Editor.d.ts +1 -1
- package/dist/components/Editor.d.ts.map +1 -1
- package/dist/components/Editor.js +70 -47
- package/dist/components/Editor.js.map +1 -1
- package/dist/components/Emitter.d.ts +2 -2
- package/dist/components/Emitter.d.ts.map +1 -1
- package/dist/components/Emitter.js +1 -1
- package/dist/components/Emitter.js.map +1 -1
- package/dist/components/FormulaBar.d.ts +1 -1
- package/dist/components/FormulaBar.d.ts.map +1 -1
- package/dist/components/FormulaBar.js +11 -11
- package/dist/components/FormulaBar.js.map +1 -1
- package/dist/components/GridSheet.d.ts +2 -2
- package/dist/components/GridSheet.d.ts.map +1 -1
- package/dist/components/GridSheet.js +10 -15
- package/dist/components/GridSheet.js.map +1 -1
- package/dist/components/HorizontalHeaderCell.d.ts +1 -1
- package/dist/components/HorizontalHeaderCell.d.ts.map +1 -1
- package/dist/components/HorizontalHeaderCell.js +6 -6
- package/dist/components/HorizontalHeaderCell.js.map +1 -1
- package/dist/components/Resizer.d.ts +1 -1
- package/dist/components/Resizer.d.ts.map +1 -1
- package/dist/components/Resizer.js +8 -9
- package/dist/components/Resizer.js.map +1 -1
- package/dist/components/SearchBox.d.ts +1 -1
- package/dist/components/SearchBox.d.ts.map +1 -1
- package/dist/components/SearchBox.js +8 -9
- package/dist/components/SearchBox.js.map +1 -1
- package/dist/components/SheetProvider.d.ts +2 -2
- package/dist/components/SheetProvider.d.ts.map +1 -1
- package/dist/components/SheetProvider.js +0 -1
- package/dist/components/SheetProvider.js.map +1 -1
- package/dist/components/StoreInitializer.d.ts +2 -2
- package/dist/components/StoreInitializer.d.ts.map +1 -1
- package/dist/components/StoreInitializer.js +4 -4
- 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 +5 -10
- package/dist/components/Tabular.js.map +1 -1
- package/dist/components/VerticalHeaderCell.d.ts +1 -1
- package/dist/components/VerticalHeaderCell.d.ts.map +1 -1
- package/dist/components/VerticalHeaderCell.js +6 -6
- package/dist/components/VerticalHeaderCell.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -3
- package/dist/constants.js.map +1 -1
- package/dist/formula/evaluator.d.ts +16 -24
- package/dist/formula/evaluator.d.ts.map +1 -1
- package/dist/formula/evaluator.js +202 -193
- package/dist/formula/evaluator.js.map +1 -1
- package/dist/formula/functions/__base.d.ts +3 -3
- package/dist/formula/functions/__base.d.ts.map +1 -1
- package/dist/formula/functions/__base.js +5 -3
- package/dist/formula/functions/__base.js.map +1 -1
- package/dist/formula/functions/__utils.d.ts.map +1 -1
- package/dist/formula/functions/__utils.js +29 -26
- package/dist/formula/functions/__utils.js.map +1 -1
- package/dist/formula/functions/abs.d.ts +1 -1
- package/dist/formula/functions/abs.d.ts.map +1 -1
- package/dist/formula/functions/abs.js +4 -4
- package/dist/formula/functions/abs.js.map +1 -1
- package/dist/formula/functions/abs.spec.js +3 -3
- package/dist/formula/functions/abs.spec.js.map +1 -1
- package/dist/formula/functions/acos.d.ts +1 -1
- package/dist/formula/functions/acos.d.ts.map +1 -1
- package/dist/formula/functions/acos.js +6 -6
- package/dist/formula/functions/acos.js.map +1 -1
- package/dist/formula/functions/add.d.ts +2 -2
- package/dist/formula/functions/add.d.ts.map +1 -1
- package/dist/formula/functions/add.js +10 -13
- package/dist/formula/functions/add.js.map +1 -1
- package/dist/formula/functions/and.d.ts +1 -1
- package/dist/formula/functions/and.d.ts.map +1 -1
- package/dist/formula/functions/and.js +5 -8
- package/dist/formula/functions/and.js.map +1 -1
- package/dist/formula/functions/asin.d.ts +1 -1
- package/dist/formula/functions/asin.d.ts.map +1 -1
- package/dist/formula/functions/asin.js +6 -6
- package/dist/formula/functions/asin.js.map +1 -1
- package/dist/formula/functions/atan.d.ts +1 -1
- package/dist/formula/functions/atan.d.ts.map +1 -1
- package/dist/formula/functions/atan.js +5 -5
- package/dist/formula/functions/atan.js.map +1 -1
- package/dist/formula/functions/atan2.d.ts +1 -1
- package/dist/formula/functions/atan2.d.ts.map +1 -1
- package/dist/formula/functions/atan2.js +7 -7
- package/dist/formula/functions/atan2.js.map +1 -1
- package/dist/formula/functions/average.d.ts +1 -1
- package/dist/formula/functions/average.d.ts.map +1 -1
- package/dist/formula/functions/average.js +10 -8
- package/dist/formula/functions/average.js.map +1 -1
- package/dist/formula/functions/col.d.ts +2 -2
- package/dist/formula/functions/col.d.ts.map +1 -1
- package/dist/formula/functions/col.js +6 -5
- package/dist/formula/functions/col.js.map +1 -1
- package/dist/formula/functions/concat.d.ts +1 -1
- package/dist/formula/functions/concat.d.ts.map +1 -1
- package/dist/formula/functions/concat.js +4 -7
- package/dist/formula/functions/concat.js.map +1 -1
- package/dist/formula/functions/concatenate.d.ts +1 -1
- package/dist/formula/functions/concatenate.d.ts.map +1 -1
- package/dist/formula/functions/concatenate.js +4 -4
- package/dist/formula/functions/concatenate.js.map +1 -1
- package/dist/formula/functions/cos.d.ts +1 -1
- package/dist/formula/functions/cos.d.ts.map +1 -1
- package/dist/formula/functions/cos.js +5 -5
- package/dist/formula/functions/cos.js.map +1 -1
- package/dist/formula/functions/count.d.ts +1 -1
- package/dist/formula/functions/count.d.ts.map +1 -1
- package/dist/formula/functions/count.js +7 -6
- package/dist/formula/functions/count.js.map +1 -1
- package/dist/formula/functions/counta.d.ts +1 -1
- package/dist/formula/functions/counta.d.ts.map +1 -1
- package/dist/formula/functions/counta.js +7 -6
- package/dist/formula/functions/counta.js.map +1 -1
- package/dist/formula/functions/countif.d.ts +2 -2
- package/dist/formula/functions/countif.d.ts.map +1 -1
- package/dist/formula/functions/countif.js +6 -8
- package/dist/formula/functions/countif.js.map +1 -1
- package/dist/formula/functions/divide.d.ts +1 -1
- package/dist/formula/functions/divide.d.ts.map +1 -1
- package/dist/formula/functions/divide.js +7 -10
- package/dist/formula/functions/divide.js.map +1 -1
- package/dist/formula/functions/eq.d.ts +1 -1
- package/dist/formula/functions/eq.d.ts.map +1 -1
- package/dist/formula/functions/eq.js +5 -5
- package/dist/formula/functions/eq.js.map +1 -1
- package/dist/formula/functions/exp.d.ts +1 -1
- package/dist/formula/functions/exp.d.ts.map +1 -1
- package/dist/formula/functions/exp.js +5 -7
- package/dist/formula/functions/exp.js.map +1 -1
- package/dist/formula/functions/gt.d.ts +1 -1
- package/dist/formula/functions/gt.d.ts.map +1 -1
- package/dist/formula/functions/gt.js +5 -5
- package/dist/formula/functions/gt.js.map +1 -1
- package/dist/formula/functions/gte.d.ts +1 -1
- package/dist/formula/functions/gte.d.ts.map +1 -1
- package/dist/formula/functions/gte.js +5 -5
- package/dist/formula/functions/gte.js.map +1 -1
- package/dist/formula/functions/hlookup.d.ts +2 -2
- package/dist/formula/functions/hlookup.d.ts.map +1 -1
- package/dist/formula/functions/hlookup.js +12 -12
- package/dist/formula/functions/hlookup.js.map +1 -1
- package/dist/formula/functions/if.d.ts +1 -1
- package/dist/formula/functions/if.d.ts.map +1 -1
- package/dist/formula/functions/if.js +8 -8
- package/dist/formula/functions/if.js.map +1 -1
- package/dist/formula/functions/iferror.d.ts +1 -1
- package/dist/formula/functions/iferror.js +6 -6
- package/dist/formula/functions/iferror.js.map +1 -1
- package/dist/formula/functions/iferror.spec.js +15 -14
- package/dist/formula/functions/iferror.spec.js.map +1 -1
- package/dist/formula/functions/len.d.ts +1 -1
- package/dist/formula/functions/len.d.ts.map +1 -1
- package/dist/formula/functions/len.js +5 -5
- package/dist/formula/functions/len.js.map +1 -1
- package/dist/formula/functions/lenb.d.ts +1 -1
- package/dist/formula/functions/lenb.d.ts.map +1 -1
- package/dist/formula/functions/lenb.js +6 -6
- package/dist/formula/functions/lenb.js.map +1 -1
- package/dist/formula/functions/ln.d.ts +1 -1
- package/dist/formula/functions/ln.d.ts.map +1 -1
- package/dist/formula/functions/ln.js +6 -6
- package/dist/formula/functions/ln.js.map +1 -1
- package/dist/formula/functions/log.d.ts +1 -1
- package/dist/formula/functions/log.d.ts.map +1 -1
- package/dist/formula/functions/log.js +8 -10
- package/dist/formula/functions/log.js.map +1 -1
- package/dist/formula/functions/log10.d.ts +1 -1
- package/dist/formula/functions/log10.d.ts.map +1 -1
- package/dist/formula/functions/log10.js +6 -6
- package/dist/formula/functions/log10.js.map +1 -1
- package/dist/formula/functions/lt.d.ts +1 -1
- package/dist/formula/functions/lt.d.ts.map +1 -1
- package/dist/formula/functions/lt.js +5 -5
- package/dist/formula/functions/lt.js.map +1 -1
- package/dist/formula/functions/lte.d.ts +1 -1
- package/dist/formula/functions/lte.d.ts.map +1 -1
- package/dist/formula/functions/lte.js +5 -5
- package/dist/formula/functions/lte.js.map +1 -1
- package/dist/formula/functions/max.d.ts +1 -1
- package/dist/formula/functions/max.d.ts.map +1 -1
- package/dist/formula/functions/max.js +10 -8
- package/dist/formula/functions/max.js.map +1 -1
- package/dist/formula/functions/min.d.ts +1 -1
- package/dist/formula/functions/min.d.ts.map +1 -1
- package/dist/formula/functions/min.js +10 -8
- package/dist/formula/functions/min.js.map +1 -1
- package/dist/formula/functions/minus.d.ts +2 -2
- package/dist/formula/functions/minus.d.ts.map +1 -1
- package/dist/formula/functions/minus.js +9 -12
- package/dist/formula/functions/minus.js.map +1 -1
- package/dist/formula/functions/mod.d.ts +1 -1
- package/dist/formula/functions/mod.d.ts.map +1 -1
- package/dist/formula/functions/mod.js +7 -7
- package/dist/formula/functions/mod.js.map +1 -1
- package/dist/formula/functions/mod.spec.js +23 -8
- package/dist/formula/functions/mod.spec.js.map +1 -1
- package/dist/formula/functions/multiply.d.ts +1 -1
- package/dist/formula/functions/multiply.d.ts.map +1 -1
- package/dist/formula/functions/multiply.js +5 -8
- package/dist/formula/functions/multiply.js.map +1 -1
- package/dist/formula/functions/ne.d.ts +1 -1
- package/dist/formula/functions/ne.d.ts.map +1 -1
- package/dist/formula/functions/ne.js +5 -5
- package/dist/formula/functions/ne.js.map +1 -1
- package/dist/formula/functions/not.d.ts +1 -1
- package/dist/formula/functions/not.d.ts.map +1 -1
- package/dist/formula/functions/not.js +5 -8
- package/dist/formula/functions/not.js.map +1 -1
- package/dist/formula/functions/now.d.ts +1 -1
- package/dist/formula/functions/now.d.ts.map +1 -1
- package/dist/formula/functions/now.js +3 -5
- package/dist/formula/functions/now.js.map +1 -1
- package/dist/formula/functions/or.d.ts +1 -1
- package/dist/formula/functions/or.d.ts.map +1 -1
- package/dist/formula/functions/or.js +5 -8
- package/dist/formula/functions/or.js.map +1 -1
- package/dist/formula/functions/pi.d.ts +1 -1
- package/dist/formula/functions/pi.d.ts.map +1 -1
- package/dist/formula/functions/pi.js +3 -3
- package/dist/formula/functions/pi.js.map +1 -1
- package/dist/formula/functions/power.d.ts +1 -1
- package/dist/formula/functions/power.d.ts.map +1 -1
- package/dist/formula/functions/power.js +5 -5
- package/dist/formula/functions/power.js.map +1 -1
- package/dist/formula/functions/product.d.ts +1 -1
- package/dist/formula/functions/product.d.ts.map +1 -1
- package/dist/formula/functions/product.js +9 -7
- package/dist/formula/functions/product.js.map +1 -1
- package/dist/formula/functions/radians.d.ts +1 -1
- package/dist/formula/functions/radians.d.ts.map +1 -1
- package/dist/formula/functions/radians.js +5 -5
- package/dist/formula/functions/radians.js.map +1 -1
- package/dist/formula/functions/rand.d.ts +1 -1
- package/dist/formula/functions/rand.d.ts.map +1 -1
- package/dist/formula/functions/rand.js +3 -3
- package/dist/formula/functions/rand.js.map +1 -1
- package/dist/formula/functions/round.d.ts +1 -1
- package/dist/formula/functions/round.d.ts.map +1 -1
- package/dist/formula/functions/round.js +7 -9
- package/dist/formula/functions/round.js.map +1 -1
- package/dist/formula/functions/rounddown.d.ts +1 -1
- package/dist/formula/functions/rounddown.d.ts.map +1 -1
- package/dist/formula/functions/rounddown.js +7 -9
- package/dist/formula/functions/rounddown.js.map +1 -1
- package/dist/formula/functions/roundup.d.ts +1 -1
- package/dist/formula/functions/roundup.d.ts.map +1 -1
- package/dist/formula/functions/roundup.js +7 -9
- package/dist/formula/functions/roundup.js.map +1 -1
- package/dist/formula/functions/row.d.ts +2 -2
- package/dist/formula/functions/row.d.ts.map +1 -1
- package/dist/formula/functions/row.js +6 -5
- package/dist/formula/functions/row.js.map +1 -1
- package/dist/formula/functions/sin.d.ts +1 -1
- package/dist/formula/functions/sin.d.ts.map +1 -1
- package/dist/formula/functions/sin.js +5 -5
- package/dist/formula/functions/sin.js.map +1 -1
- package/dist/formula/functions/sqrt.d.ts +1 -1
- package/dist/formula/functions/sqrt.d.ts.map +1 -1
- package/dist/formula/functions/sqrt.js +6 -6
- package/dist/formula/functions/sqrt.js.map +1 -1
- package/dist/formula/functions/sum.d.ts +1 -1
- package/dist/formula/functions/sum.d.ts.map +1 -1
- package/dist/formula/functions/sum.js +10 -8
- package/dist/formula/functions/sum.js.map +1 -1
- package/dist/formula/functions/sum.spec.js +9 -10
- package/dist/formula/functions/sum.spec.js.map +1 -1
- package/dist/formula/functions/sumif.d.ts +2 -2
- package/dist/formula/functions/sumif.d.ts.map +1 -1
- package/dist/formula/functions/sumif.js +9 -9
- package/dist/formula/functions/sumif.js.map +1 -1
- package/dist/formula/functions/tan.d.ts +1 -1
- package/dist/formula/functions/tan.d.ts.map +1 -1
- package/dist/formula/functions/tan.js +5 -5
- package/dist/formula/functions/tan.js.map +1 -1
- package/dist/formula/functions/uminus.d.ts +1 -1
- package/dist/formula/functions/uminus.d.ts.map +1 -1
- package/dist/formula/functions/uminus.js +4 -6
- package/dist/formula/functions/uminus.js.map +1 -1
- package/dist/formula/functions/vlookup.d.ts +2 -2
- package/dist/formula/functions/vlookup.d.ts.map +1 -1
- package/dist/formula/functions/vlookup.js +12 -12
- package/dist/formula/functions/vlookup.js.map +1 -1
- package/dist/formula/mapping.d.ts +2 -113
- package/dist/formula/mapping.d.ts.map +1 -1
- package/dist/formula/mapping.js +1 -0
- package/dist/formula/mapping.js.map +1 -1
- package/dist/formula/solver.d.ts +4 -4
- package/dist/formula/solver.d.ts.map +1 -1
- package/dist/formula/solver.js +6 -6
- package/dist/formula/solver.js.map +1 -1
- package/dist/index.d.ts +15 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/autofill.d.ts +3 -3
- package/dist/lib/autofill.d.ts.map +1 -1
- package/dist/lib/autofill.js +51 -44
- package/dist/lib/autofill.js.map +1 -1
- package/dist/lib/clipboard.d.ts +1 -1
- package/dist/lib/clipboard.d.ts.map +1 -1
- package/dist/lib/clipboard.js +7 -6
- package/dist/lib/clipboard.js.map +1 -1
- package/dist/lib/converters.d.ts +1 -1
- package/dist/lib/converters.d.ts.map +1 -1
- package/dist/lib/converters.js +22 -19
- package/dist/lib/converters.js.map +1 -1
- package/dist/lib/prevention.d.ts +1 -1
- package/dist/lib/prevention.d.ts.map +1 -1
- package/dist/lib/prevention.js +21 -34
- package/dist/lib/prevention.js.map +1 -1
- package/dist/lib/structs.d.ts +4 -4
- package/dist/lib/structs.d.ts.map +1 -1
- package/dist/lib/structs.js +30 -28
- package/dist/lib/structs.js.map +1 -1
- package/dist/lib/table.d.ts +13 -14
- package/dist/lib/table.d.ts.map +1 -1
- package/dist/lib/table.js +87 -72
- package/dist/lib/table.js.map +1 -1
- package/dist/lib/time.d.ts.map +1 -1
- package/dist/lib/time.js +16 -16
- package/dist/lib/time.js.map +1 -1
- package/dist/lib/virtualization.d.ts +2 -2
- package/dist/lib/virtualization.d.ts.map +1 -1
- package/dist/lib/virtualization.js +28 -6
- package/dist/lib/virtualization.js.map +1 -1
- package/dist/parsers/core.d.ts +2 -2
- package/dist/parsers/core.d.ts.map +1 -1
- package/dist/parsers/core.js +19 -15
- package/dist/parsers/core.js.map +1 -1
- package/dist/renderers/checkbox.d.ts +1 -1
- package/dist/renderers/checkbox.d.ts.map +1 -1
- package/dist/renderers/checkbox.js +1 -1
- package/dist/renderers/checkbox.js.map +1 -1
- package/dist/renderers/core.d.ts +3 -3
- package/dist/renderers/core.d.ts.map +1 -1
- package/dist/renderers/core.js +36 -24
- package/dist/renderers/core.js.map +1 -1
- package/dist/renderers/thousand_separator.d.ts +1 -2
- package/dist/renderers/thousand_separator.d.ts.map +1 -1
- package/dist/renderers/thousand_separator.js +5 -5
- package/dist/renderers/thousand_separator.js.map +1 -1
- package/dist/store/actions.d.ts +2 -2
- package/dist/store/actions.d.ts.map +1 -1
- package/dist/store/actions.js +24 -15
- package/dist/store/actions.js.map +1 -1
- package/dist/store/helpers.d.ts +2 -2
- package/dist/store/helpers.d.ts.map +1 -1
- package/dist/store/helpers.js +6 -8
- package/dist/store/helpers.js.map +1 -1
- package/dist/store/index.d.ts +2 -2
- package/dist/styles/embedder.js +1 -1
- package/dist/styles/embedder.js.map +1 -1
- package/dist/styles/minified.d.ts +2 -2
- package/dist/styles/minified.d.ts.map +1 -1
- package/dist/styles/minified.js +2 -2
- package/dist/styles/minified.js.map +1 -1
- package/dist/types.d.ts +13 -13
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -0
- package/dist/utils.js.map +1 -1
- package/package.json +11 -7
|
@@ -6,12 +6,12 @@ const __base_1 = require("./__base");
|
|
|
6
6
|
class RowFunction extends __base_1.BaseFunction {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
|
9
|
-
this.example =
|
|
10
|
-
this.helpText = [
|
|
9
|
+
this.example = 'ROW(A9)';
|
|
10
|
+
this.helpText = ['Returns the row number of a specified cell.'];
|
|
11
11
|
this.helpArgs = [
|
|
12
12
|
{
|
|
13
|
-
name:
|
|
14
|
-
description:
|
|
13
|
+
name: 'cell_reference',
|
|
14
|
+
description: 'The cell whose row number will be returned.',
|
|
15
15
|
option: true,
|
|
16
16
|
},
|
|
17
17
|
];
|
|
@@ -21,9 +21,10 @@ class RowFunction extends __base_1.BaseFunction {
|
|
|
21
21
|
this.bareArgs = [this.table];
|
|
22
22
|
}
|
|
23
23
|
else if (this.bareArgs.length === 1) {
|
|
24
|
+
// eslint-disable-next-line no-empty
|
|
24
25
|
}
|
|
25
26
|
else {
|
|
26
|
-
throw new evaluator_1.FormulaError(
|
|
27
|
+
throw new evaluator_1.FormulaError('#N/A', 'Number of arguments for ROW is incorrect.');
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
main(trimmed) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../../src/formula/functions/row.ts"],"names":[],"mappings":";;;AACA,4CAA4C;AAC5C,qCAAwC;AAExC,MAAa,WAAY,SAAQ,qBAAY;IAA7C;;QACE,YAAO,GAAG,SAAS,CAAC;QACpB,aAAQ,GAAG,CAAC,6CAA6C,CAAC,CAAC;QAC3D,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,gBAAgB;gBACtB,WAAW,EAAE,6CAA6C;gBAC1D,MAAM,EAAE,IAAI;aACb;SACF,CAAC;
|
|
1
|
+
{"version":3,"file":"row.js","sourceRoot":"","sources":["../../../src/formula/functions/row.ts"],"names":[],"mappings":";;;AACA,4CAA4C;AAC5C,qCAAwC;AAExC,MAAa,WAAY,SAAQ,qBAAY;IAA7C;;QACE,YAAO,GAAG,SAAS,CAAC;QACpB,aAAQ,GAAG,CAAC,6CAA6C,CAAC,CAAC;QAC3D,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,gBAAgB;gBACtB,WAAW,EAAE,6CAA6C;gBAC1D,MAAM,EAAE,IAAI;aACb;SACF,CAAC;IAeJ,CAAC;IAbW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC9B;aAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YACrC,oCAAoC;SACrC;aAAM;YACL,MAAM,IAAI,wBAAY,CAAC,MAAM,EAAE,2CAA2C,CAAC,CAAC;SAC7E;IACH,CAAC;IAES,IAAI,CAAC,OAAc;QAC3B,OAAO,OAAO,CAAC,GAAG,CAAC;IACrB,CAAC;CACF;AAxBD,kCAwBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sin.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAiB;IACxB,QAAQ,WAA0D;IAClE,QAAQ;;;QAKN;IAEF,SAAS,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"sin.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAiB;IACxB,QAAQ,WAA0D;IAClE,QAAQ;;;QAKN;IAEF,SAAS,CAAC,QAAQ;IAOlB,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;CAG7B"}
|
|
@@ -7,18 +7,18 @@ const __utils_1 = require("./__utils");
|
|
|
7
7
|
class SinFunction extends __base_1.BaseFunction {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
|
-
this.example =
|
|
11
|
-
this.helpText = [
|
|
10
|
+
this.example = 'SIN(PI()/2)';
|
|
11
|
+
this.helpText = ['Returns the sin of the angle specified in radians.'];
|
|
12
12
|
this.helpArgs = [
|
|
13
13
|
{
|
|
14
|
-
name:
|
|
15
|
-
description:
|
|
14
|
+
name: 'angle',
|
|
15
|
+
description: 'An angle in radians, at which you want the sin.',
|
|
16
16
|
},
|
|
17
17
|
];
|
|
18
18
|
}
|
|
19
19
|
validate() {
|
|
20
20
|
if (this.bareArgs.length !== 1) {
|
|
21
|
-
throw new evaluator_1.FormulaError(
|
|
21
|
+
throw new evaluator_1.FormulaError('#N/A', 'Number of arguments for SIN is incorrect.');
|
|
22
22
|
}
|
|
23
23
|
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sin.js","sourceRoot":"","sources":["../../../src/formula/functions/sin.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AACxC,uCAAyC;AAEzC,MAAa,WAAY,SAAQ,qBAAY;IAA7C;;QACE,YAAO,GAAG,aAAa,CAAC;QACxB,aAAQ,GAAG,CAAC,oDAAoD,CAAC,CAAC;QAClE,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,iDAAiD;aAC/D;SACF,CAAC;
|
|
1
|
+
{"version":3,"file":"sin.js","sourceRoot":"","sources":["../../../src/formula/functions/sin.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AACxC,uCAAyC;AAEzC,MAAa,WAAY,SAAQ,qBAAY;IAA7C;;QACE,YAAO,GAAG,aAAa,CAAC;QACxB,aAAQ,GAAG,CAAC,oDAAoD,CAAC,CAAC;QAClE,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,iDAAiD;aAC/D;SACF,CAAC;IAYJ,CAAC;IAVW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CAAC,MAAM,EAAE,2CAA2C,CAAC,CAAC;SAC7E;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;AApBD,kCAoBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqrt.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sqrt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,SAAa;IACpB,QAAQ,WAA8D;IACtE,QAAQ;;;
|
|
1
|
+
{"version":3,"file":"sqrt.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sqrt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,YAAa,SAAQ,YAAY;IAC5C,OAAO,SAAa;IACpB,QAAQ,WAA8D;IACtE,QAAQ;;;QAKN;IAEF,SAAS,CAAC,QAAQ;IAUlB,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;CAG7B"}
|
|
@@ -7,22 +7,22 @@ const __utils_1 = require("./__utils");
|
|
|
7
7
|
class SqrtFunction extends __base_1.BaseFunction {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
|
-
this.example =
|
|
11
|
-
this.helpText = [
|
|
10
|
+
this.example = 'SQRT(9)';
|
|
11
|
+
this.helpText = ['Returns the positive square root of a positive number.'];
|
|
12
12
|
this.helpArgs = [
|
|
13
13
|
{
|
|
14
|
-
name:
|
|
15
|
-
description:
|
|
14
|
+
name: 'value',
|
|
15
|
+
description: 'A number for which the positive square root is to be found.',
|
|
16
16
|
},
|
|
17
17
|
];
|
|
18
18
|
}
|
|
19
19
|
validate() {
|
|
20
20
|
if (this.bareArgs.length !== 1) {
|
|
21
|
-
throw new evaluator_1.FormulaError(
|
|
21
|
+
throw new evaluator_1.FormulaError('#N/A', 'Number of arguments for SQRT is incorrect.');
|
|
22
22
|
}
|
|
23
23
|
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
24
24
|
if (this.bareArgs[0] < 0) {
|
|
25
|
-
throw new evaluator_1.FormulaError(
|
|
25
|
+
throw new evaluator_1.FormulaError('NUM!', 'First argument must be positive.');
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
main(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqrt.js","sourceRoot":"","sources":["../../../src/formula/functions/sqrt.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AACxC,uCAAyC;AAEzC,MAAa,YAAa,SAAQ,qBAAY;IAA9C;;QACE,YAAO,GAAG,SAAS,CAAC;QACpB,aAAQ,GAAG,CAAC,wDAAwD,CAAC,CAAC;QACtE,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,
|
|
1
|
+
{"version":3,"file":"sqrt.js","sourceRoot":"","sources":["../../../src/formula/functions/sqrt.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,qCAAwC;AACxC,uCAAyC;AAEzC,MAAa,YAAa,SAAQ,qBAAY;IAA9C;;QACE,YAAO,GAAG,SAAS,CAAC;QACpB,aAAQ,GAAG,CAAC,wDAAwD,CAAC,CAAC;QACtE,aAAQ,GAAG;YACT;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,6DAA6D;aAC3E;SACF,CAAC;IAeJ,CAAC;IAbW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CAAC,MAAM,EAAE,4CAA4C,CAAC,CAAC;SAC9E;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,GAAG,CAAC,EAAE;YACxB,MAAM,IAAI,wBAAY,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC;SACpE;IACH,CAAC;IAES,IAAI,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;CACF;AAvBD,oCAuBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sum.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sum.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAuB;IAC9B,QAAQ,WAAwD;IAChE,QAAQ;;;;;;;;;;SAQN;IAEF,SAAS,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"sum.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sum.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAuB;IAC9B,QAAQ,WAAwD;IAChE,QAAQ;;;;;;;;;;SAQN;IAEF,SAAS,CAAC,QAAQ;IAoBlB,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,EAAE,MAAM,EAAE;CAMnC"}
|
|
@@ -9,13 +9,13 @@ const evaluator_1 = require("../evaluator");
|
|
|
9
9
|
class SumFunction extends __base_1.BaseFunction {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
|
-
this.example =
|
|
13
|
-
this.helpText = [
|
|
12
|
+
this.example = 'SUM(A2:A100, 101)';
|
|
13
|
+
this.helpText = ['Returns the sum of a series of numbers or cells.'];
|
|
14
14
|
this.helpArgs = [
|
|
15
|
-
{ name:
|
|
15
|
+
{ name: 'value1', description: 'First number or range.' },
|
|
16
16
|
{
|
|
17
|
-
name:
|
|
18
|
-
description:
|
|
17
|
+
name: 'value2',
|
|
18
|
+
description: 'Additional numbers or ranges',
|
|
19
19
|
optional: true,
|
|
20
20
|
iterable: true,
|
|
21
21
|
},
|
|
@@ -23,14 +23,16 @@ class SumFunction extends __base_1.BaseFunction {
|
|
|
23
23
|
}
|
|
24
24
|
validate() {
|
|
25
25
|
if (this.bareArgs.length === 0) {
|
|
26
|
-
throw new evaluator_1.FormulaError(
|
|
26
|
+
throw new evaluator_1.FormulaError('#N/A', 'One or more arguments are required.');
|
|
27
27
|
}
|
|
28
28
|
const spreaded = [];
|
|
29
29
|
this.bareArgs.forEach((arg) => {
|
|
30
30
|
if (arg instanceof table_1.Table) {
|
|
31
|
-
spreaded.push(
|
|
31
|
+
spreaded.push(
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
33
|
+
...(0, solver_1.solveTable)({ table: arg })
|
|
32
34
|
.reduce((a, b) => a.concat(b))
|
|
33
|
-
.filter((v) => typeof v ===
|
|
35
|
+
.filter((v) => typeof v === 'number'));
|
|
34
36
|
return;
|
|
35
37
|
}
|
|
36
38
|
spreaded.push((0, __utils_1.ensureNumber)(arg));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sum.js","sourceRoot":"","sources":["../../../src/formula/functions/sum.ts"],"names":[],"mappings":";;;AAAA,sCAAuC;AACvC,2CAAwC;AACxC,qCAAwC;AACxC,uCAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"sum.js","sourceRoot":"","sources":["../../../src/formula/functions/sum.ts"],"names":[],"mappings":";;;AAAA,sCAAuC;AACvC,2CAAwC;AACxC,qCAAwC;AACxC,uCAAyC;AACzC,4CAA4C;AAE5C,MAAa,WA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CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACxC,CAAC;CACF;AAvCD,kCAuCC"}
|
|
@@ -5,26 +5,25 @@ const table_1 = require("../../lib/table");
|
|
|
5
5
|
const evaluator_1 = require("../evaluator");
|
|
6
6
|
describe('sum', () => {
|
|
7
7
|
const table = new table_1.Table({});
|
|
8
|
-
table.initialize({
|
|
8
|
+
table.initialize({
|
|
9
|
+
A1: { value: 5 },
|
|
10
|
+
A2: { value: '=-(9 * 10) - 4' },
|
|
11
|
+
B50: { value: 25 },
|
|
12
|
+
C15: { value: 'not a number' },
|
|
13
|
+
C20: { value: 10 },
|
|
14
|
+
});
|
|
9
15
|
describe('normal', () => {
|
|
10
16
|
it('sum single values', () => {
|
|
11
17
|
const f = new sum_1.SumFunction({
|
|
12
18
|
table,
|
|
13
|
-
args: [
|
|
14
|
-
new evaluator_1.Ref("B50"),
|
|
15
|
-
new evaluator_1.Value(5),
|
|
16
|
-
new evaluator_1.Value(-3),
|
|
17
|
-
]
|
|
19
|
+
args: [new evaluator_1.RefEntity('B50'), new evaluator_1.ValueEntity(5), new evaluator_1.ValueEntity(-3)],
|
|
18
20
|
});
|
|
19
21
|
expect(f.call()).toBe(27);
|
|
20
22
|
});
|
|
21
23
|
it('sum range', () => {
|
|
22
24
|
const f = new sum_1.SumFunction({
|
|
23
25
|
table,
|
|
24
|
-
args: [
|
|
25
|
-
new evaluator_1.Range("A2:E20"),
|
|
26
|
-
new evaluator_1.Value(30),
|
|
27
|
-
]
|
|
26
|
+
args: [new evaluator_1.RangeEntity('A2:E20'), new evaluator_1.ValueEntity(30)],
|
|
28
27
|
});
|
|
29
28
|
// -90 - 4 + 10 + 30
|
|
30
29
|
expect(f.call()).toBe(-54);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sum.spec.js","sourceRoot":"","sources":["../../../src/formula/functions/sum.spec.ts"],"names":[],"mappings":";;AAAA,+
|
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CAAC,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;YAC1B,MAAM,CAAC,GAAG,IAAI,iBAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;YAC/C,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,5 +1,5 @@
|
|
|
1
|
-
import { Table } from
|
|
2
|
-
import { BaseFunction } from
|
|
1
|
+
import { Table } from '../../lib/table';
|
|
2
|
+
import { BaseFunction } from './__base';
|
|
3
3
|
export declare class SumifFunction extends BaseFunction {
|
|
4
4
|
example: string;
|
|
5
5
|
helpText: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sumif.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sumif.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,SAAyB;IAChC,QAAQ,WAA6C;IACrD,QAAQ;;;;;;;;SAWN;IAEF,SAAS,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"sumif.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/sumif.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,SAAyB;IAChC,QAAQ,WAA6C;IACrD,QAAQ;;;;;;;;SAWN;IAEF,SAAS,CAAC,QAAQ;IASlB,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK;CA2BhE"}
|
|
@@ -10,26 +10,26 @@ class SumifFunction extends __base_1.BaseFunction {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.example = 'SUMIF(A1:A10,">20")';
|
|
13
|
-
this.helpText = [
|
|
13
|
+
this.helpText = ['Returns the sum of a series of cells.'];
|
|
14
14
|
this.helpArgs = [
|
|
15
|
-
{ name:
|
|
15
|
+
{ name: 'range1', description: 'A condition range.' },
|
|
16
16
|
{
|
|
17
|
-
name:
|
|
18
|
-
description:
|
|
17
|
+
name: 'condition',
|
|
18
|
+
description: 'A condition for summarization.',
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
name:
|
|
22
|
-
description:
|
|
21
|
+
name: 'range2',
|
|
22
|
+
description: 'A range to be summarized.',
|
|
23
23
|
optional: true,
|
|
24
24
|
},
|
|
25
25
|
];
|
|
26
26
|
}
|
|
27
27
|
validate() {
|
|
28
28
|
if (this.bareArgs.length !== 2 && this.bareArgs.length !== 3) {
|
|
29
|
-
throw new evaluator_1.FormulaError(
|
|
29
|
+
throw new evaluator_1.FormulaError('#N/A', 'Number of arguments for SUMIF is incorrect.');
|
|
30
30
|
}
|
|
31
31
|
if (this.bareArgs[2] != undefined && this.bareArgs[2] instanceof table_1.Table) {
|
|
32
|
-
throw new evaluator_1.FormulaError(
|
|
32
|
+
throw new evaluator_1.FormulaError('#N/A', '3rd argument must be range.');
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
main(range, condition, sumRange) {
|
|
@@ -52,7 +52,7 @@ class SumifFunction extends __base_1.BaseFunction {
|
|
|
52
52
|
conditionMatrix.forEach((row, y) => row.forEach((c, x) => {
|
|
53
53
|
var _a;
|
|
54
54
|
const s = ((_a = sumMatrix[y]) === null || _a === void 0 ? void 0 : _a[x]) || 0;
|
|
55
|
-
if (typeof s ===
|
|
55
|
+
if (typeof s === 'number' && (0, __utils_1.check)(c, condition)) {
|
|
56
56
|
total += s;
|
|
57
57
|
}
|
|
58
58
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sumif.js","sourceRoot":"","sources":["../../../src/formula/functions/sumif.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,sCAAuC;AACvC,2CAAwC;AACxC,qCAAwC;AACxC,uCAAkC;AAGlC,MAAa,aAAc,SAAQ,qBAAY;IAA/C;;QACE,YAAO,GAAG,qBAAqB,CAAC;QAChC,aAAQ,GAAG,CAAC,uCAAuC,CAAC,CAAC;QACrD,aAAQ,GAAG;YACT,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;YACrD;gBACE,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,gCAAgC;aAC9C;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2BAA2B;gBACxC,QAAQ,EAAE,IAAI;aACf;SACF,CAAC;
|
|
1
|
+
{"version":3,"file":"sumif.js","sourceRoot":"","sources":["../../../src/formula/functions/sumif.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,sCAAuC;AACvC,2CAAwC;AACxC,qCAAwC;AACxC,uCAAkC;AAGlC,MAAa,aAAc,SAAQ,qBAAY;IAA/C;;QACE,YAAO,GAAG,qBAAqB,CAAC;QAChC,aAAQ,GAAG,CAAC,uCAAuC,CAAC,CAAC;QACrD,aAAQ,GAAG;YACT,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;YACrD;gBACE,IAAI,EAAE,WAAW;gBACjB,WAAW,EAAE,gCAAgC;aAC9C;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2BAA2B;gBACxC,QAAQ,EAA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,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;AApDD,sCAoDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tan.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/tan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAY;IACnB,QAAQ,WAA0D;IAClE,QAAQ;;;QAKN;IAEF,SAAS,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"tan.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/tan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,SAAY;IACnB,QAAQ,WAA0D;IAClE,QAAQ;;;QAKN;IAEF,SAAS,CAAC,QAAQ;IAOlB,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM;CAG7B"}
|
|
@@ -7,18 +7,18 @@ const __utils_1 = require("./__utils");
|
|
|
7
7
|
class TanFunction extends __base_1.BaseFunction {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
|
-
this.example =
|
|
11
|
-
this.helpText = [
|
|
10
|
+
this.example = 'TAN(1)';
|
|
11
|
+
this.helpText = ['Returns the tan of the angle specified in radians.'];
|
|
12
12
|
this.helpArgs = [
|
|
13
13
|
{
|
|
14
|
-
name:
|
|
15
|
-
description:
|
|
14
|
+
name: 'angle',
|
|
15
|
+
description: 'An angle in radians, at which you want the tan.',
|
|
16
16
|
},
|
|
17
17
|
];
|
|
18
18
|
}
|
|
19
19
|
validate() {
|
|
20
20
|
if (this.bareArgs.length !== 1) {
|
|
21
|
-
throw new evaluator_1.FormulaError(
|
|
21
|
+
throw new evaluator_1.FormulaError('#N/A', 'Number of arguments for TAN is incorrect.');
|
|
22
22
|
}
|
|
23
23
|
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IAYJ,CAAC;IAVW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CAAC,MAAM,EAAE,2CAA2C,CAAC,CAAC;SAC7E;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;AApBD,kCAoBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uminus.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/uminus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,cAAe,SAAQ,YAAY;IAC9C,OAAO,SAAe;IACtB,QAAQ,WAAoE;IAC5E,QAAQ;;;
|
|
1
|
+
{"version":3,"file":"uminus.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/uminus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,cAAe,SAAQ,YAAY;IAC9C,OAAO,SAAe;IACtB,QAAQ,WAAoE;IAC5E,QAAQ;;;QAA0E;IAElF,SAAS,CAAC,QAAQ;IAOlB,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM;CAG1B"}
|
|
@@ -7,15 +7,13 @@ const __utils_1 = require("./__utils");
|
|
|
7
7
|
class UminusFunction extends __base_1.BaseFunction {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
10
|
-
this.example =
|
|
11
|
-
this.helpText = [
|
|
12
|
-
this.helpArgs = [
|
|
13
|
-
{ name: "value1", description: "A number that will be subtracted." },
|
|
14
|
-
];
|
|
10
|
+
this.example = 'UMINUS(4)';
|
|
11
|
+
this.helpText = ['Returns a number with positive and negative values reversed.'];
|
|
12
|
+
this.helpArgs = [{ name: 'value1', description: 'A number that will be subtracted.' }];
|
|
15
13
|
}
|
|
16
14
|
validate() {
|
|
17
15
|
if (this.bareArgs.length !== 1) {
|
|
18
|
-
throw new evaluator_1.FormulaError(
|
|
16
|
+
throw new evaluator_1.FormulaError('#N/A', 'A single numerical value is only required.');
|
|
19
17
|
}
|
|
20
18
|
this.bareArgs = this.bareArgs.map((arg) => (0, __utils_1.ensureNumber)(arg));
|
|
21
19
|
}
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC,CAAC;IAYpF,CAAC;IAVW,QAAQ;QAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,MAAM,IAAI,wBAAY,CAAC,MAAM,EAAE,4CAA4C,CAAC,CAAC;SAC9E;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;AAfD,wCAeC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Table } from
|
|
2
|
-
import { BaseFunction } from
|
|
1
|
+
import { Table } from '../../lib/table';
|
|
2
|
+
import { BaseFunction } from './__base';
|
|
3
3
|
export declare class VlookupFunction extends BaseFunction {
|
|
4
4
|
example: string;
|
|
5
5
|
helpText: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vlookup.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/vlookup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,SAAsC;IAC7C,QAAQ,WAEN;IACF,QAAQ;;;;;;;;SAgBN;IAEF,SAAS,CAAC,QAAQ;
|
|
1
|
+
{"version":3,"file":"vlookup.d.ts","sourceRoot":"","sources":["../../../src/formula/functions/vlookup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,SAAsC;IAC7C,QAAQ,WAEN;IACF,QAAQ;;;;;;;;SAgBN;IAEF,SAAS,CAAC,QAAQ;IAclB,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO;CA2BxE"}
|
|
@@ -9,36 +9,36 @@ const __utils_1 = require("./__utils");
|
|
|
9
9
|
class VlookupFunction extends __base_1.BaseFunction {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
|
-
this.example =
|
|
12
|
+
this.example = 'VLOOKUP(10003, A2:B26, 2, FALSE)';
|
|
13
13
|
this.helpText = [
|
|
14
|
-
|
|
14
|
+
'Searches vertically for the specified key in the first column of the range and returns the value of the specified cell in the same row.',
|
|
15
15
|
];
|
|
16
16
|
this.helpArgs = [
|
|
17
|
-
{ name:
|
|
17
|
+
{ name: 'key', description: 'Search key.' },
|
|
18
18
|
{
|
|
19
|
-
name:
|
|
20
|
-
description:
|
|
19
|
+
name: 'range',
|
|
20
|
+
description: 'A range for search',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
name:
|
|
24
|
-
description:
|
|
23
|
+
name: 'index',
|
|
24
|
+
description: 'The index of the column in the range.',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
name:
|
|
28
|
-
description:
|
|
27
|
+
name: 'is_sorted',
|
|
28
|
+
description: 'FALSE: Exact match. This is recommended. TRUE: Approximate match. Before you use an approximate match, sort your search key in ascending order. Otherwise, you may likely get a wrong return value.',
|
|
29
29
|
option: true,
|
|
30
30
|
},
|
|
31
31
|
];
|
|
32
32
|
}
|
|
33
33
|
validate() {
|
|
34
34
|
if (this.bareArgs.length !== 3 && this.bareArgs.length !== 4) {
|
|
35
|
-
throw new evaluator_1.FormulaError(
|
|
35
|
+
throw new evaluator_1.FormulaError('#N/A', 'Number of arguments for VLOOKUP is incorrect.');
|
|
36
36
|
}
|
|
37
37
|
if (this.bareArgs[0] instanceof table_1.Table) {
|
|
38
38
|
this.bareArgs[0] = (0, __utils_1.stripTable)(this.bareArgs[0]);
|
|
39
39
|
}
|
|
40
40
|
if (!(this.bareArgs[1] instanceof table_1.Table)) {
|
|
41
|
-
throw new evaluator_1.FormulaError(
|
|
41
|
+
throw new evaluator_1.FormulaError('#REF!', '2nd argument must be range');
|
|
42
42
|
}
|
|
43
43
|
this.bareArgs[2] = (0, __utils_1.ensureNumber)(this.bareArgs[2]);
|
|
44
44
|
this.bareArgs[3] = (0, __utils_1.ensureBoolean)(this.bareArgs[3], true);
|
|
@@ -71,7 +71,7 @@ class VlookupFunction extends __base_1.BaseFunction {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
throw new evaluator_1.FormulaError(
|
|
74
|
+
throw new evaluator_1.FormulaError('#N/A', `No values found for '${key}'.`);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
exports.VlookupFunction = VlookupFunction;
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;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AG,CAAC,CAAC,CAAC;YACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE;gBAC5C,MAAM,CAAC,GAAG,MAAA,MAAM,CAAC,CAAC,CAAC,0CAAG,CAAC,CAAC,CAAC;gBACzB,IAAI,CAAC,IAAI,IAAI,EAAE;oBACb,SAAS;iBACV;gBACD,IAAI,CAAC,IAAI,GAAG,EAAE;oBACZ,IAAI,GAAG,CAAC,CAAC;iBACV;qBAAM;oBACL,MAAM;iBACP;aACF;YACD,IAAI,IAAI,KAAK,CAAC,CAAC,EAAE;gBACf,OAAO,MAAA,MAAM,CAAC,IAAI,CAAC,0CAAG,KAAK,GAAG,CAAC,CAAC,CAAC;aAClC;SACF;aAAM;YACL,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE;gBAC5C,IAAI,CAAA,MAAA,MAAM,CAAC,CAAC,CAAC,0CAAG,CAAC,CAAC,MAAK,GAAG,EAAE;oBAC1B,OAAO,MAAA,MAAM,CAAC,CAAC,CAAC,0CAAG,KAAK,GAAG,CAAC,CAAC,CAAC;iBAC/B;aACF;SACF;QACD,MAAM,IAAI,wBAAY,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC,CAAC;IAClE,CAAC;CACF;AAhED,0CAgEC"}
|
|
@@ -1,114 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { MultiplyFunction } from "./functions/multiply";
|
|
4
|
-
import { DivideFunction } from "./functions/divide";
|
|
5
|
-
import { ModFunction } from "./functions/mod";
|
|
6
|
-
import { SumFunction } from "./functions/sum";
|
|
7
|
-
import { ConcatFunction } from "./functions/concat";
|
|
8
|
-
import { ConcatenateFunction } from "./functions/concatenate";
|
|
9
|
-
import { EqFunction } from "./functions/eq";
|
|
10
|
-
import { NeFunction } from "./functions/ne";
|
|
11
|
-
import { GtFunction } from "./functions/gt";
|
|
12
|
-
import { GteFunction } from "./functions/gte";
|
|
13
|
-
import { LtFunction } from "./functions/lt";
|
|
14
|
-
import { LteFunction } from "./functions/lte";
|
|
15
|
-
import { NowFunction } from "./functions/now";
|
|
16
|
-
import { AndFunction } from "./functions/and";
|
|
17
|
-
import { OrFunction } from "./functions/or";
|
|
18
|
-
import { IfFunction } from "./functions/if";
|
|
19
|
-
import { IfErrorFunction } from "./functions/iferror";
|
|
20
|
-
import { NotFunction } from "./functions/not";
|
|
21
|
-
import { CountFunction } from "./functions/count";
|
|
22
|
-
import { CountifFunction } from "./functions/countif";
|
|
23
|
-
import { SumifFunction } from "./functions/sumif";
|
|
24
|
-
import { VlookupFunction } from "./functions/vlookup";
|
|
25
|
-
import { HlookupFunction } from "./functions/hlookup";
|
|
26
|
-
import { LogFunction } from "./functions/log";
|
|
27
|
-
import { Log10Function } from "./functions/log10";
|
|
28
|
-
import { LnFunction } from "./functions/ln";
|
|
29
|
-
import { AbsFunction } from "./functions/abs";
|
|
30
|
-
import { ProductFunction } from "./functions/product";
|
|
31
|
-
import { RandFunction } from "./functions/rand";
|
|
32
|
-
import { PiFunction } from "./functions/pi";
|
|
33
|
-
import { ExpFunction } from "./functions/exp";
|
|
34
|
-
import { RadiansFunction } from "./functions/radians";
|
|
35
|
-
import { PowerFunction } from "./functions/power";
|
|
36
|
-
import { SqrtFunction } from "./functions/sqrt";
|
|
37
|
-
import { RoundFunction } from "./functions/round";
|
|
38
|
-
import { RoundupFunction } from "./functions/roundup";
|
|
39
|
-
import { RounddownFunction } from "./functions/rounddown";
|
|
40
|
-
import { SinFunction } from "./functions/sin";
|
|
41
|
-
import { CosFunction } from "./functions/cos";
|
|
42
|
-
import { TanFunction } from "./functions/tan";
|
|
43
|
-
import { AsinFunction } from "./functions/asin";
|
|
44
|
-
import { AcosFunction } from "./functions/acos";
|
|
45
|
-
import { AtanFunction } from "./functions/atan";
|
|
46
|
-
import { Atan2Function } from "./functions/atan2";
|
|
47
|
-
import { CountaFunction } from "./functions/counta";
|
|
48
|
-
import { AverageFunction } from "./functions/average";
|
|
49
|
-
import { MaxFunction } from "./functions/max";
|
|
50
|
-
import { MinFunction } from "./functions/min";
|
|
51
|
-
import { LenFunction } from "./functions/len";
|
|
52
|
-
import { LenbFunction } from "./functions/lenb";
|
|
53
|
-
import { UminusFunction } from "./functions/uminus";
|
|
54
|
-
import { RowFunction } from "./functions/row";
|
|
55
|
-
import { ColFunction } from "./functions/col";
|
|
56
|
-
export declare const functions: {
|
|
57
|
-
abs: typeof AbsFunction;
|
|
58
|
-
add: typeof AddFunction;
|
|
59
|
-
divide: typeof DivideFunction;
|
|
60
|
-
mod: typeof ModFunction;
|
|
61
|
-
minus: typeof MinusFunction;
|
|
62
|
-
uminus: typeof UminusFunction;
|
|
63
|
-
multiply: typeof MultiplyFunction;
|
|
64
|
-
pow: typeof PowerFunction;
|
|
65
|
-
power: typeof PowerFunction;
|
|
66
|
-
sqrt: typeof SqrtFunction;
|
|
67
|
-
sum: typeof SumFunction;
|
|
68
|
-
sumif: typeof SumifFunction;
|
|
69
|
-
max: typeof MaxFunction;
|
|
70
|
-
min: typeof MinFunction;
|
|
71
|
-
average: typeof AverageFunction;
|
|
72
|
-
count: typeof CountFunction;
|
|
73
|
-
counta: typeof CountaFunction;
|
|
74
|
-
countif: typeof CountifFunction;
|
|
75
|
-
product: typeof ProductFunction;
|
|
76
|
-
concat: typeof ConcatFunction;
|
|
77
|
-
concatenate: typeof ConcatenateFunction;
|
|
78
|
-
eq: typeof EqFunction;
|
|
79
|
-
ne: typeof NeFunction;
|
|
80
|
-
gt: typeof GtFunction;
|
|
81
|
-
gte: typeof GteFunction;
|
|
82
|
-
lt: typeof LtFunction;
|
|
83
|
-
lte: typeof LteFunction;
|
|
84
|
-
and: typeof AndFunction;
|
|
85
|
-
or: typeof OrFunction;
|
|
86
|
-
round: typeof RoundFunction;
|
|
87
|
-
rounddown: typeof RounddownFunction;
|
|
88
|
-
roundup: typeof RoundupFunction;
|
|
89
|
-
if: typeof IfFunction;
|
|
90
|
-
iferror: typeof IfErrorFunction;
|
|
91
|
-
not: typeof NotFunction;
|
|
92
|
-
vlookup: typeof VlookupFunction;
|
|
93
|
-
hlookup: typeof HlookupFunction;
|
|
94
|
-
row: typeof RowFunction;
|
|
95
|
-
col: typeof ColFunction;
|
|
96
|
-
now: typeof NowFunction;
|
|
97
|
-
rand: typeof RandFunction;
|
|
98
|
-
log: typeof LogFunction;
|
|
99
|
-
log10: typeof Log10Function;
|
|
100
|
-
ln: typeof LnFunction;
|
|
101
|
-
exp: typeof ExpFunction;
|
|
102
|
-
pi: typeof PiFunction;
|
|
103
|
-
radians: typeof RadiansFunction;
|
|
104
|
-
sin: typeof SinFunction;
|
|
105
|
-
cos: typeof CosFunction;
|
|
106
|
-
tan: typeof TanFunction;
|
|
107
|
-
asin: typeof AsinFunction;
|
|
108
|
-
acos: typeof AcosFunction;
|
|
109
|
-
atan: typeof AtanFunction;
|
|
110
|
-
atan2: typeof Atan2Function;
|
|
111
|
-
len: typeof LenFunction;
|
|
112
|
-
lenb: typeof LenbFunction;
|
|
113
|
-
};
|
|
1
|
+
import type { FunctionMapping } from './functions/__base';
|
|
2
|
+
export declare const functions: FunctionMapping;
|
|
114
3
|
//# sourceMappingURL=mapping.d.ts.map
|