-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathcategorized-tag-input.js.map
1 lines (1 loc) · 56.3 KB
/
categorized-tag-input.js.map
1
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///categorized-tag-input.js","webpack:///webpack/bootstrap affe410ff901bb1c965a","webpack:///./src/index.js","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///./src/Tag.jsx","webpack:///./src/CategorizedTagInput.jsx","webpack:///./src/Category.jsx","webpack:///./src/Input.jsx","webpack:///./src/Panel.jsx","webpack:///./src/keyboard.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_1__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","Object","defineProperty","value","_CategorizedTagInputJsx","_CategorizedTagInputJsx2","_react","_react2","PropTypes","Tag","createClass","displayName","propTypes","selected","bool","input","string","isRequired","text","addable","deletable","onAdd","func","onDelete","style","object","getDefaultProps","tagContent","content","startIndex","props","trim","toLowerCase","indexOf","endIndex","length","push","createElement","key","className","substring","onClick","e","preventDefault","stopPropagation","getDeleteBtn","deleteStyle","dangerouslySetInnerHTML","__html","render","deleteBtn","cls","base","_interopRequireWildcard","newObj","prototype","hasOwnProperty","isCategoryItemValid","i","isCategoryValid","title","items","Array","isArray","every","type","single","_InputJsx","_InputJsx2","_PanelJsx","_PanelJsx2","_keyboard","CategorizedTagInput","addNew","categories","arrayOf","transformTag","onBlur","onChange","placeholder","getTagStyle","getCreateNewText","getInitialState","selection","item","category","panelOpened","undefined","newTags","componentWillMount","Error","componentWillUnmount","timeout","clearTimeout","filterCategories","_this","map","assign","filter","filterItems","state","setState","openPanel","closePanel","_this2","setTimeout","onValueChange","target","isNaN","Number","onTagDeleted","slice","splice","newTag","concat","refs","focusInput","addSelectedTag","handleBackspace","handleArrowLeft","result","handleArrowUp","handleArrowRight","cat","handleArrowDown","cats","onKeyDown","keyCode","TAB","ENTER","COMMA","BACKSPACE","LEFT","UP","RIGHT","DOWN","tags","ref","_TagJsx","_TagJsx2","Category","array","oneOfType","number","selectedItem","onCreateNew","itemToTag","isSelected","fullMatchInItems","len","getItems","fullMatch","getAddBtn","getText","_getItems","addBtn","Input","focus","tag","getTags","size","onFocus","aria-label","_CategoryJsx","_CategoryJsx2","Panel","getCategories"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,UACA,kBAAAC,gBAAAC,IACAD,QAAA,SAAAJ,GACA,gBAAAC,SACAA,QAAA,oBAAAD,EAAAG,QAAA,UAEAJ,EAAA,oBAAAC,EAAAD,EAAA,QACCO,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAT,WACAW,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,QAAA,EAGAX,EAAAD,QAvBA,GAAAU,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASP,EAAQD,EAASQ,GAE/B,YAMA,SAASS,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,UAAWF,GAJzFG,OAAOC,eAAetB,EAAS,cAC7BuB,OAAO,GAKT,IAAIC,GAA0BhB,EEhEC,GFkE3BiB,EAA2BR,EAAuBO,EAEtDxB,GAAQ,WAAayB,EAAyB,WAC9CxB,EAAOD,QAAUA,EAAQ,YAIpB,SAASC,EAAQD,GGzEvBC,EAAAD,QAAAM,GH+EM,SAASL,EAAQD,EAASQ,GAE/B,YAMA,SAASS,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,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GAAKA,CS/wBP,IAAIC,GAAQ,ETixBlB1J,GAAQ0J,MAAQA,CShxBV,IAAIC,GAAO,ETkxBjB3J,GAAQ2J,KAAOA,CSjxBT,IAAIL,GAAQ,GTmxBlBtJ,GAAQsJ,MAAQA","file":"categorized-tag-input.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[\"CategorizedTagInput\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"CategorizedTagInput\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(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[\"CategorizedTagInput\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"CategorizedTagInput\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\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\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _CategorizedTagInputJsx = __webpack_require__(3);\n\t\n\tvar _CategorizedTagInputJsx2 = _interopRequireDefault(_CategorizedTagInputJsx);\n\n\texports['default'] = _CategorizedTagInputJsx2['default'];\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ },\n/* 2 */\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\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar PropTypes = _react2['default'].PropTypes;\n\t\n\tvar Tag = _react2['default'].createClass({\n\t displayName: 'Tag',\n\t\n\t propTypes: {\n\t selected: PropTypes.bool,\n\t input: PropTypes.string.isRequired,\n\t text: PropTypes.string.isRequired,\n\t addable: PropTypes.bool,\n\t deletable: PropTypes.bool,\n\t onAdd: PropTypes.func,\n\t onDelete: PropTypes.func,\n\t style: PropTypes.object\n\t },\n\t\n\t // helps tests pass\n\t getDefaultProps: function getDefaultProps() {\n\t return {\n\t text: ''\n\t };\n\t },\n\t\n\t tagContent: function tagContent() {\n\t var content = [];\n\t var startIndex = this.props.text.trim().toLowerCase().indexOf(this.props.input.trim().toLowerCase());\n\t var endIndex = startIndex + this.props.input.length;\n\t\n\t if (startIndex > 0) {\n\t content.push(_react2['default'].createElement(\n\t 'span',\n\t { key: 1, className: 'cti__tag__content--regular' },\n\t this.props.text.substring(0, startIndex)\n\t ));\n\t }\n\t\n\t content.push(_react2['default'].createElement(\n\t 'span',\n\t { key: 2, className: 'cti__tag__content--match' },\n\t this.props.text.substring(startIndex, endIndex)\n\t ));\n\t\n\t if (endIndex < this.props.text.length) {\n\t content.push(_react2['default'].createElement(\n\t 'span',\n\t { key: 3, className: 'cti__tag__content--regular' },\n\t this.props.text.substring(endIndex)\n\t ));\n\t }\n\t\n\t return content;\n\t },\n\t\n\t onClick: function onClick(e) {\n\t e.preventDefault();\n\t if (this.props.addable) {\n\t this.props.onAdd(e);\n\t }\n\t },\n\t\n\t onDelete: function onDelete(e) {\n\t // Prevents onClick event of the whole tag from being triggered\n\t e.preventDefault();\n\t e.stopPropagation();\n\t this.props.onDelete(e);\n\t },\n\t\n\t getDeleteBtn: function getDeleteBtn() {\n\t var style = this.props.style || {};\n\t var deleteStyle = style['delete'] ? style['delete'] : {};\n\t\n\t return _react2['default'].createElement('span', { className: 'cti__tag__delete', onClick: this.onDelete,\n\t dangerouslySetInnerHTML: { __html: '×' },\n\t style: deleteStyle });\n\t },\n\t\n\t render: function render() {\n\t var deleteBtn = null;\n\t if (this.props.deletable) {\n\t deleteBtn = this.getDeleteBtn();\n\t }\n\t var cls = 'cti__tag' + (this.props.selected ? ' cti-selected' : '');\n\t\n\t var style = this.props.style || {};\n\t\n\t return _react2['default'].createElement(\n\t 'div',\n\t { className: cls, onClick: this.onClick, style: style.base || {} },\n\t _react2['default'].createElement(\n\t 'div',\n\t { className: 'cti__tag__content', style: style.content || {} },\n\t this.tagContent()\n\t ),\n\t deleteBtn\n\t );\n\t }\n\t});\n\t\n\texports['default'] = Tag;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 3 */\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.isCategoryItemValid = isCategoryItemValid;\n\texports.isCategoryValid = isCategoryValid;\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _InputJsx = __webpack_require__(5);\n\t\n\tvar _InputJsx2 = _interopRequireDefault(_InputJsx);\n\t\n\tvar _PanelJsx = __webpack_require__(6);\n\t\n\tvar _PanelJsx2 = _interopRequireDefault(_PanelJsx);\n\t\n\tvar _keyboard = __webpack_require__(7);\n\t\n\tvar key = _interopRequireWildcard(_keyboard);\n\t\n\tvar PropTypes = _react2['default'].PropTypes;\n\t\n\tfunction isCategoryItemValid(i) {\n\t return typeof i === 'string' && i.trim().length > 0;\n\t}\n\t\n\tfunction isCategoryValid(c) {\n\t return typeof c === 'object' && c.id && c.title && c.items && Array.isArray(c.items) && c.items.every(isCategoryItemValid) && (c.type || c.single);\n\t}\n\t\n\tvar CategorizedTagInput = _react2['default'].createClass({\n\t displayName: 'CategorizedTagInput',\n\t\n\t propTypes: {\n\t addNew: PropTypes.bool,\n\t categories: PropTypes.arrayOf(PropTypes.object).isRequired,\n\t transformTag: PropTypes.func,\n\t value: PropTypes.arrayOf(PropTypes.object),\n\t onBlur: PropTypes.func,\n\t onChange: PropTypes.func,\n\t placeholder: PropTypes.string,\n\t getTagStyle: PropTypes.func,\n\t getCreateNewText: PropTypes.func\n\t },\n\t\n\t getInitialState: function getInitialState() {\n\t return {\n\t value: '',\n\t selection: {\n\t item: 0,\n\t category: 0\n\t },\n\t panelOpened: false,\n\t categories: [],\n\t addNew: this.props.addNew === undefined ? true : this.props.addNew\n\t };\n\t },\n\t\n\t getDefaultProps: function getDefaultProps() {\n\t return {\n\t onChange: function onChange(newTags) {\n\t // do nothing\n\t }\n\t };\n\t },\n\t\n\t componentWillMount: function componentWillMount() {\n\t if (!this.props.categories.every(isCategoryValid)) {\n\t throw new Error('invalid categories source provided for react-categorized-tag-input');\n\t }\n\t },\n\t\n\t componentWillUnmount: function componentWillUnmount() {\n\t if (this.timeout) {\n\t clearTimeout(this.timeout);\n\t }\n\t },\n\t\n\t filterCategories: function filterCategories(input) {\n\t var _this = this;\n\t\n\t var categories = this.props.categories.map(function (c) {\n\t c = Object.assign({}, c, {\n\t items: c.items.filter(_this.filterItems(input))\n\t });\n\t return c.items.length === 0 && (!_this.state.addNew || c.single) ? null : c;\n\t }).filter(function (c) {\n\t return c !== null;\n\t });\n\t\n\t var selection = this.state.selection;\n\t if (this.state.selection.category >= categories.length) {\n\t selection = {\n\t category: 0,\n\t item: 0\n\t };\n\t } else {\n\t if (selection.item >= categories[selection.category].items.length) {\n\t selection.item = 0;\n\t }\n\t }\n\t\n\t this.setState({\n\t categories: categories,\n\t selection: selection\n\t });\n\t },\n\t\n\t filterItems: function filterItems(input) {\n\t return function (i) {\n\t if (input.length === 1) {\n\t return i.toLowerCase().trim() === input;\n\t }\n\t return i.toLowerCase().indexOf(input.trim().toLowerCase()) >= 0;\n\t };\n\t },\n\t\n\t openPanel: function openPanel() {\n\t this.setState({ panelOpened: true });\n\t },\n\t\n\t closePanel: function closePanel() {\n\t var _this2 = this;\n\t\n\t // Prevent the panel from hiding before the click action takes place\n\t if (this.timeout) {\n\t clearTimeout(this.timeout);\n\t }\n\t this.timeout = setTimeout(function () {\n\t _this2.timeout = undefined;\n\t _this2.setState({ panelOpened: false });\n\t }, 150);\n\t },\n\t\n\t onValueChange: function onValueChange(e) {\n\t var value = e.target.value;\n\t this.setState({ value: value, panelOpened: value.trim().length > 0 || !isNaN(Number(value.trim())) });\n\t this.filterCategories(value);\n\t },\n\t\n\t onTagDeleted: function onTagDeleted(i) {\n\t var newTags = this.props.value.slice();\n\t newTags.splice(i, 1);\n\t this.props.onChange(newTags);\n\t },\n\t\n\t onAdd: function onAdd(newTag) {\n\t var newTags = this.props.value.concat([newTag]);\n\t this.setState({\n\t value: '',\n\t panelOpened: true\n\t });\n\t\n\t this.refs.input.focusInput();\n\t this.props.onChange(newTags);\n\t },\n\t\n\t addSelectedTag: function addSelectedTag() {\n\t if (!(this.state.panelOpened && this.state.value.length > 0)) {\n\t return;\n\t }\n\t\n\t var category = this.state.categories[this.state.selection.category];\n\t var title = category.items[this.state.selection.item];\n\t this.onAdd({\n\t category: category.id,\n\t title: title || this.state.value\n\t });\n\t },\n\t\n\t handleBackspace: function handleBackspace(e) {\n\t if (this.state.value.trim().length === 0) {\n\t e.preventDefault();\n\t this.onTagDeleted(this.props.value.length - 1);\n\t }\n\t },\n\t\n\t handleArrowLeft: function handleArrowLeft() {\n\t var result = this.state.selection.item - 1;\n\t this.setState({ selection: {\n\t category: this.state.selection.category,\n\t item: result >= 0 ? result : 0\n\t } });\n\t },\n\t\n\t handleArrowUp: function handleArrowUp() {\n\t var result = this.state.selection.category - 1;\n\t this.setState({ selection: {\n\t category: result >= 0 ? result : 0,\n\t item: 0\n\t } });\n\t },\n\t\n\t handleArrowRight: function handleArrowRight() {\n\t var result = this.state.selection.item + 1;\n\t var cat = this.state.categories[this.state.selection.category];\n\t this.setState({ selection: {\n\t category: this.state.selection.category,\n\t item: result <= cat.items.length ? result : cat.items.length\n\t } });\n\t },\n\t\n\t handleArrowDown: function handleArrowDown() {\n\t var result = this.state.selection.category + 1;\n\t var cats = this.state.categories;\n\t this.setState({ selection: {\n\t category: result < cats.length ? result : cats.length - 1,\n\t item: 0\n\t } });\n\t },\n\t\n\t onKeyDown: function onKeyDown(e) {\n\t var result = undefined;\n\t switch (e.keyCode) {\n\t case key.TAB:\n\t case key.ENTER:\n\t if (!this.state.value) {\n\t // enable normal tab/enter behavior\n\t // (don't preventDefault)\n\t break;\n\t }\n\t case key.COMMA:\n\t e.preventDefault();\n\t this.addSelectedTag();\n\t break;\n\t case key.BACKSPACE:\n\t this.handleBackspace(e);\n\t break;\n\t case key.LEFT:\n\t this.handleArrowLeft();\n\t break;\n\t case key.UP:\n\t this.handleArrowUp();\n\t break;\n\t case key.RIGHT:\n\t this.handleArrowRight();\n\t break;\n\t case key.DOWN:\n\t this.handleArrowDown();\n\t break;\n\t }\n\t },\n\t\n\t render: function render() {\n\t return _react2['default'].createElement(\n\t 'div',\n\t { className: 'cti__root' },\n\t _react2['default'].createElement(_InputJsx2['default'], { openPanel: this.openPanel, closePanel: this.closePanel,\n\t onValueChange: this.onValueChange, onTagDeleted: this.onTagDeleted,\n\t onKeyDown: this.onKeyDown, placeholder: this.props.placeholder, value: this.state.value,\n\t getTagStyle: this.props.getTagStyle,\n\t tags: this.props.value,\n\t transformTag: this.props.transformTag,\n\t onBlur: this.props.onBlur, ref: 'input' }),\n\t this.state.panelOpened && this.state.value.length > 0 ? _react2['default'].createElement(_PanelJsx2['default'], { categories: this.state.categories,\n\t selection: this.state.selection, onAdd: this.onAdd,\n\t input: this.state.value,\n\t getCreateNewText: this.props.getCreateNewText,\n\t addNew: this.props.addNew === undefined ? true : this.props.addNew }) : ''\n\t );\n\t }\n\t});\n\t\n\texports['default'] = CategorizedTagInput;\n\n/***/ },\n/* 4 */\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\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _TagJsx = __webpack_require__(2);\n\t\n\tvar _TagJsx2 = _interopRequireDefault(_TagJsx);\n\t\n\tvar PropTypes = _react2['default'].PropTypes;\n\t\n\tvar getCreateNewText = function getCreateNewText(title, text) {\n\t return 'Create new ' + title + ' \"' + text + '\"';\n\t};\n\t\n\tvar Category = _react2['default'].createClass({\n\t displayName: 'Category',\n\t\n\t propTypes: {\n\t items: PropTypes.array.isRequired,\n\t category: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n\t title: PropTypes.string.isRequired,\n\t selected: PropTypes.bool.isRequired,\n\t selectedItem: PropTypes.number.isRequired,\n\t input: PropTypes.string.isRequired,\n\t addNew: PropTypes.bool,\n\t type: PropTypes.string,\n\t onAdd: PropTypes.func.isRequired,\n\t single: PropTypes.bool,\n\t getTagStyle: PropTypes.func,\n\t getCreateNewText: PropTypes.func\n\t },\n\t\n\t onAdd: function onAdd(title) {\n\t var _this = this;\n\t\n\t return function () {\n\t _this.props.onAdd({\n\t category: _this.props.category,\n\t title: title\n\t });\n\t };\n\t },\n\t\n\t onCreateNew: function onCreateNew(e) {\n\t e.preventDefault();\n\t this.onAdd(this.props.input)();\n\t },\n\t\n\t getTagStyle: function getTagStyle(item) {\n\t return this.props.getTagStyle ? this.props.getTagStyle(item) : {};\n\t },\n\t\n\t itemToTag: function itemToTag(item, i) {\n\t return _react2['default'].createElement(_TagJsx2['default'], { selected: this.isSelected(i),\n\t input: this.props.input, text: item, addable: true, deletable: false,\n\t onAdd: this.onAdd(item), key: item + '_' + i, style: this.getTagStyle(item) });\n\t },\n\t\n\t fullMatchInItems: function fullMatchInItems() {\n\t for (var i = 0, len = this.props.items.length; i < len; i++) {\n\t if (this.props.items[i] === this.props.input) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t },\n\t\n\t getItems: function getItems() {\n\t return {\n\t items: this.props.items.map(this.itemToTag),\n\t fullMatch: this.fullMatchInItems()\n\t };\n\t },\n\t\n\t isSelected: function isSelected(i) {\n\t return this.props.selected && (i === this.props.selectedItem || this.props.single);\n\t },\n\t\n\t getAddBtn: function getAddBtn(fullMatch, selected) {\n\t var title = this.props.type || this.props.title;\n\t var text = this.props.input;\n\t var getText = this.props.getCreateNewText || getCreateNewText;\n\t if (this.props.addNew && !fullMatch && !this.props.single) {\n\t return [this.props.items.length > 0 ? _react2['default'].createElement(\n\t 'span',\n\t { key: 'cat_or', className: 'cti__category__or' },\n\t 'or'\n\t ) : null, _react2['default'].createElement(\n\t 'button',\n\t {\n\t key: 'add_btn',\n\t className: 'cti__category__add-item' + (selected ? ' cti-selected' : ''),\n\t onClick: this.onCreateNew\n\t },\n\t getText(title, text)\n\t )];\n\t }\n\t\n\t return null;\n\t },\n\t\n\t render: function render() {\n\t var _getItems = this.getItems();\n\t\n\t var items = _getItems.items;\n\t var fullMatch = _getItems.fullMatch;\n\t\n\t var addBtn = this.getAddBtn(fullMatch, (items.length === 0 || this.props.selectedItem >= items.length) && this.props.selected);\n\t\n\t return _react2['default'].createElement(\n\t 'div',\n\t { className: 'cti__category' },\n\t _react2['default'].createElement(\n\t 'h5',\n\t { className: 'cti__category__title' },\n\t this.props.title\n\t ),\n\t _react2['default'].createElement(\n\t 'div',\n\t { className: 'cti__category__tags' },\n\t items,\n\t addBtn\n\t )\n\t );\n\t }\n\t});\n\t\n\texports['default'] = Category;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 5 */\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\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _TagJsx = __webpack_require__(2);\n\t\n\tvar _TagJsx2 = _interopRequireDefault(_TagJsx);\n\t\n\tvar PropTypes = _react2['default'].PropTypes;\n\t\n\tvar Input = _react2['default'].createClass({\n\t displayName: 'Input',\n\t\n\t propTypes: {\n\t openPanel: PropTypes.func.isRequired,\n\t closePanel: PropTypes.func.isRequired,\n\t onValueChange: PropTypes.func.isRequired,\n\t onTagDeleted: PropTypes.func.isRequired,\n\t onKeyDown: PropTypes.func.isRequired,\n\t value: PropTypes.string.isRequired,\n\t tags: PropTypes.arrayOf(PropTypes.object).isRequired,\n\t placeholder: PropTypes.string,\n\t onBlur: PropTypes.func,\n\t getTagStyle: PropTypes.func,\n\t transformTag: PropTypes.func\n\t },\n\t\n\t focusInput: function focusInput() {\n\t this.refs.input.focus();\n\t },\n\t\n\t getDefaultProps: function getDefaultProps() {\n\t return {\n\t getTagStyle: function getTagStyle(tag) {\n\t // empty style object by default\n\t return {};\n\t },\n\t transformTag: function transformTag(tag) {\n\t return tag.title;\n\t }\n\t };\n\t },\n\t\n\t getTags: function getTags() {\n\t var _this = this;\n\t\n\t return this.props.tags.map(function (tag, i) {\n\t return _react2['default'].createElement(_TagJsx2['default'], { selected: false, input: '', text: _this.props.transformTag(tag), addable: false,\n\t deletable: true, key: tag.title + '_' + i,\n\t onDelete: function () {\n\t return _this.props.onTagDeleted(i);\n\t },\n\t style: _this.props.getTagStyle(tag) });\n\t });\n\t },\n\t\n\t onBlur: function onBlur(e) {\n\t this.props.closePanel();\n\t if (typeof this.props.onBlur === 'function') {\n\t this.props.onBlur(e);\n\t }\n\t },\n\t\n\t render: function render() {\n\t var placeholder = this.props.placeholder || '';\n\t var size = this.props.value.length === 0 ? placeholder.length : this.props.value.length;\n\t return _react2['default'].createElement(\n\t 'div',\n\t { className: 'cti__input', onClick: this.focusInput },\n\t this.getTags(),\n\t _react2['default'].createElement('input', { type: 'text', ref: 'input', value: this.props.value,\n\t size: size + 2,\n\t onFocus: this.props.openPanel, onBlur: this.onBlur,\n\t onChange: this.props.onValueChange, onKeyDown: this.props.onKeyDown,\n\t placeholder: placeholder, 'aria-label': placeholder,\n\t className: 'cti__input__input' }),\n\t _react2['default'].createElement('div', { className: 'cti__input__arrow' })\n\t );\n\t }\n\t});\n\t\n\texports['default'] = Input;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 6 */\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\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\t\n\tvar _react = __webpack_require__(1);\n\t\n\tvar _react2 = _interopRequireDefault(_react);\n\t\n\tvar _CategoryJsx = __webpack_require__(4);\n\t\n\tvar _CategoryJsx2 = _interopRequireDefault(_CategoryJsx);\n\t\n\tvar PropTypes = _react2['default'].PropTypes;\n\t\n\tvar Panel = _react2['default'].createClass({\n\t displayName: 'Panel',\n\t\n\t propTypes: {\n\t categories: PropTypes.arrayOf(PropTypes.object).isRequired,\n\t selection: PropTypes.object.isRequired,\n\t onAdd: PropTypes.func.isRequired,\n\t input: PropTypes.string.isRequired,\n\t addNew: PropTypes.bool,\n\t getTagStyle: PropTypes.func,\n\t getCreateNewText: PropTypes.func\n\t },\n\t\n\t getCategories: function getCategories() {\n\t var _this = this;\n\t\n\t return this.props.categories.map(function (c, i) {\n\t return _react2['default'].createElement(_CategoryJsx2['default'], { key: c.id, items: c.items, category: c.id, title: c.title,\n\t selected: _this.props.selection.category === i,\n\t selectedItem: _this.props.selection.item,\n\t input: _this.props.input, addNew: _this.props.addNew,\n\t type: c.type, onAdd: _this.props.onAdd, single: c.single,\n\t getTagStyle: _this.props.getTagStyle,\n\t getCreateNewText: _this.props.getCreateNewText });\n\t });\n\t },\n\t\n\t render: function render() {\n\t return _react2['default'].createElement(\n\t 'div',\n\t { className: 'cti__panel' },\n\t this.getCategories()\n\t );\n\t }\n\t});\n\t\n\texports['default'] = Panel;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\tvar TAB = 9;\n\texports.TAB = TAB;\n\tvar ENTER = 13;\n\texports.ENTER = ENTER;\n\tvar BACKSPACE = 8;\n\texports.BACKSPACE = BACKSPACE;\n\tvar LEFT = 37;\n\texports.LEFT = LEFT;\n\tvar UP = 38;\n\texports.UP = UP;\n\tvar RIGHT = 39;\n\texports.RIGHT = RIGHT;\n\tvar DOWN = 40;\n\texports.DOWN = DOWN;\n\tvar COMMA = 188;\n\texports.COMMA = COMMA;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** categorized-tag-input.js\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/** WEBPACK FOOTER **\n ** webpack/bootstrap affe410ff901bb1c965a\n **/","import CategorizedTagInput from './CategorizedTagInput.jsx';\nexport default CategorizedTagInput;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/index.js\n **/","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 **/","import React from 'react';\n\nconst { PropTypes } = React;\n\nconst Tag = React.createClass({\n propTypes: {\n selected: PropTypes.bool,\n input: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n addable: PropTypes.bool,\n deletable: PropTypes.bool,\n onAdd: PropTypes.func,\n onDelete: PropTypes.func,\n style: PropTypes.object\n },\n\n // helps tests pass\n getDefaultProps() {\n return {\n text: '' \n };\n },\n\n tagContent() {\n let content = [];\n let startIndex = this.props.text.trim().toLowerCase()\n .indexOf(this.props.input.trim().toLowerCase());\n let endIndex = startIndex + this.props.input.length;\n\n if (startIndex > 0) {\n content.push(<span key={1} className='cti__tag__content--regular'>\n {this.props.text.substring(0, startIndex)}\n </span>);\n }\n\n content.push(<span key={2} className='cti__tag__content--match'>\n {this.props.text.substring(startIndex, endIndex)}\n </span>);\n\n if (endIndex < this.props.text.length) {\n content.push(<span key={3} className='cti__tag__content--regular'>\n {this.props.text.substring(endIndex)}\n </span>);\n }\n\n return content;\n },\n\n onClick(e) {\n e.preventDefault();\n if (this.props.addable) {\n this.props.onAdd(e);\n }\n },\n\n onDelete(e) {\n // Prevents onClick event of the whole tag from being triggered\n e.preventDefault();\n e.stopPropagation();\n this.props.onDelete(e);\n },\n\n getDeleteBtn() {\n const style = this.props.style || {}\n const deleteStyle = style.delete ? style.delete : {}\n\n return (\n <span className='cti__tag__delete' onClick={this.onDelete}\n dangerouslySetInnerHTML={{ __html: '×' }}\n style={deleteStyle}/>\n );\n },\n\n render() {\n let deleteBtn = null;\n if (this.props.deletable) {\n deleteBtn = this.getDeleteBtn();\n }\n let cls = 'cti__tag' + (this.props.selected ? ' cti-selected' : '');\n\n const style = this.props.style || {}\n\n return (\n <div className={cls} onClick={this.onClick} style={style.base || {}} >\n <div className='cti__tag__content' style={style.content || {}}>\n {this.tagContent()}\n </div>\n {deleteBtn}\n </div>\n );\n }\n});\n\nexport default Tag;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Tag.jsx\n **/","import React from 'react';\n\nimport Input from './Input.jsx';\nimport Panel from './Panel.jsx';\nimport * as key from './keyboard';\n\nconst { PropTypes } = React;\n\nexport function isCategoryItemValid(i) {\n return typeof i === 'string' && i.trim().length > 0;\n}\n\nexport function isCategoryValid(c) {\n return typeof c === 'object'\n && c.id\n && c.title\n && c.items\n && Array.isArray(c.items)\n && c.items.every(isCategoryItemValid)\n && (c.type || c.single);\n}\n\nconst CategorizedTagInput = React.createClass({\n propTypes: {\n addNew: PropTypes.bool,\n categories: PropTypes.arrayOf(PropTypes.object).isRequired,\n transformTag: PropTypes.func,\n value: PropTypes.arrayOf(PropTypes.object),\n onBlur: PropTypes.func,\n onChange: PropTypes.func,\n placeholder: PropTypes.string,\n getTagStyle: PropTypes.func,\n getCreateNewText: PropTypes.func\n },\n\n getInitialState() {\n return {\n value: '',\n selection: {\n item: 0,\n category: 0\n },\n panelOpened: false,\n categories: [],\n addNew: this.props.addNew === undefined ? true : this.props.addNew\n };\n },\n\n getDefaultProps() {\n return {\n onChange(newTags){\n // do nothing\n }\n };\n },\n\n componentWillMount() {\n if (!this.props.categories.every(isCategoryValid)) {\n throw new Error('invalid categories source provided for react-categorized-tag-input');\n }\n },\n\n componentWillUnmount() {\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n },\n\n filterCategories(input) {\n let categories = this.props.categories.map(c => {\n c = Object.assign({}, c, {\n items: c.items.filter(this.filterItems(input))\n });\n return (c.items.length === 0 && (!this.state.addNew || c.single)) ? null : c;\n }).filter(c => c !== null);\n\n let selection = this.state.selection;\n if (this.state.selection.category >= categories.length) {\n selection = {\n category: 0,\n item: 0\n };\n } else {\n if (selection.item >= categories[selection.category].items.length) {\n selection.item = 0;\n }\n }\n\n this.setState({\n categories,\n selection\n });\n },\n\n filterItems(input) {\n return function (i) {\n if (input.length === 1) {\n return i.toLowerCase().trim() === input;\n }\n return i.toLowerCase().indexOf(input.trim().toLowerCase()) >= 0;\n };\n },\n\n openPanel() {\n this.setState({ panelOpened: true });\n },\n\n closePanel() {\n // Prevent the panel from hiding before the click action takes place\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n this.timeout = setTimeout(() => {\n this.timeout = undefined;\n this.setState({ panelOpened: false });\n }, 150);\n },\n\n onValueChange(e) {\n let value = e.target.value;\n this.setState({ value, panelOpened: value.trim().length > 0 || !isNaN(Number(value.trim())) });\n this.filterCategories(value);\n },\n\n onTagDeleted(i) {\n const newTags = this.props.value.slice()\n newTags.splice(i, 1)\n this.props.onChange(newTags)\n },\n\n onAdd(newTag) { \n const newTags = this.props.value.concat([newTag]);\n this.setState({\n value: '',\n panelOpened: true\n });\n\n this.refs.input.focusInput();\n this.props.onChange(newTags);\n },\n\n addSelectedTag() {\n if (!(this.state.panelOpened && this.state.value.length > 0)) {\n return;\n }\n\n const category = this.state.categories[this.state.selection.category];\n const title = category.items[this.state.selection.item];\n this.onAdd({\n category: category.id,\n title: title || this.state.value\n });\n },\n\n handleBackspace(e) {\n if (this.state.value.trim().length === 0) {\n e.preventDefault();\n this.onTagDeleted(this.props.value.length - 1);\n }\n },\n\n handleArrowLeft() {\n let result = this.state.selection.item - 1;\n this.setState({selection: {\n category: this.state.selection.category,\n item: result >= 0 ? result : 0\n }});\n },\n\n handleArrowUp() {\n let result = this.state.selection.category - 1;\n this.setState({selection: {\n category: result >= 0 ? result : 0,\n item: 0\n }});\n },\n\n handleArrowRight() {\n let result = this.state.selection.item + 1;\n let cat = this.state.categories[this.state.selection.category];\n this.setState({selection: {\n category: this.state.selection.category,\n item: result <= cat.items.length ? result : cat.items.length\n }});\n },\n\n handleArrowDown() {\n let result = this.state.selection.category + 1;\n let cats = this.state.categories;\n this.setState({selection: {\n category: result < cats.length ? result : cats.length - 1,\n item: 0\n }});\n },\n\n onKeyDown(e) {\n let result;\n switch (e.keyCode) {\n case key.TAB:\n case key.ENTER:\n if (!this.state.value){\n // enable normal tab/enter behavior\n // (don't preventDefault)\n break;\n }\n case key.COMMA:\n e.preventDefault();\n this.addSelectedTag();\n break;\n case key.BACKSPACE:\n this.handleBackspace(e);\n break;\n case key.LEFT:\n this.handleArrowLeft();\n break;\n case key.UP:\n this.handleArrowUp();\n break;\n case key.RIGHT:\n this.handleArrowRight();\n break;\n case key.DOWN:\n this.handleArrowDown();\n break;\n }\n },\n\n render() {\n return (\n <div className='cti__root'>\n <Input openPanel={this.openPanel} closePanel={this.closePanel}\n onValueChange={this.onValueChange} onTagDeleted={this.onTagDeleted}\n onKeyDown={this.onKeyDown} placeholder={this.props.placeholder} value={this.state.value}\n getTagStyle={this.props.getTagStyle}\n tags={this.props.value}\n transformTag={this.props.transformTag}\n onBlur={this.props.onBlur} ref='input' />\n {this.state.panelOpened && this.state.value.length > 0 ? <Panel categories={this.state.categories}\n selection={this.state.selection} onAdd={this.onAdd}\n input={this.state.value}\n getCreateNewText={this.props.getCreateNewText}\n addNew={this.props.addNew === undefined ? true : this.props.addNew} /> : ''}\n </div>\n );\n }\n});\n\nexport default CategorizedTagInput;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/CategorizedTagInput.jsx\n **/","import React from 'react';\n\nimport Tag from './Tag.jsx';\n\nconst { PropTypes } = React;\n\nconst getCreateNewText = (title, text) => `Create new ${title} \"${text}\"`\n\nconst Category = React.createClass({\n propTypes: {\n items: PropTypes.array.isRequired,\n category: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]).isRequired,\n title: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n selectedItem: PropTypes.number.isRequired,\n input: PropTypes.string.isRequired,\n addNew: PropTypes.bool,\n type: PropTypes.string,\n onAdd: PropTypes.func.isRequired,\n single: PropTypes.bool,\n getTagStyle: PropTypes.func,\n getCreateNewText: PropTypes.func\n },\n\n onAdd(title) {\n return () => {\n this.props.onAdd({\n category: this.props.category,\n title: title\n });\n };\n },\n\n onCreateNew(e) {\n e.preventDefault();\n this.onAdd(this.props.input)();\n },\n\n getTagStyle(item) {\n return this.props.getTagStyle ? this.props.getTagStyle(item) : {}\n },\n\n itemToTag(item, i) {\n return (\n <Tag selected={this.isSelected(i)}\n input={this.props.input} text={item} addable={true} deletable={false}\n onAdd={this.onAdd(item)} key={item + '_' + i} style={this.getTagStyle(item)} />\n );\n },\n\n fullMatchInItems() {\n for (let i = 0, len = this.props.items.length; i < len; i++) {\n if (this.props.items[i] === this.props.input) {\n return true;\n }\n }\n return false;\n },\n\n getItems() {\n return {\n items: this.props.items.map(this.itemToTag),\n fullMatch: this.fullMatchInItems(),\n };\n },\n\n isSelected(i) {\n return this.props.selected &&\n (i === this.props.selectedItem || this.props.single);\n },\n\n getAddBtn(fullMatch, selected) {\n const title = this.props.type || this.props.title;\n const text = this.props.input;\n const getText = this.props.getCreateNewText || getCreateNewText;\n if (this.props.addNew && !fullMatch && !this.props.single) {\n return [\n this.props.items.length > 0 ?\n <span key='cat_or' className='cti__category__or'>or</span> :\n null,\n <button\n key='add_btn'\n className={'cti__category__add-item' + (selected ? ' cti-selected' : '')}\n onClick={this.onCreateNew}\n >{getText(title, text)}</button>\n ];\n }\n\n return null;\n },\n\n render() {\n let { items, fullMatch } = this.getItems();\n let addBtn = this.getAddBtn(\n fullMatch,\n (items.length === 0 || this.props.selectedItem >= items.length) &&\n this.props.selected\n );\n\n return (\n <div className='cti__category'>\n <h5 className='cti__category__title'>{this.props.title}</h5>\n <div className='cti__category__tags'>\n {items}\n {addBtn}\n </div>\n </div>\n );\n }\n});\n\nexport default Category;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Category.jsx\n **/","import React from 'react';\n\nimport Tag from './Tag.jsx';\n\nconst { PropTypes } = React;\n\nconst Input = React.createClass({\n propTypes: {\n openPanel: PropTypes.func.isRequired,\n closePanel: PropTypes.func.isRequired,\n onValueChange: PropTypes.func.isRequired,\n onTagDeleted: PropTypes.func.isRequired,\n onKeyDown: PropTypes.func.isRequired,\n value: PropTypes.string.isRequired,\n tags: PropTypes.arrayOf(PropTypes.object).isRequired,\n placeholder: PropTypes.string,\n onBlur: PropTypes.func,\n getTagStyle: PropTypes.func,\n transformTag: PropTypes.func\n },\n\n focusInput() {\n this.refs.input.focus();\n },\n\n getDefaultProps() {\n return {\n getTagStyle(tag) {\n // empty style object by default\n return {};\n },\n transformTag(tag){\n return tag.title;\n }\n };\n },\n\n getTags() {\n\n return this.props.tags.map((tag, i) => {\n return (\n <Tag selected={false} input='' text={this.props.transformTag(tag)} addable={false}\n deletable={true} key={tag.title + '_' + i}\n onDelete={() => this.props.onTagDeleted(i)}\n style={this.props.getTagStyle(tag)}/>\n );\n });\n },\n\n onBlur(e) {\n this.props.closePanel();\n if (typeof this.props.onBlur === 'function') {\n this.props.onBlur(e);\n }\n },\n\n render() {\n const placeholder = this.props.placeholder || '';\n let size = this.props.value.length === 0 ?\n placeholder.length :\n this.props.value.length;\n return (\n <div className='cti__input' onClick={this.focusInput}>\n {this.getTags()}\n <input type='text' ref='input' value={this.props.value}\n size={size + 2}\n onFocus={this.props.openPanel} onBlur={this.onBlur}\n onChange={this.props.onValueChange} onKeyDown={this.props.onKeyDown}\n placeholder={placeholder} aria-label={placeholder}\n className='cti__input__input' />\n <div className='cti__input__arrow' />\n </div>\n );\n }\n});\n\nexport default Input;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Input.jsx\n **/","import React from 'react';\n\nimport Category from './Category.jsx';\n\nconst { PropTypes } = React;\n\nconst Panel = React.createClass({\n propTypes: {\n categories: PropTypes.arrayOf(PropTypes.object).isRequired,\n selection: PropTypes.object.isRequired,\n onAdd: PropTypes.func.isRequired,\n input: PropTypes.string.isRequired,\n addNew: PropTypes.bool,\n getTagStyle: PropTypes.func,\n getCreateNewText: PropTypes.func\n },\n\n getCategories() {\n return this.props.categories.map((c, i) => {\n return (\n <Category key={c.id} items={c.items} category={c.id} title={c.title}\n selected={this.props.selection.category === i}\n selectedItem={this.props.selection.item}\n input={this.props.input} addNew={this.props.addNew}\n type={c.type} onAdd={this.props.onAdd} single={c.single}\n getTagStyle={this.props.getTagStyle}\n getCreateNewText={this.props.getCreateNewText} />\n );\n });\n },\n\n render() {\n return (\n <div className='cti__panel'>\n {this.getCategories()}\n </div>\n );\n }\n});\n\nexport default Panel;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Panel.jsx\n **/","export var TAB = 9;\nexport var ENTER = 13;\nexport var BACKSPACE = 8;\nexport var LEFT = 37;\nexport var UP = 38;\nexport var RIGHT = 39;\nexport var DOWN = 40;\nexport var COMMA = 188;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/keyboard.js\n **/"],"sourceRoot":""}