@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 d,useState as p,useEffect as c}from"react";import m from"prop-types";import u from"classnames";import"../../Annotations/AnnotationsContext.js";import"../../Annotations/components/AnnotationsList/index.js";import h from"../../Annotations/components/LastAnnotation/index.js";import f from"./VersionBadge.js";import A from"./PadMode.js";import{getAppDimension as v}from"./utils.js";import g from"../../AssetNameLabel/SecondaryAssetNameLabel.js";import L from"../../AssetNameLabel/PrimaryAssetNameLabel.js";import b from"./AppHeaderNew.css.js";var N="DevCenter_AppHeader",j="EXTRA_LARGE",w="SMALL";function C(m){var C,S,_,x,y=m.app,M=m.appLastAnnotation,I=m.appSettings,R=m.badge,W=m.classes,z=m.coordinates,H=m.currentUser,P=m.fracFleet,D=m.isMaximized,F=m.onSettingChange,T=m.openAnnotationsList,q=m.rig,O=m.showLastAnnotation,k=m.updateCurrentDashboardAppLastAnnotation,U=m.well,E=m.wells,B=m.children,G=null==z?void 0:z.pixelWidth,V=v(G),X=i(y),J=null==y||null===(C=y.package)||void 0===C||null===(S=C.manifest)||void 0===S||null===(_=S.application)||void 0===_?void 0:_.subtitle,K=s(y),Q=K===a.DRILLING,Y=(null==y?void 0:y.settings)||{},Z=Y.wellId,$=Y.rigId,ee=Y.fracFleetId,te=Y.padId,ne=te&&(null==P||null===(x=P.pad_frac_fleets.find((function(e){return e.pad.id===te})))||void 0===x?void 0:x.pad),ae=Q?null==q?void 0:q.name:null==P?void 0:P.name,ie=Q?Z&&(null==U?void 0:U.name):te&&(null==ne?void 0:ne.name),se=!!(Z||$||ee),oe=null!=P&&P.current_pad_id?"assets/types/pad/".concat(null==P?void 0:P.current_pad_id):null,re=Q?ae&&"assets/".concat(null==U?void 0:U.asset_id):oe,le=te&&"assets/types/pad/".concat(te),de=y&&y.id===n,pe=d(null),ce=p({width:0}),me=t(ce,2),ue=me[0],he=me[1],fe=p({width:0}),Ae=t(fe,2),ve=Ae[0],ge=Ae[1],Le=p(0),be=t(Le,2),Ne=be[0],je=be[1];return c((function(){je((null==ue?void 0:ue.width)+(null==ve?void 0:ve.width)+16)}),[null==ue?void 0:ue.width,null==ve?void 0:ve.width,G]),o(r,{children:[o("div",{className:u(b.appHeaderContainer,W.appHeader),children:[o("div",{className:b.titleBlock,children:[o("div",{className:W.appHeaderTitleWrapper,ref:pe,children:[o("div",{className:b.titleWrapper,children:[l("h6",{"data-testid":"".concat(N,"_name"),className:b.title,children:X}),l(f,{app:y})]}),R]}),J&&l("h6",{"data-testid":"".concat(N,"_subtitle"),className:b.subtitle,children:J})]}),o("div",{className:b.headerComponents,style:{marginRight:"".concat(Ne,"px")},children:[V===j&&l("div",{className:b.headerChildren,children:B}),K===a.COMPLETION&&V!==w&&l("div",{className:b.padModeSelect,children:l(A,{fracFleet:P,wells:E,well:U,onSettingChange:F,appSettings:I})})]}),y&&z&&o("div",{className:u(b.assetNameLabelContainer,D&&b.appMaximized),children:[ie&&l(g,{secondaryAssetName:ie,coordinatesPixelWidth:z.pixelWidth,secondaryAssetLink:!de&&le,pageName:N,onSize:function(e){return ge(e)}}),se&&l(L,{primaryAssetName:ae,pageName:N,coordinatesPixelWidth:z.pixelWidth,primaryAssetLink:re,onSize:function(e){return he(e)}})]}),O&&M&&l(h,{dashboardAppId:y.id,appId:e(y,["app","id"]),annotation:M,openAnnotationsList:T,updateCurrentDashboardAppLastAnnotation:k,currentUser:H})]}),V===w&&l("div",{className:u(b.padModeSelect,b.smallPadModeSelect),children:l(A,{fracFleet:P,wells:E,well:U,onSettingChange:F,appSettings:I})}),V!==j&&l("div",{className:u(b.mediumSizeContent,b.headerComponents),children:l("div",{className:b.headerChildren,children:B})})]})}C.propTypes={app:m.object.isRequired,badge:m.node,classes:m.shape({appHeader:m.string,appHeaderTitleWrapper:m.string}),showLastAnnotation:m.bool,currentUser:m.shape({}),appLastAnnotation:m.shape({}),updateCurrentDashboardAppLastAnnotation:m.func,openAnnotationsList:m.func,rig:m.shape({name:m.string,asset_id:m.number}),well:m.shape({name:m.string,asset_id:m.number}),fracFleet:m.shape({name:m.string,current_pad_id:m.number,pad_frac_fleets:m.arrayOf(m.shape({pad:m.shape({id:m.number.isRequired}).isRequired})).isRequired}),wells:m.arrayOf(m.shape({})),coordinates:m.shape({pixelWidth:m.number.isRequired}),isMaximized:m.bool,appSettings:m.shape({}),onSettingChange:m.func,children:m.arrayOf(m.node)},C.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 C;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.34.0-8",
3
+ "version": "0.34.0-9",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"