@corva/ui 0.34.0-8 → 0.34.0-9
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 e from'../../../ext-esm/style-inject/dist/style-inject.es.js';e(".AppHeaderNew_appHeaderContainer__1Jw7S{display:flex}.AppHeaderNew_titleBlock__2Hcti{display:inline;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:8px}.AppHeaderNew_headerComponents__3IHT4{display:flex;justify-content:flex-end}.AppHeaderNew_padModeSelect__2TzNO{height:24px}.AppHeaderNew_padModeSelect__2TzNO>div:first-child{padding-top:0!important}.AppHeaderNew_smallPadModeSelect__3_IUP{height:24px;margin-top:8px}.AppHeaderNew_smallPadModeSelect__3_IUP>div:first-child{padding-left:0;padding-top:8px;padding-bottom:0}.AppHeaderNew_titleWrapper__1COp-{display:flex;align-items:center}.AppHeaderNew_title__3HPRS{margin:0 8px 0 1px;font-size:18px;font-weight:500;line-height:24px}.AppHeaderNew_subtitle__2SNhn,.AppHeaderNew_title__3HPRS{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.AppHeaderNew_subtitle__2SNhn{color:#888;margin:0 0 0 1px;font-size:12px;font-weight:400;line-height:16px}.AppHeaderNew_mediumSizeContent__1YMaM{margin-top:8px;justify-content:flex-start}.AppHeaderNew_mediumSizeContent__1YMaM .AppHeaderNew_headerChildren__1oNXF{padding:0}.AppHeaderNew_headerChildren__1oNXF{display:flex;padding:0 0 12px 16px}.AppHeaderNew_headerChildren__1oNXF,.AppHeaderNew_headerChildren__1oNXF>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.AppHeaderNew_assetNameLabelContainer__gOqPe{position:absolute;right:15px;z-index:100;display:flex;justify-content:flex-end;margin-top:4px;top:10px;width:100%}.AppHeaderNew_appMaximized__3OxKZ{margin-right:28px}.AppHeaderNew_item__2o5s3{line-height:20px;padding:0 12px;border-radius:10px;background-color:#434343;font-size:.85rem;color:var(--palette-primary-text-1)}.dc-app-container__light-theme .AppHeaderNew_item__2o5s3{background-color:#bdbdbd}.AppHeaderNew_item__2o5s3.AppHeaderNew_secondaryAsset__tx0UG{background-color:#d860d8;margin-right:4px;min-width:60px;text-overflow:ellipsis;height:21px;overflow:hidden;white-space:nowrap}.AppHeaderNew_seccondaryAssetWrapper__3sySe{max-width:20%}.AppHeaderNew_seccondaryAssetLink__A-muP{width:100%;padding:0}");export default{appHeaderContainer:"AppHeaderNew_appHeaderContainer__1Jw7S",titleBlock:"AppHeaderNew_titleBlock__2Hcti",headerComponents:"AppHeaderNew_headerComponents__3IHT4",padModeSelect:"AppHeaderNew_padModeSelect__2TzNO",smallPadModeSelect:"AppHeaderNew_smallPadModeSelect__3_IUP",titleWrapper:"AppHeaderNew_titleWrapper__1COp-",title:"AppHeaderNew_title__3HPRS",subtitle:"AppHeaderNew_subtitle__2SNhn",mediumSizeContent:"AppHeaderNew_mediumSizeContent__1YMaM",headerChildren:"AppHeaderNew_headerChildren__1oNXF",assetNameLabelContainer:"AppHeaderNew_assetNameLabelContainer__gOqPe",appMaximized:"AppHeaderNew_appMaximized__3OxKZ",item:"AppHeaderNew_item__2o5s3",secondaryAsset:"AppHeaderNew_secondaryAsset__tx0UG",seccondaryAssetWrapper:"AppHeaderNew_seccondaryAssetWrapper__3sySe",seccondaryAssetLink:"AppHeaderNew_seccondaryAssetLink__A-muP"};
|
|
1
|
+
import e from'../../../ext-esm/style-inject/dist/style-inject.es.js';e(".AppHeaderNew_appHeaderContainer__1Jw7S{display:flex}.AppHeaderNew_titleBlock__2Hcti{display:inline;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:8px}.AppHeaderNew_headerComponents__3IHT4{display:flex;justify-content:flex-end}.AppHeaderNew_padModeSelect__2TzNO{height:24px}.AppHeaderNew_padModeSelect__2TzNO>div:first-child{padding-top:0!important}.AppHeaderNew_smallPadModeSelect__3_IUP{height:24px;margin-top:8px}.AppHeaderNew_smallPadModeSelect__3_IUP>div:first-child{padding-left:0;padding-top:8px;padding-bottom:0}.AppHeaderNew_titleWrapper__1COp-{display:flex;align-items:center}.AppHeaderNew_title__3HPRS{margin:0 8px 0 1px;font-size:18px;font-weight:500;line-height:24px;z-index:1000}.AppHeaderNew_subtitle__2SNhn,.AppHeaderNew_title__3HPRS{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.AppHeaderNew_subtitle__2SNhn{color:#888;margin:0 0 0 1px;font-size:12px;font-weight:400;line-height:16px}.AppHeaderNew_mediumSizeContent__1YMaM{margin-top:8px;justify-content:flex-start}.AppHeaderNew_mediumSizeContent__1YMaM .AppHeaderNew_headerChildren__1oNXF{padding:0}.AppHeaderNew_headerChildren__1oNXF{display:flex;padding:0 0 12px 16px}.AppHeaderNew_headerChildren__1oNXF,.AppHeaderNew_headerChildren__1oNXF>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.AppHeaderNew_assetNameLabelContainer__gOqPe{position:absolute;right:15px;z-index:100;display:flex;justify-content:flex-end;margin-top:4px;top:10px;width:100%}.AppHeaderNew_appMaximized__3OxKZ{margin-right:28px}.AppHeaderNew_item__2o5s3{line-height:20px;padding:0 12px;border-radius:10px;background-color:#434343;font-size:.85rem;color:var(--palette-primary-text-1)}.dc-app-container__light-theme .AppHeaderNew_item__2o5s3{background-color:#bdbdbd}.AppHeaderNew_item__2o5s3.AppHeaderNew_secondaryAsset__tx0UG{background-color:#d860d8;margin-right:4px;min-width:60px;text-overflow:ellipsis;height:21px;overflow:hidden;white-space:nowrap}.AppHeaderNew_seccondaryAssetWrapper__3sySe{max-width:20%}.AppHeaderNew_seccondaryAssetLink__A-muP{width:100%;padding:0}");export default{appHeaderContainer:"AppHeaderNew_appHeaderContainer__1Jw7S",titleBlock:"AppHeaderNew_titleBlock__2Hcti",headerComponents:"AppHeaderNew_headerComponents__3IHT4",padModeSelect:"AppHeaderNew_padModeSelect__2TzNO",smallPadModeSelect:"AppHeaderNew_smallPadModeSelect__3_IUP",titleWrapper:"AppHeaderNew_titleWrapper__1COp-",title:"AppHeaderNew_title__3HPRS",subtitle:"AppHeaderNew_subtitle__2SNhn",mediumSizeContent:"AppHeaderNew_mediumSizeContent__1YMaM",headerChildren:"AppHeaderNew_headerChildren__1oNXF",assetNameLabelContainer:"AppHeaderNew_assetNameLabelContainer__gOqPe",appMaximized:"AppHeaderNew_appMaximized__3OxKZ",item:"AppHeaderNew_item__2o5s3",secondaryAsset:"AppHeaderNew_secondaryAsset__tx0UG",seccondaryAssetWrapper:"AppHeaderNew_seccondaryAssetWrapper__3sySe",seccondaryAssetLink:"AppHeaderNew_seccondaryAssetLink__A-muP"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{get as e}from"lodash";import"../../../constants/completion.js";import"../../../constants/alerts.js";import t from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as n}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import{SEGMENTS as a}from"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getAppName as i,getAppSegment as s}from"../../../utils/devcenter.js";import{jsxs as o,Fragment as r,jsx as l}from"react/jsx-runtime";import{useRef as
|
|
1
|
+
import{get as e}from"lodash";import"../../../constants/completion.js";import"../../../constants/alerts.js";import t from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as n}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import{SEGMENTS as a}from"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import{getAppName as i,getAppSegment as s}from"../../../utils/devcenter.js";import{jsxs as o,Fragment as r,jsx as l}from"react/jsx-runtime";import{Tooltip as d}from"@material-ui/core";import{useRef as p,useState as c,useEffect as m}from"react";import u from"prop-types";import h from"classnames";import"../../Annotations/AnnotationsContext.js";import"../../Annotations/components/AnnotationsList/index.js";import f from"../../Annotations/components/LastAnnotation/index.js";import v from"./VersionBadge.js";import A from"./PadMode.js";import{getAppDimension as g}from"./utils.js";import L from"../../AssetNameLabel/SecondaryAssetNameLabel.js";import b from"../../AssetNameLabel/PrimaryAssetNameLabel.js";import N from"./AppHeaderNew.css.js";var j="DevCenter_AppHeader",w="EXTRA_LARGE",C="SMALL";function S(u){var S,_,x,y,M=u.app,W=u.appLastAnnotation,I=u.appSettings,R=u.badge,z=u.classes,H=u.coordinates,P=u.currentUser,D=u.fracFleet,F=u.isMaximized,T=u.onSettingChange,q=u.openAnnotationsList,O=u.rig,k=u.showLastAnnotation,U=u.updateCurrentDashboardAppLastAnnotation,E=u.well,B=u.wells,G=u.children,V=null==H?void 0:H.pixelWidth,X=g(V),J=i(M),K=null==M||null===(S=M.package)||void 0===S||null===(_=S.manifest)||void 0===_||null===(x=_.application)||void 0===x?void 0:x.subtitle,Q=s(M),Y=Q===a.DRILLING,Z=(null==M?void 0:M.settings)||{},$=Z.wellId,ee=Z.rigId,te=Z.fracFleetId,ne=Z.padId,ae=ne&&(null==D||null===(y=D.pad_frac_fleets.find((function(e){return e.pad.id===ne})))||void 0===y?void 0:y.pad),ie=Y?null==O?void 0:O.name:null==D?void 0:D.name,se=Y?$&&(null==E?void 0:E.name):ne&&(null==ae?void 0:ae.name),oe=!!($||ee||te),re=null!=D&&D.current_pad_id?"assets/types/pad/".concat(null==D?void 0:D.current_pad_id):null,le=Y?ie&&"assets/".concat(null==E?void 0:E.asset_id):re,de=ne&&"assets/types/pad/".concat(ne),pe=M&&M.id===n,ce=p(null),me=c({width:0}),ue=t(me,2),he=ue[0],fe=ue[1],ve=c({width:0}),Ae=t(ve,2),ge=Ae[0],Le=Ae[1],be=c(0),Ne=t(be,2),je=Ne[0],we=Ne[1],Ce=c(!1),Se=t(Ce,2),_e=Se[0],xe=Se[1];return m((function(){var e,t;we((null==he?void 0:he.width)+(null==ge?void 0:ge.width)+16),xe(Math.abs((null===(e=ce.current)||void 0===e?void 0:e.offsetWidth)-(null===(t=ce.current)||void 0===t?void 0:t.scrollWidth))>1)}),[null==he?void 0:he.width,null==ge?void 0:ge.width,V]),o(r,{children:[o("div",{className:h(N.appHeaderContainer,z.appHeader),children:[o("div",{className:N.titleBlock,children:[o("div",{className:z.appHeaderTitleWrapper,ref:ce,children:[o("div",{className:N.titleWrapper,children:[l(d,{title:_e?J:"",placement:"bottom",children:l("h6",{"data-testid":"".concat(j,"_name"),className:N.title,children:J})}),l(v,{app:M})]}),R]}),K&&l("h6",{"data-testid":"".concat(j,"_subtitle"),className:N.subtitle,children:K})]}),o("div",{className:N.headerComponents,style:{marginRight:"".concat(je,"px")},children:[X===w&&l("div",{className:N.headerChildren,children:G}),Q===a.COMPLETION&&X!==C&&l("div",{className:N.padModeSelect,children:l(A,{fracFleet:D,wells:B,well:E,onSettingChange:T,appSettings:I})})]}),M&&H&&o("div",{className:h(N.assetNameLabelContainer,F&&N.appMaximized),children:[se&&l(L,{secondaryAssetName:se,coordinatesPixelWidth:H.pixelWidth,secondaryAssetLink:!pe&&de,pageName:j,onSize:function(e){return Le(e)}}),oe&&l(b,{primaryAssetName:ie,pageName:j,coordinatesPixelWidth:H.pixelWidth,primaryAssetLink:le,onSize:function(e){return fe(e)}})]}),k&&W&&l(f,{dashboardAppId:M.id,appId:e(M,["app","id"]),annotation:W,openAnnotationsList:q,updateCurrentDashboardAppLastAnnotation:U,currentUser:P})]}),X===C&&l("div",{className:h(N.padModeSelect,N.smallPadModeSelect),children:l(A,{fracFleet:D,wells:B,well:E,onSettingChange:T,appSettings:I})}),X!==w&&l("div",{className:h(N.mediumSizeContent,N.headerComponents),children:l("div",{className:N.headerChildren,children:G})})]})}S.propTypes={app:u.object.isRequired,badge:u.node,classes:u.shape({appHeader:u.string,appHeaderTitleWrapper:u.string}),showLastAnnotation:u.bool,currentUser:u.shape({}),appLastAnnotation:u.shape({}),updateCurrentDashboardAppLastAnnotation:u.func,openAnnotationsList:u.func,rig:u.shape({name:u.string,asset_id:u.number}),well:u.shape({name:u.string,asset_id:u.number}),fracFleet:u.shape({name:u.string,current_pad_id:u.number,pad_frac_fleets:u.arrayOf(u.shape({pad:u.shape({id:u.number.isRequired}).isRequired})).isRequired}),wells:u.arrayOf(u.shape({})),coordinates:u.shape({pixelWidth:u.number.isRequired}),isMaximized:u.bool,appSettings:u.shape({}),onSettingChange:u.func,children:u.arrayOf(u.node)},S.defaultProps={appLastAnnotation:null,appSettings:null,badge:null,classes:{},coordinates:void 0,currentUser:void 0,fracFleet:null,isMaximized:!1,onSettingChange:void 0,openAnnotationsList:void 0,rig:null,showLastAnnotation:!0,updateCurrentDashboardAppLastAnnotation:function(){},well:null,wells:null,children:null};export default S;
|