Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-taggable-input

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-taggable-input - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

.travis.yml

2

dist/assets/lib.js

@@ -1,2 +0,2 @@

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("classnames"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","classnames","react-dom"],t);else{var n="object"==typeof exports?t(require("react"),require("classnames"),require("react-dom")):t(e.react,e.classnames,e["react-dom"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/assets/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),c=r(l),u=n(12),f=r(u),p=n(13),d=n(8),h=r(d),g=n(7),v=r(g),y=n(3),m=r(y),b=n(2);n(11),n(6).polyfill();var C=["Delete","Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"],w=["Delete","Backspace"],T=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.applyTag=function(e){var t=n.tagCaretStartIndex,r=n.content,o=n.triggerMatch,a=(0,p.findDOMNode)(r),i=o.parseMatchedTag(n.state.value,t),s=t+i.length+1;(0,b.setSelectionRange)(a,t,s),(0,b.replaceSelectedNode)(e);var l=a.innerHTML;n.setState({value:l},function(){return n.props.onChange(l)}),n.cancelTag(!0)},n.cancelTag=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n.triggerPopuped=!1,e&&(n.tagCaretStartIndex=null),n.props.onTrigger("")},n.handleChange=function(e){n.updateCaretPosition();var t=n.tagCaretStartIndex,r=n.content,o=n.triggerMatch,a=n.triggerDel,i=o.parseMatchedTag(e,t,!0);if(n.isTriggered())if(i){var s=(0,p.findDOMNode)(r),l=(0,b.getCaretPixelPos)(s),c=o.parseMatchedTag(e,t,!1);n.props.onTrigger(c,i,l)}else a&&n.cancelTag(!0);n.setState({value:e},function(){return n.props.onChange(e)})},n.isTriggered=function(){var e=n.tagCaretStartIndex,t=n.triggerPopuped;return null!==e||t},n.updateCaretPosition=function(){var e=n.content,t=(0,p.findDOMNode)(e),r=(0,b.getCaretPosition)(t);n.latestCaretPos=r;var o=n.triggerMatch.getTriggerKeyStartIndex(t.innerHTML,n.latestCaretPos);null!==o&&(n.triggerPopuped=!0,n.tagCaretStartIndex=o)},n.handleKeyDown=function(e){var t=e.key;if(C.indexOf(t)<0){var r=n.state.value,o=(0,b.getInputValueLength)(r);o>n.props.maxLength&&e.preventDefault()}switch(w.indexOf(t)>=0&&(n.triggerDel=!0),t){case"Enter":e.preventDefault(),n.onComposition||(n.isTriggered()?n.props.onKeyDown(t):n.triggerEnter=!0);break;case"Escape":case" ":n.onComposition||n.cancelTag(!0);break;default:n.isTriggered()&&n.props.onKeyDown(t)}},n.handleKeyUp=function(){var e=(0,p.findDOMNode)(n.content),t=e.innerHTML,r=n.tagCaretStartIndex;if(n.triggerEnter&&(n.props.onSubmit(),n.state.disabled||n.clearInput(n.handleFocus),n.triggerEnter=!1),n.props.onTriggerKeyUp){var o=n.triggerMatch.getTriggerKeyStartIndex(t,n.latestCaretPos),a=n.triggerMatch.parseMatchedTag(t,r,!0);if(null!==o&&1===a.length){var i=(0,b.getCaretPixelPos)(e);n.props.onTriggerKeyUp(i)}else n.props.onTriggerKeyUp(null)}n.triggerDel=!1},n.handleFocus=function(){n.state.value===n.props.placeHolder&&n.setState({value:"",placeHolder:!1})},n.handleBlur=function(){n.state.value||n.setState({value:n.props.placeHolder,placeHolder:!0})},n.handleClickOutside=function(){n.isTriggered()&&n.cancelTag()},n.handleComposition=function(e){"compositionend"===e.type?n.onComposition=!1:n.onComposition=!0},n.clearInput=function(e){n.setState({value:n.props.placeHolder,placeHolder:!0},function(){n.cancelTag(!0),e&&e()})},console.log(e),n.state={data:[],value:e.defaultValue||e.placeHolder,renderValue:"",disabled:e.disabled||!0,placeHolder:!0},n.latestCaretPos=0,n.triggerPopuped=!1,n.tagCaretStartIndex=null,n.triggerEnter=!1,n.triggerDel=!1,n.onComposition=!1,n.triggerMatch=new m.default(e.trigger),n}return i(t,e),s(t,[{key:"componentWillReceiveProps",value:function(e){"undefined"!=typeof e.disabled&&this.setState({disabled:e.disabled})}},{key:"render",value:function(){var e=this,t=[];return this.props.className&&t.push(this.props.className),this.state.value===this.props.placeHolder&&this.state.placeHolder&&t.push("placeholder"),c.default.createElement(v.default,{onClickOutside:this.handleClickOutside,useCapture:!1},c.default.createElement(h.default,{html:this.state.value,className:(0,f.default)(t),ref:function(t){return e.content=t},disabled:!1,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyUp:this.handleKeyUp,onCompositionStart:this.handleComposition,onCompositionUpdate:this.handleComposition,onCompositionEnd:this.handleComposition}))}}]),t}(l.PureComponent);T.propTypes={disabled:l.PropTypes.bool,className:l.PropTypes.string,defaultValue:l.PropTypes.string.isRequired,placeHolder:l.PropTypes.string.isRequired,trigger:l.PropTypes.string.isRequired,maxLength:l.PropTypes.number,onKeyDown:l.PropTypes.func,onTrigger:l.PropTypes.func.isRequired,onTriggerKeyUp:l.PropTypes.func,onChange:l.PropTypes.func.isRequired,onSubmit:l.PropTypes.func.isRequired},T.defaultProps={disabled:!0},t.default=T},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e){return e.replace(/ style="[a-zA-Z0-9:;.\s()\-,&!]*"/g,"")}function i(e){return(0,g.default)(e).replace(/&nbsp;/g," ")}function s(e){return i(e).length}function l(e){var t=void 0,n=void 0,r=void 0;if(window.getSelection){if(t=window.getSelection(),t.getRangeAt&&t.rangeCount){n=window.getSelection().getRangeAt(0),n.deleteContents(),r=n.cloneRange(),n.collapse(!1);var o=document.createElement("div");o.innerHTML=e;for(var a=document.createDocumentFragment(),i=void 0,s=void 0;i=o.firstChild;)s=a.appendChild(i);n.insertNode(a),s&&(r.setStartAfter(s),t.removeAllRanges(),t.addRange(r))}}else document.selection&&document.selection.createRange&&(n=document.selection.createRange(),r=n.duplicate(),n.collapse(!1),n.pasteHTML(e),r.setEndPoint("EndToEnd",n))}function c(e){var t=[];if(3===e.nodeType)t.push(e);else for(var n=e.childNodes,r=0,a=n.length;r<a;++r)t.push.apply(t,o(c(n[r])));return t}function u(e,t,n){if(document.createRange&&window.getSelection){var r=document.createRange();r.selectNodeContents(e);for(var o,a=c(e),i=!1,s=0,l=void 0,u=0;o=a[u++];){if(l=s+o.length,!i&&t>=s&&(t<l||t===l&&u<=a.length)&&(r.setStart(o,t-s),i=!0),i&&n<=l){r.setEnd(o,n-s);break}s=l}var f=window.getSelection();f.removeAllRanges(),f.addRange(r)}else if(document.selection&&document.body.createTextRange){var p=document.body.createTextRange();p.moveToElementText(e),p.collapse(!0),p.moveEnd("character",n),p.moveStart("character",t),p.select()}}function f(e){var t=0,n=0,r=e.ownerDocument||e.document,o=r.defaultView||r.parentWindow,a=void 0;if("undefined"!=typeof o.getSelection){if(a=o.getSelection(),a.rangeCount>0){var i=o.getSelection().getRangeAt(0),s=i.cloneRange();s.selectNodeContents(e),s.setEnd(i.startContainer,i.startOffset),t=s.toString().length,s.setEnd(i.endContainer,i.endOffset),n=s.toString().length}}else if(a=r.selection,"Control"!==a.type){var l=a.createRange(),c=r.body.createTextRange();c.moveToElementText(e),c.setEndPoint("EndToStart",l),n=c.text.length,c.setEndPoint("EndToEnd",l),n=c.text.length}return{start:t,end:n}}function p(e){return f(e).end}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0,o=0;if(e){var a=e.getBoundingClientRect();r=a.left+window.document.body.scrollLeft,o=a.top+window.document.body.scrollTop}var i={left:0,top:0};if(document.selection){var s=document.selection.createRange();i.left=s.offsetLeft+t-r,i.top=s.offsetTop+n-o}else if(window.getSelection){var l=window.getSelection(),c=l.getRangeAt(0).cloneRange();try{c.setStart(c.startContainer,c.startOffset-1)}catch(e){}var u=c.getBoundingClientRect();if(0===c.endOffset||""===c.toString())if(c.startContainer===e)if(0===c.endOffset)i.top=0,i.left=0;else{var f=c.cloneRange();f.setStart(f.startContainer,0);var p=f.getBoundingClientRect();i.left=p.left+t-r,i.top=p.top+p.height+n-o}else i.top=c.startContainer.offsetTop,i.left=c.startContainer.offsetLeft;else i.left=u.left+u.width+t-r,i.top=u.top+n-o}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.removeStyle=a,t.plainText=i,t.getInputValueLength=s,t.replaceSelectedNode=l,t.setSelectionRange=u,t.getSelectionCharacterOffsetWithin=f,t.getCaretPosition=p,t.getCaretPixelPos=d;var h=n(9),g=r(h)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=function e(t){var n=this;r(this,e),this.parseMatchedTag=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a="";if(e&&t>=0){var i=(0,o.plainText)(e).substring(t),s=i.match(n.triggerRegex);s&&s.length&&(a=r?s[1]:s[2])}return a},this.getTriggerKeyStartIndex=function(e,t){var r=!1,a=(0,o.plainText)(e).substring(0,t),i=a.lastIndexOf(" ");if(i>=0&&(a=a.substring(i+1)),n.triggerKeyRegex.test(a)&&(r=!0),r){var s=a.match(n.triggerKeyRegex),l=a;return s&&s.length&&(l=s[s.length-1]),t-l.length>0?t-l.length:0}return null},this.triggerRegex=new RegExp("^(["+t+"](\\S*))"),this.triggerKeyRegex=new RegExp("["+t+"][\\S]*$")};t.default=a},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,".placeholder{color:rgba(88,88,88,.5)}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(r[a]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},function(e,t,n){var r,o;!function(){function a(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var e={get:function(e){var t=s.keys[this.which||this.keyCode];return Array.isArray(t)&&(t=t[+this.shiftKey]),t}};return Object.defineProperty(KeyboardEvent.prototype,"key",e),e}var i,s={polyfill:a,keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}};for(i=1;i<25;i++)s.keys[111+i]="F"+i;var l="";for(i=65;i<91;i++)l=String.fromCharCode(i),s.keys[i]=[l.toLowerCase(),l.toUpperCase()];r=s,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o))}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s(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});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),f=r(u),p=function(e){function t(){var e,n,r,o;a(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.handle=function(e){var t=r.props.onClickOutside,n=r.container;n.contains(e.target)||t(e)},o=n,i(r,o)}return s(t,e),c(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=(t.onClickOutside,t.useCapture,o(t,["children","onClickOutside","useCapture"]));return f.default.createElement("div",l({},r,{ref:function(t){return e.container=t}}),n)}},{key:"componentDidMount",value:function(){document.addEventListener("click",this.handle,this.props.useCapture)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handle,this.props.useCapture)}}]),t}(u.Component);p.propTypes={onClickOutside:u.PropTypes.func.isRequired,useCapture:u.PropTypes.bool},p.defaultProps={useCapture:!0},t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s(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});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),f=r(u),p=function(e){function t(){a(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.emitChange=e.emitChange.bind(e),e}return s(t,e),c(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.tagName,r=t.html,a=(t.onChange,o(t,["tagName","html","onChange"]));return f.default.createElement(n||"div",l({},a,{ref:function(t){return e.htmlEl=t},onInput:this.emitChange,onBlur:this.props.onBlur||this.emitChange,onKeyUp:this.props.onKeyUp?function(e){this.props.onKeyUp(e),this.emitChange(e)}.bind(this):this.emitChange,contentEditable:!this.props.disabled,dangerouslySetInnerHTML:{__html:r}}),this.props.children)}},{key:"shouldComponentUpdate",value:function(e){return!this.htmlEl||e.html!==this.htmlEl.innerHTML&&e.html!==this.props.html||this.props.disabled!==e.disabled}},{key:"componentDidUpdate",value:function(){this.htmlEl&&this.props.html!==this.htmlEl.innerHTML&&(this.htmlEl.innerHTML=this.props.html)}},{key:"emitChange",value:function(e){if(this.htmlEl){var t=this.htmlEl.innerHTML;this.props.onChange&&t!==this.lastHtml&&this.props.onChange(t),this.lastHtml=t}}}]),t}(f.default.Component);t.default=p,e.exports=t.default},function(e,t,n){var r,o,a;!function(n,i){o=[],r=i,a="function"==typeof r?r.apply(t,o):r,!(void 0!==a&&(e.exports=a))}(this,function(){function e(e,s){function l(e){d==n?g+=e:s&&d==r&&(v+=e)}function c(){var e,t,n,r="",o=!1;e:for(e=0,t=v.length;e<t;e++)switch(n=v[e].toLowerCase()){case"<":break;case">":break e;case"/":o=!0;break;default:if(n.match(i)){if(o)break e}else o=!0,r+=n}s.indexOf(r)!==-1&&(g+=v),v=""}var u,f,p,e=e||"",d=n,h=0,g="",v="",y=!1;for("string"==typeof s?s=t(s):Array.isArray(s)||(s=null),u=0,f=e.length;u<f;u++)switch(p=e[u]){case"<":if(y)break;if(" "==e[u+1]){l(p);break}if(d==n){d=r,l(p);break}if(d==r){h++;break}l(p);break;case">":if(h){h--;break}if(y)break;if(d==r){y=d=0,s&&(v+=">",c());break}if(d==o){y=d=0,v="";break}if(d==a&&"-"==e[u-1]&&"-"==e[u-2]){y=d=0,v="";break}l(p);break;case'"':case"'":d==r&&(y==p?y=!1:y||(y=p)),l(p);break;case"!":if(d==r&&"<"==e[u-1]){d=o;break}l(p);break;case"-":if(d==o&&"-"==e[u-1]&&"!"==e[u-2]){d=a;break}l(p);break;case"E":case"e":if(d==o&&"doctype"==e.substr(u-6,7).toLowerCase()){d=r;break}l(p);break;default:l(p)}return g}function t(e){for(var t,n=[];null!==(t=s.exec(e));)n.push(t[1]);return 0!==n.length?n:null}var n=0,r=1,o=2,a=3,i=/\s/,s=/<(\w*)>/g;return e})},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=d[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(c(r.parts[a],t))}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(c(r.parts[a],t));d[r.id]={id:r.id,refs:1,parts:i}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],a=o[0],i=o[1],s=o[2],l=o[3],c={css:i,media:s,sourceMap:l};n[a]?n[a].parts.push(c):t.push(n[a]={id:a,parts:[c]})}return t}function a(e,t){var n=v(),r=b[b.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),b.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=b.indexOf(e);t>=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",a(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function c(e,t){var n,r,o;if(t.singleton){var a=m++;n=y||(y=s(t)),r=u.bind(null,n,a,!1),o=u.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=p.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),o=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function u(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=C(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function p(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(o),a&&URL.revokeObjectURL(a)}var d={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},g=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,m=0,b=[];e.exports=function(e,t){if("object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},"undefined"==typeof t.singleton&&(t.singleton=g()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var a=[],i=0;i<n.length;i++){var s=n[i],l=d[s.id];l.refs--,a.push(l)}if(e){var c=o(e);r(c,t)}for(var i=0;i<a.length;i++){var l=a[i];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete d[l.id]}}}};var C=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){var r=n(4);"string"==typeof r&&(r=[[e.id,r,""]]);n(10)(r,{});r.locals&&(e.exports=r.locals)},function(e,n){e.exports=t},function(e,t){e.exports=n}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"),require("classnames"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","classnames","react-dom"],t);else{var n="object"==typeof exports?t(require("react"),require("classnames"),require("react-dom")):t(e.react,e.classnames,e["react-dom"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/assets/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),c=r(l),u=n(12),p=r(u),f=n(13),d=n(8),h=r(d),g=n(7),v=r(g),y=n(3),m=r(y),b=n(2);n(11),n(6).polyfill();var C=["Delete","Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"],w=["Delete","Backspace"],T=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.applyTag=function(e){var t=n.tagCaretStartIndex,r=n.content,o=n.triggerMatch,a=(0,f.findDOMNode)(r),i=o.parseMatchedTag(n.state.value,t),s=t+i.length+1;(0,b.setSelectionRange)(a,t,s),(0,b.replaceSelectedNode)(e);var l=a.innerHTML;n.setState({value:l},function(){n.props.onChange&&n.props.onChange(l)}),n.cancelTag(!0)},n.cancelTag=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n.triggerPopuped=!1,e&&(n.tagCaretStartIndex=null),n.props.onTrigger&&n.props.onTrigger("")},n.handleChange=function(e){n.updateCaretPosition();var t=n.tagCaretStartIndex,r=n.content,o=n.triggerMatch,a=n.triggerDel,i=o.parseMatchedTag(e,t,!0);if(n.isTriggered())if(i){var s=(0,f.findDOMNode)(r),l=(0,b.getCaretPixelPos)(s),c=o.parseMatchedTag(e,t,!1);n.props.onTrigger&&n.props.onTrigger(c,i,l)}else a&&n.cancelTag(!0);n.setState({value:e},function(){n.props.onChange&&n.props.onChange(e)})},n.isTriggered=function(){var e=n.tagCaretStartIndex,t=n.triggerPopuped;return null!==e||t},n.updateCaretPosition=function(){var e=n.content,t=(0,f.findDOMNode)(e),r=(0,b.getCaretPosition)(t);n.latestCaretPos=r;var o=n.triggerMatch.getTriggerKeyStartIndex(t.innerHTML,n.latestCaretPos);null!==o&&(n.triggerPopuped=!0,n.tagCaretStartIndex=o)},n.handleKeyDown=function(e){var t=e.key;if(C.indexOf(t)<0){var r=n.state.value,o=(0,b.getInputValueLength)(r);o>n.props.maxLength&&e.preventDefault()}switch(w.indexOf(t)>=0&&(n.triggerDel=!0),t){case"Enter":e.preventDefault(),n.onComposition||(n.isTriggered()?n.props.onKeyDown(t):n.triggerEnter=!0);break;case"Escape":case" ":n.onComposition||n.cancelTag(!0);break;default:n.isTriggered()&&n.props.onKeyDown(t)}},n.handleKeyUp=function(){var e=(0,f.findDOMNode)(n.content),t=e.innerHTML,r=n.tagCaretStartIndex;if(n.triggerEnter&&(n.props.onSubmit&&n.props.onSubmit(),n.state.disabled||n.clearInput(n.handleFocus),n.triggerEnter=!1),n.props.onTriggerKeyUp){var o=n.triggerMatch.getTriggerKeyStartIndex(t,n.latestCaretPos),a=n.triggerMatch.parseMatchedTag(t,r,!0);if(null!==o&&1===a.length){var i=(0,b.getCaretPixelPos)(e);n.props.onTriggerKeyUp(i)}else n.props.onTriggerKeyUp(null)}n.triggerDel=!1},n.handleFocus=function(){n.state.value===n.props.placeHolder&&n.setState({value:"",placeHolder:!1})},n.handleBlur=function(){n.state.value||n.setState({value:n.props.placeHolder,placeHolder:!0})},n.handleClickOutside=function(){n.isTriggered()&&n.cancelTag()},n.handleComposition=function(e){"compositionend"===e.type?n.onComposition=!1:n.onComposition=!0},n.clearInput=function(e){n.setState({value:n.props.placeHolder,placeHolder:!0},function(){n.cancelTag(!0),e&&e()})},console.log(e),n.state={data:[],value:e.defaultValue||e.placeHolder,renderValue:"",disabled:e.disabled||!0,placeHolder:!0},n.latestCaretPos=0,n.triggerPopuped=!1,n.tagCaretStartIndex=null,n.triggerEnter=!1,n.triggerDel=!1,n.onComposition=!1,n.triggerMatch=new m.default(e.trigger),n}return i(t,e),s(t,[{key:"componentWillReceiveProps",value:function(e){"undefined"!=typeof e.disabled&&this.setState({disabled:e.disabled})}},{key:"render",value:function(){var e=this,t=[];return this.props.className&&t.push(this.props.className),this.state.value===this.props.placeHolder&&this.state.placeHolder&&t.push("placeholder"),c.default.createElement(v.default,{onClickOutside:this.handleClickOutside,useCapture:!1},c.default.createElement(h.default,{html:this.state.value,className:(0,p.default)(t),ref:function(t){return e.content=t},disabled:!1,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyUp:this.handleKeyUp,onCompositionStart:this.handleComposition,onCompositionUpdate:this.handleComposition,onCompositionEnd:this.handleComposition}))}}]),t}(l.PureComponent);T.propTypes={trigger:l.PropTypes.string.isRequired,disabled:l.PropTypes.bool,className:l.PropTypes.string,defaultValue:l.PropTypes.string,placeHolder:l.PropTypes.string,maxLength:l.PropTypes.number,onKeyDown:l.PropTypes.func,onTrigger:l.PropTypes.func,onTriggerKeyUp:l.PropTypes.func,onChange:l.PropTypes.func,onSubmit:l.PropTypes.func},T.defaultProps={disabled:!0},t.default=T},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e){return e.replace(/ style="[a-zA-Z0-9:;.\s()\-,&!]*"/g,"")}function i(e){return(0,g.default)(e).replace(/&nbsp;/g," ")}function s(e){return i(e).length}function l(e){var t=void 0,n=void 0,r=void 0;if(window.getSelection){if(t=window.getSelection(),t.getRangeAt&&t.rangeCount){n=window.getSelection().getRangeAt(0),n.deleteContents(),r=n.cloneRange(),n.collapse(!1);var o=document.createElement("div");o.innerHTML=e;for(var a=document.createDocumentFragment(),i=void 0,s=void 0;i=o.firstChild;)s=a.appendChild(i);n.insertNode(a),s&&(r.setStartAfter(s),t.removeAllRanges(),t.addRange(r))}}else document.selection&&document.selection.createRange&&(n=document.selection.createRange(),r=n.duplicate(),n.collapse(!1),n.pasteHTML(e),r.setEndPoint("EndToEnd",n))}function c(e){var t=[];if(3===e.nodeType)t.push(e);else for(var n=e.childNodes,r=0,a=n.length;r<a;++r)t.push.apply(t,o(c(n[r])));return t}function u(e,t,n){if(document.createRange&&window.getSelection){var r=document.createRange();r.selectNodeContents(e);for(var o,a=c(e),i=!1,s=0,l=void 0,u=0;o=a[u++];){if(l=s+o.length,!i&&t>=s&&(t<l||t===l&&u<=a.length)&&(r.setStart(o,t-s),i=!0),i&&n<=l){r.setEnd(o,n-s);break}s=l}var p=window.getSelection();p.removeAllRanges(),p.addRange(r)}else if(document.selection&&document.body.createTextRange){var f=document.body.createTextRange();f.moveToElementText(e),f.collapse(!0),f.moveEnd("character",n),f.moveStart("character",t),f.select()}}function p(e){var t=0,n=0,r=e.ownerDocument||e.document,o=r.defaultView||r.parentWindow,a=void 0;if("undefined"!=typeof o.getSelection){if(a=o.getSelection(),a.rangeCount>0){var i=o.getSelection().getRangeAt(0),s=i.cloneRange();s.selectNodeContents(e),s.setEnd(i.startContainer,i.startOffset),t=s.toString().length,s.setEnd(i.endContainer,i.endOffset),n=s.toString().length}}else if(a=r.selection,"Control"!==a.type){var l=a.createRange(),c=r.body.createTextRange();c.moveToElementText(e),c.setEndPoint("EndToStart",l),n=c.text.length,c.setEndPoint("EndToEnd",l),n=c.text.length}return{start:t,end:n}}function f(e){return p(e).end}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0,o=0;if(e){var a=e.getBoundingClientRect();r=a.left+window.document.body.scrollLeft,o=a.top+window.document.body.scrollTop}var i={left:0,top:0};if(document.selection){var s=document.selection.createRange();i.left=s.offsetLeft+t-r,i.top=s.offsetTop+n-o}else if(window.getSelection){var l=window.getSelection(),c=l.getRangeAt(0).cloneRange();try{c.setStart(c.startContainer,c.startOffset-1)}catch(e){}var u=c.getBoundingClientRect();if(0===c.endOffset||""===c.toString())if(c.startContainer===e)if(0===c.endOffset)i.top=0,i.left=0;else{var p=c.cloneRange();p.setStart(p.startContainer,0);var f=p.getBoundingClientRect();i.left=f.left+t-r,i.top=f.top+f.height+n-o}else i.top=c.startContainer.offsetTop,i.left=c.startContainer.offsetLeft;else i.left=u.left+u.width+t-r,i.top=u.top+n-o}return i}Object.defineProperty(t,"__esModule",{value:!0}),t.removeStyle=a,t.plainText=i,t.getInputValueLength=s,t.replaceSelectedNode=l,t.setSelectionRange=u,t.getSelectionCharacterOffsetWithin=p,t.getCaretPosition=f,t.getCaretPixelPos=d;var h=n(9),g=r(h)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=function e(t){var n=this;r(this,e),this.parseMatchedTag=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a="";if(e&&t>=0){var i=(0,o.plainText)(e).substring(t),s=i.match(n.triggerRegex);s&&s.length&&(a=r?s[1]:s[2])}return a},this.getTriggerKeyStartIndex=function(e,t){var r=!1,a=(0,o.plainText)(e).substring(0,t),i=a.lastIndexOf(" ");if(i>=0&&(a=a.substring(i+1)),n.triggerKeyRegex.test(a)&&(r=!0),r){var s=a.match(n.triggerKeyRegex),l=a;return s&&s.length&&(l=s[s.length-1]),t-l.length>0?t-l.length:0}return null},this.triggerRegex=new RegExp("^(["+t+"](\\S*))"),this.triggerKeyRegex=new RegExp("["+t+"][\\S]*$")};t.default=a},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,".placeholder{color:rgba(88,88,88,.5)}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(r[a]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},function(e,t,n){var r,o;!function(){function a(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var e={get:function(e){var t=s.keys[this.which||this.keyCode];return Array.isArray(t)&&(t=t[+this.shiftKey]),t}};return Object.defineProperty(KeyboardEvent.prototype,"key",e),e}var i,s={polyfill:a,keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}};for(i=1;i<25;i++)s.keys[111+i]="F"+i;var l="";for(i=65;i<91;i++)l=String.fromCharCode(i),s.keys[i]=[l.toLowerCase(),l.toUpperCase()];r=s,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o))}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s(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});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),p=r(u),f=function(e){function t(){var e,n,r,o;a(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.handle=function(e){var t=r.props.onClickOutside,n=r.container;n.contains(e.target)||t(e)},o=n,i(r,o)}return s(t,e),c(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=(t.onClickOutside,t.useCapture,o(t,["children","onClickOutside","useCapture"]));return p.default.createElement("div",l({},r,{ref:function(t){return e.container=t}}),n)}},{key:"componentDidMount",value:function(){document.addEventListener("click",this.handle,this.props.useCapture)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handle,this.props.useCapture)}}]),t}(u.Component);f.propTypes={onClickOutside:u.PropTypes.func.isRequired,useCapture:u.PropTypes.bool},f.defaultProps={useCapture:!0},t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s(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});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(1),p=r(u),f=function(e){function t(){a(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.emitChange=e.emitChange.bind(e),e}return s(t,e),c(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.tagName,r=t.html,a=(t.onChange,o(t,["tagName","html","onChange"]));return p.default.createElement(n||"div",l({},a,{ref:function(t){return e.htmlEl=t},onInput:this.emitChange,onBlur:this.props.onBlur||this.emitChange,onKeyUp:this.props.onKeyUp?function(e){this.props.onKeyUp(e),this.emitChange(e)}.bind(this):this.emitChange,contentEditable:!this.props.disabled,dangerouslySetInnerHTML:{__html:r}}),this.props.children)}},{key:"shouldComponentUpdate",value:function(e){return!this.htmlEl||e.html!==this.htmlEl.innerHTML&&e.html!==this.props.html||this.props.disabled!==e.disabled}},{key:"componentDidUpdate",value:function(){this.htmlEl&&this.props.html!==this.htmlEl.innerHTML&&(this.htmlEl.innerHTML=this.props.html)}},{key:"emitChange",value:function(e){if(this.htmlEl){var t=this.htmlEl.innerHTML;this.props.onChange&&t!==this.lastHtml&&this.props.onChange(t),this.lastHtml=t}}}]),t}(p.default.Component);t.default=f,e.exports=t.default},function(e,t,n){var r,o,a;!function(n,i){o=[],r=i,a="function"==typeof r?r.apply(t,o):r,!(void 0!==a&&(e.exports=a))}(this,function(){function e(e,s){function l(e){d==n?g+=e:s&&d==r&&(v+=e)}function c(){var e,t,n,r="",o=!1;e:for(e=0,t=v.length;e<t;e++)switch(n=v[e].toLowerCase()){case"<":break;case">":break e;case"/":o=!0;break;default:if(n.match(i)){if(o)break e}else o=!0,r+=n}s.indexOf(r)!==-1&&(g+=v),v=""}var u,p,f,e=e||"",d=n,h=0,g="",v="",y=!1;for("string"==typeof s?s=t(s):Array.isArray(s)||(s=null),u=0,p=e.length;u<p;u++)switch(f=e[u]){case"<":if(y)break;if(" "==e[u+1]){l(f);break}if(d==n){d=r,l(f);break}if(d==r){h++;break}l(f);break;case">":if(h){h--;break}if(y)break;if(d==r){y=d=0,s&&(v+=">",c());break}if(d==o){y=d=0,v="";break}if(d==a&&"-"==e[u-1]&&"-"==e[u-2]){y=d=0,v="";break}l(f);break;case'"':case"'":d==r&&(y==f?y=!1:y||(y=f)),l(f);break;case"!":if(d==r&&"<"==e[u-1]){d=o;break}l(f);break;case"-":if(d==o&&"-"==e[u-1]&&"!"==e[u-2]){d=a;break}l(f);break;case"E":case"e":if(d==o&&"doctype"==e.substr(u-6,7).toLowerCase()){d=r;break}l(f);break;default:l(f)}return g}function t(e){for(var t,n=[];null!==(t=s.exec(e));)n.push(t[1]);return 0!==n.length?n:null}var n=0,r=1,o=2,a=3,i=/\s/,s=/<(\w*)>/g;return e})},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=d[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(c(r.parts[a],t))}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(c(r.parts[a],t));d[r.id]={id:r.id,refs:1,parts:i}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],a=o[0],i=o[1],s=o[2],l=o[3],c={css:i,media:s,sourceMap:l};n[a]?n[a].parts.push(c):t.push(n[a]={id:a,parts:[c]})}return t}function a(e,t){var n=v(),r=b[b.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),b.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=b.indexOf(e);t>=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",a(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function c(e,t){var n,r,o;if(t.singleton){var a=m++;n=y||(y=s(t)),r=u.bind(null,n,a,!1),o=u.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=f.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),o=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function u(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=C(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function p(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(o),a&&URL.revokeObjectURL(a)}var d={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},g=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,m=0,b=[];e.exports=function(e,t){if("object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},"undefined"==typeof t.singleton&&(t.singleton=g()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var a=[],i=0;i<n.length;i++){var s=n[i],l=d[s.id];l.refs--,a.push(l)}if(e){var c=o(e);r(c,t)}for(var i=0;i<a.length;i++){var l=a[i];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete d[l.id]}}}};var C=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){var r=n(4);"string"==typeof r&&(r=[[e.id,r,""]]);n(10)(r,{});r.locals&&(e.exports=r.locals)},function(e,n){e.exports=t},function(e,t){e.exports=n}])});
//# sourceMappingURL=lib.js.map
{
"name": "react-taggable-input",
"version": "0.0.2",
"version": "0.1.0",
"description": "tag or mention in input element when keydown # or @ or any other character.",

@@ -17,2 +17,3 @@ "main": "dist/assets/lib.js",

"clean": "rimraf dist/*",
"postinstall": "node node_modules/phantomjs-prebuilt/install.js",
"release:major": "npm version major && npm publish && git push --follow-tags",

@@ -30,3 +31,10 @@ "release:minor": "npm version minor && npm publish && git push --follow-tags",

},
"keywords": ["react", "react-component", "taggable-input", "react-tagglble-input", "mention", "tag"],
"keywords": [
"react",
"react-component",
"taggable-input",
"react-tagglble-input",
"mention",
"tag"
],
"author": "Bingo Yang <blackbing@gmail.com>",

@@ -44,4 +52,5 @@ "license": "MIT",

"chai": "^3.2.0",
"classnames": "^2.2.5",
"copyfiles": "^1.0.0",
"core-js": "^2.0.0",
"copyfiles": "^1.0.0",
"css-loader": "^0.23.0",

@@ -59,3 +68,3 @@ "eslint": "^3.0.0",

"karma-mocha-reporter": "^2.0.0",
"karma-phantomjs-launcher": "^1.0.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-sourcemap-loader": "^0.3.5",

@@ -68,4 +77,6 @@ "karma-webpack": "^1.7.0",

"open": "0.0.5",
"phantomjs-prebuilt": "^2.0.0",
"phantomjs-prebuilt": "^2.1.14",
"react": "^15.0.0",
"react-addons-test-utils": "^15.0.0",
"react-dom": "^15.0.0",
"react-hot-loader": "^1.2.9",

@@ -72,0 +83,0 @@ "rimraf": "^2.4.3",

@@ -1,6 +0,6 @@

# react-taggable-input
# react-taggable-input [![npm package][npm-badge]][npm] [![Travis][build-badge]][build] [![codecov][codecov-badge]][codecov]
tag or mention in input element when keydown # or @ or any other character.
[![react-taggable-input](http://bingo.d.pr/LG6X.gif)](http://bingo.d.pr/LG6X.gif)
[![react-taggable-input](http://bingo.d.pr/LG6X.gif)](http://blog.blackbing.net/react-taggable-input/)

@@ -51,1 +51,12 @@

please checkout [Main.js](https://github.com/blackbing/react-taggable-input/blob/master/src/components/Main.js) if you want to see more detail.
[npm-badge]: https://img.shields.io/npm/v/react-taggable-input.svg?style=flat-square
[npm]: https://www.npmjs.com/package/react-taggable-input
[build-badge]: https://img.shields.io/travis/blackbing/react-taggable-input/master.svg?style=flat-square
[build]: https://travis-ci.org/blackbing/react-taggable-input
[codecov-badge]: https://codecov.io/gh/blackbing/react-taggable-input/branch/master/graph/badge.svg
[codecov]: https://codecov.io/gh/blackbing/react-taggable-input

@@ -58,3 +58,2 @@ require('normalize.css/normalize.css');

<div className="index">
<h1>react-taggable-input</h1>
<TaggableInput

@@ -61,0 +60,0 @@ ref={ (input) => (this.input = input) }

@@ -58,3 +58,2 @@ /* eslint-disable react/jsx-no-bind */

super(props);
console.log(props);

@@ -61,0 +60,0 @@ this.state = {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc