Code Monkey home page Code Monkey logo

reactjs-adminlte's Introduction

ReactJS-AdminLTE

Maintenance

ReactJS version of the original AdminLTE dashboard - https://github.com/almasaeed2010/AdminLTE. This project consists of widgets, charts and other components written in ReactJS. Stylesheets are borrowed from the AdminLTE project.


Update

Thank you kindly for the โญ and forks. When I first started working on this project in 2015, I had just graduated from college and had no prior exposure to web-development or open source. I was very new to the open-source world, and did not fully grasp the challenges in maintaining an open-source project sustainably.

For few months while I was working in a fast-paced startup, I moved my focus away from ReactJS to focus on other technologies. But by the time I once again tried to resume work on this project, the ReactJS core library, tooling and ecosystem had changed so rapidly that this repository practically needed a rewrite from scratch. As evident from the number of issues that users kept raising - the project was rendered unusable in the later versions of React.

Without financial support, it was overwhelming to fix these issues, not to mention that I felt like an absolute imposter. With a heavy heart ๐Ÿ’”, I decided to archive this project, and as-of-today, this is where it stands.

Back in 2015, ready-to-use React component libraries were somewhat unknown, and this was one of my very early attempts at creating one. Today, there are several excellent projects that are actively maintained, and they are backed by corporate sponsorship. Here are just a few:

So my fellow hipster, you're much better off using one of those than this one. This repo might just be of historical academic interest to you, but try not to use this one in a real project.

I take comfort knowing that this has been quite the learning experience, and since then I have been educating myself on open-source sustainability. ๐Ÿ”ฅ Today I have other projects that I now actively maintain, that could really use your โญ and support. Please visit my profile and check out my pinned repositories for the same. Thank you ๐Ÿ™๐Ÿผ


Project documentation

If you use React in your app, you might find some of these components useful!

View the complete list of available components

Some available components in React:

Widgets will use velocity.js animations instead of the originally used JQuery animations wherever possible, for improved performance across all browsers and devices.

ReactJS Dashboard

Will soon be populated with charts.

More stuff coming soon. Stay tuned!

Instructions of Usage :

  • Run npm install adminlte-reactjs
  • Include the stylesheets for the components, similar to the widgets page
  • Include the library var reactjsAdminlte = require('adminlte-reactjs'). You may prefer the AMD style or the import statement.
  • You can now begin using the components like this var ProfileCard = reactjsAdminlte.ProfileCard.
  • If you don't need all the components, then you can choose to include only specific ones rather than the entire library. This can reduce your JS bundle size significantly var StatTile = require('adminlte-reactjs/src/components/stat-tile')

Contributing guidelines :

Due to several work related commitments, the development rate is a little slow and I apologize for that. However, I'm looking for awesome folks ๐Ÿค˜ who could contribute and help me maintain this project.

Where can you contribute? (starting from easy to relatively challenging)

  • Covering documentation for all the available components and how to use them (this is the easiest one, but quite important!)
  • Converting existing components into ES6/ECMAScript 2016
  • Writing tests for components. Similar to tests written in the React-Bootstrap project.
  • Reactifying the rest of the widgets, elements and pages from AdminLTE. Here are the steps to do this:

Step 1 :

  • Fork or clone this repo. Alternatively - if you have NPM installed, you can also do npm install adminlte-reactjs.
  • Install nodejs and NPM
  • Go to the project's root folder from your terminal and run npm install
  • Run npm run dev
  • Going to http://localhost:8000 will render an empty dashboard skeleton in the client-side using ReactJS. Clicking on one of the dashboard options on the left pane displays the original dashboards from AdminLTE.
  • Go to http://localhost:8000/widgets.html to see available widgets in ReactJS.
  • Use React Developer Tools Chrome Extension to understand the components hierarchy and structure and to track down bugs.

