{"_id":"react-accounting-diary","_rev":"89-ff914e508d4c31079d63c382209a432b","name":"react-accounting-diary","dist-tags":{"lts":"2.2.0","latest":"2.4.0"},"versions":{"1.1.0":{"name":"react-accounting-diary","version":"1.1.0","keywords":["react","accounting","diary","component","financial"],"author":{"name":"Ruthel Crab","email":"balockruthel.cedrickascens@gmail.com"},"license":"MIT","_id":"react-accounting-diary@1.1.0","maintainers":[{"name":"ruth3rl","email":"ruthel.crab@gmail.com"}],"contributors":[{"url":"https://github.com/ruthel","name":"Ruth3rl","email":"balockruthel.cedrickascens@gmail.com"}],"homepage":"https://github.com/ruthel/react-accounting-diary#readme","bugs":{"url":"https://github.com/ruthel/react-accounting-diary/issues"},"dist":{"shasum":"51ee241264969b455e85338339973e9f24f5bad9","tarball":"https://registry.npmjs.org/react-accounting-diary/-/react-accounting-diary-1.1.0.tgz","fileCount":30,"integrity":"sha512-7u7lQobgQ+uSLqIfcz+/kSuXIGs9EMgHbmSi8V2gjOxz96SGITfbElRJPn7E33J9c/MBOstieSV0EXJxiNKL/w==","signatures":[{"sig":"MEYCIQDG07LJ7Logw7ZQPepjNiq8HY7aRs/ka7s6WLjV4hn5tgIhAN6YfN+OsNnP6e7OjVsPf86TlfZcFK5YNwgN+0UFRxmk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4970039},"main":"dist/react-accounting-diary.umd.js","types":"dist/react-accounting-diary.d.ts","module":"dist/react-accounting-diary.es.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/react-accounting-diary.d.ts","import":"./dist/react-accounting-diary.es.js","require":"./dist/react-accounting-diary.umd.js"}},"gitHead":"d1ac3dc281b9a270c6a52b63f2fce920183a07d9","private":false,"scripts":{"lint":"eslint src/**/*.{ts,tsx}","test":"vitest","build":"vite build","start":"vite","format":"prettier --write src/**/*.{ts,tsx}","prepublishOnly":"npm run build"},"_npmUser":{"name":"ruth3rl","email":"ruthel.crab@gmail.com"},"repository":{"url":"git+https://github.com/ruthel/react-accounting-diary.git","type":"git"},"_npmVersion":"10.9.2","description":"React component to generate an accounting diary and export as image or PDF","directories":{},"sideEffects":false,"_nodeVersion":"22.15.1","dependencies":{"pdfmake":"^0.2.20","html-to-image":"^1.11.13","react-feather":"^2.0.10","@progress/kendo-file-saver":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.89.2","vite":"^7.0.3","jsdom":"^26.1.0","react":"^18.3.1","eslint":"^8.0.0","terser":"^5.31.0","vitest":"^3.2.4","prettier":"^3.6.2","react-dom":"^18.3.1","typescript":"^5.8.3","@types/node":"^24.0.12","@types/react":"^19.1.8","@types/pdfmake":"^0.2.11","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.1.6","eslint-plugin-react":"^7.33.0","@vitejs/plugin-react":"^4.6.0","@testing-library/react":"^16.3.0","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.5.1","rollup-plugin-visualizer":"^5.12.0","@testing-library/jest-dom":"^6.6.3","@typescript-eslint/parser":"^7.0.0","@testing-library/user-event":"^14.6.1","@typescript-eslint/eslint-plugin":"^7.0.0"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/react-accounting-diary_1.1.0_1763734866957_0.6274454278037707","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"react-accounting-diary","version":"2.1.0","keywords":["react","accounting","diary","component","financial","export","csv","excel","pdf","dark-mode","typescript"],"author":{"name":"Ruthel Crab","email":"balockruthel.cedrickascens@gmail.com"},"license":"MIT","_id":"react-accounting-diary@2.1.0","maintainers":[{"name":"ruth3rl","email":"ruthel.crab@gmail.com"}],"contributors":[{"url":"https://github.com/ruthel","name":"Ruth3rl","email":"balockruthel.cedrickascens@gmail.com"}],"homepage":"https://github.com/ruthel/react-accounting-diary#readme","bugs":{"url":"https://github.com/ruthel/react-accounting-diary/issues"},"dist":{"shasum":"62897f3d582e3708918fe497d71df055bd76747a","tarball":"https://registry.npmjs.org/react-accounting-diary/-/react-accounting-diary-2.1.0.tgz","fileCount":29,"integrity":"sha512-QEk3VHhjYQjOYV9vgeK5pkbRNdj/7VeIE2P9p4WmTiHA11bNCwbjwoKKEJJQVIK7lKLXV2/bnIBuY6eOfEAo4w==","signatures":[{"sig":"MEUCIEpdK3BGD3y1H3+QX65531Axp/kydX1wVL9BeGaIyblgAiEAh/z4pAlyV3olPD55KfIkxw5qG6LlO9qiFwD+Bx/DaCE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4005070},"main":"dist/react-accounting-diary.umd.js","types":"dist/react-accounting-diary.d.ts","module":"dist/react-accounting-diary.es.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/react-accounting-diary.d.ts","import":"./dist/react-accounting-diary.es.js","require":"./dist/react-accounting-diary.umd.js"}},"gitHead":"2bbc1827e7df30d4fe695184a4aa513fbd002297","private":false,"scripts":{"lint":"eslint src/lib/**/*.{ts,tsx}","test":"vitest","build":"vite build","format":"prettier --write src/lib/**/*.{ts,tsx}","prepublishOnly":"npm run build"},"_npmUser":{"name":"ruth3rl","email":"ruthel.crab@gmail.com"},"repository":{"url":"git+https://github.com/ruthel/react-accounting-diary.git","type":"git"},"_npmVersion":"10.9.2","description":"Lightweight React component for accounting diaries with export to PNG, JPEG, PDF, CSV, Excel. Features dark mode, search, edit transactions.","directories":{},"sideEffects":false,"_nodeVersion":"22.15.1","dependencies":{"xlsx":"^0.18.5","pdfmake":"^0.2.20","html-to-image":"^1.11.13","react-feather":"^2.0.10","@progress/kendo-file-saver":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.89.2","vite":"^7.0.3","react":"^18.3.1","eslint":"^8.0.0","terser":"^5.31.0","vitest":"^3.2.4","prettier":"^3.6.2","react-dom":"^18.3.1","typescript":"^5.8.3","@types/node":"^24.0.12","@types/react":"^19.1.8","@types/pdfmake":"^0.2.11","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.1.6","eslint-plugin-react":"^7.33.0","@vitejs/plugin-react":"^4.6.0","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.5.1","@typescript-eslint/parser":"^7.0.0","@typescript-eslint/eslint-plugin":"^7.0.0"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/react-accounting-diary_2.1.0_1763737203619_0.31327513877634905","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"react-accounting-diary","version":"2.2.0","keywords":["react","accounting","diary","ledger","bookkeeping","journal","component","financial","finance","export","csv","excel","pdf","png","jpeg","dark-mode","typescript","react-component","accounting-software","double-entry"],"author":{"name":"Ruthel Crab","email":"balockruthel.cedrickascens@gmail.com"},"license":"MIT","_id":"react-accounting-diary@2.2.0","maintainers":[{"name":"ruth3rl","email":"ruthel.crab@gmail.com"}],"contributors":[{"url":"https://github.com/ruthel","name":"Ruth3rl","email":"balockruthel.cedrickascens@gmail.com"}],"homepage":"https://github.com/ruthel/react-accounting-diary#readme","bugs":{"url":"https://github.com/ruthel/react-accounting-diary/issues"},"dist":{"shasum":"861723fddce15c02891adfc0f6c4b9c709f12742","tarball":"https://registry.npmjs.org/react-accounting-diary/-/react-accounting-diary-2.2.0.tgz","fileCount":29,"integrity":"sha512-yso3GDwIoYuGLVBQNO/1mQ4uazW0YWI8D2RoWjtosDRoFVn4JR2K5s9arcuACrU2j+8wiPZ1Um0LLrY25zMqcQ==","signatures":[{"sig":"MEUCIDCLpevlwPUZgnafDp0dJmAPFdCXhubf2LdXF/RqOrknAiEAtJz5NuNmvf8LzVhUv01hPaoFit/oMt7YYwOqBaA7j0I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3962247},"main":"dist/react-accounting-diary.umd.js","types":"dist/react-accounting-diary.d.ts","module":"dist/react-accounting-diary.es.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/react-accounting-diary.d.ts","import":"./dist/react-accounting-diary.es.js","require":"./dist/react-accounting-diary.umd.js"}},"gitHead":"1efb6936686fd50e6fb04307ff7f01dcb371631d","private":false,"scripts":{"lint":"eslint src/lib/","build":"vite build"},"_npmUser":{"name":"ruth3rl","email":"ruthel.crab@gmail.com"},"repository":{"url":"git+https://github.com/ruthel/react-accounting-diary.git","type":"git"},"_npmVersion":"11.6.2","description":"Lightweight React component for accounting diaries with export to PNG, JPEG, PDF, CSV, Excel. Features dark mode, search, edit transactions.","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{"pdfmake":"^0.2.20","html-to-image":"^1.11.13"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.89.2","vite":"^7.0.3","react":"^18.3.1","eslint":"^9.0.0","react-dom":"^18.3.1","typescript":"^5.8.3","@types/node":"^24.0.12","@types/react":"^19.1.8","@types/pdfmake":"^0.2.11","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.1.6","eslint-plugin-react":"^7.37.0","@vitejs/plugin-react":"^4.6.0","@typescript-eslint/parser":"^8.0.0","vite-plugin-css-injected-by-js":"^4.0.1","@typescript-eslint/eslint-plugin":"^8.0.0"},"peerDependencies":{"react":">=16.8.0","react-dom":">=16.8.0"},"_npmOperationalInternal":{"tmp":"tmp/react-accounting-diary_2.2.0_1775513991295_0.5207486032506456","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"react-accounting-diary","version":"2.3.0","keywords":["react","accounting","diary","ledger","bookkeeping","journal","component","financial","finance","export","csv","excel","pdf","png","jpeg","json","dark-mode","typescript","react-component","accounting-software","double-entry","headless","hook","validation","i18n","ledger-view"],"author":{"name":"Ruthel Crab","email":"balockruthel.cedrickascens@gmail.com"},"license":"MIT","_id":"react-accounting-diary@2.3.0","maintainers":[{"name":"ruth3rl","email":"ruthel.crab@gmail.com"}],"contributors":[{"url":"https://github.com/ruthel","name":"Ruth3rl","email":"balockruthel.cedrickascens@gmail.com"}],"homepage":"https://github.com/ruthel/react-accounting-diary#readme","bugs":{"url":"https://github.com/ruthel/react-accounting-diary/issues"},"dist":{"shasum":"ebd61f377ddc7faa800bdffe67b964d20d40e0a1","tarball":"https://registry.npmjs.org/react-accounting-diary/-/react-accounting-diary-2.3.0.tgz","fileCount":30,"integrity":"sha512-8+rc6vAUQC1EYcZfejFEkI9IbFwGSZdIqetkZg3npVSq4QSCcuWZN7iV95illz55/GfMKo/0dgevXCY7o7Vq9A==","signatures":[{"sig":"MEQCIDbJgQmFc4QepQhBCUEwD5mbpTOqwNCvMCfX+LBg4JOnAiA4jAkCt4KZak37rIgLBpd61g5v+hBcHRmcuM4dR3D2Pw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":196395},"main":"dist/react-accounting-diary.umd.js","types":"dist/react-accounting-diary.d.ts","module":"dist/react-accounting-diary.es.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/react-accounting-diary.d.ts","import":"./dist/react-accounting-diary.es.js","require":"./dist/react-accounting-diary.umd.js"}},"gitHead":"7f4eb628daeaeddb7c4c4b1acfb35ab2af373b0f","private":false,"scripts":{"lint":"eslint src/lib/","build":"vite build"},"_npmUser":{"name":"ruth3rl","email":"ruthel.crab@gmail.com"},"repository":{"url":"git+https://github.com/ruthel/react-accounting-diary.git","type":"git"},"_npmVersion":"11.6.2","description":"Lightweight React component for accounting diaries with export to PNG, JPEG, PDF, CSV, Excel, JSON. Features headless hook, ref API, ledger view, validation callbacks, i18n, dark mode, search, edit transactions.","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{"html-to-image":"^1.11.13"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.89.2","vite":"^7.0.3","react":"^18.3.1","eslint":"^9.0.0","react-dom":"^18.3.1","typescript":"^5.8.3","@types/node":"^24.0.12","@types/react":"^19.1.8","@types/pdfmake":"^0.2.11","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.1.6","eslint-plugin-react":"^7.37.0","@vitejs/plugin-react":"^4.6.0","@typescript-eslint/parser":"^8.0.0","vite-plugin-css-injected-by-js":"^4.0.1","@typescript-eslint/eslint-plugin":"^8.0.0"},"peerDependencies":{"react":">=16.8.0","pdfmake":">=0.2.0","react-dom":">=16.8.0"},"peerDependenciesMeta":{"pdfmake":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/react-accounting-diary_2.3.0_1776184520476_0.3882373757663897","host":"s3://npm-registry-packages-npm-production"}},"2.3.1":{"name":"react-accounting-diary","version":"2.3.1","keywords":["react","accounting","diary","ledger","bookkeeping","journal","component","financial","finance","export","csv","excel","pdf","png","jpeg","json","dark-mode","typescript","react-component","accounting-software","double-entry","headless","hook","validation","i18n","ledger-view"],"author":{"name":"Ruthel Crab","email":"balockruthel.cedrickascens@gmail.com"},"license":"MIT","_id":"react-accounting-diary@2.3.1","maintainers":[{"name":"ruth3rl","email":"ruthel.crab@gmail.com"}],"contributors":[{"url":"https://github.com/ruthel","name":"Ruth3rl","email":"balockruthel.cedrickascens@gmail.com"}],"homepage":"https://github.com/ruthel/react-accounting-diary#readme","bugs":{"url":"https://github.com/ruthel/react-accounting-diary/issues"},"dist":{"shasum":"7aae6d03d81eb84685f7bbbcaddf672e4d0da6d2","tarball":"https://registry.npmjs.org/react-accounting-diary/-/react-accounting-diary-2.3.1.tgz","fileCount":30,"integrity":"sha512-1eAXxoBL3GJp5dSXF+06wheEAuK4PPvoJrtpsjQ/8czvpPwfXQTNRTe/V3RCYXcyk4SgCAeRW5seAvhjkkxZ9w==","signatures":[{"sig":"MEUCIQCxL2QoqRvBTDwcJTCDl5mD4OkeUdIoXArHGtT4qkQR5QIgZb1TQLE1AjtdtVUgeGtr1Tsbhp7o1HCKojyjLWY7edQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":199668},"main":"dist/react-accounting-diary.umd.js","type":"module","types":"dist/react-accounting-diary.d.ts","module":"dist/react-accounting-diary.es.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/react-accounting-diary.d.ts","import":"./dist/react-accounting-diary.es.js","require":"./dist/react-accounting-diary.umd.js"}},"gitHead":"7f4eb628daeaeddb7c4c4b1acfb35ab2af373b0f","private":false,"scripts":{"lint":"eslint src/lib/","build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"ruth3rl","email":"ruthel.crab@gmail.com"},"repository":{"url":"git+https://github.com/ruthel/react-accounting-diary.git","type":"git"},"_npmVersion":"11.6.2","description":"Lightweight React component for accounting diaries with export to PNG, JPEG, PDF, CSV, Excel, JSON. Features headless hook, ref API, ledger view, validation callbacks, i18n, dark mode, search, edit transactions.","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{"html-to-image":"^1.11.13"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.89.2","vite":"^7.0.3","react":"^18.3.1","eslint":"^9.0.0","react-dom":"^18.3.1","@eslint/js":"^9.39.4","typescript":"^5.8.3","@types/node":"^24.0.12","@types/react":"^19.1.8","@types/pdfmake":"^0.2.11","vite-plugin-dts":"^4.5.4","@types/react-dom":"^19.1.6","eslint-plugin-react":"^7.37.0","@vitejs/plugin-react":"^4.6.0","@typescript-eslint/parser":"^8.0.0","vite-plugin-css-injected-by-js":"^4.0.1","@typescript-eslint/eslint-plugin":"^8.0.0"},"peerDependencies":{"react":">=16.8.0","pdfmake":">=0.2.0","react-dom":">=16.8.0"},"peerDependenciesMeta":{"pdfmake":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/react-accounting-diary_2.3.1_1777558838078_0.02686310295625205","host":"s3://npm-registry-packages-npm-production"}},"2.4.0":{"name":"react-accounting-diary","version":"2.4.0","type":"module","private":false,"engines":{"node":">=18.0.0"},"author":{"name":"Ruthel Crab","email":"balockruthel.cedrickascens@gmail.com"},"keywords":["react","accounting","diary","ledger","bookkeeping","journal","component","financial","finance","export","csv","excel","pdf","png","jpeg","json","dark-mode","typescript","react-component","accounting-software","double-entry","headless","hook","validation","i18n","ledger-view"],"description":"Lightweight React component for accounting diaries with export to PNG, JPEG, PDF, CSV, Excel, JSON. Features headless hook, ref API, ledger view, validation callbacks, i18n, dark mode, search, edit transactions.","main":"dist/react-accounting-diary.umd.js","module":"dist/react-accounting-diary.es.js","types":"dist/react-accounting-diary.d.ts","exports":{".":{"types":"./dist/react-accounting-diary.d.ts","import":"./dist/react-accounting-diary.es.js","require":"./dist/react-accounting-diary.umd.js"}},"sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/ruthel/react-accounting-diary.git"},"bugs":{"url":"https://github.com/ruthel/react-accounting-diary/issues"},"homepage":"https://github.com/ruthel/react-accounting-diary#readme","scripts":{"build":"vite build","lint":"eslint src/lib/","prepublishOnly":"npm run build"},"peerDependencies":{"pdfmake":">=0.2.0","react":">=16.8.0","react-dom":">=16.8.0"},"peerDependenciesMeta":{"pdfmake":{"optional":true}},"dependencies":{},"devDependencies":{"@eslint/js":"^9.39.4","@types/react":"^19.1.8","@types/react-dom":"^19.1.6","@typescript-eslint/eslint-plugin":"^8.0.0","@typescript-eslint/parser":"^8.0.0","@vitejs/plugin-react":"^4.6.0","eslint":"^9.0.0","eslint-plugin-react":"^7.37.0","react":"^18.3.1","react-dom":"^18.3.1","sass":"^1.89.2","typescript":"^5.8.3","vite":"^7.0.3","vite-plugin-css-injected-by-js":"^4.0.1","vite-plugin-dts":"^4.5.4"},"license":"MIT","contributors":[{"name":"Ruth3rl","email":"balockruthel.cedrickascens@gmail.com","url":"https://github.com/ruthel"}],"gitHead":"436993bbf39bd48acf40977f7dd0d52cd2cf3271","_id":"react-accounting-diary@2.4.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-XRQWA4Ce7HJ9j/bHLYJzqu7evK740U9XW4od0UUWMQWKrSRpe2UQAo3vQtNbUdCvCHJPY2lf2Y+LprVAizug0g==","shasum":"c129bd37a111643ef8d0abee09324e23070db3ab","tarball":"https://registry.npmjs.org/react-accounting-diary/-/react-accounting-diary-2.4.0.tgz","fileCount":34,"unpackedSize":217649,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHjyviypm7h2z7sucKkTpsBv6dyo6837V8L2+i7493zdAiA22x5uNQKuB494J9EQ4TaWKwuU2UWANHZeXZ3RVor8bg=="}]},"_npmUser":{"name":"ruth3rl","email":"ruthel.crab@gmail.com"},"directories":{},"maintainers":[{"name":"ruth3rl","email":"ruthel.crab@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-accounting-diary_2.4.0_1778865092163_0.5650631571506233"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-01T09:33:58.940Z","modified":"2026-05-15T17:11:32.432Z","0.0.1":"2022-04-01T09:33:59.080Z","0.0.2":"2022-04-01T10:09:12.141Z","0.0.2-beta":"2022-04-01T10:15:17.270Z","0.0.2-beta.0":"2022-04-01T10:43:10.398Z","0.0.2-beta.1":"2022-04-01T11:11:23.753Z","0.0.2-beta.2":"2022-04-01T11:21:02.735Z","0.0.2-beta.3":"2022-04-01T11:23:37.947Z","0.0.2-beta.4":"2022-04-01T11:28:12.602Z","0.0.2-beta.5":"2022-04-01T11:36:45.088Z","0.0.2-beta.6":"2022-04-01T11:45:59.518Z","0.0.3-beta":"2022-04-01T11:55:29.645Z","0.0.3-beta.1":"2022-04-01T12:36:39.516Z","0.0.3-beta.2":"2022-04-01T13:34:22.224Z","0.0.3":"2022-04-01T14:34:18.644Z","0.0.4":"2022-04-01T15:50:38.848Z","0.1.0":"2022-04-02T10:21:29.359Z","0.1.1":"2022-04-04T07:46:30.767Z","0.0.5":"2022-09-19T13:05:19.845Z","0.0.6":"2022-09-19T13:07:04.231Z","0.0.7":"2022-09-19T13:10:20.275Z","0.0.8":"2022-09-19T13:20:11.559Z","0.0.9":"2022-09-19T13:25:15.694Z","0.0.11":"2022-09-19T15:14:00.034Z","0.0.12":"2022-09-19T15:18:15.311Z","0.1.2":"2023-07-18T12:47:10.865Z","0.1.3":"2023-07-26T10:28:36.921Z","0.1.4":"2023-07-27T11:20:25.830Z","0.2.0":"2023-08-04T08:32:55.846Z","0.2.1":"2023-08-04T09:24:05.351Z","0.2.2":"2023-08-04T09:38:32.223Z","0.3.0":"2023-08-11T10:31:23.139Z","0.3.1-beta.1":"2024-05-03T12:58:45.756Z","0.3.1-beta.2":"2024-05-03T13:01:47.083Z","0.3.1-beta.3":"2024-05-03T13:06:36.059Z","0.3.1-beta.4":"2024-05-03T13:12:02.401Z","0.3.1-beta.5":"2024-05-03T13:15:06.441Z","0.3.1-beta.6":"2024-05-03T13:17:27.704Z","0.3.1-beta.7":"2024-05-03T13:30:30.434Z","1.0.0":"2025-07-09T13:34:53.500Z","1.1.0":"2025-11-21T14:21:07.205Z","2.1.0":"2025-11-21T15:00:03.904Z","2.2.0":"2026-04-06T22:19:51.908Z","2.3.0":"2026-04-14T16:35:20.621Z","2.3.1":"2026-04-30T14:20:38.383Z","2.4.0":"2026-05-15T17:11:32.335Z"},"bugs":{"url":"https://github.com/ruthel/react-accounting-diary/issues"},"author":{"name":"Ruthel Crab","email":"balockruthel.cedrickascens@gmail.com"},"license":"MIT","homepage":"https://github.com/ruthel/react-accounting-diary#readme","keywords":["react","accounting","diary","ledger","bookkeeping","journal","component","financial","finance","export","csv","excel","pdf","png","jpeg","json","dark-mode","typescript","react-component","accounting-software","double-entry","headless","hook","validation","i18n","ledger-view"],"repository":{"type":"git","url":"git+https://github.com/ruthel/react-accounting-diary.git"},"description":"Lightweight React component for accounting diaries with export to PNG, JPEG, PDF, CSV, Excel, JSON. Features headless hook, ref API, ledger view, validation callbacks, i18n, dark mode, search, edit transactions.","contributors":[{"name":"Ruth3rl","email":"balockruthel.cedrickascens@gmail.com","url":"https://github.com/ruthel"}],"maintainers":[{"name":"ruth3rl","email":"ruthel.crab@gmail.com"}],"readme":"# react-accounting-diary\n\n[![npm version](https://badge.fury.io/js/react-accounting-diary.svg)](https://www.npmjs.com/package/react-accounting-diary)\n[![npm downloads](https://img.shields.io/npm/dw/react-accounting-diary)](https://www.npmjs.com/package/react-accounting-diary)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org/)\n[![CI](https://github.com/ruthel/react-accounting-diary/actions/workflows/ci.yml/badge.svg)](https://github.com/ruthel/react-accounting-diary/actions)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue)](https://www.typescriptlang.org/)\n\n> **[Live Demo →](https://react-accounting-diary-demo.vercel.app)**\n\nLightweight React component to generate accounting diaries with export to PNG, JPEG, PDF, CSV, Excel, and JSON. Features a headless hook, imperative ref API, ledger view, validation callbacks, i18n support, sortable columns, pagination, balance validation, and more.\n\n## Installation\n\n```bash\nnpm install react-accounting-diary\n```\n\n**Requirements:**\n- React 16.8+ or 17.x or 18.x or 19.x\n- Node.js 18.0.0 or higher\n\n## Quick Start\n\n```jsx\nimport AccountingDiary from 'react-accounting-diary';\n\nfunction App() {\n  const data = [\n    {\n      date: '2024-01-01',\n      text: 'Opening balance',\n      isDebit: true,\n      amount: 10000,\n      account: 'Cash',\n      currency: 'USD',\n    },\n  ];\n\n  return (\n    <AccountingDiary\n      width={1200}\n      data={data}\n      title=\"My Company\"\n      titleBg=\"#b0d0a3\"\n      columnHeader={true}\n      onChange={(data) => console.log('Data changed:', data)}\n    />\n  );\n}\n```\n\n## Headless Hook — `useAccountingDiary`\n\nBuild your own UI with full control over the data layer:\n\n```jsx\nimport { useAccountingDiary } from 'react-accounting-diary';\n\nfunction CustomDiary() {\n  const {\n    data,\n    addTransaction,\n    editTransaction,\n    deleteTransaction,\n    undo,\n    redo,\n    canUndo,\n    canRedo,\n    totals,\n    accountSummary,\n    importJSON,\n    exportJSON,\n  } = useAccountingDiary({\n    initialData: [],\n    onChange: (data) => console.log('Changed:', data),\n    onBeforeAdd: (item) => item.amount > 0,       // validate before adding\n    onBeforeEdit: (old, updated) => true,          // validate before editing\n    onBeforeDelete: (item) => confirm('Delete?'),  // confirm before deleting\n  });\n\n  return (\n    <div>\n      <p>Total Debit: {totals.debit} | Credit: {totals.credit}</p>\n      <p>Balanced: {totals.isBalanced ? '✓' : '✗'}</p>\n      <button onClick={() => addTransaction({ date: '2024-01-01', text: 'Rent', isDebit: true, amount: 1000, account: 'Rent', currency: 'USD' })}>\n        Add\n      </button>\n      <button onClick={undo} disabled={!canUndo}>Undo</button>\n      <button onClick={redo} disabled={!canRedo}>Redo</button>\n    </div>\n  );\n}\n```\n\n## Imperative Ref API\n\nControl the component programmatically from a parent:\n\n```jsx\nimport AccountingDiary from 'react-accounting-diary';\nimport { useRef } from 'react';\n\nfunction App() {\n  const ref = useRef(null);\n\n  return (\n    <>\n      <button onClick={() => ref.current?.exportToPDF()}>Export PDF</button>\n      <button onClick={() => ref.current?.exportToJSON()}>Export JSON</button>\n      <button onClick={() => ref.current?.addTransaction({ date: '2024-01-01', text: 'Salary', isDebit: true, amount: 5000, account: 'Payroll', currency: 'USD' })}>\n        Add via Ref\n      </button>\n      <button onClick={() => console.log(ref.current?.getTotals())}>Log Totals</button>\n      <button onClick={() => console.log(ref.current?.getAccountSummary())}>Account Summary</button>\n      <AccountingDiary ref={ref} title=\"My Company\" columnHeader={true} />\n    </>\n  );\n}\n```\n\n### Ref API Methods\n\n| Method | Return | Description |\n|---|---|---|\n| `exportToPNG()` | `Promise<void>` | Export diary as PNG |\n| `exportToJPEG()` | `Promise<void>` | Export diary as JPEG |\n| `exportToPDF()` | `Promise<void>` | Export diary as PDF |\n| `exportToCSV()` | `void` | Export data as CSV |\n| `exportToExcel()` | `void` | Export data as Excel |\n| `exportToJSON()` | `void` | Export data as JSON file |\n| `importJSON(json)` | `void` | Import transactions from JSON string |\n| `addTransaction(item)` | `void` | Add a transaction programmatically |\n| `undo()` | `void` | Undo last action |\n| `redo()` | `void` | Redo last undone action |\n| `getData()` | `IDataItem[]` | Get current data |\n| `getTotals()` | `object` | Get debit, credit, balance, isBalanced |\n| `getAccountSummary()` | `object` | Get per-account debit/credit/balance |\n\n## Controlled Mode\n\nIntegrate with your state management (Redux, Zustand, React state, etc.):\n\n```jsx\nimport AccountingDiary from 'react-accounting-diary';\nimport { useState } from 'react';\n\nfunction App() {\n  const [transactions, setTransactions] = useState([]);\n\n  return (\n    <AccountingDiary\n      data={transactions}\n      title=\"My Company\"\n      columnHeader={true}\n      onChange={setTransactions}\n      onAdd={(item) => console.log('Added:', item)}\n      onEdit={(old, updated) => console.log('Edited:', old, '->', updated)}\n      onDelete={(item) => console.log('Deleted:', item)}\n    />\n  );\n}\n```\n\n## Validation Callbacks — `onBefore*`\n\nIntercept and validate before any mutation:\n\n```jsx\n<AccountingDiary\n  data={data}\n  onBeforeAdd={(item) => {\n    if (item.amount > 100000) {\n      alert('Amount too high!');\n      return false; // blocks the add\n    }\n    return true;\n  }}\n  onBeforeEdit={(oldItem, newItem) => {\n    return confirm(`Change ${oldItem.account} to ${newItem.account}?`);\n  }}\n  onBeforeDelete={(item) => {\n    return confirm(`Delete \"${item.text}\"?`);\n  }}\n  onChange={setData}\n/>\n```\n\nCallbacks can be synchronous (`boolean`) or asynchronous (`Promise<boolean>`).\n\n## Ledger View\n\nToggle between diary view (grouped by date) and ledger view (grouped by account with running balance):\n\n```jsx\n<AccountingDiary\n  data={data}\n  showLedgerToggle={true}  // default: true\n  columnHeader={true}\n/>\n```\n\nThe ledger view shows:\n- Transactions grouped by account name\n- Running balance per account\n- Per-account debit/credit totals\n- Color-coded balances (green for debit, red for credit)\n\n## Category & Tags\n\nClassify transactions with optional `category` and `tags` fields:\n\n```jsx\nconst data = [\n  {\n    date: '2024-01-01',\n    text: 'Office rent',\n    isDebit: true,\n    amount: 2000,\n    account: 'Rent',\n    currency: 'USD',\n    category: 'Operating',\n    tags: ['monthly', 'fixed'],\n  },\n];\n```\n\nCategories and tags are searchable via the search filter.\n\n## JSON Import/Export\n\nImport and export data as JSON, in addition to CSV and Excel:\n\n```jsx\n// Via toolbar buttons (JSON button in toolbar)\n// Or via ref API:\nconst ref = useRef(null);\nref.current?.exportToJSON();\nref.current?.importJSON('[{\"date\":\"2024-01-01\",\"text\":\"Test\",\"amount\":100,\"account\":\"Cash\",\"currency\":\"USD\",\"isDebit\":true}]');\n\n// Or via the headless hook:\nconst { importJSON, exportJSON } = useAccountingDiary({ initialData: [] });\nconst json = exportJSON(); // returns JSON string\nimportJSON(json);          // imports from JSON string\n```\n\n## i18n / Localisation\n\nAll labels are customizable via the `labels` prop:\n\n```jsx\n<AccountingDiary\n  title=\"Mon Entreprise\"\n  labels={{\n    debit: 'Débit',\n    credit: 'Crédit',\n    addTransaction: 'Ajouter une transaction',\n    editTransaction: 'Modifier la transaction',\n    save: 'Enregistrer',\n    cancel: 'Annuler',\n    search: 'Rechercher...',\n    noData: 'Aucune transaction.',\n    grandTotal: 'Total Général',\n    balance: 'Solde',\n    balanced: 'Équilibré',\n    unbalanced: 'Déséquilibré',\n    category: 'Catégorie',\n    tags: 'Étiquettes',\n    ledgerView: 'Vue Grand Livre',\n    diaryView: 'Vue Journal',\n    runningBalance: 'Solde Courant',\n    importJSON: 'Importer JSON',\n  }}\n/>\n```\n\nSee [USAGE.md](USAGE.md) for the full list of label keys.\n\n## Features\n\n- ✅ **Transaction templates** — reusable presets (rent, salary, etc.)\n- ✅ **Drag & drop import** — drop CSV/JSON files onto the component\n- ✅ **Filter dropdown** — filter by account/category\n- ✅ **Headless hook** (`useAccountingDiary`) — build your own UI\n- ✅ **Imperative ref API** — programmatic control (export, add, undo, etc.)\n- ✅ **Validation callbacks** (`onBeforeAdd`, `onBeforeEdit`, `onBeforeDelete`)\n- ✅ **Ledger view** — group by account with running balance\n- ✅ **Category & tags** — classify and search transactions\n- ✅ **JSON import/export** — full data backup/restore\n- ✅ Add, edit & delete transactions with interactive dialog\n- ✅ Export to PNG, JPEG, PDF, CSV, Excel, JSON\n- ✅ Import from CSV and JSON files\n- ✅ Search & filter by date range (searches category & tags too)\n- ✅ Sortable columns (date, account, amount)\n- ✅ Pagination support\n- ✅ Grand total & balance validation (debit vs credit)\n- ✅ Callback props (`onChange`, `onAdd`, `onEdit`, `onDelete`)\n- ✅ i18n / Localisation via `labels` prop\n- ✅ Undo/Redo functionality\n- ✅ Dark/Light theme support\n- ✅ Multi-currency support\n- ✅ Print-ready CSS\n- ✅ Keyboard navigation & ARIA labels\n- ✅ Empty state with CTA\n- ✅ Customizable styling\n- ✅ Responsive design\n- ✅ Zero external CSS\n\n## Props\n\n### Layout & Styling\n\n| Name | Type | Default | Description |\n|---|---|---|---|\n| `height` | `number` | `undefined` | Height of the component (min 650px). |\n| `width` | `number` | `undefined` | Width of the component. |\n| `title` | `string` | `\"Test Model\"` | Title of the accounting diary. |\n| `titleColor` | `string` | `\"#000\"` | Text color of the title. |\n| `titleBg` | `string` | `undefined` | Background color of the title. |\n| `titleBorder` | `boolean` | `false` | Whether the title has a border. |\n| `titleAllCaps` | `boolean` | `false` | Transform title to uppercase. |\n| `titleCorner` | `number` | `8` | Corner radius of the title box. |\n| `columnHeader` | `boolean` | `false` | Show column headers. |\n| `columnHeaderColor` | `string` | `undefined` | Column header text color. |\n| `columnHeaderBgColor` | `string` | `undefined` | Column header background color. |\n| `saveColor` | `string` | `undefined` | Export button background color. Uses primary theme color if not set. |\n| `saveIcon` | `React.ReactNode` | `undefined` | Custom icon for the export button. |\n| `account` | `IStyleConfig` | `undefined` | Account column styles (color, width, etc.). |\n| `amount` | `IStyleConfig` | `undefined` | Amount column styles (color, width, etc.). |\n| `footer` | `IStyleConfig` | `undefined` | Footer styles. |\n| `compactButtons` | `boolean` | `false` | Use compact button layout. |\n\n### Data & Callbacks\n\n| Name | Type | Default | Description |\n|---|---|---|---|\n| `data` | `IDataItem[]` | `undefined` | Array of accounting entries. |\n| `onChange` | `(data: IDataItem[]) => void` | `undefined` | Called when data changes (add, edit, delete, undo, redo). |\n| `onAdd` | `(item: IDataItem) => void` | `undefined` | Called when a transaction is added. |\n| `onEdit` | `(old: IDataItem, new: IDataItem) => void` | `undefined` | Called when a transaction is edited. |\n| `onDelete` | `(item: IDataItem) => void` | `undefined` | Called when a transaction is deleted. |\n| `onBeforeAdd` | `(item: IDataItem) => boolean \\| Promise<boolean>` | `undefined` | Validate before adding. Return `false` to block. |\n| `onBeforeEdit` | `(old: IDataItem, new: IDataItem) => boolean \\| Promise<boolean>` | `undefined` | Validate before editing. Return `false` to block. |\n| `onBeforeDelete` | `(item: IDataItem) => boolean \\| Promise<boolean>` | `undefined` | Validate before deleting. Return `false` to block. |\n\n### Features Toggle\n\n| Name | Type | Default | Description |\n|---|---|---|---|\n| `showExport` | `boolean` | `true` | Show export buttons. |\n| `showUndo` | `boolean` | `true` | Show undo/redo buttons. |\n| `showSample` | `boolean` | `true` | Show sample data button. |\n| `showClear` | `boolean` | `true` | Show clear button. |\n| `showAdd` | `boolean` | `true` | Show add transaction button. |\n| `showEdit` | `boolean` | `true` | Show edit/delete actions on rows. |\n| `showSearch` | `boolean` | `true` | Show search & date filter. |\n| `showGrandTotal` | `boolean` | `true` | Show grand total & balance check. |\n| `showLedgerToggle` | `boolean` | `true` | Show diary/ledger view toggle button. |\n| `onExport` | `(format: string, data: IDataItem[]) => void` | `undefined` | Called when data is exported. |\n\n### Pagination & i18n\n\n| Name | Type | Default | Description |\n|---|---|---|---|\n| `pageSize` | `number` | `undefined` | Transactions per page. Enables pagination when set. |\n| `labels` | `ILabels` | `defaultLabels` | Custom labels for i18n. See [USAGE.md](USAGE.md). |\n| `theme` | `'light' \\| 'dark'` | `'light'` | Theme mode (light/dark styling). |\n\n## Data Format\n\n```typescript\ninterface IDataItem {\n  id?: string;        // Auto-generated if not provided\n  date: string;       // YYYY-MM-DD\n  text: string;       // Transaction description\n  isDebit?: boolean;  // true = debit, false/undefined = credit\n  amount: number;     // Transaction amount\n  account: string;    // Account name\n  currency: string;   // Currency code (USD, EUR, XAF, etc.)\n  local?: string;     // Locale for formatting (en-US, fr-FR, de-DE)\n  category?: string;  // Transaction category (Operating, Investing, etc.)\n  tags?: string[];    // Tags for classification (searchable)\n}\n```\n\n## Performance\n\n- **Bundle size:** ~21KB (ESM, gzipped)\n- **Zero external CSS:** Styles are scoped and included\n- **Tree-shakeable:** ESM exports with `sideEffects: false`\n\n## Roadmap\n\n**Coming in v2.5.0:**\n- Mini chart — debit/credit visualization by month (`showChart` prop)\n- Multi-journal support (purchases, sales, bank, cash)\n- Reconciliation — mark transactions as reconciled\n\n**Future ideas:**\n- Virtualization for large datasets\n- Recurring transactions\n- Multi-currency conversion with exchange rates\n- Chart of accounts presets (OHADA, SYSCOHADA, IFRS)\n- Plugin system for custom columns/actions\n\nSee the full [ROADMAP](https://github.com/ruthel/react-accounting-diary/blob/main/ROADMAP.md) for details.\n\n## Contributing\n\nPlease check [issues](https://github.com/ruthel/react-accounting-diary/issues) for bug reports or suggestions.\n\nTo contribute, follow our [contributing guide](CONTRIBUTING.md).\n\n## License\n\nMIT - see [LICENSE](LICENSE) file for details.\n","readmeFilename":"README.md"}