{"_id":"@carboneio/carbone-sdk-js","_rev":"5-81c1b578ec4af6ea9c124bbb04274dae","name":"@carboneio/carbone-sdk-js","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.0":{"name":"@carboneio/carbone-sdk-js","version":"1.1.0","description":"The javascript SDK to use Carbone Render easily ","homepage":"https://github.com/carboneio/carbone-sdk-js","main":"dist/main.js","module":"dist/main.js","repository":{"type":"git","url":"git+https://github.com/carboneio/carbone-sdk-js.git"},"scripts":{"build":"rm -rf dist && mkdir dist && node ./bin/build.js","test":"jest --config jest.config.json --coverage","lint":"eslint \"src/**/*.js\" \"tests/**/*.js\" --fix && prettier --write \"src/**/*.js\" \"tests/**/*.js\""},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"**/*":["eslint --fix","prettier --write"]},"author":{"name":"steevepay"},"license":"ISC","devDependencies":{"@babel/preset-env":"^7.14.4","core-js":"^3.13.1","esbuild":"^0.6.34","eslint":"^7.27.0","eslint-config-prettier":"^6.15.0","eslint-plugin-jest":"^23.20.0","fetch-mock-jest":"^1.5.1","husky":"^4.3.8","jest":"^26.6.3","lint-staged":"^10.5.4","mocha":"^8.4.0","node-fetch":"^2.6.1","prettier":"2.0.5","regenerator-runtime":"^0.13.7"},"gitHead":"7333124c90d4cfe4cdc86ab2c4d35d6ea43f4a3c","bugs":{"url":"https://github.com/carboneio/carbone-sdk-js/issues"},"_id":"@carboneio/carbone-sdk-js@1.1.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-opa88XbS47ciZhCmKrrMo6/NbSxzHdNVlnYHnNvN6BQYObEi8QbuSi0E8Xs5bFUQsAqITKHdhBfB4hl2fy5d/A==","shasum":"faef614233c3dbaa08df9124a34357220c63d703","tarball":"https://registry.npmjs.org/@carboneio/carbone-sdk-js/-/carbone-sdk-js-1.1.0.tgz","fileCount":4,"unpackedSize":8557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgt7wpCRA9TVsSAnZWagAAbpYP/26PppRBXDaPxC9ewcLm\n1b3PF0QOS/BDhuCNsAhLD42HzdvaEWnEa9B7gbMBXEZFmMbs0E7FkGav2RX1\nvcFT73fuLSjmVbZTVeWIlSr9dKzcXodsnNFaT4YWRVBsAil7P1LEBZRgRE+M\n566HMrINTs6/dnn8USPdQUnkfe+KBOkWf98i+nSOeunBTzeC4iIwQ+IwRyOv\ndVYzE0l5bcd2T8bZOfdmKZp3y/lNM9icKGgGQGsIVxPnGoyRwPVcbIpf53en\nsaK10QyKDpVAJiXGcNAI+zKG1fycPJVLwQ/yAtfVWwrgPXdJbIfDlH1PehuM\nzvVgewATpCTQeR5TTKiBnNydS9xy/Xl0Ruuc4DiDYiVEc7tSQFLsnCTJsjHs\naAPuZMY7Q8erkC11Ut50rya9hARA0ZcjETiUrwZWZp6KZKeVp+2XElRCxqr0\nUxOmMdrYKu8Q6rcXBJaHrlxozNSB3PDGGlAw3O4RG38VVIRyWB4nH8tkZ6Jw\nEqMDIxlmaEv2cazvriV9mGy698IY276+jVs3U3S8juEf2grIcuxrhWVWM5yk\nYjYRg5JcOs6crnv22Euvb2dDJUqQHv7311pGNn2F4KeOhO63NIhG8QAnKbCH\nH+B9V9NqTJNr0iojPACo/bB/i2q7KcKGVW8fXySyzALrRfpvx8M6QRzH65Ea\nEmHt\r\n=icvC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDToQUNZmDl/EY83Z6wDSzNs2pNxRM32/i4hVawgppdFQIgHBKCqGhvVzdUBSAp240c0WZLE5l0fsDpeGCzu4f1a9I="}]},"_npmUser":{"name":"steevepay","email":"steeve.payraudeau@gmail.com"},"directories":{},"maintainers":[{"name":"steevepay","email":"steeve.payraudeau@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/carbone-sdk-js_1.1.0_1622653993759_0.880759779637748"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Use only carbone-sdk-js"},"1.1.1":{"name":"@carboneio/carbone-sdk-js","version":"1.1.1","description":"The javascript SDK to use Carbone Render easily ","homepage":"https://github.com/carboneio/carbone-sdk-js","main":"dist/main.js","module":"dist/main.js","repository":{"type":"git","url":"git+https://github.com/carboneio/carbone-sdk-js.git"},"scripts":{"build":"rm -rf dist && mkdir dist && node ./bin/build.js","test":"jest --config jest.config.json --coverage","lint":"eslint \"src/**/*.js\" \"tests/**/*.js\" --fix && prettier --write \"src/**/*.js\" \"tests/**/*.js\""},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"**/*":["eslint --fix","prettier --write"]},"author":{"name":"steevepay"},"license":"ISC","devDependencies":{"@babel/preset-env":"^7.14.4","core-js":"^3.13.1","esbuild":"^0.6.34","eslint":"^7.27.0","eslint-config-prettier":"^6.15.0","eslint-plugin-jest":"^23.20.0","fetch-mock-jest":"^1.5.1","husky":"^4.3.8","jest":"^26.6.3","lint-staged":"^10.5.4","mocha":"^8.4.0","node-fetch":"^2.6.1","prettier":"2.0.5","regenerator-runtime":"^0.13.7"},"gitHead":"a89338f3942ff18cb46ac371709c021b35d61ef8","bugs":{"url":"https://github.com/carboneio/carbone-sdk-js/issues"},"_id":"@carboneio/carbone-sdk-js@1.1.1","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-JAoqNHX0jwDKMrDFjvrhvTyKT+aUTIpJIFt8IRnYy1u4BoNt8weWdmu4CfcfI5A285hPs0kKZF7XhVB1FStvGg==","shasum":"542b124f8fb87a1a36d6907ad9b74cc539c9c50c","tarball":"https://registry.npmjs.org/@carboneio/carbone-sdk-js/-/carbone-sdk-js-1.1.1.tgz","fileCount":5,"unpackedSize":23967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgt8Q8CRA9TVsSAnZWagAAyykP/iPevNmNqTq7wJ/PGkpR\nbemazULUjUI5u38yFsTYeFURTnmJQZKKlv6zjFOJkMVdUU1AK2sqcQTBevNa\nqsE3oXdkWR2LuEpapiTgQrcx+NDKc5JcfA+qzev2Bb9isQs04CBZxiuLxRxw\nCdqV5mKs0TLsvEYp/8UOXA2jFwiSc+79ZoA0jGyu7UfQ+83BwSqJ12s0iQkF\nO21aRZhl+EuynmoOfWYrRuLz7WLjwC61dLw7RFXDA0AGeGkgJHH64f1KVn6n\nJOBbHbpHut7Fi64t8KCx5PI9tzwEmLpPY3pi7g0G50iHEVBF+mBPjxoVmSNI\n5qiWBmB9spAS6L5E+QNpQElH3/BacYk8MJJSwDOvjif4jCuU1h7hxT0B15Le\nJY+gXWssjRFpxyFAQn+yYiRdB6gnlJUB68Z0fhC20PrnnJq1UU29xjniQImK\nStbBNC7vWzHaAZpUX1RLC644dgFErDkbEYNJUjAz0HsjW42Gx71P4OTFXPmZ\nJnbsJFoAE3GOHeanqNOiXS5wmYCFOC2NlE8pSrKRVlyBOZ+0jdpfhtYDZlUO\nM0eelr4UU0VizvmknuYGZWfxvwv/Ef3mkNHevnTznC/bbzmVNYn1sKhzDvJw\ndZshyKh2sKztO2TnanFVhIqlLuZfpsELj8KoUxRWR8zxVa6KbX4O1X/ThIPv\n5Vir\r\n=W8Wu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4rgEGWzPMgBhGGFceHdgfxCFBXtvzrBtC3KTtYlFTNQIgXWH+/LuJGAGcHNcdwGbS1SPJ9c55pAUvN22ZxGKrZ20="}]},"_npmUser":{"name":"steevepay","email":"steeve.payraudeau@gmail.com"},"directories":{},"maintainers":[{"name":"steevepay","email":"steeve.payraudeau@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/carbone-sdk-js_1.1.1_1622656060494_0.6174056653755444"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Use only carbone-sdk-js"}},"time":{"created":"2021-06-02T17:13:13.394Z","1.1.0":"2021-06-02T17:13:13.867Z","modified":"2022-04-04T21:50:40.779Z","1.1.1":"2021-06-02T17:47:40.626Z"},"maintainers":[{"email":"dgrelaud@ideolys.com","name":"dgrelaud"},{"email":"guillaume@carbone.io","name":"guillaume-carbone"},{"email":"steeve.payraudeau@gmail.com","name":"steevepay"}],"description":"The javascript SDK to use Carbone Render easily ","homepage":"https://github.com/carboneio/carbone-sdk-js","repository":{"type":"git","url":"git+https://github.com/carboneio/carbone-sdk-js.git"},"author":{"name":"steevepay"},"bugs":{"url":"https://github.com/carboneio/carbone-sdk-js/issues"},"license":"ISC","readme":"# Carbone Render Javascript\n![Version](https://img.shields.io/badge/version-1.1.0-blue.svg?cacheSeconds=2592000)\n[![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](./doc/API-REFERENCE.md)\n\n> The javascript SDK to use Carbone Render easily into your frontend (Angular, Vuejs, Svelte, React, Ember.js...).\n\nCarbone is a report generator (PDF, DOCX, XLSX, ODT, PPTX, ODS, XML, CSV...) using templates and JSON data.\n[Learn more about the Carbone ecosystem](https://carbone.io/documentation.html).\n\n## Install\n\n```sh\nnpm install https://github.com/carboneio/carbone-sdk-js\n```\n\nor\n\n```sh\nyarn add https://github.com/carboneio/carbone-sdk-js\n```\n\n## Usage\n\n```js\n  import carboneSDK from \"carbone-sdk-js\";\n  // SDK constructor, the access token have to be passed as an argument to carboneRenderSDK\n  const _carboneService = carboneSDK(\"eyJhbGc...\");\n  // Template from a file input OR template ID\n  const _template = document.getElementById(\"inputFile\").files[0];\n  // Data from an input\n  let _data = JSON.parse(document.getElementById(\"inputData\").value);\n  // Render the report from a template and a JSON Data\n  _carboneService.render(_template, _data).then(({ content, name }) => {\n    // name == report name as a String\n    // content == report content as a Blob, it can be used to download the file\n  });\n```\n***[Checkout an integration example.](./doc/index.render.example.html)***\n\n## Documentation\n\n- [SDK API REFERENCE](./doc/API-REFERENCE.md)\n- [SDK quick integration example](./doc/index.render.example.html)\n- [SDK full integration example](./doc/index.full.example.html)\n- [Documentation to design a template](https://carbone.io/documentation.html#building-a-template)\n\n## Build for production\n\nTo edit build options, look at the file [\"build.js\"](./bin/build.js) for more details.\n\n```bash\n$ npm run build\n```\n\nAfter running the command, the script is available on the folder \"dist\".\n\n## Run tests\nBuild the project\n```bash\n$ npm run build\n```\nTo run all the tests:\n```bash\n$ npm run test\n```\nIf you need to test the generation of templateId, you can use the nodejs `main.js` to test the sha256 generation.\n```bash\n$ node ./tests/generate_template_id.js\n```\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\n\nFeel free to check [issues page](https://github.com/carboneio/carbone-sdk-js/issues).\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 👤 Author\n\n- [**@steevepay**](https://github.com/steevepay)\n","readmeFilename":"README.md"}