Step 2:

  • Pick a page from the AdminLTE project to reactify it, or some widget that hasn't been reactified yet.
  • If the page for it doesn't exist in the repo, create one for it in the views folder, and render the page by defining a route for it inside routes.js.
  • Create the entry point that renders the components inside /src/pages folder. Now you can begin writing your components and testing them!
  • To view and test your components on the page, add your entry point in webpack.config.js. Run webpack -p to generate the bundle for the page, and include the bundle and associated vendors for it in the page using script tags.
  • webpack-dev-server along with React Hot Loader can be used to ease your development workflow. This can be done by installing dev dependencies from package.json file. If you haven't, then run npm install webpack-dev-server and npm install react-hot-loader. Then in your HTML, change your javascript bundles' source paths to point to the webpack-dev-server proxy in your script tags. So if you have these bundles for example,
<script src="/dist/js/vendors.js"></script>
<script src="/dist/js/app.bundle.js"></script>

change this to

<script src="http://localhost:8080/dist/js/vendors.js"></script>
<script src="http://localhost:8080/dist/js/app.bundle.js"></script>

Then you can run webpack-dev-server --hot --inline just once - and every time you make any edits to your code and save it, the server will automatically create bundles and update the changes in the browser. This is highly recommended instead of running webpack -p every time you make some edit in your code. You can later change the script tags back once you stop webpack-dev-server.

For a detailed explanation on setting up a workflow using Webpack, check out my blog post - Webpack for The Fast and The Furious ๐Ÿš”

This is still a work in progress and will get better over time.

Step 3: Including your new components in the library

After you've finished writing a component and testing it out, you can include it in the library.

  • Place/move your component inside the /src/components folder and include it inside widgets.src.js.
  • Run npm build to generate the library reactjsAdminlte.js. Your component will be included in the library!
  • To make sure that your component works correctly, test it out by including it in the page using the library.

Some tips before making a pull request

  • Make sure that you've pulled the latest commits into your fork.
  • Create a branch for your edits - that way the project maintainer can safely pull your code and test it out.
  • If it's your first P.R, it'll be easier if you begin with something small first instead of making huge changes in lots of files. It helps me understand what the P.R is about, and I could help you out with the rest of changes if needed. It'll also save you from spending lot of effort in doing something that might not be necessary.
  • An important thing to remember is to have a P.R that fixes one issue at a time, and not make changes to lot of files in the same P.R. This way it's easier to test the changes out and have a relatively clean commit log.
  • You can learn more about these tips in detail here
If you have any further queries that you may have on how to contribute, or you have just general questions about how to use the components in your app - feel free to shoot an email. I'll help you out! ๐Ÿ˜ธ

reactjs-adminlte's People

Contributors

ashwin01adori avatar booleanhunter avatar cwhittl avatar hasantayyar avatar norienr avatar oklas avatar siavelis avatar smkamranqadri avatar stranger26 avatar yuanzhhh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reactjs-adminlte's Issues

Charts

Hi,

