@corva/ui 0.25.0-2 → 0.25.0-3
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 t from"@babel/runtime/helpers/defineProperty";import{pickBy as e,pick as n,noop as o}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../constants/goals.js";import"../../../constants/apps.js";import"../../../constants/completion.js";import{SEGMENTS as s}from"../../../constants/segment.js";import"../../../constants/alerts.js";import{DEV_CENTER_CLI_APP_ID as r}from"../../../constants/devcenter.js";import"../../../constants/drillstring.js";import{getAppName as p,getTimestampFromQuery as a}from"../../../utils/devcenter.js";import{isNativeDetected as m,isMobileDetected as l}from"../../../utils/mobileDetect.js";import{jsx as
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import{pickBy as e,pick as n,noop as o}from"lodash";import i from"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../constants/goals.js";import"../../../constants/apps.js";import"../../../constants/completion.js";import{SEGMENTS as s}from"../../../constants/segment.js";import"../../../constants/alerts.js";import{DEV_CENTER_CLI_APP_ID as r}from"../../../constants/devcenter.js";import"../../../constants/drillstring.js";import{getAppName as p,getTimestampFromQuery as a}from"../../../utils/devcenter.js";import{isNativeDetected as m,isMobileDetected as l}from"../../../utils/mobileDetect.js";import{showSuccessNotification as c}from"../../../utils/notificationToasts.js";import"../../../utils/index.js";import{jsx as u,jsxs as d,Fragment as g}from"react/jsx-runtime";import{useContext as A,useState as f}from"react";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import v from"../../../effects/useDevCenterApp.js";import"@babel/runtime/helpers/objectWithoutProperties";import j from"classnames";import{AnnotationsProvider as C}from"../../Annotations/AnnotationsContext.js";import{DevCenterRouterContext as b}from"../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import y from"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import h from"../AppContext.js";import I from"./effects/useAppSettings.js";import D from"./effects/useAnnotationsList.js";import M from"./effects/useAnnotationsData.js";import S from"./effects/useAppMaximized.js";import L from"./components/AppActions/AppActions.js";import x from"./components/AppSettingsDialog/AppSettingsDialog.js";import O from"./components/AnnotationsButton/AnnotationsButton.js";import P from"./components/NonPriorityMenus/NonPriorityMenus.js";import R from"./components/FullscreenButton/FullscreenButton.js";import"./components/AppInfoMessage/AppInfoMessage.js";import w from"./components/DevCenterAppView/DevCenterAppView.js";import z from"./DevCenterAppContainer.css.js";import N from"./components/RestoreAppSizeButton/index.js";import{getAppVersion as E}from"./utils.js";import F from"./components/PriorityMenus/PriorityMenus.js";function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function k(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?U(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):U(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var B=m||l;function q(t){var l,U,q,T,_,G,V,H=t.CLIAppComponent,K=t.CLIAppSettings,W=t.app,J=t.appId,Q=t.coordinates,X=t.currentDashboardAppsLastAnnotations,Y=t.currentUser,Z=t.devCenterRouter,$=t.isActionsDisabled,tt=t.isAppNotSubscribed,et=t.layoutEnvironment,nt=t.onAppRemove,ot=t.onIsMaximizedChange,it=t.onSettingChange,st=t.onSettingsChange,rt=t.setIsFullscreenModalMode,pt=void 0===rt?o:rt,at=t.updateCurrentDashboardAppLastAnnotation,mt=A(h),lt=f([]),ct=i(lt,2),ut=ct[0],dt=ct[1],gt=f([]),At=i(gt,2),ft=At[0],vt=At[1],jt=null!==(l=null==mt?void 0:mt[J||W.id])&&void 0!==l?l:{isLoading:!0},Ct=null===(U=W.package)||void 0===U||null===(q=U.manifest)||void 0===q?void 0:q.application,bt=(null==Ct||null===(T=Ct.segments)||void 0===T?void 0:T[0])||s.DRILLING,yt=!(null==Ct||null===(_=Ct.ui)||void 0===_||!_.multi_rig),ht=p(W),It=S({onIsMaximizedChange:ot,devCenterRouter:Z,appId:J}),Dt=It.isMaximized,Mt=It.setIsMaximized,St=a(null===(G=Z.location.query)||void 0===G?void 0:G.query),Lt=W.id===r&&B?k(k({},Q),{},{w:12}):Q,xt=v({CLIAppComponent:H,CLIAppSettings:K,url:null==W||null===(V=W.package)||void 0===V?void 0:V.url,appKey:W.app.app_key,version:E(W)}),Ot=xt.isLoading,Pt=xt.AppSettings,Rt=xt.AppComponent,wt=I({setIsFullscreenModalMode:pt}),zt=wt.isAppSettingsDialogOpened,Nt=wt.toggleAppSettingsDialog,Et=D(),Ft=Et.isAnnotationsListOpened,Ut=Et.toggleAnnotationsList,kt=Ot||!Y||!yt&&jt.isLoading,Bt=Z.location,qt=Bt.pathname,Tt=Bt.query,_t=M({app:W,appData:jt,currentDashboardAppsLastAnnotations:X}),Gt=_t.appLastAnnotation,Vt=_t.assetCompanyId,Ht=_t.assetIdForAnnotation,Kt=_t.isAppSupportsAnnotations,Wt=e(n(jt,["well","rig","fracFleet","wells"]),Boolean);return u(b.Provider,{value:Z,children:d("div",{className:j("dc-app-container",z.container),"data-testid":"".concat("DevCenter_AppContainer","_").concat(W.app.name),children:[u("div",{className:z.containerContent,children:u(w,{AppComponent:Rt,app:W,appData:Wt,isAppLoading:Ot,isAppNotSubscribed:tt,isLoading:kt,isMultiRig:yt,segment:bt,layoutEnvironment:et,appProps:{coordinates:Lt,currentUser:Y,devCenterRouter:Z,onSettingChange:it,onSettingsChange:st,setIsFullscreenModalMode:pt,setIsMaximized:Mt,setMainMenuItems:dt,setSecondaryMenuItems:vt,appHeaderProps:k({app:W,appLastAnnotation:Gt,appSettings:W.settings,coordinates:Lt,currentUser:Y,isMaximized:Dt,layoutEnvironment:et,onSettingChange:it,toggleAnnotationsList:Ut,updateCurrentDashboardAppLastAnnotation:at},Wt),isNative:m,layoutEnvironment:et,timestamp:St}})}),zt&&u(x,{AppSettingsComponent:Pt,app:W,appData:jt,appName:ht,currentUser:Y,isMultiRig:yt,layoutEnvironment:et,onAppRemove:nt,onSettingChange:it,onSettingsChange:st,segment:bt,timestamp:St,toggleAppSettingsDialog:Nt}),Ft&&u(C,{children:u(y,{appId:W.app.id,appSettings:W.settings,appTitle:W.name,assetCompanyId:Vt,assetId:Ht,currentUser:Y,onClose:Ut,showSuccessNotification:c})}),!$&&Dt&&u(N,{setIsMaximized:Mt}),d(L,{children:[Kt&&u(O,{toggleAnnotationsList:Ut}),B&&!Dt?u(R,{setIsMaximized:Mt}):d(g,{children:[u(F,{menuItems:ut,devCenterRouter:Z}),u(P,{appId:W.id,devCenterRouter:Z,isMaximized:Dt,menuItems:ft,pathname:qt,query:Tt,setIsMaximized:Mt,toggleAppSettingsDialog:Nt})]})]})]})})}export default q;
|