@corva/ui 0.26.0-11 → 0.26.0-12

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{maxBy as e}from"lodash";import a from"@babel/runtime/helpers/slicedToArray";import{jsx as t,jsxs as l}from"react/jsx-runtime";import{makeStyles as r,Grid as n,FormControl as o,InputLabel as i,Select as s,ListSubheader as c,MenuItem as u}from"@material-ui/core";import{useState as d,useMemo as p,useEffect as v}from"react";import{string as b,func as f,shape as m}from"prop-types";import{isUserDeveloperAdmin as h}from"../../utils/user.js";import g from"./effects/index.js";var R=r({select:{width:250,margin:"8px 0"},group:{fontStyle:"italic",fontWeight:"bold",fontSize:"12px",color:"#999"}}),S=function(r){var b=r.value,f=r.onChange,m=r.appId,S=r.currentUser,_=R(),w=g(m),V=w.isLoading,y=w.packages,C=h(S),D=d(b),x=a(D,2),A=x[0],P=x[1],B=p((function(){var e=[{label:"Stable Release - no stable version",value:"PROD",disabled:!0},{label:"Beta - no beta version",value:"BETA",disabled:!0}],a=[];return y.forEach((function(t){var l=t.attributes,r=l.version,n=l.notes,o=l.label,i=l.status;if(o){var s="PROD"===o?e[0]:e[1];s.label="".concat("PROD"===o?"Stable Release":"Beta"," v").concat(r," ").concat(n?"- ".concat(n):""),s.disabled=!1}else C&&a.push({label:"v".concat(r," ").concat(n?"- ".concat(n):""),value:r,status:i})})),{labeled:e,unlabeled:a}}),[y,C]),I=B.labeled,O=B.unlabeled;return v((function(){if(C&&!b){var a=I.find((function(e){return!e.disabled}))||e(O.filter((function(e){return"published"===e.status})),"value");P(null==a?void 0:a.value),f(null==a?void 0:a.value)}}),[I,O]),t(n,{children:l(o,{className:_.select,children:[t(i,{shrink:!(!b&&!A),htmlFor:"appVersion",children:"App Version"}),l(s,{"data-testid":"".concat("DC_versionSelect","_dropdown"),value:b||A,onChange:function(e){f(e.target.value)},autoWidth:!0,disabled:V,label:"App Version",inputProps:{name:"appVersion",id:"appVersion"},children:[C&&t(c,{className:_.group,children:"Labelled Versions (When selected always shows current Beta or Stable Release Versions)"}),I.map((function(e){var a=e.label,l=e.value,r=e.disabled;return t(u,{"data-testid":"".concat("DC_versionSelect","_option_").concat(a,"MenuItem"),value:l,disabled:r,children:a})})),C&&t(c,{className:_.group,children:"Other versions (App will always show selected version until version is deleted)"}),O.map((function(e){var a=e.label,l=e.value;return t(u,{"data-testid":"".concat("DC_versionSelect","_option_").concat(a,"MenuItem"),value:l,children:a})}))]})]})})};S.propTypes={value:b,onChange:f.isRequired,appId:b.isRequired,currentUser:m({}).isRequired},S.defaultProps={value:null};export default S;
1
+ import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/toConsumableArray";import"../../constants/completion.js";import"../../constants/alerts.js";import{maxBy as e}from"lodash";import t from"@babel/runtime/helpers/slicedToArray";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import{PACKAGE_STATUSES as r}from"../../constants/appPackages.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 o,jsxs as i}from"react/jsx-runtime";import{makeStyles as n,Grid as s,FormControl as p,InputLabel as a,Select as m,ListSubheader as l,MenuItem as d}from"@material-ui/core";import{useState as c,useMemo as u,useEffect as j}from"react";import"querystring";import"uuid/v1";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions.js";import"uuid";import"@babel/runtime/helpers/objectWithoutProperties";import{string as C,func as v,shape as b}from"prop-types";import"classnames";import"../Modal/index.js";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Tooltip.js";import"../Avatar/index.js";import"../Annotations/AnnotationsContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"react-router";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{isUserDeveloperAdmin as A}from"../../utils/user.js";import"../ConfirmationDialog.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../PadModeSelect/PadModeSelect.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppContext.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../ErrorBoundary/InternalErrorView/InternalErrorView.js";import"../ErrorBoundary/ErrorBoundary.js";import"../Typography.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/RenderElements.js";import"../SlateFormattedText/SlateFormattedText.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"../DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.css.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import f from"../TruncatedText/index.js";import"../AssetEditor/SingleAssetEditor.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/index.js";import x from"./effects/index.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.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"../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"../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";var g=r,D=n({select:{width:250,margin:"8px 0"},menuListRoot:{maxWidth:580},group:{fontStyle:"italic",fontWeight:"bold",fontSize:"12px",color:"#999"}}),S=function(r){var n=r.value,C=r.onChange,v=r.appId,b=r.currentUser,S=D(),h=x(v,{status:[g.DRAFT,g.PUBLISHED]}),P=h.isLoading,L=h.packages,y=A(b),E=c(n),T=t(E,2),I=T[0],B=T[1],k=u((function(){var e=[{label:"Stable Release - no stable version",value:"PROD",disabled:!0},{label:"Beta - no beta version",value:"BETA",disabled:!0}],t=[];return L.filter((function(e){return e.attributes.status!==g.FAILURE})).forEach((function(r){var o=r.attributes,i=o.version,n=o.notes,s=o.label,p=o.status;if(s){var a="PROD"===s?e[0]:e[1];a.label="".concat("PROD"===s?"Stable Release":"Beta"," v").concat(i," ").concat(n?"- ".concat(n):""),a.disabled=!1}else y&&t.push({label:"v".concat(i," ").concat(n?"- ".concat(n):""),value:i,status:p})})),{labeled:e,unlabeled:t}}),[L,y]),R=k.labeled,F=k.unlabeled;return j((function(){if(y&&!n){var t=R.find((function(e){return!e.disabled}))||e(F.filter((function(e){return"published"===e.status})),"value");B(null==t?void 0:t.value),C(null==t?void 0:t.value)}}),[R,F]),o(s,{children:i(p,{className:S.select,children:[o(a,{shrink:!(!n&&!I),htmlFor:"appVersion",children:"App Version"}),i(m,{"data-testid":"".concat("DC_versionSelect","_dropdown"),value:n||I,onChange:function(e){C(e.target.value)},disabled:P,label:"App Version",inputProps:{name:"appVersion",id:"appVersion"},MenuProps:{MenuListProps:{classes:{root:S.menuListRoot}}},children:[y&&o(l,{className:S.group,children:"Labelled Versions (When selected always shows current Beta or Stable Release Versions)"}),R.map((function(e){var t=e.label,r=e.value,i=e.disabled;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,disabled:i,children:t})})),y&&o(l,{className:S.group,children:"Other versions (App will always show selected version until version is deleted)"}),F.map((function(e){var t=e.label,r=e.value;return o(d,{"data-testid":"".concat("DC_versionSelect","_option_").concat(t,"MenuItem"),value:r,children:o(f,{children:t})})}))]})]})})};S.propTypes={value:C,onChange:v.isRequired,appId:C.isRequired,currentUser:b({}).isRequired},S.defaultProps={value:null};export default S;
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import n from"@babel/runtime/helpers/asyncToGenerator";import{useState as t,useEffect as a}from"react";import{getAppPackages as o}from"../../../clients/jsonApi/index.js";export default function(i){var s=t({isLoading:!1,packages:[],error:null}),c=r(s,2),p=c[0],u=c[1];return a((function(){var r;(r=n(e.mark((function r(){var n,t;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,o(i);case 3:n=r.sent,t=n.data,u({isLoading:!1,packages:t,error:null}),r.next=12;break;case 8:r.prev=8,r.t0=r.catch(0),console.error(r.t0),u({isLoading:!1,packages:[],error:r.t0});case 12:case"end":return r.stop()}}),r,null,[[0,8]])}))),function(){return r.apply(this,arguments)})()}),[i]),p}
1
+ import r from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import n from"@babel/runtime/helpers/asyncToGenerator";import{useState as t,useEffect as a}from"react";import{getAppPackages as o}from"../../../clients/jsonApi/index.js";export default function(i,s){var c=t({isLoading:!1,packages:[],error:null}),p=r(c,2),u=p[0],l=p[1];return a((function(){var r;(r=n(e.mark((function r(){var n,t;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,o(i,s);case 3:n=r.sent,t=n.data,l({isLoading:!1,packages:t,error:null}),r.next=12;break;case 8:r.prev=8,r.t0=r.catch(0),console.error(r.t0),l({isLoading:!1,packages:[],error:r.t0});case 12:case"end":return r.stop()}}),r,null,[[0,8]])}))),function(){return r.apply(this,arguments)})()}),[i]),u}
@@ -0,0 +1 @@
1
+ var r={PUBLISHED:"published",DRAFT:"draft",FAILURE:"failure"};export{r as PACKAGE_STATUSES};
@@ -1 +1 @@
1
- import*as r from"./completion.js";export{r as completion};import*as o from"./alerts.js";export{o as alerts};export{DEV_CENTER_CLI_APP_ID}from"./devcenter.js";import*as s from"./goals.js";export{s as goals};export{ASSET_TYPES}from"./assetTypes.js";import*as t from"./segment.js";export{t as segment};import*as e from"./apps.js";export{e as apps};import*as m from"./drillstring.js";export{m as drillstring};export{COMPLETION_WELL_SUMMARY,DRILLING_WELL_SUMMARY,DRILLOUT_WELL_SUMMARY}from"./wellSummary.js";export{RIG_ACTIVITY_COLORS}from"./rigActivity.js";
1
+ import*as r from"./completion.js";export{r as completion};import*as o from"./alerts.js";export{o as alerts};export{DEV_CENTER_CLI_APP_ID}from"./devcenter.js";import*as s from"./goals.js";export{s as goals};export{ASSET_TYPES}from"./assetTypes.js";import*as t from"./segment.js";export{t as segment};import*as p from"./apps.js";export{p as apps};import*as e from"./drillstring.js";export{e as drillstring};import*as m from"./appPackages.js";export{m as appPackages};export{COMPLETION_WELL_SUMMARY,DRILLING_WELL_SUMMARY,DRILLOUT_WELL_SUMMARY}from"./wellSummary.js";export{RIG_ACTIVITY_COLORS}from"./rigActivity.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.26.0-11",
3
+ "version": "0.26.0-12",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"