boxicons/static/dist/1.bundle.js

2 lines
20 KiB
JavaScript
Raw Normal View History

2018-07-03 08:48:00 +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),g=a(h),b=n(458),p=a(b),v=n(78),E=a(v),x=n(36);g.default.registerLanguage("xml",p.default);var N=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,colorChoiceDisplay:!1,animateChoiceDisplay:!1,rotate:0,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}return l(t,e),r(t,[{key:"componentWillMount",value:function(){"SOLID"===this.props.icon.type_of_icon?this.setState({code:"<i class='bx bxs-"+this.props.icon.name+"'></i>"}):"LOGO"===this.props.icon.type_of_icon?this.setState({code:"<i class='bx bxl-"+this.props.icon.name+"'></i>"}):this.setState({code:"<i class='bx bx-"+this.props.icon.name+"'></i>"})}},{key:"componentDidMount",value:function(){document.querySelectorAll("code").forEach(function(e){g.default.highlightBlock(e)})}},{key:"componentDidUpdate",value:function(){document.querySelectorAll("code").forEach(function(e){g.default.highlightBlock(e)})}},{key:"componentWillReceiveProps",value:function(e){if(this.props.icon.slug!==e.icon.slug){var t="bx bx-"+e.icon.name;"SOLID"===e.icon.type_of_icon?t="bx bxs-"+e.icon.name:"LOGO"===e.icon.type_of_icon&&(t="bx bxl-"+e.icon.name),"none"!==this.state.animation&&(t+=" bx-"+this.state.animation),this.state.rotate>0&&(t+=" bx-rotate-"+this.state.rotate),this.setState({code:"<i class='"+t+"'></i>"})}}},{key:"handleRotate",value:function(){var e="bx bx-"+this.props.icon.name;"SOLID"===this.props.icon.type_of_icon?e="bx bxs-"+this.props.icon.name:"LOGO"===this.props.icon.type_of_icon&&(e="bx bxl-"+this.props.icon.name),"none"!==this.state.animation&&(e+=" bx-"+this.state.animation),this.state.rotate+90!==360?(this.setState({rotate:this.state.rotate+90}),e+=" bx-rotate-"+(this.state.rotate+90)):this.setState({rotate:0}),this.setState({code:"<i class='"+e+"'></i>"})}},{key:"handleAnimate",value:function(e){this.setState({animation:e}),this.setState({animateChoiceDisplay:!1});var t="bx bx-"+this.props.icon.name;"SOLID"===this.props.icon.type_of_icon?t="bx bxs-"+this.props.icon.name:"LOGO"===this.props.icon.type_of_icon&&(t="bx bxl-"+this.props.icon.name),"none"!==e&&(t+=" bx-"+e),this.state.rotate>0&&(t+=" bx-rotate-"+this.state.rotate),this.setState({code:"<i class='"+t+"'></i>"})}},{key:"handleColor",value:function(e){this.setState({color:e}),this.setState({colorChoiceDisplay:!1})}},{key:"handleCurrentColor",value:function(){this.setState({colorChoiceDisplay:!this.state.colorChoiceDisplay}),this.setState({animateChoiceDisplay:!1})}},{key:"handleCurrentAnimation",value:function(){this.setState({animateChoiceDisplay:!this.state.animateChoiceDisplay}),this.setState({colorChoiceDisplay:!1})}},{key:"copyCode",value:
2018-06-29 22:00:13 +02:00
//# sourceMappingURL=1.bundle.js.map