bloom-layout
Version:
layout components used in bloom packages
2 lines • 6.49 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["react","react-router-dom"],t):"object"==typeof exports?exports.ReactRouterBootstrap=t(require("react"),require("react-router-dom")):e.ReactRouterBootstrap=t(e.React,e.ReactRouterDOM)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.LinkContainer=t.IndexLinkContainer=void 0;var o=r(3),a=n(o),i=r(1),u=n(i);t.IndexLinkContainer=a.default,t.LinkContainer=u.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}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 u(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)}t.__esModule=!0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=r(2),f=n(l),p=r(7),d=n(p),y=r(9),h=function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)},b=function(e){function t(){var r,n,o;a(this,t);for(var u=arguments.length,c=Array(u),s=0;s<u;s++)c[s]=arguments[s];return r=n=i(this,e.call.apply(e,[this].concat(c))),n.handleClick=function(e){var t=n.props,r=t.children,o=t.onClick;if(r.props.onClick&&r.props.onClick(e),o&&o(e),!e.defaultPrevented&&0===e.button&&!h(e)){e.preventDefault();var a=n.context.router.history,i=n.props,u=i.replace,c=i.to;u?a.replace(c):a.push(c)}},o=r,i(n,o)}return u(t,e),t.prototype.render=function(){var e=this,t=this.props,r=t.children,n=(t.replace,t.to),a=t.exact,i=t.strict,u=t.activeClassName,l=t.className,p=t.activeStyle,d=t.style,h=t.isActive,b=o(t,["children","replace","to","exact","strict","activeClassName","className","activeStyle","style","isActive"]),m=this.context.router.history.createHref("string"==typeof n?{pathname:n}:n),v=f.default.Children.only(r);return f.default.createElement(y.Route,{path:"object"===("undefined"==typeof n?"undefined":s(n))?n.pathname:n,exact:a,strict:i,children:function(t){var r=t.location,n=t.match,o=!!(h?h(n,r):n);return f.default.cloneElement(v,c({},b,{className:[l,v.props.className,o?u:null].join(" ").trim(),style:o?c({},d,p):d,href:m,onClick:e.handleClick}))}})},t}(l.Component);b.contextTypes={router:d.default.shape({history:d.default.shape({push:d.default.func.isRequired,replace:d.default.func.isRequired,createHref:d.default.func.isRequired}).isRequired}).isRequired},b.propTypes={children:d.default.element.isRequired,onClick:d.default.func,replace:d.default.bool,to:d.default.oneOfType([d.default.string,d.default.object]).isRequired,exact:d.default.bool,strict:d.default.bool,className:d.default.string,activeClassName:d.default.string,style:d.default.object,activeStyle:d.default.object,isActive:d.default.func},b.defaultProps={replace:!1,exact:!1,strict:!1,activeClassName:"active"},t.default=b,e.exports=t.default},function(t,r){t.exports=e},function(e,t,r){"use strict";function n(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)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=r(2),s=n(c),l=r(1),f=n(l),p=function(e){function t(){return o(this,t),a(this,e.apply(this,arguments))}return i(t,e),t.prototype.render=function(){return s.default.createElement(f.default,u({},this.props,{exact:!0}))},t}(s.default.Component);t.default=p,e.exports=t.default},function(e,t){"use strict";function r(e){return function(){return e}}var n=function(){};n.thatReturns=r,n.thatReturnsFalse=r(!1),n.thatReturnsTrue=r(!0),n.thatReturnsNull=r(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n,a,i,u,c){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,a,i,u,c],f=0;s=new Error(t.replace(/%s/g,function(){return l[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=n},function(e,t,r){"use strict";var n=r(4),o=r(5),a=r(8);e.exports=function(){function e(e,t,r,n,i,u){u!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return r.checkPropTypes=n,r.PropTypes=r,r}},function(e,t,r){e.exports=r(6)()},function(e,t){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},function(e,r){e.exports=t}])});
//# sourceMappingURL=ReactRouterBootstrap.min.js.map