New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kasko/quote-calculator-js

Package Overview
Dependencies
Maintainers
19
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kasko/quote-calculator-js - npm Package Compare versions

Comparing version 0.4.0 to 1.0.0

bin/parse-xlsx.js

4

CHANGELOG.md
# Changelog
## [v1.0.0](https://github.com/kasko/quote-calculator-js-lib/compare/v0.4.0...v1.0.0) (2020-10-27)
## Breaking Change
- `calculator` - Adds option to calculate already parsed data from xlsx;
## [v0.4.0](https://github.com/kasko/quote-calculator-js-lib/compare/v0.3.0...v0.4.0) (2020-10-19)

@@ -3,0 +7,0 @@ ## Feature

@@ -0,1 +1,2 @@

import { parseXLSX } from '../../sheet-reader/src/parser.js';
export interface IConfig {

@@ -5,2 +6,62 @@ tax_rate?: number;

}
/**
* Enumeration Value | Description
* ---------------------------+---------------------------------
* b (Boolean) | Cell containing a boolean.
* d (Date) | Cell contains a date in the ISO 8601 format.
* e (Error) | Cell containing an error.
* n (Number) | Cell containing a number.
* s (Shared String) | Cell containing a shared string.
* str (String) | Cell containing a formula string.
*/
interface Cell {
v: string | number | boolean;
t: 's' | 'n' | 'd' | 'b' | 'z' | 'str' | 'e';
f?: string;
w?: string;
}
interface Worksheet {
[key: string]: Cell;
}
interface PivotCell {
r?: string;
i?: string;
t?: string;
}
interface PivotData {
subtotal: string;
name: string;
fld: string;
baseField: string;
baseItem: string;
items: {
row: PivotCell[];
col: PivotCell[];
};
}
interface PivotTable {
source: {
ref: string;
sheet: string;
};
ref: string;
firstHeaderRow: string;
firstDataRow: string;
firstDataCol: string;
data: PivotData[];
}
interface PivotTables {
[key: string]: PivotTable;
}
export interface Workbook {
sheets: {
name: string;
sheetId: string;
'r:id': string;
}[];
definedNames: Record<string, string>;
sharedStrings: string[];
sheet: Record<string, Worksheet>;
pivotTables: PivotTables;
}
declare type Validation<T> = {

@@ -32,3 +93,3 @@ [key in keyof T]: Validation<T[key]> extends T[key] ? boolean : Validation<T[key]>;

constructor(debug?: boolean);
init(spreadSheetPath: string, input?: I, config?: C): Promise<void>;
init(workbook: Record<string, any>, input?: I, config?: C): Promise<void>;
validateInput(): Validation<I>;

@@ -68,2 +129,5 @@ getOutput(): O;

}
export {};
export declare class CalculatorAndParser<I = Record<string, any>, O = Record<string, any>, C = IConfig> extends Calculator<I, O, C> {
init(spreadSheetPath: string, input?: I, config?: C): Promise<void>;
}
export { parseXLSX };

6

package.json
{
"name": "@kasko/quote-calculator-js",
"version": "0.4.0",
"version": "1.0.0",
"description": "KASKO Spreadsheet Quote Calculator",

@@ -8,5 +8,6 @@ "main": "dist/calculator.js",

"scripts": {
"build": "npm run generate && npm run build:calculator && npm run declarations",
"build": "yarn generate && yarn build:calculator && yarn parse && yarn declarations",
"generate": "cd packages/formula-parser/src/grammar-parser && jison grammar-parser.jison",
"build:calculator": "esbuild --log-level=error --bundle packages/calculator/src/calculator.ts --outdir=dist --minify --format=cjs --target=es2015 --platform=node --sourcemap",
"parse": "node bin/parse-xlsx.js ./test-files ./pricing ./lambda/visana-private-liability",
"start": "node index.js",

@@ -39,4 +40,5 @@ "test": "uvu test",

"files": [
"bin",
"dist"
]
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc