2018-07-07 05:21:13 +02:00
|
|
|
webpackJsonp([1],{454:function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 l(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)}function s(e){return(0,m.bindActionCreators)({changeSideIcon:f.changeSideIcon,setSelectedIcon:f.setSelectedIcon},e)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),c=n(5),u=a(c),d=n(54),m=n(48),f=n(77),h=n(457),p=a(h),b=n(458),g=a(b),v=n(78),E=a(v);n(36);p.default.registerLanguage("xml",g.default);var x=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={color:"black",copied:!1,code:null,componentCode:null,colorChoiceDisplay:!1,animateChoiceDisplay:!1,rotate:0,type:"component",animation:"none"},n.handleBoxClose=n.handleBoxClose.bind(n),n.handleColor=n.handleColor.bind(n),n.handleRotate=n.handleRotate.bind(n),n.copyCode=n.copyCode.bind(n),n.handleCurrentColor=n.handleCurrentColor.bind(n),n.handleAnimate=n.handleAnimate.bind(n),n.handleCurrentAnimation=n.handleCurrentAnimation.bind(n),n.changeType=n.changeType.bind(n),n}return l(t,e),r(t,[{key:"changeType",value:function(e){this.setState({type:e})}},{key:"componentWillMount",value:function(){"SOLID"===this.props.icon.type_of_icon?this.setState({code:"<i class='bx bxs-"+this.props.icon.name+"'></i>",componentCode:"<box-icon type='solid' name='"+this.props.icon.name+"'></box-icon>"}):"LOGO"===this.props.icon.type_of_icon?this.setState({code:"<i class='bx bxl-"+this.props.icon.name+"'></i>",componentCode:"<box-icon type='logo' name='"+this.props.icon.name+"'></box-icon>"}):this.setState({code:"<i class='bx bx-"+this.props.icon.name+"'></i>",componentCode:"<box-icon name='"+this.props.icon.name+"'></box-icon>"})}},{key:"componentDidMount",value:function(){for(var e=document.querySelectorAll("code"),t=0;t<e.length;t++)p.default.highlightBlock(e[t])}},{key:"componentDidUpdate",value:function(){for(var e=document.querySelectorAll("code"),t=0;t<e.length;t++)p.default.highlightBlock(e[t])}},{key:"componentWillReceiveProps",value:function(e){if(this.props.icon.slug!==e.icon.slug){var t="bx bx-"+e.icon.name,n="name='"+e.icon.name+"' ";"SOLID"===e.icon.type_of_icon?(t="bx bxs-"+e.icon.name,n+="type='solid' "):"LOGO"===e.icon.type_of_icon&&(t="bx bxl-"+e.icon.name,n+="type='logo' "),"none"!==this.state.animation&&(t+=" bx-"+this.state.animation,n+="animation='"+this.state.animation+"' "),this.state.rotate>0&&(t+=" bx-rotate-"+this.state.rotate,n+="rotate='"+this.state.rotate+"' "),this.setState({code:"<i class='"+t+"'></i>",componentCode:"<box-icon "+n+"></box-icon>"})}}},{key:"handleRotate",value:function(){var e="bx bx-"+this.props.icon.name,t="name='"+this.props.icon.name+"' ";"SOLID"===this.props.icon.type_of_icon?(e="bx bxs-"+this.props.icon.name,t+="type='solid' "):"LOGO"===this.props.icon.type_of_icon&&(e="bx bxl-"+this.props.icon.name,t+="type='logo' "),"none"!==this.state.animation&&(e+=" bx-"+this.state.animation,t+="animation='"+this.state.animation+"' "),this.state.rotate+90!==360?(this.setState({rotate:this.state.rotate+90}),e+=" bx-rotate-"+(this.state.rotate+90),t+="rotate='"+(this.state.rotate+90)+"' "):this.setState({rotate:0}),this.setState({code:"<i class='"+e+"'></i>",componentCode:"<box-icon "+t+"></box-icon>"})}},{key:"handleAnimate",value:function(e){this.setState({animation:e}),this.setSta
|