@ricsam/formula-engine 0.2.2 → 0.2.3
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/cjs/core/ast-traverser.cjs +19 -9
- package/dist/cjs/core/ast-traverser.cjs.map +2 -2
- package/dist/cjs/core/autofill-utils.cjs +19 -9
- package/dist/cjs/core/autofill-utils.cjs.map +2 -2
- package/dist/cjs/core/cell-mover.cjs +19 -9
- package/dist/cjs/core/cell-mover.cjs.map +2 -2
- package/dist/cjs/core/commands/command-executor.cjs +24 -13
- package/dist/cjs/core/commands/command-executor.cjs.map +3 -3
- package/dist/cjs/core/commands/content-commands.cjs +292 -9
- package/dist/cjs/core/commands/content-commands.cjs.map +3 -3
- package/dist/cjs/core/commands/metadata-commands.cjs +19 -9
- package/dist/cjs/core/commands/metadata-commands.cjs.map +2 -2
- package/dist/cjs/core/commands/named-expression-commands.cjs +138 -13
- package/dist/cjs/core/commands/named-expression-commands.cjs.map +3 -3
- package/dist/cjs/core/commands/structure-commands.cjs +216 -15
- package/dist/cjs/core/commands/structure-commands.cjs.map +3 -3
- package/dist/cjs/core/commands/style-commands.cjs +19 -9
- package/dist/cjs/core/commands/style-commands.cjs.map +2 -2
- package/dist/cjs/core/commands/table-commands.cjs +134 -13
- package/dist/cjs/core/commands/table-commands.cjs.map +3 -3
- package/dist/cjs/core/commands/types.cjs +36 -9
- package/dist/cjs/core/commands/types.cjs.map +3 -3
- package/dist/cjs/core/engine-snapshot.cjs +51 -0
- package/dist/cjs/core/engine-snapshot.cjs.map +10 -0
- package/dist/cjs/core/engine.cjs +51 -34
- package/dist/cjs/core/engine.cjs.map +3 -3
- package/dist/cjs/core/managers/cache-manager.cjs +123 -9
- package/dist/cjs/core/managers/cache-manager.cjs.map +3 -3
- package/dist/cjs/core/managers/copy-manager.cjs +19 -9
- package/dist/cjs/core/managers/copy-manager.cjs.map +2 -2
- package/dist/cjs/core/managers/dependency-manager.cjs +697 -9
- package/dist/cjs/core/managers/dependency-manager.cjs.map +3 -3
- package/dist/cjs/core/managers/dependency-node.cjs +14 -8
- package/dist/cjs/core/managers/dependency-node.cjs.map +1 -1
- package/dist/cjs/core/managers/evaluation-manager.cjs +296 -11
- package/dist/cjs/core/managers/evaluation-manager.cjs.map +3 -3
- package/dist/cjs/core/managers/event-manager.cjs +19 -9
- package/dist/cjs/core/managers/event-manager.cjs.map +2 -2
- package/dist/cjs/core/managers/frontier-dependency-manager.cjs +65 -12
- package/dist/cjs/core/managers/frontier-dependency-manager.cjs.map +3 -3
- package/dist/cjs/core/managers/isDependencyNode.cjs +19 -9
- package/dist/cjs/core/managers/isDependencyNode.cjs.map +2 -2
- package/dist/cjs/core/managers/named-expression-manager.cjs +121 -29
- package/dist/cjs/core/managers/named-expression-manager.cjs.map +3 -3
- package/dist/cjs/core/managers/range-eval-order-builder.cjs +19 -9
- package/dist/cjs/core/managers/range-eval-order-builder.cjs.map +2 -2
- package/dist/cjs/core/managers/reference-manager.cjs +25 -9
- package/dist/cjs/core/managers/reference-manager.cjs.map +3 -3
- package/dist/cjs/core/managers/schema-manager.cjs +19 -9
- package/dist/cjs/core/managers/schema-manager.cjs.map +2 -2
- package/dist/cjs/core/managers/style-manager.cjs +28 -9
- package/dist/cjs/core/managers/style-manager.cjs.map +3 -3
- package/dist/cjs/core/managers/table-manager.cjs +25 -9
- package/dist/cjs/core/managers/table-manager.cjs.map +3 -3
- package/dist/cjs/core/managers/workbook-manager.cjs +38 -13
- package/dist/cjs/core/managers/workbook-manager.cjs.map +3 -3
- package/dist/cjs/core/map-serializer.cjs +19 -9
- package/dist/cjs/core/map-serializer.cjs.map +2 -2
- package/dist/cjs/core/named-expression-renamer.cjs +19 -9
- package/dist/cjs/core/named-expression-renamer.cjs.map +2 -2
- package/dist/cjs/core/resource-keys.cjs +67 -0
- package/dist/cjs/core/resource-keys.cjs.map +10 -0
- package/dist/cjs/core/schema/cell-orm.cjs +19 -9
- package/dist/cjs/core/schema/cell-orm.cjs.map +2 -2
- package/dist/cjs/core/schema/grid-orm.cjs +19 -9
- package/dist/cjs/core/schema/grid-orm.cjs.map +2 -2
- package/dist/cjs/core/schema/schema-builder.cjs +19 -9
- package/dist/cjs/core/schema/schema-builder.cjs.map +2 -2
- package/dist/cjs/core/schema/schema-helpers.cjs +19 -9
- package/dist/cjs/core/schema/schema-helpers.cjs.map +2 -2
- package/dist/cjs/core/schema/schema.cjs +19 -9
- package/dist/cjs/core/schema/schema.cjs.map +2 -2
- package/dist/cjs/core/schema/table-orm.cjs +19 -9
- package/dist/cjs/core/schema/table-orm.cjs.map +2 -2
- package/dist/cjs/core/sheet-renamer.cjs +19 -9
- package/dist/cjs/core/sheet-renamer.cjs.map +2 -2
- package/dist/cjs/core/sheet-utils.cjs +19 -9
- package/dist/cjs/core/sheet-utils.cjs.map +2 -2
- package/dist/cjs/core/table-renamer.cjs +19 -9
- package/dist/cjs/core/table-renamer.cjs.map +2 -2
- package/dist/cjs/core/types.cjs +19 -9
- package/dist/cjs/core/types.cjs.map +2 -2
- package/dist/cjs/core/utils/color-utils.cjs +19 -9
- package/dist/cjs/core/utils/color-utils.cjs.map +2 -2
- package/dist/cjs/core/utils/range-serializer.cjs +19 -9
- package/dist/cjs/core/utils/range-serializer.cjs.map +2 -2
- package/dist/cjs/core/utils/range-utils.cjs +19 -9
- package/dist/cjs/core/utils/range-utils.cjs.map +2 -2
- package/dist/cjs/core/utils/spreadsheet-visualizer.cjs +19 -9
- package/dist/cjs/core/utils/spreadsheet-visualizer.cjs.map +2 -2
- package/dist/cjs/core/utils.cjs +19 -9
- package/dist/cjs/core/utils.cjs.map +2 -2
- package/dist/cjs/core/workbook-renamer.cjs +19 -9
- package/dist/cjs/core/workbook-renamer.cjs.map +2 -2
- package/dist/cjs/debug/flags.cjs +19 -9
- package/dist/cjs/debug/flags.cjs.map +2 -2
- package/dist/cjs/evaluator/arithmetic/add/add.cjs +19 -9
- package/dist/cjs/evaluator/arithmetic/add/add.cjs.map +2 -2
- package/dist/cjs/evaluator/arithmetic/divide/divide.cjs +19 -9
- package/dist/cjs/evaluator/arithmetic/divide/divide.cjs.map +2 -2
- package/dist/cjs/evaluator/arithmetic/multiply/multiply.cjs +19 -9
- package/dist/cjs/evaluator/arithmetic/multiply/multiply.cjs.map +2 -2
- package/dist/cjs/evaluator/arithmetic/power/power.cjs +19 -9
- package/dist/cjs/evaluator/arithmetic/power/power.cjs.map +2 -2
- package/dist/cjs/evaluator/arithmetic/subtract/subtract.cjs +19 -9
- package/dist/cjs/evaluator/arithmetic/subtract/subtract.cjs.map +2 -2
- package/dist/cjs/evaluator/comparison/equals.cjs +19 -9
- package/dist/cjs/evaluator/comparison/equals.cjs.map +2 -2
- package/dist/cjs/evaluator/comparison/greater-than-or-equal.cjs +19 -9
- package/dist/cjs/evaluator/comparison/greater-than-or-equal.cjs.map +2 -2
- package/dist/cjs/evaluator/comparison/greater-than.cjs +19 -9
- package/dist/cjs/evaluator/comparison/greater-than.cjs.map +2 -2
- package/dist/cjs/evaluator/comparison/less-than-or-equal.cjs +19 -9
- package/dist/cjs/evaluator/comparison/less-than-or-equal.cjs.map +2 -2
- package/dist/cjs/evaluator/comparison/less-than.cjs +19 -9
- package/dist/cjs/evaluator/comparison/less-than.cjs.map +2 -2
- package/dist/cjs/evaluator/comparison/not-equals.cjs +19 -9
- package/dist/cjs/evaluator/comparison/not-equals.cjs.map +2 -2
- package/dist/cjs/evaluator/concatenation/concatenate.cjs +19 -9
- package/dist/cjs/evaluator/concatenation/concatenate.cjs.map +2 -2
- package/dist/cjs/evaluator/dependency-nodes/ast-evaluation-node.cjs +19 -9
- package/dist/cjs/evaluator/dependency-nodes/ast-evaluation-node.cjs.map +2 -2
- package/dist/cjs/evaluator/dependency-nodes/base-eval-node.cjs +35 -9
- package/dist/cjs/evaluator/dependency-nodes/base-eval-node.cjs.map +3 -3
- package/dist/cjs/evaluator/dependency-nodes/cell-value-node.cjs +22 -9
- package/dist/cjs/evaluator/dependency-nodes/cell-value-node.cjs.map +3 -3
- package/dist/cjs/evaluator/dependency-nodes/empty-cell-evaluation-node.cjs +35 -11
- package/dist/cjs/evaluator/dependency-nodes/empty-cell-evaluation-node.cjs.map +3 -3
- package/dist/cjs/evaluator/dependency-nodes/resource-dependency-node.cjs +61 -0
- package/dist/cjs/evaluator/dependency-nodes/resource-dependency-node.cjs.map +10 -0
- package/dist/cjs/evaluator/dependency-nodes/spill-meta-node.cjs +19 -9
- package/dist/cjs/evaluator/dependency-nodes/spill-meta-node.cjs.map +2 -2
- package/dist/cjs/evaluator/dependency-nodes/virtual-cell-value-node.cjs +22 -9
- package/dist/cjs/evaluator/dependency-nodes/virtual-cell-value-node.cjs.map +3 -3
- package/dist/cjs/evaluator/evaluate-scalar-operator.cjs +19 -9
- package/dist/cjs/evaluator/evaluate-scalar-operator.cjs.map +2 -2
- package/dist/cjs/evaluator/evaluation-context.cjs +19 -9
- package/dist/cjs/evaluator/evaluation-context.cjs.map +2 -2
- package/dist/cjs/evaluator/evaluation-error.cjs +19 -9
- package/dist/cjs/evaluator/evaluation-error.cjs.map +2 -2
- package/dist/cjs/evaluator/formula-evaluator.cjs +55 -12
- package/dist/cjs/evaluator/formula-evaluator.cjs.map +3 -3
- package/dist/cjs/evaluator/range-evaluation-node.cjs +35 -11
- package/dist/cjs/evaluator/range-evaluation-node.cjs.map +3 -3
- package/dist/cjs/functions/_template/template.cjs +19 -9
- package/dist/cjs/functions/_template/template.cjs.map +2 -2
- package/dist/cjs/functions/array/sequence/sequence.cjs +19 -9
- package/dist/cjs/functions/array/sequence/sequence.cjs.map +2 -2
- package/dist/cjs/functions/criteria-parser.cjs +19 -9
- package/dist/cjs/functions/criteria-parser.cjs.map +2 -2
- package/dist/cjs/functions/criteria-utils.cjs +19 -9
- package/dist/cjs/functions/criteria-utils.cjs.map +2 -2
- package/dist/cjs/functions/function-registry.cjs +19 -9
- package/dist/cjs/functions/function-registry.cjs.map +2 -2
- package/dist/cjs/functions/function-utils.cjs +19 -9
- package/dist/cjs/functions/function-utils.cjs.map +2 -2
- package/dist/cjs/functions/information/cell/cell.cjs +19 -9
- package/dist/cjs/functions/information/cell/cell.cjs.map +2 -2
- package/dist/cjs/functions/information/column/column.cjs +19 -9
- package/dist/cjs/functions/information/column/column.cjs.map +2 -2
- package/dist/cjs/functions/information/row/row.cjs +19 -9
- package/dist/cjs/functions/information/row/row.cjs.map +2 -2
- package/dist/cjs/functions/logical/and/and.cjs +19 -9
- package/dist/cjs/functions/logical/and/and.cjs.map +2 -2
- package/dist/cjs/functions/logical/if/if.cjs +19 -9
- package/dist/cjs/functions/logical/if/if.cjs.map +2 -2
- package/dist/cjs/functions/logical/iferror/iferror.cjs +19 -9
- package/dist/cjs/functions/logical/iferror/iferror.cjs.map +2 -2
- package/dist/cjs/functions/logical/or/or.cjs +19 -9
- package/dist/cjs/functions/logical/or/or.cjs.map +2 -2
- package/dist/cjs/functions/lookup/count/count-utils.cjs +19 -9
- package/dist/cjs/functions/lookup/count/count-utils.cjs.map +2 -2
- package/dist/cjs/functions/lookup/count/count.cjs +19 -9
- package/dist/cjs/functions/lookup/count/count.cjs.map +2 -2
- package/dist/cjs/functions/lookup/count/countif.cjs +19 -9
- package/dist/cjs/functions/lookup/count/countif.cjs.map +2 -2
- package/dist/cjs/functions/lookup/count/countifs.cjs +19 -9
- package/dist/cjs/functions/lookup/count/countifs.cjs.map +2 -2
- package/dist/cjs/functions/lookup/index-lookup/index-lookup.cjs +19 -9
- package/dist/cjs/functions/lookup/index-lookup/index-lookup.cjs.map +2 -2
- package/dist/cjs/functions/lookup/match/match.cjs +21 -10
- package/dist/cjs/functions/lookup/match/match.cjs.map +3 -3
- package/dist/cjs/functions/lookup/xlookup/xlookup.cjs +19 -9
- package/dist/cjs/functions/lookup/xlookup/xlookup.cjs.map +2 -2
- package/dist/cjs/functions/math/average/average-utils.cjs +19 -9
- package/dist/cjs/functions/math/average/average-utils.cjs.map +2 -2
- package/dist/cjs/functions/math/average/average.cjs +19 -9
- package/dist/cjs/functions/math/average/average.cjs.map +2 -2
- package/dist/cjs/functions/math/average/averageif.cjs +19 -9
- package/dist/cjs/functions/math/average/averageif.cjs.map +2 -2
- package/dist/cjs/functions/math/average/averageifs.cjs +19 -9
- package/dist/cjs/functions/math/average/averageifs.cjs.map +2 -2
- package/dist/cjs/functions/math/ceiling/ceiling.cjs +19 -9
- package/dist/cjs/functions/math/ceiling/ceiling.cjs.map +2 -2
- package/dist/cjs/functions/math/max/max-utils.cjs +19 -9
- package/dist/cjs/functions/math/max/max-utils.cjs.map +2 -2
- package/dist/cjs/functions/math/max/max.cjs +19 -9
- package/dist/cjs/functions/math/max/max.cjs.map +2 -2
- package/dist/cjs/functions/math/max/maxif.cjs +19 -9
- package/dist/cjs/functions/math/max/maxif.cjs.map +2 -2
- package/dist/cjs/functions/math/max/maxifs.cjs +19 -9
- package/dist/cjs/functions/math/max/maxifs.cjs.map +2 -2
- package/dist/cjs/functions/math/min/min-utils.cjs +19 -9
- package/dist/cjs/functions/math/min/min-utils.cjs.map +2 -2
- package/dist/cjs/functions/math/min/min.cjs +19 -9
- package/dist/cjs/functions/math/min/min.cjs.map +2 -2
- package/dist/cjs/functions/math/min/minif.cjs +19 -9
- package/dist/cjs/functions/math/min/minif.cjs.map +2 -2
- package/dist/cjs/functions/math/min/minifs.cjs +19 -9
- package/dist/cjs/functions/math/min/minifs.cjs.map +2 -2
- package/dist/cjs/functions/math/sum/sum.cjs +19 -9
- package/dist/cjs/functions/math/sum/sum.cjs.map +2 -2
- package/dist/cjs/functions/math/sum/sumif.cjs +19 -9
- package/dist/cjs/functions/math/sum/sumif.cjs.map +2 -2
- package/dist/cjs/functions/math/sum/sumifs.cjs +19 -9
- package/dist/cjs/functions/math/sum/sumifs.cjs.map +2 -2
- package/dist/cjs/functions/math/sum/summation-utils.cjs +19 -9
- package/dist/cjs/functions/math/sum/summation-utils.cjs.map +2 -2
- package/dist/cjs/functions/reference/address/address.cjs +19 -9
- package/dist/cjs/functions/reference/address/address.cjs.map +2 -2
- package/dist/cjs/functions/reference/indirect/indirect.cjs +19 -9
- package/dist/cjs/functions/reference/indirect/indirect.cjs.map +2 -2
- package/dist/cjs/functions/reference/offset/offset.cjs +19 -9
- package/dist/cjs/functions/reference/offset/offset.cjs.map +2 -2
- package/dist/cjs/functions/text/concatenate/concatenate.cjs +21 -9
- package/dist/cjs/functions/text/concatenate/concatenate.cjs.map +3 -3
- package/dist/cjs/functions/text/exact/exact.cjs +19 -9
- package/dist/cjs/functions/text/exact/exact.cjs.map +2 -2
- package/dist/cjs/functions/text/find/find.cjs +19 -9
- package/dist/cjs/functions/text/find/find.cjs.map +2 -2
- package/dist/cjs/functions/text/left/left.cjs +19 -9
- package/dist/cjs/functions/text/left/left.cjs.map +2 -2
- package/dist/cjs/functions/text/len/len.cjs +19 -9
- package/dist/cjs/functions/text/len/len.cjs.map +2 -2
- package/dist/cjs/functions/text/mid/mid.cjs +19 -9
- package/dist/cjs/functions/text/mid/mid.cjs.map +2 -2
- package/dist/cjs/functions/text/right/right.cjs +19 -9
- package/dist/cjs/functions/text/right/right.cjs.map +2 -2
- package/dist/cjs/functions/text/text-helpers.cjs +19 -9
- package/dist/cjs/functions/text/text-helpers.cjs.map +2 -2
- package/dist/cjs/functions/text/textjoin/textjoin.cjs +19 -9
- package/dist/cjs/functions/text/textjoin/textjoin.cjs.map +2 -2
- package/dist/cjs/lib.cjs +24 -13
- package/dist/cjs/lib.cjs.map +2 -2
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/parser/ast.cjs +19 -9
- package/dist/cjs/parser/ast.cjs.map +2 -2
- package/dist/cjs/parser/formatter.cjs +19 -9
- package/dist/cjs/parser/formatter.cjs.map +2 -2
- package/dist/cjs/parser/grammar.cjs +19 -9
- package/dist/cjs/parser/grammar.cjs.map +2 -2
- package/dist/cjs/parser/lexer.cjs +19 -9
- package/dist/cjs/parser/lexer.cjs.map +2 -2
- package/dist/cjs/parser/parser.cjs +19 -9
- package/dist/cjs/parser/parser.cjs.map +2 -2
- package/dist/cjs/react/hooks.cjs +31 -10
- package/dist/cjs/react/hooks.cjs.map +2 -2
- package/dist/mjs/core/commands/command-executor.mjs +7 -5
- package/dist/mjs/core/commands/command-executor.mjs.map +3 -3
- package/dist/mjs/core/commands/content-commands.mjs +279 -2
- package/dist/mjs/core/commands/content-commands.mjs.map +3 -3
- package/dist/mjs/core/commands/named-expression-commands.mjs +121 -6
- package/dist/mjs/core/commands/named-expression-commands.mjs.map +3 -3
- package/dist/mjs/core/commands/structure-commands.mjs +204 -8
- package/dist/mjs/core/commands/structure-commands.mjs.map +3 -3
- package/dist/mjs/core/commands/table-commands.mjs +117 -6
- package/dist/mjs/core/commands/table-commands.mjs.map +3 -3
- package/dist/mjs/core/commands/types.mjs +18 -1
- package/dist/mjs/core/commands/types.mjs.map +3 -3
- package/dist/mjs/core/engine-snapshot.mjs +11 -0
- package/dist/mjs/core/engine-snapshot.mjs.map +10 -0
- package/dist/mjs/core/engine.mjs +35 -26
- package/dist/mjs/core/engine.mjs.map +3 -3
- package/dist/mjs/core/managers/cache-manager.mjs +105 -1
- package/dist/mjs/core/managers/cache-manager.mjs.map +3 -3
- package/dist/mjs/core/managers/dependency-manager.mjs +687 -2
- package/dist/mjs/core/managers/dependency-manager.mjs.map +3 -3
- package/dist/mjs/core/managers/evaluation-manager.mjs +283 -4
- package/dist/mjs/core/managers/evaluation-manager.mjs.map +3 -3
- package/dist/mjs/core/managers/frontier-dependency-manager.mjs +47 -4
- package/dist/mjs/core/managers/frontier-dependency-manager.mjs.map +3 -3
- package/dist/mjs/core/managers/named-expression-manager.mjs +104 -21
- package/dist/mjs/core/managers/named-expression-manager.mjs.map +3 -3
- package/dist/mjs/core/managers/reference-manager.mjs +7 -1
- package/dist/mjs/core/managers/reference-manager.mjs.map +3 -3
- package/dist/mjs/core/managers/style-manager.mjs +10 -1
- package/dist/mjs/core/managers/style-manager.mjs.map +3 -3
- package/dist/mjs/core/managers/table-manager.mjs +7 -1
- package/dist/mjs/core/managers/table-manager.mjs.map +3 -3
- package/dist/mjs/core/managers/workbook-manager.mjs +20 -5
- package/dist/mjs/core/managers/workbook-manager.mjs.map +3 -3
- package/dist/mjs/core/resource-keys.mjs +27 -0
- package/dist/mjs/core/resource-keys.mjs.map +10 -0
- package/dist/mjs/evaluator/dependency-nodes/base-eval-node.mjs +17 -1
- package/dist/mjs/evaluator/dependency-nodes/base-eval-node.mjs.map +3 -3
- package/dist/mjs/evaluator/dependency-nodes/cell-value-node.mjs +4 -1
- package/dist/mjs/evaluator/dependency-nodes/cell-value-node.mjs.map +3 -3
- package/dist/mjs/evaluator/dependency-nodes/empty-cell-evaluation-node.mjs +17 -3
- package/dist/mjs/evaluator/dependency-nodes/empty-cell-evaluation-node.mjs.map +3 -3
- package/dist/mjs/evaluator/dependency-nodes/resource-dependency-node.mjs +21 -0
- package/dist/mjs/evaluator/dependency-nodes/resource-dependency-node.mjs.map +10 -0
- package/dist/mjs/evaluator/dependency-nodes/virtual-cell-value-node.mjs +4 -1
- package/dist/mjs/evaluator/dependency-nodes/virtual-cell-value-node.mjs.map +3 -3
- package/dist/mjs/evaluator/formula-evaluator.mjs +42 -4
- package/dist/mjs/evaluator/formula-evaluator.mjs.map +3 -3
- package/dist/mjs/evaluator/range-evaluation-node.mjs +17 -3
- package/dist/mjs/evaluator/range-evaluation-node.mjs.map +3 -3
- package/dist/mjs/functions/lookup/match/match.mjs +3 -2
- package/dist/mjs/functions/lookup/match/match.mjs.map +3 -3
- package/dist/mjs/functions/text/concatenate/concatenate.mjs +3 -1
- package/dist/mjs/functions/text/concatenate/concatenate.mjs.map +3 -3
- package/dist/mjs/package.json +1 -1
- package/dist/types/core/commands/content-commands.d.ts +31 -1
- package/dist/types/core/commands/named-expression-commands.d.ts +16 -1
- package/dist/types/core/commands/structure-commands.d.ts +24 -1
- package/dist/types/core/commands/table-commands.d.ts +16 -1
- package/dist/types/core/commands/types.d.ts +25 -1
- package/dist/types/core/engine-snapshot.d.ts +138 -0
- package/dist/types/core/engine.d.ts +1 -0
- package/dist/types/core/managers/cache-manager.d.ts +9 -0
- package/dist/types/core/managers/dependency-manager.d.ts +56 -1
- package/dist/types/core/managers/dependency-node.d.ts +2 -1
- package/dist/types/core/managers/evaluation-manager.d.ts +21 -1
- package/dist/types/core/managers/frontier-dependency-manager.d.ts +12 -2
- package/dist/types/core/managers/named-expression-manager.d.ts +17 -1
- package/dist/types/core/managers/reference-manager.d.ts +3 -0
- package/dist/types/core/managers/style-manager.d.ts +3 -0
- package/dist/types/core/managers/table-manager.d.ts +3 -0
- package/dist/types/core/managers/workbook-manager.d.ts +4 -1
- package/dist/types/core/resource-keys.d.ts +14 -0
- package/dist/types/evaluator/dependency-nodes/base-eval-node.d.ts +5 -0
- package/dist/types/evaluator/dependency-nodes/cell-value-node.d.ts +1 -0
- package/dist/types/evaluator/dependency-nodes/empty-cell-evaluation-node.d.ts +8 -1
- package/dist/types/evaluator/dependency-nodes/resource-dependency-node.d.ts +8 -0
- package/dist/types/evaluator/dependency-nodes/virtual-cell-value-node.d.ts +1 -0
- package/dist/types/evaluator/range-evaluation-node.d.ts +8 -1
- package/package.json +6 -2
|
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
6
8
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
10
|
if (entry)
|
|
9
11
|
return entry;
|
|
10
12
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
__moduleCache.set(from, entry);
|
|
17
22
|
return entry;
|
|
18
23
|
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
19
29
|
var __export = (target, all) => {
|
|
20
30
|
for (var name in all)
|
|
21
31
|
__defProp(target, name, {
|
|
22
32
|
get: all[name],
|
|
23
33
|
enumerable: true,
|
|
24
34
|
configurable: true,
|
|
25
|
-
set: (
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -80,4 +90,4 @@ var MAXIF = {
|
|
|
80
90
|
}
|
|
81
91
|
};
|
|
82
92
|
|
|
83
|
-
//# debugId=
|
|
93
|
+
//# debugId=262E8E56CB9900A264756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import {\n FormulaError,\n type FunctionDefinition,\n type FunctionEvaluationResult,\n} from \"../../../core/types.cjs\";\nimport type { EvaluationContext } from \"../../../evaluator/evaluation-context.cjs\";\nimport {\n processMultiCriteriaValues,\n validateSingleCriteriaArgs,\n} from \"../../criteria-utils.cjs\";\nimport { parseCriteria, matchesParsedCriteria } from \"../../criteria-parser.cjs\";\nimport { performMaximum } from \"./max-utils.cjs\";\n\n/**\n * MAXIF function - Returns the maximum value among cells specified by a criteria\n *\n * Usage: MAXIF(range, criteria, [max_range])\n *\n * range: The range of cells to evaluate against the criteria\n * criteria: The criteria to match against. Can be:\n * - Exact value: \"Apple\", 42\n * - Comparison: \">10\", \"<=5\", \"<>0\"\n * - Wildcards: \"App*\", \"?ruit\"\n * max_range: Optional. The range to find maximum from. If omitted, uses the range parameter\n *\n * Examples:\n * MAXIF(A1:A10, \"Apple\") - max of cells in A1:A10 that contain \"Apple\"\n * MAXIF(B1:B10, \">10\") - max of cells in B1:B10 with values greater than 10\n * MAXIF(A1:A10, \"Apple\", B1:B10) - max of B1:B10 where A1:A10 contains \"Apple\"\n *\n * Note:\n * - Only numeric values are considered for the maximum\n * - Returns error if no values match the criteria\n */\nexport const MAXIF: FunctionDefinition = {\n name: \"MAXIF\",\n evaluate: function (node, context): FunctionEvaluationResult {\n // Validate arguments\n const argError = validateSingleCriteriaArgs(\"MAXIF\", node.args.length, context);\n if (argError) {\n return argError;\n }\n\n // Evaluate criteria range (first argument)\n const criteriaRangeResult = this.evaluateNode(node.args[0]!, context);\n if (criteriaRangeResult.type === \"error\") {\n return criteriaRangeResult;\n }\n\n // Evaluate criteria (second argument)\n const criteriaResult = this.evaluateNode(node.args[1]!, context);\n if (criteriaResult.type === \"error\") {\n return criteriaResult;\n }\n\n if (criteriaResult.type !== \"value\") {\n return {\n type: \"error\",\n err: FormulaError.VALUE,\n message: \"MAXIF criteria must be a single value\",\n errAddress: context.dependencyNode,\n };\n }\n\n // Parse criteria\n const parsedCriteria = parseCriteria(criteriaResult.result);\n if (parsedCriteria.type === \"error\") {\n return {\n type: \"error\",\n err: FormulaError.VALUE,\n message: parsedCriteria.message,\n errAddress: context.dependencyNode,\n };\n }\n\n // Determine max range (third argument if present, otherwise same as criteria range)\n const maxRangeResult =\n node.args.length === 3\n ? this.evaluateNode(node.args[2]!, context)\n : criteriaRangeResult;\n\n if (maxRangeResult.type === \"error\") {\n return maxRangeResult;\n }\n\n // Use shared maximum utility\n const matchingValues = processMultiCriteriaValues(\n this,\n maxRangeResult,\n [{ rangeResult: criteriaRangeResult, parsedCriteria }],\n context,\n \"col-major\"\n );\n\n if (matchingValues.type === \"error\" || matchingValues.type === \"awaiting-evaluation\") {\n return matchingValues;\n }\n\n return performMaximum(matchingValues.values, context);\n },\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,IAJP;AASO,IAHP;AAIqD,IAArD;AAC+B,IAA/B;AAuBO,IAAM,QAA4B;AAAA,EACvC,MAAM;AAAA,EACN,UAAU,QAAS,CAAC,MAAM,SAAmC;AAAA,IAE3D,MAAM,WAAW,iDAA2B,SAAS,KAAK,KAAK,QAAQ,OAAO;AAAA,IAC9E,IAAI,UAAU;AAAA,MACZ,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,sBAAsB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO;AAAA,IACpE,IAAI,oBAAoB,SAAS,SAAS;AAAA,MACxC,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,iBAAiB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO;AAAA,IAC/D,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IAEA,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,QACL,MAAM;AAAA,QACN,KAAK,0BAAa;AAAA,QAClB,SAAS;AAAA,QACT,YAAY,QAAQ;AAAA,MACtB;AAAA,IACF;AAAA,IAGA,MAAM,iBAAiB,qCAAc,eAAe,MAAM;AAAA,IAC1D,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,QACL,MAAM;AAAA,QACN,KAAK,0BAAa;AAAA,QAClB,SAAS,eAAe;AAAA,QACxB,YAAY,QAAQ;AAAA,MACtB;AAAA,IACF;AAAA,IAGA,MAAM,iBACJ,KAAK,KAAK,WAAW,IACjB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO,IACxC;AAAA,IAEN,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,iBAAiB,iDACrB,MACA,gBACA,CAAC,EAAE,aAAa,qBAAqB,eAAe,CAAC,GACrD,SACA,WACF;AAAA,IAEA,IAAI,eAAe,SAAS,WAAW,eAAe,SAAS,uBAAuB;AAAA,MACpF,OAAO;AAAA,IACT;AAAA,IAEA,OAAO,gCAAe,eAAe,QAAQ,OAAO;AAAA;AAExD;",
|
|
8
|
+
"debugId": "262E8E56CB9900A264756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
6
8
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
10
|
if (entry)
|
|
9
11
|
return entry;
|
|
10
12
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
__moduleCache.set(from, entry);
|
|
17
22
|
return entry;
|
|
18
23
|
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
19
29
|
var __export = (target, all) => {
|
|
20
30
|
for (var name in all)
|
|
21
31
|
__defProp(target, name, {
|
|
22
32
|
get: all[name],
|
|
23
33
|
enumerable: true,
|
|
24
34
|
configurable: true,
|
|
25
|
-
set: (
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -58,4 +68,4 @@ var MAXIFS = {
|
|
|
58
68
|
}
|
|
59
69
|
};
|
|
60
70
|
|
|
61
|
-
//# debugId=
|
|
71
|
+
//# debugId=D7C671E26CF1C72E64756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import {\n type FunctionDefinition,\n type FunctionEvaluationResult\n} from \"../../../core/types.cjs\";\nimport {\n parseCriteriaPairs,\n processMultiCriteriaValues,\n validateMultiCriteriaArgs,\n} from \"../../criteria-utils.cjs\";\nimport { performMaximum } from \"./max-utils.cjs\";\n\n/**\n * MAXIFS function - Returns the maximum value among cells specified by multiple criteria\n *\n * Usage: MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)\n *\n * max_range: The range of cells from which you want the maximum\n * criteria_range1: The first range in which to evaluate criteria\n * criteria1: The criteria to apply to criteria_range1\n * criteria_range2, criteria2: Optional additional criteria pairs\n *\n * Examples:\n * MAXIFS(B1:B10, A1:A10, \"Apple\") - max of B1:B10 where A1:A10 = \"Apple\"\n * MAXIFS(C1:C10, A1:A10, \"Apple\", B1:B10, \">10\") - max of C1:C10 where A1:A10 = \"Apple\" AND B1:B10 > 10\n *\n * Note:\n * - All criteria must be satisfied for a value to be included\n * - Only numeric values are considered for the maximum\n * - Returns error if no values match all criteria\n */\nexport const MAXIFS: FunctionDefinition = {\n name: \"MAXIFS\",\n evaluate: function (node, context): FunctionEvaluationResult {\n // Validate arguments using utility\n const argError = validateMultiCriteriaArgs(\"MAXIFS\", node.args.length, context);\n if (argError) {\n return argError;\n }\n\n // Evaluate max range\n const maxRangeResult = this.evaluateNode(node.args[0]!, context);\n if (maxRangeResult.type === \"error\") {\n return maxRangeResult;\n }\n\n // Parse criteria pairs using utility\n const criteriaPairsResult = parseCriteriaPairs.call(\n this,\n node,\n context,\n this.evaluateNode,\n 1\n );\n if (\"type\" in criteriaPairsResult) {\n return criteriaPairsResult;\n }\n const criteriaPairs = criteriaPairsResult;\n\n // Use shared maximum utility for standard cases\n const matchingValues = processMultiCriteriaValues(\n this,\n maxRangeResult,\n criteriaPairs,\n context,\n \"col-major\"\n );\n\n if (matchingValues.type === \"error\" || matchingValues.type === \"awaiting-evaluation\") {\n return matchingValues;\n }\n\n return performMaximum(matchingValues.values, context);\n },\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,IAJP;AAK+B,IAA/B;AAqBO,IAAM,SAA6B;AAAA,EACxC,MAAM;AAAA,EACN,UAAU,QAAS,CAAC,MAAM,SAAmC;AAAA,IAE3D,MAAM,WAAW,gDAA0B,UAAU,KAAK,KAAK,QAAQ,OAAO;AAAA,IAC9E,IAAI,UAAU;AAAA,MACZ,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,iBAAiB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO;AAAA,IAC/D,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,sBAAsB,yCAAmB,KAC7C,MACA,MACA,SACA,KAAK,cACL,CACF;AAAA,IACA,IAAI,UAAU,qBAAqB;AAAA,MACjC,OAAO;AAAA,IACT;AAAA,IACA,MAAM,gBAAgB;AAAA,IAGtB,MAAM,iBAAiB,iDACrB,MACA,gBACA,eACA,SACA,WACF;AAAA,IAEA,IAAI,eAAe,SAAS,WAAW,eAAe,SAAS,uBAAuB;AAAA,MACpF,OAAO;AAAA,IACT;AAAA,IAEA,OAAO,gCAAe,eAAe,QAAQ,OAAO;AAAA;AAExD;",
|
|
8
|
+
"debugId": "D7C671E26CF1C72E64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
6
8
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
10
|
if (entry)
|
|
9
11
|
return entry;
|
|
10
12
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
__moduleCache.set(from, entry);
|
|
17
22
|
return entry;
|
|
18
23
|
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
19
29
|
var __export = (target, all) => {
|
|
20
30
|
for (var name in all)
|
|
21
31
|
__defProp(target, name, {
|
|
22
32
|
get: all[name],
|
|
23
33
|
enumerable: true,
|
|
24
34
|
configurable: true,
|
|
25
|
-
set: (
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -68,4 +78,4 @@ function performMinimum(results, context) {
|
|
|
68
78
|
};
|
|
69
79
|
}
|
|
70
80
|
|
|
71
|
-
//# debugId=
|
|
81
|
+
//# debugId=18C7F2D66E029D1064756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import {\n FormulaError,\n type FunctionEvaluationResult,\n type SingleEvaluationResult,\n type CellInfinity,\n} from \"../../../core/types.cjs\";\nimport type { EvaluationContext } from \"../../../evaluator/evaluation-context.cjs\";\nimport type { FormulaEvaluator } from \"../../../evaluator/formula-evaluator.cjs\";\nimport type { FunctionNode } from \"../../../parser/ast.cjs\";\n\n/**\n * Result type for processInfinity in min functions\n */\nexport type ProcessInfinityResult<T> =\n | { type: \"infinity\"; infinity: CellInfinity }\n | { type: \"state\"; state: T };\n\n/**\n * Perform minimum calculation over an iterator of SingleEvaluationResults\n * Handles the common logic shared by MIN, MINIF, MINIFS functions\n *\n * @param results - Iterator of SingleEvaluationResults to find minimum from\n * @returns FunctionEvaluationResult with the minimum, infinity, or error\n */\nexport function performMinimum(\n results: Iterable<SingleEvaluationResult>,\n context: EvaluationContext\n): FunctionEvaluationResult {\n let minValue = Infinity;\n let hasValues = false;\n\n for (const result of results) {\n if (result.type === \"error\") {\n // Propagate errors immediately\n return result;\n }\n\n if (result.type === \"value\") {\n if (result.result.type === \"number\") {\n minValue = Math.min(minValue, result.result.value);\n hasValues = true;\n } else if (result.result.type === \"infinity\") {\n if (result.result.sign === \"negative\") {\n // Negative infinity is always the minimum - return immediately\n return {\n type: \"value\",\n result: result.result,\n };\n }\n // Positive infinity doesn't change the minimum\n }\n // Non-numeric values (strings, booleans) are ignored in minimum calculation\n }\n }\n\n if (!hasValues) {\n return {\n type: \"error\",\n err: FormulaError.VALUE,\n message: \"No numeric values found\",\n errAddress: context.dependencyNode,\n };\n }\n\n return {\n type: \"value\",\n result: { type: \"number\", value: minValue },\n };\n}\n\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IALP;AAwBO,SAAS,cAAc,CAC5B,SACA,SAC0B;AAAA,EAC1B,IAAI,WAAW;AAAA,EACf,IAAI,YAAY;AAAA,EAEhB,WAAW,UAAU,SAAS;AAAA,IAC5B,IAAI,OAAO,SAAS,SAAS;AAAA,MAE3B,OAAO;AAAA,IACT;AAAA,IAEA,IAAI,OAAO,SAAS,SAAS;AAAA,MAC3B,IAAI,OAAO,OAAO,SAAS,UAAU;AAAA,QACnC,WAAW,KAAK,IAAI,UAAU,OAAO,OAAO,KAAK;AAAA,QACjD,YAAY;AAAA,MACd,EAAO,SAAI,OAAO,OAAO,SAAS,YAAY;AAAA,QAC5C,IAAI,OAAO,OAAO,SAAS,YAAY;AAAA,UAErC,OAAO;AAAA,YACL,MAAM;AAAA,YACN,QAAQ,OAAO;AAAA,UACjB;AAAA,QACF;AAAA,MAEF;AAAA,IAEF;AAAA,EACF;AAAA,EAEA,IAAI,CAAC,WAAW;AAAA,IACd,OAAO;AAAA,MACL,MAAM;AAAA,MACN,KAAK,0BAAa;AAAA,MAClB,SAAS;AAAA,MACT,YAAY,QAAQ;AAAA,IACtB;AAAA,EACF;AAAA,EAEA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,EAAE,MAAM,UAAU,OAAO,SAAS;AAAA,EAC5C;AAAA;",
|
|
8
|
+
"debugId": "18C7F2D66E029D1064756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
6
8
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
10
|
if (entry)
|
|
9
11
|
return entry;
|
|
10
12
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
__moduleCache.set(from, entry);
|
|
17
22
|
return entry;
|
|
18
23
|
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
19
29
|
var __export = (target, all) => {
|
|
20
30
|
for (var name in all)
|
|
21
31
|
__defProp(target, name, {
|
|
22
32
|
get: all[name],
|
|
23
33
|
enumerable: true,
|
|
24
34
|
configurable: true,
|
|
25
|
-
set: (
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -45,4 +55,4 @@ var MIN = {
|
|
|
45
55
|
}
|
|
46
56
|
};
|
|
47
57
|
|
|
48
|
-
//# debugId=
|
|
58
|
+
//# debugId=3AC6A27B851D99B964756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { type FunctionDefinition } from \"../../../core/types.cjs\";\nimport { createArgumentIterator } from \"../../../functions/function-utils.cjs\";\nimport { performMinimum } from \"./min-utils.cjs\";\n\n/**\n * MIN function - Returns the smallest number in the arguments\n */\nexport const MIN: FunctionDefinition = {\n name: \"MIN\",\n evaluate: function (node, context) {\n // Create iterator from all arguments\n const argumentIterator = createArgumentIterator(\n this,\n node,\n context,\n \"col-major\"\n );\n\n if (argumentIterator.type !== \"values\") {\n return argumentIterator;\n }\n\n // Perform minimum calculation (now with unified error propagation)\n return performMinimum(argumentIterator.values, context);\n },\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACuC,IAAvC;AAC+B,IAA/B;AAKO,IAAM,MAA0B;AAAA,EACrC,MAAM;AAAA,EACN,UAAU,QAAS,CAAC,MAAM,SAAS;AAAA,IAEjC,MAAM,mBAAmB,6CACvB,MACA,MACA,SACA,WACF;AAAA,IAEA,IAAI,iBAAiB,SAAS,UAAU;AAAA,MACtC,OAAO;AAAA,IACT;AAAA,IAGA,OAAO,gCAAe,iBAAiB,QAAQ,OAAO;AAAA;AAE1D;",
|
|
8
|
+
"debugId": "3AC6A27B851D99B964756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
6
8
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
10
|
if (entry)
|
|
9
11
|
return entry;
|
|
10
12
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
__moduleCache.set(from, entry);
|
|
17
22
|
return entry;
|
|
18
23
|
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
19
29
|
var __export = (target, all) => {
|
|
20
30
|
for (var name in all)
|
|
21
31
|
__defProp(target, name, {
|
|
22
32
|
get: all[name],
|
|
23
33
|
enumerable: true,
|
|
24
34
|
configurable: true,
|
|
25
|
-
set: (
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -80,4 +90,4 @@ var MINIF = {
|
|
|
80
90
|
}
|
|
81
91
|
};
|
|
82
92
|
|
|
83
|
-
//# debugId=
|
|
93
|
+
//# debugId=CB84C7EE1BB34CAE64756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import {\n FormulaError,\n type FunctionDefinition,\n type FunctionEvaluationResult,\n} from \"../../../core/types.cjs\";\nimport type { EvaluationContext } from \"../../../evaluator/evaluation-context.cjs\";\nimport {\n processMultiCriteriaValues,\n validateSingleCriteriaArgs,\n} from \"../../criteria-utils.cjs\";\nimport { parseCriteria, matchesParsedCriteria } from \"../../criteria-parser.cjs\";\nimport { performMinimum } from \"./min-utils.cjs\";\n\n/**\n * MINIF function - Returns the minimum value among cells specified by a criteria\n *\n * Usage: MINIF(range, criteria, [min_range])\n *\n * range: The range of cells to evaluate against the criteria\n * criteria: The criteria to match against. Can be:\n * - Exact value: \"Apple\", 42\n * - Comparison: \">10\", \"<=5\", \"<>0\"\n * - Wildcards: \"App*\", \"?ruit\"\n * min_range: Optional. The range to find minimum from. If omitted, uses the range parameter\n *\n * Examples:\n * MINIF(A1:A10, \"Apple\") - min of cells in A1:A10 that contain \"Apple\"\n * MINIF(B1:B10, \">10\") - min of cells in B1:B10 with values greater than 10\n * MINIF(A1:A10, \"Apple\", B1:B10) - min of B1:B10 where A1:A10 contains \"Apple\"\n *\n * Note:\n * - Only numeric values are considered for the minimum\n * - Returns error if no values match the criteria\n */\nexport const MINIF: FunctionDefinition = {\n name: \"MINIF\",\n evaluate: function (node, context): FunctionEvaluationResult {\n // Validate arguments\n const argError = validateSingleCriteriaArgs(\"MINIF\", node.args.length, context);\n if (argError) {\n return argError;\n }\n\n // Evaluate criteria range (first argument)\n const criteriaRangeResult = this.evaluateNode(node.args[0]!, context);\n if (criteriaRangeResult.type === \"error\") {\n return criteriaRangeResult;\n }\n\n // Evaluate criteria (second argument)\n const criteriaResult = this.evaluateNode(node.args[1]!, context);\n if (criteriaResult.type === \"error\") {\n return criteriaResult;\n }\n\n if (criteriaResult.type !== \"value\") {\n return {\n type: \"error\",\n err: FormulaError.VALUE,\n message: \"MINIF criteria must be a single value\",\n errAddress: context.dependencyNode,\n };\n }\n\n // Parse criteria\n const parsedCriteria = parseCriteria(criteriaResult.result);\n if (parsedCriteria.type === \"error\") {\n return {\n type: \"error\",\n err: FormulaError.VALUE,\n message: parsedCriteria.message,\n errAddress: context.dependencyNode,\n };\n }\n\n // Determine min range (third argument if present, otherwise same as criteria range)\n const minRangeResult =\n node.args.length === 3\n ? this.evaluateNode(node.args[2]!, context)\n : criteriaRangeResult;\n\n if (minRangeResult.type === \"error\") {\n return minRangeResult;\n }\n\n // Use shared minimum utility for standard cases\n const matchingValues = processMultiCriteriaValues(\n this,\n minRangeResult,\n [{ rangeResult: criteriaRangeResult, parsedCriteria }],\n context,\n \"col-major\"\n );\n\n if (matchingValues.type === \"error\" || matchingValues.type === \"awaiting-evaluation\") {\n return matchingValues;\n }\n\n return performMinimum(matchingValues.values, context);\n },\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,IAJP;AASO,IAHP;AAIqD,IAArD;AAC+B,IAA/B;AAuBO,IAAM,QAA4B;AAAA,EACvC,MAAM;AAAA,EACN,UAAU,QAAS,CAAC,MAAM,SAAmC;AAAA,IAE3D,MAAM,WAAW,iDAA2B,SAAS,KAAK,KAAK,QAAQ,OAAO;AAAA,IAC9E,IAAI,UAAU;AAAA,MACZ,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,sBAAsB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO;AAAA,IACpE,IAAI,oBAAoB,SAAS,SAAS;AAAA,MACxC,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,iBAAiB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO;AAAA,IAC/D,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IAEA,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,QACL,MAAM;AAAA,QACN,KAAK,0BAAa;AAAA,QAClB,SAAS;AAAA,QACT,YAAY,QAAQ;AAAA,MACtB;AAAA,IACF;AAAA,IAGA,MAAM,iBAAiB,qCAAc,eAAe,MAAM;AAAA,IAC1D,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,QACL,MAAM;AAAA,QACN,KAAK,0BAAa;AAAA,QAClB,SAAS,eAAe;AAAA,QACxB,YAAY,QAAQ;AAAA,MACtB;AAAA,IACF;AAAA,IAGA,MAAM,iBACJ,KAAK,KAAK,WAAW,IACjB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO,IACxC;AAAA,IAEN,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,iBAAiB,iDACrB,MACA,gBACA,CAAC,EAAE,aAAa,qBAAqB,eAAe,CAAC,GACrD,SACA,WACF;AAAA,IAEA,IAAI,eAAe,SAAS,WAAW,eAAe,SAAS,uBAAuB;AAAA,MACpF,OAAO;AAAA,IACT;AAAA,IAEA,OAAO,gCAAe,eAAe,QAAQ,OAAO;AAAA;AAExD;",
|
|
8
|
+
"debugId": "CB84C7EE1BB34CAE64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
6
8
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
10
|
if (entry)
|
|
9
11
|
return entry;
|
|
10
12
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
__moduleCache.set(from, entry);
|
|
17
22
|
return entry;
|
|
18
23
|
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
19
29
|
var __export = (target, all) => {
|
|
20
30
|
for (var name in all)
|
|
21
31
|
__defProp(target, name, {
|
|
22
32
|
get: all[name],
|
|
23
33
|
enumerable: true,
|
|
24
34
|
configurable: true,
|
|
25
|
-
set: (
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -58,4 +68,4 @@ var MINIFS = {
|
|
|
58
68
|
}
|
|
59
69
|
};
|
|
60
70
|
|
|
61
|
-
//# debugId=
|
|
71
|
+
//# debugId=DFDD5123A9D34DC964756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import {\n type FunctionDefinition,\n type FunctionEvaluationResult\n} from \"../../../core/types.cjs\";\nimport {\n parseCriteriaPairs,\n processMultiCriteriaValues,\n validateMultiCriteriaArgs,\n} from \"../../criteria-utils.cjs\";\nimport { performMinimum } from \"./min-utils.cjs\";\n\n/**\n * MINIFS function - Returns the minimum value among cells specified by multiple criteria\n *\n * Usage: MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)\n *\n * min_range: The range of cells from which you want the minimum\n * criteria_range1: The first range in which to evaluate criteria\n * criteria1: The criteria to apply to criteria_range1\n * criteria_range2, criteria2: Optional additional criteria pairs\n *\n * Examples:\n * MINIFS(B1:B10, A1:A10, \"Apple\") - min of B1:B10 where A1:A10 = \"Apple\"\n * MINIFS(C1:C10, A1:A10, \"Apple\", B1:B10, \">10\") - min of C1:C10 where A1:A10 = \"Apple\" AND B1:B10 > 10\n *\n * Note:\n * - All criteria must be satisfied for a value to be included\n * - Only numeric values are considered for the minimum\n * - Returns error if no values match all criteria\n */\nexport const MINIFS: FunctionDefinition = {\n name: \"MINIFS\",\n evaluate: function (node, context): FunctionEvaluationResult {\n // Validate arguments using utility\n const argError = validateMultiCriteriaArgs(\"MINIFS\", node.args.length, context);\n if (argError) {\n return argError;\n }\n\n // Evaluate min range\n const minRangeResult = this.evaluateNode(node.args[0]!, context);\n if (minRangeResult.type === \"error\") {\n return minRangeResult;\n }\n\n // Parse criteria pairs using utility\n const criteriaPairsResult = parseCriteriaPairs.call(\n this,\n node,\n context,\n this.evaluateNode,\n 1\n );\n if (\"type\" in criteriaPairsResult) {\n return criteriaPairsResult;\n }\n const criteriaPairs = criteriaPairsResult;\n\n // Use shared minimum utility for standard cases\n const matchingValues = processMultiCriteriaValues(\n this,\n minRangeResult,\n criteriaPairs,\n context,\n \"col-major\"\n );\n\n if (matchingValues.type === \"error\" || matchingValues.type === \"awaiting-evaluation\") {\n return matchingValues;\n }\n\n return performMinimum(matchingValues.values, context);\n },\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,IAJP;AAK+B,IAA/B;AAqBO,IAAM,SAA6B;AAAA,EACxC,MAAM;AAAA,EACN,UAAU,QAAS,CAAC,MAAM,SAAmC;AAAA,IAE3D,MAAM,WAAW,gDAA0B,UAAU,KAAK,KAAK,QAAQ,OAAO;AAAA,IAC9E,IAAI,UAAU;AAAA,MACZ,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,iBAAiB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO;AAAA,IAC/D,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,sBAAsB,yCAAmB,KAC7C,MACA,MACA,SACA,KAAK,cACL,CACF;AAAA,IACA,IAAI,UAAU,qBAAqB;AAAA,MACjC,OAAO;AAAA,IACT;AAAA,IACA,MAAM,gBAAgB;AAAA,IAGtB,MAAM,iBAAiB,iDACrB,MACA,gBACA,eACA,SACA,WACF;AAAA,IAEA,IAAI,eAAe,SAAS,WAAW,eAAe,SAAS,uBAAuB;AAAA,MACpF,OAAO;AAAA,IACT;AAAA,IAEA,OAAO,gCAAe,eAAe,QAAQ,OAAO;AAAA;AAExD;",
|
|
8
|
+
"debugId": "DFDD5123A9D34DC964756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
6
8
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
10
|
if (entry)
|
|
9
11
|
return entry;
|
|
10
12
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
__moduleCache.set(from, entry);
|
|
17
22
|
return entry;
|
|
18
23
|
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
19
29
|
var __export = (target, all) => {
|
|
20
30
|
for (var name in all)
|
|
21
31
|
__defProp(target, name, {
|
|
22
32
|
get: all[name],
|
|
23
33
|
enumerable: true,
|
|
24
34
|
configurable: true,
|
|
25
|
-
set: (
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -45,4 +55,4 @@ var SUM = {
|
|
|
45
55
|
}
|
|
46
56
|
};
|
|
47
57
|
|
|
48
|
-
//# debugId=
|
|
58
|
+
//# debugId=51B61D1BCEB4EDF664756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { type FunctionDefinition } from \"../../../core/types.cjs\";\nimport { performSummation } from \"./summation-utils.cjs\";\nimport { createArgumentIterator } from \"../../function-utils.cjs\";\n\n/**\n * SUM function - Adds all numbers in the arguments\n */\nexport const SUM: FunctionDefinition = {\n name: \"SUM\",\n evaluate: function (node, context) {\n // Create iterator from all arguments\n const argumentIterator = createArgumentIterator(\n this,\n node,\n context,\n \"col-major\"\n );\n\n if (argumentIterator.type !== \"values\") {\n return argumentIterator;\n }\n\n // Perform summation with error propagation (SUM propagates errors from direct arguments)\n return performSummation(argumentIterator.values);\n },\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACiC,IAAjC;AACuC,IAAvC;AAKO,IAAM,MAA0B;AAAA,EACrC,MAAM;AAAA,EACN,UAAU,QAAS,CAAC,MAAM,SAAS;AAAA,IAEjC,MAAM,mBAAmB,6CACvB,MACA,MACA,SACA,WACF;AAAA,IAEA,IAAI,iBAAiB,SAAS,UAAU;AAAA,MACtC,OAAO;AAAA,IACT;AAAA,IAGA,OAAO,wCAAiB,iBAAiB,MAAM;AAAA;AAEnD;",
|
|
8
|
+
"debugId": "51B61D1BCEB4EDF664756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
6
8
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
10
|
if (entry)
|
|
9
11
|
return entry;
|
|
10
12
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
__moduleCache.set(from, entry);
|
|
17
22
|
return entry;
|
|
18
23
|
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
19
29
|
var __export = (target, all) => {
|
|
20
30
|
for (var name in all)
|
|
21
31
|
__defProp(target, name, {
|
|
22
32
|
get: all[name],
|
|
23
33
|
enumerable: true,
|
|
24
34
|
configurable: true,
|
|
25
|
-
set: (
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -80,4 +90,4 @@ var SUMIF = {
|
|
|
80
90
|
}
|
|
81
91
|
};
|
|
82
92
|
|
|
83
|
-
//# debugId=
|
|
93
|
+
//# debugId=1DD7C221B0ADC88D64756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import {\n FormulaError,\n type FunctionDefinition,\n type FunctionEvaluationResult,\n} from \"../../../core/types.cjs\";\nimport type { EvaluationContext } from \"../../../evaluator/evaluation-context.cjs\";\nimport {\n processMultiCriteriaValues,\n validateSingleCriteriaArgs,\n} from \"../../criteria-utils.cjs\";\nimport { parseCriteria, matchesParsedCriteria } from \"../../criteria-parser.cjs\";\nimport { performSummation } from \"./summation-utils.cjs\";\n\n/**\n * SUMIF function - Sums cells in a range that meet a criteria\n *\n * Usage: SUMIF(range, criteria, [sum_range])\n *\n * range: The range of cells to evaluate against the criteria\n * criteria: The criteria to match against. Can be:\n * - Exact value: \"Apple\", 42\n * - Comparison: \">10\", \"<=5\", \"<>0\"\n * - Wildcards: \"App*\", \"?ruit\"\n * sum_range: Optional. The range to sum. If omitted, uses the range parameter\n *\n * Examples:\n * SUMIF(A1:A10, \"Apple\") - sums cells in A1:A10 that contain \"Apple\"\n * SUMIF(B1:B10, \">10\") - sums cells in B1:B10 with values greater than 10\n * SUMIF(A1:A10, \"Apple\", B1:B10) - sums B1:B10 where A1:A10 contains \"Apple\"\n *\n * Note:\n * - Only numeric values are included in the sum\n * - Returns 0 if no values match the criteria\n */\nexport const SUMIF: FunctionDefinition = {\n name: \"SUMIF\",\n evaluate: function (node, context): FunctionEvaluationResult {\n // Validate arguments\n const argError = validateSingleCriteriaArgs(\"SUMIF\", node.args.length, context);\n if (argError) {\n return argError;\n }\n\n // Evaluate criteria range (first argument)\n const criteriaRangeResult = this.evaluateNode(node.args[0]!, context);\n if (criteriaRangeResult.type === \"error\") {\n return criteriaRangeResult;\n }\n\n // Evaluate criteria (second argument)\n const criteriaResult = this.evaluateNode(node.args[1]!, context);\n if (criteriaResult.type === \"error\") {\n return criteriaResult;\n }\n\n if (criteriaResult.type !== \"value\") {\n return {\n type: \"error\",\n err: FormulaError.VALUE,\n message: \"SUMIF criteria must be a single value\",\n errAddress: context.dependencyNode,\n };\n }\n\n // Parse criteria\n const parsedCriteria = parseCriteria(criteriaResult.result);\n if (parsedCriteria.type === \"error\") {\n return {\n type: \"error\",\n err: FormulaError.VALUE,\n message: parsedCriteria.message,\n errAddress: context.dependencyNode,\n };\n }\n\n // Determine sum range (third argument if present, otherwise same as criteria range)\n const sumRangeResult =\n node.args.length === 3\n ? this.evaluateNode(node.args[2]!, context)\n : criteriaRangeResult;\n\n if (sumRangeResult.type === \"error\") {\n return sumRangeResult;\n }\n\n // Use shared summation utility\n const matchingValues = processMultiCriteriaValues(\n this,\n sumRangeResult,\n [{ rangeResult: criteriaRangeResult, parsedCriteria }],\n context,\n \"col-major\"\n );\n\n if (matchingValues.type === \"error\" || matchingValues.type === \"awaiting-evaluation\") {\n return matchingValues;\n }\n\n return performSummation(matchingValues.values);\n },\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,IAJP;AASO,IAHP;AAIqD,IAArD;AACiC,IAAjC;AAuBO,IAAM,QAA4B;AAAA,EACvC,MAAM;AAAA,EACN,UAAU,QAAS,CAAC,MAAM,SAAmC;AAAA,IAE3D,MAAM,WAAW,iDAA2B,SAAS,KAAK,KAAK,QAAQ,OAAO;AAAA,IAC9E,IAAI,UAAU;AAAA,MACZ,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,sBAAsB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO;AAAA,IACpE,IAAI,oBAAoB,SAAS,SAAS;AAAA,MACxC,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,iBAAiB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO;AAAA,IAC/D,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IAEA,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,QACL,MAAM;AAAA,QACN,KAAK,0BAAa;AAAA,QAClB,SAAS;AAAA,QACT,YAAY,QAAQ;AAAA,MACtB;AAAA,IACF;AAAA,IAGA,MAAM,iBAAiB,qCAAc,eAAe,MAAM;AAAA,IAC1D,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,QACL,MAAM;AAAA,QACN,KAAK,0BAAa;AAAA,QAClB,SAAS,eAAe;AAAA,QACxB,YAAY,QAAQ;AAAA,MACtB;AAAA,IACF;AAAA,IAGA,MAAM,iBACJ,KAAK,KAAK,WAAW,IACjB,KAAK,aAAa,KAAK,KAAK,IAAK,OAAO,IACxC;AAAA,IAEN,IAAI,eAAe,SAAS,SAAS;AAAA,MACnC,OAAO;AAAA,IACT;AAAA,IAGA,MAAM,iBAAiB,iDACrB,MACA,gBACA,CAAC,EAAE,aAAa,qBAAqB,eAAe,CAAC,GACrD,SACA,WACF;AAAA,IAEA,IAAI,eAAe,SAAS,WAAW,eAAe,SAAS,uBAAuB;AAAA,MACpF,OAAO;AAAA,IACT;AAAA,IAEA,OAAO,wCAAiB,eAAe,MAAM;AAAA;AAEjD;",
|
|
8
|
+
"debugId": "1DD7C221B0ADC88D64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -2,27 +2,37 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
6
8
|
var __toCommonJS = (from) => {
|
|
7
|
-
var entry = __moduleCache.get(from), desc;
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
8
10
|
if (entry)
|
|
9
11
|
return entry;
|
|
10
12
|
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
16
21
|
__moduleCache.set(from, entry);
|
|
17
22
|
return entry;
|
|
18
23
|
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
19
29
|
var __export = (target, all) => {
|
|
20
30
|
for (var name in all)
|
|
21
31
|
__defProp(target, name, {
|
|
22
32
|
get: all[name],
|
|
23
33
|
enumerable: true,
|
|
24
34
|
configurable: true,
|
|
25
|
-
set: (
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
|
|
@@ -57,4 +67,4 @@ var SUMIFS = {
|
|
|
57
67
|
}
|
|
58
68
|
};
|
|
59
69
|
|
|
60
|
-
//# debugId=
|
|
70
|
+
//# debugId=606306A04E14416364756E2164756E21
|