@corva/ui 0.32.0-6 → 0.32.0-7

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:auto;padding-right:8px}.AppHeaderNew_headerComponents__3IHT4,.AppHeaderNew_titleBlock__2Hcti{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.AppHeaderNew_headerComponents__3IHT4{display:flex;width:100%;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}.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:5px 16px 12px}.AppHeaderNew_headerChildren__1oNXF,.AppHeaderNew_headerChildren__1oNXF>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}");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"};
1
+ import e from'../../../ext-esm/style-inject/dist/style-inject.es.js';e(".AppHeaderNew_appHeaderContainer__1Jw7S{display:flex}.AppHeaderNew_titleBlock__2Hcti{display:inline;padding-right:8px}.AppHeaderNew_headerComponents__3IHT4,.AppHeaderNew_titleBlock__2Hcti{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.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}.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:5px 16px 12px}.AppHeaderNew_headerChildren__1oNXF,.AppHeaderNew_headerChildren__1oNXF>*{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}");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"};
@@ -1 +1 @@
1
- import"../../../constants/completion.js";import"../../../constants/alerts.js";import{get as e}from"lodash";import n from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as t}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 v from"./PadMode.js";import A from"../../AssetNameLabel/index.js";import g from"./AppHeaderNew.css.js";import{getAppDimension as L}from"./utils.js";var b="EXTRA_LARGE",j="SMALL";function w(m){var w,C,N,_,S=m.app,x=m.appLastAnnotation,y=m.appSettings,M=m.badge,I=m.classes,H=m.coordinates,R=m.currentUser,W=m.fracFleet,D=m.isMaximized,z=m.onSettingChange,F=m.openAnnotationsList,P=m.rig,T=m.showLastAnnotation,q=m.updateCurrentDashboardAppLastAnnotation,O=m.well,k=m.wells,U=m.children,E=null==H?void 0:H.pixelWidth,B=L(E),G=i(S),V=null==S||null===(w=S.package)||void 0===w||null===(C=w.manifest)||void 0===C||null===(N=C.application)||void 0===N?void 0:N.subtitle,X=s(S),J=X===a.DRILLING,K=(null==S?void 0:S.settings)||{},Q=K.wellId,Y=K.rigId,Z=K.fracFleetId,$=K.padId,ee=$&&(null==W||null===(_=W.pad_frac_fleets.find((function(e){return e.pad.id===$})))||void 0===_?void 0:_.pad),ne=J?null==P?void 0:P.name:null==W?void 0:W.name,te=J?Q&&(null==O?void 0:O.name):$&&(null==ee?void 0:ee.name),ae=!!(Q||Y||Z),ie=null!=W&&W.current_pad_id?"assets/types/pad/".concat(null==W?void 0:W.current_pad_id):null,se=J?ne&&"assets/".concat(null==O?void 0:O.asset_id):ie,oe=$&&"assets/types/pad/".concat($),re=S&&S.id===t,le=d(null),de=p({width:0}),pe=n(de,2),ce=pe[0],me=pe[1],ue=p(0),he=n(ue,2),fe=he[0],ve=he[1];return c((function(){var e;ve(E-(null==ce?void 0:ce.width)-34-(null==le||null===(e=le.current)||void 0===e?void 0:e.offsetWidth))}),[null==ce?void 0:ce.width,E]),o(r,{children:[o("div",{className:u(g.appHeaderContainer,I.appHeader),children:[o("div",{className:g.titleBlock,children:[o("div",{className:I.appHeaderTitleWrapper,ref:le,children:[o("div",{className:g.titleWrapper,children:[l("h6",{"data-testid":"".concat("DevCenter_AppHeader","_name"),className:g.title,children:G}),l(f,{app:S})]}),M]}),V&&l("h6",{"data-testid":"".concat("DevCenter_AppHeader","_subtitle"),className:g.subtitle,children:V})]}),o("div",{className:g.headerComponents,style:{width:"".concat(fe,"px")},children:[B===b&&l("div",{className:g.headerChildren,children:U}),X===a.COMPLETION&&B!==j&&l("div",{className:g.padModeSelect,children:l(v,{fracFleet:W,wells:k,well:O,onSettingChange:z,appSettings:y})})]}),S&&H&&l(A,{isPrimaryNameVisible:ae,primaryAssetName:ne,secondaryAssetName:te,coordinatesPixelWidth:H.pixelWidth,primaryAssetLink:!re&&se,secondaryAssetLink:!re&&oe,isMaximized:D,onSize:function(e){return me(e)}}),T&&x&&l(h,{dashboardAppId:S.id,appId:e(S,["app","id"]),annotation:x,openAnnotationsList:F,updateCurrentDashboardAppLastAnnotation:q,currentUser:R})]}),B===j&&l("div",{className:u(g.padModeSelect,g.smallPadModeSelect),children:l(v,{fracFleet:W,wells:k,well:O,onSettingChange:z,appSettings:y})}),B!==b&&l("div",{className:u(g.mediumSizeContent,g.headerComponents),children:l("div",{className:g.headerChildren,children:U})})]})}w.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)},w.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 w;
1
+ import"../../../constants/completion.js";import"../../../constants/alerts.js";import{get as e}from"lodash";import n from"@babel/runtime/helpers/slicedToArray";import{DEV_CENTER_CLI_APP_ID as t}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 v from"../../AssetNameLabel/index.js";import g from"./AppHeaderNew.css.js";import{getAppDimension as L}from"./utils.js";var b="EXTRA_LARGE",j="SMALL";function C(m){var C,N,w,_,S=m.app,x=m.appLastAnnotation,y=m.appSettings,M=m.badge,I=m.classes,R=m.coordinates,H=m.currentUser,D=m.fracFleet,W=m.isMaximized,z=m.onSettingChange,F=m.openAnnotationsList,P=m.rig,T=m.showLastAnnotation,q=m.updateCurrentDashboardAppLastAnnotation,O=m.well,k=m.wells,U=m.children,E=null==R?void 0:R.pixelWidth,B=L(E),G=i(S),V=null==S||null===(C=S.package)||void 0===C||null===(N=C.manifest)||void 0===N||null===(w=N.application)||void 0===w?void 0:w.subtitle,X=s(S),J=X===a.DRILLING,K=(null==S?void 0:S.settings)||{},Q=K.wellId,Y=K.rigId,Z=K.fracFleetId,$=K.padId,ee=$&&(null==D||null===(_=D.pad_frac_fleets.find((function(e){return e.pad.id===$})))||void 0===_?void 0:_.pad),ne=J?null==P?void 0:P.name:null==D?void 0:D.name,te=J?Q&&(null==O?void 0:O.name):$&&(null==ee?void 0:ee.name),ae=!!(Q||Y||Z),ie=null!=D&&D.current_pad_id?"assets/types/pad/".concat(null==D?void 0:D.current_pad_id):null,se=J?ne&&"assets/".concat(null==O?void 0:O.asset_id):ie,oe=$&&"assets/types/pad/".concat($),re=S&&S.id===t,le=d(null),de=p({width:0}),pe=n(de,2),ce=pe[0],me=pe[1],ue=p(0),he=n(ue,2),fe=he[0],Ae=he[1];return c((function(){Ae(null==ce?void 0:ce.width)}),[null==ce?void 0:ce.width,E]),o(r,{children:[o("div",{className:u(g.appHeaderContainer,I.appHeader),children:[o("div",{className:g.titleBlock,children:[o("div",{className:I.appHeaderTitleWrapper,ref:le,children:[o("div",{className:g.titleWrapper,children:[l("h6",{"data-testid":"".concat("DevCenter_AppHeader","_name"),className:g.title,children:G}),l(f,{app:S})]}),M]}),V&&l("h6",{"data-testid":"".concat("DevCenter_AppHeader","_subtitle"),className:g.subtitle,children:V})]}),o("div",{className:g.headerComponents,style:{marginRight:"".concat(fe,"px")},children:[B===b&&l("div",{className:g.headerChildren,children:U}),X===a.COMPLETION&&B!==j&&l("div",{className:g.padModeSelect,children:l(A,{fracFleet:D,wells:k,well:O,onSettingChange:z,appSettings:y})})]}),S&&R&&l(v,{isPrimaryNameVisible:ae,primaryAssetName:ne,secondaryAssetName:te,coordinatesPixelWidth:R.pixelWidth,primaryAssetLink:!re&&se,secondaryAssetLink:!re&&oe,isMaximized:W,onSize:function(e){return me(e)}}),T&&x&&l(h,{dashboardAppId:S.id,appId:e(S,["app","id"]),annotation:x,openAnnotationsList:F,updateCurrentDashboardAppLastAnnotation:q,currentUser:H})]}),B===j&&l("div",{className:u(g.padModeSelect,g.smallPadModeSelect),children:l(A,{fracFleet:D,wells:k,well:O,onSettingChange:z,appSettings:y})}),B!==b&&l("div",{className:u(g.mediumSizeContent,g.headerComponents),children:l("div",{className:g.headerChildren,children:U})})]})}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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.32.0-6",
3
+ "version": "0.32.0-7",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"