text: (window.webpackJsonp=window.webpackJsonp||[]).push([[66],{1624:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),o=a(24),l=a.n(o),s=a(25),i=a.n(s),c=a(22),u=a.n(c),d=a(26),p=a.n(d),h=a(27),f=a.n(h),m=a(16),g=a.n(m),v=a(6),y=a.n(v),b=a(31),k=a(14),N=a(4),E=a(706),C=a.n(E),O=a(7),S=a.n(O),w=a(702),T=a(701),P=a(699),x=a(698),j=a(880),L=a(201);a(705),a(710);function M(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function A(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?M(Object(a),!0).forEach((function(t){y()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):M(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=g()(e);if(t){var r=g()(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return f()(this,a)}}S.a.locale("nl");var _=function(e){p()(a,e);var t=B(a);function a(e){var n;return l()(this,a),n=t.call(this,e),y()(u()(n),"handleInputChange",(function(e){var t=e.target,a="checkbox"===t.type?t.checked:t.value,r=t.name;n.setState(A(A({},n.state),{},{portalSettingsLayout:A(A({},n.state.portalSettingsLayout),{},y()({},r,a))}))})),y()(u()(n),"handleInputChangeDate",(function(e,t){n.setState(A(A({},n.state),{},{portalSettingsLayout:A(A({},n.state.portalSettingsLayout),{},y()({},t,e))}))})),y()(u()(n),"handleSubmit",(function(e){e.preventDefault();var t=n.state.portalSettingsLayout,a={},r=!1;C.a.isEmpty(t.description)&&(a.description=!0,r=!0),t.twinfieldPortalSettingsLayoutCode&&n.props.portalSettingsLayouts.map((function(e){e.twinfieldPortalSettingsLayoutCode==t.twinfieldPortalSettingsLayoutCode&&(r=!0,a.twinfieldPortalSettingsLayoutCode=!0)})),n.setState(A(A({},n.state),{},{errors:a})),!r&&j.a.newPortalSettingsLayout(t).then((function(e){n.props.fetchSystemData(),N.f.push("/portal-instellingen-layout/".concat(e.data.data.id))})).catch((function(e){alert("Er is iets mis gegaan met opslaan!")}))})),n.state={portalSettingsLayout:{description:""},errors:{description:!1}},n}return i()(a,[{key:"render",value:function(){var e=this.state.portalSettingsLayout.description;return r.a.createElement("form",{className:"form-horizontal",onSubmit:this.handleSubmit},r.a.createElement(x.a,null,r.a.createElement(P.a,null,r.a.createElement("div",{className:"row"},r.a.createElement(w.a,{label:"Omschrijving",name:"description",value:e,onChangeAction:this.handleInputChange,required:"required",error:this.state.errors.description}))),r.a.createElement(P.a,null,r.a.createElement("div",{className:"pull-right btn-group",role:"group"},r.a.createElement(T.a,{buttonText:"Opslaan",onClickAction:this.handleSubmit,type:"submit",value:"Submit"})))))}}]),a}(n.Component),q=Object(b.b)((function(e){return{portalSettingsLayouts:e.systemData.portalSettingsLayouts}}),(function(e){return Object(k.b)({fetchSystemData:L.a},e)}))(_),F=a(700),z=function(){return r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-md-4"},r.a.createElement("div",{className:"btn-group btn-group-flex margin-small",role:"group"},r.a.createElement(F.a,{iconName:"glyphicon-arrow-left",onClickAction:N.e.goBack}))),r.a.createElement("div",{className:"col-md-4"},r.a.createElement("h4",{className:"text-center margin-small"},"Nieuw portal instellingen layout")),r.a.createElement("div",{className:"col-md-4"}))};t.default=function(){return r.a.createElement("div",{className:"row"},r.a.createElement("div",{className:"col-md-9"},r.a.createElement("div",{className:"col-md-12 margin-10-top"},r.a.createElement(x.a,null,r.a.createElement(P.a,{className:"panel-small"},r.a.createElement(z,null)))),r.a.createElement("div",{className:"col-md-12 margin-10-top"},r.a.createElement(q,null))),r.a.createElement("div",{className:"col-md-3"}))}},698:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),l=a.n(o),s=function(e){var t=e.children,a=e.className,n=e.onMouseEnter,o=e.onMouseLeave;return r.a.createElement("div",{className:"panel panel-default ".concat(a),onMouseEnter:n,onMouseLeave:o},t)};s.defaultProps={className:"",onMouseEnter:function(){},onMouseLeave:function(){}},s.propTypes={className:l.a.string,onMouseEnter:l.a.func,onMouseLeave:l.a.func},t.a=s},699:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),l=a.n(o),s=function(e){var t=e.className,a=e.children;return r.a.createElement("div",{className:"panel-body ".concat(t)},a)};s.defaultProps={className:""},s.propTypes={className:l.a.string},t.a=s},700:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),l=a.n(o),s=function(e){var t=e.buttonClassName,a=e.iconName,n=e.onClickAction,o=e.title,l=e.disabled;return r.a.createElement("button",{type:"button",className:"btn ".concat(t),onClick:n,disabled:l,title:o},r.a.createElement("span",{className:"glyphicon ".concat(a)}))};s.defaultProps={buttonClassName:"btn-success btn-sm",title:"",disabled:!1},s.propTypes={buttonClassName:l.a.string,iconName:l.a.string.isRequired,onClickAction:l.a.func,title:l.a.string,disabled:l.a.bool},t.a=s},701:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),l=a.n(o),s=function(e){var t=e.buttonClassName,a=e.buttonText,n=e.onClickAction,o=e.type,l=e.value,s=e.loading,i=e.loadText,c=e.disabled;return s?r.a.createElement("button",{type:o,className:"btn btn-sm btn-loading ".concat(t),value:l,disabled:s},r.a.createElement("span",{className:"glyphicon glyphicon-refresh glyphicon-refresh-animate"})," ",i):r.a.createElement("button",{type:o,className:"btn btn-sm ".concat(t),onClick:n,value:l,disabled:c},a)};s.defaultProps={buttonClassName:"btn-success",type:"button",value:"",loading:!1,loadText:"Aan het laden",disabled:!1},s.propTypes={buttonClassName:l.a.string,buttonText:l.a.string.isRequired,onClickAction:l.a.func,type:l.a.string,value:l.a.string,loading:l.a.bool,loadText:l.a.string,disabled:l.a.bool},t.a=s},702:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),l=a.n(o),s=function(e){var t=e.label,a=e.type,n=e.className,o=e.size,l=e.id,s=e.placeholder,i=e.name,c=e.value,u=e.onClickAction,d=e.onChangeAction,p=e.onBlurAction,h=e.required,f=e.readOnly,m=e.maxLength,g=e.error,v=e.min,y=e.max,b=e.step,k=e.errorMessage,N=e.divSize,E=e.divClassName,C=e.autoComplete;return r.a.createElement("div",{className:"form-group ".concat(N," ").concat(E)},r.a.createElement("label",{htmlFor:l,className:"col-sm-6 ".concat(h)},t),r.a.createElement("div",{className:"".concat(o)},r.a.createElement("input",{type:a,className:"form-control input-sm ".concat(n)+(g?"has-error":""),id:l,placeholder:s,name:i,value:c||"",onClick:u,onChange:d,onBlur:p,readOnly:f,maxLength:m,min:v,max:y,autoComplete:C,step:b})),g&&r.a.createElement("div",{className:"col-sm-offset-6 col-sm-6"},r.a.createElement("span",{className:"has-error-message"}," ",k)))};s.defaultProps={divClassName:"",className:"",size:"col-sm-6",divSize:"col-sm-6",name:"",type:"text",value:"",required:"",readOnly:!1,maxLength:null,error:!1,min:"",max:"",step:"",errorMessage:"",autoComplete:"off",onBlurAction:function(){},onClickAction:function(){},onChangeAction:function(){}},s.propTypes={label:l.a.oneOfType([l.a.string,l.a.object]).isRequired,type:l.a.string,className:l.a.string,divClassName:l.a.string,size:l.a.string,divSize:l.a.string,id:l.a.string,placeholder:l.a.string,name:l.a.string.isRequired,value:l.a.oneOfType([l.a.string,l.a.number]),onClickAction:l.a.func,onChangeAction:l.a.func,onBlurAction:l.a.func,required:l.a.string,readOnly:l.a.bool,maxLength:l.a.string,error:l.a.bool,min:l.a.string,max:l.a.string,step:l.a.string,errorMessage:l.a.string,autoComplete:l.a.string},t.a=s},705:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),l=a.n(o),s=function(e){var t=e.label,a=e.className,n=e.size,o=e.id,l=e.name,s=e.value,i=e.options,c=e.onChangeAction,u=e.onBlurAction,d=e.required,p=e.error,h=e.errorMessage,f=e.optionValue,m=e.optionName,g=e.readOnly,v=e.placeholder,y=e.divClassName,b=e.emptyOption;return r.a.createElement("div",{className:"form-group ".concat(n," ").concat(y)},r.a.createElement("label",{htmlFor:o,className:"col-sm-6 ".concat(d)},t),r.a.createElement("div",{className:"col-sm-6"},r.a.createElement("select",{className:"form-control input-sm ".concat(a)+(p&&" has-error"),id:o,name:l,value:s||"",onChange:c,onBlur:u,readOnly:g},b&&r.a.createElement("option",{value:""},v),i.map((function(e){return r.a.createElement("option",{key:e[f],value:e[f]},e[m])})))),p&&r.a.createElement("div",{className:"col-sm-offset-6 col-sm-6"},r.a.createElement("span",{className:"has-error-message"}," ",h)))};s.defaultProps={divClassName:"",className:"",size:"col-sm-6",readOnly:!1,required:"",error:!1,errorMessage:"",value:"",optionValue:"id",optionName:"name",placeholder:"",emptyOption:!0},s.propTypes={label:l.a.string.isRequired,className:l.a.string,size:l.a.string,id:l.a.string,name:l.a.string.isRequired,options:l.a.array,value:l.a.oneOfType([l.a.string,l.a.number]),onChangeAction:l.a.func,onBlurAction:l.a.func,required:l.a.string,readOnly:l.a.bool,error:l.a.bool,errorMessage:l.a.string,emptyOption:l.a.bool,optionValue:l.a.string,optionName:l.a.string,placeholder:l.a.string},t.a=s},710:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),l=a.n(o),s=a(716),i=a.n(s),c=function(e){var t=e.label,a=e.size,n=e.id,o=e.name,l=e.value,s=e.onChangeAction,c=e.required,u=e.divSize,d=e.className,p=e.disabled;return r.a.createElement("div",{className:"form-group ".concat(u," ").concat(d)},r.a.createElement("div",null,r.a.createElement("label",{htmlFor:n,className:"col-sm-6 ".concat(c)},t)),r.a.createElement("div",{className:"".concat(a)},r.a.createElement(i.a,{id:n,name:o,onChange:s,defaultChecked:l,disabled:p})))};c.defaultProps={className:"",size:"col-sm-6",divSize:"col-sm-6",required:"",disabled:!1,value:""},c.propTypes={label:l.a.string.isRequired,type:l.a.string,size:l.a.string,divSize:l.a.string,id:l.a.string,name:l.a.string.isRequired,value:l.a.bool,onChangeAction:l.a.func,required:l.a.string,disabled:l.a.bool},t.a=c},712:function(e,t,a){var n;
  /*!
    Copyright (c) 2017 Jed Watson.
    Licensed under the MIT License (MIT), see
    http://jedwatson.github.io/classnames
  */!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)&&n.length){var l=r.apply(null,n);l&&e.push(l)}else if("object"===o)for(var s in n)a.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},716:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},r=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),o=a(0),l=p(o),s=p(a(712)),i=p(a(8)),c=p(a(718)),u=p(a(719)),d=a(720);function p(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.handleClick=a.handleClick.bind(a),a.handleTouchStart=a.handleTouchStart.bind(a),a.handleTouchMove=a.handleTouchMove.bind(a),a.handleTouchEnd=a.handleTouchEnd.bind(a),a.handleFocus=a.handleFocus.bind(a),a.handleBlur=a.handleBlur.bind(a),a.previouslyChecked=!(!e.checked&&!e.defaultChecked),a.state={checked:!(!e.checked&&!e.defaultChecked),hasFocus:!1},a}return function(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,e),r(t,[{key:"componentDidUpdate",value:function(e){e.checked!==this.props.checked&&this.setState({checked:!!this.props.checked})}},{key:"handleClick",value:function(e){var t=this.input;if(e.target!==t&&!this.moved)return this.previouslyChecked=t.checked,e.preventDefault(),t.focus(),void t.click();var a=this.props.hasOwnProperty("checked")?this.props.checked:t.checked;this.setState({checked:a})}},{key:"handleTouchStart",value:function(e){this.startX=(0,d.pointerCoord)(e).x,this.activated=!0}},{key:"handleTouchMove",value:function(e){if(this.activated&&(this.moved=!0,this.startX)){var t=(0,d.pointerCoord)(e).x;this.state.checked&&t+15<this.startX?(this.setState({checked:!1}),this.startX=t,this.activated=!0):t-15>this.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=t<this.startX+5)}}},{key:"handleTouchEnd",value:function(e){if(this.moved){var t=this.input;if(e.preventDefault(),this.startX){var a=(0,d.pointerCoord)(e).x;!0===this.previouslyChecked&&this.startX+4>a?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4<a&&this.previouslyChecked!==this.state.checked&&(this.setState({checked:!0}),this.previouslyChecked=this.state.checked,t.click()),this.activated=!1,this.startX=null,this.moved=!1}}}},{key:"handleFocus",value:function(e){var t=this.props.onFocus;t&&t(e),this.setState({hasFocus:!0})}},{key:"handleBlur",value:function(e){var t=this.props.onBlur;t&&t(e),this.setState({hasFocus:!1})}},{key:"getIcon",value:function(e){var a=this.props.icons;return a?void 0===a[e]?t.defaultProps.icons[e]:a[e]:null}},{key:"render",value:function(){var e=this,t=this.props,a=t.className,r=(t.icons,function(e,t){var a={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(t,["className","icons"])),o=(0,s.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},a);return l.default.createElement("div",{className:o,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},l.default.createElement("div",{className:"react-toggle-track"},l.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),l.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),l.default.createElement("div",{className:"react-toggle-thumb"}),l.default.createElement("input",n({},r,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(o.PureComponent);t.default=h,h.displayName="Toggle",h.defaultProps={icons:{checked:l.default.createElement(c.default,null),unchecked:l.default.createElement(u.default,null)}},h.propTypes={checked:i.default.bool,disabled:i.default.bool,defaultChecked:i.default.bool,onChange:i.default.func,onFocus:i.default.func,onBlur:i.default.func,className:i.default.string,name:i.default.string,value:i.default.string,id:i.default.string,"aria-labelledby":i.default.string,"aria-label":i.default.string,icons:i.default.oneOfType([i.default.bool,i.default.shape({checked:i.default.node,unchecked:i.default.node})])}},718:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=a(0),o=(n=r)&&n.__esModule?n:{default:n};t.default=function(){return o.default.createElement("svg",{width:"14",height:"11",viewBox:"0 0 14 11"},o.default.createElement("title",null,"switch-check"),o.default.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}))}},719:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=a(0),o=(n=r)&&n.__esModule?n:{default:n};t.default=function(){return o.default.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10"},o.default.createElement("title",null,"switch-x"),o.default.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"}))}},720:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pointerCoord=function(e){if(e){var t=e.changedTouches;if(t&&t.length>0){var a=t[0];return{x:a.clientX,y:a.clientY}}var n=e.pageX;if(void 0!==n)return{x:n,y:e.pageY}}return{x:0,y:0}}},880:function(e,t,a){"use strict";var n=a(11);t.a={fetchPortalSettingsLayoutDetails:function(e){var t="jory/portal-settings-layout/".concat(e);return n.a.get(t,{params:{jory:{fld:["id","description","isDefault","portalLogoFileName","portalFaviconFileName","portalBackgroundColor","portalBackgroundTextColor","loginHeaderBackgroundColor","loginHeaderBackgroundTextColor","headerIconsColor","loginFieldBackgroundColor","loginFieldBackgroundTextColor","buttonColor","buttonTextColor"]}}})},newPortalSettingsLayout:function(e){return e.jory=JSON.stringify({fld:["id"]}),n.a.post("portal-settings-layout",e)},updatePortalSettingsLayout:function(e,t){var a="".concat("portal-settings-layout","/").concat(e);return n.a.post(a,t)},deletePortalSettingsLayout:function(e){var t="".concat("portal-settings-layout","/").concat(e,"/delete");return n.a.post(t)}}}}]);