{"_id":"@benjaminnoufel/react-material-ui-table","_rev":"3-87e5ac0aa69b231f1ed1628b9b12b892","name":"@benjaminnoufel/react-material-ui-table","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@benjaminnoufel/react-material-ui-table","version":"1.0.0","description":"Create table with Material-ui Table for React.","license":"MIT","main":"./dist/ReactMaterialUiTable.js","typings":"./dist/ReactMaterialUiTable.d.ts","scripts":{"build":"rollup --config rollup.config.js","types":"tsc --emitDeclarationOnly --declaration --outDir dist","test":"jest","lint":"eslint ."},"devDependencies":{"@benjaminnoufel/eslint-config-javascript":"^0.1.3","@benjaminnoufel/eslint-config-typescript":"^0.1.2","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"^11.0.1","@rollup/plugin-typescript":"^8.1.0","@types/jest":"^26.0.23","@types/react":"^17.0.0","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^4.28.1","eslint":"^7.24.0","eslint-loader":"^4.0.2","eslint-plugin-jest":"^24.3.6","eslint-plugin-json":"^2.1.2","eslint-plugin-react-hooks":"^4.0.8","jest":"^26.6.3","rollup":"^2.35.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-terser":"^7.0.2","ts-jest":"^26.5.4","tslib":"^2.0.1","typescript":"^4.0.3"},"peerDependencies":{"@material-ui/core":"^4.11.4","react":"16"},"licenseText":"Copyright 2021 Benjamin Noufel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"@benjaminnoufel/react-material-ui-table@1.0.0","dist":{"shasum":"b4d4592dfd9ac0ae1779865c03f7a7f57189d014","integrity":"sha512-3AmvPqGpMr25Yp8vJYEFyzVzOzuYb4/PR/9tPpV1FPXQkCSgt9kvFLWtNL7k/rniLu7hxYzi7g+LM3UZuucYJg==","tarball":"https://registry.npmjs.org/@benjaminnoufel/react-material-ui-table/-/react-material-ui-table-1.0.0.tgz","fileCount":9,"unpackedSize":10965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4Hv0CRA9TVsSAnZWagAA+y0P/0wSVarskhJ4AP2LK4xY\neuLW20lCSH3/xyRGKewtnzrvxslm4fTNSo9apAWote/zHZyU0OsUoBZef7fr\nhDfXYl5n94wml0O3JZBmFCPaGHF5KjtjISYrfQtDgmVt7SG2Z0BsAwF6zF1K\nqFjU3+bR8ZbXwvbq+Noda63nCkIwnxJez2bSDYqY8lSw1cgLPCGIhQ2J3Jb9\nC50WMKF3pe+0fN/YfmaRnS+IwezqKPNo/7vtqcPNY8BEJIOl9+BxKnepYk6T\n1BTWzoamcX/3yAsocLE65iJt8BKFL6h9pny5E4pvrr7xLa3iva0fa8sv0147\noHOMNfqKUWMF3mkClRh/4wpxXrwRX3n/HzEGOAFSDwkLL5uSp/cWhaVkU5nE\nvit54MYL4pbZi1cvgECnKzZU3M5ZbnQeFYq9z+Bt2NVL+KrzqQWLeWy7N25j\n4rgU8DwBSy7/CblPoKwWZkvKhGVlIAN45PE5vMT7v+uueT3+K8wv2GVUAgmN\nfrANonqFfdXQPb7zU7GTmI2Fmu92tG12VI/khtWm4iY71YgfP1+gjW8//MXi\n11WUlTVl/nHblISZ22FiFlFaImL4XGGRGRCTVPJ7QPNHavQXsjOz4+qFSpkQ\nNgnuWVEzWnmgoKD64fe/Yf47JOVacWSVhJTG39MghfDfDy0wM1ZLywlLvTjN\nRKKJ\r\n=1uw6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3aZzd96kZYsRAWJNZmCKNBvEU5ZclFfZDb70TFXYT7QIgGvYMqrXNH0JrviRmdjtUTfLjqXdHwmTDPX/rsIukqxo="}]},"_npmUser":{"name":"bnoufel","email":"benjamin.noufel@gmail.com"},"directories":{},"maintainers":[{"name":"bnoufel","email":"benjamin.noufel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-material-ui-table_1.0.0_1625324531725_0.2688963165402376"},"_hasShrinkwrap":false},"1.0.1":{"name":"@benjaminnoufel/react-material-ui-table","version":"1.0.1","description":"Create table with Material-ui Table for React.","license":"MIT","main":"./dist/ReactMaterialUiTable.js","typings":"./dist/ReactMaterialUiTable.d.ts","scripts":{"build":"rollup --config rollup.config.js","types":"tsc --emitDeclarationOnly --declaration --outDir dist","test":"jest","lint":"eslint ."},"devDependencies":{"@benjaminnoufel/eslint-config-javascript":"^0.1.3","@benjaminnoufel/eslint-config-typescript":"^0.1.2","@rollup/plugin-commonjs":"^17.0.0","@rollup/plugin-node-resolve":"^11.0.1","@rollup/plugin-typescript":"^8.1.0","@types/jest":"^26.0.23","@types/react":"^17.0.0","@typescript-eslint/eslint-plugin":"^3.7.1","@typescript-eslint/parser":"^4.28.1","eslint":"^7.24.0","eslint-loader":"^4.0.2","eslint-plugin-jest":"^24.3.6","eslint-plugin-json":"^2.1.2","eslint-plugin-react-hooks":"^4.0.8","jest":"^26.6.3","rollup":"^2.35.1","rollup-plugin-delete":"^2.0.0","rollup-plugin-terser":"^7.0.2","ts-jest":"^26.5.4","tslib":"^2.0.1","typescript":"^4.0.3"},"peerDependencies":{"@material-ui/core":"^4.11.4","react":"16"},"licenseText":"Copyright 2021 Benjamin Noufel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"@benjaminnoufel/react-material-ui-table@1.0.1","dist":{"shasum":"6103019b964ac4ab45189d6921f9eeb7f9c78ea0","integrity":"sha512-K/Lso1B3ht7RLSlWG2zREMfeKgHWRnq3XXqOkOH4mjpbbyw8eWKRXkIGCil9ps9fPYA8AxI8a2A9d6B7CSdAdw==","tarball":"https://registry.npmjs.org/@benjaminnoufel/react-material-ui-table/-/react-material-ui-table-1.0.1.tgz","fileCount":9,"unpackedSize":11143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4Ih8CRA9TVsSAnZWagAAPnUP/RmYPDkvd95Xy90k7gJS\nxT4AjZM8BQDHqs0GEBSAKANc1PMnuDq23gRID5j1+Gv7VnKirruqQBER5GmO\nv3ykv+gfOYrRP0J1rfUVDvQ18a4B/wuhOSKXvV0MOeyeGrrbfVbdUfvp8cUK\nh93OTnTTMQkF1IhglqVOpGL0D+R8OQay7fpKn1M+UVGyn6HAOPCdN8xalXsW\n8xKnOxk6T5dVEdXFBVbFPn0bngpFy1NxO5We0rbPjl4zVa7aNUTEOYKkHZDe\nYVWdD74kY52l07goSpvpeyqkUdGB1O/tE/BUkyBZAOXxFyX9K+EssBkP90GJ\nGxO4auxz38y0mYPoThJ7vRaqZ92qq5kQPGoSkSFcK4XvIdjsOG0iEIjLSrwd\n3x4Pas5oOJshuteJRG/RtMmgxAINT+2tJhJVpC5Pz5bp8bYMBFTbzILlFEPm\nuxf+cddffHoKFxnzmLsDNvlk/gJ/T8/ZaqfxetQCZQLulZU5wxh++wWjpTDi\nURcXUKZsmNRkGY/w4U/r6DW6Pj+c1gTTGNCwff5g0bR327a03KzYhDXLe5VU\n4eYVvx5rIao2xRVHI/ZtQ+mEwn6eBs4eVYlQckZTHFizXbmXDmBA1yz2Y+tI\nOUfcI4wh5iSTj+I3B2WfQ0eWX/Pt3gCb5samaIwCfl2b8Le8KvmtvHaQK/z0\nNU2u\r\n=y/fr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyfdwuMAsXxuBaoH/091DNrv9OLvEt9KTh8v+qnZCvMQIgFTIyUWyBsDPak7+WMYePB5rRQJ8H6SiZqPQWfZoP6Fg="}]},"_npmUser":{"name":"bnoufel","email":"benjamin.noufel@gmail.com"},"directories":{},"maintainers":[{"name":"bnoufel","email":"benjamin.noufel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-material-ui-table_1.0.1_1625327740012_0.36116235734492497"},"_hasShrinkwrap":false},"2.0.0":{"name":"@benjaminnoufel/react-material-ui-table","version":"2.0.0","description":"Create table with mui Table for React.","license":"MIT","main":"./dist/ReactMaterialUiTable.js","typings":"./dist/ReactMaterialUiTable.d.ts","keywords":["react","table","mui","material-ui"],"scripts":{"build":"rollup --config rollup.config.js","types":"tsc --emitDeclarationOnly --declaration --outDir dist","test":"jest","lint":"eslint ."},"devDependencies":{"@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-node-resolve":"^13.0.6","@rollup/plugin-typescript":"^8.3.0","@types/jest":"^27.0.3","@types/react":"^17.0.37","@typescript-eslint/eslint-plugin":"^5.6.0","@typescript-eslint/parser":"^5.6.0","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-plugin-adonis":"^2.1.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.4.4","prettier":"^2.5.1","rollup":"^2.61.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-terser":"^7.0.2","ts-jest":"^27.1.1","tslib":"^2.3.1","typescript":"^4.5.3"},"peerDependencies":{"@emotion/react":"^11.7.0","@emotion/styled":"^11.6.0","@mui/material":"^5.2.3","@mui/styles":"^5.2.3","react":"^17.0.2"},"licenseText":"Copyright 2021 Benjamin Noufel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"@benjaminnoufel/react-material-ui-table@2.0.0","dist":{"shasum":"ff5a94540ea39c691c2195f9e012b2b15b9c98e2","integrity":"sha512-wo2aM5YQ6+xJBf4IgquLN1uGa5cci2hl+kILh4QI3EHACVj4XElbcgYI98nWzAIwaGo7cvmreEu14QPJY/BKOw==","tarball":"https://registry.npmjs.org/@benjaminnoufel/react-material-ui-table/-/react-material-ui-table-2.0.0.tgz","fileCount":9,"unpackedSize":279521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtKbxCRA9TVsSAnZWagAAa+AQAJWinoErKmwRIPAlNnJS\nI35Fl5IXpCUpUz8bl6r+q0BK8VdVSyMtg94HymnEf+LgYjRrvpwu6QSMizvx\n+5jHo8B4O74uHXofdcagYPrGZ6byTTyQ5pGOTByycDC783humSY1TKCVvdXa\nHcwYNnnXW9NapMDC7qkOJMRBHNoN2bLJDBl9t9pcxtYRAjhh3uAq8qGXR3vS\nm/vp6DzWMNt5FNSNOoyP8mXZDtETwmNqwUPkzeYGzMmaGZshCUtHUbjNPCcV\neV0ghPqoDZFEgIiqzXj8WS7QAb/M1jWFVmUvIuAytV6HCNyyOTn1uYBlyvyY\nbx0Xak/6jLG6cV2HzJYjlAuW3trYyA06KIiaks0oovaTqB+UY2X9MimXxAR6\nAPBFZwLGiMYfS7jHNkDQsz1hqCBwcJvdSZGm00T7sqEM0R8h6KeNcDpq2kII\ngYWSOwR8AGu9gBU8oVhznygt12B3x5W1xo6Wyo/suMEuQpGojzbahDMhKqK+\nHto1cYUNTq393qplDB3uIYWRYaHaye0k1bvyrHwaphWl7B8/fJm8Fxs//14v\npmDX1/3zdm/4nPO8smnZnBRYtoackHwd/NeG7V2oCvoImhn9gKsCoWMWRzgC\nXBIrPjLwtfuWU+6ELm/3v6oby/CjZ0rjhHGhHRmX9b4YINFayq2Gt6QgGxsJ\nbt3T\r\n=2rbY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxMFxq/7Tmj2rSrW/jQ+/FlVYwx8uKujxQBq10jMXUowIhAKm+0uHNBvfQD3LTXFmyfah9QCipYqz3KsiS0hvPoISp"}]},"_npmUser":{"name":"bnoufel","email":"benjamin.noufel@gmail.com"},"directories":{},"maintainers":[{"name":"bnoufel","email":"benjamin.noufel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-material-ui-table_2.0.0_1639229169408_0.7745652522191668"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-03T15:02:11.421Z","1.0.0":"2021-07-03T15:02:11.858Z","modified":"2022-04-04T18:22:51.794Z","1.0.1":"2021-07-03T15:55:40.160Z","2.0.0":"2021-12-11T13:26:09.756Z"},"maintainers":[{"name":"bnoufel","email":"benjamin.noufel@gmail.com"}],"description":"Create table with mui Table for React.","license":"MIT","readme":"# react-material-ui-table\n\nCreate table with Material-ui Table for React.\n\n![Code Style CI](https://github.com/benjaminnoufel/react-material-ui-table/workflows/Code%20Style%20CI/badge.svg)\n![Test CI](https://github.com/benjaminnoufel/react-material-ui-table/workflows/Test%20CI/badge.svg)\n![Build CI](https://github.com/benjaminnoufel/react-material-ui-table/workflows/Build%20CI/badge.svg)\n![Package](https://github.com/benjaminnoufel/react-material-ui-table/workflows/Package/badge.svg)\n\n## Requirements\n\n- [Node](https://nodejs.org/en/)\n- [NPM](https://www.npmjs.com/)\n- [Yarn](https://yarnpkg.com/) (instead of NPM)\n\n## Installation\n\n### NPM\n\n```console\n$ npm install @mui/material @mui/styles react @benjaminnoufel/react-material-ui-table\n```\n\n### Yarn\n\n```console\n$ yarn add @mui/material @mui/styles react @benjaminnoufel/react-material-ui-table\n```\n\n## Usage\n\n### Use ReactMaterialUiTable without additionnalColumns\n```tsx\nimport {ReactMaterialUiTable, formatHeaderColumn} from \"@benjaminnoufel/react-material-ui-table\"\nimport React from \"react\";\n\nconst App = () => {\n    const head = {\n        name: \"Name\",\n        description: \"Description\",\n        reference: \"Reference\"\n    }\n    const headers = formatHeaderColumn(head);\n    const rows = [\n        {\n            name: \"Product 1\",\n            description: \"Description of product one\",\n            reference: \"P-252-98\"\n        },\n        {\n            name: \"Product 2\",\n            description: \"Description of product two\",\n            reference: \"P-252-99\"\n        }\n    ]   \n    return (\n        <>\n            <ReactMaterialUiTable\n                headers={headers}\n                hiddenColumns={[\"__v\", \"label\"]}\n                rows={rows}\n            />\n        </>\n    );   \n}\n\n```\n\n### Use ReactMaterialUiTable with additionnalColumns\n```tsx\nimport ReactMaterialUiTable from \"@benjaminnoufel/react-material-ui-table\"\nimport React from \"react\";\n\nconst App = () => {\n    const head = {\n        name: \"Name\",\n        description: \"Description\",\n        reference: \"Reference\"\n    }\n    const headers = formatHeaderColumn(head);\n    const rows = [\n        {\n            name: \"Product 1\",\n            description: \"Description of product one\",\n            reference: \"P-252-98\"\n        },\n        {\n            name: \"Product 2\",\n            description: \"Description of product two\",\n            reference: \"P-252-99\"\n        }\n    ]   \n    return (\n\n        <>\n            <ReactMaterialUiTable\n                headers={headers}\n                hiddenColumns={[\"__v\", \"label\"]}\n                rows={entities}\n                additionnalColumns={[(id: any) => <button onClick={() => alert(`id = ${id}`)}>Click on me</button>]}\n            />\n        </>\n    );   \n}\n\n```\n\n### API\n\n```ts\ntype AdditionnalColumn = (id: any) => JSX.Element;\n\ninterface ReactMaterialUiTableProps extends React.TableHTMLAttributes<HTMLTableElement> {\n    headers: Record<string, string>;\n    rows: Array<Record<string, any>>;\n    labelRowsPerPage?: string;\n    backIconButtonText?: string;\n    nextIconButtonText?: string;\n    showSearch?: boolean;\n    hiddenColumns?: string[];\n    rowsPerPage?: number;\n    rowsPerPageOptions?: number[];\n    additionnalColumnsId?: string;\n    additionnalColumnsLabel?: string;\n    additionnalColumns?: Array<AdditionnalColumn>;\n}\n```\n\n## License\n\nSee [`LICENSE`](./LICENSE).\n\n## Changelog\n\nSee [`CHANGELOG.md`](./CHANGELOG.md).\n\n## Contributions\n\nSee [`CONTRIBUTING.md`](./CONTRIBUTING.md).\n","readmeFilename":"README.md","keywords":["react","table","mui","material-ui"]}