@affino/datagrid-formula-engine 0.1.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.
Files changed (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -0
  3. package/dist/analysis/index.d.ts +2 -0
  4. package/dist/analysis/index.d.ts.map +1 -0
  5. package/dist/analysis/index.js +1 -0
  6. package/dist/analysis/types.d.ts +44 -0
  7. package/dist/analysis/types.d.ts.map +1 -0
  8. package/dist/analysis/types.js +1 -0
  9. package/dist/contracts.d.ts +177 -0
  10. package/dist/contracts.d.ts.map +1 -0
  11. package/dist/contracts.js +140 -0
  12. package/dist/coreTypes.d.ts +2 -0
  13. package/dist/coreTypes.d.ts.map +1 -0
  14. package/dist/coreTypes.js +1 -0
  15. package/dist/dependency/index.d.ts +2 -0
  16. package/dist/dependency/index.d.ts.map +1 -0
  17. package/dist/dependency/index.js +1 -0
  18. package/dist/evaluators/columnar.d.ts +6 -0
  19. package/dist/evaluators/columnar.d.ts.map +1 -0
  20. package/dist/evaluators/columnar.js +39 -0
  21. package/dist/evaluators/index.d.ts +5 -0
  22. package/dist/evaluators/index.d.ts.map +1 -0
  23. package/dist/evaluators/index.js +4 -0
  24. package/dist/evaluators/interpreter.d.ts +6 -0
  25. package/dist/evaluators/interpreter.d.ts.map +1 -0
  26. package/dist/evaluators/interpreter.js +156 -0
  27. package/dist/evaluators/jit.d.ts +7 -0
  28. package/dist/evaluators/jit.d.ts.map +1 -0
  29. package/dist/evaluators/jit.js +158 -0
  30. package/dist/evaluators/shared.d.ts +36 -0
  31. package/dist/evaluators/shared.d.ts.map +1 -0
  32. package/dist/evaluators/shared.js +242 -0
  33. package/dist/evaluators/vector.d.ts +6 -0
  34. package/dist/evaluators/vector.d.ts.map +1 -0
  35. package/dist/evaluators/vector.js +228 -0
  36. package/dist/formulaEngine/compile.d.ts +2 -0
  37. package/dist/formulaEngine/compile.d.ts.map +1 -0
  38. package/dist/formulaEngine/compile.js +1 -0
  39. package/dist/formulaEngine/core.d.ts +2 -0
  40. package/dist/formulaEngine/core.d.ts.map +1 -0
  41. package/dist/formulaEngine/core.js +1 -0
  42. package/dist/formulaEngine/evaluators.d.ts +2 -0
  43. package/dist/formulaEngine/evaluators.d.ts.map +1 -0
  44. package/dist/formulaEngine/evaluators.js +1 -0
  45. package/dist/formulaEngine/index.d.ts +5 -0
  46. package/dist/formulaEngine/index.d.ts.map +1 -0
  47. package/dist/formulaEngine/index.js +2 -0
  48. package/dist/formulaExecutionPlan.d.ts +2 -0
  49. package/dist/formulaExecutionPlan.d.ts.map +1 -0
  50. package/dist/formulaExecutionPlan.js +1 -0
  51. package/dist/graph/executionPlan.d.ts +66 -0
  52. package/dist/graph/executionPlan.d.ts.map +1 -0
  53. package/dist/graph/executionPlan.js +534 -0
  54. package/dist/graph/index.d.ts +2 -0
  55. package/dist/graph/index.d.ts.map +1 -0
  56. package/dist/graph/index.js +3 -0
  57. package/dist/index.d.ts +8 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +4 -0
  60. package/dist/runtime/compile.d.ts +7 -0
  61. package/dist/runtime/compile.d.ts.map +1 -0
  62. package/dist/runtime/compile.js +453 -0
  63. package/dist/runtime/evaluators.d.ts +5 -0
  64. package/dist/runtime/evaluators.d.ts.map +1 -0
  65. package/dist/runtime/evaluators.js +6 -0
  66. package/dist/runtime/index.d.ts +3 -0
  67. package/dist/runtime/index.d.ts.map +1 -0
  68. package/dist/runtime/index.js +2 -0
  69. package/dist/runtime/types.d.ts +63 -0
  70. package/dist/runtime/types.d.ts.map +1 -0
  71. package/dist/runtime/types.js +1 -0
  72. package/dist/syntax/analysis.d.ts +14 -0
  73. package/dist/syntax/analysis.d.ts.map +1 -0
  74. package/dist/syntax/analysis.js +159 -0
  75. package/dist/syntax/ast.d.ts +18 -0
  76. package/dist/syntax/ast.d.ts.map +1 -0
  77. package/dist/syntax/ast.js +54 -0
  78. package/dist/syntax/core.d.ts +4 -0
  79. package/dist/syntax/core.d.ts.map +1 -0
  80. package/dist/syntax/core.js +1 -0
  81. package/dist/syntax/functionGroups/advancedFunctions.d.ts +2 -0
  82. package/dist/syntax/functionGroups/advancedFunctions.d.ts.map +1 -0
  83. package/dist/syntax/functionGroups/advancedFunctions.js +252 -0
  84. package/dist/syntax/functionGroups/dateFunctions.d.ts +2 -0
  85. package/dist/syntax/functionGroups/dateFunctions.d.ts.map +1 -0
  86. package/dist/syntax/functionGroups/dateFunctions.js +144 -0
  87. package/dist/syntax/functionGroups/logicFunctions.d.ts +2 -0
  88. package/dist/syntax/functionGroups/logicFunctions.d.ts.map +1 -0
  89. package/dist/syntax/functionGroups/logicFunctions.js +140 -0
  90. package/dist/syntax/functionGroups/numericFunctions.d.ts +2 -0
  91. package/dist/syntax/functionGroups/numericFunctions.d.ts.map +1 -0
  92. package/dist/syntax/functionGroups/numericFunctions.js +268 -0
  93. package/dist/syntax/functionGroups/textFunctions.d.ts +2 -0
  94. package/dist/syntax/functionGroups/textFunctions.d.ts.map +1 -0
  95. package/dist/syntax/functionGroups/textFunctions.js +118 -0
  96. package/dist/syntax/functionHelpers.d.ts +45 -0
  97. package/dist/syntax/functionHelpers.d.ts.map +1 -0
  98. package/dist/syntax/functionHelpers.js +553 -0
  99. package/dist/syntax/functions.d.ts +9 -0
  100. package/dist/syntax/functions.d.ts.map +1 -0
  101. package/dist/syntax/functions.js +139 -0
  102. package/dist/syntax/index.d.ts +10 -0
  103. package/dist/syntax/index.d.ts.map +1 -0
  104. package/dist/syntax/index.js +7 -0
  105. package/dist/syntax/legacy.d.ts +29 -0
  106. package/dist/syntax/legacy.d.ts.map +1 -0
  107. package/dist/syntax/legacy.js +188 -0
  108. package/dist/syntax/optimizer.d.ts +6 -0
  109. package/dist/syntax/optimizer.d.ts.map +1 -0
  110. package/dist/syntax/optimizer.js +362 -0
  111. package/dist/syntax/parser.d.ts +7 -0
  112. package/dist/syntax/parser.d.ts.map +1 -0
  113. package/dist/syntax/parser.js +239 -0
  114. package/dist/syntax/tokenizer.d.ts +14 -0
  115. package/dist/syntax/tokenizer.d.ts.map +1 -0
  116. package/dist/syntax/tokenizer.js +852 -0
  117. package/dist/syntax/types.d.ts +120 -0
  118. package/dist/syntax/types.d.ts.map +1 -0
  119. package/dist/syntax/types.js +1 -0
  120. package/dist/syntax/values.d.ts +25 -0
  121. package/dist/syntax/values.d.ts.map +1 -0
  122. package/dist/syntax/values.js +270 -0
  123. package/dist/tsconfig.tsbuildinfo +1 -0
  124. package/package.json +42 -0
@@ -0,0 +1,120 @@
1
+ import type { DataGridComputedFieldComputeContext, DataGridFormulaValue } from "../coreTypes.js";
2
+ export type DataGridFormulaFunctionArity = number | {
3
+ min: number;
4
+ max?: number;
5
+ };
6
+ export interface DataGridFormulaFunctionDefinition {
7
+ arity?: DataGridFormulaFunctionArity;
8
+ contextKeys?: readonly string[];
9
+ resolveContextKeys?: (args: readonly DataGridFormulaAstNode[]) => readonly string[];
10
+ requiresRuntimeContext?: boolean;
11
+ compute: (args: readonly DataGridFormulaValue[], context?: DataGridComputedFieldComputeContext<unknown>) => unknown;
12
+ }
13
+ export type DataGridFormulaFunctionRegistry = Readonly<Record<string, DataGridFormulaFunctionDefinition | ((args: readonly DataGridFormulaValue[], context?: DataGridComputedFieldComputeContext<unknown>) => unknown)>>;
14
+ export interface DataGridFormulaSourceSpan {
15
+ start: number;
16
+ end: number;
17
+ }
18
+ export interface DataGridFormulaDiagnostic {
19
+ severity: "error";
20
+ message: string;
21
+ span: DataGridFormulaSourceSpan;
22
+ }
23
+ export type DataGridFormulaReferenceSyntax = "canonical" | "smartsheet" | "auto";
24
+ export interface DataGridFormulaReferenceParserOptions {
25
+ syntax?: DataGridFormulaReferenceSyntax;
26
+ /**
27
+ * External absolute row-number base for syntaxes that use human row labels.
28
+ * Smartsheet-style references are 1-based by default.
29
+ */
30
+ smartsheetAbsoluteRowBase?: 0 | 1;
31
+ /**
32
+ * Enables sheet-qualified identifiers such as `orders!price` or `'Q1 Plan'![Amount]5`.
33
+ * Off by default so non-spreadsheet formula surfaces keep their current grammar.
34
+ */
35
+ allowSheetQualifiedReferences?: boolean;
36
+ }
37
+ export type DataGridFormulaRowSelector = {
38
+ kind: "current";
39
+ } | {
40
+ kind: "absolute";
41
+ rowIndex: number;
42
+ } | {
43
+ kind: "absolute-window";
44
+ startRowIndex: number;
45
+ endRowIndex: number;
46
+ } | {
47
+ kind: "relative";
48
+ offset: number;
49
+ } | {
50
+ kind: "window";
51
+ startOffset: number;
52
+ endOffset: number;
53
+ };
54
+ export type DataGridFormulaOperator = "+" | "-" | "*" | "/" | "AND" | "OR" | "NOT" | ">" | "<" | ">=" | "<=" | "==" | "!=";
55
+ export type DataGridFormulaToken = {
56
+ kind: "number";
57
+ value: number;
58
+ position: number;
59
+ end: number;
60
+ } | {
61
+ kind: "string";
62
+ value: string;
63
+ position: number;
64
+ end: number;
65
+ } | {
66
+ kind: "identifier";
67
+ value: string;
68
+ raw?: string;
69
+ position: number;
70
+ end: number;
71
+ } | {
72
+ kind: "operator";
73
+ value: DataGridFormulaOperator;
74
+ position: number;
75
+ end: number;
76
+ } | {
77
+ kind: "comma";
78
+ position: number;
79
+ end: number;
80
+ } | {
81
+ kind: "paren";
82
+ value: "(" | ")";
83
+ position: number;
84
+ end: number;
85
+ };
86
+ export type DataGridFormulaAstNode = {
87
+ kind: "number";
88
+ value: number;
89
+ span: DataGridFormulaSourceSpan;
90
+ } | {
91
+ kind: "literal";
92
+ value: DataGridFormulaValue;
93
+ span: DataGridFormulaSourceSpan;
94
+ } | {
95
+ kind: "identifier";
96
+ name: string;
97
+ sheetReference: string | null;
98
+ referenceName: string;
99
+ rangeReferenceName?: string | null;
100
+ rowSelector: DataGridFormulaRowSelector;
101
+ span: DataGridFormulaSourceSpan;
102
+ } | {
103
+ kind: "call";
104
+ name: string;
105
+ args: DataGridFormulaAstNode[];
106
+ span: DataGridFormulaSourceSpan;
107
+ } | {
108
+ kind: "unary";
109
+ operator: "-" | "+" | "NOT";
110
+ value: DataGridFormulaAstNode;
111
+ span: DataGridFormulaSourceSpan;
112
+ } | {
113
+ kind: "binary";
114
+ operator: DataGridFormulaOperator;
115
+ left: DataGridFormulaAstNode;
116
+ right: DataGridFormulaAstNode;
117
+ span: DataGridFormulaSourceSpan;
118
+ };
119
+ export type DataGridFormulaReferenceSegment = string | number;
120
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/syntax/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { DataGridFormulaRuntimeErrorCode, DataGridFormulaRuntimeError, DataGridFormulaErrorValue, DataGridFormulaArrayValue, DataGridFormulaValue } from "../coreTypes.js";
2
+ export type { DataGridFormulaRuntimeErrorPolicy, } from "./analysis.js";
3
+ export type { DataGridFormulaRuntimeErrorCode, DataGridFormulaRuntimeError, DataGridFormulaErrorValue, DataGridFormulaScalarValue, DataGridFormulaArrayValue, DataGridFormulaValue, } from "../coreTypes.js";
4
+ export declare function isFormulaErrorValue(value: unknown): value is DataGridFormulaErrorValue;
5
+ export declare function isFormulaArrayValue(value: unknown): value is DataGridFormulaArrayValue;
6
+ export declare function createFormulaErrorValue(input: Pick<DataGridFormulaRuntimeError, "code" | "message">): DataGridFormulaErrorValue;
7
+ export declare function findFormulaErrorValue(values: readonly DataGridFormulaValue[]): DataGridFormulaErrorValue | null;
8
+ export declare function normalizeFormulaValue(value: unknown): DataGridFormulaValue;
9
+ export declare function isFormulaValueBlank(value: DataGridFormulaValue): boolean;
10
+ export declare function isFormulaValueEmptyText(value: DataGridFormulaValue): boolean;
11
+ export declare function coerceFormulaValueToNumber(value: DataGridFormulaValue): number;
12
+ export declare function coerceFormulaValueToBoolean(value: DataGridFormulaValue): boolean;
13
+ export declare function isFormulaValuePresent(value: DataGridFormulaValue): boolean;
14
+ export declare function areFormulaValuesEqual(left: DataGridFormulaValue, right: DataGridFormulaValue): boolean;
15
+ export declare function compareFormulaValues(left: DataGridFormulaValue, right: DataGridFormulaValue): number;
16
+ export declare function createFormulaRuntimeError(code: DataGridFormulaRuntimeErrorCode, message: string, input?: Partial<DataGridFormulaRuntimeError>): DataGridFormulaRuntimeError;
17
+ export declare function normalizeFormulaRuntimeError(error: unknown, input: {
18
+ formulaName: string;
19
+ field: string;
20
+ formula: string;
21
+ rowId: string | number;
22
+ sourceIndex: number;
23
+ }): DataGridFormulaRuntimeError;
24
+ export declare function formulaNumberIsTruthy(value: unknown): boolean;
25
+ //# sourceMappingURL=values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/syntax/values.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,2BAA2B,EAC3B,yBAAyB,EAEzB,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAKxB,YAAY,EACV,iCAAiC,GAClC,MAAM,eAAe,CAAA;AAEtB,YAAY,EACV,+BAA+B,EAC/B,2BAA2B,EAC3B,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,iBAAiB,CAAA;AAExB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,yBAAyB,CAMtF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,yBAAyB,CAEtF;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,IAAI,CAAC,2BAA2B,EAAE,MAAM,GAAG,SAAS,CAAC,GAC3D,yBAAyB,CAM3B;AASD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,oBAAoB,EAAE,GACtC,yBAAyB,GAAG,IAAI,CAOlC;AAoED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,CAK1E;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAKxE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAE5E;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAmB9E;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAsBhF;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAE1E;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,oBAAoB,EAC1B,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAoCT;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,oBAAoB,EAC1B,KAAK,EAAE,oBAAoB,GAC1B,MAAM,CAyCR;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,+BAA+B,EACrC,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,OAAO,CAAC,2BAA2B,CAAM,GAC/C,2BAA2B,CAM7B;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,EACd,KAAK,EAAE;IACL,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACpB,GACA,2BAA2B,CAqB7B;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE7D"}
@@ -0,0 +1,270 @@
1
+ import { DataGridFormulaEvaluationError, } from "./ast.js";
2
+ export function isFormulaErrorValue(value) {
3
+ return typeof value === "object"
4
+ && value !== null
5
+ && value.kind === "error"
6
+ && typeof value.code === "string"
7
+ && typeof value.message === "string";
8
+ }
9
+ export function isFormulaArrayValue(value) {
10
+ return Array.isArray(value);
11
+ }
12
+ export function createFormulaErrorValue(input) {
13
+ return {
14
+ kind: "error",
15
+ code: input.code,
16
+ message: input.message,
17
+ };
18
+ }
19
+ function throwForFormulaErrorValue(value) {
20
+ throw new DataGridFormulaEvaluationError({
21
+ code: value.code,
22
+ message: value.message,
23
+ });
24
+ }
25
+ export function findFormulaErrorValue(values) {
26
+ for (const value of values) {
27
+ if (isFormulaErrorValue(value)) {
28
+ return value;
29
+ }
30
+ }
31
+ return null;
32
+ }
33
+ function normalizeFormulaScalarValue(value) {
34
+ if (value === null || typeof value === "undefined") {
35
+ return null;
36
+ }
37
+ if (isFormulaErrorValue(value)) {
38
+ return value;
39
+ }
40
+ if (value instanceof Date) {
41
+ return Number.isNaN(value.getTime()) ? null : value;
42
+ }
43
+ if (typeof value === "number") {
44
+ return Number.isFinite(value) ? value : 0;
45
+ }
46
+ if (typeof value === "boolean" || typeof value === "string") {
47
+ return value;
48
+ }
49
+ if (typeof value === "bigint") {
50
+ return Number(value);
51
+ }
52
+ return null;
53
+ }
54
+ function normalizeFormulaArrayValue(value) {
55
+ const normalized = [];
56
+ for (const entry of value) {
57
+ if (Array.isArray(entry)) {
58
+ normalized.push(...normalizeFormulaArrayValue(entry));
59
+ continue;
60
+ }
61
+ normalized.push(normalizeFormulaScalarValue(entry));
62
+ }
63
+ return Object.freeze(normalized);
64
+ }
65
+ function coerceFormulaValueToScalar(value) {
66
+ var _a;
67
+ if (Array.isArray(value)) {
68
+ return (_a = value[0]) !== null && _a !== void 0 ? _a : null;
69
+ }
70
+ return value;
71
+ }
72
+ function coerceFormulaValueToStrictNumber(value) {
73
+ const scalarValue = coerceFormulaValueToScalar(value);
74
+ if (scalarValue === null) {
75
+ return null;
76
+ }
77
+ if (isFormulaErrorValue(scalarValue)) {
78
+ throwForFormulaErrorValue(scalarValue);
79
+ }
80
+ if (typeof scalarValue === "number") {
81
+ return Number.isFinite(scalarValue) ? scalarValue : 0;
82
+ }
83
+ if (typeof scalarValue === "boolean") {
84
+ return scalarValue ? 1 : 0;
85
+ }
86
+ if (scalarValue instanceof Date) {
87
+ return Number.isNaN(scalarValue.getTime()) ? null : scalarValue.getTime();
88
+ }
89
+ const text = scalarValue.trim();
90
+ if (text.length === 0) {
91
+ return null;
92
+ }
93
+ const parsed = Number(text);
94
+ return Number.isFinite(parsed) ? parsed : null;
95
+ }
96
+ export function normalizeFormulaValue(value) {
97
+ if (Array.isArray(value)) {
98
+ return normalizeFormulaArrayValue(value);
99
+ }
100
+ return normalizeFormulaScalarValue(value);
101
+ }
102
+ export function isFormulaValueBlank(value) {
103
+ if (Array.isArray(value)) {
104
+ return value.length === 0 || value.every(item => item === null);
105
+ }
106
+ return value === null;
107
+ }
108
+ export function isFormulaValueEmptyText(value) {
109
+ return typeof value === "string" && value.length === 0;
110
+ }
111
+ export function coerceFormulaValueToNumber(value) {
112
+ const scalarValue = coerceFormulaValueToScalar(value);
113
+ if (isFormulaErrorValue(scalarValue)) {
114
+ throwForFormulaErrorValue(scalarValue);
115
+ }
116
+ if (typeof scalarValue === "number") {
117
+ return Number.isFinite(scalarValue) ? scalarValue : 0;
118
+ }
119
+ if (scalarValue instanceof Date) {
120
+ return Number.isNaN(scalarValue.getTime()) ? 0 : scalarValue.getTime();
121
+ }
122
+ if (typeof scalarValue === "boolean") {
123
+ return scalarValue ? 1 : 0;
124
+ }
125
+ if (typeof scalarValue === "string") {
126
+ const next = Number(scalarValue);
127
+ return Number.isFinite(next) ? next : 0;
128
+ }
129
+ return 0;
130
+ }
131
+ export function coerceFormulaValueToBoolean(value) {
132
+ const scalarValue = coerceFormulaValueToScalar(value);
133
+ if (isFormulaErrorValue(scalarValue)) {
134
+ throwForFormulaErrorValue(scalarValue);
135
+ }
136
+ if (typeof scalarValue === "boolean") {
137
+ return scalarValue;
138
+ }
139
+ if (typeof scalarValue === "string") {
140
+ if (scalarValue.trim().length === 0) {
141
+ return false;
142
+ }
143
+ const parsed = Number(scalarValue);
144
+ if (Number.isFinite(parsed)) {
145
+ return parsed !== 0;
146
+ }
147
+ return true;
148
+ }
149
+ if (scalarValue instanceof Date) {
150
+ return !Number.isNaN(scalarValue.getTime());
151
+ }
152
+ return coerceFormulaValueToNumber(scalarValue) !== 0;
153
+ }
154
+ export function isFormulaValuePresent(value) {
155
+ return !isFormulaValueBlank(value);
156
+ }
157
+ export function areFormulaValuesEqual(left, right) {
158
+ var _a, _b;
159
+ if (Array.isArray(left) || Array.isArray(right)) {
160
+ if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
161
+ return false;
162
+ }
163
+ for (let index = 0; index < left.length; index += 1) {
164
+ if (!areFormulaValuesEqual((_a = left[index]) !== null && _a !== void 0 ? _a : null, (_b = right[index]) !== null && _b !== void 0 ? _b : null)) {
165
+ return false;
166
+ }
167
+ }
168
+ return true;
169
+ }
170
+ if (isFormulaErrorValue(left)) {
171
+ throwForFormulaErrorValue(left);
172
+ }
173
+ if (isFormulaErrorValue(right)) {
174
+ throwForFormulaErrorValue(right);
175
+ }
176
+ if (left === null || right === null) {
177
+ return left === right;
178
+ }
179
+ if (left instanceof Date && right instanceof Date) {
180
+ return left.getTime() === right.getTime();
181
+ }
182
+ if (typeof left === "string" && typeof right === "string") {
183
+ return left === right;
184
+ }
185
+ if (typeof left === "boolean" && typeof right === "boolean") {
186
+ return left === right;
187
+ }
188
+ const leftNumeric = coerceFormulaValueToStrictNumber(left);
189
+ const rightNumeric = coerceFormulaValueToStrictNumber(right);
190
+ if (leftNumeric !== null && rightNumeric !== null) {
191
+ return leftNumeric === rightNumeric;
192
+ }
193
+ return false;
194
+ }
195
+ export function compareFormulaValues(left, right) {
196
+ var _a, _b;
197
+ if (Array.isArray(left) || Array.isArray(right)) {
198
+ if (!Array.isArray(left)) {
199
+ return -1;
200
+ }
201
+ if (!Array.isArray(right)) {
202
+ return 1;
203
+ }
204
+ const maxLength = Math.max(left.length, right.length);
205
+ for (let index = 0; index < maxLength; index += 1) {
206
+ const compared = compareFormulaValues((_a = left[index]) !== null && _a !== void 0 ? _a : null, (_b = right[index]) !== null && _b !== void 0 ? _b : null);
207
+ if (compared !== 0) {
208
+ return compared;
209
+ }
210
+ }
211
+ return 0;
212
+ }
213
+ if (isFormulaErrorValue(left)) {
214
+ throwForFormulaErrorValue(left);
215
+ }
216
+ if (isFormulaErrorValue(right)) {
217
+ throwForFormulaErrorValue(right);
218
+ }
219
+ if (left === null && right === null) {
220
+ return 0;
221
+ }
222
+ if (left === null) {
223
+ return -1;
224
+ }
225
+ if (right === null) {
226
+ return 1;
227
+ }
228
+ if (typeof left === "string" && typeof right === "string") {
229
+ return left.localeCompare(right);
230
+ }
231
+ const leftNumeric = coerceFormulaValueToStrictNumber(left);
232
+ const rightNumeric = coerceFormulaValueToStrictNumber(right);
233
+ if (leftNumeric !== null && rightNumeric !== null) {
234
+ return leftNumeric - rightNumeric;
235
+ }
236
+ return String(left).localeCompare(String(right));
237
+ }
238
+ export function createFormulaRuntimeError(code, message, input = {}) {
239
+ return {
240
+ code,
241
+ message,
242
+ ...input,
243
+ };
244
+ }
245
+ export function normalizeFormulaRuntimeError(error, input) {
246
+ var _a, _b, _c, _d, _e;
247
+ if (error instanceof DataGridFormulaEvaluationError) {
248
+ return {
249
+ ...error.runtimeError,
250
+ formulaName: (_a = error.runtimeError.formulaName) !== null && _a !== void 0 ? _a : input.formulaName,
251
+ field: (_b = error.runtimeError.field) !== null && _b !== void 0 ? _b : input.field,
252
+ formula: (_c = error.runtimeError.formula) !== null && _c !== void 0 ? _c : input.formula,
253
+ rowId: (_d = error.runtimeError.rowId) !== null && _d !== void 0 ? _d : input.rowId,
254
+ sourceIndex: (_e = error.runtimeError.sourceIndex) !== null && _e !== void 0 ? _e : input.sourceIndex,
255
+ };
256
+ }
257
+ const message = error instanceof Error
258
+ ? error.message
259
+ : String(error !== null && error !== void 0 ? error : "Formula evaluation failed.");
260
+ return createFormulaRuntimeError("EVAL_ERROR", message, {
261
+ formulaName: input.formulaName,
262
+ field: input.field,
263
+ formula: input.formula,
264
+ rowId: input.rowId,
265
+ sourceIndex: input.sourceIndex,
266
+ });
267
+ }
268
+ export function formulaNumberIsTruthy(value) {
269
+ return coerceFormulaValueToBoolean(normalizeFormulaValue(value));
270
+ }
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@vue+shared@3.4.38/node_modules/@vue/shared/dist/shared.d.ts","../../../node_modules/.pnpm/@vue+reactivity@3.4.38/node_modules/@vue/reactivity/dist/reactivity.d.ts","../../../node_modules/.pnpm/@vue+runtime-core@3.4.38/node_modules/@vue/runtime-core/dist/runtime-core.d.ts","../../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@vue+runtime-dom@3.4.38/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts","../../../node_modules/.pnpm/vue@3.4.38_typescript@5.9.3/node_modules/vue/jsx-runtime/index.d.ts","../src/coreTypes.ts","../src/syntax/types.ts","../src/analysis/types.ts","../src/syntax/ast.ts","../src/syntax/tokenizer.ts","../src/graph/executionPlan.ts","../src/graph/index.ts","../src/contracts.ts","../src/runtime/types.ts","../src/syntax/functionHelpers.ts","../src/syntax/functionGroups/advancedFunctions.ts","../src/syntax/functionGroups/dateFunctions.ts","../src/syntax/functionGroups/logicFunctions.ts","../src/syntax/functionGroups/numericFunctions.ts","../src/syntax/functionGroups/textFunctions.ts","../src/syntax/functions.ts","../src/syntax/parser.ts","../src/syntax/optimizer.ts","../src/syntax/analysis.ts","../src/syntax/values.ts","../src/syntax/index.ts","../src/syntax/core.ts","../src/evaluators/shared.ts","../src/evaluators/interpreter.ts","../src/evaluators/jit.ts","../src/evaluators/columnar.ts","../src/evaluators/vector.ts","../src/runtime/evaluators.ts","../src/runtime/compile.ts","../src/runtime/index.ts","../src/index.ts","../src/analysis/index.ts","../src/dependency/index.ts","../src/evaluators/index.ts","../src/formulaEngine/index.ts"],"fileIdsList":[[38],[38,39,40,42],[39,40,41],[42],[43,46],[43,44,45],[43,50],[43,51],[43,47,52,66],[43,67,68,69,70],[43,44,47,52,59,63,66],[43,44,47,52,59,66],[43,44,47,52,59,63],[43,47,52,59,63,66],[43,44,64,72],[43,48],[43,49],[43,44,50,51,64,73],[43,44,47,48,59,60,61,63,65,71],[43,71,72],[43,44,45,46,47,48,51,52,59,60,61],[43,44,45,46],[43,46,52,62],[43,53,63],[43,44,53,63],[43,44,45,48,63],[43,44,47,54,55,56,57,58,62,63],[43,45,46,47,48,52,59,60,61,63],[43,44,47,59,63],[43,45,47,48,62],[43,45,47],[43,44],[43,44,47,62]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"6dcb89623cc070c3b2a29218f99a3501041b3ac3fc4c80ee7083b99ba320a694","impliedFormat":1},{"version":"d7320842ea9f50f92ccd7871357201f298e3a1e995033dfacd305fb1f82fb658","impliedFormat":1},{"version":"c3a02538a5edb234c5decee1ccc8e99efbf75f9929e32ee535ebac2eb1e4a68f","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"f6ce02ab5919d59beeaeb808732c9847e1095e88621a427590077c90da6eec1a","impliedFormat":1},{"version":"9c077ba346f2891d1725d6cbf1ff8bc7ca075ccff10d1ea38eda571245df0eeb","impliedFormat":1},{"version":"615ebab9f9fc0d5ef03a2ce688651b9bc4d11230e88e409466a02a992d022f84","signature":"8354eda9637f778a739d3190862078947950ab98aa8e1b7aed9d94d09cad5704"},{"version":"2a59cbbbd3296aa5e4ea257f3194bb7a1d47a935ac4e58569cad801c70ec2f0e","signature":"f62a78d52584ce9da85d392c4a4b285284837577283fb70ebcbdf5eeba9ea59a"},{"version":"ecc1ba4726e4d74252ca96c5e70eef921ae10aa396ebe4b3fb626de557225962","signature":"0f97daa0c2555affd86c6640ac9f5e3c11a24ddf4dbe272df8b16d0f7bba8cd3"},{"version":"cec846c8f1472d81a11bfa181b922c17a38b3fc95fe5040d234e2576a038016b","signature":"f696b2721a0a5d3ce72d0d157beb3c08cce2e7cc94d9cf50c25531a9b90b6c45"},{"version":"dd5c9a52812efddf26198ccce891764238e367ee8dad4e85f9e8779390bee479","signature":"fb976158d1210165b8617b9d6c53c45e70fb9b410f91f628fcbc8dbb0dd3d651"},{"version":"d94af22629ef820aac7488606ba576ca2a0929c5d5f81eb3e25ce1729a0f2acf","signature":"2df263b6a13dc093f07f96f51e7f53feb4de13fe20a65b7bda2dd27e0de27187"},{"version":"befd6f417b8c4d447ce4ec7f8f163877c0f00b63e38fa4a99beeac28579c14b6","signature":"74a3f116974a9b682958e8fa6c6ce80e5f5118c2d7b19bdf7e2c40776afe5136"},{"version":"813527397f507940e4ca2b6c290ab87a694c710c88167a68fbf4030398df1d89","signature":"07730cd798f781f81d3f67e2102d867a282c92ba2aadbf3ed08c4f74bcc9d8d8"},{"version":"9c16e8dc28457ae3d85103ff12e451800f7a99af6a8566ed6ea905f882ae16f8","signature":"12d31bc65e923de3eebbfaf6838fa499ff3fc541437bc89b7eafded431d1b43c"},{"version":"858ec2f2a5ca6f1b8f369ee43cdf33f699ccf6c3bbaaa42ae3536bfbb366448c","signature":"bde9844ad59814e68f7b8bb9be46f63faa0c7123b4aa6f786abfd90f62179525"},{"version":"3ee5efe18981fbea66397f94423e1fc28113f6b1ff6fcb4fec793ef4c2923d46","signature":"93d97dbf34feb655f77062200ff4e3c7764704c36add62c8002c1726580be6cd"},{"version":"d05bc9d2de26bd101358e00249e78472da0237738110c5c618ae5fe5381fbc30","signature":"dd9a68af63c2caa4a29efc260baae16fc9274a0cbc53396f035943958aadbe86"},{"version":"deecb0ae18ef72c9b4fa2d6f5c1d1ece68e31bc4e24e5fd122adeb0f3950f30d","signature":"e814ca329cf509f605306c0c93871f769ee711f3aa2f9c42db75f2badeb97bbc"},{"version":"6ae66b02df5f7b567d64d3f014f2e83ddbb92a385e11e4a23d564ec4c16f8caa","signature":"2c61a0bba2caef4098c359643fb510381ba114d4d3454c19f8484b6acd4738c7"},{"version":"9f085d1aa7fb3f9f742904a64f5b685c1c438c08416f8370d9148fd7213d8ed9","signature":"149e563b7c0759da76cdc2672aa94634055b811ba4f2c97e934f1df15c6958f0"},{"version":"6c3ce72d1608e0e1f81374a4ebfb44fa6e60011f8d6dfecf308dcacc0ca7df0d","signature":"415c5ec1dfd87b823f604e838b0f1ecf26e51126005046d313fcc3235e0fa1ad"},{"version":"3ef78c92cf701aa60a10a57f90b1beeb693193f3c2a42381ea1fba513ece6b27","signature":"5d73e450e149f6a1befdb70687aea1cc1a80764a6ad34294d2583527b440d57a"},{"version":"4c9940c8cdf3e483f44d6e579585480d908d6e35e90d8f1191e6f7575c6742fb","signature":"fff586d6a03bc026f6005d0c34572628d8a39110264c7bd5b2c38db924ed01c0"},{"version":"cbc36c596c4ee38008ad7855d520acda38f2d83ea53f6cf4eebb78dbbfb029bb","signature":"cab1b4a264706ef08d66d9c3add5e05513300fd067596f65faba7fc16bdfae63"},{"version":"b573c931c3731763ba35141b70663e97abf8a0d265e3a8aad16759375c1b113e","signature":"d26eae4a2f6f69e075c54a74534f53d4bad2bb665011d01ddebedd9d89c6da4c"},{"version":"61505af3646987920110a845ccb87bbd14a6e4619b939c41fd2105babac040ff","signature":"a283c911be3d9964373f8969ff2819d5a7f5234f692df81839d5f40047527b7a"},{"version":"e270c22d9ce6fb153cd3116ce0653c4b48fbfd00d292bc5da773bdf9af2f389f","signature":"24b4acc0fe759ec0e449a60ac99353ca3fbfe043b7d3d01cf695a4cdad4e7ea0"},{"version":"0faa11de24d4202ffcc3d5cfce28a515b255f73f3afe73dc021d09f2d37c384e","signature":"7847299294ef6f8e2431f03059ec2a9fe2a648a9a3b0651a6c7a963e6287efc8"},{"version":"97eb749c935a45a7de676c44a785fda5cba3dfead60327812c595540d3581cee","signature":"6edd38b3c2580e31857d7723d8d464b7cb48e1a5a364bf3f0f256ff1cf1bf1fc"},{"version":"05408ba4d6c5e8d998c6df388d75468410e112371161b38fbd9ef37713379785","signature":"0866f44083f290f331ab7b84fc91c73859a999b3eefcf407639eb05b07fefbde"},{"version":"078e8d932894b227f51d8b9a9401a255275b38eba9259f06a6960110403f4ded","signature":"8b83cbd66bf0cf49832078c6a76e8a8beb1bdbf9311e93c6f646fad37f371b68"},{"version":"edb1d14fd8e59730edc0332eac6360a86c055228f0f51aec519480d91f56c43f","signature":"1a0c095c9360a7e51fae717d16f030ad1588e2e421671435d0f4c38f1d09aff2"},{"version":"8a641115df05403a9a28972e5f36ecf7d018993da96e1eb6f3fadd03a1ef9213","signature":"610a284faf8d12a312fdd6f095b90f8153619736028f5b9267163f82c133a9a7"},{"version":"f1931fa8cf656a3a32dec67e0c4411f87295c2de064d077cd39420b3a1e2ae9a","signature":"45087fdbf9b80815c9b8ca1d74a8cacc5a764ab48a135b28443f41799616ec53"},{"version":"6b5838f5a51fbde43e8b5b369728f230aae3b769cf2b825259b53c34fc5fe325","signature":"9e31e36a404cfc9345ed4a044956520c247dfb1db0cde89200fafc7dffceb573"},{"version":"1030dddb8b4503efd6144a5b0f38bc6bbccdc8389f184ea53a07187f01f9eb3a","signature":"ee7ff3022dda355c83741541b7e3ed06360646c56b2cf33c695d38f8282dbf6d"},{"version":"7130bbe04457819484c7636486e9da19240cd86541733c67a62ea74f5e97135f","signature":"3416849628f6d511187d72c9d8aa4424f0822c19d4572ab8dd4b5320ba05de7f"},{"version":"f3fff823ae66787e2a17b0d4e5c319f7372872dfadf3ff865003be1155561bec","signature":"d1f2afa682a90817b709d32c8fe567ac2a8b2f0c5906d6d1452d05305faa7e5b"},{"version":"c3694f1abdefaa408f71064c20be860caa7b5b3106eb1a4b296065cdbcfd57eb","signature":"e7018158b9847e8ae2ad9caf4795f4e939c094f78cc54e4ffdf23490ecda17a5"},{"version":"4848787899374370a5ac6bee6eae40bd102e7c27ac9e82ef3cc0322758c4245f","signature":"979f80b5aaee703c5595440143b36c5462f1d5bd82673b217bac8084e7295ffe"}],"root":[[44,78]],"options":{"allowImportingTsExtensions":false,"composite":true,"declaration":true,"declarationDir":"./","declarationMap":true,"emitDeclarationOnly":false,"esModuleInterop":true,"jsx":1,"jsxImportSource":"vue","module":6,"noImplicitThis":true,"noUncheckedIndexedAccess":false,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":true,"target":6,"tsBuildInfoFile":"./tsconfig.tsbuildinfo","useDefineForClassFields":true,"verbatimModuleSyntax":true},"referencedMap":[[39,1],[40,2],[42,3],[43,4],[75,5],[46,6],[51,7],[44,8],[76,7],[69,9],[77,10],[67,11],[68,12],[66,13],[70,14],[78,15],[49,16],[50,17],[74,18],[72,19],[71,10],[73,20],[52,6],[62,21],[47,22],[65,23],[54,24],[55,24],[56,24],[57,24],[58,25],[53,26],[59,27],[64,28],[61,29],[60,30],[48,31],[45,32],[63,33]],"latestChangedDtsFile":"./evaluators/shared.d.ts","version":"5.9.3"}
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@affino/datagrid-formula-engine",
3
+ "version": "0.1.1",
4
+ "author": "Anton Pavlov <a.pavlov@affino.dev>",
5
+ "type": "module",
6
+ "description": "Community formula engine API for Affino DataGrid",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "main": "dist/index.js",
14
+ "types": "dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "sideEffects": false,
19
+ "dependencies": {},
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/affinio/affinio.git",
23
+ "directory": "packages/datagrid-formula-engine"
24
+ },
25
+ "homepage": "https://github.com/affinio/affinio/tree/main/packages/datagrid-formula-engine#readme",
26
+ "license": "MIT",
27
+ "keywords": [
28
+ "datagrid",
29
+ "formula",
30
+ "compute",
31
+ "engine",
32
+ "headless"
33
+ ],
34
+ "bugs": {
35
+ "url": "https://github.com/affinio/affinio/issues"
36
+ },
37
+ "module": "dist/index.js",
38
+ "scripts": {
39
+ "build": "find src \\( -name '*.js' -o -name '*.js.map' -o -name '*.d.ts' -o -name '*.d.ts.map' \\) -delete && tsc -p tsconfig.json",
40
+ "type-check": "tsc -p tsconfig.json --noEmit"
41
+ }
42
+ }