You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/public/react/build/static/js/19.1323a4bd.chunk.js

1 line
4.3 KiB

webpackJsonp([19],{3415:function(e,t,n){"use strict";t.b=y,t.a=function(t){return function(){function e(){return c(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return s(e,t),l(e,[{key:"render",value:function(){return o.a.createElement("div",null,o.a.createElement("h2",null,"HOC Debugger Component"),o.a.createElement("p",null,"Props"),o.a.createElement("pre",null,y(this.props)),o.a.createElement("p",null,"State"),o.a.createElement("pre",null,y(this.state)),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"render",this).call(this))}}]),e}()};var r=n(0),o=n.n(r),a=n(4),l=(n.n(a),function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e});function i(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)}}var u=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0};function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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)}function f(e,t){return"function"==typeof t?"function "+t.name+"() {...}":t}function y(e){return JSON.stringify(e,f,2)}s(h,o.a.Component),l(h,[{key:"render",value:function(){return o.a.createElement("div",null,o.a.createElement("h2",null,"Wrapped Component"),o.a.createElement("p",null,"Im a wrapped component"))}}]);function h(e){c(this,h);var t=p(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,e));return t.state={name:"fran",email:"franleplant@gmail.com"},t}},751:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n.n(r),a=n(3415),l=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(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)}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 p(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)}var s=(p(f,o.a.Component),l(f,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return o.a.createElement("div",null,o.a.createElement("h2",null,"Wrapped Component"),o.a.createElement("p",null,"Props"),o.a.createElement("pre",null,Object(a.b)(this.props)),o.a.createElement("form",null,o.a.createElement("label",null,"Automatically controlled input!"),o.a.createElement("input",Object.assign({type:"email"},this.props.fields("email")))))}}]),f);function f(){return u(this,f),c(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}var y,h=Object(a.a)((y=s,p(b,o.a.Component),l(b,[{key:"componentDidMount",value:function(){}}]),l(b,[{key:"getField",value:function(t){var n=this;return this.state.fields[t]||(this.state.fields[t]={value:"",onChange:function(e){n.state.fields[t].value=e.target.value,n.forceUpdate()}}),{value:this.state.fields[t].value,onChange:this.state.fields[t].onChange}}},{key:"render",value:function(){var e=Object.assign({},this.props,{fields:this.getField.bind(this)});return o.a.createElement("div",null,o.a.createElement("h2",null,"PP HOC"),o.a.createElement("p",null,"Im a Props Proxy HOC that abstracts controlled inputs"),o.a.createElement(y,e))}}]),b));function b(e){u(this,b);var t=c(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,e));return t.state={fields:{}},t}t.default=h}});