@kasko/quote-calculator-js
Advanced tools
Comparing version 1.2.2 to 1.2.3
# Changelog | ||
## [v1.2.3](https://github.com/kasko/quote-calculator-js-lib/compare/v1.2.2...v1.2.3) (2024-04-17) | ||
## Bugfix | ||
- `formulas` - Fixes array values in `IF` formula; | ||
- `formulas` - Fixes boolean and string value calculations with comparison operators; | ||
- `formulas` - Fixes string value use in `OR` formula; | ||
## [v1.2.2](https://github.com/kasko/quote-calculator-js-lib/compare/v1.2.1...v1.2.2) (2024-03-18) | ||
@@ -3,0 +9,0 @@ ## Bugfix |
@@ -112,2 +112,3 @@ import { parseXLSX } from '../../sheet-reader/src/parser.js'; | ||
setValue(newValue: any, cellRef: string, sheetRef?: string): void; | ||
setFormula(newFormula: any, cellRef: string, sheetRef?: string): void; | ||
getFormula(cellRef: string, sheetRef?: string): string | undefined; | ||
@@ -114,0 +115,0 @@ parseFormula(formula: string, sheetRef?: string): readonly [any, any]; |
{ | ||
"name": "@kasko/quote-calculator-js", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "KASKO Spreadsheet Quote Calculator", | ||
@@ -10,2 +10,3 @@ "main": "dist/calculator.js", | ||
"debug": "yarn build:calculator && node debugger/debug.js", | ||
"trace": "yarn build:calculator && node trace/build.js && node trace/dist/trace.mjs", | ||
"generate": "cd packages/formula-parser/src/grammar-parser && jison grammar-parser.jison --module-type=js --outfile=grammar-parser.cjs && echo 'exports.Parser = grammarParser.Parser;' >> grammar-parser.cjs", | ||
@@ -21,3 +22,3 @@ "build:calculator": "esbuild --log-level=info --legal-comments=none --bundle packages/calculator/src/calculator.ts --outdir=dist --minify --format=cjs --target=es2015 --platform=node --sourcemap", | ||
"test:generic": "uvu test/generic", | ||
"lint": "biome ci ./packages ./lambda ./debugger ./test", | ||
"lint": "biome ci ./packages ./lambda ./debugger ./trace ./test", | ||
"declarations": "tsc --declarationDir dist --emitDeclarationOnly --declaration" | ||
@@ -24,0 +25,0 @@ }, |
@@ -136,1 +136,43 @@ # quote-calculator-js-lib | ||
``` | ||
## Debug UI mode | ||
First make sure to set path to pricing xlsx file in `./debugger/index.tsx` file: | ||
```diff | ||
@@ -1,32 +1,19 @@ | ||
import { Calculator } from '../packages/calculator/src/calculator'; | ||
// @ts-ignore | ||
-import Workbook from '../pricing/baloise-legal-protection.xlsx'; | ||
+import Workbook from '../pricing/kasko-demo.xlsx'; | ||
import { debuggerApp } from './app'; | ||
``` | ||
To start UI run: | ||
```sh | ||
yarn debug | ||
``` | ||
Now you can open UI in browser by following the url in terminal. It is possible to update calculator & formula code and see changes in UI. | ||
## Debug performance | ||
First make sure to set path to pricing xlsx file in `./trace/trace.ts` file: | ||
```diff | ||
@@ -1,32 +1,19 @@ | ||
import { Calculator } from '../packages/calculator/src/calculator'; | ||
// @ts-ignore | ||
-import Workbook from '../pricing/pricing/fermion-motor.xlsx'; | ||
+import Workbook from '../pricing/kasko-demo.xlsx'; | ||
import { initTrace, writeTrace } from './utils'; | ||
``` | ||
To generate trace run: | ||
```sh | ||
yarn trace | ||
``` | ||
This now generated `./trace.json` file in repo root dir. This trace file can now be uploaded (file is not uploaded to any server, instead it's uploaded to browser memory) to [chrome://tracing/](chrome://tracing/) or [https://ui.perfetto.dev/](https://ui.perfetto.dev/). |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1798136
1734
178