calcsuite-react 1.0.0 → 1.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.
- package/CHANGELOG.md +13 -0
- package/README.md +10 -7
- package/dist/calcsuite.js +950 -937
- package/dist/settings/SettingsContext.d.ts +3 -1
- package/package.json +1 -1
- package/src/theme.css +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to **CalcSuite** are documented here. This project adheres to
|
|
4
4
|
[Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [1.1.1] — 2026-09-04
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- **Dialog layers above host UI.** Raised the dialog / command-palette / toast z-index so CalcSuite renders above app chrome (e.g. MUI app bars & drawers) when embedded in another app.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **`<FinCalcProvider settings={…}>` now applies.** The provider accepts a deep-partial `settings` prop as *defaults* (region, currency, theme, …). The user's in-app choices still persist in `localStorage` and take precedence, so region stays user-driven.
|
|
13
|
+
|
|
14
|
+
## [1.1.0] — 2026-09-04
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- **Upload / server API config in Settings.** The Integration Panel — connection URL, auth strategy, endpoints, upload strategy (multipart / presigned / base64Json) with filename template, a payload builder with live JSON preview, test-connection, copy-as-cURL, and a queue inspector — is now embedded under **Settings → File upload & server API**. Users can point exports (PDF/CSV/…) and saved calculations directly at their own server with no code. No secret is ever stored by the app.
|
|
18
|
+
|
|
6
19
|
## [1.0.0] — 2026-09-04
|
|
7
20
|
|
|
8
21
|
Initial release. The financial-calculator module of **AceCBM (Ace Cloud Business Management)**.
|
package/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# CalcSuite
|
|
2
2
|
|
|
3
3
|
[](https://github.com/ashish13377/calcsuite/actions/workflows/ci.yml)
|
|
4
|
-
[](https://www.npmjs.com/package/calcsuite)
|
|
5
|
-
[](LICENSE)
|
|
4
|
+
[](https://www.npmjs.com/package/calcsuite-react)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://ashish13377.github.io/calcsuite/)
|
|
7
|
+
|
|
8
|
+
**▶ Live demo:** https://ashish13377.github.io/calcsuite/
|
|
6
9
|
|
|
7
10
|
**Decimal-exact, offline-first financial calculator library for React** — ~55 calculators for **🇮🇳 India (₹)** and **🇺🇸 United States ($)**, a scientific calculator, live currency conversion, export, and a keyboard-first launcher/dialog. All money math runs on `decimal.js` — no floating-point in any money path.
|
|
8
11
|
|
|
@@ -13,7 +16,7 @@
|
|
|
13
16
|
## Install
|
|
14
17
|
|
|
15
18
|
```bash
|
|
16
|
-
npm install calcsuite # yarn add calcsuite · pnpm add calcsuite
|
|
19
|
+
npm install calcsuite-react # yarn add calcsuite-react · pnpm add calcsuite-react
|
|
17
20
|
```
|
|
18
21
|
|
|
19
22
|
`decimal.js` installs automatically; `react`/`react-dom` are peer deps (18.3+ / 19). Optional PDF/XLSX export: `npm install jspdf xlsx`.
|
|
@@ -21,8 +24,8 @@ npm install calcsuite # yarn add calcsuite · pnpm add calcsuite
|
|
|
21
24
|
## Quickstart
|
|
22
25
|
|
|
23
26
|
```tsx
|
|
24
|
-
import { FinCalcProvider, FinCalcLauncher } from 'calcsuite';
|
|
25
|
-
import 'calcsuite/theme.css';
|
|
27
|
+
import { FinCalcProvider, FinCalcLauncher } from 'calcsuite-react';
|
|
28
|
+
import 'calcsuite-react/theme.css';
|
|
26
29
|
|
|
27
30
|
export default function App() {
|
|
28
31
|
return (
|
|
@@ -37,14 +40,14 @@ export default function App() {
|
|
|
37
40
|
Embed a single calculator:
|
|
38
41
|
|
|
39
42
|
```tsx
|
|
40
|
-
import { CalculatorPanel } from 'calcsuite';
|
|
43
|
+
import { CalculatorPanel } from 'calcsuite-react';
|
|
41
44
|
<CalculatorPanel id="loan.emi" /> // or "invest.sip", "tax.gst", "tools.scientific", …
|
|
42
45
|
```
|
|
43
46
|
|
|
44
47
|
Use the engine with no UI:
|
|
45
48
|
|
|
46
49
|
```ts
|
|
47
|
-
import { loan, finance } from 'calcsuite';
|
|
50
|
+
import { loan, finance } from 'calcsuite-react';
|
|
48
51
|
loan.solve({ region: 'IN', principal: '2500000', annualRatePct: '8.65', tenureMonths: 240 }).payment.toString(); // "21933.51"
|
|
49
52
|
finance.xirr([{ date: '2020-01-01', amount: '-10000' }, { date: '2021-01-01', amount: '12000' }]); // ≈ 0.20
|
|
50
53
|
```
|