Coder Social home page Coder Social logo

lankovova / uikernel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from softindex/uikernel

0.0 2.0 0.0 10.53 MB

UIKernel is a comprehensive React.js UI library for building forms, editable grids and reports with drilldowns and filters, based on simple unified record model with client-side and server-side validations and data bindings.

Home Page: http://uikernel.io

License: Other

JavaScript 97.17% Shell 0.08% CSS 2.75%

uikernel's Introduction

UIKernel

UIKernel is a lib, built in React, with a CRUD wrapper for building complex admin dashboards.

UIKernel tries to avoid unnecessary abstractions, giving you the opportunity to define a model as you want. Nevertheless, it includes basic implementation examples that work with client data and models linking server and client interface using API.

Features

  • Data Grid

    • Interact with data. You can set up grid not only to display data but to add new records, update or delete them.

    • Filtering. UIKernel grid supports filtering by different fields.

    • Sorting & pagination. Sort data by default order or by user choice and paginate the data.

    • Data export. Export grid data in JSON or CSV formats for further interaction.

    • Bulk operations.

  • Forms

    • Form management. FormService and @connectForm decorator simplify development of forms.

    • Grid to Form model adapters. You can use Grid models in forms.

  • Validation. Use UIKernel validators to check fields on client, or both on client and the server. Also supports custom validation rules.

  • Data source. Pass data from a static array, a REST service or any other source to the UIKernel model.

  • Convenient inputs. Each form input or grid cell can be edited, including: a date picker, suggest box, number, select, checkbox.

  • Synchronize multiple components. Automatic synchronization of multiple forms and grids with a shared data model.

Documentation

You can find the full documentation on the website.

Examples

We have examples on the website.

Getting Started

To get started:

  1. Setup Create React App in terminal
# Setup React boilerplate
npm install -g create-react-app
create-react-app react-app
cd react-app

# Install UIKernel
npm i uikernel
  1. Open up src/index.js and replace all with:
 import React from 'react';
 import ReactDOM from 'react-dom';
 import UIKernel from 'uikernel';
 import 'uikernel/themes/base/main.css';

 // You can implement own data source with GridModel interface
 const model = new UIKernel.Models.Grid.Collection({
   data: [
     [1, {
       name: 'Pace',
       surname: 'White',
       age: 20
     }],
     [2, {
       name: 'Evangeline',
       surname: 'Terrell',
       age: 72
     }],
     [3, {
       name: 'Roach',
       surname: 'Potts',
       age: 14
     }]
   ]
 });

 const columns = {
   name: {
     name: 'First Name',
     render: ['name', record => record.name]
   },
   surname: {
     name: 'Last Name',
     render: ['surname', record => record.surname]
   },
   age: {
     name: 'Age',
     render: ['age', record => record.age]
   }
 };

 ReactDOM.render(
   <UIKernel.Grid cols={columns} model={model}/>,
   document.getElementById('root')
 );
  1. Try it out using npm start

As you can see, we've passed UIKernel.Grid two props: cols and model. We've defined these props in the columns and model script parts as you can see in comments.

Then, to create a grid model, we've used UIKernel.Models.Grid.Collection.

And that's all. Here's the live demo and code.

uikernel's People

Contributors

smert avatar dgoodua avatar sahara18 avatar johndaka avatar maxgenash avatar lankovova avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.