@leankylin-sheet/formula-parser 3.1.29 → 3.1.31
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/error.d.ts +10 -0
- package/dist/evaluate-by-operator/evaluate-by-operator.d.ts +2 -0
- package/dist/evaluate-by-operator/operator/add.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/ampersand.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/divide.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/equal.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/formula-function.d.ts +7 -0
- package/dist/evaluate-by-operator/operator/greater-than-or-equal.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/greater-than.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/less-than-or-equal.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/less-than.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/minus.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/multiply.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/not-equal.d.ts +6 -0
- package/dist/evaluate-by-operator/operator/power.d.ts +6 -0
- package/dist/grammar-parser/grammar-parser.d.ts +4 -0
- package/dist/helper/cell.d.ts +6 -0
- package/dist/helper/number.d.ts +2 -0
- package/dist/helper/string.d.ts +1 -0
- package/{es/index.js → dist/index.d.ts} +5 -5
- package/{lib/grammar-parser/grammar-parser.js → dist/index.esm.js} +856 -46
- package/{es/grammar-parser/grammar-parser.js → dist/index.js} +903 -42
- package/dist/parser.d.ts +20 -0
- package/dist/supported-formulas.d.ts +2 -0
- package/package.json +6 -18
- package/LICENSE +0 -21
- package/es/error.js +0 -45
- package/es/evaluate-by-operator/evaluate-by-operator.js +0 -70
- package/es/evaluate-by-operator/operator/add.js +0 -16
- package/es/evaluate-by-operator/operator/ampersand.js +0 -10
- package/es/evaluate-by-operator/operator/divide.js +0 -21
- package/es/evaluate-by-operator/operator/equal.js +0 -5
- package/es/evaluate-by-operator/operator/formula-function.js +0 -40
- package/es/evaluate-by-operator/operator/greater-than-or-equal.js +0 -5
- package/es/evaluate-by-operator/operator/greater-than.js +0 -5
- package/es/evaluate-by-operator/operator/less-than-or-equal.js +0 -5
- package/es/evaluate-by-operator/operator/less-than.js +0 -5
- package/es/evaluate-by-operator/operator/minus.js +0 -16
- package/es/evaluate-by-operator/operator/multiply.js +0 -16
- package/es/evaluate-by-operator/operator/not-equal.js +0 -5
- package/es/evaluate-by-operator/operator/power.js +0 -11
- package/es/grammar-parser/grammar-parser.jison +0 -230
- package/es/helper/cell.js +0 -117
- package/es/helper/number.js +0 -25
- package/es/helper/string.js +0 -13
- package/es/parser.js +0 -306
- package/es/supported-formulas.js +0 -3
- package/lib/error.js +0 -53
- package/lib/evaluate-by-operator/evaluate-by-operator.js +0 -77
- package/lib/evaluate-by-operator/operator/add.js +0 -23
- package/lib/evaluate-by-operator/operator/ampersand.js +0 -17
- package/lib/evaluate-by-operator/operator/divide.js +0 -28
- package/lib/evaluate-by-operator/operator/equal.js +0 -12
- package/lib/evaluate-by-operator/operator/formula-function.js +0 -51
- package/lib/evaluate-by-operator/operator/greater-than-or-equal.js +0 -12
- package/lib/evaluate-by-operator/operator/greater-than.js +0 -12
- package/lib/evaluate-by-operator/operator/less-than-or-equal.js +0 -12
- package/lib/evaluate-by-operator/operator/less-than.js +0 -12
- package/lib/evaluate-by-operator/operator/minus.js +0 -23
- package/lib/evaluate-by-operator/operator/multiply.js +0 -23
- package/lib/evaluate-by-operator/operator/not-equal.js +0 -12
- package/lib/evaluate-by-operator/operator/power.js +0 -18
- package/lib/grammar-parser/grammar-parser.jison +0 -230
- package/lib/helper/cell.js +0 -128
- package/lib/helper/number.js +0 -32
- package/lib/helper/string.js +0 -19
- package/lib/index.js +0 -115
- package/lib/parser.js +0 -314
- package/lib/supported-formulas.js +0 -12
package/dist/error.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function error(type: string): string | null;
|
|
2
|
+
export function isValidStrict(type: any): boolean;
|
|
3
|
+
export const ERROR: "ERROR";
|
|
4
|
+
export const ERROR_DIV_ZERO: "DIV/0";
|
|
5
|
+
export const ERROR_NAME: "NAME";
|
|
6
|
+
export const ERROR_NOT_AVAILABLE: "N/A";
|
|
7
|
+
export const ERROR_NULL: "NULL";
|
|
8
|
+
export const ERROR_NUM: "NUM";
|
|
9
|
+
export const ERROR_REF: "REF";
|
|
10
|
+
export const ERROR_VALUE: "VALUE";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function rowLabelToIndex(label: string): number;
|
|
2
|
+
export function rowIndexToLabel(row: number): string;
|
|
3
|
+
export function columnLabelToIndex(label: string): number;
|
|
4
|
+
export function columnIndexToLabel(column: number): string;
|
|
5
|
+
export function extractLabel(label: string): any[];
|
|
6
|
+
export function toLabel(row: Object, column: Object): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function trimEdges(string: string, margin?: number | undefined): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Parser from
|
|
2
|
-
import SUPPORTED_FORMULAS from
|
|
3
|
-
import error, { ERROR, ERROR_DIV_ZERO, ERROR_NAME, ERROR_NOT_AVAILABLE, ERROR_NULL, ERROR_NUM, ERROR_REF, ERROR_VALUE } from
|
|
4
|
-
import { extractLabel, toLabel, columnIndexToLabel, columnLabelToIndex, rowIndexToLabel, rowLabelToIndex } from
|
|
5
|
-
export { SUPPORTED_FORMULAS, ERROR, ERROR_DIV_ZERO, ERROR_NAME, ERROR_NOT_AVAILABLE, ERROR_NULL, ERROR_NUM, ERROR_REF, ERROR_VALUE, Parser, error, extractLabel, toLabel, columnIndexToLabel, columnLabelToIndex, rowIndexToLabel, rowLabelToIndex };
|
|
1
|
+
import Parser from "./parser";
|
|
2
|
+
import SUPPORTED_FORMULAS from "./supported-formulas";
|
|
3
|
+
import error, { ERROR, ERROR_DIV_ZERO, ERROR_NAME, ERROR_NOT_AVAILABLE, ERROR_NULL, ERROR_NUM, ERROR_REF, ERROR_VALUE } from "./error";
|
|
4
|
+
import { extractLabel, toLabel, columnIndexToLabel, columnLabelToIndex, rowIndexToLabel, rowLabelToIndex } from "./helper/cell";
|
|
5
|
+
export { SUPPORTED_FORMULAS, ERROR, ERROR_DIV_ZERO, ERROR_NAME, ERROR_NOT_AVAILABLE, ERROR_NULL, ERROR_NUM, ERROR_REF, ERROR_VALUE, Parser, error, extractLabel, toLabel, columnIndexToLabel, columnLabelToIndex, rowIndexToLabel, rowLabelToIndex, };
|