nice creation you have made there. I am looking for a reach driven dashboard, and i found yours! Just wonder hows the chart support in your creation? as I dont see any chart in the demo site and clicking in to the "chart" menu item give me a deadline :(

Thanks!

How to use with Meteor JS?

I would like to use this with Meteor JS.
But I don't understand to install, config and more...
Please help me.

Deploy to server

Hey guys,

I know how to make a production deploy it to the server with webpack?
Could you make a specify document for this ?

Thank you so much !! ๐Ÿ‘

Is there a method that can be called in componentDidMount() and componentDidUpdate() to activate the menu?

I have AdminLTE running in ReactJS but I was wondering there is a method out there for setting the parent li to .active based on the child also being .active? Achieving .active on the is easy with Navlink but setting the parent class is trickier. We would also need to have li.treeview set to li.treeview.menu-open if it has active children too. I have put together the following in jQuery and put it in componentDidMount() and componentDidUpdate() but for some reason the code is not run in those lifecycle events (I suspect it has something to do with not using refs: -

$('ul.sidebar-menu li:not(.treeview):has(a.active)').addClass('active');

The following sets the li.treeview classes by event triggering: -

$('ul.sidebar-menu li.treeview:not(.menu-open)').has('a.active').find('a').trigger( "click" );

As with the code above, this too works but is not being called properly in the lifecycle events. Although is should be pointed out that the second piece of code is doing .trigger("click") on all li.treeview nodes, regardless of whether or they have children with a.active (i.e. in multiple nested menus).

Any help/thoughts/advice?

Should buttons be componentized?

This page shows available buttons.

Using them is as simple as writing
<button type="button" class="btn btn-block btn-default btn-lg">Default</button>. Don't really know if it's necessary to make it a React component.

Installation fail - unable to connect to git://github.com/adobe-webplatform/eve.git

sudo npm install --save-dev adminlte-reactjs
npm WARN deprecated [email protected]: ๐Ÿ™Œ Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated [email protected]: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR!
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.113]: errno=Connection timed out
npm ERR! github.com[1: 192.30.253.112]: errno=Connection timed out

Sidebar menu should be componentized?

I was surprised to find out that there are 39 copies (for each page) of the menu. What is the reasoning behind not making it a component?

The menu gets reloaded every time you go to a menu item, destroying the illusion of a SPA.

Question about project choices

Hello,
thank you for this project, well appreciated. I have a couple of question, I am React beginner but I have already created a version of AdminLTE for angular 1 in the past so I know most of its features and settings. I have some question about your choices for this project:

  • The file structure.
    • Under public I guess you replicated the relevant part from admintLte, isn't it?
    • public/libraries I see several versions of the same libraries standard and minified, why? What really used? Why not ask for these via npm?
    • it's not clear what's supposed to go under public/dist
  • The separation between jquery and React.
    It is supposed to be against the react best-practises to mix jQuery and React together but I guess this project still heavily relies on jQuery, isn't it? How are you handling this? Would it be possible to completely de-couple them?
  • How do you handle the responsiveness of the templates? This is supposed to be handled by jQuery , "working" on the body element, do you let AdminLte/jQuery do this?
  • Lastly, you package.json has quite some dependencies, if we install your project via npm are you sure all of these are necessary? Probably most of them should be moved under devDependencies? I might be wrong here..

Thanks

Live previews are not working

Hi there,

Could you please fix the demo pages?

I know there was an old issue about that but I am currently trying and it's not working.

I have no css being loaded with it?

What am I doing wrong here?
I can see the text output of the InfoTile but I there's no CSS attached to it?
Heres my component:

import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import {InfoTile} from 'adminlte-reactjs';

class App extends Component {
  render() {
    return (
      <div className="App">
        <div className="App-header">
          <img src={logo} className="App-logo" alt="logo" />
          <h2>Welcome to React</h2>
        </div>
        <p className="App-intro">
          To get started, edit <code>src/App.js</code> and save to reload.
        </p>
        <InfoTile  
            width = '3'
            content = '' 
            icon = 'fa-envelope-o' 
            stats = '1,415' 
            subject = 'Messages' 
            theme = 'bg-aqua' 
        />
      </div>
    );
  }
}

export default App;

And heres my index.html:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="theme-color" content="#000000">
    <!--
      manifest.json provides metadata used when your web app is added to the
      homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
    -->
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
    <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
    <!--
      Notice the use of %PUBLIC_URL% in the tags above.
      It will be replaced with the URL of the `public` folder during the build.
      Only files inside the `public` folder can be referenced from the HTML.

      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
      work correctly both with client-side routing and a non-root public URL.
      Learn how to configure a non-root public URL by running `npm run build`.
    -->
    <title>React App</title>
  </head>
  <body>
    <noscript>
      You need to enable JavaScript to run this app.
    </noscript>
    <div id="root"></div>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
  </body>
</html>

Changes are not reflecting in browser

I installed this interface and trying to changes some text.

after making changes i am doing npm run dev
and then navigating to http://localhost:8000/ doesnt show changes

I'm trying to import dashboardV1 component. How to import it?

How to import components in dashboadV1?

I use this but still not work.

import {ControlPanel, DonutChart, AreaChart, WorldMap, ContainerOne, ContainerTwo, ContainerThree, ContainerFour,ContainerFive,ContainerSix,ContainerSeven,ControlsMenu,StatTile} from 'adminlte-reactjs/pages/dashboardV1/js';

Can't install adminlte-reactjs

Hi
When I try to execute npm install for installing adminlte-reactjs. I have errors.

Please can you help me?

`E:\react_apps\acta1 ([email protected])
ฮป npm install
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:213:12)
npm WARN addRemoteGit at emitTwo (events.js:87:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:172:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:827:16)
npm WARN addRemoteGit at Socket. (internal/child_process.js:319:11)
npm WARN addRemoteGit at emitOne (events.js:77:13)
npm WARN addRemoteGit at Socket.emit (events.js:169:7)
npm WARN addRemoteGit at Pipe._onclose (net.js:477:12)
npm WARN addRemoteGit git://github.com/adobe-webplatform/eve.git#eef80ed resetting remote C:\Users\armel.tsanga\AppData\Roaming\npm-cache_g
it-remotes\git-github-com-adobe-webplatform-eve-git-eef80ed-3ede0067 because of error: { [Error: Command failed: git -c core.longpaths=true c
onfig --get remote.origin.url
npm WARN addRemoteGit ]
npm WARN addRemoteGit killed: false,
npm WARN addRemoteGit code: 1,
npm WARN addRemoteGit signal: null,
npm WARN addRemoteGit cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm ERR! git clone --template=C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes_templates --mirror git://github.com/adobe-webplat
form/eve.git C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes\git-github-com-adobe-webplatform-eve-git-eef80ed-3ede0067: Cloning
into bare repository 'C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes\git-github-com-adobe-webplatform-eve-git-eef80ed-3ede0067'
...
npm ERR! git clone --template=C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes_templates --mirror git://github.com/adobe-webplat
form/eve.git C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes\git-github-com-adobe-webplatform-eve-git-eef80ed-3ede0067: fatal: u
nable to connect to github.com:
npm ERR! git clone --template=C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes_templates --mirror git://github.com/adobe-webplat
form/eve.git C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes\git-github-com-adobe-webplatform-eve-git-eef80ed-3ede0067: github.c
om[0: 192.30.253.113]: errno=No error
npm ERR! git clone --template=C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes_templates --mirror git://github.com/adobe-webplat
form/eve.git C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes\git-github-com-adobe-webplatform-eve-git-eef80ed-3ede0067: github.c
om[1: 192.30.253.112]: errno=No error
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"w
in32","arch":"x64"})
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\armel.tsanga\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "ins
tall"
npm ERR! node v4.4.5
npm ERR! npm v4.1.2
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes_templates
--mirror git://github.com/adobe-webplatform/eve.git C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes\git-github-com-adobe-webplat
form-eve-git-eef80ed-3ede0067
npm ERR! Cloning into bare repository 'C:\Users\armel.tsanga\AppData\Roaming\npm-cache_git-remotes\git-github-com-adobe-webplatform-eve-git-
eef80ed-3ede0067'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.113]: errno=No error
npm ERR! github.com[1: 192.30.253.112]: errno=No error
npm ERR!
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! E:\react_apps\acta1\npm-debug.log`

npm repository

Since most react users use webpack and npm, it would be nice to have this up on npm.

Documentation about how to use

Hi,

I looked at dropping this into my application but it wasn't immediately obvious how to load this into webpack and react.

It would be great if there was some examples.

Cheers,
Andrew

Unable to integrate into react-boilerplate

Hi,

i have tried to integrate this project into react-boilerplate. After installation i imported it with

import adminLte from 'adminlte-reactjs'

This causes several errors:

WARNING in ./~/velocity/lib/data/index.js
57:14 Critical dependency: the request of a dependency is an expression

WARNING in ./~/velocity/lib/common.js
162:14 Critical dependency: the request of a dependency is an expression

WARNING in ./~/velocity/lib/handle-cfg.js
16:18 Critical dependency: the request of a dependency is an expression

WARNING in ./~/tracer/~/colors/lib/colors.js
127:29 Critical dependency: the request of a dependency is an expression

ERROR in ./~/adminlte-reactjs/reactjsAdminlte.js
Module not found: Error: Can't resolve 'reactDom' in '/home/selcuk/Development/kekecmed-frontend/node_modules/adminlte-reactjs'
 @ ./~/adminlte-reactjs/reactjsAdminlte.js 1:120-139
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/velocity/lib/data/index.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/velocity/lib/data'
 @ ./~/velocity/lib/data/index.js 1:9-22
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/velocity/lib/engine/index.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/velocity/lib/engine'
 @ ./~/velocity/lib/engine/index.js 1:9-22
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/velocity/lib/engine/velocity.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/velocity/lib/engine'
 @ ./~/velocity/lib/engine/velocity.js 937:17-30
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/velocity/lib/common.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/velocity/lib'
 @ ./~/velocity/lib/common.js 1:9-22
 @ ./~/velocity/lib/data/index.js
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/velocity/lib/handle-cfg.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/velocity/lib'
 @ ./~/velocity/lib/handle-cfg.js 2:9-22
 @ ./~/velocity/lib/data/index.js
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/velocity/lib/data/data-direc.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/velocity/lib/data'
 @ ./~/velocity/lib/data/data-direc.js 1:9-22
 @ ./~/velocity/lib/data/index.js
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/velocity/lib/engine/engine-direc.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/velocity/lib/engine'
 @ ./~/velocity/lib/engine/engine-direc.js 1:9-22
 @ ./~/velocity/lib/engine/index.js
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/velocity/lib/dep/scan.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/velocity/lib/dep'
 @ ./~/velocity/lib/dep/scan.js 1:9-22
 @ ./~/velocity/lib/dep/index.js
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/utilx/lib/index.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/utilx/lib'
 @ ./~/utilx/lib/index.js 4:9-22
 @ ./~/utilx/index.js
 @ ./~/velocity/lib/data/index.js
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/tracer/lib/dailyfile.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/tracer/lib'
 @ ./~/tracer/lib/dailyfile.js 1:9-22
 @ ./~/tracer/lib/index.js
 @ ./~/velocity/lib/logger.js
 @ ./~/velocity/lib/data/index.js
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

ERROR in ./~/tinytim/lib/index.js
Module not found: Error: Can't resolve 'fs' in '/home/selcuk/Development/kekecmed-frontend/node_modules/tinytim/lib'
 @ ./~/tinytim/lib/index.js 48:10-23
 @ ./~/tracer/lib/console.js
 @ ./~/tracer/lib/index.js
 @ ./~/velocity/lib/logger.js
 @ ./~/velocity/lib/data/index.js
 @ ./~/velocity/lib/index.js
 @ ./~/velocity/index.js
 @ ./~/adminlte-reactjs/reactjsAdminlte.js
 @ ./app/containers/PatientPage/view/index.js
 @ ./app/routes.js
 @ ./app/app.js
 @ multi main

Can someone help me please :) ?

