diff --git a/dist/react-status-manager.js b/dist/react-status-manager.js index e62cc26..8a23303 100644 --- a/dist/react-status-manager.js +++ b/dist/react-status-manager.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prop-types"),require("react"),require("react-default-node-name")):"function"==typeof define&&define.amd?define(["prop-types","react","react-default-node-name"],t):"object"==typeof exports?exports.ReactStatusManager=t(require("prop-types"),require("react"),require("react-default-node-name")):e.ReactStatusManager=t(e["prop-types"],e.react,e["react-default-node-name"])}(this,function(e,t,r){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1),a=n(o);t.default=a.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=Object.assign||function(e){for(var t=1;t= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _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; }\n\t\n\tvar _default = function (_Component) {\n\t _inherits(_default, _Component);\n\t\n\t function _default() {\n\t _classCallCheck(this, _default);\n\t\n\t return _possibleConstructorReturn(this, (_default.__proto__ || Object.getPrototypeOf(_default)).apply(this, arguments));\n\t }\n\t\n\t _createClass(_default, [{\n\t key: 'render',\n\t value: function render() {\n\t var _props = this.props,\n\t className = _props.className,\n\t value = _props.value,\n\t items = _props.items,\n\t children = _props.children,\n\t nodeName = _props.nodeName,\n\t props = _objectWithoutProperties(_props, ['className', 'value', 'items', 'children', 'nodeName']);\n\t\n\t return (0, _react.createElement)(nodeName, _extends({\n\t children: this.children\n\t }, props));\n\t }\n\t }, {\n\t key: 'children',\n\t\n\t /*===properties end===*/\n\t\n\t /*===properties start===*/\n\t get: function get() {\n\t var _props2 = this.props,\n\t value = _props2.value,\n\t children = _props2.children,\n\t items = _props2.items;\n\t\n\t return children.map(function (child, index) {\n\t return value === items[index] ? child : null;\n\t });\n\t }\n\t }]);\n\t\n\t return _default;\n\t}(_react.Component);\n\t\n\t_default.propTypes = {\n\t className: _propTypes2.default.string,\n\t items: _propTypes2.default.array,\n\t value: _propTypes2.default.any,\n\t nodeName: _propTypes2.default.any\n\t};\n\t_default.defaultProps = {\n\t statusList: [],\n\t nodeName: (0, _reactDefaultNodeName2.default)()\n\t};\n\texports.default = _default;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// react-status-manager.js"," \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 = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 64abf5ccc067ef1502ef","import ReactStatusManager from 'components/react-status-manager';\nexport default ReactStatusManager;\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js","import { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport nodeName from 'react-default-node-name';\n\nexport default class extends Component {\n /*===properties start===*/\n static propTypes = {\n className: PropTypes.string,\n items: PropTypes.array,\n value: PropTypes.any,\n nodeName: PropTypes.any\n };\n\n static defaultProps = {\n statusList: [],\n nodeName: nodeName()\n };\n /*===properties end===*/\n\n get children() {\n const { value, children, items } = this.props;\n return children.map((child, index) => {\n return value === items[index] ? child : null;\n });\n }\n\n render() {\n const { className, value, items, children, nodeName, ...props } = this.props;\n return createElement(nodeName, {\n children: this.children,\n ...props\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/react-status-manager.js","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 2\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 3\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-default-node-name\"\n// module id = 4\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///react-status-manager.js","webpack:///webpack/bootstrap fd3685e9ee8bacc3e23e","webpack:///./src/main.js","webpack:///./src/components/react-status-manager.js","webpack:///external \"prop-types\"","webpack:///external \"react\"","webpack:///external \"react-default-node-name\""],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_2__","__WEBPACK_EXTERNAL_MODULE_3__","__WEBPACK_EXTERNAL_MODULE_4__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","Object","defineProperty","value","_reactStatusManager","_reactStatusManager2","ReactStatusManager","_objectWithoutProperties","keys","target","i","indexOf","prototype","hasOwnProperty","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","enumerable","writable","configurable","setPrototypeOf","__proto__","undefined","_extends","assign","arguments","length","source","key","_createClass","defineProperties","props","descriptor","protoProps","staticProps","_react","_propTypes","_propTypes2","_reactDefaultNodeName","_reactDefaultNodeName2","_default","_Component","getPrototypeOf","apply","_props","nodeName","className","items","children","createElement","get","_props2","map","child","index","Component","propTypes","PropTypes","string","array","any","defaultProps"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,cAAAA,QAAA,SAAAA,QAAA,4BACA,kBAAAC,gBAAAC,IACAD,QAAA,gDAAAJ,GACA,gBAAAC,SACAA,QAAA,mBAAAD,EAAAG,QAAA,cAAAA,QAAA,SAAAA,QAAA,4BAEAJ,EAAA,mBAAAC,EAAAD,EAAA,cAAAA,EAAA,MAAAA,EAAA,6BACCO,KAAA,SAAAC,EAAAC,EAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAX,OAGA,IAAAC,GAAAW,EAAAD,IACAX,WACAa,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAd,EAAAD,QAAAC,IAAAD,QAAAU,GAGAT,EAAAa,QAAA,EAGAb,EAAAD,QAvBA,GAAAY,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,IAGAR,EAAA,KDgBM,SAAUT,EAAQD,EAASU,GAEhC,YAUA,SAASS,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GARvFG,OAAOC,eAAexB,EAAS,cAC7ByB,OAAO,G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,MAAOU,UAAUE,MACjBjE,MAAO+D,UAAUG,IACjBf,SAAUY,UAAUG,KHkJvBpB,EG/IQqB,cACLd,SACAF,UAAU,EAAAN,EAAAhD,YHiJbtB,EAAQsB,QAAUiD,GAIb,SAAUtE,EAAQD,GIpKxBC,EAAAD,QAAAM,GJ0KM,SAAUL,EAAQD,GK1KxBC,EAAAD,QAAAO,GLgLM,SAAUN,EAAQD,GMhLxBC,EAAAD,QAAAQ","file":"react-status-manager.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"prop-types\"), require(\"react\"), require(\"react-default-node-name\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"prop-types\", \"react\", \"react-default-node-name\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactStatusManager\"] = factory(require(\"prop-types\"), require(\"react\"), require(\"react-default-node-name\"));\n\telse\n\t\troot[\"ReactStatusManager\"] = factory(root[\"prop-types\"], root[\"react\"], root[\"react-default-node-name\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"prop-types\"), require(\"react\"), require(\"react-default-node-name\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"prop-types\", \"react\", \"react-default-node-name\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactStatusManager\"] = factory(require(\"prop-types\"), require(\"react\"), require(\"react-default-node-name\"));\n\telse\n\t\troot[\"ReactStatusManager\"] = factory(root[\"prop-types\"], root[\"react\"], root[\"react-default-node-name\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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 = \"/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _reactStatusManager = __webpack_require__(1);\n\t\n\tvar _reactStatusManager2 = _interopRequireDefault(_reactStatusManager);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = _reactStatusManager2.default;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.default = undefined;\n\t\n\tvar _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; };\n\t\n\tvar _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; }; }();\n\t\n\tvar _react = __webpack_require__(3);\n\t\n\tvar _propTypes = __webpack_require__(2);\n\t\n\tvar _propTypes2 = _interopRequireDefault(_propTypes);\n\t\n\tvar _reactDefaultNodeName = __webpack_require__(4);\n\t\n\tvar _reactDefaultNodeName2 = _interopRequireDefault(_reactDefaultNodeName);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _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; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _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; }\n\t\n\tvar _default = function (_Component) {\n\t _inherits(_default, _Component);\n\t\n\t function _default() {\n\t _classCallCheck(this, _default);\n\t\n\t return _possibleConstructorReturn(this, (_default.__proto__ || Object.getPrototypeOf(_default)).apply(this, arguments));\n\t }\n\t\n\t _createClass(_default, [{\n\t key: 'render',\n\t value: function render() {\n\t var _props = this.props,\n\t className = _props.className,\n\t value = _props.value,\n\t items = _props.items,\n\t children = _props.children,\n\t nodeName = _props.nodeName,\n\t props = _objectWithoutProperties(_props, ['className', 'value', 'items', 'children', 'nodeName']);\n\t\n\t return (0, _react.createElement)(nodeName, _extends({\n\t children: this.children\n\t }, props));\n\t }\n\t }, {\n\t key: 'children',\n\t\n\t /*===properties end===*/\n\t\n\t /*===properties start===*/\n\t get: function get() {\n\t var _props2 = this.props,\n\t value = _props2.value,\n\t children = _props2.children,\n\t items = _props2.items;\n\t\n\t return children.map(function (child, index) {\n\t return value === items[index] ? child : null;\n\t });\n\t }\n\t }]);\n\t\n\t return _default;\n\t}(_react.Component);\n\t\n\t_default.propTypes = {\n\t className: _propTypes2.default.string,\n\t items: _propTypes2.default.array,\n\t value: _propTypes2.default.any,\n\t nodeName: _propTypes2.default.any\n\t};\n\t_default.defaultProps = {\n\t items: [],\n\t nodeName: (0, _reactDefaultNodeName2.default)()\n\t};\n\texports.default = _default;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// react-status-manager.js"," \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 = \"/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap fd3685e9ee8bacc3e23e","import ReactStatusManager from 'components/react-status-manager';\nexport default ReactStatusManager;\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js","import { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport nodeName from 'react-default-node-name';\n\nexport default class extends Component {\n /*===properties start===*/\n static propTypes = {\n className: PropTypes.string,\n items: PropTypes.array,\n value: PropTypes.any,\n nodeName: PropTypes.any\n };\n\n static defaultProps = {\n items: [],\n nodeName: nodeName()\n };\n /*===properties end===*/\n\n get children() {\n const { value, children, items } = this.props;\n return children.map((child, index) => {\n return value === items[index] ? child : null;\n });\n }\n\n render() {\n const { className, value, items, children, nodeName, ...props } = this.props;\n return createElement(nodeName, {\n children: this.children,\n ...props\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/react-status-manager.js","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 2\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 3\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react-default-node-name\"\n// module id = 4\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/src/components/react-status-manager.js b/src/components/react-status-manager.js index a8adbb6..4303b38 100644 --- a/src/components/react-status-manager.js +++ b/src/components/react-status-manager.js @@ -12,7 +12,7 @@ export default class extends Component { }; static defaultProps = { - statusList: [], + items: [], nodeName: nodeName() }; /*===properties end===*/