{"_id":"@croz/nrich-registry-core","_rev":"1-394bb75aa64c919ff91fc77b0362fe43","name":"@croz/nrich-registry-core","dist-tags":{"latest":"0.0.2-RC"},"versions":{"0.0.1-RC":{"name":"@croz/nrich-registry-core","description":"Contains core utilities related to the nrich-registry module","version":"0.0.1-RC","author":{"name":"CROZ"},"bugs":{"url":"https://github.com/croz-ltd/nrich-frontend/issues"},"dependencies":{"zustand":"^4.1.4"},"devDependencies":{"@croz/nrich-form-configuration-core":"*","@croz/nrich-jest-config":"*","@croz/nrich-tsconfig":"*","@croz/nrich-tsup-config":"*","@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.3.0","@testing-library/react-hooks":"^8.0.0","@types/jest":"^28.1.0","eslint":"^8.2.0","eslint-config-nrich":"*","jest":"^28.1.0","msw":"^0.48.1","react":"^18.1.0","react-dom":"^18.1.0","tsup":"^6.5.0","whatwg-fetch":"^3.6.2"},"homepage":"https://github.com/croz-ltd/nrich-frontend/tree/master/libs/registry/core#readme","keywords":["croz","nrich","nrich-registry","react","typescript","zustand"],"main":"dist/index.js","module":"dist/index.mjs","peerDependencies":{"@croz/nrich-form-configuration-core":"*","react":">=16.8.0","react-dom":">=16.8.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/croz-ltd/nrich-frontend.git","directory":"libs/registry/core"},"scripts":{"build":"tsup","clean":"rm -rf .turbo && rm -rf dist","lint":"eslint . --ext .ts,.tsx","test":"jest"},"types":"dist/index.d.ts","gitHead":"609bd7e4b7b5fa2495746637a9265688c587d9c8","_id":"@croz/nrich-registry-core@0.0.1-RC","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-LK1O/KNsOWrrHUYBaE8Z+gdq8YXJpF27TXlfiM8WdPEBgg9gN3y3PRFMLMxdasVQoxnF1kK1CJ/szE6clqCFCQ==","shasum":"50d2be855983a1d2e7496245bc181457c6a6c77e","tarball":"https://registry.npmjs.org/@croz/nrich-registry-core/-/nrich-registry-core-0.0.1-RC.tgz","fileCount":7,"unpackedSize":170586,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQrYhIFGg31D6cwPRqxz8beG+ldhbrrXLtw1IdZhCSzQIgBCPbGSm+GK5CZvqHPaTZSN05fp1YKQqX4Dpr+CU+iNI="}]},"_npmUser":{"name":"jtomic","email":"jtomic@croz.net"},"directories":{},"maintainers":[{"name":"djajcevic","email":"denis.jajcevic+npmjs@gmail.com"},{"name":"jtomic","email":"jtomic@croz.net"},{"name":"ivankrnic","email":"ikrnic@croz.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nrich-registry-core_0.0.1-RC_1708680315496_0.06502545009527361"},"_hasShrinkwrap":false},"0.0.2-RC":{"name":"@croz/nrich-registry-core","description":"Contains core utilities related to the nrich-registry module","version":"0.0.2-RC","author":{"name":"CROZ"},"bugs":{"url":"https://github.com/croz-ltd/nrich-frontend/issues"},"dependencies":{"zustand":"^4.1.4"},"devDependencies":{"@croz/nrich-form-configuration-core":"*","@croz/nrich-jest-config":"*","@croz/nrich-tsconfig":"*","@croz/nrich-tsup-config":"*","@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.3.0","@testing-library/react-hooks":"^8.0.0","@types/jest":"^28.1.0","eslint":"^8.2.0","eslint-config-nrich":"*","jest":"^28.1.0","msw":"^0.48.1","react":"^18.1.0","react-dom":"^18.1.0","tsup":"^6.5.0","whatwg-fetch":"^3.6.2"},"homepage":"https://github.com/croz-ltd/nrich-frontend/tree/master/libs/registry/core#readme","keywords":["croz","nrich","nrich-registry","react","typescript","zustand"],"main":"dist/index.js","module":"dist/index.mjs","peerDependencies":{"@croz/nrich-form-configuration-core":"*","react":">=16.8.0","react-dom":">=16.8.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/croz-ltd/nrich-frontend.git","directory":"libs/registry/core"},"scripts":{"build":"tsup","clean":"rm -rf .turbo && rm -rf dist","lint":"eslint . --ext .ts,.tsx","test":"jest"},"types":"dist/index.d.ts","gitHead":"997cb055ec189043c99f394b1a52a183e1c05446","_id":"@croz/nrich-registry-core@0.0.2-RC","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-03QhDJ3okW7RhXYqxIy2GrgCiYXd3nkLSHReysfmIWgi9OOsKL/Vwo2KYaNctrEu0GpxWww5Stkq+HbrJAYmUQ==","shasum":"ffc47a21379f19d433a611162170d2c080f52023","tarball":"https://registry.npmjs.org/@croz/nrich-registry-core/-/nrich-registry-core-0.0.2-RC.tgz","fileCount":7,"unpackedSize":189682,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1p44NaDVuZLxp2wLgVDxtoQ+gN9RXQ+GK6ngoUWsSGwIhANDKRp2huiJPI7HDP8rjHaWhaRWuJH5uqSHmhEFvXY+P"}]},"_npmUser":{"name":"jtomic","email":"jtomic@croz.net"},"directories":{},"maintainers":[{"name":"djajcevic","email":"denis.jajcevic+npmjs@gmail.com"},{"name":"jtomic","email":"jtomic@croz.net"},{"name":"ivankrnic","email":"ikrnic@croz.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nrich-registry-core_0.0.2-RC_1712230991535_0.8385293687057198"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-23T09:25:15.349Z","0.0.1-RC":"2024-02-23T09:25:15.684Z","modified":"2024-04-04T11:43:11.965Z","0.0.2-RC":"2024-04-04T11:43:11.729Z"},"maintainers":[{"name":"djajcevic","email":"denis.jajcevic+npmjs@gmail.com"},{"name":"jtomic","email":"jtomic@croz.net"},{"name":"ivankrnic","email":"ikrnic@croz.net"}],"description":"Contains core utilities related to the nrich-registry module","homepage":"https://github.com/croz-ltd/nrich-frontend/tree/master/libs/registry/core#readme","keywords":["croz","nrich","nrich-registry","react","typescript","zustand"],"repository":{"type":"git","url":"git+https://github.com/croz-ltd/nrich-frontend.git","directory":"libs/registry/core"},"author":{"name":"CROZ"},"bugs":{"url":"https://github.com/croz-ltd/nrich-frontend/issues"},"readme":"# @croz/nrich-registry-core\r\n\r\n## Overview\r\n\r\n`@croz/nrich-registry-core` is a module which enables administration of registries. It provides main hooks for\r\nloading registry data, adding new, updating existing and deleting unwanted entities.\r\nIt's a frontend part of [nrich-registry](https://github.com/croz-ltd/nrich/blob/master/nrich-registry/README.md) backend module.\r\n\r\nFor create and update forms, it relies on [nrich-form-configuration](https://github.com/croz-ltd/nrich-frontend/blob/master/libs/form-configuration/core/README.md) module.\r\n\r\n## Setup\r\n\r\nTo use this module in your project run `npm install @croz/nrich-registry-core` or `yarn add @croz/nrich-registry-core`\r\n\r\n## Usage\r\n\r\n1. On the app level where your registry administration will be, use `RegistryProvider` which loads configurations.\r\n\r\n```tsx\r\nimport { RegistryProvider } from \"@croz/nrich-registry-core\";\r\n\r\nconst RegistryAdministration = () => (\r\n  <RegistryProvider>\r\n    {/* rest of the administration part... */}\r\n  </RegistryProvider>\r\n);\r\n```\r\n\r\n2. Use available hooks to add logic for your administration. Hook can be used in your own components, or you can use already available Material UI implementation from\r\n   [@croz/nrich-registry-mui](../mui/README.md)\r\n\r\nAvailable hooks are:\r\n\r\n| hook name                            | usage                                                                                               |\r\n|--------------------------------------|-----------------------------------------------------------------------------------------------------|\r\n| `useRegistryEntityAdministration`    | Main hook for whole administration, use at top level entity administration component                |\r\n| `useRegistryEntity`                  | Handles lower level stuff as data handling and configuration fetching                               |\r\n| `useRegistryFilter`                  | Contains useful handlers for search query and filter properties                                     |\r\n| `useRegistryForm`                    | Returns final configuration (field and validation) and initial values for creating add/update forms |\r\n| `useRegistryEntityFormConfiguration` | Fetches Yup form configuration                                                                      |\r\n| `useRegistrySort`                    | Helps with sorting logic in table headers                                                           |\r\n\r\n","readmeFilename":"README.md"}