webpack doesn't work

Hi booleanhunter

I have a problem trying to compile with webpack the stuff

				throw err;
				^

Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.
    at Object.get [as CommonsChunkPlugin] (/ReactJS-AdminLTE/node_modules/webpack/lib/webpack.js:165:10)
    at Object.<anonymous> (/ReactJS-AdminLTE/webpack.config.js:48:30)
    at Module._compile (/usr/local/lib/node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)


Do you know how to resolve it?

Thanks in advance

Nacho.

Module not found: Can't resolve 'react/lib/ReactComponentTreeHook'

Hey, so...

I created a new project with:
create-react-app example
Then installed ReactJS-AdminLTE with:
npm install adminlte-reactjs
Then, I went into my App.js and imported an InfoTile and used it. This is my code:

import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import InfoTile from 'adminlte-reactjs';

class App extends Component {
  render() {
    return (
      <div className="App">
        <InfoTile  
           width ={3}
           content = '' 
           icon = 'fa-envelope-o' 
           stats = '1,410' 
           subject = 'Messages' 
           theme = 'bg-aqua' 
      />
      </div>
    );
  }
}

export default App;

Everything seems fine. However, when I run npm start, I get this:
image

./node_modules/adminlte-reactjs/node_modules/react-dom/lib/ReactDOMUnknownPropertyHook.js
Module not found: Can't resolve 'react/lib/ReactComponentTreeHook' in 'C:\Users\Saulo Joab\Desktop\Random Files\Projetos\React\smarttramo\node_modules\adminlte-reactjs\node_modules\react-dom\lib'

