├── .babelrc ├── .eslintrc ├── .gitignore ├── .npmignore ├── HISTORY.md ├── README.md ├── bower.json ├── build ├── react-treeview.js └── react-treeview.map ├── demos ├── bundle.js ├── controlled.js ├── index.html ├── index.js ├── opinionated.css └── uncontrolled.js ├── package.json ├── react-treeview.css ├── server.js ├── src └── react-treeview.jsx ├── webpack.config.js └── webpack.prod.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "stage": 0 3 | } -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "ecmaFeatures": { 3 | "jsx": true, 4 | "modules": true 5 | }, 6 | "env": { 7 | "browser": true, 8 | "node": true 9 | }, 10 | "parser": "babel-eslint", 11 | "rules": { 12 | "comma-dangle": [2, "always-multiline"], 13 | "quotes": [2, "single"], 14 | "strict": [2, "never"], 15 | "react/jsx-uses-react": 2, 16 | "react/jsx-uses-vars": 2, 17 | "react/react-in-jsx-scope": 2 18 | }, 19 | "plugins": [ 20 | "react" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | bower_components 4 | node_modules 5 | lib 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /.eslintrc 2 | /.gitignore 3 | /.npmignore 4 | /bower.json 5 | /bower_components/ 6 | /build/ 7 | /demos/ 8 | /react-treeview.sublime-* 9 | /server.js 10 | /src/ 11 | /webpack.* 12 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | ## 0.4.7 (June 25th 2017) 2 | - Fixes react deprecation warnings 3 | - New props for customization: `treeViewClassName` and `childrenClassName`. See the README for more info. 4 | 5 | ## 0.4.6 (October 29 2016) 6 | - Misc fixes. 7 | 8 | ## 0.4.4 (April 18th 2016) 9 | - Bump React version requirement. 10 | 11 | ## 0.4.3 (February 7th 2016) 12 | - Support for React 0.14 official. 13 | - New prop `itemClassName` to assign class name on the `TreeView` node itself. #28 14 | - Arrow symbol is now styled via CSS instead of hard-coded inside the DOM. This means you can now use your own styling for the arrow! #27 15 | 16 | ## 0.4.2 (September 12th 2015) 17 | - Support for React 0.14, beta and rc. 18 | 19 | ## 0.4.0 (July 31th 2015) 20 | - Repo revamp. No breaking change beside the change in directory structure. New location for npm: `lib/`. Location for bower & others: `build/`. The CSS is on root level. 21 | - Expose `tree-view_item` css class, the immediate child of `.tree-view`, for styling convenience. 22 | 23 | ## 0.3.12 (May 7th 2015) 24 | - Upgrade React dependency to accept >=0.12.0. 25 | 26 | ## 0.3.11 (December 2nd 2014) 27 | - Upgrade React to 0.12.1. 28 | - Fix `propTypes` warning. 29 | 30 | ## 0.3.10 (November 9th 2014) 31 | - Perf improvement. 32 | 33 | ## 0.3.9 (November 8th 2014) 34 | - Bump React to 0.12. 35 | 36 | ## 0.3.8 (September 29th 2014) 37 | - Make AMD with Webpack work. 38 | - Bump React version to 0.11.2. 39 | 40 | ## 0.3.7 (September 17th 2014) 41 | - Support for AMD. 42 | 43 | ## 0.3.3-0.3.5 (July 8th 2014) 44 | - Fix case-sensitive `require` for Linux. 45 | 46 | ## 0.3.2 (May 12th 2014) 47 | - Fix bug where `onClick` doesn't trigger. 48 | 49 | ## 0.3.1 (May 12th 2014) 50 | - New API. Breaking. It's a superset of the previous API, so everything should be reproducible.The new only Only exposes a `TreeView` and let natural recursion construct the tree. 51 | - Bump React version. 52 | 53 | ### 0.2.1 (September 21st 2013) 54 | - Stable API. 55 | 56 | ## 0.0.0 (July 13th 2013) 57 | - Initial release. 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React-treeview [![npm version](https://badge.fury.io/js/react-treeview.svg)](https://www.npmjs.com/package/react-treeview) [![Bower version](https://badge.fury.io/bo/react-treeview.svg)](http://badge.fury.io/bo/react-treeview) 2 | 3 | Easy, light, flexible treeview made with [React](http://facebook.github.io/react/). 4 | 5 | [Demos](https://cdn.rawgit.com/chenglou/react-treeview/aa72ed8b9e0b31fabc09e2f8bd4084947d48bb09/demos/index.html) from the [demos folder](https://github.com/chenglou/react-treeview/tree/aa72ed8b9e0b31fabc09e2f8bd4084947d48bb09/demos). 6 | 7 | ## install 8 | 9 | Npm: 10 | ```sh 11 | npm install react-treeview 12 | ``` 13 | 14 | Bower: 15 | ```sh 16 | bower install react-treeview 17 | ``` 18 | 19 | The CSS file: 20 | 21 | ```html 22 | 23 | ``` 24 | 25 | ## API 26 | 27 | #### <TreeView /> 28 | The component accepts [these props](https://github.com/chenglou/react-treeview/blob/f75fb4e2706f3e9087bcf371308e85154a1946da/src/react-treeview.jsx#L6-L12). 29 | 30 | - `collapsed`: whether the node is collapsed or not. 31 | - `defaultCollapsed`: the [uncontrolled](http://facebook.github.io/react/docs/forms.html#uncontrolled-components) equivalent to `collapsed`. 32 | - `nodeLabel`: the component or string (or anything renderable) that's displayed beside the TreeView arrow. 33 | - `itemClassName`: the class name of the `.tree-view_item` div. 34 | - `treeViewClassName`: the class name of the `.tree-view` div. 35 | - `childrenClassName`: the class name of the `.tree-view_children` item div. 36 | - `onClick`: callback triggered when the arrow is clicked. 37 | 38 | TreeViews can be naturally nested. 39 | 40 | The extra properties transferred onto the arrow, so all attributes and events naturally work on it. 41 | 42 | ## Styling 43 | The CSS is flexible, commented and made to be easily customized. Feel free to inspect the demo's classes and check the [short CSS code](https://github.com/chenglou/react-treeview/blob/aa72ed8b9e0b31fabc09e2f8bd4084947d48bb09/react-treeview.css). 44 | 45 | ## Build It Yourself/Run the Demos 46 | 47 | Build: `npm install && npm run prerelease` 48 | 49 | Demos: `npm install && npm start && open http://localhost:3000` 50 | 51 | ## License 52 | 53 | MIT. 54 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-treeview", 3 | "version": "0.4.7", 4 | "author": "chenglou ", 5 | "description": "Easy, light, flexible tree view made with React.", 6 | "main": [ 7 | "build/react-treeview.js", 8 | "react-treeview.css" 9 | ], 10 | "ignore": [ 11 | "**/.*", 12 | "node_modules", 13 | "bower_components", 14 | "package.json", 15 | "demos", 16 | "src", 17 | "server.js", 18 | "webpack.config.js", 19 | "webpack.prod.config.js" 20 | ], 21 | "keywords": [ 22 | "facebook", 23 | "react", 24 | "treeview", 25 | "tree", 26 | "view", 27 | "treenode" 28 | ], 29 | "dependencies": { 30 | "react": ">=0.12.0" 31 | }, 32 | "devDependencies": {}, 33 | "license": "MIT", 34 | "resolutions": { 35 | "react": "~0.12.1" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /build/react-treeview.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(root, factory) { 2 | if(typeof exports === 'object' && typeof module === 'object') 3 | module.exports = factory(require("react")); 4 | else if(typeof define === 'function' && define.amd) 5 | define(["react"], factory); 6 | else if(typeof exports === 'object') 7 | exports["TreeView"] = factory(require("react")); 8 | else 9 | root["TreeView"] = factory(root["React"]); 10 | })(this, function(__WEBPACK_EXTERNAL_MODULE_1__) { 11 | return /******/ (function(modules) { // webpackBootstrap 12 | /******/ // The module cache 13 | /******/ var installedModules = {}; 14 | /******/ 15 | /******/ // The require function 16 | /******/ function __webpack_require__(moduleId) { 17 | /******/ 18 | /******/ // Check if module is in cache 19 | /******/ if(installedModules[moduleId]) 20 | /******/ return installedModules[moduleId].exports; 21 | /******/ 22 | /******/ // Create a new module (and put it into the cache) 23 | /******/ var module = installedModules[moduleId] = { 24 | /******/ exports: {}, 25 | /******/ id: moduleId, 26 | /******/ loaded: false 27 | /******/ }; 28 | /******/ 29 | /******/ // Execute the module function 30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 31 | /******/ 32 | /******/ // Flag the module as loaded 33 | /******/ module.loaded = true; 34 | /******/ 35 | /******/ // Return the exports of the module 36 | /******/ return module.exports; 37 | /******/ } 38 | /******/ 39 | /******/ 40 | /******/ // expose the modules object (__webpack_modules__) 41 | /******/ __webpack_require__.m = modules; 42 | /******/ 43 | /******/ // expose the module cache 44 | /******/ __webpack_require__.c = installedModules; 45 | /******/ 46 | /******/ // __webpack_public_path__ 47 | /******/ __webpack_require__.p = "build/"; 48 | /******/ 49 | /******/ // Load entry module and return exports 50 | /******/ return __webpack_require__(0); 51 | /******/ }) 52 | /************************************************************************/ 53 | /******/ ([ 54 | /* 0 */ 55 | /***/ function(module, exports, __webpack_require__) { 56 | 57 | 'use strict'; 58 | 59 | Object.defineProperty(exports, '__esModule', { 60 | value: true 61 | }); 62 | 63 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; 64 | 65 | var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); 66 | 67 | var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; 68 | 69 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 70 | 71 | function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } 72 | 73 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } 74 | 75 | function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } 76 | 77 | var _react = __webpack_require__(1); 78 | 79 | var _react2 = _interopRequireDefault(_react); 80 | 81 | var _propTypes = __webpack_require__(2); 82 | 83 | var _propTypes2 = _interopRequireDefault(_propTypes); 84 | 85 | var TreeView = (function (_React$PureComponent) { 86 | _inherits(TreeView, _React$PureComponent); 87 | 88 | function TreeView(props) { 89 | _classCallCheck(this, TreeView); 90 | 91 | _get(Object.getPrototypeOf(TreeView.prototype), 'constructor', this).call(this, props); 92 | 93 | this.state = { 94 | collapsed: props.defaultCollapsed 95 | }; 96 | this.handleClick = this.handleClick.bind(this); 97 | } 98 | 99 | _createClass(TreeView, [{ 100 | key: 'handleClick', 101 | value: function handleClick() { 102 | this.setState({ collapsed: !this.state.collapsed }); 103 | if (this.props.onClick) { 104 | var _props; 105 | 106 | (_props = this.props).onClick.apply(_props, arguments); 107 | } 108 | } 109 | }, { 110 | key: 'render', 111 | value: function render() { 112 | var _props2 = this.props; 113 | var _props2$collapsed = _props2.collapsed; 114 | var collapsed = _props2$collapsed === undefined ? this.state.collapsed : _props2$collapsed; 115 | var _props2$className = _props2.className; 116 | var className = _props2$className === undefined ? '' : _props2$className; 117 | var _props2$itemClassName = _props2.itemClassName; 118 | var itemClassName = _props2$itemClassName === undefined ? '' : _props2$itemClassName; 119 | var _props2$treeViewClassName = _props2.treeViewClassName; 120 | var treeViewClassName = _props2$treeViewClassName === undefined ? '' : _props2$treeViewClassName; 121 | var _props2$childrenClassName = _props2.childrenClassName; 122 | var childrenClassName = _props2$childrenClassName === undefined ? '' : _props2$childrenClassName; 123 | var nodeLabel = _props2.nodeLabel; 124 | var children = _props2.children; 125 | var defaultCollapsed = _props2.defaultCollapsed; 126 | 127 | var rest = _objectWithoutProperties(_props2, ['collapsed', 'className', 'itemClassName', 'treeViewClassName', 'childrenClassName', 'nodeLabel', 'children', 'defaultCollapsed']); 128 | 129 | var arrowClassName = 'tree-view_arrow'; 130 | var containerClassName = 'tree-view_children'; 131 | if (collapsed) { 132 | arrowClassName += ' tree-view_arrow-collapsed'; 133 | containerClassName += ' tree-view_children-collapsed'; 134 | } 135 | 136 | var arrow = _react2['default'].createElement('div', _extends({}, rest, { 137 | className: className + ' ' + arrowClassName, 138 | onClick: this.handleClick 139 | })); 140 | 141 | return _react2['default'].createElement( 142 | 'div', 143 | { className: 'tree-view ' + treeViewClassName }, 144 | _react2['default'].createElement( 145 | 'div', 146 | { className: 'tree-view_item ' + itemClassName }, 147 | arrow, 148 | nodeLabel 149 | ), 150 | _react2['default'].createElement( 151 | 'div', 152 | { className: containerClassName + ' ' + childrenClassName }, 153 | collapsed ? null : children 154 | ) 155 | ); 156 | } 157 | }]); 158 | 159 | return TreeView; 160 | })(_react2['default'].PureComponent); 161 | 162 | exports['default'] = TreeView; 163 | module.exports = exports['default']; 164 | 165 | /***/ }, 166 | /* 1 */ 167 | /***/ function(module, exports) { 168 | 169 | module.exports = __WEBPACK_EXTERNAL_MODULE_1__; 170 | 171 | /***/ }, 172 | /* 2 */ 173 | /***/ function(module, exports, __webpack_require__) { 174 | 175 | /* WEBPACK VAR INJECTION */(function(process) {/** 176 | * Copyright 2013-present, Facebook, Inc. 177 | * All rights reserved. 178 | * 179 | * This source code is licensed under the BSD-style license found in the 180 | * LICENSE file in the root directory of this source tree. An additional grant 181 | * of patent rights can be found in the PATENTS file in the same directory. 182 | */ 183 | 184 | 'use strict'; 185 | 186 | if (process.env.NODE_ENV !== 'production') { 187 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7; 188 | 189 | var isValidElement = function isValidElement(object) { 190 | return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; 191 | }; 192 | 193 | // By explicitly using `prop-types` you are opting into new development behavior. 194 | // http://fb.me/prop-types-in-prod 195 | var throwOnDirectAccess = true; 196 | module.exports = __webpack_require__(4)(isValidElement, throwOnDirectAccess); 197 | } else { 198 | // By explicitly using `prop-types` you are opting into new production behavior. 199 | // http://fb.me/prop-types-in-prod 200 | module.exports = __webpack_require__(10)(); 201 | } 202 | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) 203 | 204 | /***/ }, 205 | /* 3 */ 206 | /***/ function(module, exports) { 207 | 208 | // shim for using process in browser 209 | 'use strict'; 210 | 211 | var process = module.exports = {}; 212 | 213 | // cached from whatever global is present so that test runners that stub it 214 | // don't break things. But we need to wrap it in a try catch in case it is 215 | // wrapped in strict mode code which doesn't define any globals. It's inside a 216 | // function because try/catches deoptimize in certain engines. 217 | 218 | var cachedSetTimeout; 219 | var cachedClearTimeout; 220 | 221 | function defaultSetTimout() { 222 | throw new Error('setTimeout has not been defined'); 223 | } 224 | function defaultClearTimeout() { 225 | throw new Error('clearTimeout has not been defined'); 226 | } 227 | (function () { 228 | try { 229 | if (typeof setTimeout === 'function') { 230 | cachedSetTimeout = setTimeout; 231 | } else { 232 | cachedSetTimeout = defaultSetTimout; 233 | } 234 | } catch (e) { 235 | cachedSetTimeout = defaultSetTimout; 236 | } 237 | try { 238 | if (typeof clearTimeout === 'function') { 239 | cachedClearTimeout = clearTimeout; 240 | } else { 241 | cachedClearTimeout = defaultClearTimeout; 242 | } 243 | } catch (e) { 244 | cachedClearTimeout = defaultClearTimeout; 245 | } 246 | })(); 247 | function runTimeout(fun) { 248 | if (cachedSetTimeout === setTimeout) { 249 | //normal enviroments in sane situations 250 | return setTimeout(fun, 0); 251 | } 252 | // if setTimeout wasn't available but was latter defined 253 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { 254 | cachedSetTimeout = setTimeout; 255 | return setTimeout(fun, 0); 256 | } 257 | try { 258 | // when when somebody has screwed with setTimeout but no I.E. maddness 259 | return cachedSetTimeout(fun, 0); 260 | } catch (e) { 261 | try { 262 | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 263 | return cachedSetTimeout.call(null, fun, 0); 264 | } catch (e) { 265 | // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error 266 | return cachedSetTimeout.call(this, fun, 0); 267 | } 268 | } 269 | } 270 | function runClearTimeout(marker) { 271 | if (cachedClearTimeout === clearTimeout) { 272 | //normal enviroments in sane situations 273 | return clearTimeout(marker); 274 | } 275 | // if clearTimeout wasn't available but was latter defined 276 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { 277 | cachedClearTimeout = clearTimeout; 278 | return clearTimeout(marker); 279 | } 280 | try { 281 | // when when somebody has screwed with setTimeout but no I.E. maddness 282 | return cachedClearTimeout(marker); 283 | } catch (e) { 284 | try { 285 | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 286 | return cachedClearTimeout.call(null, marker); 287 | } catch (e) { 288 | // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. 289 | // Some versions of I.E. have different rules for clearTimeout vs setTimeout 290 | return cachedClearTimeout.call(this, marker); 291 | } 292 | } 293 | } 294 | var queue = []; 295 | var draining = false; 296 | var currentQueue; 297 | var queueIndex = -1; 298 | 299 | function cleanUpNextTick() { 300 | if (!draining || !currentQueue) { 301 | return; 302 | } 303 | draining = false; 304 | if (currentQueue.length) { 305 | queue = currentQueue.concat(queue); 306 | } else { 307 | queueIndex = -1; 308 | } 309 | if (queue.length) { 310 | drainQueue(); 311 | } 312 | } 313 | 314 | function drainQueue() { 315 | if (draining) { 316 | return; 317 | } 318 | var timeout = runTimeout(cleanUpNextTick); 319 | draining = true; 320 | 321 | var len = queue.length; 322 | while (len) { 323 | currentQueue = queue; 324 | queue = []; 325 | while (++queueIndex < len) { 326 | if (currentQueue) { 327 | currentQueue[queueIndex].run(); 328 | } 329 | } 330 | queueIndex = -1; 331 | len = queue.length; 332 | } 333 | currentQueue = null; 334 | draining = false; 335 | runClearTimeout(timeout); 336 | } 337 | 338 | process.nextTick = function (fun) { 339 | var args = new Array(arguments.length - 1); 340 | if (arguments.length > 1) { 341 | for (var i = 1; i < arguments.length; i++) { 342 | args[i - 1] = arguments[i]; 343 | } 344 | } 345 | queue.push(new Item(fun, args)); 346 | if (queue.length === 1 && !draining) { 347 | runTimeout(drainQueue); 348 | } 349 | }; 350 | 351 | // v8 likes predictible objects 352 | function Item(fun, array) { 353 | this.fun = fun; 354 | this.array = array; 355 | } 356 | Item.prototype.run = function () { 357 | this.fun.apply(null, this.array); 358 | }; 359 | process.title = 'browser'; 360 | process.browser = true; 361 | process.env = {}; 362 | process.argv = []; 363 | process.version = ''; // empty string to avoid regexp issues 364 | process.versions = {}; 365 | 366 | function noop() {} 367 | 368 | process.on = noop; 369 | process.addListener = noop; 370 | process.once = noop; 371 | process.off = noop; 372 | process.removeListener = noop; 373 | process.removeAllListeners = noop; 374 | process.emit = noop; 375 | 376 | process.binding = function (name) { 377 | throw new Error('process.binding is not supported'); 378 | }; 379 | 380 | process.cwd = function () { 381 | return '/'; 382 | }; 383 | process.chdir = function (dir) { 384 | throw new Error('process.chdir is not supported'); 385 | }; 386 | process.umask = function () { 387 | return 0; 388 | }; 389 | 390 | /***/ }, 391 | /* 4 */ 392 | /***/ function(module, exports, __webpack_require__) { 393 | 394 | /* WEBPACK VAR INJECTION */(function(process) {/** 395 | * Copyright 2013-present, Facebook, Inc. 396 | * All rights reserved. 397 | * 398 | * This source code is licensed under the BSD-style license found in the 399 | * LICENSE file in the root directory of this source tree. An additional grant 400 | * of patent rights can be found in the PATENTS file in the same directory. 401 | */ 402 | 403 | 'use strict'; 404 | 405 | var emptyFunction = __webpack_require__(5); 406 | var invariant = __webpack_require__(6); 407 | var warning = __webpack_require__(7); 408 | 409 | var ReactPropTypesSecret = __webpack_require__(8); 410 | var checkPropTypes = __webpack_require__(9); 411 | 412 | module.exports = function (isValidElement, throwOnDirectAccess) { 413 | /* global Symbol */ 414 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; 415 | var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. 416 | 417 | /** 418 | * Returns the iterator method function contained on the iterable object. 419 | * 420 | * Be sure to invoke the function with the iterable as context: 421 | * 422 | * var iteratorFn = getIteratorFn(myIterable); 423 | * if (iteratorFn) { 424 | * var iterator = iteratorFn.call(myIterable); 425 | * ... 426 | * } 427 | * 428 | * @param {?object} maybeIterable 429 | * @return {?function} 430 | */ 431 | function getIteratorFn(maybeIterable) { 432 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); 433 | if (typeof iteratorFn === 'function') { 434 | return iteratorFn; 435 | } 436 | } 437 | 438 | /** 439 | * Collection of methods that allow declaration and validation of props that are 440 | * supplied to React components. Example usage: 441 | * 442 | * var Props = require('ReactPropTypes'); 443 | * var MyArticle = React.createClass({ 444 | * propTypes: { 445 | * // An optional string prop named "description". 446 | * description: Props.string, 447 | * 448 | * // A required enum prop named "category". 449 | * category: Props.oneOf(['News','Photos']).isRequired, 450 | * 451 | * // A prop named "dialog" that requires an instance of Dialog. 452 | * dialog: Props.instanceOf(Dialog).isRequired 453 | * }, 454 | * render: function() { ... } 455 | * }); 456 | * 457 | * A more formal specification of how these methods are used: 458 | * 459 | * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) 460 | * decl := ReactPropTypes.{type}(.isRequired)? 461 | * 462 | * Each and every declaration produces a function with the same signature. This 463 | * allows the creation of custom validation functions. For example: 464 | * 465 | * var MyLink = React.createClass({ 466 | * propTypes: { 467 | * // An optional string or URI prop named "href". 468 | * href: function(props, propName, componentName) { 469 | * var propValue = props[propName]; 470 | * if (propValue != null && typeof propValue !== 'string' && 471 | * !(propValue instanceof URI)) { 472 | * return new Error( 473 | * 'Expected a string or an URI for ' + propName + ' in ' + 474 | * componentName 475 | * ); 476 | * } 477 | * } 478 | * }, 479 | * render: function() {...} 480 | * }); 481 | * 482 | * @internal 483 | */ 484 | 485 | var ANONYMOUS = '<>'; 486 | 487 | // Important! 488 | // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. 489 | var ReactPropTypes = { 490 | array: createPrimitiveTypeChecker('array'), 491 | bool: createPrimitiveTypeChecker('boolean'), 492 | func: createPrimitiveTypeChecker('function'), 493 | number: createPrimitiveTypeChecker('number'), 494 | object: createPrimitiveTypeChecker('object'), 495 | string: createPrimitiveTypeChecker('string'), 496 | symbol: createPrimitiveTypeChecker('symbol'), 497 | 498 | any: createAnyTypeChecker(), 499 | arrayOf: createArrayOfTypeChecker, 500 | element: createElementTypeChecker(), 501 | instanceOf: createInstanceTypeChecker, 502 | node: createNodeChecker(), 503 | objectOf: createObjectOfTypeChecker, 504 | oneOf: createEnumTypeChecker, 505 | oneOfType: createUnionTypeChecker, 506 | shape: createShapeTypeChecker 507 | }; 508 | 509 | /** 510 | * inlined Object.is polyfill to avoid requiring consumers ship their own 511 | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is 512 | */ 513 | /*eslint-disable no-self-compare*/ 514 | function is(x, y) { 515 | // SameValue algorithm 516 | if (x === y) { 517 | // Steps 1-5, 7-10 518 | // Steps 6.b-6.e: +0 != -0 519 | return x !== 0 || 1 / x === 1 / y; 520 | } else { 521 | // Step 6.a: NaN == NaN 522 | return x !== x && y !== y; 523 | } 524 | } 525 | /*eslint-enable no-self-compare*/ 526 | 527 | /** 528 | * We use an Error-like object for backward compatibility as people may call 529 | * PropTypes directly and inspect their output. However, we don't use real 530 | * Errors anymore. We don't inspect their stack anyway, and creating them 531 | * is prohibitively expensive if they are created too often, such as what 532 | * happens in oneOfType() for any type before the one that matched. 533 | */ 534 | function PropTypeError(message) { 535 | this.message = message; 536 | this.stack = ''; 537 | } 538 | // Make `instanceof Error` still work for returned errors. 539 | PropTypeError.prototype = Error.prototype; 540 | 541 | function createChainableTypeChecker(validate) { 542 | if (process.env.NODE_ENV !== 'production') { 543 | var manualPropTypeCallCache = {}; 544 | var manualPropTypeWarningCount = 0; 545 | } 546 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { 547 | componentName = componentName || ANONYMOUS; 548 | propFullName = propFullName || propName; 549 | 550 | if (secret !== ReactPropTypesSecret) { 551 | if (throwOnDirectAccess) { 552 | // New behavior only for users of `prop-types` package 553 | invariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); 554 | } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { 555 | // Old behavior for people using React.PropTypes 556 | var cacheKey = componentName + ':' + propName; 557 | if (!manualPropTypeCallCache[cacheKey] && 558 | // Avoid spamming the console because they are often not actionable except for lib authors 559 | manualPropTypeWarningCount < 3) { 560 | warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName); 561 | manualPropTypeCallCache[cacheKey] = true; 562 | manualPropTypeWarningCount++; 563 | } 564 | } 565 | } 566 | if (props[propName] == null) { 567 | if (isRequired) { 568 | if (props[propName] === null) { 569 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); 570 | } 571 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); 572 | } 573 | return null; 574 | } else { 575 | return validate(props, propName, componentName, location, propFullName); 576 | } 577 | } 578 | 579 | var chainedCheckType = checkType.bind(null, false); 580 | chainedCheckType.isRequired = checkType.bind(null, true); 581 | 582 | return chainedCheckType; 583 | } 584 | 585 | function createPrimitiveTypeChecker(expectedType) { 586 | function validate(props, propName, componentName, location, propFullName, secret) { 587 | var propValue = props[propName]; 588 | var propType = getPropType(propValue); 589 | if (propType !== expectedType) { 590 | // `propValue` being instance of, say, date/regexp, pass the 'object' 591 | // check, but we can offer a more precise error message here rather than 592 | // 'of type `object`'. 593 | var preciseType = getPreciseType(propValue); 594 | 595 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); 596 | } 597 | return null; 598 | } 599 | return createChainableTypeChecker(validate); 600 | } 601 | 602 | function createAnyTypeChecker() { 603 | return createChainableTypeChecker(emptyFunction.thatReturnsNull); 604 | } 605 | 606 | function createArrayOfTypeChecker(typeChecker) { 607 | function validate(props, propName, componentName, location, propFullName) { 608 | if (typeof typeChecker !== 'function') { 609 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); 610 | } 611 | var propValue = props[propName]; 612 | if (!Array.isArray(propValue)) { 613 | var propType = getPropType(propValue); 614 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); 615 | } 616 | for (var i = 0; i < propValue.length; i++) { 617 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); 618 | if (error instanceof Error) { 619 | return error; 620 | } 621 | } 622 | return null; 623 | } 624 | return createChainableTypeChecker(validate); 625 | } 626 | 627 | function createElementTypeChecker() { 628 | function validate(props, propName, componentName, location, propFullName) { 629 | var propValue = props[propName]; 630 | if (!isValidElement(propValue)) { 631 | var propType = getPropType(propValue); 632 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); 633 | } 634 | return null; 635 | } 636 | return createChainableTypeChecker(validate); 637 | } 638 | 639 | function createInstanceTypeChecker(expectedClass) { 640 | function validate(props, propName, componentName, location, propFullName) { 641 | if (!(props[propName] instanceof expectedClass)) { 642 | var expectedClassName = expectedClass.name || ANONYMOUS; 643 | var actualClassName = getClassName(props[propName]); 644 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); 645 | } 646 | return null; 647 | } 648 | return createChainableTypeChecker(validate); 649 | } 650 | 651 | function createEnumTypeChecker(expectedValues) { 652 | if (!Array.isArray(expectedValues)) { 653 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; 654 | return emptyFunction.thatReturnsNull; 655 | } 656 | 657 | function validate(props, propName, componentName, location, propFullName) { 658 | var propValue = props[propName]; 659 | for (var i = 0; i < expectedValues.length; i++) { 660 | if (is(propValue, expectedValues[i])) { 661 | return null; 662 | } 663 | } 664 | 665 | var valuesString = JSON.stringify(expectedValues); 666 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); 667 | } 668 | return createChainableTypeChecker(validate); 669 | } 670 | 671 | function createObjectOfTypeChecker(typeChecker) { 672 | function validate(props, propName, componentName, location, propFullName) { 673 | if (typeof typeChecker !== 'function') { 674 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); 675 | } 676 | var propValue = props[propName]; 677 | var propType = getPropType(propValue); 678 | if (propType !== 'object') { 679 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); 680 | } 681 | for (var key in propValue) { 682 | if (propValue.hasOwnProperty(key)) { 683 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); 684 | if (error instanceof Error) { 685 | return error; 686 | } 687 | } 688 | } 689 | return null; 690 | } 691 | return createChainableTypeChecker(validate); 692 | } 693 | 694 | function createUnionTypeChecker(arrayOfTypeCheckers) { 695 | if (!Array.isArray(arrayOfTypeCheckers)) { 696 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; 697 | return emptyFunction.thatReturnsNull; 698 | } 699 | 700 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { 701 | var checker = arrayOfTypeCheckers[i]; 702 | if (typeof checker !== 'function') { 703 | warning(false, 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + 'received %s at index %s.', getPostfixForTypeWarning(checker), i); 704 | return emptyFunction.thatReturnsNull; 705 | } 706 | } 707 | 708 | function validate(props, propName, componentName, location, propFullName) { 709 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { 710 | var checker = arrayOfTypeCheckers[i]; 711 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { 712 | return null; 713 | } 714 | } 715 | 716 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); 717 | } 718 | return createChainableTypeChecker(validate); 719 | } 720 | 721 | function createNodeChecker() { 722 | function validate(props, propName, componentName, location, propFullName) { 723 | if (!isNode(props[propName])) { 724 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); 725 | } 726 | return null; 727 | } 728 | return createChainableTypeChecker(validate); 729 | } 730 | 731 | function createShapeTypeChecker(shapeTypes) { 732 | function validate(props, propName, componentName, location, propFullName) { 733 | var propValue = props[propName]; 734 | var propType = getPropType(propValue); 735 | if (propType !== 'object') { 736 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); 737 | } 738 | for (var key in shapeTypes) { 739 | var checker = shapeTypes[key]; 740 | if (!checker) { 741 | continue; 742 | } 743 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); 744 | if (error) { 745 | return error; 746 | } 747 | } 748 | return null; 749 | } 750 | return createChainableTypeChecker(validate); 751 | } 752 | 753 | function isNode(propValue) { 754 | switch (typeof propValue) { 755 | case 'number': 756 | case 'string': 757 | case 'undefined': 758 | return true; 759 | case 'boolean': 760 | return !propValue; 761 | case 'object': 762 | if (Array.isArray(propValue)) { 763 | return propValue.every(isNode); 764 | } 765 | if (propValue === null || isValidElement(propValue)) { 766 | return true; 767 | } 768 | 769 | var iteratorFn = getIteratorFn(propValue); 770 | if (iteratorFn) { 771 | var iterator = iteratorFn.call(propValue); 772 | var step; 773 | if (iteratorFn !== propValue.entries) { 774 | while (!(step = iterator.next()).done) { 775 | if (!isNode(step.value)) { 776 | return false; 777 | } 778 | } 779 | } else { 780 | // Iterator will provide entry [k,v] tuples rather than values. 781 | while (!(step = iterator.next()).done) { 782 | var entry = step.value; 783 | if (entry) { 784 | if (!isNode(entry[1])) { 785 | return false; 786 | } 787 | } 788 | } 789 | } 790 | } else { 791 | return false; 792 | } 793 | 794 | return true; 795 | default: 796 | return false; 797 | } 798 | } 799 | 800 | function isSymbol(propType, propValue) { 801 | // Native Symbol. 802 | if (propType === 'symbol') { 803 | return true; 804 | } 805 | 806 | // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' 807 | if (propValue['@@toStringTag'] === 'Symbol') { 808 | return true; 809 | } 810 | 811 | // Fallback for non-spec compliant Symbols which are polyfilled. 812 | if (typeof Symbol === 'function' && propValue instanceof Symbol) { 813 | return true; 814 | } 815 | 816 | return false; 817 | } 818 | 819 | // Equivalent of `typeof` but with special handling for array and regexp. 820 | function getPropType(propValue) { 821 | var propType = typeof propValue; 822 | if (Array.isArray(propValue)) { 823 | return 'array'; 824 | } 825 | if (propValue instanceof RegExp) { 826 | // Old webkits (at least until Android 4.0) return 'function' rather than 827 | // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ 828 | // passes PropTypes.object. 829 | return 'object'; 830 | } 831 | if (isSymbol(propType, propValue)) { 832 | return 'symbol'; 833 | } 834 | return propType; 835 | } 836 | 837 | // This handles more types than `getPropType`. Only used for error messages. 838 | // See `createPrimitiveTypeChecker`. 839 | function getPreciseType(propValue) { 840 | if (typeof propValue === 'undefined' || propValue === null) { 841 | return '' + propValue; 842 | } 843 | var propType = getPropType(propValue); 844 | if (propType === 'object') { 845 | if (propValue instanceof Date) { 846 | return 'date'; 847 | } else if (propValue instanceof RegExp) { 848 | return 'regexp'; 849 | } 850 | } 851 | return propType; 852 | } 853 | 854 | // Returns a string that is postfixed to a warning about an invalid type. 855 | // For example, "undefined" or "of type array" 856 | function getPostfixForTypeWarning(value) { 857 | var type = getPreciseType(value); 858 | switch (type) { 859 | case 'array': 860 | case 'object': 861 | return 'an ' + type; 862 | case 'boolean': 863 | case 'date': 864 | case 'regexp': 865 | return 'a ' + type; 866 | default: 867 | return type; 868 | } 869 | } 870 | 871 | // Returns class name of the object, if any. 872 | function getClassName(propValue) { 873 | if (!propValue.constructor || !propValue.constructor.name) { 874 | return ANONYMOUS; 875 | } 876 | return propValue.constructor.name; 877 | } 878 | 879 | ReactPropTypes.checkPropTypes = checkPropTypes; 880 | ReactPropTypes.PropTypes = ReactPropTypes; 881 | 882 | return ReactPropTypes; 883 | }; 884 | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) 885 | 886 | /***/ }, 887 | /* 5 */ 888 | /***/ function(module, exports) { 889 | 890 | "use strict"; 891 | 892 | /** 893 | * Copyright (c) 2013-present, Facebook, Inc. 894 | * All rights reserved. 895 | * 896 | * This source code is licensed under the BSD-style license found in the 897 | * LICENSE file in the root directory of this source tree. An additional grant 898 | * of patent rights can be found in the PATENTS file in the same directory. 899 | * 900 | * 901 | */ 902 | 903 | function makeEmptyFunction(arg) { 904 | return function () { 905 | return arg; 906 | }; 907 | } 908 | 909 | /** 910 | * This function accepts and discards inputs; it has no side effects. This is 911 | * primarily useful idiomatically for overridable function endpoints which 912 | * always need to be callable, since JS lacks a null-call idiom ala Cocoa. 913 | */ 914 | var emptyFunction = function emptyFunction() {}; 915 | 916 | emptyFunction.thatReturns = makeEmptyFunction; 917 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false); 918 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true); 919 | emptyFunction.thatReturnsNull = makeEmptyFunction(null); 920 | emptyFunction.thatReturnsThis = function () { 921 | return this; 922 | }; 923 | emptyFunction.thatReturnsArgument = function (arg) { 924 | return arg; 925 | }; 926 | 927 | module.exports = emptyFunction; 928 | 929 | /***/ }, 930 | /* 6 */ 931 | /***/ function(module, exports, __webpack_require__) { 932 | 933 | /* WEBPACK VAR INJECTION */(function(process) {/** 934 | * Copyright (c) 2013-present, Facebook, Inc. 935 | * All rights reserved. 936 | * 937 | * This source code is licensed under the BSD-style license found in the 938 | * LICENSE file in the root directory of this source tree. An additional grant 939 | * of patent rights can be found in the PATENTS file in the same directory. 940 | * 941 | */ 942 | 943 | 'use strict'; 944 | 945 | /** 946 | * Use invariant() to assert state which your program assumes to be true. 947 | * 948 | * Provide sprintf-style format (only %s is supported) and arguments 949 | * to provide information about what broke and what you were 950 | * expecting. 951 | * 952 | * The invariant message will be stripped in production, but the invariant 953 | * will remain to ensure logic does not differ in production. 954 | */ 955 | 956 | var validateFormat = function validateFormat(format) {}; 957 | 958 | if (process.env.NODE_ENV !== 'production') { 959 | validateFormat = function validateFormat(format) { 960 | if (format === undefined) { 961 | throw new Error('invariant requires an error message argument'); 962 | } 963 | }; 964 | } 965 | 966 | function invariant(condition, format, a, b, c, d, e, f) { 967 | validateFormat(format); 968 | 969 | if (!condition) { 970 | var error; 971 | if (format === undefined) { 972 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); 973 | } else { 974 | var args = [a, b, c, d, e, f]; 975 | var argIndex = 0; 976 | error = new Error(format.replace(/%s/g, function () { 977 | return args[argIndex++]; 978 | })); 979 | error.name = 'Invariant Violation'; 980 | } 981 | 982 | error.framesToPop = 1; // we don't care about invariant's own frame 983 | throw error; 984 | } 985 | } 986 | 987 | module.exports = invariant; 988 | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) 989 | 990 | /***/ }, 991 | /* 7 */ 992 | /***/ function(module, exports, __webpack_require__) { 993 | 994 | /* WEBPACK VAR INJECTION */(function(process) {/** 995 | * Copyright 2014-2015, Facebook, Inc. 996 | * All rights reserved. 997 | * 998 | * This source code is licensed under the BSD-style license found in the 999 | * LICENSE file in the root directory of this source tree. An additional grant 1000 | * of patent rights can be found in the PATENTS file in the same directory. 1001 | * 1002 | */ 1003 | 1004 | 'use strict'; 1005 | 1006 | var emptyFunction = __webpack_require__(5); 1007 | 1008 | /** 1009 | * Similar to invariant but only logs a warning if the condition is not met. 1010 | * This can be used to log issues in development environments in critical 1011 | * paths. Removing the logging code for production environments will keep the 1012 | * same logic and follow the same code paths. 1013 | */ 1014 | 1015 | var warning = emptyFunction; 1016 | 1017 | if (process.env.NODE_ENV !== 'production') { 1018 | (function () { 1019 | var printWarning = function printWarning(format) { 1020 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 1021 | args[_key - 1] = arguments[_key]; 1022 | } 1023 | 1024 | var argIndex = 0; 1025 | var message = 'Warning: ' + format.replace(/%s/g, function () { 1026 | return args[argIndex++]; 1027 | }); 1028 | if (typeof console !== 'undefined') { 1029 | console.error(message); 1030 | } 1031 | try { 1032 | // --- Welcome to debugging React --- 1033 | // This error was thrown as a convenience so that you can use this stack 1034 | // to find the callsite that caused this warning to fire. 1035 | throw new Error(message); 1036 | } catch (x) {} 1037 | }; 1038 | 1039 | warning = function warning(condition, format) { 1040 | if (format === undefined) { 1041 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); 1042 | } 1043 | 1044 | if (format.indexOf('Failed Composite propType: ') === 0) { 1045 | return; // Ignore CompositeComponent proptype check. 1046 | } 1047 | 1048 | if (!condition) { 1049 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { 1050 | args[_key2 - 2] = arguments[_key2]; 1051 | } 1052 | 1053 | printWarning.apply(undefined, [format].concat(args)); 1054 | } 1055 | }; 1056 | })(); 1057 | } 1058 | 1059 | module.exports = warning; 1060 | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) 1061 | 1062 | /***/ }, 1063 | /* 8 */ 1064 | /***/ function(module, exports) { 1065 | 1066 | /** 1067 | * Copyright 2013-present, Facebook, Inc. 1068 | * All rights reserved. 1069 | * 1070 | * This source code is licensed under the BSD-style license found in the 1071 | * LICENSE file in the root directory of this source tree. An additional grant 1072 | * of patent rights can be found in the PATENTS file in the same directory. 1073 | */ 1074 | 1075 | 'use strict'; 1076 | 1077 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; 1078 | 1079 | module.exports = ReactPropTypesSecret; 1080 | 1081 | /***/ }, 1082 | /* 9 */ 1083 | /***/ function(module, exports, __webpack_require__) { 1084 | 1085 | /* WEBPACK VAR INJECTION */(function(process) {/** 1086 | * Copyright 2013-present, Facebook, Inc. 1087 | * All rights reserved. 1088 | * 1089 | * This source code is licensed under the BSD-style license found in the 1090 | * LICENSE file in the root directory of this source tree. An additional grant 1091 | * of patent rights can be found in the PATENTS file in the same directory. 1092 | */ 1093 | 1094 | 'use strict'; 1095 | 1096 | if (process.env.NODE_ENV !== 'production') { 1097 | var invariant = __webpack_require__(6); 1098 | var warning = __webpack_require__(7); 1099 | var ReactPropTypesSecret = __webpack_require__(8); 1100 | var loggedTypeFailures = {}; 1101 | } 1102 | 1103 | /** 1104 | * Assert that the values match with the type specs. 1105 | * Error messages are memorized and will only be shown once. 1106 | * 1107 | * @param {object} typeSpecs Map of name to a ReactPropType 1108 | * @param {object} values Runtime values that need to be type-checked 1109 | * @param {string} location e.g. "prop", "context", "child context" 1110 | * @param {string} componentName Name of the component for error messages. 1111 | * @param {?Function} getStack Returns the component stack. 1112 | * @private 1113 | */ 1114 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) { 1115 | if (process.env.NODE_ENV !== 'production') { 1116 | for (var typeSpecName in typeSpecs) { 1117 | if (typeSpecs.hasOwnProperty(typeSpecName)) { 1118 | var error; 1119 | // Prop type validation may throw. In case they do, we don't want to 1120 | // fail the render phase where it didn't fail before. So we log it. 1121 | // After these have been cleaned up, we'll let them throw. 1122 | try { 1123 | // This is intentionally an invariant that gets caught. It's the same 1124 | // behavior as without this statement except with a better message. 1125 | invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); 1126 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); 1127 | } catch (ex) { 1128 | error = ex; 1129 | } 1130 | warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); 1131 | if (error instanceof Error && !(error.message in loggedTypeFailures)) { 1132 | // Only monitor this failure once because there tends to be a lot of the 1133 | // same error. 1134 | loggedTypeFailures[error.message] = true; 1135 | 1136 | var stack = getStack ? getStack() : ''; 1137 | 1138 | warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); 1139 | } 1140 | } 1141 | } 1142 | } 1143 | } 1144 | 1145 | module.exports = checkPropTypes; 1146 | /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) 1147 | 1148 | /***/ }, 1149 | /* 10 */ 1150 | /***/ function(module, exports, __webpack_require__) { 1151 | 1152 | /** 1153 | * Copyright 2013-present, Facebook, Inc. 1154 | * All rights reserved. 1155 | * 1156 | * This source code is licensed under the BSD-style license found in the 1157 | * LICENSE file in the root directory of this source tree. An additional grant 1158 | * of patent rights can be found in the PATENTS file in the same directory. 1159 | */ 1160 | 1161 | 'use strict'; 1162 | 1163 | var emptyFunction = __webpack_require__(5); 1164 | var invariant = __webpack_require__(6); 1165 | var ReactPropTypesSecret = __webpack_require__(8); 1166 | 1167 | module.exports = function () { 1168 | function shim(props, propName, componentName, location, propFullName, secret) { 1169 | if (secret === ReactPropTypesSecret) { 1170 | // It is still safe when called from React. 1171 | return; 1172 | } 1173 | invariant(false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types'); 1174 | }; 1175 | shim.isRequired = shim; 1176 | function getShim() { 1177 | return shim; 1178 | }; 1179 | // Important! 1180 | // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. 1181 | var ReactPropTypes = { 1182 | array: shim, 1183 | bool: shim, 1184 | func: shim, 1185 | number: shim, 1186 | object: shim, 1187 | string: shim, 1188 | symbol: shim, 1189 | 1190 | any: shim, 1191 | arrayOf: getShim, 1192 | element: shim, 1193 | instanceOf: getShim, 1194 | node: shim, 1195 | objectOf: getShim, 1196 | oneOf: getShim, 1197 | oneOfType: getShim, 1198 | shape: getShim 1199 | }; 1200 | 1201 | ReactPropTypes.checkPropTypes = emptyFunction; 1202 | ReactPropTypes.PropTypes = ReactPropTypes; 1203 | 1204 | return ReactPropTypes; 1205 | }; 1206 | 1207 | /***/ } 1208 | /******/ ]) 1209 | }); 1210 | ; 1211 | //# sourceMappingURL=react-treeview.map -------------------------------------------------------------------------------- /build/react-treeview.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 44e7f7e193f0c97e61d1","webpack:///./src/react-treeview.jsx","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///./~/prop-types/index.js","webpack:///./~/process/browser.js","webpack:///./~/prop-types/factoryWithTypeCheckers.js","webpack:///./~/prop-types/~/fbjs/lib/emptyFunction.js","webpack:///./~/prop-types/~/fbjs/lib/invariant.js","webpack:///./~/prop-types/~/fbjs/lib/warning.js","webpack:///./~/prop-types/lib/ReactPropTypesSecret.js","webpack:///./~/prop-types/checkPropTypes.js","webpack:///./~/prop-types/factoryWithThrowingShims.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;kCCtCkB,CAAO;;;;sCACH,CAAY;;;;KAE5B,QAAQ;aAAR,QAAQ;;AAWD,YAXP,QAAQ,CAWA,KAAK,EAAE;2BAXf,QAAQ;;AAYV,gCAZE,QAAQ,6CAYJ,KAAK,EAAE;;AAEb,SAAI,CAAC,KAAK,GAAG;AACX,gBAAS,EAAE,KAAK,CAAC,gBAAgB;MAClC,CAAC;AACF,SAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD;;gBAlBG,QAAQ;;YAoBD,uBAAU;AACnB,WAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;AACpD,WAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;;;AACtB,uBAAI,CAAC,KAAK,EAAC,OAAO,yBAAS,CAAC;QAC7B;MACF;;;YAEK,kBAAG;qBAWH,IAAI,CAAC,KAAK;uCATZ,SAAS;WAAT,SAAS,qCAAG,IAAI,CAAC,KAAK,CAAC,SAAS;uCAChC,SAAS;WAAT,SAAS,qCAAG,EAAE;2CACd,aAAa;WAAb,aAAa,yCAAG,EAAE;+C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AAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE;AAC5E,SAAI,MAAM,KAAK,oBAAoB,EAAE;;AAEnC,cAAO;MACR;AACD,cAAS,CACP,KAAK,EACL,sFAAsF,GACtF,+CAA+C,GAC/C,gDAAgD,CACjD,CAAC;IACH,CAAC;AACF,OAAI,CAAC,UAAU,GAAG,IAAI,CAAC;AACvB,YAAS,OAAO,GAAG;AACjB,YAAO,IAAI,CAAC;IACb,CAAC;;;AAGF,OAAI,cAAc,GAAG;AACnB,UAAK,EAAE,IAAI;AACX,SAAI,EAAE,IAAI;AACV,SAAI,EAAE,IAAI;AACV,WAAM,EAAE,IAAI;AACZ,WAAM,EAAE,IAAI;AACZ,WAAM,EAAE,IAAI;AACZ,WAAM,EAAE,IAAI;;AAEZ,QAAG,EAAE,IAAI;AACT,YAAO,EAAE,OAAO;AAChB,YAAO,EAAE,IAAI;AACb,eAAU,EAAE,OAAO;AACnB,SAAI,EAAE,IAAI;AACV,aAAQ,EAAE,OAAO;AACjB,UAAK,EAAE,OAAO;AACd,cAAS,EAAE,OAAO;AAClB,UAAK,EAAE,OAAO;IACf,CAAC;;AAEF,iBAAc,CAAC,cAAc,GAAG,aAAa,CAAC;AAC9C,iBAAc,CAAC,SAAS,GAAG,cAAc,CAAC;;AAE1C,UAAO,cAAc,CAAC;EACvB,C","file":"react-treeview.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TreeView\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"TreeView\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"build/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 44e7f7e193f0c97e61d1","import React from 'react';\nimport PropTypes from 'prop-types';\n\nclass TreeView extends React.PureComponent {\n propTypes: {\n collapsed: PropTypes.bool,\n defaultCollapsed: PropTypes.bool,\n nodeLabel: PropTypes.node.isRequired,\n className: PropTypes.string,\n itemClassName: PropTypes.string,\n childrenClassName: PropTypes.string,\n treeViewClassName: PropTypes.string,\n }\n\n constructor(props) {\n super(props);\n\n this.state = {\n collapsed: props.defaultCollapsed\n };\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleClick(...args) {\n this.setState({ collapsed: !this.state.collapsed });\n if (this.props.onClick) {\n this.props.onClick(...args);\n }\n }\n\n render() {\n const {\n collapsed = this.state.collapsed,\n className = '',\n itemClassName = '',\n treeViewClassName = '',\n childrenClassName = '',\n nodeLabel,\n children,\n defaultCollapsed,\n ...rest\n } = this.props;\n\n let arrowClassName = 'tree-view_arrow';\n let containerClassName = 'tree-view_children';\n if (collapsed) {\n arrowClassName += ' tree-view_arrow-collapsed';\n containerClassName += ' tree-view_children-collapsed';\n }\n\n const arrow = (\n \n );\n\n return (\n
\n
\n {arrow}\n {nodeLabel}\n
\n
\n {collapsed ? null : children}\n
\n
\n );\n }\n}\n\nexport default TreeView;\n\n\n\n// WEBPACK FOOTER //\n// ./src/react-treeview.jsx","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 1\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n// WEBPACK FOOTER //\n// ./~/prop-types/index.js","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n// WEBPACK FOOTER //\n// ./~/process/browser.js","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n warning(\n false,\n 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +\n 'received %s at index %s.',\n getPostfixForTypeWarning(checker),\n i\n );\n return emptyFunction.thatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./~/prop-types/factoryWithTypeCheckers.js","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n// WEBPACK FOOTER //\n// ./~/prop-types/~/fbjs/lib/emptyFunction.js","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n// WEBPACK FOOTER //\n// ./~/prop-types/~/fbjs/lib/invariant.js","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n (function () {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n })();\n}\n\nmodule.exports = warning;\n\n\n// WEBPACK FOOTER //\n// ./~/prop-types/~/fbjs/lib/warning.js","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n// WEBPACK FOOTER //\n// ./~/prop-types/lib/ReactPropTypesSecret.js","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant = require('fbjs/lib/invariant');\n var warning = require('fbjs/lib/warning');\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n\n// WEBPACK FOOTER //\n// ./~/prop-types/checkPropTypes.js","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./~/prop-types/factoryWithThrowingShims.js"],"sourceRoot":""} -------------------------------------------------------------------------------- /demos/controlled.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import TreeView from '../src/react-treeview'; 3 | 4 | // This example data format is totally arbitrary. No data massaging is 5 | // required and you use regular js in `render` to iterate through and 6 | // construct your nodes. 7 | const dataSource = [ 8 | ['Apple', 'Orange'], 9 | ['Facebook', 'Google'], 10 | ['Celery', 'Cheeseburger'], 11 | ]; 12 | 13 | // A controlled TreeView, akin to React's controlled inputs 14 | // (http://facebook.github.io/react/docs/forms.html#controlled-components), has 15 | // many benefits. Among others, you can expand/collapse everything (i.e. easily 16 | // trigger those somewhere else). 17 | class Lists extends React.Component { 18 | 19 | constructor(props) { 20 | super(props); 21 | 22 | this.state = { 23 | collapsedBookkeeping: dataSource.map(() => false) 24 | }; 25 | this.handleClick = this.handleClick.bind(this); 26 | this.collapseAll = this.collapseAll.bind(this); 27 | } 28 | 29 | handleClick(i) { 30 | let [...collapsedBookkeeping] = this.state.collapsedBookkeeping; 31 | collapsedBookkeeping[i] = !collapsedBookkeeping[i]; 32 | this.setState({collapsedBookkeeping: collapsedBookkeeping}); 33 | } 34 | 35 | collapseAll() { 36 | this.setState({ 37 | collapsedBookkeeping: this.state.collapsedBookkeeping.map(() => true), 38 | }); 39 | } 40 | 41 | render() { 42 | const collapsedBookkeeping = this.state.collapsedBookkeeping; 43 | return ( 44 |
45 | 46 | {dataSource.map((node, i) => { 47 | // Let's make it so that the tree also toggles when we click the 48 | // label. Controlled components make this effortless. 49 | const label = 50 | 51 | Type {i} 52 | ; 53 | return ( 54 | 59 | {node.map(entry =>
{entry}
)} 60 |
61 | ); 62 | })} 63 |
64 | ); 65 | } 66 | } 67 | 68 | export default Lists; 69 | -------------------------------------------------------------------------------- /demos/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Some Trees 7 | 8 | 9 | 24 | 25 | 26 | 27 |
28 |
29 | Uncontrolled 30 |
31 |
32 |
33 | Controlled 34 |
35 |
36 |
37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /demos/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import Controlled from './controlled'; 4 | import Uncontrolled from './uncontrolled'; 5 | 6 | ReactDOM.render(, document.getElementById('controlled')); 7 | ReactDOM.render(, document.getElementById('uncontrolled')); 8 | -------------------------------------------------------------------------------- /demos/opinionated.css: -------------------------------------------------------------------------------- 1 | .node { 2 | -moz-transition: all 0.5s; 3 | -o-transition: all 0.5s; 4 | -ms-transition: all 0.5s; 5 | -webkit-transition: all 0.5s; 6 | transition: all 0.5s; 7 | border-radius: 3px; 8 | } 9 | 10 | .node:hover { 11 | background-color: rgb(220, 245, 243); 12 | cursor: pointer; 13 | } 14 | 15 | .info, .node { 16 | padding: 2px 10px 2px 5px; 17 | font: 14px Helvetica, Arial, sans-serif; 18 | -webkit-user-select: none; 19 | -moz-user-select: none; 20 | -ms-user-select: none; 21 | user-select: none; 22 | } 23 | 24 | .tree-view_arrow { 25 | -moz-transition: all 0.1s; 26 | -o-transition: all 0.1s; 27 | -ms-transition: all 0.1s; 28 | -webkit-transition: all 0.1s; 29 | transition: all 0.1s; 30 | } 31 | 32 | .tree-view_arrow-empty { 33 | color: yellow; 34 | } 35 | -------------------------------------------------------------------------------- /demos/uncontrolled.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import TreeView from '../src/react-treeview'; 3 | 4 | // This example data format is totally arbitrary. No data massaging is 5 | // required and you use regular js in `render` to iterate through and 6 | // construct your nodes. 7 | const dataSource = [ 8 | { 9 | type: 'Employees', 10 | collapsed: false, 11 | people: [ 12 | {name: 'Paul Gordon', age: 29, sex: 'male', role: 'coder', collapsed: false}, 13 | {name: 'Sarah Lee', age: 27, sex: 'female', role: 'ocamler', collapsed: false}, 14 | ], 15 | }, 16 | { 17 | type: 'CEO', 18 | collapsed: false, 19 | people: [ 20 | {name: 'Drew Anderson', age: 39, sex: 'male', role: 'boss', collapsed: false}, 21 | ], 22 | }, 23 | ]; 24 | 25 | // For the sake of simplicity, we're gonna use `defaultCollapsed`. Usually, a 26 | // [controlled component](http://facebook.github.io/react/docs/forms.html#controlled-components) 27 | // is preferred. 28 | class CompanyPeople extends React.Component { 29 | render() { 30 | return ( 31 |
32 | {dataSource.map((node, i) => { 33 | const type = node.type; 34 | const label = {type}; 35 | return ( 36 | 37 | {node.people.map(person => { 38 | const label2 = {person.name}; 39 | return ( 40 | 41 |
age: {person.age}
42 |
sex: {person.sex}
43 |
role: {person.role}
44 |
45 | ); 46 | })} 47 |
48 | ); 49 | })} 50 |
51 | ); 52 | } 53 | } 54 | 55 | export default CompanyPeople; 56 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-treeview", 3 | "version": "0.4.7", 4 | "description": "Easy, light, flexible tree view made with React.", 5 | "main": "lib/react-treeview.js", 6 | "directories": { 7 | "demos": "demos" 8 | }, 9 | "scripts": { 10 | "start": "NODE_ENV=development node server.js", 11 | "lint": "eslint src demos", 12 | "build-demos": "NODE_ENV=production webpack -p", 13 | "prerelease": "babel src --out-dir lib && NODE_ENV=production webpack --config webpack.prod.config.js" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/chenglou/react-treeview.git" 18 | }, 19 | "keywords": [ 20 | "facebook", 21 | "react", 22 | "treeview", 23 | "tree-view", 24 | "tree", 25 | "view", 26 | "treenode", 27 | "tree-node", 28 | "ui", 29 | "react-component" 30 | ], 31 | "author": "chenglou ", 32 | "license": "MIT", 33 | "bugs": { 34 | "url": "https://github.com/chenglou/react-treeview/issues" 35 | }, 36 | "homepage": "https://github.com/chenglou/react-treeview", 37 | "peerDependencies": { 38 | "react": ">=0.14.0" 39 | }, 40 | "devDependencies": { 41 | "babel": "^5.8.23", 42 | "babel-eslint": "^4.1.3", 43 | "babel-loader": "^5.3.1", 44 | "eslint-plugin-react": "^3.5.1", 45 | "prop-types": "^15.5.10", 46 | "react": ">=15.0.0", 47 | "react-dom": ">=15.0.0", 48 | "react-hot-loader": "^1.3.0", 49 | "webpack": "^1.10.1", 50 | "webpack-dev-server": "^1.10.1" 51 | }, 52 | "dependencies": { 53 | "prop-types": "^15.5.8" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /react-treeview.css: -------------------------------------------------------------------------------- 1 | /* the tree node's style */ 2 | .tree-view { 3 | overflow-y: hidden; 4 | } 5 | 6 | .tree-view_item { 7 | /* immediate child of .tree-view, for styling convenience */ 8 | } 9 | 10 | /* style for the children nodes container */ 11 | .tree-view_children { 12 | margin-left: 16px; 13 | } 14 | 15 | .tree-view_children-collapsed { 16 | height: 0px; 17 | } 18 | 19 | .tree-view_arrow { 20 | cursor: pointer; 21 | margin-right: 6px; 22 | display: inline-block; 23 | -webkit-user-select: none; 24 | -moz-user-select: none; 25 | -ms-user-select: none; 26 | user-select: none; 27 | } 28 | 29 | .tree-view_arrow:after { 30 | content: '▾'; 31 | } 32 | 33 | /* rotate the triangle to close it */ 34 | .tree-view_arrow-collapsed { 35 | -webkit-transform: rotate(-90deg); 36 | -moz-transform: rotate(-90deg); 37 | -ms-transform: rotate(-90deg); 38 | transform: rotate(-90deg); 39 | } 40 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | var webpack = require('webpack'); 2 | var WebpackDevServer = require('webpack-dev-server'); 3 | var config = require('./webpack.config'); 4 | 5 | new WebpackDevServer(webpack(config), { 6 | publicPath: config.output.publicPath, 7 | hot: true, 8 | stats: { 9 | chunkModules: false, 10 | colors: true, 11 | }, 12 | }).listen(3000, 'localhost', function (err) { 13 | if (err) { 14 | console.log(err); 15 | } 16 | 17 | console.log('Listening at localhost:3000'); 18 | }); 19 | -------------------------------------------------------------------------------- /src/react-treeview.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | class TreeView extends React.PureComponent { 5 | propTypes: { 6 | collapsed: PropTypes.bool, 7 | defaultCollapsed: PropTypes.bool, 8 | nodeLabel: PropTypes.node.isRequired, 9 | className: PropTypes.string, 10 | itemClassName: PropTypes.string, 11 | childrenClassName: PropTypes.string, 12 | treeViewClassName: PropTypes.string, 13 | } 14 | 15 | constructor(props) { 16 | super(props); 17 | 18 | this.state = { 19 | collapsed: props.defaultCollapsed 20 | }; 21 | this.handleClick = this.handleClick.bind(this); 22 | } 23 | 24 | handleClick(...args) { 25 | this.setState({ collapsed: !this.state.collapsed }); 26 | if (this.props.onClick) { 27 | this.props.onClick(...args); 28 | } 29 | } 30 | 31 | render() { 32 | const { 33 | collapsed = this.state.collapsed, 34 | className = '', 35 | itemClassName = '', 36 | treeViewClassName = '', 37 | childrenClassName = '', 38 | nodeLabel, 39 | children, 40 | defaultCollapsed, 41 | ...rest 42 | } = this.props; 43 | 44 | let arrowClassName = 'tree-view_arrow'; 45 | let containerClassName = 'tree-view_children'; 46 | if (collapsed) { 47 | arrowClassName += ' tree-view_arrow-collapsed'; 48 | containerClassName += ' tree-view_children-collapsed'; 49 | } 50 | 51 | const arrow = ( 52 |
57 | ); 58 | 59 | return ( 60 |
61 |
62 | {arrow} 63 | {nodeLabel} 64 |
65 |
66 | {collapsed ? null : children} 67 |
68 |
69 | ); 70 | } 71 | } 72 | 73 | export default TreeView; 74 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var webpack = require('webpack'); 3 | 4 | var entry = ['./demos/index.js']; 5 | 6 | if (process.env.NODE_ENV === 'development') { 7 | entry = entry.concat([ 8 | 'webpack-dev-server/client?http://localhost:3000', 9 | 'webpack/hot/only-dev-server', 10 | ]); 11 | } 12 | 13 | module.exports = { 14 | devtool: 'eval', 15 | entry: entry, 16 | output: { 17 | path: path.join(__dirname, 'demos'), 18 | filename: 'bundle.js', 19 | publicPath: '/demos/', 20 | }, 21 | plugins: [ 22 | new webpack.HotModuleReplacementPlugin(), 23 | new webpack.NoErrorsPlugin(), 24 | ], 25 | resolve: { 26 | extensions: ['', '.js', '.jsx'], 27 | }, 28 | module: { 29 | loaders: [{ 30 | test: /\.jsx?$/, 31 | loaders: ['react-hot', 'babel'], 32 | exclude: /build|lib|node_modules/, 33 | }], 34 | }, 35 | }; 36 | -------------------------------------------------------------------------------- /webpack.prod.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | // currently, this is for bower 4 | var config = { 5 | devtool: 'sourcemap', 6 | entry: { 7 | index: './src/react-treeview.jsx', 8 | }, 9 | output: { 10 | path: path.join(__dirname, 'build'), 11 | publicPath: 'build/', 12 | filename: 'react-treeview.js', 13 | sourceMapFilename: 'react-treeview.map', 14 | library: 'TreeView', 15 | libraryTarget: 'umd', 16 | }, 17 | module: { 18 | loaders: [{ 19 | test: /\.(js|jsx)/, 20 | loader: 'babel', 21 | }], 22 | }, 23 | plugins: [], 24 | resolve: { 25 | extensions: ['', '.js', '.jsx'], 26 | }, 27 | externals: { 28 | 'react': { 29 | root: 'React', 30 | commonjs2: 'react', 31 | commonjs: 'react', 32 | amd: 'react', 33 | }, 34 | }, 35 | }; 36 | 37 | module.exports = config; 38 | --------------------------------------------------------------------------------