
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
icerockdev-admin-toolkit
Advanced tools
This is a tool for building admin panels, that can be installed as npm dependency. [DEMO](https://icerockdev.github.io/admin-toolkit/ "DEMO")
This is a tool for building admin panels, that can be installed as npm dependency. DEMO
yarn add icerockdev/admin-toolkit#master
or
npm i -S icerockdev/admin-toolkit#master
import React from "react";
import { Application } from "admin-toolkit";
import config from "./config";
export const App = () => (
<div>
<Application config={config} />
</div>
);
The app is built on extendable classes. You can write your own autherntification by extending AuthProvider class. Creating complex pages should be made by extending Page class.
var config = new Config({
logo: "",
auth: new AuthProvider(authProviderOptions),
pages: [
new Page(pageOptions),
new Entity(entityOptions)
]
});
AuthProvider is extendable class. You can override its metods for your needs. The app decides user authentication status by checking its token field, but you can override this behaviour in your own class.
Basic options are:
new AuthProvider({
authRequestFn: (email, password) => Promise.resolve({
user: {
email: 'user@example.com',
username: 'username',
token: "SAMPLE_TOKEN",
role: "user"
},
error: ""
}),
})
Page class is for rendering pages inside the app. You can extend it to create more complex pages, like this done in Entity class.
Base config for Page is:
new Page({
title: "Sample page",
menu: {
enabled: true,
url: "/test",
label: "Sample page"
}
});
Entity is used to display list of some database entities, view their details and edit them. The Entity class extends Page one.
Basic options for Entity:
new Entity({
title: "Sample entity",
editable: true,
viewable: true,
api: {
list: { url: "/list", method: "get" },
update: { url: "/update", method: "patch" },
create: { url: "/create", method: "post" }
},
menu: {
enabled: true,
label: "Sample entity",
url: "/entity"
},
filters: {
current: "",
value: "",
fields: [
{
name: "type",
label: "Тип",
type: ENTITY_FILTER_TYPES.SELECT,
variants: [
{ value: "news", label: "Новость" },
{ value: "article", label: "Статья" }
]
}
]
},
fields: [
{
name: "type",
label: "Тип",
sortable: true,
type: "string"
},
],
fetchItemsFn: () => new Promise((resolve) => {
setTimeout(resolve, 500, {
data: {
list: [
{
id: 1,
type: "text"
}
],
totalItems: 1
}
});
});
},
updateItemsFn: ({ data }) => (
Promise.resolve({ error: "", data });
),
createItemsFn: ({ data }) => (
Promise.resolve({ error: "", data: props.data })
)
});
Copyright 2020 IceRock MAG Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
FAQs
This is a tool for building admin panels, that can be installed as npm dependency.
The npm package icerockdev-admin-toolkit receives a total of 4 weekly downloads. As such, icerockdev-admin-toolkit popularity was classified as not popular.
We found that icerockdev-admin-toolkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.