Did I do something wrong? I tried really hard to solve that error but nothing worked.

webpack-dev-server + hot loader

Great work man!
just to know there are some missing lib (like webpack-raphael) when you try to run it with webpack-dev-server + hot loader.

then i cannot make it work correctly because when i run webpack-dev-server --hot --inline and i open http://localhost:8080/ the result is this:

Image of result

every html inside view i changed the path to contain correctly http://localhost:8080
what i'm doing wrong?

Sidebar navigation is not working

installed project successfully, but Sidebar navigation is not working, all navigation shows me
Cannot GET page e.g Cannot GET /pages/UI/general.html

webpack -p command fails with error message

ashwani@ashwani-PC:adminlte-reactjs$ ./node_modules/.bin/webpack -p
/home/ashwani/node_modules/adminlte-reactjs/webpack.config.js:20
"react-dom": node-dir + '/react-dom',
^

ReferenceError: node is not defined
at Object. (/home/ashwani/node_modules/adminlte-reactjs/webpack.config.js:20:26)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at module.exports (/home/ashwani/node_modules/adminlte-reactjs/node_modules/webpack/bin/convert-argv.js:80:13)
at Object. (/home/ashwani/node_modules/adminlte-reactjs/node_modules/webpack/bin/webpack.js:39:40)
at Module._compile (module.js:425:26)

