Socket
Book a DemoInstallSign in
Socket

@croz/nrich-registry-core

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@croz/nrich-registry-core

Contains core utilities related to the nrich-registry module

latest
Source
npmnpm
Version
0.0.2-RC
Version published
Weekly downloads
19
-73.61%
Maintainers
3
Weekly downloads
 
Created
Source

@croz/nrich-registry-core

Overview

@croz/nrich-registry-core is a module which enables administration of registries. It provides main hooks for loading registry data, adding new, updating existing and deleting unwanted entities. It's a frontend part of nrich-registry backend module.

For create and update forms, it relies on nrich-form-configuration module.

Setup

To use this module in your project run npm install @croz/nrich-registry-core or yarn add @croz/nrich-registry-core

Usage

  • On the app level where your registry administration will be, use RegistryProvider which loads configurations.
import { RegistryProvider } from "@croz/nrich-registry-core";

const RegistryAdministration = () => (
  <RegistryProvider>
    {/* rest of the administration part... */}
  </RegistryProvider>
);
  • 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 @croz/nrich-registry-mui

Available hooks are:

hook nameusage
useRegistryEntityAdministrationMain hook for whole administration, use at top level entity administration component
useRegistryEntityHandles lower level stuff as data handling and configuration fetching
useRegistryFilterContains useful handlers for search query and filter properties
useRegistryFormReturns final configuration (field and validation) and initial values for creating add/update forms
useRegistryEntityFormConfigurationFetches Yup form configuration
useRegistrySortHelps with sorting logic in table headers

Keywords

croz

FAQs

Package last updated on 04 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts