@corva/dc-platform-shared 0.64.1 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CLI/components/App/App.js +1 -1
  2. package/CLI/components/App/components/AppBar/AppBar.js +1 -1
  3. package/CLI/constants/index.js +1 -1
  4. package/CLI/context/auth.js +1 -1
  5. package/CLI/hocs/effects/useProvideAuth/api.js +1 -1
  6. package/CLI/hocs/effects/useProvideAuth/constants.js +1 -1
  7. package/CLI/hocs/effects/useProvideAuth/useProvideAuth.js +1 -1
  8. package/CLI/hocs/utils.js +1 -1
  9. package/CLI/hocs/withAppDataProviderHOC.js +1 -1
  10. package/CLI/hocs/withCLIAppSettingsHOC.js +1 -1
  11. package/CLI/hocs/withCorvaMagicHOC.js +1 -1
  12. package/CLI/hocs/withDevCenterRouterHOC.js +1 -1
  13. package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.js +1 -1
  14. package/CLI/hocs/withPDFLayoutHOC.js +1 -1
  15. package/CLI/hocs/withReactRouterHOC.js +1 -1
  16. package/CLI/screens/LoginScreen/LoginScreen.js +1 -1
  17. package/CLI/screens/LoginScreen/components/Auth.js +1 -1
  18. package/CLI/screens/LoginScreen/components/AuthStep.js +1 -1
  19. package/CLI/screens/LoginScreen/components/EmailStep.js +1 -1
  20. package/CLI/screens/LoginScreen/components/SSOButton.js +1 -1
  21. package/CLI/screens/OAuthCallbackScreen/index.js +1 -1
  22. package/_virtual/{arrayWithHoles.js → toPrimitive.js} +1 -1
  23. package/_virtual/{nonIterableRest.js → toPropertyKey.js} +1 -1
  24. package/cjs/devcenter/webpack/DevServerEntryPoint.js +1 -1
  25. package/cjs/devcenter/webpack/DevServerIsolatedAppEntryPoint.js +1 -1
  26. package/cjs/devcenter/webpack/MapboxGlDevSetupEntryPoint.js +1 -1
  27. package/cjs/devcenter/webpack/constants.js +1 -1
  28. package/cjs/devcenter/webpack/createAdaptiveRoot.js +1 -0
  29. package/cjs/devcenter/webpack/plugins/checkCorvaUIVersion.js +1 -1
  30. package/cjs/devcenter/webpack/utils/middlewares.js +1 -1
  31. package/cjs/devcenter/webpack/utils/serializeDotEnv.js +1 -1
  32. package/cjs/devcenter/webpack/validators/dependencies.js +1 -1
  33. package/cjs/devcenter/webpack/validators/index.js +1 -1
  34. package/cjs/devcenter/webpack/webpack.config.common.js +1 -1
  35. package/cjs/devcenter/webpack/webpack.config.dev.js +1 -1
  36. package/cjs/devcenter/webpack/webpack.config.prod.js +1 -1
  37. package/clients/auth0/index.js +1 -1
  38. package/components/GridLockButton/index.js +1 -1
  39. package/components/Login/components/Chip.js +1 -1
  40. package/components/Login/components/EmailField.js +1 -1
  41. package/components/Login/components/Login.js +1 -1
  42. package/components/Login/components/OrDivider.js +1 -1
  43. package/components/Login/components/PasswordField.js +1 -1
  44. package/components/Login/components/StepContent.js +1 -1
  45. package/components/Login/components/StepFooter.js +1 -1
  46. package/components/Login/components/StepHeader.js +1 -1
  47. package/components/Login/components/VerificationStep.js +1 -1
  48. package/ext-cjs/@babel/runtime/helpers/defineProperty.js +1 -1
  49. package/ext-cjs/@babel/runtime/helpers/toPrimitive.js +1 -0
  50. package/ext-cjs/@babel/runtime/helpers/toPropertyKey.js +1 -0
  51. package/ext-esm/auth0-js/dist/auth0.min.esm.js +1 -1
  52. package/package.json +12 -8
  53. package/utils/devcenter.js +1 -1
  54. package/utils/recaptcha.js +1 -1
  55. package/_virtual/arrayLikeToArray.js +0 -1
  56. package/_virtual/arrayWithoutHoles.js +0 -1
  57. package/_virtual/iterableToArray.js +0 -1
  58. package/_virtual/iterableToArrayLimit.js +0 -1
  59. package/_virtual/nonIterableSpread.js +0 -1
  60. package/_virtual/regeneratorRuntime.js +0 -1
  61. package/_virtual/unsupportedIterableToArray.js +0 -1
  62. package/ext-cjs/@babel/runtime/helpers/arrayLikeToArray.js +0 -1
  63. package/ext-cjs/@babel/runtime/helpers/arrayWithHoles.js +0 -1
  64. package/ext-cjs/@babel/runtime/helpers/arrayWithoutHoles.js +0 -1
  65. package/ext-cjs/@babel/runtime/helpers/asyncToGenerator.js +0 -1
  66. package/ext-cjs/@babel/runtime/helpers/iterableToArray.js +0 -1
  67. package/ext-cjs/@babel/runtime/helpers/iterableToArrayLimit.js +0 -1
  68. package/ext-cjs/@babel/runtime/helpers/nonIterableRest.js +0 -1
  69. package/ext-cjs/@babel/runtime/helpers/nonIterableSpread.js +0 -1
  70. package/ext-cjs/@babel/runtime/helpers/regeneratorRuntime.js +0 -1
  71. package/ext-cjs/@babel/runtime/helpers/slicedToArray.js +0 -1
  72. package/ext-cjs/@babel/runtime/helpers/toConsumableArray.js +0 -1
  73. package/ext-cjs/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -1
  74. package/ext-cjs/@babel/runtime/regenerator/index.js +0 -1
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import{useReducer as o,useEffect as t}from"react";import e from"classnames";import{MuiThemeProvider as i}from"@material-ui/core";import{MuiPickersUtilsProvider as m}from"@material-ui/pickers";import n from"@date-io/moment";import a from"moment";import{isPDFReportView as p}from"@corva/ui/utils/reports";import{LOCAL_STORAGE_APP_THEME_KEY as c}from"@corva/ui/constants/localStorageKeys";import{NotificationsContainer as s}from"@corva/ui/components";import{THEMES as l}from"@corva/ui/constants/theme";import{darkTheme as u,lightTheme as f}from"@corva/ui/config/theme";import{setThemeVariables as d}from"@corva/ui/utils/themeVariables";import{LOGIN_ROUTE_REG_EXP as h}from"../../constants/index.js";import v from"./components/AppBar/AppBar.js";import{AuthContext as A}from"../../context/auth.js";import g from"../../hocs/effects/useProvideAuth/useProvideAuth.js";import j from"./App.css.js";import{jsx as b,jsxs as x,Fragment as I}from"react/jsx-runtime";function K(K){var C,D=K.children,P=K.router,R=g(P),S=!h.test(P.location.pathname)&&!R.loading,T=o((function(r){return r+1}),0),y=r(T,2)[1],B=null!==(C=localStorage.getItem(c))&&void 0!==C?C:l.DARK,N=!S||!p&&B===l.DARK;t((function(){return d(N)}),[N]);return b(A.Provider,{value:R,children:b(i,{theme:N?u:f,children:b(m,{libInstance:a,utils:n,children:x(I,{children:[!S&&D,S&&x("div",{className:j.app,children:[b(s,{}),b(v,{toggleTheme:function(){localStorage.setItem(c,N?l.LIGHT:l.DARK),y()}}),b("div",{className:e(j.appContent,p&&j.pdfAppContent,!N&&j.lightAppContent),children:D})]})]})})})})}export{K as default};
1
+ import{useReducer as o,useEffect as t}from"react";import r from"classnames";import{MuiThemeProvider as e}from"@material-ui/core";import{MuiPickersUtilsProvider as m}from"@material-ui/pickers";import i from"@date-io/moment";import a from"moment";import{isPDFReportView as n}from"@corva/ui/utils/reports";import{LOCAL_STORAGE_APP_THEME_KEY as p}from"@corva/ui/constants/localStorageKeys";import{NotificationsContainer as s}from"@corva/ui/components";import{THEMES as c}from"@corva/ui/constants/theme";import{darkTheme as l,lightTheme as f}from"@corva/ui/config/theme";import{setThemeVariables as u}from"@corva/ui/utils/themeVariables";import{LOGIN_ROUTE_REG_EXP as d}from"../../constants/index.js";import h from"./components/AppBar/AppBar.js";import{AuthContext as v}from"../../context/auth.js";import A from"../../hocs/effects/useProvideAuth/useProvideAuth.js";import g from"./App.css.js";import{jsx as j,jsxs as x,Fragment as I}from"react/jsx-runtime";function K(K){var C;let{children:D,router:P}=K;const R=A(P),S=!d.test(P.location.pathname)&&!R.loading,[,b]=o((o=>o+1),0),B=null!==(C=localStorage.getItem(p))&&void 0!==C?C:c.DARK,N=!S||!n&&B===c.DARK;t((()=>u(N)),[N]);return j(v.Provider,{value:R,children:j(e,{theme:N?l:f,children:j(m,{libInstance:a,utils:i,children:x(I,{children:[!S&&D,S&&x("div",{className:g.app,children:[j(s,{}),j(h,{toggleTheme:()=>{localStorage.setItem(p,N?c.LIGHT:c.DARK),b()}}),j("div",{className:r(g.appContent,n&&g.pdfAppContent,!N&&g.lightAppContent),children:D})]})]})})})})}export{K as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as o}from"react";import t from"prop-types";import{makeStyles as r,useTheme as a,AppBar as n,Toolbar as i,FormControlLabel as l,Checkbox as c,Tooltip as s,IconButton as m,Typography as p,Menu as d,MenuItem as u}from"@material-ui/core";import h from"@material-ui/icons/AccountCircle";import f from"@corva/ui/components/SwitchControl";import{FEATURE_FLAG_APPS_ISOLATION as g}from"@corva/ui/clients/clientStorage";import{LOCAL_STORAGE_PDF_REPORT_VIEW_KEY as v}from"@corva/ui/constants/localStorageKeys";import{isPDFReportView as b}from"@corva/ui/utils/reports";import C from"../../../../assets/DevCenterLogo.js";import{useAuth as w}from"../../../../context/auth.js";import{jsxs as B,jsx as k}from"react/jsx-runtime";var S=r((function(e){return{grow:{flexGrow:1},flex:{display:"flex"},appBar:{backgroundColor:"rgb(30, 31, 31)"},iconButtonRoot:{borderRadius:"unset"},userProfileIcon:{marginLeft:4},headerControl:{marginRight:32},formControlLabel:{fontSize:14}}}));function A(t){var r,A,L=t.toggleTheme,I=S(),N=w(),T=N.user,x=N.logout,_=a(),y=o(null),z=e(y,2),R=z[0],D=z[1],O=Boolean(R),P=function(){return D(null)},j="".concat(null==T||null===(r=T.first_name)||void 0===r?void 0:r[0]).concat(null==T||null===(A=T.last_name)||void 0===A?void 0:A[0]).toUpperCase();return B("div",{children:[k(n,{position:"static",className:I.appBar,children:B(i,{children:[k(C,{}),k("div",{className:I.grow}),k(l,{control:k(c,{checked:"false"!==localStorage.getItem(g),size:"small",onChange:function(e){localStorage.setItem(g,e.target.checked),window.location.reload()}}),label:"App Isolation",classes:{label:I.formControlLabel},className:I.headerControl}),k(l,{control:k(c,{"data-testid":"".concat("AppBar","_pdfReport"),checked:b,size:"small",onChange:function(e){localStorage.setItem(v,e.target.checked),window.location.reload()}}),label:"PDF report view",classes:{label:I.formControlLabel},className:I.headerControl}),!b&&k(s,{title:"Switch to light theme to tune your app for PDF reports",placement:"bottom",children:k("div",{children:k(f,{"data-testid":"".concat("AppBar","_themeSwitch"),className:I.headerControl,leftLabel:"Dark Theme",rightLabel:"Light Theme",onChange:L,checked:_.isLightTheme,size:"small",title:""})})}),k("div",{children:k(m,{edge:"end","aria-label":"account of current user","aria-controls":"app-bar-menu","aria-haspopup":"true",onClick:function(e){return D(e.currentTarget)},color:"inherit",className:I.iconButtonRoot,children:B("div",{className:I.flex,children:[k(p,{"data-testid":"".concat("AppBar","_userInitials"),children:j}),k(h,{className:I.userProfileIcon})]})})})]})}),k(d,{"data-testid":"".concat("AppBar","_userDropdown"),anchorEl:R,id:"app-bar-menu",keepMounted:!0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},open:O,onClose:P,children:k(u,{"data-testid":"".concat("AppBar","_signOutMenuItem"),onClick:function(){x(),P()},children:"Sign Out"})})]})}A.propTypes={toggleTheme:t.func.isRequired};export{A as default};
1
+ import{useState as e}from"react";import o from"prop-types";import{makeStyles as t,useTheme as r,AppBar as a,Toolbar as l,FormControlLabel as i,Checkbox as n,Tooltip as c,IconButton as s,Typography as p,Menu as m,MenuItem as d}from"@material-ui/core";import h from"@material-ui/icons/AccountCircle";import u from"@corva/ui/components/SwitchControl";import{FEATURE_FLAG_APPS_ISOLATION as g}from"@corva/ui/clients/clientStorage";import{LOCAL_STORAGE_PDF_REPORT_VIEW_KEY as f}from"@corva/ui/constants/localStorageKeys";import{isPDFReportView as v}from"@corva/ui/utils/reports";import C from"../../../../assets/DevCenterLogo.js";import{useAuth as b}from"../../../../context/auth.js";import{jsxs as w,jsx as B}from"react/jsx-runtime";const k=t((e=>({grow:{flexGrow:1},flex:{display:"flex"},appBar:{backgroundColor:"rgb(30, 31, 31)"},iconButtonRoot:{borderRadius:"unset"},userProfileIcon:{marginLeft:4},headerControl:{marginRight:32},formControlLabel:{fontSize:14}})));function S(o){var t,S;let{toggleTheme:L}=o;const A=k(),{user:I,logout:N}=b(),x=r(),[T,_]=e(null),z=Boolean(T),R=()=>_(null),y="".concat(null==I||null===(t=I.first_name)||void 0===t?void 0:t[0]).concat(null==I||null===(S=I.last_name)||void 0===S?void 0:S[0]).toUpperCase();return w("div",{children:[B(a,{position:"static",className:A.appBar,children:w(l,{children:[B(C,{}),B("div",{className:A.grow}),B(i,{control:B(n,{checked:"false"!==localStorage.getItem(g),size:"small",onChange:e=>{localStorage.setItem(g,e.target.checked),window.location.reload()}}),label:"App Isolation",classes:{label:A.formControlLabel},className:A.headerControl}),B(i,{control:B(n,{"data-testid":"".concat("AppBar","_pdfReport"),checked:v,size:"small",onChange:e=>{localStorage.setItem(f,e.target.checked),window.location.reload()}}),label:"PDF report view",classes:{label:A.formControlLabel},className:A.headerControl}),!v&&B(c,{title:"Switch to light theme to tune your app for PDF reports",placement:"bottom",children:B("div",{children:B(u,{"data-testid":"".concat("AppBar","_themeSwitch"),className:A.headerControl,leftLabel:"Dark Theme",rightLabel:"Light Theme",onChange:L,checked:x.isLightTheme,size:"small",title:""})})}),B("div",{children:B(s,{edge:"end","aria-label":"account of current user","aria-controls":"app-bar-menu","aria-haspopup":"true",onClick:e=>_(e.currentTarget),color:"inherit",className:A.iconButtonRoot,children:w("div",{className:A.flex,children:[B(p,{"data-testid":"".concat("AppBar","_userInitials"),children:y}),B(h,{className:A.userProfileIcon})]})})})]})}),B(m,{"data-testid":"".concat("AppBar","_userDropdown"),anchorEl:T,id:"app-bar-menu",keepMounted:!0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},open:z,onClose:R,children:B(d,{"data-testid":"".concat("AppBar","_signOutMenuItem"),onClick:()=>{N(),R()},children:"Sign Out"})})]})}S.propTypes={toggleTheme:o.func.isRequired};export{S as default};
@@ -1 +1 @@
1
- var p=new RegExp("^/login.*$"),a="https://app.corva.ai/login/help";export{p as LOGIN_ROUTE_REG_EXP,a as NEED_HELP_EXTERNAL_LINK};
1
+ const p=new RegExp("^/login.*$"),o="https://app.corva.ai/login/help";export{p as LOGIN_ROUTE_REG_EXP,o as NEED_HELP_EXTERNAL_LINK};
@@ -1 +1 @@
1
- import{createContext as r,useContext as t}from"react";var n=r(null),o=function(){return t(n)};export{n as AuthContext,o as useAuth};
1
+ import{createContext as o,useContext as r}from"react";const t=o(null),c=()=>r(t);export{t as AuthContext,c as useAuth};
@@ -1 +1 @@
1
- import{post as r}from"@corva/ui/clients/api/apiCore";var e=function(e){return r("/v1/user_token",e)},i=function(e){return r("/v1/sessions/verification/request",e)};export{e as getUserToken,i as requestVerification};
1
+ import{post as e}from"@corva/ui/clients/api/apiCore";const i=i=>e("/v1/user_token",i),o=i=>e("/v1/sessions/verification/request",i);export{i as getUserToken,o as requestVerification};
@@ -1 +1 @@
1
- var i={wrongEmailOrPassword:"Wrong user name or password",missingVerificationCode:'"Missing verification code',invalidVerificationCode:"Invalid verification code"};export{i as ERRORS};
1
+ const i={wrongEmailOrPassword:"Wrong user name or password",missingVerificationCode:'"Missing verification code',invalidVerificationCode:"Invalid verification code"};export{i as ERRORS};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/regenerator";import{useState as e,useRef as o,useEffect as i}from"react";import{get as s}from"lodash";import*as a from"@corva/ui/clients/jsonApi";import{updateUserUnits as u}from"@corva/ui/utils/convert";import c from"../../../../clients/auth0/index.js";import{LOGIN_ROUTE_REG_EXP as m}from"../../../constants/index.js";import{ERRORS as l}from"./constants.js";import{getUserToken as p}from"./api.js";var f=function(t){return fetch("/dotenv",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})};function d(d){var h=e(null),v=n(h,2),y=v[0],g=v[1],w=e(!0),x=n(w,2),C=x[0],_=x[1],b=e(null),T=n(b,2),U=T[0],j=T[1],A=o(null);function k(){return O.apply(this,arguments)}function O(){return(O=t(r.mark((function t(){var n;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return _(!0),t.next=3,a.getCurrentUser();case 3:(n=t.sent)?(g(n),u({userUnits:n.unit_system,companyUnits:s(n,"company.unit_system"),companyCustomUnitSystem:s(n,"company.custom_unit_system"),userCustomUnitSystem:s(n,"custom_unit_system"),companyCustomUnits:s(n,"company.custom_units")})):d.push("/login"),_(!1);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}A.current||(A.current=new c);var V,E,H=(V=t(r.mark((function t(){var n,e,o,i,s,a,u,c=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.length>0&&void 0!==c[0]?c[0]:"",e=c.length>1?c[1]:void 0,o=c.length>2?c[2]:void 0,j(null),_(!0),i={auth:e},n&&(i.platform=n),t.prev=7,t.next=10,p(i);case 10:s=t.sent,f({AUTH_TOKEN:s.jwt}),k().then(o),t.next=18;break;case 15:t.prev=15,t.t0=t.catch(7),null!==(a=t.t0.isInvalidVerificationCode)&&void 0!==a&&a.call(t.t0)?j(l.invalidVerificationCode):null!==(u=t.t0.isMissingVerificationCode)&&void 0!==u&&u.call(t.t0)?j(l.missingVerificationCode):j(l.wrongEmailOrPassword);case 18:_(!1);case 19:case"end":return t.stop()}}),t,null,[[7,15]])}))),function(){return V.apply(this,arguments)}),N=(E=t(r.mark((function t(){return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return f({AUTH_TOKEN:""}),t.next=3,a.logout();case 3:d.push("/login");case 4:case"end":return t.stop()}}),t)}))),function(){return E.apply(this,arguments)});return i((function(){if(m.test(d.location.pathname))return _(!1);k()}),[d.location.pathname]),{user:y,loading:C,error:U,login:H,logout:N,auth0:A.current}}export{d as default};
1
+ import{useState as t,useRef as n,useEffect as o}from"react";import{get as i}from"lodash";import*as s from"@corva/ui/clients/jsonApi";import{updateUserUnits as r}from"@corva/ui/utils/convert";import a from"../../../../clients/auth0/index.js";import{LOGIN_ROUTE_REG_EXP as e}from"../../../constants/index.js";import{ERRORS as c}from"./constants.js";import{getUserToken as m}from"./api.js";const u=t=>fetch("/dotenv",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});function l(l){const[p,d]=t(null),[f,y]=t(!0),[h,g]=t(null),v=n(null);async function C(){y(!0);const t=await s.getCurrentUser();t?(d(t),r({userUnits:t.unit_system,companyUnits:i(t,"company.unit_system"),companyCustomUnitSystem:i(t,"company.custom_unit_system"),userCustomUnitSystem:i(t,"custom_unit_system"),companyCustomUnits:i(t,"company.custom_units")})):l.push("/login"),y(!1)}v.current||(v.current=new a);return o((()=>{if(e.test(l.location.pathname))return y(!1);C()}),[l.location.pathname]),{user:p,loading:f,error:h,login:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;g(null),y(!0);const i={auth:n};t&&(i.platform=t);try{const t=await m(i);u({AUTH_TOKEN:t.jwt}),C().then(o)}catch(t){var s,r;null!==(s=t.isInvalidVerificationCode)&&void 0!==s&&s.call(t)?g(c.invalidVerificationCode):null!==(r=t.isMissingVerificationCode)&&void 0!==r&&r.call(t)?g(c.missingVerificationCode):g(c.wrongEmailOrPassword)}y(!1)},logout:async()=>{u({AUTH_TOKEN:""}),await s.logout(),l.push("/login")},auth0:v.current}}export{l as default};
package/CLI/hocs/utils.js CHANGED
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import{DEFAULT_APP_SIZE as t}from"@corva/ui/constants/apps";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function o(e){return JSON.parse(localStorage.getItem(e))||{}}function i(e,t){var r=o(e)||{};localStorage.setItem(e,JSON.stringify(n(n({},r),t)))}var c=function(e){var r,i,c,l,p=null!==(r=null==e||null===(i=e.application)||void 0===i||null===(c=i.ui)||void 0===c?void 0:c.initial_size)&&void 0!==r?r:t;return o(null==e||null===(l=e.application)||void 0===l?void 0:l.key).coordinates||n(n({},p),{},{x:0,y:0})};export{c as getAppCoordinates,o as getLocalAppData,i as updateLocalAppData};
1
+ import t from"@babel/runtime/helpers/defineProperty";import{DEFAULT_APP_SIZE as e}from"@corva/ui/constants/apps";function r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function o(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?r(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function n(t){return JSON.parse(localStorage.getItem(t))||{}}function i(t,e){const r=n(t)||{};localStorage.setItem(t,JSON.stringify(o(o({},r),e)))}const c=t=>{var r,i,c,l;const p=null!==(r=null==t||null===(i=t.application)||void 0===i||null===(c=i.ui)||void 0===c?void 0:c.initial_size)&&void 0!==r?r:e;return n(null==t||null===(l=t.application)||void 0===l?void 0:l.key).coordinates||o(o({},p),{},{x:0,y:0})};export{c as getAppCoordinates,n as getLocalAppData,i as updateLocalAppData};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{DEV_CENTER_CLI_APP_ID as r}from"@corva/ui/constants";import{getFeatureFlagAppsIsolation as o}from"@corva/ui/clients/clientStorage";import{AppsDataProvider as n,DevCenterIsolatedApp as i}from"@corva/ui/components";import{jsx as p}from"react/jsx-runtime";var a=["manifest","dashboardProps","coordinates"];function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function c(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?s(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var m=o(),f=function(e){var o=e.CLIAppComponent,s=e.CLIAppSettings,f=e.packageJson;return function(e){var u=e.manifest,b=e.dashboardProps,l=e.coordinates,d=t(e,a),O=u.application.key,g=f.version,v={app:{app_key:O,platform:"dev_center"},id:r,package:{manifest:u,build:"".concat(O,"-").concat(g),version:g},segment:u.application.segments,settings:d.settings};return p(n,{dashboardAssetId:b.assetId,apps:[v],children:p(i,c(c({},d),{},{isIsolationFeatureEnabled:m,app:v,coordinates:l,CLIAppComponent:o,CLIAppSettings:s}))})}};export{f as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{DEV_CENTER_CLI_APP_ID as r}from"@corva/ui/constants";import{getFeatureFlagAppsIsolation as o}from"@corva/ui/clients/clientStorage";import{AppsDataProvider as n,DevCenterIsolatedApp as p}from"@corva/ui/components";import{jsx as s}from"react/jsx-runtime";const i=["manifest","dashboardProps","coordinates"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function c(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?a(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}const m=o(),b=e=>{let{CLIAppComponent:o,CLIAppSettings:a,packageJson:b}=e;return e=>{let{manifest:f,dashboardProps:l,coordinates:u}=e,d=t(e,i);const O=f.application.key,{version:g}=b,y={app:{app_key:O,platform:"dev_center"},id:r,package:{manifest:f,build:"".concat(O,"-").concat(g),version:g},segment:f.application.segments,settings:d.settings};return s(n,{dashboardAssetId:l.assetId,apps:[y],children:s(p,c(c({},d),{},{isIsolationFeatureEnabled:m,app:y,coordinates:u,CLIAppComponent:o,CLIAppSettings:a}))})}};export{b as default};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as r}from"react";import{getLocalAppData as n,updateLocalAppData as o}from"./utils.js";import{useAuth as i}from"../context/auth.js";import{jsx as c}from"react/jsx-runtime";function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?s(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var a=function(s){return function(a){var f=i().user,u=a.manifest.application.key,m=r(n(u).settings||{}),b=e(m,2),O=b[0],l=b[1];return c(s,p(p({},a),{},{currentUser:f,settings:O,onSettingChange:function(e,r){var n=p(p({},O||{}),{},t({},e,r));o(u,{settings:n}),l(n)},onSettingsChange:function(t){var e=p(p({},O||{}),t);o(u,{settings:e}),l(e)}}))}};export{a as default};
1
+ import t from"@babel/runtime/helpers/defineProperty";import{useState as e}from"react";import{getLocalAppData as r,updateLocalAppData as n}from"./utils.js";import{useAuth as o}from"../context/auth.js";import{jsx as s}from"react/jsx-runtime";function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?i(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const p=t=>i=>{const{user:p}=o(),f=i.manifest.application.key,[a,u]=e(r(f).settings||{});return s(t,c(c({},i),{},{currentUser:p,settings:a,onSettingChange:(t,e)=>{const r=c(c({},a||{}),{},{[t]:e});n(f,{settings:r}),u(r)},onSettingsChange:t=>{const e=c(c({},a||{}),t);n(f,{settings:e}),u(e)}}))};export{p as default};
@@ -1 +1 @@
1
- import*as o from"@corva/ui";import{ProvidePermissions as r}from"@corva/ui/permissions";import"@corva/ui/styles/index.global.css.js";import"@corva/ui/styles/reactVirtualized.global.css.js";import"@corva/ui/styles/emojiMart.global.css.js";import"@corva/ui/styles/mapbox.global.css.js";import"@corva/ui/styles/lightbox.global.css.js";import"@corva/ui/styles/generatedThemesVariables.global.css.js";import"@corva/ui/styles/customScrollbars.global.css.js";import{initGlobalDependencies as t}from"@corva/ui/config/initGlobalDependencies";import{isPDFReportView as s}from"@corva/ui/utils/reports";import i from"./withAppDataProviderHOC.js";import a from"./withCLIAppSettingsHOC.js";import e from"./withReactRouterHOC.js";import m from"./withGridLayoutHOC/withGridLayoutHOC.js";import p from"./withPDFLayoutHOC.js";import{withDevCenterRouterHOC as c}from"./withDevCenterRouterHOC.js";import{jsx as l}from"react/jsx-runtime";window["@corva/ui"]=o,t();var n=function(o){var t=o.component,n=o.settings,u=o.manifest,f=o.packageJson;return function(){var o=a(i({CLIAppComponent:t,CLIAppSettings:n,packageJson:f})),v=s?p(o):m(o),g=e(c(v));return l(r,{children:l(g,{manifest:u,dashboardProps:{}})})}};export{n as default};
1
+ import*as o from"@corva/ui";import{ProvidePermissions as r}from"@corva/ui/permissions";import"@corva/ui/styles/index.global.css.js";import"@corva/ui/styles/reactVirtualized.global.css.js";import"@corva/ui/styles/emojiMart.global.css.js";import"@corva/ui/styles/mapbox.global.css.js";import"@corva/ui/styles/lightbox.global.css.js";import"@corva/ui/styles/generatedThemesVariables.global.css.js";import"@corva/ui/styles/customScrollbars.global.css.js";import{initGlobalDependencies as t}from"@corva/ui/config/initGlobalDependencies";import{isPDFReportView as s}from"@corva/ui/utils/reports";import i from"./withAppDataProviderHOC.js";import e from"./withCLIAppSettingsHOC.js";import a from"./withReactRouterHOC.js";import m from"./withGridLayoutHOC/withGridLayoutHOC.js";import p from"./withPDFLayoutHOC.js";import{withDevCenterRouterHOC as c}from"./withDevCenterRouterHOC.js";import{jsx as l}from"react/jsx-runtime";window["@corva/ui"]=o,t();const n=o=>{let{component:t,settings:n,manifest:u,packageJson:f}=o;return()=>{const o=e(i({CLIAppComponent:t,CLIAppSettings:n,packageJson:f})),g=s?p(o):m(o),j=a(c(g));return l(r,{children:l(j,{manifest:u,dashboardProps:{}})})}};export{n as default};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/objectWithoutProperties";import{useMemo as t}from"react";import{createDevCenterRouter as o}from"../../utils/devcenter.js";import"../../utils/recaptcha.js";import{jsx as n}from"react/jsx-runtime";var c=["router"];function i(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function p(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var u=function(r){return function(i){var u=i.router,f=e(i,c),a=t((function(){return o(u)}),[u.location]);return n(r,p(p({},f),{},{devCenterRouter:a}))}};export{u as default,u as withDevCenterRouterHOC};
1
+ import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{useMemo as t}from"react";import{createDevCenterRouter as o}from"../../utils/devcenter.js";import"../../utils/recaptcha.js";import{jsx as n}from"react/jsx-runtime";const c=["router"];function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function p(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}const s=e=>i=>{let{router:s}=i,u=r(i,c);const b=t((()=>o(s)),[s.location]);return n(e,p(p({},u),{},{devCenterRouter:b}))};export{s as default,s as withDevCenterRouterHOC};
@@ -1 +1 @@
1
- import o from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useState as r}from"react";import{WidthProvider as i,Responsive as n}from"react-grid-layout";import{pick as s,cloneDeep as p}from"lodash";import{withSize as a}from"react-sizeme";import{isPhoneDetected as m,isNativeDetected as c,isMobileDetected as l}from"@corva/ui/utils/mobileDetect";import{getAppSize as d}from"@corva/ui/utils/apps";import{GRID_BREAKPOINTS as u,GRID_COLUMN_SIZES as g,GRID_ROW_HEIGHT as f,NON_DRAGGABLE_ELEMENT_SELECTOR as b}from"@corva/ui/constants/apps";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/EmailField.js";import"../../../components/Login/components/HiddenEmailField.js";import"../../../components/Login/components/Login.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/VerificationStep.js";import{AppsGridDragHandle as h}from"../../../components/AppsGridDragHandle/AppsGridDragHandle.js";import j from"../../../components/GridLockButton/index.js";import{isAppMaximized as y}from"../../../utils/devcenter.js";import"../../../utils/recaptcha.js";import{getLocalAppData as O,getAppCoordinates as v,updateLocalAppData as L}from"../utils.js";import"./withGridLayoutHOC.global.css.js";import D from"./withGridLayoutHOC.css.js";import{jsxs as w,jsx as S}from"react/jsx-runtime";var P=["size"];function H(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),t.push.apply(t,r)}return t}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))}))}return e}var C=".".concat(h.GRID_LAYOUT_DRAG_HANDLE_CLASS),z=i(n),A=function(o){return a()((function(i){var n,a=i.size,H=t(i,P),A=a.width,G=H.manifest.application.key,R=r(null!==(n=O(G).isDraggable)&&void 0!==n&&n),E=e(R,2),k=E[0],F=E[1],M=c||l,W=y(H.devCenterRouter.location.query),_=r(v(H.manifest)),N=e(_,2),T=N[0],B=N[1],q=d({coordinates:T,dashboardWidth:A,isMaximized:W}),I=q.pixelHeight,U=q.pixelWidth,V=function(o){var t=e(o,1)[0],r=s(t,["x","y","w","h"]);B(r),L(G,{coordinates:r})},Y=r({}),J=e(Y,2),K=J[0],Q=J[1];return w("div",{children:[S(z,{breakpoints:m?u.phone:u.general,cols:g,rowHeight:f,measureBeforeMount:!0,onResizeStop:V,onDragStop:V,isDraggable:!M&&k,isResizable:!M&&k,draggableCancel:b,useCSSTransforms:!1,draggableHandle:C,onLayoutChange:function(o,e){o===e.small?Q(e):Q(x(x({},K),{},{medium:p(o),large:p(o)}))},layouts:K,children:S("div",{"data-grid":T,children:w("div",{className:W?D.appMaximized:"",children:[S(o,x(x({},H),{},{coordinates:x(x({},T),{},{pixelHeight:I,pixelWidth:U}),layoutEnvironment:{type:"general",pdfReportMode:!1}})),!M&&k&&S(h,{})]})},"with-grid-layout-hoc")}),S(j,{isDraggableAndResizable:k,onClick:function(){F(!k),L(G,{isDraggable:!k})},pageName:"DashboardPo"})]})}))};export{A as default};
1
+ import o from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/objectWithoutProperties";import{useState as t}from"react";import{WidthProvider as r,Responsive as i}from"react-grid-layout";import{pick as n,cloneDeep as s}from"lodash";import{withSize as p}from"react-sizeme";import{isPhoneDetected as a,isNativeDetected as m,isMobileDetected as c}from"@corva/ui/utils/mobileDetect";import{getAppSize as l}from"@corva/ui/utils/apps";import{GRID_BREAKPOINTS as d,GRID_COLUMN_SIZES as g,GRID_ROW_HEIGHT as u,NON_DRAGGABLE_ELEMENT_SELECTOR as f}from"@corva/ui/constants/apps";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/EmailField.js";import"../../../components/Login/components/HiddenEmailField.js";import"../../../components/Login/components/Login.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/VerificationStep.js";import{AppsGridDragHandle as b}from"../../../components/AppsGridDragHandle/AppsGridDragHandle.js";import j from"../../../components/GridLockButton/index.js";import{isAppMaximized as h}from"../../../utils/devcenter.js";import"../../../utils/recaptcha.js";import{getLocalAppData as y,getAppCoordinates as O,updateLocalAppData as L}from"../utils.js";import"./withGridLayoutHOC.global.css.js";import D from"./withGridLayoutHOC.css.js";import{jsxs as v,jsx as w}from"react/jsx-runtime";const S=["size"];function P(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),t.push.apply(t,r)}return t}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))}))}return e}const x=".".concat(b.GRID_LAYOUT_DRAG_HANDLE_CLASS),C=r(i),z=o=>p()((r=>{var i;let{size:p}=r,P=e(r,S);const z=p.width,A=P.manifest.application.key,[G,R]=t(null!==(i=y(A).isDraggable)&&void 0!==i&&i),E=m||c,k=h(P.devCenterRouter.location.query),[F,M]=t(O(P.manifest)),{pixelHeight:W,pixelWidth:_}=l({coordinates:F,dashboardWidth:z,isMaximized:k}),N=o=>{let[e]=o;const t=n(e,["x","y","w","h"]);M(t),L(A,{coordinates:t})},[B,T]=t({});return v("div",{children:[w(C,{breakpoints:a?d.phone:d.general,cols:g,rowHeight:u,measureBeforeMount:!0,onResizeStop:N,onDragStop:N,isDraggable:!E&&G,isResizable:!E&&G,draggableCancel:f,useCSSTransforms:!1,draggableHandle:x,onLayoutChange:(o,e)=>{o===e.small?T(e):T(H(H({},B),{},{medium:s(o),large:s(o)}))},layouts:B,children:w("div",{"data-grid":F,children:v("div",{className:k?D.appMaximized:"",children:[w(o,H(H({},P),{},{coordinates:H(H({},F),{},{pixelHeight:W,pixelWidth:_}),layoutEnvironment:{type:"general",pdfReportMode:!1}})),!E&&G&&w(b,{})]})},"with-grid-layout-hoc")}),w(j,{isDraggableAndResizable:G,onClick:()=>{R(!G),L(A,{isDraggable:!G})},pageName:"DashboardPo"})]})}));export{z as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import{makeStyles as r}from"@material-ui/core";import{getAppType as t,getPDFAppPixelSize as o}from"@corva/ui/utils/dashboardReports";import{getAppCoordinates as i}from"./utils.js";import{jsx as n}from"react/jsx-runtime";function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var a=r({page:{backgroundColor:"#fff",width:"21cm",height:"29.7cm",margin:"auto",overflow:"hidden",position:"relative",pageBreakAfter:"always",boxShadow:"#ccc 0px 1px 3px 0px, #ccc 0px 0px 0px 1px",paddingTop:2},pdfReportApp:{display:"inline-block",overflow:"hidden",position:"relative",zoom:"0.5",margin:"0 0.1cm",pointerEvents:"none"}}),l=function(e){return function(r){var p,l=a(),s=i(r.manifest),f=!(null===(p=r.manifest.application.ui)||void 0===p||!p.full_screen_report),d=t({coordinates:s,isFullScreenReport:f});return n("div",{className:l.page,children:n("div",{className:l.pdfReportApp,style:{width:"".concat(d.width,"cm"),height:"".concat(d.height,"cm")},children:n(e,c(c({},r),{},{coordinates:c(c({},s),o(d)),layoutEnvironment:{type:"general",pdfReportMode:!0}}))})})}};export{l as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import{makeStyles as r}from"@material-ui/core";import{getAppType as t,getPDFAppPixelSize as o}from"@corva/ui/utils/dashboardReports";import{getAppCoordinates as i}from"./utils.js";import{jsx as n}from"react/jsx-runtime";function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}const a=r({page:{backgroundColor:"#fff",width:"21cm",height:"29.7cm",margin:"auto",overflow:"hidden",position:"relative",pageBreakAfter:"always",boxShadow:"#ccc 0px 1px 3px 0px, #ccc 0px 0px 0px 1px",paddingTop:2},pdfReportApp:{display:"inline-block",overflow:"hidden",position:"relative",zoom:"0.5",margin:"0 0.1cm",pointerEvents:"none"}}),l=e=>r=>{var p;const l=a(),s=i(r.manifest),f=!(null===(p=r.manifest.application.ui)||void 0===p||!p.full_screen_report),d=t({coordinates:s,isFullScreenReport:f});return n("div",{className:l.page,children:n("div",{className:l.pdfReportApp,style:{width:"".concat(d.width,"cm"),height:"".concat(d.height,"cm")},children:n(e,c(c({},r),{},{coordinates:c(c({},s),o(d)),layoutEnvironment:{type:"general",pdfReportMode:!0}}))})})};export{l as default};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import{useMemo as e}from"react";import{BrowserRouter as t,useHistory as o,useLocation as n,Switch as c,Redirect as p,Route as a}from"react-router-dom";import{LoadingIndicator as i}from"@corva/ui/components";import u from"../screens/LoginScreen/LoginScreen.js";import m from"../screens/OAuthCallbackScreen/index.js";import{useAuth as f}from"../context/auth.js";import s from"../components/App/App.js";import{jsx as l,jsxs as h}from"react/jsx-runtime";function b(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function O(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}function d(r){var e=r.WrappedComponent,t=r.componentProps,o=r.router,n=r.location;return f().loading?l(i,{fullscreen:!0}):l(e,O({location:n,router:o},t))}function j(r){var t=r.WrappedComponent,i=r.componentProps,f=o(),b=n(),j=e((function(){return function(r,e){var t,o,n,c=function(r){if("string"==typeof r)return r;var e=r.pathname,t=r.query;return{pathname:e,search:t?"?".concat(new URLSearchParams(t).toString()):""}};return{push:function(e){return r.push(c(e))},replace:function(e){return r.replace(c(e))},location:O(O({},e),{},{query:(t=e.search,o=new URLSearchParams(t),n={},o.forEach((function(r,e){n[e]=r})),n)})}}(f,b)}),[f,b]);return l(s,{router:j,children:h(c,{children:[l(p,{exact:!0,from:"/",to:"/app"}),l(a,{path:"/login/oauth-callback",children:l(m,{router:j})}),l(a,{path:"/login",children:l(u,{router:j,location:j.location})}),l(a,{path:"/app",children:l(d,{WrappedComponent:t,componentProps:i,router:j,location:j.location})})]})})}var y=function(r){return function(e){return l(t,{children:l(j,{WrappedComponent:r,componentProps:e})})}};export{y as default};
1
+ import r from"@babel/runtime/helpers/defineProperty";import{useMemo as e}from"react";import{BrowserRouter as t,useHistory as o,useLocation as n,Switch as c,Redirect as p,Route as a}from"react-router-dom";import{LoadingIndicator as i}from"@corva/ui/components";import s from"../screens/LoginScreen/LoginScreen.js";import u from"../screens/OAuthCallbackScreen/index.js";import{useAuth as m}from"../context/auth.js";import l from"../components/App/App.js";import{jsx as f,jsxs as h}from"react/jsx-runtime";function b(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function O(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}function d(r){const e=new URLSearchParams(r),t={};return e.forEach(((r,e)=>{t[e]=r})),t}function j(r){let{WrappedComponent:e,componentProps:t,router:o,location:n}=r;const{loading:c}=m();return c?f(i,{fullscreen:!0}):f(e,O({location:n,router:o},t))}function y(r){let{WrappedComponent:t,componentProps:i}=r;const m=o(),b=n(),y=e((()=>function(r,e){const t=r=>{if("string"==typeof r)return r;const{pathname:e,query:t}=r;return{pathname:e,search:t?"?".concat(new URLSearchParams(t).toString()):""}};return{push:e=>r.push(t(e)),replace:e=>r.replace(t(e)),location:O(O({},e),{},{query:d(e.search)})}}(m,b)),[m,b]);return f(l,{router:y,children:h(c,{children:[f(p,{exact:!0,from:"/",to:"/app"}),f(a,{path:"/login/oauth-callback",children:f(u,{router:y})}),f(a,{path:"/login",children:f(s,{router:y,location:y.location})}),f(a,{path:"/app",children:f(j,{WrappedComponent:t,componentProps:i,router:y,location:y.location})})]})})}const P=r=>e=>f(t,{children:f(y,{WrappedComponent:r,componentProps:e})});export{P as default};
@@ -1 +1 @@
1
- import o from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import{useEffect as t}from"react";import{getCurrentUser as e}from"@corva/ui/clients/jsonApi";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/EmailField.js";import"../../../components/Login/components/HiddenEmailField.js";import r from"../../../components/Login/components/Login.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/VerificationStep.js";import i from"./components/Auth.js";import p from"./components/IconLogo.js";import s from"./LoginScreen.css.js";import{jsx as m}from"react/jsx-runtime";function c(c){var a=c.router,l=c.location;return t((function(){function t(){return(t=o(n.mark((function o(){var t;return n.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=null,o.prev=1,o.next=4,e();case 4:t=o.sent,o.next=10;break;case 7:o.prev=7,o.t0=o.catch(1),console.error(o.t0);case 10:t&&a.replace("/");case 11:case"end":return o.stop()}}),o,null,[[1,7]])})))).apply(this,arguments)}!function(){t.apply(this,arguments)}()}),[]),m("div",{className:s.loginScreen,children:m(r,{location:l,logoIcon:m(p,{}),promoLink:"https://youtu.be/-q6LkceqpGs",children:m(i,{router:a})})})}export{c as default};
1
+ import{useEffect as o}from"react";import{getCurrentUser as n}from"@corva/ui/clients/jsonApi";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/EmailField.js";import"../../../components/Login/components/HiddenEmailField.js";import t from"../../../components/Login/components/Login.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/VerificationStep.js";import e from"./components/Auth.js";import i from"./components/IconLogo.js";import m from"./LoginScreen.css.js";import{jsx as p}from"react/jsx-runtime";function s(s){let{router:r,location:c}=s;return o((()=>{!async function(){let o=null;try{o=await n()}catch(o){console.error(o)}o&&r.replace("/")}()}),[]),p("div",{className:m.loginScreen,children:p(t,{location:c,logoIcon:p(i,{}),promoLink:"https://youtu.be/-q6LkceqpGs",children:p(e,{router:r})})})}export{s as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import{useState as t}from"react";import r from"./EmailStep.js";import i from"./AuthStep.js";import{jsx as n}from"react/jsx-runtime";function s(s){var m=s.router,o=t({email:null,schemas:{},step:0}),a=e(o,2),u=a[0],c=a[1];return 0===u.step?n(r,{onNext:function(e,t){return c((function(r){return{step:r.step+1,email:e,schemas:t}}))}}):n(i,{email:u.email,schemas:u.schemas.schemas,identityVerification:u.schemas.identity_verification,onBack:function(){return c((function(e){return{step:e.step-1,email:null,schemas:null}}))},onFinishLogin:function(){return m.push("/")}})}export{s as default};
1
+ import{useState as e}from"react";import t from"./EmailStep.js";import s from"./AuthStep.js";import{jsx as i}from"react/jsx-runtime";function m(m){let{router:a}=m;const[o,r]=e({email:null,schemas:{},step:0});return 0===o.step?i(t,{onNext:(e,t)=>r((s=>({step:s.step+1,email:e,schemas:t})))}):i(s,{email:o.email,schemas:o.schemas.schemas,identityVerification:o.schemas.identity_verification,onBack:()=>r((e=>({step:e.step-1,email:null,schemas:null}))),onFinishLogin:()=>a.push("/")})}export{m as default};
@@ -1 +1 @@
1
- import o from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/regenerator";import{memo as e,useState as t,useRef as i,useEffect as a}from"react";import{styled as c,Grid as m,Button as s}from"@material-ui/core";import{showErrorNotification as p}from"@corva/ui/utils";import{isSSOPlatformSupported as l}from"@corva/ui/clients/sso";import{initializeRecaptcha as d,GOOGLE_RECAPTCHA_KEY as u}from"../../../../utils/recaptcha.js";import f from"../../../../components/Login/components/Chip.js";import"../../../../components/Login/components/EmailField.js";import g from"../../../../components/Login/components/HiddenEmailField.js";import"../../../../components/Login/components/Login.js";import h from"../../../../components/Login/components/OrDivider.js";import v from"../../../../components/Login/components/PasswordField.js";import w from"../../../../components/Login/components/Step.js";import b from"../../../../components/Login/components/StepContent.js";import j from"../../../../components/Login/components/StepFooter.js";import L from"../../../../components/Login/components/StepHeader.js";import{VerificationStep as y}from"../../../../components/Login/components/VerificationStep.js";import{useAuth as S}from"../../../context/auth.js";import{NEED_HELP_EXTERNAL_LINK as k}from"../../../constants/index.js";import{ERRORS as C}from"../../../hocs/effects/useProvideAuth/constants.js";import{requestVerification as x}from"../../../hocs/effects/useProvideAuth/api.js";import B from"./SSOButton.js";import{jsx as P,jsxs as _}from"react/jsx-runtime";var F=c(m)((function(o){var n=o.theme;return{marginTop:2*n.spacing(1),marginBottom:2*n.spacing(1),"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0}}})),V=c(s)((function(o){var n=o.theme;return{width:71,padding:n.spacing(),whiteSpace:"nowrap",backgroundColor:n.status.loginButton,"&:hover":{backgroundColor:"".concat(n.status.loginButtonHovered)}}}));var T=e((function(e){var c=e.email,s=e.schemas,T=e.onBack,A=e.onFinishLogin,E=e.identityVerification,H=S(),I=t(""),O=n(I,2),z=O[0],D=O[1],q=t(!1),G=n(q,2),M=G[0],J=G[1],K=t({code:null,mode:null}),N=n(K,2),Q=N[0],R=N[1],U=i(null),W=M&&H.error===C.wrongEmailOrPassword?H.error:null;a((function(){d()}),[]);var X,Y=function(o){if(!o)return p("Problem with initializing recaptcha");U.current=o;var n={email:c,password:z,recaptcha_token:o};Q.code&&(n.verification_code=Q.code,n.verification_mode=Q.mode),H.login(null,n,A).then((function(){return J(!0)}))},Z=(X=o(r.mark((function o(n){var e;return r.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(n.preventDefault(),window.grecaptcha){o.next=3;break}return o.abrupt("return",Y());case 3:return e=!1,window.grecaptcha.enterprise.ready((function(){e=!0;try{window.grecaptcha.enterprise.execute(u,{action:"login"}).then(Y).catch(console.error)}catch(o){console.error(o),p(o.message)}})),o.abrupt("return",setTimeout((function(){e||Y()}),1e3));case 6:case"end":return o.stop()}}),o)}))),function(o){return X.apply(this,arguments)});a((function(){if(Q.code){var o={email:c,password:z,recaptcha_token:U.current};Q.code&&(o.verification_code=Q.code,o.verification_mode=Q.mode),H.login(null,o,A)}}),[Q.code]);var $=s.find((function(o){return"password"===o.provider})),oo=s.filter((function(o){var n;return"password"!==o.provider&&l(null==o||null===(n=o.platform)||void 0===n?void 0:n.identifier)}));return M&&null!=E&&E.enabled&&!W?P(y,{email:c,identityVerification:E,loginVerificationFailure:H.error===C.invalidVerificationCode,onCodeProvided:R,password:z,requestVerification:x}):_(w,{children:[P(L,{children:"Sign In"}),P(b,{children:_(m,{container:!0,direction:"column",children:[P(f,{"data-not-migrated-MuiChip":!0,label:c,onClick:T}),oo.map((function(o){return P(F,{item:!0,children:P(B,{title:o.title,provider:o.provider,connection:o.connection,platform:o.platform})},o.title)})),$&&oo.length>0&&P(m,{item:!0,children:P(h,{})}),$&&P(F,{item:!0,children:_("form",{id:"sign-in-form",onSubmit:Z,children:[P(g,{email:c}),P(v,{value:z,onChange:function(o){D(o.target.value),J(!1)},disabled:H.loading,error:W})]})})]})}),P(j,{needHelpExternalLink:k,children:$&&P(V,{"data-testid":"".concat("AuthorizationPo","_signInButton"),form:"sign-in-form",type:"submit",variant:"contained",color:"primary",disabled:!z||H.loading||!!W,onClick:Z,children:"Sign In"})})]})}));export{T as default};
1
+ import{memo as o,useState as n,useRef as e,useEffect as i}from"react";import{styled as t,Grid as r,Button as c}from"@material-ui/core";import{showErrorNotification as a}from"@corva/ui/utils";import{isSSOPlatformSupported as m}from"@corva/ui/clients/sso";import{initializeRecaptcha as s,GOOGLE_RECAPTCHA_KEY as p}from"../../../../utils/recaptcha.js";import l from"../../../../components/Login/components/Chip.js";import"../../../../components/Login/components/EmailField.js";import d from"../../../../components/Login/components/HiddenEmailField.js";import"../../../../components/Login/components/Login.js";import f from"../../../../components/Login/components/OrDivider.js";import u from"../../../../components/Login/components/PasswordField.js";import g from"../../../../components/Login/components/Step.js";import h from"../../../../components/Login/components/StepContent.js";import v from"../../../../components/Login/components/StepFooter.js";import j from"../../../../components/Login/components/StepHeader.js";import{VerificationStep as w}from"../../../../components/Login/components/VerificationStep.js";import{useAuth as L}from"../../../context/auth.js";import{NEED_HELP_EXTERNAL_LINK as S}from"../../../constants/index.js";import{ERRORS as C}from"../../../hocs/effects/useProvideAuth/constants.js";import{requestVerification as b}from"../../../hocs/effects/useProvideAuth/api.js";import y from"./SSOButton.js";import{jsx as k,jsxs as B}from"react/jsx-runtime";const P=t(r)((o=>{let{theme:n}=o;return{marginTop:2*n.spacing(1),marginBottom:2*n.spacing(1),"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0}}})),_=t(c)((o=>{let{theme:n}=o;return{width:71,padding:n.spacing(),whiteSpace:"nowrap",backgroundColor:n.status.loginButton,"&:hover":{backgroundColor:"".concat(n.status.loginButtonHovered)}}}));var x=o((function(o){let{email:t,schemas:c,onBack:x,onFinishLogin:F,identityVerification:V}=o;const E=L(),[H,A]=n(""),[I,O]=n(!1),[T,z]=n({code:null,mode:null}),D=e(null),q=I&&E.error===C.wrongEmailOrPassword?E.error:null;i((()=>{s()}),[]);const M=o=>{if(!o)return a("Problem with initializing recaptcha");D.current=o;const n={email:t,password:H,recaptcha_token:o};T.code&&(n.verification_code=T.code,n.verification_mode=T.mode),E.login(null,n,F).then((()=>O(!0)))},G=async o=>{if(o.preventDefault(),!window.grecaptcha)return M();let n=!1;return window.grecaptcha.enterprise.ready((()=>{n=!0;try{window.grecaptcha.enterprise.execute(p,{action:"login"}).then(M).catch(console.error)}catch(o){console.error(o),a(o.message)}})),setTimeout((()=>{n||M()}),1e3)};i((()=>{if(!T.code)return;const o={email:t,password:H,recaptcha_token:D.current};T.code&&(o.verification_code=T.code,o.verification_mode=T.mode),E.login(null,o,F)}),[T.code]);const J=c.find((o=>"password"===o.provider)),K=c.filter((o=>{var n;return"password"!==o.provider&&m(null==o||null===(n=o.platform)||void 0===n?void 0:n.identifier)}));return I&&null!=V&&V.enabled&&!q?k(w,{email:t,identityVerification:V,loginVerificationFailure:E.error===C.invalidVerificationCode,onCodeProvided:z,password:H,requestVerification:b}):B(g,{children:[k(j,{children:"Sign In"}),k(h,{children:B(r,{container:!0,direction:"column",children:[k(l,{"data-not-migrated-MuiChip":!0,label:t,onClick:x}),K.map((o=>k(P,{item:!0,children:k(y,{title:o.title,provider:o.provider,connection:o.connection,platform:o.platform})},o.title))),J&&K.length>0&&k(r,{item:!0,children:k(f,{})}),J&&k(P,{item:!0,children:B("form",{id:"sign-in-form",onSubmit:G,children:[k(d,{email:t}),k(u,{value:H,onChange:o=>{A(o.target.value),O(!1)},disabled:E.loading,error:q})]})})]})}),k(v,{needHelpExternalLink:S,children:J&&k(_,{"data-testid":"".concat("AuthorizationPo","_signInButton"),form:"sign-in-form",type:"submit",variant:"contained",color:"primary",disabled:!H||E.loading||!!q,onClick:G,children:"Sign In"})})]})}));export{x as default};
@@ -1 +1 @@
1
- import o from"@babel/runtime/helpers/slicedToArray";import{memo as n,useState as t}from"react";import{styled as e}from"@material-ui/core/styles";import i from"@material-ui/core/Button";import{getUserAuthSchemas as r}from"@corva/ui/clients/jsonApi";import"../../../../components/Login/components/Chip.js";import m from"../../../../components/Login/components/EmailField.js";import"../../../../components/Login/components/HiddenEmailField.js";import"../../../../components/Login/components/Login.js";import"../../../../components/Login/components/OrDivider.js";import"../../../../components/Login/components/PasswordField.js";import p from"../../../../components/Login/components/Step.js";import s from"../../../../components/Login/components/StepContent.js";import c from"../../../../components/Login/components/StepFooter.js";import a from"../../../../components/Login/components/StepHeader.js";import"../../../../components/Login/components/VerificationStep.js";import{NEED_HELP_EXTERNAL_LINK as l}from"../../../constants/index.js";import{jsxs as u,jsx as d}from"react/jsx-runtime";var f=e(i)((function(o){var n=o.theme;return{width:71,padding:n.spacing(),backgroundColor:n.status.loginButton,"&:hover":{backgroundColor:"".concat(n.status.loginButtonHovered)}}}));var g=n((function(n){var e=n.onNext,i=t(!1),g=o(i,2),h=g[0],j=g[1],v=t(null),L=o(v,2),b=L[0],x=L[1],C=t(""),S=o(C,2),y=S[0],k=S[1],B=function(o){if(o.preventDefault(),!y)return x("Required");j(!0),r({email:y,with_provider:!0}).then((function(o){return e(y,o)})).catch((function(){return x("Invalid email")})).finally((function(){return j(!1)}))};return u(p,{children:[d(a,{children:"Sign In"}),d(s,{children:d("form",{id:"email-form",onSubmit:B,autoComplete:"on",children:d(m,{value:y,onChange:function(o){k(o.target.value),x(null)},disabled:!!h,error:b})})}),d(c,{needHelpExternalLink:l,children:d(f,{"data-testid":"EmailPo_nextButton",form:"email-form",type:"submit",variant:"contained",color:"primary",disabled:h||!!b,onClick:B,children:"Next"})})]})}));export{g as default};
1
+ import{memo as o,useState as n}from"react";import{styled as t}from"@material-ui/core/styles";import e from"@material-ui/core/Button";import{getUserAuthSchemas as i}from"@corva/ui/clients/jsonApi";import"../../../../components/Login/components/Chip.js";import r from"../../../../components/Login/components/EmailField.js";import"../../../../components/Login/components/HiddenEmailField.js";import"../../../../components/Login/components/Login.js";import"../../../../components/Login/components/OrDivider.js";import"../../../../components/Login/components/PasswordField.js";import m from"../../../../components/Login/components/Step.js";import p from"../../../../components/Login/components/StepContent.js";import s from"../../../../components/Login/components/StepFooter.js";import c from"../../../../components/Login/components/StepHeader.js";import"../../../../components/Login/components/VerificationStep.js";import{NEED_HELP_EXTERNAL_LINK as a}from"../../../constants/index.js";import{jsxs as l,jsx as d}from"react/jsx-runtime";const u=t(e)((o=>{let{theme:n}=o;return{width:71,padding:n.spacing(),backgroundColor:n.status.loginButton,"&:hover":{backgroundColor:"".concat(n.status.loginButtonHovered)}}}));var f=o((function(o){let{onNext:t}=o;const[e,f]=n(!1),[g,h]=n(null),[j,L]=n(""),v=o=>{if(o.preventDefault(),!j)return h("Required");f(!0),i({email:j,with_provider:!0}).then((o=>t(j,o))).catch((()=>h("Invalid email"))).finally((()=>f(!1)))};return l(m,{children:[d(c,{children:"Sign In"}),d(p,{children:d("form",{id:"email-form",onSubmit:v,autoComplete:"on",children:d(r,{value:j,onChange:o=>{L(o.target.value),h(null)},disabled:!!e,error:g})})}),d(s,{needHelpExternalLink:a,children:d(u,{"data-testid":"EmailPo_nextButton",form:"email-form",type:"submit",variant:"contained",color:"primary",disabled:e||!!g,onClick:v,children:"Next"})})]})}));export{f as default};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import{useState as e}from"react";import{withStyles as t,ButtonBase as o,Grid as i,Avatar as a,Typography as n,CircularProgress as s}from"@material-ui/core";import{getSSOProvider as l}from"@corva/ui/clients/sso";import{jsx as c,jsxs as d}from"react/jsx-runtime";var f={google:"/static/media/55de612562c712e3a9d6ea86000e18c7.svg",microsoft:"/static/media/319d9b9a39d511547cf55d1336a8eca4.svg"};var m=t((function(r){return{button:{width:"100%",height:56,fontSize:16,fontWeight:400,color:"#fff",display:"inline-flex",padding:0,alignItems:"center",justifyContent:"flex-start",whiteSpace:"nowrap",borderRadius:4,borderWidth:1,borderStyle:"solid",borderColor:"#616161",textDecoration:"none","&:hover":{borderColor:r.status.loginButton}},logo:{height:30,width:30,margin:12},avatar:{height:30,width:30,margin:12,color:"#ffffff",backgroundColor:r.status.loginButton},progressRoot:{margin:"12px 24px"},progressColor:{color:r.status.loginButton}}}))((function(t){var m=t.platform,g=t.connection,u=t.title,p=t.provider,h=t.classes,b=e(!1),v=r(b,2),y=v[0],x=v[1],C=f[p];return c(o,{className:h.button,onClick:function(r){if(r.preventDefault(),!y){x(!0),localStorage.setItem("ssoPlatform",m.identifier);var e=l(m.identifier);e.configure(m.options),e.authorize(g)}},children:d(i,{container:!0,justify:"space-between",alignItems:"center",children:[c(i,{item:!0,children:d(i,{container:!0,justify:"flex-start",alignItems:"center",children:[c(i,{item:!0,children:C?c("img",{className:h.logo,src:C,alt:u}):c(a,{className:h.avatar,children:u&&u[0].toUpperCase()})}),c(i,{item:!0,children:c(n,{variant:"body2",children:u})})]})}),c(i,{item:!0,children:y&&c(s,{classes:{root:h.progressRoot,colorPrimary:h.progressColor},color:"primary",size:30})})]})})}));export{m as default};
1
+ import{useState as t}from"react";import{withStyles as e,ButtonBase as o,Grid as r,Avatar as i,Typography as a,CircularProgress as n}from"@material-ui/core";import{getSSOProvider as s}from"@corva/ui/clients/sso";import{jsx as l,jsxs as c}from"react/jsx-runtime";const d={google:"/static/media/55de612562c712e3a9d6ea86000e18c7.svg",microsoft:"/static/media/319d9b9a39d511547cf55d1336a8eca4.svg"};var f=e((t=>({button:{width:"100%",height:56,fontSize:16,fontWeight:400,color:"#fff",display:"inline-flex",padding:0,alignItems:"center",justifyContent:"flex-start",whiteSpace:"nowrap",borderRadius:4,borderWidth:1,borderStyle:"solid",borderColor:"#616161",textDecoration:"none","&:hover":{borderColor:t.status.loginButton}},logo:{height:30,width:30,margin:12},avatar:{height:30,width:30,margin:12,color:"#ffffff",backgroundColor:t.status.loginButton},progressRoot:{margin:"12px 24px"},progressColor:{color:t.status.loginButton}})))((function(e){let{platform:f,connection:m,title:g,provider:h,classes:p}=e;const[u,b]=t(!1),v=d[h];return l(o,{className:p.button,onClick:t=>{if(t.preventDefault(),!u){b(!0),localStorage.setItem("ssoPlatform",f.identifier);const t=s(f.identifier);t.configure(f.options),t.authorize(m)}},children:c(r,{container:!0,justify:"space-between",alignItems:"center",children:[l(r,{item:!0,children:c(r,{container:!0,justify:"flex-start",alignItems:"center",children:[l(r,{item:!0,children:v?l("img",{className:p.logo,src:v,alt:g}):l(i,{className:p.avatar,children:g&&g[0].toUpperCase()})}),l(r,{item:!0,children:l(a,{variant:"body2",children:g})})]})}),l(r,{item:!0,children:u&&l(n,{classes:{root:p.progressRoot,colorPrimary:p.progressColor},color:"primary",size:30})})]})})}));export{f as default};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{useEffect as e}from"react";import{LoadingIndicator as o}from"@corva/ui/components";import{showErrorNotification as n}from"@corva/ui/utils";import{getUserAuthPlatform as i}from"@corva/ui/clients/jsonApi";import{getSSOProvider as a}from"@corva/ui/clients/sso";import{useAuth as u}from"../../context/auth.js";import{jsx as c}from"react/jsx-runtime";function s(s){var f,m=s.router,p=u().login,l=function(r,t){p(r,{token:t},(function(){return m.push("/")}))},v=function(r){console.error(r),n("Sorry, but we couldn’t log you in. Please contact Corva support if you need assistance"),m.push("/login")},b=(f=r(t.mark((function r(){var e,o,n,u,c;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=localStorage.getItem("ssoPlatform"),localStorage.removeItem("ssoPlatform"),r.next=4,i(e);case 4:if(o=r.sent,n=o.platform,u=a(n.identifier)){r.next=9;break}return r.abrupt("return",v("No authentication platform found for ".concat(n.identifier)));case 9:return r.prev=9,u.configure(n.options),r.next=13,u.authenticate();case 13:return c=r.sent,r.abrupt("return",l(n.identifier,c));case 17:return r.prev=17,r.t0=r.catch(9),r.abrupt("return",v(r.t0));case 20:case"end":return r.stop()}}),r,null,[[9,17]])}))),function(){return f.apply(this,arguments)});return e((function(){b()}),[]),c(o,{fullscreen:!1})}export{s as default};
1
+ import{useEffect as o}from"react";import{LoadingIndicator as t}from"@corva/ui/components";import{showErrorNotification as r}from"@corva/ui/utils";import{getUserAuthPlatform as e}from"@corva/ui/clients/jsonApi";import{getSSOProvider as i}from"@corva/ui/clients/sso";import{useAuth as n}from"../../context/auth.js";import{jsx as a}from"react/jsx-runtime";function c(c){let{router:s}=c;const{login:u}=n(),m=o=>{console.error(o),r("Sorry, but we couldn’t log you in. Please contact Corva support if you need assistance"),s.push("/login")},f=async()=>{const o=localStorage.getItem("ssoPlatform");localStorage.removeItem("ssoPlatform");const{platform:t}=await e(o),r=i(t.identifier);if(!r)return m("No authentication platform found for ".concat(t.identifier));try{r.configure(t.options);const o=await r.authenticate();return((o,t)=>{u(o,{token:t},(()=>s.push("/")))})(t.identifier,o)}catch(o){return m(o)}};return o((()=>{f()}),[]),a(t,{fullscreen:!1})}export{c as default};
@@ -1 +1 @@
1
- "use strict";var e=require('./../ext-cjs/@babel/runtime/helpers/arrayWithHoles.js');module.exports=e.arrayWithHoles;
1
+ "use strict";var e=require('./../ext-cjs/@babel/runtime/helpers/toPrimitive.js');module.exports=e.toPrimitive_1;
@@ -1 +1 @@
1
- "use strict";var e=require('./../ext-cjs/@babel/runtime/helpers/nonIterableRest.js');module.exports=e.nonIterableRest;
1
+ "use strict";var e=require('./../ext-cjs/@babel/runtime/helpers/toPropertyKey.js');module.exports=e.toPropertyKey_1;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import o from"react-dom";import t from"../../../CLI/hocs/withCorvaMagicHOC.js";import{jsx as r}from"react/jsx-runtime";Promise.all([import("".concat(process.env.DEV_CENTER_APP_PATH,"/src/index.js")),import("".concat(process.env.DEV_CENTER_APP_PATH,"/manifest.json")),import("".concat(process.env.DEV_CENTER_APP_PATH,"/package.json"))]).then((function(n){var s=e(n,3),a=s[0],c=s[1],m=s[2],i=t({component:a.default.component,settings:a.default.settings,manifest:c.default,packageJson:m.default});o.render(r(i,{}),document.getElementById("root"))}));
1
+ import t from"../../../CLI/hocs/withCorvaMagicHOC.js";import{createAdaptiveRoot as e}from"./createAdaptiveRoot.js";import{jsx as o}from"react/jsx-runtime";Promise.all([import("".concat(process.env.DEV_CENTER_APP_PATH,"/src/index.js")),import("".concat(process.env.DEV_CENTER_APP_PATH,"/manifest.json")),import("".concat(process.env.DEV_CENTER_APP_PATH,"/package.json"))]).then((n=>{let[s,r,c]=n;const a=t({component:s.default.component,settings:s.default.settings,manifest:r.default,packageJson:c.default});e(document.getElementById("root")).render(o(a,{}))}));
@@ -1 +1 @@
1
- import o from"react-dom";import t from"prop-types";import{makeStyles as n}from"@material-ui/core";import*as r from"@corva/ui";import{DevCenterIsolatedAppPage as p}from"@corva/ui/components";import{initGlobalDependencies as e}from"@corva/ui/config";import{jsx as i}from"react/jsx-runtime";window["@corva/ui"]=r,e();var m=n((function(){return{reportsContainer:{zoom:"0.5"}}}));function a(o){var t=o.CLIAppComponent,n=o.CLIAppSettings,r=m();return i(p,{CLIAppComponent:t,CLIAppSettings:n,containerReportClassName:r.reportsContainer})}a.propTypes={CLIAppComponent:t.func,CLIAppSettings:t.func},a.defaultProps={CLIAppComponent:null,CLIAppSettings:null},import("".concat(process.env.DEV_CENTER_APP_PATH,"/src/index.js")).then((function(t){var n=t.default.component,r=t.default.settings;o.render(i(a,{CLIAppComponent:n,CLIAppSettings:r}),document.getElementById("root"))}));
1
+ import o from"prop-types";import{makeStyles as t}from"@material-ui/core";import*as p from"@corva/ui";import{DevCenterIsolatedAppPage as n}from"@corva/ui/components";import{initGlobalDependencies as e}from"@corva/ui/config";import{createAdaptiveRoot as r}from"./createAdaptiveRoot.js";import{jsx as i}from"react/jsx-runtime";window["@corva/ui"]=p,e();const m=t((()=>({reportsContainer:{zoom:"0.5"}})));function s(o){let{CLIAppComponent:t,CLIAppSettings:p}=o;const e=m();return i(n,{CLIAppComponent:t,CLIAppSettings:p,containerReportClassName:e.reportsContainer})}s.propTypes={CLIAppComponent:o.func,CLIAppSettings:o.func},s.defaultProps={CLIAppComponent:null,CLIAppSettings:null},import("".concat(process.env.DEV_CENTER_APP_PATH,"/src/index.js")).then((o=>{const t=o.default.component,p=o.default.settings;r(document.getElementById("root")).render(i(s,{CLIAppComponent:t,CLIAppSettings:p}))}));
@@ -1 +1 @@
1
- import o from"mapbox-gl";try{var i=window["@corva/ui"],n=i&&i.config&&i.config.initMapbox,c=i&&i.config&&i.config.MAP_BOX_ACCESS_TOKEN,a="function"==typeof n?n(o):o;a&&!a.accessToken&&c&&(a.accessToken=c),window["mapbox-gl"]=a}catch(o){console.warn("Failed to initialize mapbox-gl for local development:",o)}
1
+ import o from"mapbox-gl";try{const i=window["@corva/ui"],n=i&&i.config&&i.config.initMapbox,c=i&&i.config&&i.config.MAP_BOX_ACCESS_TOKEN,a="function"==typeof n?n(o):o;a&&!a.accessToken&&c&&(a.accessToken=c),window["mapbox-gl"]=a}catch(o){console.warn("Failed to initialize mapbox-gl for local development:",o)}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require('./../../../ext-cjs/@babel/runtime/helpers/defineProperty.js');function a(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function r(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?a(Object(o),!0).forEach((function(a){t(e,a,o[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var o={qa:"qa",staging:"staging",production:"production"},i={REACT_APP_AUTH0_REDIRECT_URI:"http://app.local.corva.ai:8080/login/oauth-callback",REACT_APP_AUTH0_DOMAIN:"corva.auth0.com",REACT_APP_AUTH0_CLIENT_ID:"L1B0xGD5AuXwuTDFdFA9czDTM7Vvw464"},n=(t(e={},o.qa,r(r({},i),{},{REACT_APP_API_URL:"https://api.qa.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.qa.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.qa.corva.ai/v1"})),t(e,o.staging,r(r({},i),{},{REACT_APP_API_URL:"https://api.staging.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.staging.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.staging.corva.ai/v1"})),t(e,o.production,r(r({},i),{},{REACT_APP_API_URL:"https://api.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.corva.ai/v1"})),e);exports.CORVA_API_ENVS=o,exports.CORVA_API_ENV_VARIABLES=n,exports.CORVA_GLOBAL_DEPENDENCIES={"@corva/ui":"","@material-ui/core":"4.11.2","@material-ui/icons":"4.9.1","@material-ui/lab":"4.0.0-alpha.57","@material-ui/pickers":"3.2.10","@rollbar/react":"0.11.1",classnames:"2.2.6","corva-convert-units":"1.10.33",highcharts:["8.1.2","10.3.3"],"highcharts-react-official":"2.2.2",html2canvas:"1.0.0-alpha.12","@icon-park/react":"1.4.2",jsona:"1.5.1",lodash:["^4.17.21","^4.18.1"],"mapbox-gl":"3.16.0",moment:"2.29.4","moment-timezone":"0.5.43",react:"17.0.1","react-dom":"17.0.1","react-grid-layout":"1.3.4","react-sortable-hoc":"0.6.8","react-sizeme":"2.5.2","react-redux":"5.1.1","react-virtualized":"9.21.2",redux:"3.7.2","redux-thunk":"2.3.0",reselect:"2.5.4",rollbar:"2.5.1","prop-types":"^15.6.1",uuid:"3.4.0"},exports.DEPRECATED_DEPENDENCIES=[{dependency:"mapbox.js",message:'mapbox.js is deprecated and is no longer provided to Dev Center apps as a shared dependency. Use mapbox-gl 3.16.0 instead (provided by the platform as the window["mapbox-gl"] shared dependency). Remove mapbox.js from your package.json and migrate any L.mapbox usage to mapbox-gl.'}],exports.UNSUPPORTED_DEPENDENCIES=[{dependency:"date-fns",alternative:"moment"},{dependency:"date-fns-tz",alternative:"moment-timezone"},{dependency:"date-fns-timezone",alternative:"moment-timezone"}];
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-cjs/@babel/runtime/helpers/defineProperty.js');function t(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function a(a){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?t(Object(o),!0).forEach((function(t){e(a,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(o,e))}))}return a}const r={qa:"qa",staging:"staging",production:"production"},o={REACT_APP_AUTH0_REDIRECT_URI:"http://app.local.corva.ai:8080/login/oauth-callback",REACT_APP_AUTH0_DOMAIN:"corva.auth0.com",REACT_APP_AUTH0_CLIENT_ID:"L1B0xGD5AuXwuTDFdFA9czDTM7Vvw464"},i={[r.qa]:a(a({},o),{},{REACT_APP_API_URL:"https://api.qa.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.qa.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.qa.corva.ai/v1"}),[r.staging]:a(a({},o),{},{REACT_APP_API_URL:"https://api.staging.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.staging.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.staging.corva.ai/v1"}),[r.production]:a(a({},o),{},{REACT_APP_API_URL:"https://api.corva.ai",REACT_APP_SUBSCRIPTIONS_URL:"https://subscriptions.corva.ai",REACT_APP_AUTH0_AUDIENCE:"https://api.corva.ai/v1"})};exports.CORVA_API_ENVS=r,exports.CORVA_API_ENV_VARIABLES=i,exports.CORVA_GLOBAL_DEPENDENCIES={"@corva/ui":"","@material-ui/core":"4.11.2","@material-ui/icons":"4.9.1","@material-ui/lab":"4.0.0-alpha.57","@material-ui/pickers":"3.2.10",classnames:"2.2.6","corva-convert-units":"1.10.33",highcharts:["8.1.2","10.3.3"],"highcharts-react-official":"2.2.2",html2canvas:"1.0.0-alpha.12","@icon-park/react":"1.4.2",jsona:"1.5.1",lodash:["^4.17.21","^4.18.1"],"mapbox-gl":"3.16.0",moment:"2.29.4","moment-timezone":"0.5.43",react:["17.0.1","18.3.1"],"react-dom":["17.0.1","18.3.1"],"react-grid-layout":"1.3.4","react-sortable-hoc":"0.6.8","react-sizeme":"2.5.2","react-redux":"5.1.1","react-virtualized":"9.21.2",redux:"3.7.2","redux-thunk":"2.3.0",reselect:"2.5.4","prop-types":"^15.6.1",uuid:"3.4.0"},exports.DEPRECATED_DEPENDENCIES=[{dependency:"mapbox.js",message:'mapbox.js is deprecated and is no longer provided to Dev Center apps as a shared dependency. Use mapbox-gl 3.16.0 instead (provided by the platform as the window["mapbox-gl"] shared dependency). Remove mapbox.js from your package.json and migrate any L.mapbox usage to mapbox-gl.'}],exports.UNSUPPORTED_DEPENDENCIES=[{dependency:"date-fns",alternative:"moment"},{dependency:"date-fns-tz",alternative:"moment-timezone"},{dependency:"date-fns-timezone",alternative:"moment-timezone"}];
@@ -0,0 +1 @@
1
+ import e from"react-dom";function o(o){return"function"==typeof e.createRoot?e.createRoot(o):(console.info("[dc-platform-shared] React 17 detected — mounting via legacy ReactDOM.render"),{render(t){e.render(t,o)},unmount(){e.unmountComponentAtNode(o)}})}export{o as createAdaptiveRoot};
@@ -1 +1 @@
1
- "use strict";var e,r=require('./../../../../ext-cjs/@babel/runtime/helpers/taggedTemplateLiteral.js'),n=require('./../../../../ext-cjs/@babel/runtime/helpers/asyncToGenerator.js'),t=require('./../../../../ext-cjs/@babel/runtime/regenerator/index.js'),o=require("node-fetch"),a=require("chalk"),s=require("semver/functions/gt"),i=require("path"),u=require("fs"),c=process.cwd(),l=JSON.parse(u.readFileSync(i.resolve(c,"./node_modules/@corva/ui/package.json"),"utf-8"));function d(e){return o("https://registry.npmjs.org/@corva/ui/latest").then((function(r){return r.ok?r.json().then((function(e){return e.version})):e.warn("Could not fetch latest @corva/ui version")})).catch((function(r){return e.warn("Connection error",r)}))}var p=null;module.exports=function(o){var i;o.hooks.afterCompile.tapPromise("checkCorvaUIVersion",(i=n(t.mark((function n(o){var i,u;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=o.getLogger("checkCorvaUIVersion"),u=l.version,p){n.next=6;break}return n.next=5,d(i);case 5:p=n.sent;case 6:p&&s(p,u)&&i.warn(a(e||(e=r(["\n ****************************************************************\n\n You are using outdated version of @corva/ui {grey (",")}.\n Current latest version is {green.bold (",")}.\n This may lead to problems once the app is published.\n Please update the @corva/ui with the following command:\n\n {green.bold yarn add @corva/ui@latest}\n\n ****************************************************************"])),u,p));case 7:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)}))};
1
+ "use strict";var e,r=require('./../../../../ext-cjs/@babel/runtime/helpers/taggedTemplateLiteral.js');const o=require("node-fetch"),n=require("chalk"),t=require("semver/functions/gt"),a=require("path"),s=require("fs"),i=process.cwd(),u=JSON.parse(s.readFileSync(a.resolve(i,"./node_modules/@corva/ui/package.json"),"utf-8"));let c=null;module.exports=function(a){a.hooks.afterCompile.tapPromise("checkCorvaUIVersion",(async a=>{const s=a.getLogger("checkCorvaUIVersion"),i=u.version;c||(c=await function(e){return o("https://registry.npmjs.org/@corva/ui/latest").then((r=>r.ok?r.json().then((e=>e.version)):e.warn("Could not fetch latest @corva/ui version"))).catch((r=>e.warn("Connection error",r)))}(s)),c&&t(c,i)&&s.warn(n(e||(e=r(["\n ****************************************************************\n\n You are using outdated version of @corva/ui {grey (",")}.\n Current latest version is {green.bold (",")}.\n This may lead to problems once the app is published.\n Please update the @corva/ui with the following command:\n\n {green.bold yarn add @corva/ui@latest}\n\n ****************************************************************"])),i,c))}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../../ext-cjs/@babel/runtime/helpers/asyncToGenerator.js'),r=require('./../../../../ext-cjs/@babel/runtime/regenerator/index.js'),t=require("./serializeDotEnv.js"),n=require("fs").promises,s=require("path"),o=require("express");exports.onBeforeSetupMiddleware=function(a,u){var i,c=u.APP_DIRECTORY;a.use(o.json()),a.patch("/dotenv",(i=e(r.mark((function e(o,a){var u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u="",e.prev=1,e.next=4,n.readFile(s.resolve(c,"./.env"),"utf8");case 4:u=e.sent,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(1);case 9:return e.prev=9,e.next=12,n.writeFile(s.resolve(c,"./.env"),t.updateDotEnv(u,o.body));case 12:e.next=18;break;case 14:e.prev=14,e.t1=e.catch(9),console.error("Could not write to .env file"),console.error(e.t1);case 18:a.sendStatus(200);case 19:case"end":return e.stop()}}),e,null,[[1,7],[9,14]])}))),function(e,r){return i.apply(this,arguments)}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./serializeDotEnv.js");const r=require("fs").promises,t=require("path"),o=require("express");exports.onBeforeSetupMiddleware=function(s,i){let{APP_DIRECTORY:n}=i;s.use(o.json()),s.patch("/dotenv",(async function(o,s){let i="";try{i=await r.readFile(t.resolve(n,"./.env"),"utf8")}catch(e){}try{await r.writeFile(t.resolve(n,"./.env"),e.updateDotEnv(i,o.body))}catch(e){console.error("Could not write to .env file"),console.error(e)}s.sendStatus(200)}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../../ext-cjs/@babel/runtime/helpers/slicedToArray.js'),t=function(e,t){return"".concat(e,"=").concat((((n=t.replace(/\n/g,"\\n")).includes(" ")||n.includes("\t"))&&(n='"'.concat(n.replace(/"/g,'\\"'),'"')),n));var n};exports.updateDotEnv=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,c=r||{};return n.split("\n").map((function(n){if(!n.length||n.startsWith("#"))return n;var r=n.split("="),i=e(r,1)[0];if(Object.keys(c).includes(i)){var u=c[i];return delete c[i],t(i,u)}return n})).concat(Object.entries(c).map((function(n){var r=e(n,2),c=r[0],i=r[1];return t(c,i)}))).join("\n")};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t=(t,e)=>"".concat(t,"=").concat((t=>{let e=t.replace(/\n/g,"\\n");return(e.includes(" ")||e.includes("\t"))&&(e='"'.concat(e.replace(/"/g,'\\"'),'"')),e})(e));exports.updateDotEnv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;const c=n||{};return e.split("\n").map((e=>{if(!e.length||e.startsWith("#"))return e;const[n]=e.split("=");if(Object.keys(c).includes(n)){const e=c[n];return delete c[n],t(n,e)}return e})).concat(Object.entries(c).map((e=>{let[n,c]=e;return t(n,c)}))).join("\n")};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../../ext-cjs/@babel/runtime/helpers/slicedToArray.js'),n=require("../constants.js");exports.default=function(r){var s=r.dependencies,t=void 0===s?{}:s,o=[];return Object.entries(n.CORVA_GLOBAL_DEPENDENCIES).forEach((function(n){var r=e(n,2),s=r[0],c=r[1];if(c&&s in t){var i=t[s];Array.isArray(c)?c.includes(i)||o.push("".concat(s," version must be one of [").concat(c.join(", "),"]")):i!==c&&o.push("".concat(s," version must be ").concat(c))}})),n.UNSUPPORTED_DEPENDENCIES.forEach((function(e){var n=e.dependency,r=e.alternative,s=void 0===r?"":r;n in t&&o.push("".concat(n," is not supported.").concat(s?" Please use ".concat(s," instead."):""))})),o},exports.getDependenciesWarnings=function(e){var r=e.dependencies,s=void 0===r?{}:r,t=[];return n.DEPRECATED_DEPENDENCIES.forEach((function(e){var n=e.dependency,r=e.message;n in s&&t.push(r)})),t};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../constants.js");exports.default=function(n){let{dependencies:t={}}=n;const s=[];return Object.entries(e.CORVA_GLOBAL_DEPENDENCIES).forEach((e=>{let[n,c]=e;if(c&&n in t){const e=t[n];Array.isArray(c)?c.includes(e)||s.push("".concat(n," version must be one of [").concat(c.join(", "),"]")):e!==c&&s.push("".concat(n," version must be ").concat(c))}})),e.UNSUPPORTED_DEPENDENCIES.forEach((e=>{let{dependency:n,alternative:c=""}=e;n in t&&s.push("".concat(n," is not supported.").concat(c?" Please use ".concat(c," instead."):""))})),s},exports.getDependenciesWarnings=function(n){let{dependencies:t={}}=n;const s=[];return e.DEPRECATED_DEPENDENCIES.forEach((e=>{let{dependency:n,message:c}=e;n in t&&s.push(c)})),s};
@@ -1 +1 @@
1
- "use strict";var e=require("./dependencies.js"),n=require("chalk");module.exports=function(r){var o=r.packageJson,c=e.default(o);e.getDependenciesWarnings(o).forEach((function(e){return console.log(n.yellow(e))})),c.forEach((function(e){return console.log(n.red(e))})),c.length&&process.exit(1)};
1
+ "use strict";var e=require("./dependencies.js");const o=require("chalk");module.exports=function(n){let{packageJson:s}=n;const c=e.default(s);e.getDependenciesWarnings(s).forEach((e=>console.log(o.yellow(e)))),c.forEach((e=>console.log(o.red(e)))),c.length&&process.exit(1)};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./validators/index.js"),s=require("webpack"),o=require("path"),r=require("uuid/v1"),t=require("clean-webpack-plugin").CleanWebpackPlugin,a=require("fs"),l=process.cwd(),n=JSON.parse(a.readFileSync(o.resolve(l,"./package.json"),"utf-8")),p=JSON.parse(a.readFileSync(o.resolve(l,"./manifest.json"),"utf-8"));exports.APP_DIRECTORY=l,exports.default=function(a,l){return e({packageJson:n}),{entry:"./src/index.js",output:{filename:"[name].[contenthash].js",path:o.resolve(process.cwd(),"dist")},devServer:{historyApiFallback:!0},performance:{maxAssetSize:1024e3},plugins:[new t,new s.ProvidePlugin({process:"process/browser"})],resolve:{symlinks:!1,extensions:[".js",".jsx",".json",".ts",".tsx"]},module:{rules:[{test:/\.(s[ac]|c)ss$/i,use:["style-loader",{loader:"css-loader",options:{modules:{localIdentName:"development"===l.mode?"[path][name]__[local]__[hash:base64:10]__".concat(r().substr(-5)):"[name]--[local]__[hash:base64:10]__".concat(r().substr(-5)),namedExport:!1},importLoaders:2}},{loader:"postcss-loader",options:{postcssOptions:{plugins:["postcss-preset-env"]}}},{loader:"sass-loader",options:{sourceMap:!0}}]},{test:/\.(js|jsx)$/,exclude:/[\\/]node_modules[\\/]/,use:{loader:"babel-loader",options:{presets:["@babel/preset-env",["@babel/preset-react",{runtime:"automatic"}]]}}},{test:/\.ts(x?)$/,exclude:/[\\/]node_modules[\\/]/,use:[{loader:"babel-loader",options:{presets:["@babel/preset-env",["@babel/preset-react",{runtime:"automatic"}]]}},{loader:"ts-loader",options:{compilerOptions:{noEmit:!1}}}]},{test:/\.m?js/,resolve:{fullySpecified:!1}}]}}},exports.manifestJson=p,exports.packageJson=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./validators/index.js");const s=require("webpack"),o=require("path"),r=require("uuid/v1"),{CleanWebpackPlugin:t}=require("clean-webpack-plugin"),a=require("fs"),l=process.cwd(),n=JSON.parse(a.readFileSync(o.resolve(l,"./package.json"),"utf-8")),p=JSON.parse(a.readFileSync(o.resolve(l,"./manifest.json"),"utf-8"));exports.APP_DIRECTORY=l,exports.default=function(a,l){return e({packageJson:n}),{entry:"./src/index.js",output:{filename:"[name].[contenthash].js",path:o.resolve(process.cwd(),"dist")},devServer:{historyApiFallback:!0},performance:{maxAssetSize:1024e3},plugins:[new t,new s.ProvidePlugin({process:"process/browser"})],resolve:{symlinks:!1,extensions:[".js",".jsx",".json",".ts",".tsx"]},module:{rules:[{test:/\.(s[ac]|c)ss$/i,use:["style-loader",{loader:"css-loader",options:{modules:{localIdentName:"development"===l.mode?"[path][name]__[local]__[hash:base64:10]__".concat(r().substr(-5)):"[name]--[local]__[hash:base64:10]__".concat(r().substr(-5)),namedExport:!1},importLoaders:2}},{loader:"postcss-loader",options:{postcssOptions:{plugins:["postcss-preset-env"]}}},{loader:"sass-loader",options:{sourceMap:!0}}]},{test:/\.(js|jsx)$/,exclude:/[\\/]node_modules[\\/]/,use:{loader:"babel-loader",options:{presets:["@babel/preset-env",["@babel/preset-react",{runtime:"automatic"}]]}}},{test:/\.ts(x?)$/,exclude:/[\\/]node_modules[\\/]/,use:[{loader:"babel-loader",options:{presets:["@babel/preset-env",["@babel/preset-react",{runtime:"automatic"}]]}},{loader:"ts-loader",options:{compilerOptions:{noEmit:!1}}}]},{test:/\.m?js/,resolve:{fullySpecified:!1}}]}}},exports.manifestJson=p,exports.packageJson=n;
@@ -1 +1 @@
1
- "use strict";var e=require('./../../../ext-cjs/@babel/runtime/helpers/defineProperty.js'),r=require('./../../../ext-cjs/@babel/runtime/helpers/toConsumableArray.js'),n=require("./webpack.config.common.js"),o=require("./constants.js"),t=require("./plugins/checkCorvaUIVersion.js"),s=require("./utils/middlewares.js");function i(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,o)}return n}function a(r){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?i(Object(o),!0).forEach((function(n){e(r,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var c=require("@pmmmwh/react-refresh-webpack-plugin"),p=require("webpack-merge").merge,l=require("path"),u=require("webpack"),d=require("clean-webpack-plugin").CleanWebpackPlugin,m=require("copy-webpack-plugin"),v=require("html-webpack-plugin"),_=require("chalk");require("dotenv").config({path:l.resolve(n.APP_DIRECTORY,"./.env")});function P(e,n,o){var t=l.join("@corva","dc-platform-shared"),s="@corva/ui",i=new RegExp("(^".concat(s,"$|^").concat(s,"/)([^]+)?"));if(!e.includes(t)){var a=i.exec(n);if(null!==a){var c=a[2]||"";return o(null,["window",s].concat(r(c.split("/").filter(Boolean))))}}return o()}module.exports=function(e,r){var i,f=process.env.HOST||r.host||"app.local.corva.ai",b=process.env.PORT||r.port||8080,O="mapbox-gl"in(n.packageJson.dependencies||{})?[l.resolve(__dirname,"MapboxGlDevSetupEntryPoint.js")]:[];return p(n.default(e,r),{mode:"development",devtool:"inline-source-map",devServer:{static:"./dist",host:f,port:b,onBeforeSetupMiddleware:function(e){return s.onBeforeSetupMiddleware(e.app,{APP_DIRECTORY:n.APP_DIRECTORY})},hot:!0,open:!1},entry:{devApp:[l.resolve(__dirname,"DevServerEntryPoint.js")].concat(O),isolatedApp:[l.resolve(__dirname,"DevServerIsolatedAppEntryPoint.js")].concat(O)},output:{filename:"[name].js"},plugins:[new d,new m({patterns:[{from:l.resolve(__dirname,"public")},{from:l.resolve(process.cwd(),"node_modules","@corva/ui/assets"),to:"static/media",noErrorOnMissing:!0},{from:l.resolve(process.cwd(),"node_modules","@corva/dc-platform-shared/assets"),to:"static/media",noErrorOnMissing:!0}]}),new v({filename:"index.html",inject:!1,template:l.resolve(__dirname,"public","index.html")}),new v({filename:"DevCenterIsolatedAppPage.html",inject:!1,template:l.resolve(__dirname,"public","DevCenterIsolatedAppPage.html")}),new u.EnvironmentPlugin(a(a({},process.env),{},{DEV_CENTER_APP_PATH:process.cwd(),REACT_APP_ENVIRONMENT:process.env.REACT_APP_ENVIRONMENT||"development"},(i=process.env.CORVA_API_ENV||o.CORVA_API_ENVS.production,i in o.CORVA_API_ENVS?o.CORVA_API_ENV_VARIABLES[i]:(console.log(_.red("CORVA_API_ENV should be one of [".concat(Object.keys(o.CORVA_API_ENVS).join(", "),"]"))),process.exit(1))))),t,new c],externals:P,module:{rules:[{test:/\.(png|jpe?g|gif)$/i,type:"asset/resource"},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4}}]}]}})};
1
+ "use strict";var e=require('./../../../ext-cjs/@babel/runtime/helpers/defineProperty.js'),r=require("./webpack.config.common.js"),t=require("./constants.js"),o=require("./plugins/checkCorvaUIVersion.js"),n=require("./utils/middlewares.js");function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function i(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?s(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}const c=require("@pmmmwh/react-refresh-webpack-plugin"),{merge:a}=require("webpack-merge"),p=require("path"),l=require("webpack"),{CleanWebpackPlugin:u}=require("clean-webpack-plugin"),d=require("copy-webpack-plugin"),m=require("html-webpack-plugin"),v=require("chalk");require("dotenv").config({path:p.resolve(r.APP_DIRECTORY,"./.env")});const _=()=>{const e=process.env.CORVA_API_ENV||t.CORVA_API_ENVS.production;return e in t.CORVA_API_ENVS?t.CORVA_API_ENV_VARIABLES[e]:(console.log(v.red("CORVA_API_ENV should be one of [".concat(Object.keys(t.CORVA_API_ENVS).join(", "),"]"))),process.exit(1))};function P(e,r,t){const o=p.join("@corva","dc-platform-shared"),n="@corva/ui",s=new RegExp("(^".concat(n,"$|^").concat(n,"/)([^]+)?"));if(!e.includes(o)){const e=s.exec(r);if(null!==e){return t(null,["window",n,...(e[2]||"").split("/").filter(Boolean)])}}return t()}const f=e=>p.dirname(require.resolve("".concat(e,"/package.json"),{paths:[r.APP_DIRECTORY]}));module.exports=function(e,t){const s=process.env.HOST||t.host||"app.local.corva.ai",v=process.env.PORT||t.port||8080,O="mapbox-gl"in(r.packageJson.dependencies||{})?[p.resolve(__dirname,"MapboxGlDevSetupEntryPoint.js")]:[];return a(r.default(e,t),{mode:"development",devtool:"inline-source-map",resolve:{alias:{react:f("react"),"react-dom":f("react-dom")}},devServer:{static:"./dist",host:s,port:v,onBeforeSetupMiddleware:e=>n.onBeforeSetupMiddleware(e.app,{APP_DIRECTORY:r.APP_DIRECTORY}),hot:!0,open:!1},entry:{devApp:[p.resolve(__dirname,"DevServerEntryPoint.js"),...O],isolatedApp:[p.resolve(__dirname,"DevServerIsolatedAppEntryPoint.js"),...O]},output:{filename:"[name].js"},plugins:[new u,new d({patterns:[{from:p.resolve(__dirname,"public")},{from:p.resolve(process.cwd(),"node_modules","@corva/ui/assets"),to:"static/media",noErrorOnMissing:!0},{from:p.resolve(process.cwd(),"node_modules","@corva/dc-platform-shared/assets"),to:"static/media",noErrorOnMissing:!0}]}),new m({filename:"index.html",inject:!1,template:p.resolve(__dirname,"public","index.html")}),new m({filename:"DevCenterIsolatedAppPage.html",inject:!1,template:p.resolve(__dirname,"public","DevCenterIsolatedAppPage.html")}),new l.EnvironmentPlugin(i(i({},process.env),{},{DEV_CENTER_APP_PATH:process.cwd(),REACT_APP_ENVIRONMENT:process.env.REACT_APP_ENVIRONMENT||"development"},_())),o,new c],externals:P,module:{rules:[{test:/\.(png|jpe?g|gif)$/i,type:"asset/resource"},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4}}]}]}})};
@@ -1 +1 @@
1
- "use strict";var e=require('./../../../ext-cjs/@babel/runtime/helpers/toConsumableArray.js'),r=require('./../../../ext-cjs/@babel/runtime/helpers/slicedToArray.js'),n=require("./webpack.config.common.js"),t=require("./constants.js"),o=require("webpack"),i=require("webpack-merge").merge,s=require("path"),a=require("terser-webpack-plugin"),l=require("copy-webpack-plugin"),u=n.manifestJson.application.key,c=n.packageJson.version,p=function(e){var r=u.replace(/\./g,"_");return e?r:"".concat(r,"-").concat(c)},m=Object.keys(t.CORVA_GLOBAL_DEPENDENCIES).map((function(e){return[e,new RegExp("(^".concat(e,"$|^").concat(e,"/)([^]+)?"))]})),f=["react/jsx-runtime","highcharts/"];module.exports=function(t,u){var c=!(null==t||!t.local_debug);return i(n.default(t,u),{entry:"./src/index.js",output:{library:p(c),path:s.resolve(n.APP_DIRECTORY,"dist"),filename:"app.js",libraryTarget:"window"},mode:c?"development":"production",plugins:[new o.EnvironmentPlugin(process.env),new l({patterns:[{from:s.resolve(process.cwd(),"manifest.json"),to:"./",noErrorOnMissing:!0}]})],optimization:{minimizer:[new a({parallel:!0})]},externals:[function(n,t,o){if(t.endsWith(".css"))return o();for(var i=0;i<f.length;i+=1)if(t.startsWith(f[i]))return o();for(var s=0;s<m.length;s+=1){var a=r(m[s],2),l=a[0],u=a[1].exec(t);if(null!==u){var c=u[2]||"";return o(null,[l].concat(e(c.split("/").filter(Boolean))))}}return o()}],module:{rules:[{test:/\.(png|jpe?g|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource"},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4}}]}]}})};
1
+ "use strict";var e=require("./webpack.config.common.js"),r=require("./constants.js");const t=require("webpack"),{merge:n}=require("webpack-merge"),o=require("path"),s=require("terser-webpack-plugin"),i=require("copy-webpack-plugin"),{application:{key:a}}=e.manifestJson,{version:c}=e.packageJson,l=e=>{const r=a.replace(/\./g,"_");return e?r:"".concat(r,"-").concat(c)},u=Object.keys(r.CORVA_GLOBAL_DEPENDENCIES).map((e=>[e,new RegExp("(^".concat(e,"$|^").concat(e,"/)([^]+)?"))])),p=["react/jsx-runtime","highcharts/"];module.exports=function(r,a){const c=!(null==r||!r.local_debug);return n(e.default(r,a),{entry:"./src/index.js",output:{library:l(c),path:o.resolve(e.APP_DIRECTORY,"dist"),filename:"app.js",libraryTarget:"window"},mode:c?"development":"production",plugins:[new t.EnvironmentPlugin(process.env),new i({patterns:[{from:o.resolve(process.cwd(),"manifest.json"),to:"./",noErrorOnMissing:!0}]})],optimization:{minimizer:[new s({parallel:!0})]},externals:[function(e,r,t){if(r.endsWith(".css"))return t();for(let e=0;e<p.length;e+=1)if(r.startsWith(p[e]))return t();for(let e=0;e<u.length;e+=1){const[n,o]=u[e],s=o.exec(r);if(null!==s){return t(null,[n,...(s[2]||"").split("/").filter(Boolean)])}}return t()}],module:{rules:[{test:/\.(png|jpe?g|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource"},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4}}]}]}})};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/defineProperty";import o from'./../../ext-esm/auth0-js/dist/auth0.min.esm.js';var i=e((function e(){var i=this;n(this,e),t(this,"handleAuthentication",(function(e,n){return i.webAuth.parseHash((function(t,o){o&&o.accessToken?e(o):t&&n(t)}))})),t(this,"loginWithConnection",(function(e){return i.webAuth.authorize({connection:e})})),this.webAuth=new o.WebAuth({domain:process.env.REACT_APP_AUTH0_DOMAIN,clientID:process.env.REACT_APP_AUTH0_CLIENT_ID,redirectUri:"".concat(window.location.origin,"/login/oauth-callback"),audience:process.env.REACT_APP_AUTH0_AUDIENCE,responseType:"token",scope:"openid profile email"})}));export{i as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import o from'./../../ext-esm/auth0-js/dist/auth0.min.esm.js';class t{constructor(){e(this,"handleAuthentication",((e,o)=>this.webAuth.parseHash(((t,i)=>{i&&i.accessToken?e(i):t&&o(t)})))),e(this,"loginWithConnection",(e=>this.webAuth.authorize({connection:e}))),this.webAuth=new o.WebAuth({domain:process.env.REACT_APP_AUTH0_DOMAIN,clientID:process.env.REACT_APP_AUTH0_CLIENT_ID,redirectUri:"".concat(window.location.origin,"/login/oauth-callback"),audience:process.env.REACT_APP_AUTH0_AUDIENCE,responseType:"token",scope:"openid profile email"})}}export{t as default};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as e,Tooltip as o,IconButton as t}from"@material-ui/core";import{UnlockIcon as a,LockIcon as c}from"@corva/ui/icons";import n from"classnames";import{jsx as i}from"react/jsx-runtime";function s(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.push.apply(o,t)}return o}function l(e){for(var o=1;o<arguments.length;o++){var t=null!=arguments[o]?arguments[o]:{};o%2?s(Object(t),!0).forEach((function(o){r(e,o,t[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var b=e({root:{width:36,height:36,"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"},borderRadius:8},button:{width:"100%",height:"100%","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}}});function d(r){var e=r.className,c=r.disabled,s=r.isDraggableAndResizable,d=r.LockIcon,p=r.lockIconClassName,u=r.onClick,m=r.pageName,f=r.tooltipProps,h=b();return i(o,l(l({title:c?"Can't unlock dashboard layout":s?"Lock Dashboard Layout":"Unlock Dashboard Layout"},f),{},{children:i("div",{className:n(h.root,e),children:i(t,{className:h.button,"data-testid":"".concat(m,"_").concat(s?"gridUnlocked":"gridLocked"),disabled:c,onClick:u,children:s?i(a,{}):i(d,{className:p})})})}))}d.defaultProps={LockIcon:c,tooltipProps:{}};export{d as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import{makeStyles as r,Tooltip as t,IconButton as o}from"@material-ui/core";import{UnlockIcon as c,LockIcon as a}from"@corva/ui/icons";import n from"classnames";import{jsx as i}from"react/jsx-runtime";function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function l(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?s(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}const b=r({root:{width:36,height:36,"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"},borderRadius:8},button:{width:"100%",height:"100%","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}}});function d(e){let{className:r,disabled:s,isDraggableAndResizable:d,LockIcon:u=a,lockIconClassName:p,onClick:m,pageName:f,tooltipProps:h={}}=e;const g=b();return i(t,l(l({title:s?"Can't unlock dashboard layout":d?"Lock Dashboard Layout":"Unlock Dashboard Layout"},h),{},{children:i("div",{className:n(g.root,r),children:i(o,{className:g.button,"data-testid":"".concat(f,"_").concat(d?"gridUnlocked":"gridLocked"),disabled:s,onClick:m,children:d?i(c,{}):i(u,{className:p})})})}))}export{d as default};
@@ -1 +1 @@
1
- import t from"prop-types";import{styled as e,withStyles as r,Grid as i,Chip as a}from"@material-ui/core";import o from"@material-ui/icons/ArrowBack";import{jsx as n}from"react/jsx-runtime";var p=e(o)((function(t){return{color:t.theme.palette.primary.text6,fontSize:16}})),s=function(t){var e=t.label,r=t.onClick,o=t.classes,s=t.dataTestid;return n(i,{item:!0,className:o.chip,children:n(a,{label:e,className:o.chipContent,icon:n(p,{}),variant:"outlined",onClick:r,"data-testid":s})})};s.defaultProps={dataTestid:null},s.propTypes={label:t.string.isRequired,dataTestid:t.string,onClick:t.func.isRequired,classes:t.shape({}).isRequired};var l=r((function(t){return{chip:{marginTop:"-25px",marginBottom:20,textAlign:"center"},chipContent:{color:t.palette.primary.text6,fontSize:13,border:"none",background:"#2C2C2C",padding:"0 5px 0 10px"}}}))(s);export{l as default};
1
+ import e from"prop-types";import{styled as t,withStyles as i,Grid as r,Chip as a}from"@material-ui/core";import o from"@material-ui/icons/ArrowBack";import{jsx as n}from"react/jsx-runtime";const l=t(o)((e=>{let{theme:t}=e;return{color:t.palette.primary.text6,fontSize:16}})),s=e=>{let{label:t,onClick:i,classes:o,dataTestid:s}=e;return n(r,{item:!0,className:o.chip,children:n(a,{label:t,className:o.chipContent,icon:n(l,{}),variant:"outlined",onClick:i,"data-testid":s})})};s.defaultProps={dataTestid:null},s.propTypes={label:e.string.isRequired,dataTestid:e.string,onClick:e.func.isRequired,classes:e.shape({}).isRequired};var p=i((e=>({chip:{marginTop:"-25px",marginBottom:20,textAlign:"center"},chipContent:{color:e.palette.primary.text6,fontSize:13,border:"none",background:"#2C2C2C",padding:"0 5px 0 10px"}})))(s);export{p as default};
@@ -1 +1 @@
1
- import e from"prop-types";import{withStyles as l,TextField as i}from"@material-ui/core";import{jsx as o}from"react/jsx-runtime";var a=function(e){var l=e.value,a=e.onChange,r=e.disabled,t=e.error,d=e.classes;return o(i,{"data-testid":"".concat("EmailField","_emailInput"),id:"email-input",label:"Email",type:"email",name:"email",autoComplete:"email",value:l,placeholder:"Enter your email address",variant:"outlined",InputLabelProps:{classes:{root:d.emailFieldLabelRoot,focused:d.emailFieldFocused}},InputProps:{classes:{root:d.emailFieldRoot,input:d.emailInput,disabled:d.emailFieldDisabled,focused:d.emailFieldFocused,error:d.emailFieldError}},onChange:a,disabled:r,error:!!t,helperText:t,fullWidth:!0})};a.defaultProps={disabled:!1,error:null},a.propTypes={value:e.string.isRequired,onChange:e.func.isRequired,disabled:e.bool,error:e.string,classes:e.shape({}).isRequired};var r=l((function(e){return{emailFieldRoot:{"&:hover:not($emailFieldDisabled):not($emailFieldFocused):not($emailFieldError) $emailFieldNotchedOutline":{borderColor:e.status.loginButton},"&$emailFieldFocused $emailFieldNotchedOutline":{borderColor:e.status.loginButton}},emailInput:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #233 inset"}},emailFieldLabelRoot:{color:"#666","&$emailFieldFocused":{color:e.status.loginButton}}}}))(a);export{r as default};
1
+ import e from"prop-types";import{withStyles as l,TextField as i}from"@material-ui/core";import{jsx as o}from"react/jsx-runtime";const a=e=>{let{value:l,onChange:a,disabled:t,error:r,classes:d}=e;return o(i,{"data-testid":"".concat("EmailField","_emailInput"),id:"email-input",label:"Email",type:"email",name:"email",autoComplete:"email",value:l,placeholder:"Enter your email address",variant:"outlined",InputLabelProps:{classes:{root:d.emailFieldLabelRoot,focused:d.emailFieldFocused}},InputProps:{classes:{root:d.emailFieldRoot,input:d.emailInput,disabled:d.emailFieldDisabled,focused:d.emailFieldFocused,error:d.emailFieldError}},onChange:a,disabled:t,error:!!r,helperText:r,fullWidth:!0})};a.defaultProps={disabled:!1,error:null},a.propTypes={value:e.string.isRequired,onChange:e.func.isRequired,disabled:e.bool,error:e.string,classes:e.shape({}).isRequired};var t=l((e=>({emailFieldRoot:{"&:hover:not($emailFieldDisabled):not($emailFieldFocused):not($emailFieldError) $emailFieldNotchedOutline":{borderColor:e.status.loginButton},"&$emailFieldFocused $emailFieldNotchedOutline":{borderColor:e.status.loginButton}},emailInput:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #233 inset"}},emailFieldLabelRoot:{color:"#666","&$emailFieldFocused":{color:e.status.loginButton}}})))(a);export{t as default};
@@ -1 +1 @@
1
- import o from"prop-types";import r from"classnames";import{styled as i,Tooltip as e}from"@material-ui/core";import{isMobileDetected as n,isTabletDetected as c}from"@corva/ui/utils/mobileDetect";import a from"./LogoIcon.js";import"./Login.global.css.js";import{jsx as l,jsxs as t}from"react/jsx-runtime";var m=window.innerHeight<window.innerWidth,p=i(e)({maxWidth:300,margin:0}),g=function(o){var i=o.children,e=o.location,a=o.logoIcon,g=o.logoTooltip,d=o.promoBackgroundImage,s=o.promoBackgroundWebM,u=o.promoBackgroundMp4,h=o.promoLink,v=s||u,b=t("a",{href:h,target:"_blank",rel:"noreferrer",className:r("c-login-promo",!v&&"c-login-promo__image"),style:{backgroundImage:!v&&"url(".concat(d,")")},children:["Promo",v&&t("video",{loop:!0,muted:!0,autoPlay:!0,playsinline:!0,className:"c-login-promo__video",children:[s&&l("source",{src:s,type:"video/webm"}),u&&l("source",{src:u,type:"video/mp4"})]})]});return t("div",{className:r("c-login",{"c-login-mobile":n||c,"c-login-large_content":"/login"!==e.path,"c-login-landscape":m}),children:[b,t("div",{className:"c-login-content",children:[l("div",{className:"c-login-logo",children:l(p,{title:g,placement:"bottom",children:l("div",{children:a})})}),i]})]})};g.propTypes={children:o.node,logoIcon:o.node,logoTooltip:o.string,promoLink:o.string,promoBackgroundImage:o.string,promoBackgroundWebM:o.string,promoBackgroundMp4:o.string},g.defaultProps={children:void 0,logoIcon:l(a,{}),logoTooltip:"",promoLink:"https://www.corva.ai/",promoBackgroundImage:"/static/media/67f05495a7dbbee777bb0c7974f4588a.jpg",promoBackgroundWebM:void 0,promoBackgroundMp4:void 0};export{g as default};
1
+ import o from"prop-types";import r from"classnames";import{styled as i,Tooltip as e}from"@material-ui/core";import{isMobileDetected as n,isTabletDetected as c}from"@corva/ui/utils/mobileDetect";import l from"./LogoIcon.js";import"./Login.global.css.js";import{jsx as a,jsxs as t}from"react/jsx-runtime";const m=window.innerHeight<window.innerWidth,p=i(e)({maxWidth:300,margin:0}),g=o=>{let{children:i,location:e,logoIcon:l,logoTooltip:g,promoBackgroundImage:d,promoBackgroundWebM:s,promoBackgroundMp4:u,promoLink:h}=o;const b=s||u,k=t("a",{href:h,target:"_blank",rel:"noreferrer",className:r("c-login-promo",!b&&"c-login-promo__image"),style:{backgroundImage:!b&&"url(".concat(d,")")},children:["Promo",b&&t("video",{loop:!0,muted:!0,autoPlay:!0,playsinline:!0,className:"c-login-promo__video",children:[s&&a("source",{src:s,type:"video/webm"}),u&&a("source",{src:u,type:"video/mp4"})]})]});return t("div",{className:r("c-login",{"c-login-mobile":n||c,"c-login-large_content":"/login"!==e.path,"c-login-landscape":m}),children:[k,t("div",{className:"c-login-content",children:[a("div",{className:"c-login-logo",children:a(p,{title:g,placement:"bottom",children:a("div",{children:l})})}),i]})]})};g.propTypes={children:o.node,logoIcon:o.node,logoTooltip:o.string,promoLink:o.string,promoBackgroundImage:o.string,promoBackgroundWebM:o.string,promoBackgroundMp4:o.string},g.defaultProps={children:void 0,logoIcon:a(l,{}),logoTooltip:"",promoLink:"https://www.corva.ai/",promoBackgroundImage:"/static/media/67f05495a7dbbee777bb0c7974f4588a.jpg",promoBackgroundWebM:void 0,promoBackgroundMp4:void 0};export{g as default};
@@ -1 +1 @@
1
- import e from"prop-types";import{withStyles as t}from"@material-ui/core/styles";import r from"@material-ui/core/Divider";import i from"@material-ui/core/Grid";import s from"@material-ui/core/Typography";import{jsxs as a,jsx as m}from"react/jsx-runtime";function c(e){return a(i,{container:!0,justify:"space-between",alignItems:"center",wrap:"nowrap",children:[m(i,{item:!0,className:e.classes.dividerItem,children:m(r,{})}),m(i,{item:!0,className:e.classes.textItem,children:m(s,{variant:"subtitle1",className:e.classes.text,children:"OR"})}),m(i,{item:!0,className:e.classes.dividerItem,children:m(r,{})})]})}c.propTypes={classes:e.shape({dividerItem:e.string.isRequired,textItem:e.string.isRequired,text:e.string.isRequired}).isRequired};var l=t((function(e){return{dividerItem:{flex:10},textItem:{textAlign:"center",paddingLeft:24,paddingRight:24},text:{color:e.palette.primary.text6}}}))(c);export{l as default};
1
+ import e from"prop-types";import{withStyles as t}from"@material-ui/core/styles";import i from"@material-ui/core/Divider";import r from"@material-ui/core/Grid";import s from"@material-ui/core/Typography";import{jsxs as a,jsx as m}from"react/jsx-runtime";function l(e){return a(r,{container:!0,justify:"space-between",alignItems:"center",wrap:"nowrap",children:[m(r,{item:!0,className:e.classes.dividerItem,children:m(i,{})}),m(r,{item:!0,className:e.classes.textItem,children:m(s,{variant:"subtitle1",className:e.classes.text,children:"OR"})}),m(r,{item:!0,className:e.classes.dividerItem,children:m(i,{})})]})}l.propTypes={classes:e.shape({dividerItem:e.string.isRequired,textItem:e.string.isRequired,text:e.string.isRequired}).isRequired};var c=t((e=>({dividerItem:{flex:10},textItem:{textAlign:"center",paddingLeft:24,paddingRight:24},text:{color:e.palette.primary.text6}})))(l);export{c as default};
@@ -1 +1 @@
1
- import o from"@babel/runtime/helpers/slicedToArray";import{useState as r}from"react";import{withStyles as e,TextField as s,InputAdornment as i}from"@material-ui/core";import t from"@material-ui/core/IconButton";import d from"@material-ui/icons/Visibility";import a from"@material-ui/icons/VisibilityOff";import{jsx as l}from"react/jsx-runtime";var n=e((function(o){return{passwordFieldRoot:{"&:hover:not($passwordFieldDisabled):not($passwordFieldFocused):not($passwordFieldError) $passwordFieldNotchedOutline":{borderColor:o.status.loginButton},"&$passwordFieldFocused $passwordFieldNotchedOutline":{borderColor:o.status.loginButton}},passwordFieldLabelRoot:{"&$passwordFieldFocused":{color:o.status.loginButton}},passwordField:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #233 inset"}}}}))((function(e){var n=e.value,p=e.onChange,u=e.disabled,c=e.error,w=e.classes,m=r(!1),F=o(m,2),b=F[0],f=F[1];return l(s,{id:"password-input",label:"Password",type:b?"text":"password",name:"password",value:n,variant:"outlined",onChange:p,autoComplete:"password",disabled:u,error:!!c,helperText:c,InputProps:{endAdornment:l(i,{position:"end",children:l(t,{"aria-label":"Toggle password visibility",onClick:function(){return f((function(o){return!o}))},children:l(b?d:a,{})})}),classes:{root:w.passwordFieldRoot,input:w.passwordField,disabled:w.passwordFieldDisabled,focused:w.passwordFieldFocused,error:w.passwordFieldError,notchedOutline:w.passwordFieldNotchedOutline}},InputLabelProps:{classes:{root:w.passwordFieldLabelRoot,focused:w.passwordFieldFocused}},fullWidth:!0})}));export{n as default};
1
+ import{useState as o}from"react";import{withStyles as e,TextField as s,InputAdornment as r}from"@material-ui/core";import i from"@material-ui/core/IconButton";import d from"@material-ui/icons/Visibility";import t from"@material-ui/icons/VisibilityOff";import{jsx as a}from"react/jsx-runtime";var l=e((o=>({passwordFieldRoot:{"&:hover:not($passwordFieldDisabled):not($passwordFieldFocused):not($passwordFieldError) $passwordFieldNotchedOutline":{borderColor:o.status.loginButton},"&$passwordFieldFocused $passwordFieldNotchedOutline":{borderColor:o.status.loginButton}},passwordFieldLabelRoot:{"&$passwordFieldFocused":{color:o.status.loginButton}},passwordField:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #233 inset"}}})))((e=>{let{value:l,onChange:n,disabled:p,error:u,classes:c}=e;const[w,F]=o(!1);return a(s,{id:"password-input",label:"Password",type:w?"text":"password",name:"password",value:l,variant:"outlined",onChange:n,autoComplete:"password",disabled:p,error:!!u,helperText:u,InputProps:{endAdornment:a(r,{position:"end",children:a(i,{"aria-label":"Toggle password visibility",onClick:()=>F((o=>!o)),children:a(w?d:t,{})})}),classes:{root:c.passwordFieldRoot,input:c.passwordField,disabled:c.passwordFieldDisabled,focused:c.passwordFieldFocused,error:c.passwordFieldError,notchedOutline:c.passwordFieldNotchedOutline}},InputLabelProps:{classes:{root:c.passwordFieldLabelRoot,focused:c.passwordFieldFocused}},fullWidth:!0})}));export{l as default};
@@ -1 +1 @@
1
- import r from"prop-types";import{withStyles as e}from"@material-ui/core/styles";import i from"@material-ui/core/Grid";import{jsx as t}from"react/jsx-runtime";function s(r){return t(i,{item:!0,className:r.classes.gridItem,children:r.children})}s.propTypes={children:r.node.isRequired,classes:r.shape({gridItem:r.string.isRequired}).isRequired};var m=e((function(r){return{gridItem:{padding:r.spacing(2,4,2,4),width:"100%"}}}))(s);export{m as default};
1
+ import r from"prop-types";import{withStyles as e}from"@material-ui/core/styles";import i from"@material-ui/core/Grid";import{jsx as s}from"react/jsx-runtime";function t(r){return s(i,{item:!0,className:r.classes.gridItem,children:r.children})}t.propTypes={children:r.node.isRequired,classes:r.shape({gridItem:r.string.isRequired}).isRequired};var m=e((r=>({gridItem:{padding:r.spacing(2,4,2,4),width:"100%"}})))(t);export{m as default};