Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
define-react-admin-components
Advanced tools
Readme
This is a component library that aims to simplify the creation of admin panels and dashboards. This library aims to build ontop of other popular open source libraries namely Material UI, Tanstack Query, React Hook Forms and others.
####Usage
Wrap the root of the application with Tanstack Query provider
const queryClient = new QueryClient();
<QueryClientProvider client={queryClient}>
// You root of app here
</QueryClientProvider>;
####Listings
<ListingProvider>
// Filters
<ListingSearchBar />
<ListingMultiSelect />
// Actual Listing
<Listing>
</ListingProvider>
ListingProvider
is a context that manages the filters for the listing page and pass the filters for the <Listing />
. Pagination is being handled under the Listing
component.
Please check the here for the basic usage. The system is strongly typed for developers to strongly understand what Resource that we are working on.
Sample:
Provided Components
Check the Generated filters formats here. This format can be transformed to the shape that you want
To create your own filter component
const { value: V, onChange: (value:V) => void, resetFilter: ()=> void } = useFilterController<T, V>({
queryFunc: (v: T) => TFilter<T>,
name: string,
});
To create your own listing component just use this hook
function useListingCore<T>({
queryFunc: TQueryListFunc<T>;
columns: GridColumns<T>;
defaultLimit?: number;
listingKey: string;
onSuccess?: (data: {
nextToken: string;
total: number;
items: T[];
}) => void;
}) => ({
setSortModel: React.Dispatch<React.SetStateAction<GridSortItem[]>>;
setLimit: React.Dispatch<React.SetStateAction<number>>;
setPage: React.Dispatch<React.SetStateAction<number>>;
sortModel: GridSortItem[];
isLoading: boolean;
limit: number;
page: number;
data: any;
})
FAQs
This is a component library that aims to simplify the creation of admin panels and dashboards. This library aims to build ontop of other popular open source libraries namely Material UI, Tanstack Query, React Hook Forms and others.
The npm package define-react-admin-components receives a total of 1 weekly downloads. As such, define-react-admin-components popularity was classified as not popular.
We found that define-react-admin-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.