@corva/dc-platform-shared 0.0.0-935e60d → 0.0.0-9dfc9bebbc
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.
- package/CLI/components/App/App.js +1 -1
- package/CLI/components/App/components/AppBar/AppBar.js +1 -1
- package/CLI/constants/index.js +1 -1
- package/CLI/context/auth.js +1 -1
- package/CLI/hocs/effects/useProvideAuth/useProvideAuth.js +1 -1
- package/CLI/hocs/utils.js +1 -1
- package/CLI/hocs/withAppDataProviderHOC.js +1 -1
- package/CLI/hocs/withCLIAppSettingsHOC.js +1 -1
- package/CLI/hocs/withCorvaMagicHOC.js +1 -1
- package/CLI/hocs/withDevCenterRouterHOC.js +1 -1
- package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.js +1 -1
- package/CLI/hocs/withPDFLayoutHOC.js +1 -1
- package/CLI/hocs/withReactRouterHOC.js +1 -1
- package/CLI/screens/LoginScreen/LoginScreen.js +1 -1
- package/CLI/screens/LoginScreen/components/Auth.js +1 -1
- package/CLI/screens/LoginScreen/components/AuthStep.js +1 -1
- package/CLI/screens/LoginScreen/components/EmailStep.js +1 -1
- package/CLI/screens/LoginScreen/components/SSOButton.js +1 -1
- package/CLI/screens/OAuthCallbackScreen/index.js +1 -1
- package/cjs/devcenter/webpack/DevServerEntryPoint.js +1 -1
- package/cjs/devcenter/webpack/DevServerIsolatedAppEntryPoint.js +1 -1
- package/cjs/devcenter/webpack/constants.js +1 -1
- package/cjs/devcenter/webpack/plugins/checkCorvaUIVersion.js +1 -1
- package/cjs/devcenter/webpack/utils/middlewares.js +1 -1
- package/cjs/devcenter/webpack/utils/serializeDotEnv.js +1 -1
- package/cjs/devcenter/webpack/validators/dependencies.js +1 -1
- package/cjs/devcenter/webpack/validators/index.js +1 -1
- package/cjs/devcenter/webpack/webpack.config.common.js +1 -1
- package/cjs/devcenter/webpack/webpack.config.dev.js +1 -1
- package/cjs/devcenter/webpack/webpack.config.prod.js +1 -1
- package/clients/auth0/index.js +1 -1
- package/components/AppsGridDragHandle/AppsGridDragHandle.js +1 -1
- package/components/GridLockButton/index.js +1 -1
- package/components/Login/components/Chip.js +1 -1
- package/components/Login/components/EmailField.js +1 -1
- package/components/Login/components/Login.js +1 -1
- package/components/Login/components/OrDivider.js +1 -1
- package/components/Login/components/PasswordField.js +1 -1
- package/components/Login/components/StepContent.js +1 -1
- package/components/Login/components/StepFooter.js +1 -1
- package/components/Login/components/StepHeader.js +1 -1
- package/ext-esm/auth0-js/dist/auth0.min.esm.js +1 -1
- package/package.json +2 -1
- package/utils/devcenter.js +1 -1
- package/utils/recaptcha.js +1 -1
- package/_virtual/arrayLikeToArray.js +0 -1
- package/_virtual/arrayWithHoles.js +0 -1
- package/_virtual/arrayWithoutHoles.js +0 -1
- package/_virtual/iterableToArray.js +0 -1
- package/_virtual/iterableToArrayLimit.js +0 -1
- package/_virtual/nonIterableRest.js +0 -1
- package/_virtual/nonIterableSpread.js +0 -1
- package/_virtual/regeneratorRuntime.js +0 -1
- package/_virtual/typeof.js +0 -1
- package/_virtual/unsupportedIterableToArray.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/arrayLikeToArray.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/arrayWithHoles.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/arrayWithoutHoles.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/asyncToGenerator.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/defineProperty.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/iterableToArray.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/iterableToArrayLimit.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/nonIterableRest.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/nonIterableSpread.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/regeneratorRuntime.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/slicedToArray.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/toConsumableArray.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/typeof.js +0 -1
- package/ext-cjs/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -1
- package/ext-cjs/@babel/runtime/regenerator/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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
|
|
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 m,Menu as d,MenuItem as p}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 k}from"react/jsx-runtime";const S="AppBar",L=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}}))),I="app-bar-menu";function N(o){var t,N;let{toggleTheme:x}=o;const B=L(),{user:T,logout:_}=b(),z=r(),[R,y]=e(null),D=Boolean(R),A=()=>y(null),O="".concat(null==T||null===(t=T.first_name)||void 0===t?void 0:t[0]).concat(null==T||null===(N=T.last_name)||void 0===N?void 0:N[0]).toUpperCase();return w("div",{children:[k(a,{position:"static",className:B.appBar,children:w(l,{children:[k(C,{}),k("div",{className:B.grow}),k(i,{control:k(n,{checked:"false"!==localStorage.getItem(g),size:"small",onChange:e=>{localStorage.setItem(g,e.target.checked),window.location.reload()}}),label:"App Isolation",classes:{label:B.formControlLabel},className:B.headerControl}),k(i,{control:k(n,{"data-testid":"".concat(S,"_pdfReport"),checked:v,size:"small",onChange:e=>{localStorage.setItem(f,e.target.checked),window.location.reload()}}),label:"PDF report view",classes:{label:B.formControlLabel},className:B.headerControl}),!v&&k(c,{title:"Switch to light theme to tune your app for PDF reports",placement:"bottom",children:k("div",{children:k(u,{"data-testid":"".concat(S,"_themeSwitch"),className:B.headerControl,leftLabel:"Dark Theme",rightLabel:"Light Theme",onChange:x,checked:z.isLightTheme,size:"small",title:""})})}),k("div",{children:k(s,{edge:"end","aria-label":"account of current user","aria-controls":I,"aria-haspopup":"true",onClick:e=>y(e.currentTarget),color:"inherit",className:B.iconButtonRoot,children:w("div",{className:B.flex,children:[k(m,{"data-testid":"".concat(S,"_userInitials"),children:O}),k(h,{className:B.userProfileIcon})]})})})]})}),k(d,{"data-testid":"".concat(S,"_userDropdown"),anchorEl:R,id:I,keepMounted:!0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},open:D,onClose:A,children:k(p,{"data-testid":"".concat(S,"_signOutMenuItem"),onClick:()=>{_(),A()},children:"Sign Out"})})]})}N.propTypes={toggleTheme:o.func.isRequired};export{N as default};
|
package/CLI/constants/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
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};
|
package/CLI/context/auth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as
|
|
1
|
+
import{createContext as o,useContext as r}from"react";const t=o(),c=()=>r(t);export{t as AuthContext,c as useAuth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useState as t,useRef as o,useEffect as n}from"react";import{get as s}from"lodash";import{post as r}from"@corva/ui/clients/api/apiCore";import*as e from"@corva/ui/clients/jsonApi";import{updateUserUnits as i}from"@corva/ui/utils/convert";import u from"../../../../clients/auth0/index.js";import{LOGIN_ROUTE_REG_EXP as a}from"../../../constants/index.js";const c=t=>fetch("/dotenv",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});function m(m){const[l,p]=t(null),[y,f]=t(!0),[h,d]=t(null),g=o();async function _(){f(!0);const t=await e.getCurrentUser();t?(p(t),i({userUnits:t.unit_system,companyUnits:s(t,"company.unit_system"),companyCustomUnitSystem:s(t,"company.custom_unit_system"),userCustomUnitSystem:s(t,"custom_unit_system"),companyCustomUnits:s(t,"company.custom_units")})):m.push("/login"),f(!1)}g.current||(g.current=new u);return n((()=>{if(a.test(m.location.pathname))return f(!1);_()}),[]),{user:l,loading:y,error:h,login:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;try{d(null),f(!0);const n={auth:o};t&&(n.platform=t);const s=await r("/v1/user_token",n);c({AUTH_TOKEN:s.jwt})}catch(t){return console.error(t),f(!1),d("Wrong user name or password")}_().then(n)},logout:async()=>{c({AUTH_TOKEN:""}),await e.logout(),m.push("/login")},auth0:g.current}}export{m as default};
|
package/CLI/hocs/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{DEFAULT_APP_SIZE as o}from"@corva/ui/constants/apps";function i(o){return JSON.parse(localStorage.getItem(o))||{}}function n(o,n){const t=i(o)||{};localStorage.setItem(o,JSON.stringify({...t,...n}))}const t=n=>{var t,l,a;const r=null!==(t=null==n||null===(l=n.application)||void 0===l||null===(l=l.ui)||void 0===l?void 0:l.initial_size)&&void 0!==t?t:o;return i(null==n||null===(a=n.application)||void 0===a?void 0:a.key).coordinates||{...r,x:0,y:0}};export{t as getAppCoordinates,i as getLocalAppData,n as updateLocalAppData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{DEV_CENTER_CLI_APP_ID as t}from"@corva/ui/constants";import{getFeatureFlagAppsIsolation as e}from"@corva/ui/clients/clientStorage";import{AppsDataProvider as o,DevCenterIsolatedApp as n}from"@corva/ui/components";import{jsx as a}from"react/jsx-runtime";const s=e(),p=e=>{let{CLIAppComponent:p,CLIAppSettings:r,packageJson:i}=e;return e=>{let{manifest:c,dashboardProps:m,coordinates:d,...l}=e;const g=c.application.key,{version:u}=i,f={app:{app_key:g,platform:"dev_center"},id:t,package:{manifest:c,build:"".concat(g,"-").concat(u),version:u},segment:c.application.segments,settings:l.settings};return a(o,{dashboardAssetId:m.assetId,apps:[f],children:a(n,{...l,isIsolationFeatureEnabled:s,app:f,coordinates:d,CLIAppComponent:p,CLIAppSettings:r})})}};export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useState as t}from"react";import{getLocalAppData as s,updateLocalAppData as e}from"./utils.js";import{useAuth as n}from"../context/auth.js";import{jsx as r}from"react/jsx-runtime";const o=o=>i=>{const{user:a}=n(),m=i.manifest.application.key,[c,g]=t(s(m).settings||{});return r(o,{...i,currentUser:a,settings:c,onSettingChange:(t,s)=>{const n={...c||{},[t]:s};e(m,{settings:n}),g(n)},onSettingsChange:t=>{const s={...c||{},...t};e(m,{settings:s}),g(s)}})};export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"@corva/ui";import{ProvidePermissions as
|
|
1
|
+
import*as o from"@corva/ui";import{ProvidePermissions as t}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"@corva/ui/config/initGlobalDependencies";import{isPDFReportView as r}from"@corva/ui/utils/reports";import s from"./withAppDataProviderHOC.js";import i from"./withCLIAppSettingsHOC.js";import e from"./withReactRouterHOC.js";import a from"./withGridLayoutHOC/withGridLayoutHOC.js";import m from"./withPDFLayoutHOC.js";import{withDevCenterRouterHOC as p}from"./withDevCenterRouterHOC.js";import{jsx as c}from"react/jsx-runtime";window["@corva/ui"]=o;const l=o=>{let{component:l,settings:n,manifest:u,packageJson:g}=o;return()=>{const o=i(s({CLIAppComponent:l,CLIAppSettings:n,packageJson:g})),j=r?m(o):a(o),f=e(p(j));return c(t,{children:c(f,{manifest:u,dashboardProps:{}})})}};export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useMemo as t}from"react";import{createDevCenterRouter as r}from"../../utils/devcenter.js";import"../../utils/recaptcha.js";import{jsx as e}from"react/jsx-runtime";const o=o=>c=>{let{router:i,...m}=c;const s=t((()=>r(i)),[i.location]);return e(o,{...m,devCenterRouter:s})};export{o as default,o as withDevCenterRouterHOC};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useState as o}from"react";import{WidthProvider as e,Responsive as t}from"react-grid-layout";import{pick as i}from"lodash";import{withSize as n}from"react-sizeme";import{isPhoneDetected as r,isNativeDetected as s,isMobileDetected as p}from"@corva/ui/utils/mobileDetect";import{getAppSize as a}from"@corva/ui/utils/apps";import{GRID_BREAKPOINTS as m,GRID_COLUMN_SIZES as c,GRID_ROW_HEIGHT as d,NON_DRAGGABLE_ELEMENT_SELECTOR as l}from"@corva/ui/constants/apps";import"../../../components/Login/components/Login.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/HiddenEmailField.js";import"../../../components/Login/components/EmailField.js";import{AppsGridDragHandle as g}from"../../../components/AppsGridDragHandle/AppsGridDragHandle.js";import u from"../../../components/GridLockButton/index.js";import{isAppMaximized as h}from"../../../utils/devcenter.js";import"../../../utils/recaptcha.js";import{getLocalAppData as f,getAppCoordinates as j,updateLocalAppData as L}from"../utils.js";import"./withGridLayoutHOC.global.css.js";import b from"./withGridLayoutHOC.css.js";import{jsxs as D,jsx as v}from"react/jsx-runtime";const H=".".concat(g.GRID_LAYOUT_DRAG_HANDLE_CLASS),x=e(t),S=e=>n()((t=>{var n;let{size:S,...y}=t;const C=S.width,w=y.manifest.application.key,[z,A]=o(null!==(n=f(w).isDraggable)&&void 0!==n&&n),G=s||p,R=h(y.devCenterRouter.location.query),[k,E]=o(j(y.manifest)),{pixelHeight:F,pixelWidth:M}=a({coordinates:k,dashboardWidth:C,isMaximized:R}),O=o=>{let[e]=o;const t=i(e,["x","y","w","h"]);E(t),L(w,{coordinates:t})};return D("div",{children:[v(x,{breakpoints:r?m.phone:m.general,cols:c,rowHeight:d,measureBeforeMount:!0,onResizeStop:O,onDragStop:O,isDraggable:!G&&z,isResizable:!G&&z,draggableCancel:l,useCSSTransforms:!1,draggableHandle:H,children:v("div",{"data-grid":k,children:D("div",{className:R?b.appMaximized:"",children:[v(e,{...y,coordinates:{...k,pixelHeight:F,pixelWidth:M},layoutEnvironment:{type:"general",pdfReportMode:!1}}),!G&&z&&v(g,{})]})},"with-grid-layout-hoc")}),v(u,{isDraggableAndResizable:z,onClick:()=>{A(!z),L(w,{isDraggable:!z})},pageName:"DashboardPo"})]})}));export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{makeStyles as e}from"@material-ui/core";import{getAppType as o,getPDFAppPixelSize as i}from"@corva/ui/utils/dashboardReports";import{getAppCoordinates as t}from"./utils.js";import{jsx as r}from"react/jsx-runtime";const a=e({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"}}),p=e=>p=>{var n;const c=a(),l=t(p.manifest),d=!(null===(n=p.manifest.application.ui)||void 0===n||!n.full_screen_report),s=o({coordinates:l,isFullScreenReport:d});return r("div",{className:c.page,children:r("div",{className:c.pdfReportApp,style:{width:"".concat(s.width,"cm"),height:"".concat(s.height,"cm")},children:r(e,{...p,coordinates:{...l,...i(s)},layoutEnvironment:{type:"general",pdfReportMode:!0}})})})};export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{Route as o,IndexRedirect as t,Router as r,browserHistory as n}from"react-router";import{LoadingIndicator as e}from"@corva/ui/components";import{getCurrentUser as c}from"@corva/ui/clients/jsonApi";import p from"../screens/LoginScreen/LoginScreen.js";import i from"../screens/OAuthCallbackScreen/index.js";import{useAuth as a}from"../context/auth.js";import m from"../components/App/App.js";import{jsxs as s,jsx as l}from"react/jsx-runtime";const u=async(o,t,r)=>{let n=null;try{n=await c()}catch(o){console.error(o)}if(o.location.pathname.startsWith("/login"))return n&&t("/"),void r();n||t("/login"),r()},h=o=>t=>{let{route:r,location:n,router:c}=t;const{loading:p}=a();return p?l(e,{fullscreen:!0}):l(o,{location:n,router:c,...r.componentProps||{}})},f=e=>c=>{const a=s(o,{path:"/",component:m,onEnter:u,children:[l(t,{to:"app"}),l(o,{path:"app",component:h(e),componentProps:c}),l(o,{path:"login",component:p}),l(o,{path:"login/oauth-callback",component:i})]});return l(r,{history:n,routes:a})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useEffect as o}from"react";import{getCurrentUser as n}from"@corva/ui/clients/jsonApi";import t from"../../../components/Login/components/Login.js";import"../../../components/Login/components/PasswordField.js";import"../../../components/Login/components/Chip.js";import"../../../components/Login/components/StepFooter.js";import"../../../components/Login/components/StepContent.js";import"../../../components/Login/components/StepHeader.js";import"../../../components/Login/components/Step.js";import"../../../components/Login/components/OrDivider.js";import"../../../components/Login/components/HiddenEmailField.js";import"../../../components/Login/components/EmailField.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 r(r){let{router:s,location:c}=r;return o((()=>{!async function(){let o=null;try{o=await n()}catch(o){console.error(o)}o&&s.replace("/")}()}),[]),p("div",{className:m.loginScreen,children:p(t,{location:c,logoIcon:p(i,{}),promoLink:"https://youtu.be/-q6LkceqpGs",children:p(e,{router:s})})})}export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useState as e}from"react";import t from"./EmailStep.js";import s from"./AuthStep.js";import{jsx as m}from"react/jsx-runtime";function a(a){let{router:l}=a;const[o,r]=e({email:null,schemas:null,step:0});return 0===o.step?m(t,{onNext:(e,t)=>r((s=>({step:s.step+1,email:e,schemas:t})))}):m(s,{email:o.email,schemas:o.schemas,onBack:()=>r((e=>({step:e.step-1,email:null,schemas:null}))),onFinishLogin:()=>l.push("/")})}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{memo as o,useState as n,useEffect as t}from"react";import i from"prop-types";import{styled as e,Grid as r,Button as m}from"@material-ui/core";import{showErrorNotification as a}from"@corva/ui/utils";import{isSSOPlatformSupported as s}from"@corva/ui/clients/sso";import{initializeRecaptcha as c,GOOGLE_RECAPTCHA_KEY as p}from"../../../../utils/recaptcha.js";import"../../../../components/Login/components/Login.js";import l from"../../../../components/Login/components/PasswordField.js";import d from"../../../../components/Login/components/Chip.js";import g from"../../../../components/Login/components/StepFooter.js";import u from"../../../../components/Login/components/StepContent.js";import f from"../../../../components/Login/components/StepHeader.js";import h from"../../../../components/Login/components/Step.js";import v from"../../../../components/Login/components/OrDivider.js";import j from"../../../../components/Login/components/HiddenEmailField.js";import"../../../../components/Login/components/EmailField.js";import{useAuth as w}from"../../../context/auth.js";import{NEED_HELP_EXTERNAL_LINK as L}from"../../../constants/index.js";import y from"./SSOButton.js";import{jsxs as S,jsx as b}from"react/jsx-runtime";const k=e(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}}})),B=e(m)((o=>{let{theme:n}=o;return{width:71,padding:n.spacing(),whiteSpace:"nowrap",backgroundColor:n.status.loginButton,"&:hover":{backgroundColor:"".concat(n.status.loginButtonHovered)}}}));function C(o){let{email:i,schemas:e,onBack:m,onFinishLogin:C}=o;const x=w(),[F,q]=n(""),[H,R]=n(!1),E=H?x.error:null;t((()=>{c()}),[]);const I=async o=>(o.preventDefault(),window.grecaptcha?window.grecaptcha.enterprise.ready((()=>{try{window.grecaptcha.enterprise.execute(p,{action:"login"}).then((o=>{x.login(null,{email:i,password:F,recaptcha_token:o},C).then((()=>{R(!0)}))})).catch((o=>console.error(o)))}catch(o){console.error(o),a(o.message)}})):a("Problem with initializing recaptcha")),O=e.find((o=>"password"===o.provider)),P=e.filter((o=>{var n;return"password"!==o.provider&&s(null==o||null===(n=o.platform)||void 0===n?void 0:n.identifier)}));return S(h,{children:[b(f,{children:"Sign In"}),b(u,{children:S(r,{container:!0,direction:"column",children:[b(d,{"data-not-migrated-MuiChip":!0,label:i,onClick:m}),P.map((o=>b(k,{item:!0,children:b(y,{title:o.title,provider:o.provider,connection:o.connection,platform:o.platform})},o.title))),O&&P.length>0&&b(r,{item:!0,children:b(v,{})}),O&&b(k,{item:!0,children:S("form",{id:"sign-in-form",onSubmit:I,children:[b(j,{email:i}),b(l,{value:F,onChange:o=>{q(o.target.value),R(!1)},disabled:x.loading,error:E})]})})]})}),b(g,{needHelpExternalLink:L,children:O&&b(B,{"data-testid":"".concat("AuthorizationPo","_signInButton"),form:"sign-in-form",type:"submit",variant:"contained",color:"primary",disabled:!F||x.loading||!!E,onClick:I,children:"Sign In"})})]})}C.propTypes={email:i.string.isRequired,schemas:i.arrayOf(i.shape({})).isRequired,onBack:i.func.isRequired,onFinishLogin:i.func.isRequired};var x=o(C);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{memo as o,useState as n}from"react";import t from"prop-types";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/Login.js";import"../../../../components/Login/components/PasswordField.js";import"../../../../components/Login/components/Chip.js";import m from"../../../../components/Login/components/StepFooter.js";import s from"../../../../components/Login/components/StepContent.js";import p from"../../../../components/Login/components/StepHeader.js";import c from"../../../../components/Login/components/Step.js";import"../../../../components/Login/components/OrDivider.js";import"../../../../components/Login/components/HiddenEmailField.js";import a from"../../../../components/Login/components/EmailField.js";import{NEED_HELP_EXTERNAL_LINK as l}from"../../../constants/index.js";import{jsxs as d,jsx as u}from"react/jsx-runtime";const f=e(i)((o=>{let{theme:n}=o;return{width:71,padding:n.spacing(),backgroundColor:n.status.loginButton,"&:hover":{backgroundColor:"".concat(n.status.loginButtonHovered)}}}));function g(o){let{onNext:t}=o;const[e,i]=n(!1),[g,h]=n(null),[j,L]=n(""),v=o=>{o.preventDefault(),j?(async o=>{i(!0);try{const n=await r({email:o,with_provider:!0});i(!1),t(o,n.schemas)}catch(o){i(!1),h("Invalid email")}})(j):h("Required")};return d(c,{children:[u(p,{children:"Sign In"}),u(s,{children:u("form",{id:"email-form",onSubmit:v,autoComplete:"on",children:u(a,{value:j,onChange:o=>{L(o.target.value),h(null)},disabled:!!e,error:g})})}),u(m,{needHelpExternalLink:l,children:u(f,{"data-testid":"EmailPo_nextButton",form:"email-form",type:"submit",variant:"contained",color:"primary",disabled:e||!!g,onClick:v,children:"Next"})})]})}g.propTypes={onNext:t.func.isRequired};var h=o(g);export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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
|
|
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
|
-
import
|
|
1
|
+
import t from"react-dom";import e from"../../../CLI/hocs/withCorvaMagicHOC.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=e({component:s.default.component,settings:s.default.settings,manifest:r.default,packageJson:c.default});t.render(o(a,{}),document.getElementById("root"))}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"react-dom";import t from"prop-types";import{makeStyles as n}from"@material-ui/core";import*as p from"@corva/ui";import{DevCenterIsolatedAppPage as e}from"@corva/ui/components";import{jsx as r}from"react/jsx-runtime";window["@corva/ui"]=p;
|
|
1
|
+
import o from"react-dom";import t from"prop-types";import{makeStyles as n}from"@material-ui/core";import*as p from"@corva/ui";import{DevCenterIsolatedAppPage as e}from"@corva/ui/components";import{jsx as r}from"react/jsx-runtime";window["@corva/ui"]=p;const m=n((()=>({reportsContainer:{zoom:"0.5"}})));function i(o){let{CLIAppComponent:t,CLIAppSettings:n}=o;const p=m();return r(e,{CLIAppComponent:t,CLIAppSettings:n,containerReportClassName:p.reportsContainer})}i.propTypes={CLIAppComponent:t.func,CLIAppSettings:t.func},i.defaultProps={CLIAppComponent:()=>null,CLIAppSettings:()=>null},import("".concat(process.env.DEV_CENTER_APP_PATH,"/src/index.js")).then((t=>{const n=t.default.component,p=t.default.settings;o.render(r(i,{CLIAppComponent:n,CLIAppSettings:p}),document.getElementById("root"))}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const a={qa:"qa",staging:"staging",production:"production"},t={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"},e={[a.qa]:{...t,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"},[a.staging]:{...t,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"},[a.production]:{...t,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=a,exports.CORVA_API_ENV_VARIABLES=e,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","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.4","mapbox.js":"3.2.1",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.UNSUPPORTED_DEPENDENCIES=[{dependency:"date-fns",alternative:"moment"},{dependency:"date-fns-tz",alternative:"moment-timezone"},{dependency:"date-fns-timezone",alternative:"moment-timezone"}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,r=require('./../../../../ext-cjs/@babel/runtime/helpers/taggedTemplateLiteral.js')
|
|
1
|
+
"use strict";var e,r=require('./../../../../ext-cjs/@babel/runtime/helpers/taggedTemplateLiteral.js');const n=require("node-fetch"),o=require("chalk"),t=require("semver/functions/gt"),s=require("path"),a=require("fs"),i=process.cwd(),u=JSON.parse(a.readFileSync(s.resolve(i,"./node_modules/@corva/ui/package.json"),"utf-8"));const c="checkCorvaUIVersion";let l=null;module.exports=function(s){s.hooks.afterCompile.tapPromise(c,(async s=>{const a=s.getLogger(c),i=u.version;l||(l=await function(e){return n("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)))}(a)),l&&t(l,i)&&a.warn(o(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,l))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require(
|
|
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});
|
|
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(){const e=(arguments.length>1?arguments[1]:void 0)||{};return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("\n").map((n=>{if(!n.length||n.startsWith("#"))return n;const[c]=n.split("=");if(Object.keys(e).includes(c)){const n=e[c];return delete e[c],t(c,n)}return n})).concat(Object.entries(e).map((e=>{let[n,c]=e;return t(n,c)}))).join("\n")};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require(
|
|
1
|
+
"use strict";var e=require("../constants.js");module.exports=function(n){let{dependencies:t={}}=n;const c=[];return Object.entries(e.CORVA_GLOBAL_DEPENDENCIES).forEach((e=>{let[n,s]=e;if(s&&n in t){const e=t[n];Array.isArray(s)?s.includes(e)||c.push("".concat(n," version must be one of [").concat(s.join(", "),"]")):e!==s&&c.push("".concat(n," version must be ").concat(s))}})),e.UNSUPPORTED_DEPENDENCIES.forEach((e=>{let{dependency:n,alternative:s=""}=e;n in t&&c.push("".concat(n," is not supported.").concat(s?" Please use ".concat(s," instead."):""))})),c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./dependencies.js")
|
|
1
|
+
"use strict";var e=require("./dependencies.js");const o=require("chalk");module.exports=function(s){let{packageJson:c}=s;const r=e(c);r.forEach((e=>console.log(o.red(e)))),r.length&&process.exit(1)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./validators/index.js")
|
|
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"),n=process.cwd(),l=JSON.parse(a.readFileSync(o.resolve(n,"./package.json"),"utf-8")),p=JSON.parse(a.readFileSync(o.resolve(n,"./manifest.json"),"utf-8"));exports.APP_DIRECTORY=n,exports.default=function(a,n){return e({packageJson:l}),{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:/\.css$/i,use:["style-loader",{loader:"css-loader",options:{modules:{localIdentName:"development"===n.mode?"[path][name]__[local]__".concat(r().substr(-5)):"[name]__[hash:base64:3]".concat(r().substr(-5))},importLoaders:1}},{loader:"postcss-loader",options:{postcssOptions:{plugins:["postcss-preset-env"]}}}]},{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}}}]}]}}},exports.manifestJson=p,exports.packageJson=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require(
|
|
1
|
+
"use strict";var e=require("./webpack.config.common.js"),r=require("./constants.js"),o=require("./plugins/checkCorvaUIVersion.js"),n=require("./utils/middlewares.js");const s=require("@pmmmwh/react-refresh-webpack-plugin"),{merge:t}=require("webpack-merge"),i=require("path"),l=require("webpack"),{CleanWebpackPlugin:a}=require("clean-webpack-plugin"),c=require("copy-webpack-plugin"),p=require("html-webpack-plugin"),u=require("chalk");require("dotenv").config({path:i.resolve(e.APP_DIRECTORY,"./.env")});const d=()=>{const e=process.env.CORVA_API_ENV||r.CORVA_API_ENVS.production;return e in r.CORVA_API_ENVS?r.CORVA_API_ENV_VARIABLES[e]:(console.log(u.red("CORVA_API_ENV should be one of [".concat(Object.keys(r.CORVA_API_ENVS).join(", "),"]"))),process.exit(1))};function m(e,r,o){const n=i.join("@corva","dc-platform-shared"),s="@corva/ui",t=new RegExp("(^".concat(s,"$|^").concat(s,"/)([^]+)?"));if(!e.includes(n)){const e=t.exec(r);if(null!==e){return o(null,["window",s,...(e[2]||"").split("/").filter(Boolean)])}}return o()}module.exports=function(r,u){const v=process.env.HOST||u.host||"app.local.corva.ai",_=process.env.PORT||u.port||8080;return t(e.default(r,u),{mode:"development",devtool:"inline-source-map",devServer:{static:"./dist",host:v,port:_,onBeforeSetupMiddleware:r=>n.onBeforeSetupMiddleware(r.app,{APP_DIRECTORY:e.APP_DIRECTORY}),hot:!0,open:!1},entry:{devApp:i.resolve(__dirname,"DevServerEntryPoint.js"),isolatedApp:i.resolve(__dirname,"DevServerIsolatedAppEntryPoint.js")},output:{filename:"[name].js"},plugins:[new a,new c({patterns:[{from:i.resolve(__dirname,"public")},{from:i.resolve(process.cwd(),"node_modules","@corva/ui/assets"),to:"static/media",noErrorOnMissing:!0},{from:i.resolve(process.cwd(),"node_modules","@corva/dc-platform-shared/assets"),to:"static/media",noErrorOnMissing:!0}]}),new p({filename:"index.html",inject:!1,template:i.resolve(__dirname,"public","index.html")}),new p({filename:"DevCenterIsolatedAppPage.html",inject:!1,template:i.resolve(__dirname,"public","DevCenterIsolatedAppPage.html")}),new l.EnvironmentPlugin({...process.env,DEV_CENTER_APP_PATH:process.cwd(),REACT_APP_ENVIRONMENT:process.env.REACT_APP_ENVIRONMENT||"development",...d()}),o,new s],externals:m,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(
|
|
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:l}=e.packageJson,c=e=>{const r=a.replace(/\./g,"_");return e?r:"".concat(r,"-").concat(l)},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 l=!(null==r||!r.local_debug);return n(e.default(r,a),{entry:"./src/index.js",output:{library:c(l),path:o.resolve(e.APP_DIRECTORY,"dist"),filename:"app.js",libraryTarget:"window"},mode:l?"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){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|otf)$/i,type:"asset/resource"},{test:/\.svg$/,use:[{loader:"svg-url-loader",options:{limit:1e4}}]}]}})};
|
package/clients/auth0/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/
|
|
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"classnames";import a from"@material-ui/icons/DragIndicator";import i from"./AppsGridDragHandle.scss.js";import{jsxs as
|
|
1
|
+
import r from"classnames";import a from"@material-ui/icons/DragIndicator";import i from"./AppsGridDragHandle.scss.js";import{jsxs as s,Fragment as e,jsx as n}from"react/jsx-runtime";const o="grid-layout-drag-handle";function c(){return s(e,{children:[n("div",{className:r(i.dragLine,o),children:n("div",{className:i.dragIconContainer,children:n(a,{className:i.dragIcon})})}),n("div",{className:i.dragOverlay})]})}c.GRID_LAYOUT_DRAG_HANDLE_CLASS=o;export{c as AppsGridDragHandle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{makeStyles as o,Tooltip as a,IconButton as t}from"@material-ui/core";import{UnlockIcon as r,LockIcon as e}from"@corva/ui/icons";import c from"classnames";import{jsx as i}from"react/jsx-runtime";const l=o((o=>({root:{width:36,height:36,"&:hover":{backgroundColor:o.palette.background.b7},borderRadius:"50%"},button:{width:"100%",height:"100%","&:hover":{backgroundColor:o.palette.background.b7}}})));function s(o){let{className:e,disabled:s,isDraggableAndResizable:d,LockIcon:n,lockIconClassName:u,onClick:m,pageName:b,tooltipProps:h}=o;const k=l();return i(a,{title:s?"Can't unlock dashboard layout":d?"Lock Dashboard Layout":"Unlock Dashboard Layout",...h,children:i("div",{className:c(k.root,e),children:i(t,{className:k.button,"data-testid":"".concat(b,"_").concat(d?"gridUnlocked":"gridLocked"),disabled:s,onClick:m,children:d?i(r,{}):i(n,{className:u})})})})}s.defaultProps={LockIcon:e,tooltipProps:{}};export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
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";
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"prop-types";import{withStyles as r}from"@material-ui/core/styles";import i from"@material-ui/core/Grid";import{UniversalLink as n}from"@corva/ui/components";import{jsx as t,jsxs as l}from"react/jsx-runtime";function
|
|
1
|
+
import e from"prop-types";import{withStyles as r}from"@material-ui/core/styles";import i from"@material-ui/core/Grid";import{UniversalLink as n}from"@corva/ui/components";import{jsx as t,jsxs as l}from"react/jsx-runtime";const a="EmailPo",o="Need help?";function s(e){const{children:r,classes:s,showNeedHelp:d,needHelpExternalLink:p}=e;return t(i,{item:!0,className:s.gridItem,children:l(i,{container:!0,direction:"row",justify:"space-between",alignItems:"center",children:[l(i,{item:!0,children:[d&&!p&&t(n,{"data-testid":"".concat(a,"_needHelp"),className:s.helpLink,href:"/login/help",children:o}),d&&p&&t("a",{"data-testid":"".concat(a,"_needHelp"),className:s.helpLink,href:p,target:"_blank",rel:"noreferrer",children:o})]}),t(i,{item:!0,children:r})]})})}s.propTypes={children:e.node,showNeedHelp:e.bool,needHelpExternalLink:e.string,classes:e.shape({gridItem:e.string.isRequired,helpLink:e.string.isRequired}).isRequired},s.defaultProps={children:null,needHelpExternalLink:null,showNeedHelp:!0};var d=r((e=>({gridItem:{padding:e.spacing(2,4,4,4),width:"100%"},helpLink:{color:e.palette.primary.text6,textTransform:"uppercase",padding:e.spacing(1),borderRadius:4,"&:hover":{background:"#333",color:"#fff"}}})))(s);export{d 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 t from"@material-ui/core/Typography";import{jsx as s}from"react/jsx-runtime";function a(r){return s(i,{item:!0,className:r.classes.gridItem,children:s(t,{variant:"h6",children:r.children})})}a.propTypes={children:r.string.isRequired,classes:r.shape({gridItem:r.string.isRequired}).isRequired};var m=e((
|
|
1
|
+
import r from"prop-types";import{withStyles as e}from"@material-ui/core/styles";import i from"@material-ui/core/Grid";import t from"@material-ui/core/Typography";import{jsx as s}from"react/jsx-runtime";function a(r){return s(i,{item:!0,className:r.classes.gridItem,children:s(t,{variant:"h6",children:r.children})})}a.propTypes={children:r.string.isRequired,classes:r.shape({gridItem:r.string.isRequired}).isRequired};var m=e((r=>({gridItem:{padding:r.spacing(4),textAlign:"center",width:"100%"}})))(a);export{m as default};
|