href path issue for files under views folder

I find out that the path in the html files under views folder are broken, for example, ReactJS-AdminLTE/reactjs-adminlte/views/index2.html ,

but dist dir is under public folder. Either the path is not correct or these files under views folder need to be move to public.

The sidebar navigation is not working because jquery is not getting applied

Tried running buttons.html from views. The sidebar navigation is not working. And the screen doesn't show up 100% height. What I figured out is, the jquery-2.1.4.js isn't getting applied and this is the reason for both the above problems. The same jquery js file is getting applied in the header. The dropdowns in the header is neatly working. Please let me know what is that I'm missing.
I've not made any change to the code. The problems are existing in the code available according to me. Please correct me if I'm wrong.

Using separate prop values instead of object

Currently, props get passed to components as an object, rather than separate values.

var infoTileOptions = {
    theme: 'bg-aqua',
    icon: 'fa-envelope-o',
    subject: 'Messages',
    stats: '1,410',
    content: '' 
};
<InfoTile options = {infoTileOptions} />

This approach makes validating props difficult using React.PropTypes. One way of validating them would be by using React.PropTypes.shape, but this would again get more difficult with deeply nested objects.

A (potentially) better approach -

<InfoTile 
    theme='bg-aqua' 
    icon='fa-envelope-o' 
    subject='Messages' 
    stats='1,410',  
    content='' 
/>

Can't get it to work with 'react create app'

EDIT: I mean 'create-react-app'...

I'm following the usage instructions but I'm getting errors in the main js file of ReactJS-AdminLTE saying that react-dom and velocity are missing.

These are the errors I am getting:

Failed to compile.

Error in ./~/adminlte-reactjs/reactjsAdminlte.js
Module not found: 'reactDom' in C:\myApp\node_modules\adminlte-reactjs

 @ ./~/adminlte-reactjs/reactjsAdminlte.js 1:120-139

Error in ./~/adminlte-reactjs/reactjsAdminlte.js
Module not found: 'velocity' in C:\myApp\node_modules\adminlte-reactjs

 @ ./~/adminlte-reactjs/reactjsAdminlte.js 1:140-159

Could that be something with the webpack config not being used? I see that there's aliases there for react-dom and velocity and paths to get the libraries from.

Could not find a declaration file for module 'adminlte-reactjs'.

project is based on typescript
step-1 npm install adminlte-reactjs
step-2 import { InfoTile } from "adminlte-reactjs";

expected result -
able to use InfoTile component

actual result
Could not find a declaration file for module 'adminlte-reactjs'. '/home/[email protected]/projects/reactJS/zymrIntranet/node_modules/adminlte-reactjs/reactjsAdminlte.js' implicitly has an 'any' type.
Try npm install @types/adminlte-reactjs if it exists or add a new declaration (.d.ts) file containing `declare module 'adminlte-reactjs'

@types/adminlte-reactjs is dosent exist

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.