@corva/dc-platform-shared 0.1.7-4 → 0.1.7-6
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.
|
@@ -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{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
|
|
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 +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 p}from"lodash";import{isPhoneDetected as s,isNativeDetected as a,isMobileDetected as m}from"@corva/ui/utils/mobileDetect";import{getAppSize as c}from"@corva/ui/utils/apps";import{GRID_BREAKPOINTS as l,GRID_COLUMN_SIZES as d,GRID_ROW_HEIGHT as g,NON_DRAGGABLE_ELEMENT_SELECTOR as u}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 f}from"../../../components/AppsGridDragHandle/AppsGridDragHandle.js";import b from"../../../components/GridLockButton/index.js";import{isAppMaximized as h}from"../../../utils/devcenter.js";import{getLocalAppData as j,getAppCoordinates as y,updateLocalAppData as O}from"../utils.js";import"./withGridLayoutHOC.global.css.js";import v from"./withGridLayoutHOC.css.js";import{jsxs as D,jsx as L}from"react/jsx-runtime";var w=["width"];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 S(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}var H=".".concat(f.GRID_LAYOUT_DRAG_HANDLE_CLASS),x=i(n),C=function(o){return i((function(i){var n,P=i.width,C=t(i,w),A=C.manifest.application.key,G=r(null!==(n=j(A).isDraggable)&&void 0!==n&&n),R=e(G,2),E=R[0],k=R[1],z=a||m,F=h(C.devCenterRouter.location.query),M=r(y(C.manifest)),W=e(M,2),_=W[0],N=W[1],T=c({coordinates:_,dashboardWidth:P,isMaximized:F}),B=T.pixelHeight,q=T.pixelWidth,I=function(o){var t=e(o,1)[0],r=p(t,["x","y","w","h"]);N(r),O(A,{coordinates:r})};return D("div",{children:[L(x,{breakpoints:s?l.phone:l.general,cols:d,rowHeight:g,measureBeforeMount:!0,onResizeStop:I,onDragStop:I,isDraggable:!z&&E,isResizable:!z&&E,draggableCancel:u,useCSSTransforms:!1,draggableHandle:H,children:L("div",{"data-grid":_,children:D("div",{className:F?v.appMaximized:"",children:[L(o,S(S({},C),{},{coordinates:S(S({},_),{},{pixelHeight:B,pixelWidth:q}),layoutEnvironment:{type:"general",pdfReportMode:!1}})),!z&&E&&L(f,{})]})},"with-grid-layout-hoc")}),L(b,{isDraggableAndResizable:E,onClick:function(){k(!E),O(A,{isDraggable:!E})},pageName:"DashboardPo"})]})}))};export{C as default};
|
|
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 p}from"lodash";import{isPhoneDetected as s,isNativeDetected as a,isMobileDetected as m}from"@corva/ui/utils/mobileDetect";import{getAppSize as c}from"@corva/ui/utils/apps";import{GRID_BREAKPOINTS as l,GRID_COLUMN_SIZES as d,GRID_ROW_HEIGHT as g,NON_DRAGGABLE_ELEMENT_SELECTOR as u}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 f}from"../../../components/AppsGridDragHandle/AppsGridDragHandle.js";import b from"../../../components/GridLockButton/index.js";import{isAppMaximized as h}from"../../../utils/devcenter.js";import"../../../utils/recaptcha.js";import{getLocalAppData as j,getAppCoordinates as y,updateLocalAppData as O}from"../utils.js";import"./withGridLayoutHOC.global.css.js";import v from"./withGridLayoutHOC.css.js";import{jsxs as D,jsx as L}from"react/jsx-runtime";var w=["width"];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 S(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}var H=".".concat(f.GRID_LAYOUT_DRAG_HANDLE_CLASS),x=i(n),C=function(o){return i((function(i){var n,P=i.width,C=t(i,w),A=C.manifest.application.key,G=r(null!==(n=j(A).isDraggable)&&void 0!==n&&n),R=e(G,2),E=R[0],k=R[1],z=a||m,F=h(C.devCenterRouter.location.query),M=r(y(C.manifest)),W=e(M,2),_=W[0],N=W[1],T=c({coordinates:_,dashboardWidth:P,isMaximized:F}),B=T.pixelHeight,q=T.pixelWidth,I=function(o){var t=e(o,1)[0],r=p(t,["x","y","w","h"]);N(r),O(A,{coordinates:r})};return D("div",{children:[L(x,{breakpoints:s?l.phone:l.general,cols:d,rowHeight:g,measureBeforeMount:!0,onResizeStop:I,onDragStop:I,isDraggable:!z&&E,isResizable:!z&&E,draggableCancel:u,useCSSTransforms:!1,draggableHandle:H,children:L("div",{"data-grid":_,children:D("div",{className:F?v.appMaximized:"",children:[L(o,S(S({},C),{},{coordinates:S(S({},_),{},{pixelHeight:B,pixelWidth:q}),layoutEnvironment:{type:"general",pdfReportMode:!1}})),!z&&E&&L(f,{})]})},"with-grid-layout-hoc")}),L(b,{isDraggableAndResizable:E,onClick:function(){k(!E),O(A,{isDraggable:!E})},pageName:"DashboardPo"})]})}))};export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/regenerator";import{memo as t,useState as e,useEffect as i}from"react";import a from"prop-types";import{styled as c,Grid as m,Button as p}from"@material-ui/core";import{showErrorNotification as s}from"@corva/ui/utils";import{initializeRecaptcha as u,GOOGLE_RECAPTCHA_KEY as l}from"
|
|
1
|
+
import n from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/regenerator";import{memo as t,useState as e,useEffect as i}from"react";import a from"prop-types";import{styled as c,Grid as m,Button as p}from"@material-ui/core";import{showErrorNotification as s}from"@corva/ui/utils";import{initializeRecaptcha as u,GOOGLE_RECAPTCHA_KEY as l}from"../../../../utils/recaptcha.js";import"../../../../components/Login/components/Login.js";import d from"../../../../components/Login/components/PasswordField.js";import f from"../../../../components/Login/components/Chip.js";import g from"../../../../components/Login/components/StepFooter.js";import h from"../../../../components/Login/components/StepContent.js";import v from"../../../../components/Login/components/StepHeader.js";import b from"../../../../components/Login/components/Step.js";import w from"../../../../components/Login/components/OrDivider.js";import j from"../../../../components/Login/components/HiddenEmailField.js";import"../../../../components/Login/components/EmailField.js";import{useAuth as L}from"../../../context/auth.js";import{NEED_HELP_EXTERNAL_LINK as y}from"../../../constants/index.js";import k from"./SSOButton.js";import{jsxs as S,jsx as x}from"react/jsx-runtime";var B=c(m)((function(n){var o=n.theme;return{marginTop:2*o.spacing(1),marginBottom:2*o.spacing(1),"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0}}})),C=c(p)((function(n){var o=n.theme;return{width:71,padding:o.spacing(),whiteSpace:"nowrap",backgroundColor:o.status.loginButton,"&:hover":{backgroundColor:"".concat(o.status.loginButtonHovered)}}}));function F(t){var a=t.email,c=t.schemas,p=t.onBack,F=t.onFinishLogin,T=L(),q=e(""),H=o(q,2),R=H[0],E=H[1],I=e(!1),O=o(I,2),P=O[0],z=O[1],A=P?T.error:null;i((function(){u()}),[]);var D,_=(D=n(r.mark((function n(o){return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o.preventDefault(),window.grecaptcha){n.next=3;break}return n.abrupt("return",s("Problem with initializing recaptcha"));case 3:return n.abrupt("return",window.grecaptcha.enterprise.ready((function(){try{window.grecaptcha.enterprise.execute(l,{action:"login"}).then((function(n){T.login({email:a,password:R,recaptcha_token:n},F).then((function(){z(!0)}))})).catch((function(n){return console.error(n)}))}catch(n){console.error(n),s(n.message)}})));case 4:case"end":return n.stop()}}),n)}))),function(n){return D.apply(this,arguments)}),G=c.find((function(n){return"password"===n.provider})),M=c.filter((function(n){return"password"!==n.provider}));return S(b,{children:[x(v,{children:"Sign In"}),x(h,{children:S(m,{container:!0,direction:"column",children:[x(f,{"data-not-migrated-MuiChip":!0,label:a,onClick:p}),M.map((function(n){return x(B,{item:!0,children:x(k,{title:n.title,provider:n.provider,connection:n.connection,auth0:T.auth0})},n.title)})),G&&M.length>0&&x(m,{item:!0,children:x(w,{})}),G&&x(B,{item:!0,children:S("form",{id:"sign-in-form",onSubmit:_,children:[x(j,{email:a}),x(d,{value:R,onChange:function(n){E(n.target.value),z(!1)},disabled:T.loading,error:A})]})})]})}),x(g,{needHelpExternalLink:y,children:G&&x(C,{"data-testid":"".concat("AuthorizationPo","_signInButton"),form:"sign-in-form",type:"submit",variant:"contained",color:"primary",disabled:!R||T.loading||!!A,onClick:_,children:"Sign In"})})]})}F.propTypes={email:a.string.isRequired,schemas:a.arrayOf(a.shape({})).isRequired,onBack:a.func.isRequired,onFinishLogin:a.func.isRequired};var T=t(F);export{T as default};
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=(process.env.REACT_APP_API_URL||"").includes("api.corva.ai")?"6LcD9rIiAAAAABAlTq0c4mpbiwdcEN10wDbqcYT4":"6LcdL7IiAAAAAAgBjpeKEf_b_T-mqDAjOvuNOjCz";function e(){var e=document.createElement("script");e.async=!0,e.src="https://www.google.com/recaptcha/enterprise.js?render=".concat(c),document.body.appendChild(e)}export{c as GOOGLE_RECAPTCHA_KEY,e as initializeRecaptcha};
|