Comparing version 1.3.3 to 1.3.4
@@ -7,2 +7,2 @@ module.exports=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="",t(0)}([function(e,t,n){e.exports=n(24)},function(e,t){e.exports=require("react")},function(e,t,n){var r,o;/*! | ||
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var i in r)a.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}var a={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],o=function(){return n}.apply(t,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,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 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)}Object.defineProperty(t,"__esModule",{value:!0});var u=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}}(),s=n(1),c=r(s),f=n(2),p=r(f),d=function(e){function t(e){return a(this,t),i(this,Object.getPrototypeOf(t).call(this,e))}return l(t,e),u(t,[{key:"handleClick",value:function(e,t){t.preventDefault(),this.context.router.push(e)}},{key:"render",value:function(){var e,t=this.props,n=t.type,r=t.to,a=t.color,i=t.icon,l=t.text,u=t.disabled,s=t.block,f=t.size,d=t.className,h=t.onClick,b=t.tabIndex,y=(0,p["default"])("button","text--truncate","button--"+a,(e={},o(e,"button--block",s),o(e,"disabled",u),o(e,"button--"+f,f),o(e,""+d,d),e)),m=void 0;switch(n.toLowerCase()){case"link":m=c["default"].createElement("a",{href:r,className:y,title:l,disabled:u,onClick:this.handleClick.bind(this,r),tabIndex:b},i&&c["default"].createElement("span",{className:"icon icon-"+i}),l);break;case"button":default:m=c["default"].createElement("button",{type:n,className:y,title:l,disabled:u,onClick:h,tabIndex:b},i&&c["default"].createElement("span",{className:"icon icon-"+i}),l)}return m}}]),t}(s.Component);d.propTypes={type:s.PropTypes.string.isRequired,color:s.PropTypes.string,icon:s.PropTypes.string,text:s.PropTypes.string,disabled:s.PropTypes.bool,block:s.PropTypes.bool},d.contextTypes={router:c["default"].PropTypes.object.isRequired},t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 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)}Object.defineProperty(t,"__esModule",{value:!0});var u=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}}(),s=n(1),c=r(s),f=n(2),p=r(f),d=function(e){function t(e){return a(this,t),i(this,Object.getPrototypeOf(t).call(this,e))}return l(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.inline,n=e.fullScreen,r=e.muted,a=e.className,i=(0,p["default"])("loading",o({"loading--inline":t,"loading--fullscreen":n},""+a,a)),l=(0,p["default"])("loading__bubble",{"loading__bubble--muted":r});return c["default"].createElement("div",{className:i},c["default"].createElement("svg",{width:"32px",height:"32px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMinYMin"},c["default"].createElement("path",{d:"M78,19H22c-6.6,0-12,5.4-12,12v31c0,6.6,5.4,12,12,12h37.2c0.4,3,1.8,5.6,3.7,7.6c2.4,2.5,5.1,4.1,9.1,4 c-1.4-2.1-2-7.2-2-10.3c0-0.4,0-0.8,0-1.3h8c6.6,0,12-5.4,12-12V31C90,24.4,84.6,19,78,19z",className:l}),c["default"].createElement("circle",{cx:"30",cy:"47",r:"5",className:"loading__dot"}),c["default"].createElement("circle",{cx:"50",cy:"47",r:"5",className:"loading__dot"}),c["default"].createElement("circle",{cx:"70",cy:"47",r:"5",className:"loading__dot"})),this.props.children&&c["default"].createElement("div",{className:"loading__text"},this.props.children))}}]),t}(s.Component);t["default"]=d,t["default"]=d},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 l=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),s=r(u),c=function(e){function t(e){o(this,t);var n=a(this,Object.getPrototypeOf(t).call(this,e));return n.state={activePageNumber:n.props.activePageNumber},n}return i(t,e),l(t,[{key:"componentDidUpdate",value:function(e,t){this.props.activePageNumber!=e.activePageNumber&&this.setState({activePageNumber:this.props.activePageNumber})}},{key:"onEllipsisClick",value:function(e){e.preventDefault()}},{key:"getOnClickHandler",value:function(){return this.props.onChangePage||this.onChangePage}},{key:"onChangePage",value:function(e,t){t.preventDefault(),this.setState({activePageNumber:e}),console.log(this.state.activePageNumber)}},{key:"renderEllipsis",value:function(e){return s["default"].createElement("li",{className:"pagination__item pagination__item--disabled",key:e},s["default"].createElement("a",{href:"",onClick:this.onEllipsisClick.bind(this)},s["default"].createElement("span",{"aria-hidden":"true"},"…")))}},{key:"renderPageItems",value:function(){var e=this.props,t=e.numberOfPages,n=e.useEllipsis,r=e.showFirstLast,o=this.state.activePageNumber,a=[],i=void 0,l=void 0,u=this.props.ellipsisPages%2===0?this.props.ellipsisPages+1:this.props.ellipsisPages,c=Math.floor(u/2),f=1,p=t,d=!1,h=!1;if(n&&t>u){var b=1+c+(r?1:0),y=t-c-(r?1:0);o<=b?u+2>=t?p=t:(p=u,h=!0):o>=y?(f=t-u+1,p=t,d=!0,f-2<=1&&(d=!1,f=1)):(f=o-c,p=o+c,d=!0,h=!0,f-2<=1&&(d=!1,f=1),p+2>=t&&(h=!1,p=t))}for(d&&(r&&a.push(s["default"].createElement("li",{className:"pagination__item",key:"firstPaginationItem"},s["default"].createElement("a",{href:"","aria-label":"First",onClick:this.getOnClickHandler().bind(this,1)},"1"))),a.push(this.renderEllipsis("leftEllipsis"))),i=f;i<=p;i++)l=i==o?"pagination__item pagination__item--active":"pagination__item",a.push(s["default"].createElement("li",{className:l,key:i},s["default"].createElement("a",{href:"",onClick:this.getOnClickHandler().bind(this,i)},i)));return h&&(a.push(this.renderEllipsis("rightEllipsis")),r&&a.push(s["default"].createElement("li",{className:"pagination__item",key:"lastPaginationItem"},s["default"].createElement("a",{href:"","aria-label":"Last",onClick:this.getOnClickHandler().bind(this,t)},t)))),a}},{key:"render",value:function(){var e=this.props,t=e.numberOfPages,n=e.showPreviousNext,r=this.state.activePageNumber,o=void 0,a=void 0,i=!1,l=!1;return r>1?o=r-1:(o=1,i=!0),r<t?a=r+1:(a=t,l=!0),s["default"].createElement("nav",{className:"align--center pagination-container"},s["default"].createElement("ul",{className:"pagination pagination--sm"},n&&s["default"].createElement("li",{className:"pagination__item"+(i?" pagination__item--disabled":""),key:"previousPaginationItem"},s["default"].createElement("a",{href:"","aria-label":"Previous",onClick:this.getOnClickHandler().bind(this,o)},s["default"].createElement("span",{"aria-hidden":"true"},"‹"),s["default"].createElement("span",{className:"sr-only"},"Previous"))),this.renderPageItems(),n&&s["default"].createElement("li",{className:"pagination__item"+(l?" pagination__item--disabled":""),key:"nextPaginationItem"},s["default"].createElement("a",{href:"","aria-label":"Next",onClick:this.getOnClickHandler().bind(this,a)},s["default"].createElement("span",{"aria-hidden":"true"},"›"),s["default"].createElement("span",{className:"sr-only"},"Next")))))}}]),t}(s["default"].Component);c.proptypes={onChangePage:u.PropTypes.func.isRequired,numberOfPages:u.PropTypes.number.isRequired,activePageNumber:u.PropTypes.number.isRequired,showPreviousNext:u.PropTypes.bool,showFirstLast:u.PropTypes.bool,useEllipsis:u.PropTypes.bool,ellipsisPages:u.PropTypes.number},c.defaultProps={showPreviousNext:!0,showFirstLast:!0,useEllipsis:!0,ellipsisPages:5,activePageNumber:1},t["default"]=c},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 l=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),s=r(u),c=n(2),f=r(c),p=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),l(t,[{key:"close",value:function(){this.props.opened=!1,this.forceUpdate()}},{key:"getTypeIcon",value:function(){switch(this.props.type){case"danger":case"warning":return"warning";case"info":return"info-circle";case"success":return"check-circle";default:return"info-circle"}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.undoAction,r=e.close,o=e.dismissable,a=e.alertNumber,i=e.alertNumberTotal,l=e.type,u=e.className,c=(0,f["default"])("alert","alert--"+l,u,{"alert--dismissable":o}),p=(0,f["default"])("icon","icon-"+this.getTypeIcon());return s["default"].createElement("div",{className:c},o&&s["default"].createElement("button",{onClick:r||this.close,className:"alert__close",type:"button","aria-label":"Close"},s["default"].createElement("span",{"aria-hidden":"true"},"×"),s["default"].createElement("span",{className:"sr-only"},"Close")),s["default"].createElement("p",null,s["default"].createElement("span",{className:p}),a&&i&&i>1&&s["default"].createElement("small",null,s["default"].createElement("em",null,"Message ",a," of ",i,": ")),t,n&&"function"==typeof n&&s["default"].createElement("a",{href:"",className:"alert__link",onClick:n},s["default"].createElement("span",{className:"icon icon-undo"}),"Undo")))}}]),t}(u.Component);t["default"]=p,p.propTypes={dismissable:u.PropTypes.bool,type:u.PropTypes.string.isRequired,undoAction:u.PropTypes.func},t["default"]=p},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 l=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),s=r(u),c=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),l(t,[{key:"render",value:function(){return s["default"].createElement("div",{className:"container-fluid"},this.props.children)}}]),t}(s["default"].Component);t["default"]=c},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 l=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),s=r(u),c=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),l(t,[{key:"render",value:function(){return s["default"].createElement("div",{className:"grid"},this.props.children)}}]),t}(s["default"].Component);t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 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)}Object.defineProperty(t,"__esModule",{value:!0});var u=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}}(),s=n(1),c=r(s),f=n(2),p=r(f),d=function(e){function t(){return a(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return l(t,e),u(t,[{key:"render",value:function(){var e,t=this.props,n=t.xs,r=t.sm,a=t.md,i=t.lg,l=t.xl,u=t.xsOffset,s=t.smOffset,f=t.mdOffset,d=t.lgOffset,h=t.xlOffset,b=(0,p["default"])((e={},o(e,"grid__xs-"+n,n),o(e,"grid__sm-"+r,r),o(e,"grid__md-"+a,a),o(e,"grid__lg-"+i,i),o(e,"grid__xl-"+l,l),o(e,"grid__xs--offset-"+u,u),o(e,"grid__sm--offset-"+s,s),o(e,"grid__md--offset-"+f,f),o(e,"grid__lg--offset-"+d,d),o(e,"grid__xl--offset-"+h,h),e));return c["default"].createElement("div",{className:b},this.props.children)}}]),t}(c["default"].Component);d.propTypes={xs:s.PropTypes.string,sm:s.PropTypes.string,md:s.PropTypes.string,lg:s.PropTypes.string,xl:s.PropTypes.string,xsOffset:s.PropTypes.string,smOffset:s.PropTypes.string,mdOffset:s.PropTypes.string,lgOffset:s.PropTypes.string,xlOffset:s.PropTypes.string},t["default"]=d},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 l=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),s=r(u),c=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),l(t,[{key:"selectAll",value:function(e){if(e.target.checked){var t=this.props.options.map(function(e){return e.Key});this.props.field.onChange(t)}else this.props.field.onChange([]);return this.setState({selectAllToggled:!this.state.selectAllToggled})}},{key:"renderCheckboxOption",value:function(e){var t=this.props.field.value&&(this.props.field.value+"").indexOf(e.Key)!==-1,n=this.props,r=n.inline,o=n.disabled;return s["default"].createElement("div",{key:e.Key,className:""+(r?"checkbox checkbox--inline":"checkbox")},s["default"].createElement("label",{title:e.Value},s["default"].createElement("input",{type:"checkbox",name:"optionsCheckboxes",value:e.Key,disabled:o,checked:t,onChange:this.checkboxUpdateReduxFormValue.bind(this)}),s["default"].createElement("span",null,e.Value)))}},{key:"checkboxUpdateReduxFormValue",value:function(e){var t=this.props.field.value,n=e.target,r=n.checked,o=n.value;return Array.isArray(t)||(t=[t]),r?t.push(o):t=t.filter(function(e){return e!==o&&void 0!==e}),t=t.filter(function(e){return!!e}),this.props.field.onFocus(),this.props.field.onChange(t),this.props.field.onBlur()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,r=t.selectAll,o=t.disabled,a=[],i=void 0;return r&&(i=s["default"].createElement("div",{className:"checkbox"},s["default"].createElement("label",{title:"Select All or None"},s["default"].createElement("input",{type:"checkbox",name:"selectAll",value:"selectAll",onChange:this.selectAll.bind(this),disabled:o}),"Select ",this.state.selectAllToggled?"None":"All"))),n.forEach(function(t){a.push(e.renderCheckboxOption(t))}),s["default"].createElement("div",null,i,a)}}]),t}(u.Component);c.propTypes={type:u.PropTypes.string.isRequired,field:u.PropTypes.object.isRequired,label:u.PropTypes.string,selectAll:u.PropTypes.bool,disabled:u.PropTypes.bool,options:u.PropTypes.array.isRequired},t["default"]=c},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 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},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.option,n=e.field;return c["default"].createElement("div",{className:"checkbox"},c["default"].createElement("label",{title:t},c["default"].createElement("input",l({},this.props,n)),c["default"].createElement("span",null,t)))}}]),t}(s.Component);f.propTypes={type:s.PropTypes.string.isRequired,field:s.PropTypes.object,label:s.PropTypes.string,option:s.PropTypes.string.isRequired},t["default"]=f},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 l=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),s=r(u),c=n(17),f=r(c),p=n(18),d=r(p),h=n(15),b=r(h),y=n(14),m=r(y),v=n(11),g=r(v),_=n(10),P=r(_),O=n(16),E=r(O),w=n(13),k=r(w),j=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.type,n=e.field,r=e.label,o=e.labelClass,a=e.helpText,i=void 0,l="form-group",u="",c=void 0,p=void 0,h=this.props.className;n&&n.error&&n.touched?(l+=" has-error",u=n.error,c=u,p="small text--danger"):n&&!n.error&&n.touched?(l+=" has-success",c=a,p="small text--success"):(c=a,p="small text--muted");var y=Object.assign({},this.props,{className:h});switch(t.toLowerCase()){case"text":i=s["default"].createElement(f["default"],y);break;case"password":i=s["default"].createElement(k["default"],y);break;case"textarea":i=s["default"].createElement(d["default"],y);break;case"search":i=s["default"].createElement(b["default"],y);break;case"radio":i=s["default"].createElement(m["default"],y);break;case"checkbox":i=s["default"].createElement(g["default"],y);break;case"checkboxes":i=s["default"].createElement(P["default"],y);break;case"select":i=s["default"].createElement(E["default"],y);break;default:i=s["default"].createElement(f["default"],y)}return s["default"].createElement("div",{className:l},r&&s["default"].createElement("label",{className:o,title:r},r),i,n&&n.touched&&s["default"].createElement("span",{className:"validation-icon float-right"}),c&&s["default"].createElement("div",{className:p},c))}}]),t}(u.Component);t["default"]=j,j.propTypes={label:u.PropTypes.string,field:u.PropTypes.object,type:u.PropTypes.string.isRequired}},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 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},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){o(this,t);var n=a(this,Object.getPrototypeOf(t).call(this,e));return n.state={revealed:!1},n}return i(t,e),u(t,[{key:"toggleVisibility",value:function(){this.setState({revealed:!this.state.revealed})}},{key:"render",value:function(){var e=this.props.field,t=this.state.revealed;return c["default"].createElement("div",{className:"input-group"},c["default"].createElement("input",l({},this.props,this.props.field,{type:t?"text":"password",className:"form-control"})),""!=e.value&&c["default"].createElement("span",{className:"input-group__button"},c["default"].createElement("button",{className:"button button--"+(t?"danger":"success"),type:"button",onClick:this.toggleVisibility.bind(this),title:t?"Hide Password":"Show Password"},c["default"].createElement("small",{className:"text--uppercase"},t?"Hide":"Show"))))}}]),t}(s.Component);f.PropTypes={className:s.PropTypes.string,type:s.PropTypes.string.isRequired,label:s.PropTypes.string.isRequired},t["default"]=f},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 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},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){o(this,t);var n=a(this,Object.getPrototypeOf(t).call(this,e));return n.state={freeformSelected:!1},n}return i(t,e),u(t,[{key:"componentDidMount",value:function(){this.props.field&&!this.props.field.value&&this.props.options&&this.props.options.length>0&&this.props.field.onChange(this.props.options[0].Key.toString())}},{key:"renderRadioOptions",value:function(){var e=this,t=this.props.options,n=[];return t.forEach(function(t){n.push(e.renderRadioOption(t))}),n}},{key:"freeformLabelClick",value:function(){this.props.field.onChange(this.freeform.value),this.setState({freeformSelected:!0})}},{key:"freeformChange",value:function(e){return e.stopPropagation(),this.setState({freeformSelected:!0}),this.props.field.onFocus(),this.props.field.onChange(this.freeform.value),this.props.field.onBlur()}},{key:"renderRadioOption",value:function(e){var t=this,n=this.props,r=n.inline,o=n.field,a=o.value,i=(o.label,e.Key.toString());return c["default"].createElement("div",{className:""+(r?"radio radio--inline":"radio"),key:i},!e.Type&&c["default"].createElement("label",{title:e.Value,onClick:function(){return t.setState({freeformSelected:!1})}},c["default"].createElement("input",l({type:"radio"},this.props,this.props.field,{value:i,checked:a===i})),c["default"].createElement("span",null,e.Value)),e.Type&&"text"===e.Type.toLowerCase()&&c["default"].createElement("label",{title:e.Value,onClick:this.freeformLabelClick.bind(this)},c["default"].createElement("input",{type:"radio",value:i,checked:this.state.freeformSelected}),c["default"].createElement("input",{maxLength:"30",ref:function(e){return t.freeform=e},onClick:this.freeformChange.bind(this),onChange:this.freeformChange.bind(this),onBlur:this.freeformChange.bind(this),className:"form-control"})))}},{key:"render",value:function(){return c["default"].createElement("div",null,this.renderRadioOptions())}}]),t}(s.Component);f.propTypes={type:s.PropTypes.string.isRequired,options:s.PropTypes.array.isRequired,field:s.PropTypes.object.isRequired,label:s.PropTypes.string},t["default"]=f},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 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},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.field,n=e.disabled,r=e.submit;return c["default"].createElement("form",{onSubmit:r},c["default"].createElement("div",{className:"input-group"},c["default"].createElement("input",l({},this.props,t,{className:"form-control"})),c["default"].createElement("div",{className:"input-group__button"},c["default"].createElement("button",{className:"button button--secondary",type:"submit",disabled:n},c["default"].createElement("span",{className:"icon icon-search"})))))}}]),t}(s.Component);f.PropTypes={className:s.PropTypes.string,type:s.PropTypes.string.isRequired,label:s.PropTypes.string.isRequired,field:s.PropTypes.object},t["default"]=f},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 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},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),u(t,[{key:"renderSelectOption",value:function(e){return c["default"].createElement("option",{key:e.Key,value:e.Key},e.Value)}},{key:"render",value:function(){var e=this,t=this.props,n=t.field,r=t.options,o=[];r.forEach(function(t){o.push(e.renderSelectOption(t))});var a=n?n.value:"";return c["default"].createElement("select",l({value:a},this.props,n),o)}}]),t}(s.Component);f.propTypes={options:s.PropTypes.array.isRequired},t["default"]=f},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 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},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),u(t,[{key:"render",value:function(){this.props.field;return c["default"].createElement("input",l({},this.props,this.props.field,{className:"form-control"}))}}]),t}(s.Component);f.PropTypes={className:s.PropTypes.string,type:s.PropTypes.string.isRequired,label:s.PropTypes.string.isRequired},t["default"]=f},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 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},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),u(t,[{key:"render",value:function(){this.props.field;return c["default"].createElement("textarea",l({},this.props,this.props.field))}}]),t}(s.Component);f.PropTypes={className:s.PropTypes.string,type:s.PropTypes.string.isRequired,label:s.PropTypes.string.isRequired},t["default"]=f},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 l=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),s=r(u),c=n(21),f=r(c),p=n(20),d=r(p),h=n(22),b=r(h),y=n(5),m=r(y),v=function(e){function t(e){o(this,t);var n=a(this,Object.getPrototypeOf(t).call(this,e));return n.state={activePageNumber:1},n}return i(t,e),l(t,[{key:"componentDidUpdate",value:function(e,t){if(e.items.length>this.props.items.length&&this.getItemsStart()>=this.props.items.length){var n=this.state.activePageNumber;n>1&&this.setState({activePageNumber:n-1})}}},{key:"setActivePageNumber",value:function(e,t){t.preventDefault(),this.setState({activePageNumber:e})}},{key:"getItemsStart",value:function(){var e=this.props,t=e.itemsPerPage,n=(e.activePageNumber,this.state.activePageNumber);return Number(t)*(n-1)}},{key:"getPageItems",value:function(){var e=this.props,t=e.items,n=e.usePagination,r=e.itemsPerPage,o=t;if(n&&r){r=Number(r),o=[];var a=this.getItemsStart(),i=a+r;i>t.length&&(i=t.length);for(var l=a;l<i;l++)o.push(t[l])}return o}},{key:"render",value:function(){var e=this.props,t=e.items,n=e.itemsPerPage,r=e.usePagination,o=e.isLoading,a=e.type,i=[];if(o)i.push(s["default"].createElement(b["default"],null));else{var l=this.getPageItems(),u=Object.assign({},this.props,{items:l});switch(a){case"nav":i.push(s["default"].createElement(f["default"],u));break;case"managed":i.push(s["default"].createElement(d["default"],u));break;default:i.push(s["default"].createElement("div",null,"List type must be set"))}if(r&&t&&t.length>0&&t.length>n){var c=Math.ceil(t.length/n);i.push(s["default"].createElement(m["default"],{numberOfPages:c,activePageNumber:this.state.activePageNumber,onChangePage:this.setActivePageNumber.bind(this)}))}}return s["default"].createElement("div",null,i)}}]),t}(s["default"].Component);v.propTypes={type:u.PropTypes.oneOf(["nav","managed"]).isRequired,items:u.PropTypes.array.isRequired,itemsPerPage:u.PropTypes.number,usePagination:u.PropTypes.bool},v.defaultProps={itemsPerPage:10},t["default"]=v},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 l=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),s=r(u),c=n(3),f=(r(c),function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),l(t,[{key:"renderTable",value:function(){return s["default"].createElement("div",{className:"responsive-table"},s["default"].createElement("table",{className:"table table--sm small table--hover"},s["default"].createElement("thead",{className:"thead--default"},s["default"].createElement("tr",null,this.renderTableHeader())),s["default"].createElement("tbody",null,this.renderTableBody())))}},{key:"renderTableHeader",value:function(){var e=this.props,t=e.headers,n=e.actions,r=(e.sortable,[]);return t.forEach(function(e){r.push(s["default"].createElement("th",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:e.text},e.text)))}),n&&r.push(s["default"].createElement("th",null)),r}},{key:"renderTableBody",value:function(){var e=this,t=this.props.items,n=[];return t.forEach(function(t,r){n.push(s["default"].createElement("tr",{className:"managed-item",key:"managed-list-"+r},e.renderTableRow(t,r)))}),n}},{key:"getMappedValue",value:function(e,t,n){var r=void 0;return n.some(function(n){if(n.Key==e[t.property])return r=n.Value,!0}),r||e[t.property]}},{key:"renderTableRow",value:function(e,t){var n=this,r=this.props,o=r.headers,a=r.selectable,i=r.actions,l=r.hideActions,u=void 0,c=void 0,f=void 0,p=[];if(a&&p.push(s["default"].createElement("td",null,s["default"].createElement("input",{type:"checkbox",checked:e.selected,onChange:this.props.toggleSelectItems.bind(this,!e.selected,e)}))),o.forEach(function(t){if("date"===t.format){var r=formatDate(new Date(Date.parse(e[t.property])));u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:r},r))}else if("status"===t.format){f=e[t.property];var o;switch(f.toUpperCase()){case"INFO":o="background--success";break;case"WARNING":o="background--warning";break;case"NOTICE":o="background--info";break;case"ERROR":o="background--danger";break;default:o=""}u=s["default"].createElement("td",{className:o},s["default"].createElement("div",{className:"managed-item__cell text--truncate align--center text--capitalize",title:e[t.property]},e[t.property].toLowerCase()))}else if(t.map){var a=n.getMappedValue(e,t,t.map);u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:a},a))}else if("bool"===t.format)c=e[t.property]?"Yes":"No",u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:c},c));else if("custom"===t.format&&"function"==typeof t.customMap){var i=t.customMap(e);u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:i},i))}else u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:e[t.property]},e[t.property]));p.push(u)}),l)u=s["default"].createElement("td",null),p.push(u);else if(i){var d=[];i.forEach(function(t){if(t.hasAccess)switch(t.type){case"button":d.push(n.createButtonAction(t,e));break;default:d.push(n.createLinkAction(t,e))}}),u=s["default"].createElement("td",{className:"align--right"},d),p.push(u)}return p}},{key:"createLinkAction",value:function(e,t){var n=e.route;if(e.params){var r=void 0,o=void 0;for(var a in e.params)o=e.params[a],r=t[o],!r&&this.props[o]&&(r=this.props[o]),n=n.replace(a,r)}return s["default"].createElement("a",{href:n,onClick:this.handleClickLink.bind(this,n),className:"button button--sm button--"+e.color,title:e.text},s["default"].createElement("span",{className:"icon icon-"+e.iconClass}),s["default"].createElement("span",{className:"sr-only"},e.text))}},{key:"handleClickLink",value:function(e,t){t.preventDefault(),this.context.router.push(e)}},{key:"createButtonAction",value:function(e,t){var n=this,r=void 0,o=void 0;if("function"==typeof e.onClick)r=e.onClick;else{if("string"!=typeof e.onClick||!this.props[e.onClick]||"function"!=typeof this.props[e.onClick])throw new Error("Expected onClick to be set for button action.");r=this.props[e.onClick]}return o=function(){r.apply(n,[t])},s["default"].createElement("button",{onClick:o,className:"button button--sm button--"+e.color,title:e.text},s["default"].createElement("span",{className:"icon icon-"+e.iconClass}),s["default"].createElement("span",{className:"sr-only"},e.text))}},{key:"render",value:function(){var e=this.props.items;return s["default"].createElement("div",null,e&&e.length>0&&this.renderTable())}}]),t}(s["default"].Component));f.propTypes={type:u.PropTypes.oneOf(["managed"]).isRequired,items:u.PropTypes.array.isRequired,headers:u.PropTypes.array.isRequired,actions:u.PropTypes.array,itemsPerPage:u.PropTypes.number,usePagination:u.PropTypes.bool},f.contextTypes={router:s["default"].PropTypes.object.isRequired},t["default"]=f},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 l=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),s=r(u),c=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),l(t,[{key:"handleNavClick",value:function(e,t){t.preventDefault(),this.context.router.push(e)}},{key:"renderNavList",value:function(){var e=this,t=this.props,n=t.items,r=t.linkText,o=t.linkMap,a=[];return n.forEach(function(t){var n=/\:(\w+)/g,i=o.replace(n,function(e,n){return t[n]}),l=r.replace(n,function(e,n){return t[n]}),u=i===window.location.pathname?"list-group__item--active":"";e.props.renderItem?a.push(e.props.renderItem({item:t,link:i,text:l,activeClass:u})):a.push(e.renderDefault(l,i,u))}),a}},{key:"renderDefault",value:function(e,t,n){return s["default"].createElement("a",{className:"list-group__item "+n,href:t,key:t,onClick:this.handleNavClick.bind(this,t)},e)}},{key:"render",value:function(){return s["default"].createElement("nav",{className:"list-group"},this.renderNavList())}}]),t}(s["default"].Component);c.propTypes={type:u.PropTypes.oneOf(["nav"]).isRequired,items:u.PropTypes.array.isRequired,linkMap:u.PropTypes.string.isRequired,linkText:u.PropTypes.string.isRequired,usePagination:u.PropTypes.bool},c.contextTypes={router:s["default"].PropTypes.object.isRequired},t["default"]=c},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 l=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),s=r(u),c=n(4),f=(r(c),function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),l(t,[{key:"render",value:function(){return s["default"].createElement("div",{className:"list-group"},s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})),s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})),s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})),s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})),s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})))}}]),t}(s["default"].Component));t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 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)}Object.defineProperty(t,"__esModule",{value:!0});var u=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}}(),s=n(1),c=r(s),f=n(2),p=r(f),d=function(e){function t(e){return a(this,t),i(this,Object.getPrototypeOf(t).call(this,e))}return l(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.reverse,n=e.className,r=e.height,a=(0,p["default"])("logo",o({"logo--reverse":t},""+n,n));return c["default"].createElement("svg",{className:a,height:r,x:"0px",y:"0px",viewBox:"0 0 400 114",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},c["default"].createElement("g",null,c["default"].createElement("path",{className:"logo__mark",d:"M24.1,48.9c3.9-8.8,10.1-18.6,16.3-26h37.4c-10.9,4.9-21.3,13.8-26,24.4L68,50.5c-16.9,8.1-33.5,29.3-44,58.6 c0-27,7-55,16.3-70c-3.9,2.4-7.8,7.2-9.8,9.8H24.1z M21.5,53.7L20.8,57H13l0.7-3.3H7.8L4.6,68.4h19.5l3.3-14.7H21.5z M15.8,52.1 l-0.7,3.3h4.4l0.7-3.3H15.8z M64,6.9l-2.1,9.8c-0.2,0.8-0.8,1.3-1.6,1.3H48.5c-1,0-1.8-1-1.6-2L49,6.2c0.2-0.8,0.8-1.3,1.6-1.3 h11.9C63.5,4.9,64.1,5.9,64,6.9z"}),c["default"].createElement("path",{className:"logo__flash",d:"M104,37.5l-1.5,7H85.6l-2.3,10.9h13.8l-1.5,6.8H81.9l-3.7,17.6h-8.5l9-42.3H104z M116.6,37.5l-9,42.3H99 l9-42.3H116.6z M146.2,72c2.6,1,6.3,1.5,11.6,1.8c4.4,0,6.7-1.1,7.3-3.4v-0.5c0-1.8-2.1-3.1-6.2-3.9c-6-1.5-9-4.1-9-7.8 c0-0.7,0-1.1,0.2-1.8c1.5-6.8,7-10.4,16.6-10.4c3.6,0.2,6.7,1,9.3,2.3l-1.3,6.3c-2.6-1-5.7-1.5-9.4-1.6c-3.9,0-6.2,1-6.5,3.1v0.5 c0,1.6,1.8,3.1,5.5,4.2c6.3,1.5,9.4,4.1,9.4,8c0,0.7,0,1.1-0.2,1.8c-1.5,7-7.3,10.4-17.3,10.4c-5-0.3-8.8-1.1-11.4-2.3l1.3-6.3 L146.2,72z M182.8,79.8h-8.5l9-42.3h8.5l-2.4,11.1c2.6-1.5,5.5-2.1,8.5-2.1c5.5,0,8.3,2.6,8.3,7.8c0,1.3-0.2,2.8-0.5,4.4l-4.6,21.2 h-8.5l4.6-21.5c0.2-0.7,0.2-1.3,0.2-1.8c0-2.1-1.1-3.1-3.6-3.1c-2,0-3.9,0.3-5.9,1L182.8,79.8C182.7,80,182.8,79.8,182.8,79.8z M133.5,46.7c-9,0-14.3,4.1-16.1,12.2l-2,9.3c-0.3,1.6-0.5,3.1-0.5,4.4c0,5.2,2.8,7.8,8.3,7.8c2.9,0,5.9-0.7,8.5-2.1l-0.3,1.8h8.5 l7-33L133.5,46.7z M133,72.5c-2,0.7-3.9,1-5.7,1c-2.4,0-3.6-1-3.6-3.3c0-0.5,0-1,0.2-1.8L126,59c0.5-3.6,2.3-5.2,5.5-5.2h5.5 L133,72.5z"}),c["default"].createElement("path",{className:"logo__recruit",d:"M233,37.5h-15l-9,42.3h8.5l3.3-15.5h6.2l2.9,15.3h9l-4.1-16.8c5.7-2.4,9.1-6,10.1-10.6l0.7-3.1 c0.2-1.1,0.3-2.1,0.3-3.1C245.8,40.4,241.6,37.5,233,37.5z M236.7,51c-1,4.4-3.6,6.5-7.8,6.5h-6.5l2.8-13h6.5 c3.6,0,5.4,1.5,5.4,4.4C236.9,49.5,236.7,50.2,236.7,51z M257.7,46.4h0.2H257.7z M262.6,46.3c-9,0-14.3,4.1-16,12.2l-2.1,9.4 c-0.2,1.1-0.3,2.3-0.3,3.3c0,5.7,4.1,8.6,12.2,8.6c4.4,0,8.8-0.7,12.9-1.8l1.3-6.3c-3.3,0.8-6.8,1.1-10.4,1.1h-2.4 c-3.4,0-5-1.1-5-3.6c0-0.5,0-0.8,0.2-1.5l0.5-2.1h18.4l1.5-7.3c0.3-1.3,0.3-2.4,0.3-3.6C273.8,49.3,269.9,46.4,262.6,46.3z M265,58.8l-0.3,1.8h-9.9l0.3-1.8c0.7-3.4,2.8-5.2,6.2-5.4c2.6,0,3.9,1.1,3.9,3.6C265.2,57.3,265.2,58,265,58.8L265,58.8z M303.1,48.2c-2.4-1.1-5.9-1.8-9.9-1.8c-9,0-14.3,3.9-16.1,11.9l-2.1,9.9c-0.3,1.3-0.3,2.4-0.3,3.4c0,5.7,3.7,8.5,11.2,8.5 c4.1,0,7.7-0.5,10.7-1.8l1.3-6.3c-2.4,0.7-5.2,1.1-8.5,1.1h-2.1c-2.8,0-4.2-1.1-4.2-3.4c0-0.5,0-1,0.2-1.5l2.1-9.9 c0.7-3.3,2.8-4.9,6-4.9h2.1c3.1,0,5.9,0.3,8,1.1L303.1,48.2z M322.7,53.7l1.5-6.8h-2.6c-7,0-11.9,1-14.2,3.1l-6.5,29.8h8.5 l5.4-25.1c1.3-0.7,3.1-1,5.2-1L322.7,53.7z M336,46.7v-0.2h-8.5l-4.4,20.8c-0.3,1.5-0.3,2.6-0.3,3.7c0,5.7,3.7,8.6,11.2,8.6 l13.5-0.3l7-32.7h-8.5L340.6,73H335c-2.4,0-3.6-1-3.6-3.1c0-0.5,0-1.1,0.2-1.8L336,46.7L336,46.7z M379.7,37.5l-2,9.1h-4.6l-1.5,7 h4.6l-3.4,15.8c-0.3,1.1-0.3,2.3-0.3,3.3c0,4.7,2.9,7,8.6,7c3.1,0,5.5-0.5,7.7-1.5l1.3-6c-2,0.3-3.6,0.5-5,0.5 c-2.4,0-3.6-1-3.6-2.9c0-0.3,0-0.8,0.2-1.5l3.1-14.8h9.3l1.5-7h-9.3l2-9.3L379.7,37.5z M360.3,46.7l-7,33h8.5l7-33L360.3,46.7z M371.2,34.4l-1.8,8.5h-8.3l1.8-8.5L371.2,34.4L371.2,34.4z"})))}}]),t}(s.Component);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.validations=t.Pagination=t.Logo=t.List=t.GridItem=t.Grid=t.Container=t.Loading=t.Alert=t.Input=t.Button=void 0;var o=n(3),a=r(o),i=n(12),l=r(i),u=n(6),s=r(u),c=n(4),f=r(c),p=n(7),d=r(p),h=n(8),b=r(h),y=n(9),m=r(y),v=n(19),g=r(v),_=n(23),P=r(_),O=n(5),E=r(O),w=n(26),k=r(w);t.Button=a["default"],t.Input=l["default"],t.Alert=s["default"],t.Loading=f["default"],t.Container=d["default"],t.Grid=b["default"],t.GridItem=m["default"],t.List=g["default"],t.Logo=P["default"],t.Pagination=E["default"],t.validations=k["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.isEmail=function(e){return/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o={isEmail:r.isEmail};t["default"]=o}]); | ||
var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),u(t,[{key:"renderSelectOption",value:function(e){return c["default"].createElement("option",{key:e.Key,value:e.Key},e.Value)}},{key:"render",value:function(){var e=this,t=this.props,n=t.field,r=t.options,o=[];r.forEach(function(t){o.push(e.renderSelectOption(t))});var a=n?n.value:"";return c["default"].createElement("select",l({value:a},this.props,n),o)}}]),t}(s.Component);f.propTypes={options:s.PropTypes.array.isRequired},t["default"]=f},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 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},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),u(t,[{key:"render",value:function(){this.props.field;return c["default"].createElement("input",l({},this.props,this.props.field,{className:"form-control"}))}}]),t}(s.Component);f.PropTypes={className:s.PropTypes.string,type:s.PropTypes.string.isRequired,label:s.PropTypes.string.isRequired},t["default"]=f},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 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},u=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}}(),s=n(1),c=r(s),f=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),u(t,[{key:"render",value:function(){this.props.field;return c["default"].createElement("textarea",l({},this.props,this.props.field))}}]),t}(s.Component);f.PropTypes={className:s.PropTypes.string,type:s.PropTypes.string.isRequired,label:s.PropTypes.string.isRequired},t["default"]=f},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 l=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),s=r(u),c=n(21),f=r(c),p=n(20),d=r(p),h=n(22),b=r(h),y=n(5),m=r(y),v=function(e){function t(e){o(this,t);var n=a(this,Object.getPrototypeOf(t).call(this,e));return n.state={activePageNumber:1},n}return i(t,e),l(t,[{key:"componentDidUpdate",value:function(e,t){if(e.items.length>this.props.items.length&&this.getItemsStart()>=this.props.items.length){var n=this.state.activePageNumber;n>1&&this.setState({activePageNumber:n-1})}}},{key:"setActivePageNumber",value:function(e,t){t.preventDefault(),this.setState({activePageNumber:e})}},{key:"getItemsStart",value:function(){var e=this.props,t=e.itemsPerPage,n=(e.activePageNumber,this.state.activePageNumber);return Number(t)*(n-1)}},{key:"getPageItems",value:function(){var e=this.props,t=e.items,n=e.usePagination,r=e.itemsPerPage,o=t;if(n&&r){r=Number(r),o=[];var a=this.getItemsStart(),i=a+r;i>t.length&&(i=t.length);for(var l=a;l<i;l++)o.push(t[l])}return o}},{key:"render",value:function(){var e=this.props,t=e.items,n=e.itemsPerPage,r=e.usePagination,o=e.isLoading,a=e.type,i=[];if(o)i.push(s["default"].createElement(b["default"],null));else{var l=this.getPageItems(),u=Object.assign({},this.props,{items:l});switch(a){case"nav":i.push(s["default"].createElement(f["default"],u));break;case"managed":i.push(s["default"].createElement(d["default"],u));break;default:i.push(s["default"].createElement("div",null,"List type must be set"))}if(r&&t&&t.length>0&&t.length>n){var c=Math.ceil(t.length/n);i.push(s["default"].createElement(m["default"],{numberOfPages:c,activePageNumber:this.state.activePageNumber,onChangePage:this.setActivePageNumber.bind(this)}))}}return s["default"].createElement("div",null,i)}}]),t}(s["default"].Component);v.propTypes={type:u.PropTypes.oneOf(["nav","managed"]).isRequired,items:u.PropTypes.array.isRequired,itemsPerPage:u.PropTypes.number,usePagination:u.PropTypes.bool},v.defaultProps={itemsPerPage:10},t["default"]=v},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 l=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),s=r(u),c=n(3),f=(r(c),function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),l(t,[{key:"renderTable",value:function(){return s["default"].createElement("div",{className:"responsive-table"},s["default"].createElement("table",{className:"table table--sm small table--hover"},s["default"].createElement("thead",{className:"thead--default"},s["default"].createElement("tr",null,this.renderTableHeader())),s["default"].createElement("tbody",null,this.renderTableBody())))}},{key:"renderTableHeader",value:function(){var e=this.props,t=e.headers,n=e.actions,r=(e.sortable,[]);return t.forEach(function(e){r.push(s["default"].createElement("th",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:e.text},e.text)))}),n&&r.push(s["default"].createElement("th",null)),r}},{key:"renderTableBody",value:function(){var e=this,t=this.props.items,n=[];return t.forEach(function(t,r){n.push(s["default"].createElement("tr",{className:"managed-item",key:"managed-list-"+r},e.renderTableRow(t,r)))}),n}},{key:"getMappedValue",value:function(e,t,n){var r=void 0;return n.some(function(n){if(n.Key==e[t.property])return r=n.Value,!0}),r||e[t.property]}},{key:"renderTableRow",value:function(e,t){var n=this,r=this.props,o=r.headers,a=r.selectable,i=r.actions,l=r.hideActions,u=void 0,c=void 0,f=void 0,p=[];if(a&&p.push(s["default"].createElement("td",null,s["default"].createElement("input",{type:"checkbox",checked:e.selected,onChange:this.props.toggleSelectItems.bind(this,!e.selected,e)}))),o.forEach(function(t){if("date"===t.format){var r=new Date(Date.parse(e[t.property]));r=r.toLocaleDateString(),u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:r},r))}else if("status"===t.format){f=e[t.property];var o;switch(f.toUpperCase()){case"INFO":o="background--success";break;case"WARNING":o="background--warning";break;case"NOTICE":o="background--info";break;case"ERROR":o="background--danger";break;default:o=""}u=s["default"].createElement("td",{className:o},s["default"].createElement("div",{className:"managed-item__cell text--truncate align--center text--capitalize",title:e[t.property]},e[t.property].toLowerCase()))}else if(t.map){var a=n.getMappedValue(e,t,t.map);u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:a},a))}else if("bool"===t.format)c=e[t.property]?"Yes":"No",u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:c},c));else if("custom"===t.format&&"function"==typeof t.customMap){var i=t.customMap(e);u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:i},i))}else u=s["default"].createElement("td",null,s["default"].createElement("div",{className:"managed-item__cell text--truncate",title:e[t.property]},e[t.property]));p.push(u)}),l)u=s["default"].createElement("td",null),p.push(u);else if(i){var d=[];i.forEach(function(t){if(t.hasAccess)switch(t.type){case"button":d.push(n.createButtonAction(t,e));break;default:d.push(n.createLinkAction(t,e))}}),u=s["default"].createElement("td",{className:"align--right"},d),p.push(u)}return p}},{key:"createLinkAction",value:function(e,t){var n=e.route;if(e.params){var r=void 0,o=void 0;for(var a in e.params)o=e.params[a],r=t[o],!r&&this.props[o]&&(r=this.props[o]),n=n.replace(a,r)}return s["default"].createElement("a",{href:n,onClick:this.handleClickLink.bind(this,n),className:"button button--sm button--"+e.color,title:e.text},s["default"].createElement("span",{className:"icon icon-"+e.iconClass}),s["default"].createElement("span",{className:"sr-only"},e.text))}},{key:"handleClickLink",value:function(e,t){t.preventDefault(),this.context.router.push(e)}},{key:"createButtonAction",value:function(e,t){var n=this,r=void 0,o=void 0;if("function"==typeof e.onClick)r=e.onClick;else{if("string"!=typeof e.onClick||!this.props[e.onClick]||"function"!=typeof this.props[e.onClick])throw new Error("Expected onClick to be set for button action.");r=this.props[e.onClick]}return o=function(){r.apply(n,[t])},s["default"].createElement("button",{onClick:o,className:"button button--sm button--"+e.color,title:e.text},s["default"].createElement("span",{className:"icon icon-"+e.iconClass}),s["default"].createElement("span",{className:"sr-only"},e.text))}},{key:"render",value:function(){var e=this.props.items;return s["default"].createElement("div",null,e&&e.length>0&&this.renderTable())}}]),t}(s["default"].Component));f.propTypes={type:u.PropTypes.oneOf(["managed"]).isRequired,items:u.PropTypes.array.isRequired,headers:u.PropTypes.array.isRequired,actions:u.PropTypes.array,itemsPerPage:u.PropTypes.number,usePagination:u.PropTypes.bool},f.contextTypes={router:s["default"].PropTypes.object.isRequired},t["default"]=f},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 l=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),s=r(u),c=function(e){function t(e){return o(this,t),a(this,Object.getPrototypeOf(t).call(this,e))}return i(t,e),l(t,[{key:"handleNavClick",value:function(e,t){t.preventDefault(),this.context.router.push(e)}},{key:"renderNavList",value:function(){var e=this,t=this.props,n=t.items,r=t.linkText,o=t.linkMap,a=[];return n.forEach(function(t){var n=/\:(\w+)/g,i=o.replace(n,function(e,n){return t[n]}),l=r.replace(n,function(e,n){return t[n]}),u=i===window.location.pathname?"list-group__item--active":"";e.props.renderItem?a.push(e.props.renderItem({item:t,link:i,text:l,activeClass:u})):a.push(e.renderDefault(l,i,u))}),a}},{key:"renderDefault",value:function(e,t,n){return s["default"].createElement("a",{className:"list-group__item "+n,href:t,key:t,onClick:this.handleNavClick.bind(this,t)},e)}},{key:"render",value:function(){return s["default"].createElement("nav",{className:"list-group"},this.renderNavList())}}]),t}(s["default"].Component);c.propTypes={type:u.PropTypes.oneOf(["nav"]).isRequired,items:u.PropTypes.array.isRequired,linkMap:u.PropTypes.string.isRequired,linkText:u.PropTypes.string.isRequired,usePagination:u.PropTypes.bool},c.contextTypes={router:s["default"].PropTypes.object.isRequired},t["default"]=c},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 l=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),s=r(u),c=n(4),f=(r(c),function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),l(t,[{key:"render",value:function(){return s["default"].createElement("div",{className:"list-group"},s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})),s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})),s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})),s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})),s["default"].createElement("div",{className:"list-group__item"},s["default"].createElement("div",{className:"skeleton-text"})))}}]),t}(s["default"].Component));t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 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)}Object.defineProperty(t,"__esModule",{value:!0});var u=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}}(),s=n(1),c=r(s),f=n(2),p=r(f),d=function(e){function t(e){return a(this,t),i(this,Object.getPrototypeOf(t).call(this,e))}return l(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.reverse,n=e.className,r=e.height,a=(0,p["default"])("logo",o({"logo--reverse":t},""+n,n));return c["default"].createElement("svg",{className:a,height:r,x:"0px",y:"0px",viewBox:"0 0 400 114",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},c["default"].createElement("g",null,c["default"].createElement("path",{className:"logo__mark",d:"M24.1,48.9c3.9-8.8,10.1-18.6,16.3-26h37.4c-10.9,4.9-21.3,13.8-26,24.4L68,50.5c-16.9,8.1-33.5,29.3-44,58.6 c0-27,7-55,16.3-70c-3.9,2.4-7.8,7.2-9.8,9.8H24.1z M21.5,53.7L20.8,57H13l0.7-3.3H7.8L4.6,68.4h19.5l3.3-14.7H21.5z M15.8,52.1 l-0.7,3.3h4.4l0.7-3.3H15.8z M64,6.9l-2.1,9.8c-0.2,0.8-0.8,1.3-1.6,1.3H48.5c-1,0-1.8-1-1.6-2L49,6.2c0.2-0.8,0.8-1.3,1.6-1.3 h11.9C63.5,4.9,64.1,5.9,64,6.9z"}),c["default"].createElement("path",{className:"logo__flash",d:"M104,37.5l-1.5,7H85.6l-2.3,10.9h13.8l-1.5,6.8H81.9l-3.7,17.6h-8.5l9-42.3H104z M116.6,37.5l-9,42.3H99 l9-42.3H116.6z M146.2,72c2.6,1,6.3,1.5,11.6,1.8c4.4,0,6.7-1.1,7.3-3.4v-0.5c0-1.8-2.1-3.1-6.2-3.9c-6-1.5-9-4.1-9-7.8 c0-0.7,0-1.1,0.2-1.8c1.5-6.8,7-10.4,16.6-10.4c3.6,0.2,6.7,1,9.3,2.3l-1.3,6.3c-2.6-1-5.7-1.5-9.4-1.6c-3.9,0-6.2,1-6.5,3.1v0.5 c0,1.6,1.8,3.1,5.5,4.2c6.3,1.5,9.4,4.1,9.4,8c0,0.7,0,1.1-0.2,1.8c-1.5,7-7.3,10.4-17.3,10.4c-5-0.3-8.8-1.1-11.4-2.3l1.3-6.3 L146.2,72z M182.8,79.8h-8.5l9-42.3h8.5l-2.4,11.1c2.6-1.5,5.5-2.1,8.5-2.1c5.5,0,8.3,2.6,8.3,7.8c0,1.3-0.2,2.8-0.5,4.4l-4.6,21.2 h-8.5l4.6-21.5c0.2-0.7,0.2-1.3,0.2-1.8c0-2.1-1.1-3.1-3.6-3.1c-2,0-3.9,0.3-5.9,1L182.8,79.8C182.7,80,182.8,79.8,182.8,79.8z M133.5,46.7c-9,0-14.3,4.1-16.1,12.2l-2,9.3c-0.3,1.6-0.5,3.1-0.5,4.4c0,5.2,2.8,7.8,8.3,7.8c2.9,0,5.9-0.7,8.5-2.1l-0.3,1.8h8.5 l7-33L133.5,46.7z M133,72.5c-2,0.7-3.9,1-5.7,1c-2.4,0-3.6-1-3.6-3.3c0-0.5,0-1,0.2-1.8L126,59c0.5-3.6,2.3-5.2,5.5-5.2h5.5 L133,72.5z"}),c["default"].createElement("path",{className:"logo__recruit",d:"M233,37.5h-15l-9,42.3h8.5l3.3-15.5h6.2l2.9,15.3h9l-4.1-16.8c5.7-2.4,9.1-6,10.1-10.6l0.7-3.1 c0.2-1.1,0.3-2.1,0.3-3.1C245.8,40.4,241.6,37.5,233,37.5z M236.7,51c-1,4.4-3.6,6.5-7.8,6.5h-6.5l2.8-13h6.5 c3.6,0,5.4,1.5,5.4,4.4C236.9,49.5,236.7,50.2,236.7,51z M257.7,46.4h0.2H257.7z M262.6,46.3c-9,0-14.3,4.1-16,12.2l-2.1,9.4 c-0.2,1.1-0.3,2.3-0.3,3.3c0,5.7,4.1,8.6,12.2,8.6c4.4,0,8.8-0.7,12.9-1.8l1.3-6.3c-3.3,0.8-6.8,1.1-10.4,1.1h-2.4 c-3.4,0-5-1.1-5-3.6c0-0.5,0-0.8,0.2-1.5l0.5-2.1h18.4l1.5-7.3c0.3-1.3,0.3-2.4,0.3-3.6C273.8,49.3,269.9,46.4,262.6,46.3z M265,58.8l-0.3,1.8h-9.9l0.3-1.8c0.7-3.4,2.8-5.2,6.2-5.4c2.6,0,3.9,1.1,3.9,3.6C265.2,57.3,265.2,58,265,58.8L265,58.8z M303.1,48.2c-2.4-1.1-5.9-1.8-9.9-1.8c-9,0-14.3,3.9-16.1,11.9l-2.1,9.9c-0.3,1.3-0.3,2.4-0.3,3.4c0,5.7,3.7,8.5,11.2,8.5 c4.1,0,7.7-0.5,10.7-1.8l1.3-6.3c-2.4,0.7-5.2,1.1-8.5,1.1h-2.1c-2.8,0-4.2-1.1-4.2-3.4c0-0.5,0-1,0.2-1.5l2.1-9.9 c0.7-3.3,2.8-4.9,6-4.9h2.1c3.1,0,5.9,0.3,8,1.1L303.1,48.2z M322.7,53.7l1.5-6.8h-2.6c-7,0-11.9,1-14.2,3.1l-6.5,29.8h8.5 l5.4-25.1c1.3-0.7,3.1-1,5.2-1L322.7,53.7z M336,46.7v-0.2h-8.5l-4.4,20.8c-0.3,1.5-0.3,2.6-0.3,3.7c0,5.7,3.7,8.6,11.2,8.6 l13.5-0.3l7-32.7h-8.5L340.6,73H335c-2.4,0-3.6-1-3.6-3.1c0-0.5,0-1.1,0.2-1.8L336,46.7L336,46.7z M379.7,37.5l-2,9.1h-4.6l-1.5,7 h4.6l-3.4,15.8c-0.3,1.1-0.3,2.3-0.3,3.3c0,4.7,2.9,7,8.6,7c3.1,0,5.5-0.5,7.7-1.5l1.3-6c-2,0.3-3.6,0.5-5,0.5 c-2.4,0-3.6-1-3.6-2.9c0-0.3,0-0.8,0.2-1.5l3.1-14.8h9.3l1.5-7h-9.3l2-9.3L379.7,37.5z M360.3,46.7l-7,33h8.5l7-33L360.3,46.7z M371.2,34.4l-1.8,8.5h-8.3l1.8-8.5L371.2,34.4L371.2,34.4z"})))}}]),t}(s.Component);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.validations=t.Pagination=t.Logo=t.List=t.GridItem=t.Grid=t.Container=t.Loading=t.Alert=t.Input=t.Button=void 0;var o=n(3),a=r(o),i=n(12),l=r(i),u=n(6),s=r(u),c=n(4),f=r(c),p=n(7),d=r(p),h=n(8),b=r(h),y=n(9),m=r(y),v=n(19),g=r(v),_=n(23),P=r(_),O=n(5),E=r(O),w=n(26),k=r(w);t.Button=a["default"],t.Input=l["default"],t.Alert=s["default"],t.Loading=f["default"],t.Container=d["default"],t.Grid=b["default"],t.GridItem=m["default"],t.List=g["default"],t.Logo=P["default"],t.Pagination=E["default"],t.validations=k["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.isEmail=function(e){return/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),o={isEmail:r.isEmail};t["default"]=o}]); |
{ | ||
"name": "belay", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "Belay react and sass component library.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2821429