Free javascript Hosting


main-2008dcb8-chunk-1.js

Uploaded on Sep 21 2021 15:46 by nqobanisimonmoyo

(this.webpackJsonpflowscrm=this.webpackJsonpflowscrm||[]).push([[0],{100:function(e,n,t){},108:function(e,n,t){"use strict";t.r(n);var o=t(0),r=t.n(o),l=t(46),c=t.n(l),a=(t(99),t(100),t(9)),i=t(148),s=t(26),u=t(138),d=t(81),f=t(52),v=t(2);var j=function(e){return Object(v.jsx)("div",{children:Object(v.jsxs)("p",{children:[" ",e.text," "]})})},p=t(3),x=t.n(p),b=t(5),h=t(53);var m=function(e){var n=Object(o.useState)(null),t=Object(h.a)(n,2),r=t[0];return t[1],Object(o.useEffect)((function(){Object(b.a)(x.a.mark((function e(){return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()}),[]),Object(v.jsxs)("div",{children:[Object(v.jsx)(u.a,{children:" Pick a file from file manager"}),r&&Object(v.jsx)("p",{children:r.name})]})};var w=function(e){return Object(v.jsxs)("div",{children:[Object(v.jsx)("div",{children:"Oops Icon"}),Object(v.jsxs)("p",{children:[" ",e.message," "]}),Object(v.jsx)(u.a,{disabled:!1,type:"secondary",onClick:function(){return e.onPress()},children:"Back"})]})};var O=function(e){return Object(v.jsxs)("div",{children:[Object(v.jsx)("div",{children:"Oops Icon"}),Object(v.jsxs)("p",{children:[" ",e.message.toString()," "]}),Object(v.jsx)(u.a,{disabled:!1,type:"secondary",onClick:function(){return e.onPress()},children:"Back"})]})};var g=function(e){var n;return Object(v.jsx)("div",{children:Object(v.jsx)(u.a,{children:null===(n=e.linkProps)||void 0===n?void 0:n.text})})},y=t(145);var k=function(e){var n;return Object(v.jsx)("div",{children:Object(v.jsx)(y.a,{label:null===(n=e.inputProps)||void 0===n?void 0:n.outputKey,onChange:function(n){return e.onChangeText(n.target.value)}})})},F=t(82);var S=function(e){var n=Object(o.useState)(""),t=Object(h.a)(n,2),r=(t[0],t[1]);return Object(v.jsxs)("div",{className:"mx-2",children:[!e.directSelect&&e.list&&e.list.map((function(n,t){return Object(v.jsx)("span",{className:"mx-2",children:Object(v.jsx)(F.a,{text:n.text,label:n.text,onClick:function(){return function(n){console.log(n),r(n),e.onValueChange(n)}(n.value)},value:n.value})},t)})),e.directSelect&&e.list&&e.list.map((function(n,t){return Object(v.jsx)("span",{className:"mx-2",children:Object(v.jsx)(F.a,{text:n.text,label:n.text,onClick:function(){return function(n){console.log(n),r(n),e.onPress(n)}(n.value)},value:n.value},t)},t)}))]})},I=t(51),D=new I.a("https://TeamBP-VeraDev.azurewebsites.net"),C=new I.a("https://TeamBP-VeraDev.azurewebsites.net"),P=function(){var e=Object(b.a)(x.a.mark((function e(){var n,t;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return{appKey:"D167BC13-0848-4A8A-9823-9D8B9DACE899",secret:"xs4crm@iris"},n={loginName:"yvonne.karakas@gmail.com",password:"Welkom01!"},e.next=4,C.auth.login(n);case 4:t=e.sent,console.log(t);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=Object(f.proxy)({hasError:!1,isLoading:!1,flow:null,error:null,flowID:null,executeFlow:function(){var e=Object(b.a)(x.a.mark((function e(n,t,o,r){var l;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,console.log(t.flowID),console.log(n),"continue"!=n&&"back"!=n){e.next=9;break}return e.next=6,D.flow[n](t.flowID.toString(),o);case 6:e.t0=e.sent,e.next=12;break;case 9:return e.next=11,D.flow[n](t.instanceID,r);case 11:e.t0=e.sent;case 12:return l=e.t0,e.abrupt("return",l.data);case 16:throw e.prev=16,e.t1=e.catch(0),Error(e.t1.message);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(n,t,o,r){return e.apply(this,arguments)}}(),onFlowInit:function(){var e=Object(b.a)(x.a.mark((function e(n,t){var o;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(n),e.prev=1,E.onFlowState(!0,!1,null,null,null),e.next=5,P();case 5:return e.next=7,E.executeFlow("init",{instanceID:n},null,t);case 7:o=e.sent,E.onFlowState(!1,!1,o,null,null),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),E.onFlowState(!1,!0,null,e.t0.message,null);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(n,t){return e.apply(this,arguments)}}(),onFlowContinue:function(){var e=Object(b.a)(x.a.mark((function e(n,t){var o;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(n),console.log(t),e.prev=2,E.onFlowState(!0,!1,null,null,null),e.next=6,E.executeFlow("continue",{flowID:n},t,null);case 6:o=e.sent,E.onFlowState(!1,!1,o,null,null),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),E.onFlowState(!1,!0,null,e.t0.message,n);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(n,t){return e.apply(this,arguments)}}(),onFlowBackAction:function(){var e=Object(b.a)(x.a.mark((function e(n){var t;return x.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(n),e.prev=1,E.onFlowState(!0,!1,null,null,null),e.next=5,E.executeFlow("back",{flowID:n});case 5:t=e.sent,E.onFlowState(!1,!1,t,null,null),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),E.onFlowState(!1,!0,null,e.t0.message,n);case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(n){return e.apply(this,arguments)}}(),onFlowState:function(e,n,t,o,r){E.hasError=n,E.error=o,E.isLoading=e,E.flowID=r,E.flow=t}}),B=E;var L={appName:"UI",sections:[{name:"menu",routes:[{path:"/",name:"home",type:"menu",isExternalPath:!1,component:function(){var e,n,t,r,l=window.location.search,c=new URLSearchParams(l),a=c.get("instanceId"),p=Object.fromEntries(c);delete p.instanceId;var x=Object(f.useSnapshot)(B);Object(o.useEffect)((function(){x.onFlowInit(a,p)}),[a]);var b=function(e){console.log(e),x.onFlowBackAction(e)};return Object(v.jsxs)("div",{children:[x.isLoading&&Object(v.jsx)(i.a,{size:s.a.large}),!x.isLoading&&null===x.error&&x.flow&&!(null===(e=x.flow)||void 0===e?void 0:e.elements)&&!(null===(n=x.flow)||void 0===n?void 0:n.status.running)&&Object(v.jsx)(w,{message:"Oops! the flow seems to be empty. Please go back and try again (Flow complete)",onPress:function(){null!==x.flow.ID&&b(x.flow.ID)}}),!x.isLoading&&null!==x.error&&Object(v.jsx)(O,{message:x.error,onPress:function(){null!==x.flowID&&b(x.flowID)}}),!x.isLoading&&null===x.error&&null!==x.flow&&(null===(t=x.flow)||void 0===t?void 0:t.elements)&&Object(v.jsx)(d.a,{initialValues:function(e){var n=Object.fromEntries(null!==e&&void 0!==e?e.map((function(e){return[e.data.outputKey,""]})):[]);return delete n[void 0],delete n["/"],n||{}}(null===(r=x.flow)||void 0===r?void 0:r.elements),onSubmit:function(e){var n;x.onFlowContinue(null===x||void 0===x||null===(n=x.flow)||void 0===n?void 0:n.ID,e)},children:function(e){var n,t,o,r,l,c,a=e.values,i=e.handleSubmit;return Object(v.jsxs)("div",{children:[(null===(n=x.flow)||void 0===n?void 0:n.elements)&&(null===(t=x.flow)||void 0===t?void 0:t.elements.length)>0&&(null===(o=x.flow)||void 0===o?void 0:o.elements.map((function(e,n){var t,o,r;switch(e.type){case"display":return(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.text)?Object(v.jsx)(j,{text:null===e||void 0===e?void 0:e.data.text},n):null;case"select":return Object(v.jsx)(S,{directSelect:!0,onPress:function(n){a[e.data.outputKey]=n,i()},onValueChange:function(n){a[e.data.outputKey]=n},list:null===e||void 0===e?void 0:e.data.list},n);case"file":return Object(v.jsx)(m,{onChange:function(n){a[e.data.outputKey]=n}},n);case"input":return Object(v.jsx)("div",{children:Object(v.jsx)(k,{inputProps:e.data,onChangeText:function(n){a[e.data.outputKey]=n}})},n);case"link":return Object(v.jsx)(g,{linkProps:e.data},n);case"rich-text":return"doc"==(null===(o=e.data)||void 0===o||null===(r=o.content)||void 0===r?void 0:r.type)?e.data.content.content.map((function(e,n){var t,o;return Object(v.jsx)("div",{children:"paragraph"==e.type?null===(t=e.content)||void 0===t?void 0:t.map((function(e,n){return Object(v.jsx)("div",{children:"text"==e.type?Object(v.jsx)("strong",{children:e.text}):null},n)})):null===(o=e.content)||void 0===o?void 0:o.map((function(e,n){var t,o;return Object(v.jsx)("div",{children:"list_item"==e.type&&Object(v.jsxs)("div",{children:["-",Object(v.jsx)("p",{style:{marginLeft:10},children:null===(t=e.content[0])||void 0===t||null===(o=t.content[0])||void 0===o?void 0:o.text})]})},n)}))},n)})):null;case"list":return Object(v.jsx)("ul",{children:Object(v.jsx)("li",{children:"list element"},n)},n);default:return Object(v.jsx)("p",{children:"Element Type not found"},n)}}))),(null===(r=x.flow)||void 0===r?void 0:r.elements)&&(null===(l=x.flow)||void 0===l?void 0:l.elements.length)>0&&(null===(c=x.flow)||void 0===c?void 0:c.elements.find((function(e){return"input"==e.type||"file"==e.type||"checkbox"==e.type||"date-input"==e.type})))&&Object(v.jsx)(u.a,{disabled:!1,type:"primary",onClick:function(){return i()},label:"Next"})]})}})]})}}]}]};var N=Object(a.f)((function(e){var n=e.location;return Object(o.useEffect)((function(){var e=n.pathname,t=L.sections.map((function(n){return n.routes.find((function(n){return n.path===e}))})).shift();t&&(document.title=t.name)}),[n.pathname]),Object(v.jsx)("div",{className:"App flex flex-col min-h-screen",children:Object(v.jsx)("div",{className:"flex-grow ",children:Object(v.jsx)(a.c,{children:L.sections.map((function(e){return e.routes.map((function(e,n){return Object(v.jsx)(a.a,{exact:!0,path:e.path,children:r.a.createElement(e.component)},n)}))}))})})})})),K=function(e){e&&e instanceof Function&&t.e(3).then(t.bind(null,150)).then((function(n){var t=n.getCLS,o=n.getFID,r=n.getFCP,l=n.getLCP,c=n.getTTFB;t(e),o(e),r(e),l(e),c(e)}))},T=t(62);c.a.render(Object(v.jsx)(r.a.StrictMode,{children:Object(v.jsx)(T.a,{children:Object(v.jsx)(N,{})})}),document.getElementById("root")),K()},99:function(e,n,t){}},[[108,1,2]]]);
//# sourceMappingURL=main.2008dcb8.chunk.js.map

Back to list