@corva/ui 0.28.0-rc.0 → 0.29.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 e from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import o from"@babel/runtime/helpers/asyncToGenerator";import{isNativeDetected as a}from"../../../../utils/mobileDetect.js";import{jsx as r,jsxs as i,Fragment as s}from"react/jsx-runtime";import{RootRef as c,Paper as p,Typography as d,Tooltip as m,IconButton as l}from"@material-ui/core";import{memo as u,useRef as f,useState as h,useEffect as y}from"react";import{getAnnotations as b}from"../../../../clients/jsonApi/index.js";import g from"../../../../effects/useOutsideClick.js";import{number as A,string as v,shape as N,func as I,bool as C}from"prop-types";import T from"classnames";import{withStyles as x}from"@material-ui/core/styles";import j from"@material-ui/icons/ChevronLeft";import w from"../../../InfiniteList/index.js";import{SET_ANNOTATIONS as S,APPEND_ANNOTATIONS as L}from"../../constants.js";import{useAnnotationsState as k,useAnnotationsDispatch as R}from"../../AnnotationsContext.js";import _ from"./components/AddAnnotationForm/index.js";import q from"./components/Annotation/index.js";import H from"./style.css.js";var U="AppAnnotationsPo",F=function(a){var u,A=a.appId,v=a.appTitle,N=a.assetId,I=a.assetCompanyId,C=a.appSettings,x=a.currentUser,F=a.onClose,O=a.isNative,P=a.classes,W=a.showSuccessNotification,B=a.dashboardType,D=k().annotations,E=R(),G=f(),M=f();g(G,F);var z=h(!1),J=e(z,2),K=J[0],Q=J[1],V=h(!0),X=e(V,2),Y=X[0],Z=X[1],$=h(!0),tt=e($,2),et=tt[0],nt=tt[1],ot=h(1),at=e(ot,2),rt=at[0],it=at[1];function st(){return(st=o(n.mark((function t(){var e,o,a;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A&&N){t.next=2;break}return t.abrupt("return");case 2:return Z(!0),t.prev=3,o={page:rt,per_page:4,sort:"created_at",order:"desc"},B&&(o.dashboard_type=B),t.next=8,b(A,N,o);case 8:e=t.sent,E({type:1===rt?S:L,annotations:e}),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(3),console.error(t.t0);case 15:a=e&&e.data.length<4,it(rt+1),nt(!a),Z(!1);case 19:case"end":return t.stop()}}),t,null,[[3,12]])})))).apply(this,arguments)}return y((function(){Q(!0)}),[]),r(c,{rootRef:G,children:i(p,{className:T(H.cAnnotationsList,(u={},t(u,H.cAnnotationsListOpen,K),t(u,H.cAnnotationsListOpenNative,O),u)),children:[r(w,{infiniteClassName:H.cAnnotationsListContentContainer,headerComponent:i(s,{children:[r(d,{"data-testid":"".concat(U,"_appTitle"),variant:"body1",className:P.title,children:v}),r("div",{className:H.cAnnotationsListContentTop,children:i(d,{"data-testid":"".concat(U,"_annotationsTitle"),variant:"caption",className:P.secondaryTitle,children:["Annotations (",D.data?D.data.length:0,")"]})}),r(_,{appId:A,assetId:N,assetCompanyId:I,appSettings:C,currentUser:x,showSuccessNotification:W,dashboardType:B})]}),useWindow:O,items:D.data||[],showNoItemsFound:!(D.data&&0!==D.data.length||Y),noItemsFoundLabel:r(d,{variant:"body2","data-testid":"".concat(U,"_noAnnotations"),className:P.noAnnotations,children:"No Annotations yet"}),threshold:50,infiniteContainerHeight:G.current&&M.current?G.current.clientHeight-M.current.clientHeight:null,moreItemsMayExist:et,pathToCreatedAt:["attributes","created_at"],renderItem:function(t){return r(q,{isNative:O,annotation:t,assetCompanyId:I,included:D.included,currentUser:x,showSuccessNotification:W},t.id)},loadItems:function(){return st.apply(this,arguments)}}),r("div",{className:H.cAnnotationsListActions,ref:M,children:r(m,{title:"Hide",placement:"bottom",children:r(l,{"data-testid":"".concat(U,"_hideButton"),onClick:F,className:P.backIcon,children:r(j,{})})})})]})})};F.propTypes={appId:A.isRequired,appTitle:v.isRequired,assetId:A.isRequired,assetCompanyId:A.isRequired,appSettings:N(),classes:N().isRequired,onClose:I.isRequired,showSuccessNotification:I,currentUser:N({}).isRequired,isNative:C,dashboardType:v},F.defaultProps={appSettings:{},isNative:a,showSuccessNotification:function(){},dashboardType:null};var O=x((function(t){return{title:{fontWeight:200,marginBottom:20},secondaryTitle:{fontWeight:200,textTransform:"uppercase",color:t.palette.grey[600]},annotateIcon:{padding:0,"&:hover":{backgroundColor:"transparent",boxShadow:"none"}},noAnnotations:{marginTop:16},backIcon:{cursor:"pointer",color:t.palette.grey[600],padding:5}}}))(u(F));export default O;
1
+ import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import o from"@babel/runtime/helpers/asyncToGenerator";import{isNativeDetected as r}from"../../../../utils/mobileDetect.js";import{showSuccessNotification as a}from"../../../../utils/notificationToasts.js";import"../../../../utils/index.js";import{jsx as i,jsxs as s,Fragment as c}from"react/jsx-runtime";import{RootRef as p,Paper as d,Typography as m,Tooltip as l,IconButton as u}from"@material-ui/core";import{memo as f,useRef as h,useState as y,useEffect as b}from"react";import{getAnnotations as g}from"../../../../clients/jsonApi/index.js";import A from"../../../../effects/useOutsideClick.js";import{number as v,string as I,shape as C,func as T,bool as N}from"prop-types";import x from"classnames";import{withStyles as j}from"@material-ui/core/styles";import L from"@material-ui/icons/ChevronLeft";import k from"../../../InfiniteList/index.js";import{SET_ANNOTATIONS as R,APPEND_ANNOTATIONS as _}from"../../constants.js";import{useAnnotationsState as q,useAnnotationsDispatch as w}from"../../AnnotationsContext.js";import S from"./components/AddAnnotationForm/index.js";import H from"./components/Annotation/index.js";import U from"./style.css.js";var F="AppAnnotationsPo",O=function(r){var f,v=r.appId,I=r.appTitle,C=r.assetId,T=r.assetCompanyId,N=r.appSettings,j=r.currentUser,O=r.onClose,P=r.isNative,W=r.classes,B=r.dashboardType,D=q().annotations,E=w(),G=h(),M=h();A(G,O);var z=y(!1),J=e(z,2),K=J[0],Q=J[1],V=y(!0),X=e(V,2),Y=X[0],Z=X[1],$=y(!0),tt=e($,2),et=tt[0],nt=tt[1],ot=y(1),rt=e(ot,2),at=rt[0],it=rt[1];function st(){return(st=o(n.mark((function t(){var e,o,r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v&&C){t.next=2;break}return t.abrupt("return");case 2:return Z(!0),t.prev=3,o={page:at,per_page:4,sort:"created_at",order:"desc"},B&&(o.dashboard_type=B),t.next=8,g(v,C,o);case 8:e=t.sent,E({type:1===at?R:_,annotations:e}),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(3),console.error(t.t0);case 15:r=e&&e.data.length<4,it(at+1),nt(!r),Z(!1);case 19:case"end":return t.stop()}}),t,null,[[3,12]])})))).apply(this,arguments)}return b((function(){Q(!0)}),[]),i(p,{rootRef:G,children:s(d,{className:x(U.cAnnotationsList,(f={},t(f,U.cAnnotationsListOpen,K),t(f,U.cAnnotationsListOpenNative,P),f)),children:[i(k,{infiniteClassName:U.cAnnotationsListContentContainer,headerComponent:s(c,{children:[i(m,{"data-testid":"".concat(F,"_appTitle"),variant:"body1",className:W.title,children:I}),i("div",{className:U.cAnnotationsListContentTop,children:s(m,{"data-testid":"".concat(F,"_annotationsTitle"),variant:"caption",className:W.secondaryTitle,children:["Annotations (",D.data?D.data.length:0,")"]})}),i(S,{appId:v,assetId:C,assetCompanyId:T,appSettings:N,currentUser:j,showSuccessNotification:a,dashboardType:B})]}),useWindow:P,items:D.data||[],showNoItemsFound:!(D.data&&0!==D.data.length||Y),noItemsFoundLabel:i(m,{variant:"body2","data-testid":"".concat(F,"_noAnnotations"),className:W.noAnnotations,children:"No Annotations yet"}),threshold:50,infiniteContainerHeight:G.current&&M.current?G.current.clientHeight-M.current.clientHeight:null,moreItemsMayExist:et,pathToCreatedAt:["attributes","created_at"],renderItem:function(t){return i(H,{isNative:P,annotation:t,assetCompanyId:T,included:D.included,currentUser:j,showSuccessNotification:a},t.id)},loadItems:function(){return st.apply(this,arguments)}}),i("div",{className:U.cAnnotationsListActions,ref:M,children:i(l,{title:"Hide",placement:"bottom",children:i(u,{"data-testid":"".concat(F,"_hideButton"),onClick:O,className:W.backIcon,children:i(L,{})})})})]})})};O.propTypes={appId:v.isRequired,appTitle:I.isRequired,assetId:v.isRequired,assetCompanyId:v.isRequired,appSettings:C(),classes:C().isRequired,onClose:T.isRequired,currentUser:C({}).isRequired,isNative:N,dashboardType:I},O.defaultProps={appSettings:{},isNative:r,dashboardType:null};var P=j((function(t){return{title:{fontWeight:200,marginBottom:20},secondaryTitle:{fontWeight:200,textTransform:"uppercase",color:t.palette.grey[600]},annotateIcon:{padding:0,"&:hover":{backgroundColor:"transparent",boxShadow:"none"}},noAnnotations:{marginTop:16},backIcon:{cursor:"pointer",color:t.palette.grey[600],padding:5}}}))(f(O));export default P;
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../constants/completion.js";import"../../../../../constants/alerts.js";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"../../../../../constants/goals.js";import{SEGMENTS as e}from"../../../../../constants/segment.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/notifications.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../../../utils/index.js";import{jsx as r,jsxs as i,Fragment as o}from"react/jsx-runtime";import"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../Modal/index.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import s from"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Tooltip.js";import"../../../../Avatar/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../../../ConfirmationDialog.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../PadModeSelect/PadModeSelect.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppContext.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../AppActions/AppActions.css.js";import n from"../../../../ErrorBoundary/InternalErrorView/InternalErrorView.js";import p from"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../Typography.js";import"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../../SlateFormattedText/RenderElements.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import a from"../AppInfoMessage/AppInfoMessage.js";import"../HelpCenterDialog/HelpCenterDialog.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../../TruncatedText/index.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/index.js";import"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../Login/components/Login.js";import"../../../../Login/components/PasswordField.js";import"../../../../Login/components/Chip.js";import"../../../../Login/components/StepFooter.js";import"../../../../Login/components/StepContent.js";import"../../../../Login/components/StepHeader.js";import"../../../../Login/components/Step.js";import"../../../../Login/components/OrDivider.js";import"../../../../Login/components/HiddenEmailField.js";import"../../../../Login/components/EmailField.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import m from"../../../../EmptyView/index.js";import l from"../../../../EmptyView/EmptyAppView/index.js";import"../../../../Button/index.js";import"../../../../MenuItem/index.js";import"../../../../ContextMenuItem/index.js";import"../../../../FolderMenuItem/index.js";import"../../../../EditableItem/EditableItem/index.js";import"../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../Checkbox/index.js";import"../../../../FolderMenuItemWithLinks/index.js";import"../../../../IconButton/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTable/index.js";import"../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../WellSummary/WellSummaryItemValue.js";import"../../../../WellSummary/ActivitySummaryChart.js";import"../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../BICOffsetPickerDialog/index.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../Notifications/Notifications.js";import"../../../../TextLink/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../PinnableFilters/PinnableFilters.js";import"../../../../HeaderLayout/HeaderLayout.js";import"../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../Table/TableToolbar/TableToolbar.js";import"../../../../PriceInput/PriceInput.js";import"../../../../LabelsCounter/LabelsCounter.js";import"../../../../Stepper/Step.js";import"../../../../Stepper/StepsWrapper.js";import"../../../../Stepper/Stepper.js";import"../../../../Comment/CommentIcon/index.js";import"../../../../FilesLoader/FilesLoader.js";import"../../../../SearchInput/index.js";function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function j(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?d(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function c(t){var d=t.AppComponent,c=t.app,u=t.appData,g=t.appProps,f=t.isAppNotSubscribed,b=t.isLoading,x=t.isMultiRig,A=t.layoutEnvironment,P=t.segment;if(!c.package)return r(a,{message:"App package was not found",submessage:"Please choose another version in the app settings menu or delete and add app again on your dashboard",app:c});if(b)return r(s,{});if(f){var S=g.coordinates,C=S.pixelWidth,h=S.pixelHeight,y=l.APP_MESSAGES.appNotSubscribed,E=y.title,L=y.subtitle;return r(a,{app:c,children:r(l,{title:E,subtitle:L,appHeight:h,appWidth:C})})}if(!d)return r(a,{message:"App component was not found",app:c});if(!x){var O;if(u.rig&&!u.well)return r(a,{app:c,message:i(o,{children:[u.rig.name,r("br",{}),"has no active well"]})});if("general"===(null==A?void 0:A.type)&&P===e.COMPLETION&&!u.fracFleet)return r(a,{app:c,children:r(m,{title:"Frac fleet was not found"})});if(!("general"!==(null==A?void 0:A.type)||P!==e.COMPLETION||null!==(O=u.fracFleet)&&void 0!==O&&O.current_pad_id||c.settings.padId))return r(a,{app:c,children:r(m,{title:"Frac fleet has no active pad"})});if("general"===(null==A?void 0:A.type)&&P===e.COMPLETION&&(!u.wells||u.wells.length<1))return r(a,{app:c,children:r(m,{title:"This pad has no wells"})});if(!(u.rig||u.well||u.settings||u.wells))return r(a,{app:c,message:"No asset data were found"})}return r(p,{ErrorView:n,app:c,withAppHeader:!0,children:r(d,j(j(j({app:c},c.settings),u),g))})}export default c;
1
+ import t from"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../../../../constants/completion.js";import"../../../../../constants/alerts.js";import"lodash";import"@babel/runtime/helpers/slicedToArray";import"../../../../../constants/goals.js";import{SEGMENTS as e}from"../../../../../constants/segment.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/notifications.js";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/asyncToGenerator";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/typeof";import"../../../../../utils/index.js";import{jsx as r,jsxs as i,Fragment as o}from"react/jsx-runtime";import"@material-ui/core";import"react";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../Modal/index.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import s from"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Tooltip.js";import"../../../../Avatar/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"../../../../ConfirmationDialog.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../PadModeSelect/PadModeSelect.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppContext.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons/Help";import"../AppActions/AppActions.css.js";import"../../../../ErrorBoundary/InternalErrorView/InternalErrorView.js";import n from"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../Typography.js";import"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../../../../SlateFormattedText/RenderElements.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import p from"../AppInfoMessage/AppInfoMessage.js";import"../HelpCenterDialog/HelpCenterDialog.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../../TruncatedText/index.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/index.js";import"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../Login/components/Login.js";import"../../../../Login/components/PasswordField.js";import"../../../../Login/components/Chip.js";import"../../../../Login/components/StepFooter.js";import"../../../../Login/components/StepContent.js";import"../../../../Login/components/StepHeader.js";import"../../../../Login/components/Step.js";import"../../../../Login/components/OrDivider.js";import"../../../../Login/components/HiddenEmailField.js";import"../../../../Login/components/EmailField.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/index.js";import a from"../../../../EmptyView/EmptyAppView/index.js";import"../../../../Button/index.js";import"../../../../MenuItem/index.js";import"../../../../ContextMenuItem/index.js";import"../../../../FolderMenuItem/index.js";import"../../../../EditableItem/EditableItem/index.js";import"../../../../EditableItem/EditableItemWithBadge/index.js";import"../../../../Checkbox/index.js";import"../../../../FolderMenuItemWithLinks/index.js";import"../../../../IconButton/index.js";import"../../../../TextField/index.js";import"../../../../Chip/index.js";import"../../../../Counter/index.js";import"../../../../AnchorsList/AnchorsList.js";import"../../../../Select/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTable/index.js";import"../../../../WellSummary/WellSummaryItemLabel.js";import"../../../../WellSummary/WellSummaryItemTitle.js";import"../../../../WellSummary/WellSummaryItemValue.js";import"../../../../WellSummary/ActivitySummaryChart.js";import"../../../../WellSummary/FracWirelineTimeChart.js";import"../../../../BICOffsetPickerDialog/index.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../Notifications/Notifications.js";import"../../../../TextLink/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../PinnableFilters/PinnableFilters.js";import"../../../../HeaderLayout/HeaderLayout.js";import"../../../../PadOffsetsPicker/PadOffsetsPicker.js";import"../../../../PadOffsetsPicker/OffsetAssetChip.js";import"../../../../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../../../../PadOffsetsPicker/StagesSelector.js";import"../../../../Table/TableToolbar/TableToolbar.js";import"../../../../PriceInput/PriceInput.js";import"../../../../LabelsCounter/LabelsCounter.js";import"../../../../Stepper/Step.js";import"../../../../Stepper/StepsWrapper.js";import"../../../../Stepper/Stepper.js";import"../../../../Comment/CommentIcon/index.js";import"../../../../FilesLoader/FilesLoader.js";import"../../../../SearchInput/index.js";function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function l(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?m(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function d(t){var m,d=t.AppComponent,j=t.app,c=t.appData,u=t.appProps,S=t.isAppNotSubscribed,g=t.isLoading,A=t.isMultiRig,P=t.layoutEnvironment,b=t.segment,E=null==u||null===(m=u.coordinates)||void 0===m?void 0:m.pixelHeight;if(!j.package)return r(p,{app:j,children:r(a,{title:a.APP_MESSAGES.appPackageWasNotFound.title,subtitle:a.APP_MESSAGES.appPackageWasNotFound.subtitle,appHeight:E,state:a.EMPTY_STATES.error})});if(g)return r(s,{});if(S){var f=a.APP_MESSAGES.appNotSubscribed,x=f.title,C=f.subtitle;return r(p,{app:j,children:r(a,{title:x,subtitle:C,appHeight:E,state:a.EMPTY_STATES.noSubscription})})}if(!d)return r(p,{message:"App component was not found",app:j});if(!A){var h;if(c.rig&&!c.well)return r(p,{app:j,message:i(o,{children:[c.rig.name,r("br",{}),"has no active well"]})});if("general"===(null==P?void 0:P.type)&&b===e.COMPLETION&&!c.fracFleet)return r(p,{app:j,children:r(a,{title:a.APP_MESSAGES.fracFleetWasNotFound.title,appHeight:E,state:a.EMPTY_STATES.empty})});if(!("general"!==(null==P?void 0:P.type)||b!==e.COMPLETION||null!==(h=c.fracFleet)&&void 0!==h&&h.current_pad_id||j.settings.padId))return r(p,{app:j,children:r(a,{title:a.APP_MESSAGES.fracFleetHasNoPad.title,appHeight:E,state:a.EMPTY_STATES.empty})});if("general"===(null==P?void 0:P.type)&&b===e.COMPLETION&&(!c.wells||c.wells.length<1))return r(p,{app:j,children:r(a,{title:a.APP_MESSAGES.padHasNoWells.title,appHeight:E,state:a.EMPTY_STATES.empty})});if(!(c.rig||c.well||c.settings||c.wells))return r(p,{app:j,message:"No asset data were found"})}return r(n,{ErrorView:r(a,{title:a.APP_MESSAGES.internalAppError.title,subtitle:a.APP_MESSAGES.internalAppError.subtitle,appHeight:E,state:a.EMPTY_STATES.error}),app:j,withAppHeader:!0,children:r(d,l(l(l({app:j},j.settings),c),u))})}export default d;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import r from"prop-types";import a from"classnames";var o={appNotSubscribed:{title:"No Subscriptions exist for this app.",subtitle:"Contact your Corva Account rep to get acces to this app!"},assetNotSubscribed:{title:"Selected Asset is no longer subscribed to the app.",subtitle:"Сhange the asset in settings."}},s=i((function(e){var t=e.palette;return{wrapper:{display:"flex",flexDirection:"column",textAlign:"center",alignItems:"center",justifyContent:"center",height:"100%",padding:24,overflow:"auto"},title:{color:t.primary.text7,fontSize:32,lineHeight:"45px",marginBottom:16,"&.small":{fontSize:20,lineHeight:"20px"}},subtitle:{color:t.primary.text6,fontSize:16,lineHeight:"24px","&.small":{fontSize:14,lineHeight:"14px"}},imageWrapper:{display:"flex",flexGrow:"1",width:"100%"},backgroundImage:{width:"100%",height:"100%",backgroundImage:"url(".concat("/static/media/c1a2b19a1ee8b33bbffcec8f0476591b.png",")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",margin:"16px 10%"}}}));function n(i){var r=i.title,o=i.subtitle,n=i.appWidth,l=i.appHeight,p=s(),c=n<370||l<350;return e("div",{className:p.wrapper,children:[t("div",{className:a(p.title,c&&"small"),children:r}),o&&t("div",{className:a(p.subtitle,c&&"small"),children:o}),!c&&t("div",{className:p.imageWrapper,children:t("div",{className:p.backgroundImage})})]})}n.propTypes={title:r.string.isRequired,subtitle:r.string,appWidth:r.number.isRequired,appHeight:r.number.isRequired},n.defaultProps={subtitle:""},n.APP_MESSAGES=o;export default n;export{o as APP_MESSAGES};
1
+ import e from"@babel/runtime/helpers/defineProperty";import{jsxs as t,jsx as a}from"react/jsx-runtime";import{makeStyles as i}from"@material-ui/core";import r from"prop-types";import o from"classnames";var n,s={appNotSubscribed:{title:"No Subscriptions exist for this app.",subtitle:"Contact your Corva Account rep to get acces to this app!"},assetNotSubscribed:{title:"Selected Asset is no longer subscribed to the app.",subtitle:"Сhange the asset in settings."},internalAppError:{title:"App Loading Error",subtitle:t("span",{children:["This app failed to load. Try refreshing the page or",a("span",{styles:{color:"blue"},onClick:function(){return window.Intercom&&window.Intercom("show")},children:"contact support"}),"."]})},appPackageWasNotFound:{title:"App package was not found",subtitle:"Please choose another version in the app settings menu or delete and add app again on your dashboard"},fracFleetWasNotFound:{title:"Frac fleet was not found"},fracFleetHasNoPad:{title:"Frac fleet has no active pad"},padHasNoWells:{title:"This pad has no wells"}},l={empty:"empty",error:"error",noData:"noData",noSubscription:"noSubscription"},p=(e(n={},l.empty,"/static/media/e607e3aa0a4603bb7ae7f83a2148511e.svg"),e(n,l.error,"/static/media/9b185a425ea91b6c2beedfef39c06663.svg"),e(n,l.noData,"/static/media/1bfc6e5d9cbb531a554ab8d025fa23e9.svg"),e(n,l.noSubscription,"/static/media/76e3ee12638391cba164716321509ad7.svg"),n),c=i((function(e){var t=e.palette;return{wrapper:{display:"flex",flexDirection:"column",textAlign:"center",alignItems:"center",justifyContent:"center",height:"100%",padding:24,overflow:"auto"},title:{color:t.primary.text7,fontSize:32,lineHeight:"38px",marginBottom:8,"&.medium":{fontSize:24,lineHeight:"28px"},"&.small":{fontSize:24,lineHeight:"28px"}},subtitle:{color:t.primary.text6,fontSize:16,lineHeight:"22px",marginBottom:24,"&.medium":{fontSize:14,lineHeight:"20px"},"&.small":{fontSize:14,lineHeight:"20px"}},imageWrapper:{display:"flex",flexGrow:"1",maxWidth:390,maxHeight:300,width:"100%","&.medium":{maxidth:260,maxHeight:200}},backgroundImage:{width:"100%",backgroundImage:function(e){return"url(".concat([p[e.state]],")")},backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}}));function d(e){var i=e.title,r=e.subtitle,n=e.appHeight,s=e.state,l=c({state:s}),p=n<300,d=n<400;return t("div",{className:l.wrapper,children:[a("div",{className:o(l.title,d&&"medium",p&&"small"),children:i}),r&&a("div",{className:o(l.subtitle,d&&"medium",p&&"small"),children:r}),!p&&a("div",{className:o(l.imageWrapper,d&&"medium"),children:a("div",{className:l.backgroundImage})})]})}d.propTypes={title:r.string.isRequired,subtitle:r.string,appHeight:r.number.isRequired,state:r.string},d.defaultProps={subtitle:"",state:l.empty},d.APP_MESSAGES=s,d.EMPTY_STATES=l;export default d;export{s as APP_MESSAGES,l as EMPTY_STATES};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import{jsx as n}from"react/jsx-runtime";import{makeStyles as e,TextField as r,InputAdornment as o}from"@material-ui/core";import u from"@babel/runtime/helpers/objectWithoutProperties";import s from"prop-types";import{useCustomShrink as i}from"./effects/index.js";function l(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function a(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){t(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(r,t))}))}return n}var p=e((function(t){return{textField:{marginTop:16,marginBottom:8,"& .MuiFormLabel-root":{marginLeft:function(t){return t.startlabelOffset?"".concat(t.startlabelOffset+8,"px"):0},marginRight:function(t){return t.endlabelOffset?"".concat(t.endlabelOffset+8,"px"):0}},"&.MuiTextField-root .MuiInput-root":{"& .MuiInputAdornment-root svg.MuiSvgIcon-root":{width:16,height:16,fontSize:16,fill:"#DADADA"},"&.Mui-error .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:"".concat(t.palette.error.main," !important")}},"& .Mui-focused .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:"".concat(t.palette.primary.main," !important")}},shrunkLabel:{"&.MuiInputLabel-shrink.MuiFormLabel-root":{marginLeft:0}}}})),c=function(t){var e=t.startIcon,s=t.endIcon,l=t.onFocus,c=t.onBlur,f=t.InputProps,d=t.value,m=t.startAdornment,b=t.endAdornment,I=u(t,["startIcon","endIcon","onFocus","onBlur","InputProps","value","startAdornment","endAdornment"]),O=i({startIcon:e,endIcon:s,onFocus:l,onBlur:c,value:d,InputProps:f}),P=O.shrink,g=O.onInputFocus,h=O.onInputBlur,v=O.startlabelOffset,A=O.endlabelOffset,y=O.startAdornmentRef,j=O.endAdornmentRef,F=p({startlabelOffset:v,endlabelOffset:A});return n(r,a(a({},I),{},{onFocus:g,onBlur:h,classes:{root:F.textField},InputLabelProps:a({shrink:P,classes:{shrink:F.shrunkLabel}},t.InputLabelProps),InputProps:a({startAdornment:e?n(o,{position:"start",ref:y,children:e}):m,endAdornment:s?n(o,{position:"end",ref:j,children:s}):b},t.InputProps)}))};c.propTypes={startIcon:s.node,endIcon:s.node,InputProps:s.shape({startAdornment:null}),InputLabelProps:s.shape({startAdornment:null}),value:s.oneOf(s.string,s.number),onFocus:s.func,onBlur:s.func,endAdornment:s.node,startAdornment:s.node},c.defaultProps={startIcon:null,endIcon:null,InputProps:void 0,InputLabelProps:void 0,value:"",onFocus:void 0,onBlur:void 0,endAdornment:null,startAdornment:null};export default c;
1
+ import t from"@babel/runtime/helpers/defineProperty";import{jsx as n}from"react/jsx-runtime";import{makeStyles as r,TextField as e,InputAdornment as o}from"@material-ui/core";import u from"../../config/theme/palette.mjs.js";import i from"@babel/runtime/helpers/objectWithoutProperties";import s from"prop-types";import{useCustomShrink as l}from"./effects/index.js";function a(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function p(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?a(Object(e),!0).forEach((function(r){t(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var c=r((function(t){return{textField:{marginTop:16,marginBottom:8,"& .MuiFormLabel-root":{marginLeft:function(t){return t.startlabelOffset?"".concat(t.startlabelOffset+8,"px"):0},marginRight:function(t){return t.endlabelOffset?"".concat(t.endlabelOffset+8,"px"):0}},"&:hover":{"&.MuiTextField-root .MuiInput-root":{"& .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:u.primary.contrastText}}},"&.MuiTextField-root .MuiInput-root":{"& .MuiInputAdornment-root svg.MuiSvgIcon-root":{width:16,height:16,fontSize:16,fill:"#DADADA"},"&.Mui-error .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:"".concat(t.palette.error.main," !important")}},"& .Mui-focused .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:"".concat(t.palette.primary.main," !important")}},shrunkLabel:{"&.MuiInputLabel-shrink.MuiFormLabel-root":{marginLeft:0}}}})),f=function(t){var r=t.startIcon,u=t.endIcon,s=t.onFocus,a=t.onBlur,f=t.InputProps,d=t.value,m=t.startAdornment,b=t.endAdornment,I=i(t,["startIcon","endIcon","onFocus","onBlur","InputProps","value","startAdornment","endAdornment"]),O=l({startIcon:r,endIcon:u,onFocus:s,onBlur:a,value:d,InputProps:f}),g=O.shrink,v=O.onInputFocus,h=O.onInputBlur,P=O.startlabelOffset,A=O.endlabelOffset,M=O.startAdornmentRef,j=O.endAdornmentRef,y=c({startlabelOffset:P,endlabelOffset:A});return n(e,p(p({},I),{},{onFocus:v,onBlur:h,classes:{root:y.textField},InputLabelProps:p({shrink:g,classes:{shrink:y.shrunkLabel}},t.InputLabelProps),InputProps:p({startAdornment:r?n(o,{position:"start",ref:M,children:r}):m,endAdornment:u?n(o,{position:"end",ref:j,children:u}):b},t.InputProps)}))};f.propTypes={startIcon:s.node,endIcon:s.node,InputProps:s.shape({startAdornment:null}),InputLabelProps:s.shape({startAdornment:null}),value:s.oneOf([s.string,s.number]),onFocus:s.func,onBlur:s.func,endAdornment:s.node,startAdornment:s.node},f.defaultProps={startIcon:null,endIcon:null,InputProps:void 0,InputLabelProps:void 0,value:"",onFocus:void 0,onBlur:void 0,endAdornment:null,startAdornment:null};export default f;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.28.0-rc.0",
3
+ "version": "0.29.0-3",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"