@corva/ui 0.61.0-9 → 0.61.0-rc.0
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.
- package/cjs-bundle/components/AppIcon/AppIcon.js +1 -1
- package/cjs-bundle/components/Chart/components/AxisOverlay.js +1 -1
- package/cjs-bundle/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
- package/cjs-bundle/components/EmptyState/EmptyState.js +1 -1
- package/cjs-bundle/components/EmptyState/constants.js +1 -1
- package/cjs-bundle/components/EmptyState/styles.js +1 -1
- package/cjs-bundle/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js +1 -1
- package/cjs-bundle/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/cjs-bundle/components/OffsetWellButton/OffsetWellButton.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
- package/cjs-bundle/components/StatusBadge/components/DQUnvalidatedContent.js +1 -1
- package/cjs-bundle/components/StatusBadge/index.js +1 -1
- package/cjs-bundle/components/SwitchControl/index.js +1 -1
- package/cjs-bundle/components/Table/TableCell/TableCell.js +1 -1
- package/cjs-bundle/components/index.js +1 -1
- package/components/AppIcon/AppIcon.d.ts.map +1 -1
- package/components/AppIcon/AppIcon.js +1 -1
- package/components/Chart/components/AxisOverlay.d.ts +1 -2
- package/components/Chart/components/AxisOverlay.d.ts.map +1 -1
- package/components/Chart/components/AxisOverlay.js +1 -1
- package/components/Chart/options.d.ts +4 -0
- package/components/Chart/options.d.ts.map +1 -1
- package/components/DevCenter/AppHeader/AppHeaderStyles.d.ts +1 -1
- package/components/DevCenter/AppsDataProvider/effects/utils.d.ts.map +1 -1
- package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.d.ts +2 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.d.ts.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.d.ts +2 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.d.ts.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.d.ts.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
- package/components/EmptyState/EmptyState.d.ts +35 -3
- package/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/components/EmptyState/EmptyState.js +1 -1
- package/components/EmptyState/constants.d.ts +32 -0
- package/components/EmptyState/constants.d.ts.map +1 -1
- package/components/EmptyState/constants.js +1 -1
- package/components/EmptyState/styles.js +1 -1
- package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.d.ts +2 -5
- package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.d.ts.map +1 -1
- package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js +1 -1
- package/components/ErrorBoundary/ErrorBoundary.d.ts +3 -3
- package/components/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/components/OffsetWellButton/OffsetWellButton.d.ts +4 -1
- package/components/OffsetWellButton/OffsetWellButton.d.ts.map +1 -1
- package/components/OffsetWellButton/OffsetWellButton.js +1 -1
- package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
- package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
- package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
- package/components/StatusBadge/components/DQUnvalidatedContent.d.ts +3 -1
- package/components/StatusBadge/components/DQUnvalidatedContent.d.ts.map +1 -1
- package/components/StatusBadge/components/DQUnvalidatedContent.js +1 -1
- package/components/StatusBadge/index.d.ts.map +1 -1
- package/components/StatusBadge/index.js +1 -1
- package/components/SwitchControl/index.d.ts +1 -17
- package/components/SwitchControl/index.d.ts.map +1 -1
- package/components/SwitchControl/index.js +1 -1
- package/components/Table/TableCell/TableCell.js +1 -1
- package/components/index.js +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import a from"jsona";import{get as s,isEmpty as i,keyBy as u,uniq as c}from"lodash";import{getWells as o,getRigs as p,getFracFleets as l,getFracFleetWells as f,getPadWells as d,getResolvedAssets as m}from"../../../../clients/jsonApi/index.js";import{DEV_CENTER_CLI_APP_ID as b}from"../../../../constants/devcenter.js";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import{ASSET_TYPES as v}from"../../../../constants/assetTypes.js";import"../../../../utils/env.js";import"../../../GradientManager/configuration/constants.js";function h(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var y=new a,g=function(r,e){return+s(r,["settings",e])},_=function(r,e){return c(r.map((function(r){var e=t(r,2);return e[0],e[1]})).filter((function(r){return Number.isFinite(r)&&!e.includes(String(r))})))};function j(r){return x.apply(this,arguments)}function x(){return(x=e(n.mark((function r(e){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,o({ids:e,fields:["well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.rig","rig.name","rig.asset_id","company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function k(r){return O.apply(this,arguments)}function O(){return(O=e(n.mark((function r(e){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,p({ids:e,fields:["rig.name","rig.settings","rig.asset_id","rig.active_well","rig.last_active_well","well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function I(r){return P.apply(this,arguments)}function P(){return(P=e(n.mark((function r(e){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,m({assets:e});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}var F=function(r,e){return{well:r&&w(w({},r.attributes),{},{id:r.id,companyId:s(r,"relationships.company.data.id")}),rig:{name:s(e,"attributes.name"),id:s(e,"id"),asset_id:s(e,"attributes.asset_id")}}},B=function(r,e){return e&&!i(e)?r.reduce((function(r,n){var a=t(n,2),s=a[0],i=a[1],u=e[i];return r[s]=F(u,u.rig),r}),{}):{}},D=function(r,e){return e&&!i(e)?r.reduce((function(r,n){var a=t(n,2),s=a[0],i=a[1],u=e[i];return r[s]=F(u.well,u),r}),{}):{}},T=function(r,e,n){return e||n?r.reduce((function(r,a){var s=t(a,2),i=s[0],u=s[1],c=null==e?void 0:e[u],o=null==n?void 0:n[i];return r[i]={fracFleet:c,wells:o},r}),{}):{}},q=function(r,e){return r||e?r.reduce((function(r,n){var a=t(n,2),s=a[0];a[1];var i=null==e?void 0:e[s];return r[s]={wells:i},r}),{}):{}};function z(r){return A.apply(this,arguments)}function A(){return(A=e(n.mark((function r(e){var t;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,l({ids:e,fields:["frac_fleet.name","frac_fleet.pads","frac_fleet.current_pad_id","frac_fleet.pad_frac_fleets"]});case 5:return t=r.sent,r.abrupt("return",t?y.deserialize(t):[]);case 9:return r.prev=9,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",[]);case 13:case"end":return r.stop()}}),r,null,[[2,9]])})))).apply(this,arguments)}function E(r,e){return S.apply(this,arguments)}function S(){return S=e(n.mark((function r(a,i){var c,o,p;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=u(i,"id"),o=a.map(function(){var r=e(n.mark((function r(e){var a,i,u,o,p,l;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=t(e,2),i=a[0],u=a[1],o={fields:"all",frac_fleet_id:u},p=c[i],i===b?o.app_key=s(p,["app","app_key"]):o.app_id=s(p,["app","id"]),r.prev=4,r.next=7,f(o);case 7:return l=r.sent,r.abrupt("return",l?y.deserialize(l):[]);case 11:return r.prev=11,r.t0=r.catch(4),console.error(r.t0),r.abrupt("return",[]);case 15:case"end":return r.stop()}}),r,null,[[4,11]])})));return function(e){return r.apply(this,arguments)}}()),r.next=4,Promise.all(o);case 4:return p=r.sent,r.abrupt("return",p.reduce((function(r,e,t){return r[a[t][0]]=e,r}),{}));case 6:case"end":return r.stop()}}),r)}))),S.apply(this,arguments)}function W(r,e){return G.apply(this,arguments)}function G(){return G=e(n.mark((function r(a,i){var c,o,p;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=u(i,"id"),o=a.map(function(){var r=e(n.mark((function r(e){var a,i,u,o,p,l;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=t(e,2),i=a[0],u=a[1],o={fields:"all"},p=c[i],i===b?o.app_key=s(p,["app","app_key"]):o.app_id=s(p,["app","id"]),r.prev=4,r.next=7,d(u,o);case 7:return l=r.sent,r.abrupt("return",l?y.deserialize(l):[]);case 11:return r.prev=11,r.t0=r.catch(4),console.error(r.t0),r.abrupt("return",[]);case 15:case"end":return r.stop()}}),r,null,[[4,11]])})));return function(e){return r.apply(this,arguments)}}()),r.next=4,Promise.all(o);case 4:return p=r.sent,r.abrupt("return",p.reduce((function(r,e,t){return r[a[t][0]]=e,r}),{}));case 6:case"end":return r.stop()}}),r)}))),G.apply(this,arguments)}var R=function(r){return[r.id,g(r,v.well.id),g(r,v.rig.id),g(r,v.frac_fleet.id),g(r,v.pad.id),g(r,"deprecatedAssetId")].join("-")},H=function(r){return Boolean(g(r,v.well.id)||g(r,v.rig.id)||g(r,v.frac_fleet.id)||g(r,v.pad.id))},L=function(r){return{id:r.id,rig:null,well:null,fracFleet:null,wells:null,isLoading:!0,appHash:R(r)}},M=function(e){return e.reduce((function(e,t){return w(w({},e),{},r({},t.id,L(t)))}),{})},N=function(r,e){var t=[],n=[],a=[],s=[],i=[],u=[];r.forEach((function(r){var e=g(r,v.well.id),c=g(r,v.rig.id),o=g(r,v.frac_fleet.id),p=g(r,v.pad.id),l=r.id;u.push([l]),e?t.push([l,e]):c?n.push([l,c]):o&&(a.push([l,o]),p?i.push([l,p]):s.push([l,o]))}));var c=e.current,o=c.rigsById,p=c.wellsById,l=c.fracFleetsById,f=_(t,Object.keys(p)),d=_(n,Object.keys(o)),m=_(a,Object.keys(l));return{appsWellIds:t,appsRigIds:n,appsFracFleetIds:a,appsPadIds:i,appIds:u,appsFracFleetToFetchWellsIds:s,uniqueWellIds:f,uniqueRigIds:d,uniqueFFIds:m}};export{I as fetchAssetEntitiesByAssetIds,E as fetchFracFleetWells,z as fetchFracFleets,W as fetchPadWells,k as fetchRigs,j as fetchWells,g as getAppAssetSpecificTypeId,R as getAppHash,T as getAppsDataByFFs,q as getAppsDataByPads,D as getAppsDataByRigs,B as getAppsDataByWells,L as getInitialAppData,M as getInitialAppsDataState,_ as getUniqAssetIds,H as isAppWithSettings,N as prepareDataForResolver};
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import a from"jsona";import{get as s,isEmpty as i,keyBy as u,uniq as c}from"lodash";import{getWells as o,getRigs as p,getFracFleets as l,getFracFleetWells as f,getPadWells as d,getResolvedAssets as m}from"../../../../clients/jsonApi/index.js";import{DEV_CENTER_CLI_APP_ID as b}from"../../../../constants/devcenter.js";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import{ASSET_TYPES as v}from"../../../../constants/assetTypes.js";import"../../../../utils/env.js";import"../../../GradientManager/configuration/constants.js";function h(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var y=new a,g=function(r,e){return+s(r,["settings",e])},_=function(r,e){return c(r.map((function(r){var e=t(r,2);return e[0],e[1]})).filter((function(r){return Number.isFinite(r)&&!e.includes(String(r))})))};function j(r){return x.apply(this,arguments)}function x(){return(x=e(n.mark((function r(e){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,o({ids:e,fields:["well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.rig","rig.name","rig.asset_id","company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function k(r){return O.apply(this,arguments)}function O(){return(O=e(n.mark((function r(e){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,p({ids:e,fields:["rig.name","rig.settings","rig.asset_id","rig.active_well","rig.last_active_well","well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.id","well.company.id"]});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}function I(r){return P.apply(this,arguments)}function P(){return(P=e(n.mark((function r(e){return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,m({assets:e});case 5:return r.abrupt("return",r.sent);case 8:return r.prev=8,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",null);case 12:case"end":return r.stop()}}),r,null,[[2,8]])})))).apply(this,arguments)}var F=function(r,e){return{well:r&&w(w({},r.attributes),{},{id:r.id,companyId:s(r,"relationships.company.data.id")}),rig:{name:s(e,"attributes.name"),id:s(e,"id"),asset_id:s(e,"attributes.asset_id")}}},B=function(r,e){return e&&!i(e)?r.reduce((function(r,n){var a=t(n,2),s=a[0],i=a[1],u=e[i];return u?(r[s]=F(u,u.rig),r):r}),{}):{}},D=function(r,e){return e&&!i(e)?r.reduce((function(r,n){var a=t(n,2),s=a[0],i=a[1],u=e[i];return r[s]=F(u.well,u),r}),{}):{}},T=function(r,e,n){return e||n?r.reduce((function(r,a){var s=t(a,2),i=s[0],u=s[1],c=null==e?void 0:e[u],o=null==n?void 0:n[i];return r[i]={fracFleet:c,wells:o},r}),{}):{}},q=function(r,e){return r||e?r.reduce((function(r,n){var a=t(n,2),s=a[0];a[1];var i=null==e?void 0:e[s];return r[s]={wells:i},r}),{}):{}};function z(r){return A.apply(this,arguments)}function A(){return(A=e(n.mark((function r(e){var t;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.length){r.next=2;break}return r.abrupt("return",null);case 2:return r.prev=2,r.next=5,l({ids:e,fields:["frac_fleet.name","frac_fleet.pads","frac_fleet.current_pad_id","frac_fleet.pad_frac_fleets"]});case 5:return t=r.sent,r.abrupt("return",t?y.deserialize(t):[]);case 9:return r.prev=9,r.t0=r.catch(2),console.error(r.t0),r.abrupt("return",[]);case 13:case"end":return r.stop()}}),r,null,[[2,9]])})))).apply(this,arguments)}function E(r,e){return S.apply(this,arguments)}function S(){return S=e(n.mark((function r(a,i){var c,o,p;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=u(i,"id"),o=a.map(function(){var r=e(n.mark((function r(e){var a,i,u,o,p,l;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=t(e,2),i=a[0],u=a[1],o={fields:"all",frac_fleet_id:u},p=c[i],i===b?o.app_key=s(p,["app","app_key"]):o.app_id=s(p,["app","id"]),r.prev=4,r.next=7,f(o);case 7:return l=r.sent,r.abrupt("return",l?y.deserialize(l):[]);case 11:return r.prev=11,r.t0=r.catch(4),console.error(r.t0),r.abrupt("return",[]);case 15:case"end":return r.stop()}}),r,null,[[4,11]])})));return function(e){return r.apply(this,arguments)}}()),r.next=4,Promise.all(o);case 4:return p=r.sent,r.abrupt("return",p.reduce((function(r,e,t){return r[a[t][0]]=e,r}),{}));case 6:case"end":return r.stop()}}),r)}))),S.apply(this,arguments)}function W(r,e){return G.apply(this,arguments)}function G(){return G=e(n.mark((function r(a,i){var c,o,p;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=u(i,"id"),o=a.map(function(){var r=e(n.mark((function r(e){var a,i,u,o,p,l;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=t(e,2),i=a[0],u=a[1],o={fields:"all"},p=c[i],i===b?o.app_key=s(p,["app","app_key"]):o.app_id=s(p,["app","id"]),r.prev=4,r.next=7,d(u,o);case 7:return l=r.sent,r.abrupt("return",l?y.deserialize(l):[]);case 11:return r.prev=11,r.t0=r.catch(4),console.error(r.t0),r.abrupt("return",[]);case 15:case"end":return r.stop()}}),r,null,[[4,11]])})));return function(e){return r.apply(this,arguments)}}()),r.next=4,Promise.all(o);case 4:return p=r.sent,r.abrupt("return",p.reduce((function(r,e,t){return r[a[t][0]]=e,r}),{}));case 6:case"end":return r.stop()}}),r)}))),G.apply(this,arguments)}var R=function(r){return[r.id,g(r,v.well.id),g(r,v.rig.id),g(r,v.frac_fleet.id),g(r,v.pad.id),g(r,"deprecatedAssetId")].join("-")},H=function(r){return Boolean(g(r,v.well.id)||g(r,v.rig.id)||g(r,v.frac_fleet.id)||g(r,v.pad.id))},L=function(r){return{id:r.id,rig:null,well:null,fracFleet:null,wells:null,isLoading:!0,appHash:R(r)}},M=function(e){return e.reduce((function(e,t){return w(w({},e),{},r({},t.id,L(t)))}),{})},N=function(r,e){var t=[],n=[],a=[],s=[],i=[],u=[];r.forEach((function(r){var e=g(r,v.well.id),c=g(r,v.rig.id),o=g(r,v.frac_fleet.id),p=g(r,v.pad.id),l=r.id;u.push([l]),e?t.push([l,e]):c?n.push([l,c]):o&&(a.push([l,o]),p?i.push([l,p]):s.push([l,o]))}));var c=e.current,o=c.rigsById,p=c.wellsById,l=c.fracFleetsById,f=_(t,Object.keys(p)),d=_(n,Object.keys(o)),m=_(a,Object.keys(l));return{appsWellIds:t,appsRigIds:n,appsFracFleetIds:a,appsPadIds:i,appIds:u,appsFracFleetToFetchWellsIds:s,uniqueWellIds:f,uniqueRigIds:d,uniqueFFIds:m}};export{I as fetchAssetEntitiesByAssetIds,E as fetchFracFleetWells,z as fetchFracFleets,W as fetchPadWells,k as fetchRigs,j as fetchWells,g as getAppAssetSpecificTypeId,R as getAppHash,T as getAppsDataByFFs,q as getAppsDataByPads,D as getAppsDataByRigs,B as getAppsDataByWells,L as getInitialAppData,M as getInitialAppsDataState,_ as getUniqAssetIds,H as isAppWithSettings,N as prepareDataForResolver};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevCenterAppContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js"],"names":[],"mappings":";AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DevCenterAppContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js"],"names":[],"mappings":";AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;gBAmQC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useContext as o,useState as i}from"react";import r from"classnames";import{pickBy as n,pick as s,noop as p}from"lodash";import{useTheme as a}from"@material-ui/core";import{BugReport as m}from"@material-ui/icons";import l from"../../Icons/AnnotationIcon.js";import d from"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import{AnnotationsProvider as c}from"../../Annotations/AnnotationsContext.js";import{jsx as j,jsxs as u,Fragment as C}from"react/jsx-runtime";import g from"./components/AppActions/AppActions.js";import A from"./components/AppSettingsDialog/AppSettingsDialog.js";import f from"./components/AppSettingsDialogV2/AppSettingsDialog.js";import"./components/AnnotationsButton/AnnotationsButton.js";import S from"./components/NonPriorityMenus/NonPriorityMenus.js";import b from"./components/FullscreenButton/FullscreenButton.js";import"./components/AppInfoMessage/AppInfoMessage.js";import h from"./components/DevCenterAppView/DevCenterAppView.js";import{DcFullscreenElemsCoordinatorProvider as I}from"./components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"./components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import{IsInsideDcAppProvider as P}from"./components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"uuid";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../AppIcon/AppIcon.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import"../AppsDataProvider/AppsDataProvider.js";import{isNativeDetected as v,isMobileDetected as D}from"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import x from"../../../effects/useDevCenterApp.js";import"../../../utils/index.js";import"jsona";import"../../../constants/segment.js";import{isDevOrQAEnv as y}from"../../../utils/env.js";import{DEV_CENTER_CLI_APP_ID as T}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../GradientManager/configuration/constants.js";import"../../StatusBadge/constants.js";import{getAppSegment as E,getAppName as M,getTimestampFromQuery as B}from"../../../utils/devcenter.js";import{HelpCenterIcon as L}from"../../HelpCenter/HelpCenterIcon.js";import k from"./effects/useAppSettings.js";import O from"./effects/useAnnotationsList.js";import F from"./effects/useAnnotationsData.js";import V from"./effects/useAppMaximized.js";import w from"../AppContext.js";import R from"./DevCenterAppContainer.css.js";import H from"./components/RestoreAppSizeButton/index.js";import{getAppVersion as W,getAppAvailability as z}from"./utils.js";import N from"./components/PriorityMenus/PriorityMenus.js";import{DevCenterRouterContext as G}from"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../AssetEditor/index.js";import"../../AssetEditorV2/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Typography.js";import"../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../EmptyState/EmptyState.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.js";import"../../Chart/components/AxisDropdown.js";import"../../Chart/components/ChartSelect.js";import"../../Chart/components/buttons/DragToZoomButton.js";import"../../Chart/components/buttons/ZoomInButton.js";import"../../Chart/components/buttons/ZoomOutButton.js";import"../../Chart/components/buttons/PanButton.js";import"../../Chart/components/buttons/ResetZoomButton.js";import"../../Chart/components/buttons/HideAxesButton.js";import"../../Chart/components/buttons/ChartTypeButton.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../RangeSlider/RangeSlider.js";import"../../AdvancedSlider/AdvancedSlider.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/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 _ from"../../IconButton/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Select/SelectFilterBy.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../GradientManager/GradientPreview/GradientPreview.js";import"../../GradientManager/GradientSelect.styles.js";import"../../GradientPicker/GradientPicker.js";import"../../GradientManager/GradientManager.styles.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.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"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../Notifications/Toast.js";import"../../Toaster/Toaster.js";import{ToastContainer as U}from"../../Toaster/ToastContainer.js";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../Template/TemplateSharingDialog/index.js";import"../../MenuItem/index.js";import"../../PadModeSelect/PadModeSelect.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"../../Table/TableContainer/TableContainer.js";import"../../Table/TableCell/TableCell.js";import"../../Tooltip/ScrollableTooltip.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"../../FilesLoader/Icons/FileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import"../../Search/Search.js";import"../../Search/components/Listbox.js";import"../../Search/components/Paper.js";import"../../Search/components/RecentSearches.js";import"../../Search/components/InputAdornmentLeft.js";import"../../Search/components/Groups.js";import"../../StatusBadge/index.js";import"../../Attachment/index.js";import"../../EmojiIconButton.js";import"../../FileUploadIconButton.js";import"../../FilePreview/index.js";import"../../FailedFileUploading.js";import"../../UserMention/index.js";import"../../CommentsInfo/index.js";import"../../CommentInput/index.js";import"../../Comment/index.js";import"../../CommentLoader.js";import"../../AssetNameLabel/AssetStatusBadge.js";import"../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../AssetEditorV2/components/SelectItem.js";import{showSuccessNotification as Z}from"../../../utils/notificationToasts.js";function q(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function K(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?q(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):q(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var J=v||D,Q="DevCenter_AppContainer";function X(t){var D,q,X,Y,$,tt=t.CLIAppComponent,et=t.CLIAppSettings,ot=t.app,it=t.appId,rt=t.className,nt=t.coordinates,st=t.currentDashboardAppsLastAnnotations,pt=t.currentUser,at=t.devCenterRouter,mt=t.isActionsDisabled,lt=t.isSettingsDialogHidden,dt=t.layoutEnvironment,ct=t.onAppContainerClick,jt=void 0===ct?p:ct,ut=t.onAppRemove,Ct=t.onReportBugClick,gt=t.onCloneDashboard,At=t.onHelpCenterClick,ft=t.onIsMaximizedChange,St=t.onSettingChange,bt=t.onSettingsChange,ht=t.openIntercom,It=void 0===ht?p:ht,Pt=t.setIsFullscreenModalMode,vt=void 0===Pt?p:Pt,Dt=t.timestamp,xt=t.updateCurrentDashboardAppLastAnnotation,yt=o(w),Tt=a(),Et=i([]),Mt=e(Et,2),Bt=Mt[0],Lt=Mt[1],kt=i([]),Ot=e(kt,2),Ft=Ot[0],Vt=Ot[1],wt=null!==(D=null==yt?void 0:yt[it||ot.id])&&void 0!==D?D:{isLoading:!0},Rt=null===(q=ot.package)||void 0===q||null===(X=q.manifest)||void 0===X?void 0:X.application,Ht=E(ot),Wt=!(null==Rt||null===(Y=Rt.ui)||void 0===Y||!Y.multi_rig),zt=M(ot),Nt=V({onIsMaximizedChange:ft,devCenterRouter:at,appId:it}),Gt=Nt.isMaximized,_t=Nt.setIsMaximized,Ut=Dt||B(null===($=at.location.query)||void 0===$?void 0:$.query),Zt=ot.id===T,qt=Zt&&J?K(K({},nt),{},{w:12}):nt,Kt=x({CLIAppComponent:tt,CLIAppSettings:et,app:ot,version:W(ot)}),Jt=Kt.isLoading,Qt=Kt.AppSettings,Xt=Kt.AppComponent,Yt=k({setIsFullscreenModalMode:vt}),$t=Yt.isAppSettingsDialogOpened,te=Yt.toggleAppSettingsDialog,ee=O(),oe=ee.isAnnotationsListOpened,ie=ee.toggleAnnotationsList,re=Jt||!pt||!Wt&&wt.isLoading,ne=F({app:ot,appData:wt,currentDashboardAppsLastAnnotations:st}),se=ne.appLastAnnotation,pe=ne.assetCompanyId,ae=ne.assetIdForAnnotation,me=ne.isAppSupportsAnnotations,le=n(s(wt,["well","rig","fracFleet","wells"]),Boolean);return j(G.Provider,{value:at,children:j(I,{setIsFullscreenModalMode:vt,children:j(P,{value:!0,children:u("div",{className:r("dc-app-container",rt,Gt&&"dc-app-container__maximized",Tt.isLightTheme&&"dc-app-container__light-theme",R.container),"data-testid":"".concat(Q,"_").concat(ot.app.name),onClick:function(){return jt()},children:[j(U,{}),j("div",{className:R.containerContent,children:j(h,{AppComponent:Xt,app:ot,appData:le,isAppLoading:Jt,availability:z(ot.availability,pt.company.with_subscription),isCLIApp:Zt,isLoading:re,isMultiRig:Wt,layoutEnvironment:dt,openIntercom:It,segment:Ht,toggleAppSettingsDialog:te,appProps:{coordinates:qt,currentUser:pt,devCenterRouter:at,onSettingChange:St,onSettingsChange:bt,setIsFullscreenModalMode:vt,setIsMaximized:_t,setMainMenuItems:Lt,setSecondaryMenuItems:Vt,appHeaderProps:K({app:ot,appLastAnnotation:se,appSettings:ot.settings,coordinates:qt,currentUser:pt,isMaximized:Gt,layoutEnvironment:dt,onSettingChange:St,toggleAnnotationsList:ie,updateCurrentDashboardAppLastAnnotation:xt},le),isNative:v,layoutEnvironment:dt,timestamp:Ut}})}),y&&$t&&j(f,{AppSettingsComponent:Qt,app:ot,appData:wt,appName:zt,currentUser:pt,isMultiRig:Wt,isSettingsDialogHidden:lt,layoutEnvironment:dt,onAppRemove:ut,onCloneDashboard:gt,onSettingChange:St,onSettingsChange:bt,segment:Ht,timestamp:Ut,toggleAppSettingsDialog:te}),!y&&$t&&j(A,{AppSettingsComponent:Qt,app:ot,appData:wt,appName:zt,currentUser:pt,isMultiRig:Wt,isSettingsDialogHidden:lt,layoutEnvironment:dt,onAppRemove:ut,onCloneDashboard:gt,onSettingChange:St,onSettingsChange:bt,segment:Ht,timestamp:Ut,toggleAppSettingsDialog:te}),oe&&j(c,{children:j(d,{appId:ot.app.id,appSettings:ot.settings,appTitle:ot.name,assetCompanyId:pe,assetId:ae,currentUser:pt,onClose:ie,showSuccessNotification:Z})}),!mt&&Gt&&j(H,{setIsMaximized:_t}),!mt&&u(g,{children:[me&&j(_,{"data-testid":"".concat(Q,"_addAnnotation"),className:R.footerIconButton,tooltipProps:{title:!J&&"Add Annotation"},onClick:ie,children:j(l,{})}),Ct&&!Zt&&j(_,{onClick:function(){return Ct()},className:R.footerIconButton,tooltipProps:{title:!J&&"Report Bug"},children:j(m,{})}),j(_,{"data-testid":"".concat(Q,"_helpContent"),onClick:function(){return At()},className:R.footerIconButton,disabled:Zt,tooltipProps:{title:!J&&"Help Center"},children:j(L,{appId:ot.app.id,helpContentUpdatedAt:ot.help_content_updated_at})}),J&&!Gt?j(b,{setIsMaximized:_t}):u(C,{children:[j(N,{menuItems:Bt,devCenterRouter:at,isMobileView:J}),j(S,{devCenterRouter:at,isMaximized:Gt,isMobileView:J,menuItems:Ft,setIsFullscreenModalMode:vt,setIsMaximized:_t,toggleAppSettingsDialog:te})]})]})]})})})})}export{X as default};
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useContext as o,useState as i}from"react";import r from"classnames";import{pickBy as n,pick as s,noop as p}from"lodash";import{useTheme as a}from"@material-ui/core";import{BugReport as m}from"@material-ui/icons";import l from"../../Icons/AnnotationIcon.js";import d from"../../Annotations/components/AnnotationsList/index.js";import"../../Annotations/components/LastAnnotation/index.js";import{AnnotationsProvider as c}from"../../Annotations/AnnotationsContext.js";import{jsx as j,jsxs as u,Fragment as C}from"react/jsx-runtime";import g from"./components/AppActions/AppActions.js";import A from"./components/AppSettingsDialog/AppSettingsDialog.js";import f from"./components/AppSettingsDialogV2/AppSettingsDialog.js";import"./components/AnnotationsButton/AnnotationsButton.js";import S from"./components/NonPriorityMenus/NonPriorityMenus.js";import b from"./components/FullscreenButton/FullscreenButton.js";import"./components/AppInfoMessage/AppInfoMessage.js";import h from"./components/DevCenterAppView/DevCenterAppView.js";import{DcFullscreenElemsCoordinatorProvider as I}from"./components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"./components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import{IsInsideDcAppProvider as P}from"./components/IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../Modal/CorvaModal.js";import"uuid";import"../../IconMenu/index.js";import"../../StyledMenuItem/index.js";import"../../AppIcon/AppIcon.js";import"../AppHeader/AppHeader.js";import"../AppSideBar/AppSideBar.js";import"../AppsDataProvider/AppsDataProvider.js";import{isNativeDetected as v,isMobileDetected as D}from"../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions.js";import x from"../../../effects/useDevCenterApp.js";import"../../../utils/index.js";import"jsona";import"../../../constants/segment.js";import{isDevOrQAEnv as y}from"../../../utils/env.js";import{DEV_CENTER_CLI_APP_ID as T}from"../../../constants/devcenter.js";import"../../../constants/goals.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../GradientManager/configuration/constants.js";import"../../StatusBadge/constants.js";import{getAppSegment as E,getAppName as M,getTimestampFromQuery as B}from"../../../utils/devcenter.js";import{HelpCenterIcon as L}from"../../HelpCenter/HelpCenterIcon.js";import k from"./effects/useAppSettings.js";import O from"./effects/useAnnotationsList.js";import F from"./effects/useAnnotationsData.js";import V from"./effects/useAppMaximized.js";import w from"../AppContext.js";import R from"./DevCenterAppContainer.css.js";import H from"./components/RestoreAppSizeButton/index.js";import{getAppVersion as W,getAppAvailability as z}from"./utils.js";import N from"./components/PriorityMenus/PriorityMenus.js";import{DevCenterRouterContext as G}from"../DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../NavigationBar/NavigationBar.js";import"../SideBar/SideBar.js";import"../AppSettingsPopover/AppSettingsPopover.js";import"../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../AssetEditor/index.js";import"../../AssetEditorV2/index.js";import"../../AppVersionsSelect/AppVersionsSelect.js";import"../../LoadingIndicator/LoadingIndicator.js";import"../../Typography.js";import"../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../CollapsableSidebar.js";import"../../DateTimePicker/index.js";import"../../DatePicker/index.js";import"../../ErrorBoundary/ErrorBoundary.js";import"../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../../SlateFormattedText/SlateFormattedText.js";import"../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../EmptyState/EmptyState.js";import"../../ParameterCharts/ParameterCharts.js";import"../../ParameterCharts/AddEditTrack.js";import"../../ChartActionsList/ChartActionsList.js";import"../../CopyToClipboard/CopyToClipboard.js";import"../../AssetEditor/AssetEditorAutocomplete.js";import"../../AssetEditor/SingleAssetEditor.js";import"../../SettingEditors/ColorEditor/index.js";import"../../SettingEditors/DropdownEditor/index.js";import"../../SettingEditors/RadioEditor/index.js";import"../../SwitchControl/index.js";import"../../ColorPicker/ColorPicker.js";import"../../Chart/components/ChartButton.js";import"../../Chart/components/ChartButtons.js";import"../../Chart/components/ChartWrapper.js";import"../../Chart/components/AxisDropdown.js";import"../../Chart/components/ChartSelect.js";import"../../Chart/components/buttons/DragToZoomButton.js";import"../../Chart/components/buttons/ZoomInButton.js";import"../../Chart/components/buttons/ZoomOutButton.js";import"../../Chart/components/buttons/PanButton.js";import"../../Chart/components/buttons/ResetZoomButton.js";import"../../Chart/components/buttons/HideAxesButton.js";import"../../Chart/components/buttons/ChartTypeButton.js";import"../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../TruncatedText/index.js";import"../../RangeSlider/RangeSlider.js";import"../../AdvancedSlider/AdvancedSlider.js";import"../../Breadcrumbs/index.js";import"../../VirtualizedTable/index.js";import"../../EmptyView/EmptyView.js";import"../../EmptyView/EmptyAppView/EmptyAppView.js";import"../../Button/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 _ from"../../IconButton/index.js";import"../../TextField/index.js";import"../../Chip/index.js";import"../../Counter/index.js";import"../../AnchorsList/AnchorsList.js";import"../../Select/index.js";import"../../Select/SelectFilterBy.js";import"../../CustomSelect/index.js";import"../../Tabs/Tabs.js";import"../../Tabs/Tab.js";import"../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../GradientManager/GradientPreview/GradientPreview.js";import"../../GradientManager/GradientSelect.styles.js";import"../../GradientPicker/GradientPicker.js";import"../../GradientManager/GradientManager.styles.js";import"../../Drillstring/BHASchematic.js";import"../../Drillstring/BHATable/index.js";import"../../Drillstring/BHAComponentIcon.js";import"../../Drillstring/BHAComponentDetail/index.js";import"../../Drillstring/BHATileIcon.js";import"../../Drillstring/BHATile/BHATile.js";import"../../Drillstring/BHAList/BHAList.js";import"../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../Casing/CasingTable/index.js";import"../../Casing/CasingComponentIcon.js";import"../../Casing/CasingTileIcon.js";import"../../Casing/CasingTableV2/CasingTableV2.js";import"../../Casing/CasingTile/CasingTile.js";import"../../DisabledSettingsMessage/DisabledSettingsMessage.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"../../OffsetWellButton/OffsetWellButton.js";import"../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../OffsetWellPickerV3/index.js";import"../../OffsetWellChips/Chip.js";import"../../OffsetWellChips/ChipsContainer.js";import"../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../Notifications/Toast.js";import"../../Toaster/Toaster.js";import{ToastContainer as U}from"../../Toaster/ToastContainer.js";import"../../ConfirmationDialog.js";import"../../TextLink/index.js";import"../../Avatar/index.js";import"../../Template/TemplatePopover/index.js";import"../../Template/TemplateSharingDialog/index.js";import"../../MenuItem/index.js";import"../../PadModeSelect/PadModeSelect.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"../../Table/TableContainer/TableContainer.js";import"../../Table/TableCell/TableCell.js";import"../../Tooltip/ScrollableTooltip.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"../../FilesLoader/Icons/FileIcon.js";import"../../SearchInput/index.js";import"../../FeedItem/FeedItem.js";import"../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../PostInput/PostInput.js";import"../../KeyboardDateTimePicker.js";import"../../AddComment/Popover.js";import"../../AddComment/Popup.js";import"../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../StageDesignVActual/ComparisonHeader.js";import"../../StageDesignVActual/ComparisonRow.js";import"../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../EmbeddedApp/EmbeddedApp.js";import"../../Autocomplete/Autocomplete.js";import"../../DocumentViewer/DocumentViewer.js";import"../../ColorPickerPalette/ColorPickerPalette.js";import"../../Search/Search.js";import"../../Search/components/Listbox.js";import"../../Search/components/Paper.js";import"../../Search/components/RecentSearches.js";import"../../Search/components/InputAdornmentLeft.js";import"../../Search/components/Groups.js";import"../../StatusBadge/index.js";import"../../Attachment/index.js";import"../../EmojiIconButton.js";import"../../FileUploadIconButton.js";import"../../FilePreview/index.js";import"../../FailedFileUploading.js";import"../../UserMention/index.js";import"../../CommentsInfo/index.js";import"../../CommentInput/index.js";import"../../Comment/index.js";import"../../CommentLoader.js";import"../../AssetNameLabel/AssetStatusBadge.js";import"../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../AssetEditorV2/components/SelectItem.js";import{showSuccessNotification as Z}from"../../../utils/notificationToasts.js";function q(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function K(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?q(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):q(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var J=v||D,Q="DevCenter_AppContainer";function X(t){var D,q,X,Y,$,tt=t.CLIAppComponent,et=t.CLIAppSettings,ot=t.app,it=t.appId,rt=t.className,nt=t.coordinates,st=t.currentDashboardAppsLastAnnotations,pt=t.currentUser,at=t.devCenterRouter,mt=t.isActionsDisabled,lt=t.isSettingsDialogHidden,dt=t.layoutEnvironment,ct=t.onAppContainerClick,jt=void 0===ct?p:ct,ut=t.onAppRemove,Ct=t.onReportBugClick,gt=t.onCloneDashboard,At=t.onHelpCenterClick,ft=t.onIsMaximizedChange,St=t.onSettingChange,bt=t.onSettingsChange,ht=t.openIntercom,It=void 0===ht?p:ht,Pt=t.setIsFullscreenModalMode,vt=void 0===Pt?p:Pt,Dt=t.timestamp,xt=t.updateCurrentDashboardAppLastAnnotation,yt=o(w),Tt=a(),Et=i([]),Mt=e(Et,2),Bt=Mt[0],Lt=Mt[1],kt=i([]),Ot=e(kt,2),Ft=Ot[0],Vt=Ot[1],wt=null!==(D=null==yt?void 0:yt[it||ot.id])&&void 0!==D?D:{isLoading:!0},Rt=null===(q=ot.package)||void 0===q||null===(X=q.manifest)||void 0===X?void 0:X.application,Ht=E(ot),Wt=!(null==Rt||null===(Y=Rt.ui)||void 0===Y||!Y.multi_rig),zt=M(ot),Nt=V({onIsMaximizedChange:ft,devCenterRouter:at,appId:it}),Gt=Nt.isMaximized,_t=Nt.setIsMaximized,Ut=Dt||B(null===($=at.location.query)||void 0===$?void 0:$.query),Zt=ot.id===T,qt=Zt&&J?K(K({},nt),{},{w:12}):nt,Kt=x({CLIAppComponent:tt,CLIAppSettings:et,app:ot,version:W(ot)}),Jt=Kt.isLoading,Qt=Kt.AppSettings,Xt=Kt.AppComponent,Yt=k({setIsFullscreenModalMode:vt}),$t=Yt.isAppSettingsDialogOpened,te=Yt.toggleAppSettingsDialog,ee=O(),oe=ee.isAnnotationsListOpened,ie=ee.toggleAnnotationsList,re=Jt||!pt||!Wt&&wt.isLoading,ne=F({app:ot,appData:wt,currentDashboardAppsLastAnnotations:st}),se=ne.appLastAnnotation,pe=ne.assetCompanyId,ae=ne.assetIdForAnnotation,me=ne.isAppSupportsAnnotations,le=n(s(wt,["well","rig","fracFleet","wells"]),Boolean);return j(G.Provider,{value:at,children:j(I,{setIsFullscreenModalMode:vt,children:j(P,{value:!0,children:u("div",{className:r("dc-app-container",rt,Gt&&"dc-app-container__maximized",Tt.isLightTheme&&"dc-app-container__light-theme",R.container),"data-testid":"".concat(Q,"_").concat(ot.app.name),onClick:function(){return jt()},children:[j(U,{}),j("div",{className:R.containerContent,children:j(h,{AppComponent:Xt,app:ot,appData:le,isAppLoading:Jt,availability:z(ot.availability,pt.company.with_subscription),isCLIApp:Zt,isLoading:re,isMultiRig:Wt,layoutEnvironment:dt,openIntercom:It,segment:Ht,toggleAppSettingsDialog:te,appProps:{coordinates:qt,currentUser:pt,devCenterRouter:at,onSettingChange:St,onSettingsChange:bt,setIsFullscreenModalMode:vt,setIsMaximized:_t,setMainMenuItems:Lt,setSecondaryMenuItems:Vt,appHeaderProps:K({app:ot,appLastAnnotation:se,appSettings:ot.settings,coordinates:qt,currentUser:pt,isMaximized:Gt,layoutEnvironment:dt,onSettingChange:St,toggleAnnotationsList:ie,updateCurrentDashboardAppLastAnnotation:xt},le),isNative:v,layoutEnvironment:dt,timestamp:Ut}})}),y&&$t&&j(f,{AppSettingsComponent:Qt,app:ot,appData:wt,appName:zt,currentUser:pt,isMultiRig:Wt,isSettingsDialogHidden:lt,layoutEnvironment:dt,onAppRemove:ut,onCloneDashboard:gt,onSettingChange:St,onSettingsChange:bt,openIntercom:It,segment:Ht,timestamp:Ut,toggleAppSettingsDialog:te}),!y&&$t&&j(A,{AppSettingsComponent:Qt,app:ot,appData:wt,appName:zt,currentUser:pt,isMultiRig:Wt,isSettingsDialogHidden:lt,layoutEnvironment:dt,onAppRemove:ut,onCloneDashboard:gt,onSettingChange:St,onSettingsChange:bt,openIntercom:It,segment:Ht,timestamp:Ut,toggleAppSettingsDialog:te}),oe&&j(c,{children:j(d,{appId:ot.app.id,appSettings:ot.settings,appTitle:ot.name,assetCompanyId:pe,assetId:ae,currentUser:pt,onClose:ie,showSuccessNotification:Z})}),!mt&&Gt&&j(H,{setIsMaximized:_t}),!mt&&u(g,{children:[me&&j(_,{"data-testid":"".concat(Q,"_addAnnotation"),className:R.footerIconButton,tooltipProps:{title:!J&&"Add Annotation"},onClick:ie,children:j(l,{})}),Ct&&!Zt&&j(_,{onClick:function(){return Ct()},className:R.footerIconButton,tooltipProps:{title:!J&&"Report Bug"},children:j(m,{})}),j(_,{"data-testid":"".concat(Q,"_helpContent"),onClick:function(){return At()},className:R.footerIconButton,disabled:Zt,tooltipProps:{title:!J&&"Help Center"},children:j(L,{appId:ot.app.id,helpContentUpdatedAt:ot.help_content_updated_at})}),J&&!Gt?j(b,{setIsMaximized:_t}):u(C,{children:[j(N,{menuItems:Bt,devCenterRouter:at,isMobileView:J}),j(S,{devCenterRouter:at,isMaximized:Gt,isMobileView:J,menuItems:Ft,setIsFullscreenModalMode:vt,setIsMaximized:_t,toggleAppSettingsDialog:te})]})]})]})})})})}export{X as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const PAGE_NAME: "DC_appSettings";
|
|
2
2
|
export default AppSettingsDialog;
|
|
3
|
-
declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName, currentUser, isMultiRig, isSettingsDialogHidden, layoutEnvironment, onAppRemove, onCloneDashboard, onSettingsChange, segment, toggleAppSettingsDialog, }: {
|
|
3
|
+
declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName, currentUser, isMultiRig, isSettingsDialogHidden, layoutEnvironment, onAppRemove, onCloneDashboard, onSettingsChange, segment, toggleAppSettingsDialog, openIntercom, }: {
|
|
4
4
|
AppSettingsComponent: any;
|
|
5
5
|
app: any;
|
|
6
6
|
appData: any;
|
|
@@ -14,6 +14,7 @@ declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName
|
|
|
14
14
|
onSettingsChange: any;
|
|
15
15
|
segment: any;
|
|
16
16
|
toggleAppSettingsDialog: any;
|
|
17
|
+
openIntercom: any;
|
|
17
18
|
}): JSX.Element;
|
|
18
19
|
declare namespace AppSettingsDialog {
|
|
19
20
|
namespace propTypes {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"],"names":[],"mappings":"AA8BA,yCAA0C;;AAW1C
|
|
1
|
+
{"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"],"names":[],"mappings":"AA8BA,yCAA0C;;AAW1C;;;;;;;;;;;;;;;gBAwJC"}
|
package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as i}from"react";import{func as o,shape as r,string as s,bool as n}from"prop-types";import{withStyles as p,Dialog as a,Tabs as m,DialogTitle as l,Divider as d,DialogContent as c,Tab as j,DialogActions as u}from"@material-ui/core";import{cloneDeep as C,get as g,noop as A}from"lodash";import b from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import{jsxs as f,jsx as h,Fragment as P}from"react/jsx-runtime";import"../AppActions/AppActions.css.js";import"../AppSettingsDialogV2/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppView/DevCenterAppView.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../Modal/CorvaModal.js";import"uuid";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../../AppIcon/AppIcon.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"@material-ui/icons";import"../../../../Icons/AnnotationIcon.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import{DEV_CENTER_CLI_APP_ID as v}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as D,SEGMENT_TO_ASSET_TYPE as y}from"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/env.js";import"../../../../GradientManager/configuration/constants.js";import"../../../../../utils/index.js";import"jsona";import"../../../../StatusBadge/constants.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import x from"../../../../AssetEditor/index.js";import"../../../../AssetEditorV2/index.js";import T from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Typography.js";import"../../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../../EmptyState/EmptyState.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../CopyToClipboard/CopyToClipboard.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../Chart/components/ChartButton.js";import"../../../../Chart/components/ChartButtons.js";import"../../../../Chart/components/ChartWrapper.js";import"../../../../Chart/components/AxisDropdown.js";import"../../../../Chart/components/ChartSelect.js";import"../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../Chart/components/buttons/PanButton.js";import"../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../Chart/components/buttons/ChartTypeButton.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import I from"../../../../Button/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"../../../../Select/SelectFilterBy.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../GradientManager/GradientSelect.styles.js";import"../../../../GradientPicker/GradientPicker.js";import"../../../../GradientManager/GradientManager.styles.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Drillstring/BHATileIcon.js";import"../../../../Drillstring/BHATile/BHATile.js";import"../../../../Drillstring/BHAList/BHAList.js";import"../../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../../Casing/CasingTable/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTileIcon.js";import"../../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../../Casing/CasingTile/CasingTile.js";import E from"../../../../DisabledSettingsMessage/DisabledSettingsMessage.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"../../../../OffsetWellButton/OffsetWellButton.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../OffsetWellPickerV3/index.js";import"../../../../OffsetWellChips/Chip.js";import"../../../../OffsetWellChips/ChipsContainer.js";import"../../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../Notifications/Toast.js";import"../../../../Toaster/Toaster.js";import B from"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../Template/TemplateSharingDialog/index.js";import"../../../../MenuItem/index.js";import"../../../../PadModeSelect/PadModeSelect.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"../../../../Table/TableContainer/TableContainer.js";import"../../../../Table/TableCell/TableCell.js";import"../../../../Tooltip/ScrollableTooltip.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"../../../../FilesLoader/Icons/FileIcon.js";import"../../../../SearchInput/index.js";import"../../../../FeedItem/FeedItem.js";import"../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../PostInput/PostInput.js";import"../../../../KeyboardDateTimePicker.js";import"../../../../AddComment/Popover.js";import"../../../../AddComment/Popup.js";import"../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../StageDesignVActual/ComparisonRow.js";import"../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../EmbeddedApp/EmbeddedApp.js";import"../../../../Autocomplete/Autocomplete.js";import"../../../../DocumentViewer/DocumentViewer.js";import"../../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../../Search/Search.js";import"../../../../Search/components/Listbox.js";import"../../../../Search/components/Paper.js";import"../../../../Search/components/RecentSearches.js";import"../../../../Search/components/InputAdornmentLeft.js";import"../../../../Search/components/Groups.js";import"../../../../StatusBadge/index.js";import"../../../../Attachment/index.js";import"../../../../EmojiIconButton.js";import"../../../../FileUploadIconButton.js";import"../../../../FilePreview/index.js";import"../../../../FailedFileUploading.js";import"../../../../UserMention/index.js";import"../../../../CommentsInfo/index.js";import"../../../../CommentInput/index.js";import"../../../../Comment/index.js";import"../../../../CommentLoader.js";import"../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../../AssetEditorV2/components/SelectItem.js";import k from"./RemoveAppButton.js";import O from"./AppDetails.js";import V from"./AppSettingsDialog.module.css.js";function L(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function F(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?L(Object(o),!0).forEach((function(i){t(e,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var R="DC_appSettings",w=p({paper:{minWidth:"50rem",height:"40rem"}})(a),M=p({root:{marginBottom:10}})(m),W="SETTINGS",H="APP DETAILS";function G(o){var r=o.AppSettingsComponent,s=o.app,n=o.appData,p=o.appName,a=o.currentUser,m=o.isMultiRig,A=o.isSettingsDialogHidden,L=o.layoutEnvironment,G=o.onAppRemove,N=o.onCloneDashboard,q=o.onSettingsChange,U=o.segment,_=o.toggleAppSettingsDialog,z=i(W),Z=e(z,2),K=Z[0],Y=Z[1],J=i((function(){var t;return F(F({},C(s.settings)),{},{package:s.settings.package||(null==s||null===(t=s.package)||void 0===t?void 0:t.version)})})),Q=e(J,2),X=Q[0],$=Q[1],tt=i(!0),et=e(tt,2),it=et[0],ot=et[1],rt=s.id===v,st=function(e,i){return $((function(o){return F(F({},o),{},t({},e,i))}))},nt=function(t){return $((function(e){return F(F({},e),t)}))},pt=L&&"asset"===L.type,at=!(m||pt&&U===D.COMPLETION);return f(w,{open:!0,onBackdropClick:_,children:[f(l,{children:[p," settings"]}),h(d,{}),f(c,{children:[f(M,{value:K,onChange:function(t,e){return Y(e)},indicatorColor:"primary",textColor:"primary",children:[h(j,{"data-testid":"".concat(R,"_settingsTab"),label:W,value:W}),h(j,{"data-testid":"".concat(R,"_appDetailsTab"),label:H,value:H}),h(I,{"data-testid":"".concat(R,"_viewAppPageTab"),className:V.viewAppButton,onClick:function(){var t,e;return window.open((e=null==s||null===(t=s.app)||void 0===t?void 0:t.id,"/app-store/app/".concat(e)),"_blank")},children:"VIEW APP PAGE"})]}),f(b,{ErrorView:S,app:s,children:[h(B,{open:!it&&!X.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return ot(!0)}}),K===W&&f(P,{children:[A&&h(E,{}),!A&&f(P,{children:[at&&h(x,{appKey:rt?null:s.app.app_key,settings:X,onSettingsChange:nt,appType:y[U],isNullable:pt,label:"Active Asset"}),r&&h(r,{app:s,appData:n,settings:X,onSettingChange:st,onSettingsChange:nt,layoutEnvironment:L,currentUser:a}),h(T,{appId:s.app.id,value:X.package,onChange:function(t){return st("package",t)}})]})]}),K===H&&h(O,{appDescription:g(s,"app.description"),appSummary:g(s,"app.summary")})]})]}),f(u,{children:[!A&&G&&h(k,{appName:p,onAppRemove:G}),h(I,{"data-testid":"".concat(R,"_cancel"),variation:"secondary",onClick:_,children:"Cancel"}),A&&h(I,{variation:"primary",onClick:function(){return N()},children:"Copy Dashboard"}),!A&&h(I,{"data-testid":"".concat(R,"_save"),variation:"primary",onClick:function(){X.package||rt?(q(X),_()):ot(!1)},children:"Save"})]})]})}G.propTypes={AppSettingsComponent:o,app:r({}).isRequired,appData:r({}).isRequired,appName:s.isRequired,currentUser:r({}).isRequired,isMultiRig:n.isRequired,isSettingsDialogHidden:n,layoutEnvironment:r({}).isRequired,onAppRemove:o,onCloneDashboard:o,onSettingsChange:o.isRequired,segment:s.isRequired,toggleAppSettingsDialog:o.isRequired},G.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:A};export{R as PAGE_NAME,G as default};
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as o}from"react";import{func as i,shape as r,string as s,bool as n}from"prop-types";import{withStyles as p,Dialog as a,Tabs as m,DialogTitle as l,Divider as d,DialogContent as c,Tab as j,DialogActions as u}from"@material-ui/core";import{cloneDeep as C,get as g,noop as A}from"lodash";import b from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import{jsxs as f,jsx as h,Fragment as P}from"react/jsx-runtime";import"../AppActions/AppActions.css.js";import"../AppSettingsDialogV2/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppView/DevCenterAppView.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../../Modal/CorvaModal.js";import"uuid";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import"../../../../AppIcon/AppIcon.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"@material-ui/icons";import"../../../../Icons/AnnotationIcon.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import{DEV_CENTER_CLI_APP_ID as v}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as D,SEGMENT_TO_ASSET_TYPE as y}from"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/env.js";import"../../../../GradientManager/configuration/constants.js";import"../../../../../utils/index.js";import"jsona";import"../../../../StatusBadge/constants.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import x from"../../../../AssetEditor/index.js";import"../../../../AssetEditorV2/index.js";import T from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Typography.js";import"../../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../../EmptyState/EmptyState.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../CopyToClipboard/CopyToClipboard.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../Chart/components/ChartButton.js";import"../../../../Chart/components/ChartButtons.js";import"../../../../Chart/components/ChartWrapper.js";import"../../../../Chart/components/AxisDropdown.js";import"../../../../Chart/components/ChartSelect.js";import"../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../Chart/components/buttons/PanButton.js";import"../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../Chart/components/buttons/ChartTypeButton.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import I from"../../../../Button/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"../../../../Select/SelectFilterBy.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../GradientManager/GradientSelect.styles.js";import"../../../../GradientPicker/GradientPicker.js";import"../../../../GradientManager/GradientManager.styles.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Drillstring/BHATileIcon.js";import"../../../../Drillstring/BHATile/BHATile.js";import"../../../../Drillstring/BHAList/BHAList.js";import"../../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../../Casing/CasingTable/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTileIcon.js";import"../../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../../Casing/CasingTile/CasingTile.js";import E from"../../../../DisabledSettingsMessage/DisabledSettingsMessage.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"../../../../OffsetWellButton/OffsetWellButton.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../OffsetWellPickerV3/index.js";import"../../../../OffsetWellChips/Chip.js";import"../../../../OffsetWellChips/ChipsContainer.js";import"../../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../Notifications/Toast.js";import"../../../../Toaster/Toaster.js";import B from"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../Template/TemplateSharingDialog/index.js";import"../../../../MenuItem/index.js";import"../../../../PadModeSelect/PadModeSelect.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"../../../../Table/TableContainer/TableContainer.js";import"../../../../Table/TableCell/TableCell.js";import"../../../../Tooltip/ScrollableTooltip.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"../../../../FilesLoader/Icons/FileIcon.js";import"../../../../SearchInput/index.js";import"../../../../FeedItem/FeedItem.js";import"../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../PostInput/PostInput.js";import"../../../../KeyboardDateTimePicker.js";import"../../../../AddComment/Popover.js";import"../../../../AddComment/Popup.js";import"../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../StageDesignVActual/ComparisonRow.js";import"../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../EmbeddedApp/EmbeddedApp.js";import"../../../../Autocomplete/Autocomplete.js";import"../../../../DocumentViewer/DocumentViewer.js";import"../../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../../Search/Search.js";import"../../../../Search/components/Listbox.js";import"../../../../Search/components/Paper.js";import"../../../../Search/components/RecentSearches.js";import"../../../../Search/components/InputAdornmentLeft.js";import"../../../../Search/components/Groups.js";import"../../../../StatusBadge/index.js";import"../../../../Attachment/index.js";import"../../../../EmojiIconButton.js";import"../../../../FileUploadIconButton.js";import"../../../../FilePreview/index.js";import"../../../../FailedFileUploading.js";import"../../../../UserMention/index.js";import"../../../../CommentsInfo/index.js";import"../../../../CommentInput/index.js";import"../../../../Comment/index.js";import"../../../../CommentLoader.js";import"../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../../AssetEditorV2/components/SelectItem.js";import k from"./RemoveAppButton.js";import O from"./AppDetails.js";import V from"./AppSettingsDialog.module.css.js";function L(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function F(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?L(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var R="DC_appSettings",w=p({paper:{minWidth:"50rem",height:"40rem"}})(a),M=p({root:{marginBottom:10}})(m),W="SETTINGS",H="APP DETAILS";function G(i){var r=i.AppSettingsComponent,s=i.app,n=i.appData,p=i.appName,a=i.currentUser,m=i.isMultiRig,A=i.isSettingsDialogHidden,L=i.layoutEnvironment,G=i.onAppRemove,N=i.onCloneDashboard,q=i.onSettingsChange,U=i.segment,_=i.toggleAppSettingsDialog,z=i.openIntercom,Z=o(W),K=e(Z,2),Y=K[0],J=K[1],Q=o((function(){var t;return F(F({},C(s.settings)),{},{package:s.settings.package||(null==s||null===(t=s.package)||void 0===t?void 0:t.version)})})),X=e(Q,2),$=X[0],tt=X[1],et=o(!0),ot=e(et,2),it=ot[0],rt=ot[1],st=s.id===v,nt=function(e,o){return tt((function(i){return F(F({},i),{},t({},e,o))}))},pt=function(t){return tt((function(e){return F(F({},e),t)}))},at=L&&"asset"===L.type,mt=!(m||at&&U===D.COMPLETION);return f(w,{open:!0,onBackdropClick:_,children:[f(l,{children:[p," settings"]}),h(d,{}),f(c,{children:[f(M,{value:Y,onChange:function(t,e){return J(e)},indicatorColor:"primary",textColor:"primary",children:[h(j,{"data-testid":"".concat(R,"_settingsTab"),label:W,value:W}),h(j,{"data-testid":"".concat(R,"_appDetailsTab"),label:H,value:H}),h(I,{"data-testid":"".concat(R,"_viewAppPageTab"),className:V.viewAppButton,onClick:function(){var t,e;return window.open((e=null==s||null===(t=s.app)||void 0===t?void 0:t.id,"/app-store/app/".concat(e)),"_blank")},children:"VIEW APP PAGE"})]}),f(b,{ErrorView:S,openIntercom:z,children:[h(B,{open:!it&&!$.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return rt(!0)}}),Y===W&&f(P,{children:[A&&h(E,{}),!A&&f(P,{children:[mt&&h(x,{appKey:st?null:s.app.app_key,settings:$,onSettingsChange:pt,appType:y[U],isNullable:at,label:"Active Asset"}),r&&h(r,{app:s,appData:n,settings:$,onSettingChange:nt,onSettingsChange:pt,layoutEnvironment:L,currentUser:a}),h(T,{appId:s.app.id,value:$.package,onChange:function(t){return nt("package",t)}})]})]}),Y===H&&h(O,{appDescription:g(s,"app.description"),appSummary:g(s,"app.summary")})]})]}),f(u,{children:[!A&&G&&h(k,{appName:p,onAppRemove:G}),h(I,{"data-testid":"".concat(R,"_cancel"),variation:"secondary",onClick:_,children:"Cancel"}),A&&h(I,{variation:"primary",onClick:function(){return N()},children:"Copy Dashboard"}),!A&&h(I,{"data-testid":"".concat(R,"_save"),variation:"primary",onClick:function(){$.package||st?(q($),_()):rt(!1)},children:"Save"})]})]})}G.propTypes={AppSettingsComponent:i,app:r({}).isRequired,appData:r({}).isRequired,appName:s.isRequired,currentUser:r({}).isRequired,isMultiRig:n.isRequired,isSettingsDialogHidden:n,layoutEnvironment:r({}).isRequired,onAppRemove:i,onCloneDashboard:i,onSettingsChange:i.isRequired,segment:s.isRequired,toggleAppSettingsDialog:i.isRequired},G.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:A};export{R as PAGE_NAME,G as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const PAGE_NAME: "DC_appSettings";
|
|
2
2
|
export default AppSettingsDialog;
|
|
3
|
-
declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName, currentUser, isMultiRig, isSettingsDialogHidden, layoutEnvironment, onAppRemove, onCloneDashboard, onSettingsChange, segment, toggleAppSettingsDialog, }: {
|
|
3
|
+
declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName, currentUser, isMultiRig, isSettingsDialogHidden, layoutEnvironment, onAppRemove, onCloneDashboard, onSettingsChange, openIntercom, segment, toggleAppSettingsDialog, }: {
|
|
4
4
|
AppSettingsComponent: any;
|
|
5
5
|
app: any;
|
|
6
6
|
appData: any;
|
|
@@ -12,6 +12,7 @@ declare function AppSettingsDialog({ AppSettingsComponent, app, appData, appName
|
|
|
12
12
|
onAppRemove: any;
|
|
13
13
|
onCloneDashboard: any;
|
|
14
14
|
onSettingsChange: any;
|
|
15
|
+
openIntercom: any;
|
|
15
16
|
segment: any;
|
|
16
17
|
toggleAppSettingsDialog: any;
|
|
17
18
|
}): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js"],"names":[],"mappings":"AAyBA,yCAA0C;;AAI1C
|
|
1
|
+
{"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js"],"names":[],"mappings":"AAyBA,yCAA0C;;AAI1C;;;;;;;;;;;;;;;gBAsNC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useState as o,useRef as i,useEffect as r}from"react";import{node as n,shape as s,string as p,bool as a,func as m}from"prop-types";import{cloneDeep as l,noop as d}from"lodash";import{Accordion as c,AccordionSummary as j,AccordionDetails as u}from"@material-ui/core";import{ArrowForward as C,ExpandMore as g}from"@material-ui/icons";import A from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import h from"../../../../Modal/Modal.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import{AppIcon as f}from"../../../../AppIcon/AppIcon.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"../../../../Icons/AnnotationIcon.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import{DEV_CENTER_CLI_APP_ID as b}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as v,SEGMENT_TO_ASSET_TYPE as P}from"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/env.js";import"../../../../GradientManager/configuration/constants.js";import"../../../../../utils/index.js";import"uuid";import"jsona";import"../../../../StatusBadge/constants.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../AppActions/AppActions.css.js";import{jsx as x,jsxs as D,Fragment as y}from"react/jsx-runtime";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppView/DevCenterAppView.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../AssetEditor/index.js";import I from"../../../../AssetEditorV2/index.js";import T from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Typography.js";import"../../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../../EmptyState/EmptyState.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../CopyToClipboard/CopyToClipboard.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../Chart/components/ChartButton.js";import"../../../../Chart/components/ChartButtons.js";import"../../../../Chart/components/ChartWrapper.js";import"../../../../Chart/components/AxisDropdown.js";import"../../../../Chart/components/ChartSelect.js";import"../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../Chart/components/buttons/PanButton.js";import"../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../Chart/components/buttons/ChartTypeButton.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import E from"../../../../Button/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"../../../../Select/SelectFilterBy.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../GradientManager/GradientSelect.styles.js";import"../../../../GradientPicker/GradientPicker.js";import"../../../../GradientManager/GradientManager.styles.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Drillstring/BHATileIcon.js";import"../../../../Drillstring/BHATile/BHATile.js";import"../../../../Drillstring/BHAList/BHAList.js";import"../../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../../Casing/CasingTable/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTileIcon.js";import"../../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../../Casing/CasingTile/CasingTile.js";import B from"../../../../DisabledSettingsMessage/DisabledSettingsMessage.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"../../../../OffsetWellButton/OffsetWellButton.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../OffsetWellPickerV3/index.js";import"../../../../OffsetWellChips/Chip.js";import"../../../../OffsetWellChips/ChipsContainer.js";import"../../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../Notifications/Toast.js";import"../../../../Toaster/Toaster.js";import k from"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../Template/TemplateSharingDialog/index.js";import"../../../../MenuItem/index.js";import"../../../../PadModeSelect/PadModeSelect.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"../../../../Table/TableContainer/TableContainer.js";import"../../../../Table/TableCell/TableCell.js";import"../../../../Tooltip/ScrollableTooltip.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"../../../../FilesLoader/Icons/FileIcon.js";import"../../../../SearchInput/index.js";import"../../../../FeedItem/FeedItem.js";import"../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../PostInput/PostInput.js";import"../../../../KeyboardDateTimePicker.js";import"../../../../AddComment/Popover.js";import"../../../../AddComment/Popup.js";import"../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../StageDesignVActual/ComparisonRow.js";import"../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../EmbeddedApp/EmbeddedApp.js";import"../../../../Autocomplete/Autocomplete.js";import"../../../../DocumentViewer/DocumentViewer.js";import"../../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../../Search/Search.js";import"../../../../Search/components/Listbox.js";import"../../../../Search/components/Paper.js";import"../../../../Search/components/RecentSearches.js";import"../../../../Search/components/InputAdornmentLeft.js";import"../../../../Search/components/Groups.js";import"../../../../StatusBadge/index.js";import"../../../../Attachment/index.js";import"../../../../EmojiIconButton.js";import"../../../../FileUploadIconButton.js";import"../../../../FilePreview/index.js";import"../../../../FailedFileUploading.js";import"../../../../UserMention/index.js";import"../../../../CommentsInfo/index.js";import"../../../../CommentInput/index.js";import"../../../../Comment/index.js";import"../../../../CommentLoader.js";import"../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../../AssetEditorV2/components/SelectItem.js";import O from"./RemoveAppButton.js";import V from"./styles.js";function L(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function F(e){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?L(Object(i),!0).forEach((function(o){t(e,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var M="DC_appSettings";function R(n){var s,p=n.AppSettingsComponent,a=n.app,m=n.appData,d=n.appName,L=n.currentUser,M=n.isMultiRig,R=n.isSettingsDialogHidden,w=n.layoutEnvironment,N=n.onAppRemove,W=n.onCloneDashboard,H=n.onSettingsChange,G=n.segment,q=n.toggleAppSettingsDialog,U=o((function(){var t;return F(F({},l(a.settings)),{},{package:a.settings.package||(null==a||null===(t=a.package)||void 0===t?void 0:t.version)})})),_=e(U,2),z=_[0],Z=_[1],K=o(!1),Y=e(K,2),J=Y[0],Q=Y[1],X=o(!1),$=e(X,2),tt=$[0],et=$[1],ot=o(!0),it=e(ot,2),rt=it[0],nt=it[1],st=V({isCompletionApp:G===v.COMPLETION}),pt=i(),at=a.id===b,mt=function(e,o){return Z((function(i){return F(F({},i),{},t({},e,o))}))},lt=function(t){return Z((function(e){return F(F({},e),t)}))},dt=w&&"asset"===w.type,ct=!(M||dt&&G===v.COMPLETION);r((function(){Q(!0)}),[]),r((function(){var t;J&&et(Boolean(null===(t=pt.current)||void 0===t?void 0:t.clientHeight))}),[J]);var jt=x(p,{app:a,appData:m,settings:z,onSettingChange:mt,onSettingsChange:lt,layoutEnvironment:w,currentUser:L}),ut=D("div",{className:st.modalTitleContainer,children:[x(f,{className:st.appIcon,segment:null==a?void 0:a.segment,iconUrl:null==a||null===(s=a.icon)||void 0===s?void 0:s.url,height:48,width:48}),D("div",{children:[x("div",{children:"".concat(d," Settings")}),D("div",{className:st.appStoreButton,onClick:function(){var t,e;return window.open((e=null==a||null===(t=a.app)||void 0===t?void 0:t.id,"/app-store/app/".concat(e)),"_top")},children:["Open in Appstore ",x(C,{className:st.arrowIcon})]})]})]}),Ct=D("div",{className:st.modalActions,children:[!R&&N&&x(O,{appName:d,onAppRemove:N}),D("div",{className:st.mainActions,children:[x(E,{"data-testid":"".concat("DC_appSettings","_cancel"),variation:"secondary",onClick:q,children:"Cancel"}),R&&x(E,{variation:"primary",onClick:function(){return W()},children:"Copy Dashboard"}),!R&&x(E,{"data-testid":"".concat("DC_appSettings","_save"),className:st.saveButton,variation:"primary",onClick:function(){z.package||at?(H(z),q()):nt(!1)},children:"Save"})]})]}),gt=D(y,{children:[ct&&x(I,{appKey:at?null:a.app.app_key,settings:z,onSettingsChange:lt,appType:P[G],isNullable:dt,label:"Asset",isHiddenTitle:!0}),x(T,{className:st.appVersionSelect,appId:a.app.id,value:z.package,onChange:function(t){return mt("package",t)}})]});return D(h,{open:!0,onClose:q,title:ut,contentContainerClassName:st.modalContainer,modalTitleClassName:st.modalTitle,closeIconClassName:st.closeIcon,contentClassName:st.modalContent,actions:Ct,children:[!tt&&x("div",{className:st.hiddenAppSettings,ref:pt,children:jt}),D(A,{ErrorView:S,app:a,children:[x(k,{open:!rt&&!z.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return nt(!0)}}),R&&x(B,{}),!R&&tt&&D(y,{children:[D(c,{defaultExpanded:!0,className:st.assetAccordion,children:[x(j,{classes:{content:st.summaryContent,expandIcon:st.expandIcon},expandIcon:x(g,{}),children:"Asset"}),x(u,{classes:{root:st.accordionDetails},children:gt})]}),D(c,{className:st.accordion,defaultExpanded:!0,children:[x(j,{classes:{content:st.summaryContent,expandIcon:st.expandIcon},expandIcon:x(g,{}),children:"App Settings"}),x(u,{classes:{root:st.accordionDetails},children:jt})]})]}),!R&&!tt&>]})]})}R.propTypes={AppSettingsComponent:n,app:s({}).isRequired,appData:s({}).isRequired,appName:p.isRequired,currentUser:s({}).isRequired,isMultiRig:a.isRequired,isSettingsDialogHidden:a,layoutEnvironment:s({}).isRequired,onAppRemove:m,onCloneDashboard:m,onSettingsChange:m.isRequired,segment:p.isRequired,toggleAppSettingsDialog:m.isRequired},R.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:d};export{M as PAGE_NAME,R as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as o,useRef as i,useEffect as r}from"react";import{node as n,shape as s,string as p,bool as a,func as m}from"prop-types";import{cloneDeep as l,noop as d}from"lodash";import{Accordion as c,AccordionSummary as j,AccordionDetails as u}from"@material-ui/core";import{ArrowForward as C,ExpandMore as g}from"@material-ui/icons";import A from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import h from"../../../../Modal/Modal.js";import"../../../../IconMenu/index.js";import"../../../../StyledMenuItem/index.js";import{AppIcon as f}from"../../../../AppIcon/AppIcon.js";import"../../../AppHeader/AppHeader.js";import"../../../AppSideBar/AppSideBar.js";import"../../../AppsDataProvider/AppsDataProvider.js";import"classnames";import"../../../../Icons/AnnotationIcon.js";import"../../../../Annotations/components/AnnotationsList/index.js";import"../../../../Annotations/components/LastAnnotation/index.js";import"../../../../Annotations/AnnotationsContext.js";import"../../../../../utils/mobileDetect.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../../clients/jsonApi/index.js";import"../../../../../clients/subscriptions.js";import{DEV_CENTER_CLI_APP_ID as b}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as v,SEGMENT_TO_ASSET_TYPE as P}from"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import"../../../../../utils/env.js";import"../../../../GradientManager/configuration/constants.js";import"../../../../../utils/index.js";import"uuid";import"jsona";import"../../../../StatusBadge/constants.js";import"../../../../HelpCenter/HelpCenterIcon.js";import"../AppActions/AppActions.css.js";import{jsx as x,jsxs as D,Fragment as I}from"react/jsx-runtime";import"../AppSettingsDialog/AppSettingsDialog.js";import"../AnnotationsButton/AnnotationsButton.js";import"../NonPriorityMenus/NonPriorityMenus.js";import"../FullscreenButton/FullscreenButton.js";import"../AppInfoMessage/AppInfoMessage.js";import"../DevCenterAppView/DevCenterAppView.js";import"../DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../IsInsideDcAppProvider/IsInsideDcAppProvider.js";import"../../../AppContext.js";import"../../DevCenterAppContainer.css.js";import"../RestoreAppSizeButton/index.js";import"../PriorityMenus/PriorityMenus.css.js";import"../../../DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../../NavigationBar/NavigationBar.js";import"../../../SideBar/SideBar.js";import"../../../AppSettingsPopover/AppSettingsPopover.js";import"../../../AppFilterPanelLayout/AppFilterPanelLayout.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../../../IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../../../../AssetEditor/index.js";import y from"../../../../AssetEditorV2/index.js";import T from"../../../../AppVersionsSelect/AppVersionsSelect.js";import"../../../../LoadingIndicator/LoadingIndicator.js";import"../../../../Typography.js";import"../../../../RealTimeValuesSidebar/RealTimeSidebar.js";import"../../../../CollapsableSidebar.js";import"../../../../DateTimePicker/index.js";import"../../../../DatePicker/index.js";import"../../../../SlateFormattedText/SlateFormattedText.js";import"../../../../SlateFormattedText/RenderElements.js";import"@babel/runtime/helpers/typeof";import"slate";import"../../../../EmptyState/EmptyState.js";import"../../../../ParameterCharts/ParameterCharts.js";import"../../../../ParameterCharts/AddEditTrack.js";import"../../../../ChartActionsList/ChartActionsList.js";import"../../../../CopyToClipboard/CopyToClipboard.js";import"../../../../AssetEditor/AssetEditorAutocomplete.js";import"../../../../AssetEditor/SingleAssetEditor.js";import"../../../../SettingEditors/ColorEditor/index.js";import"../../../../SettingEditors/DropdownEditor/index.js";import"../../../../SettingEditors/RadioEditor/index.js";import"../../../../SwitchControl/index.js";import"../../../../ColorPicker/ColorPicker.js";import"../../../../Chart/components/ChartButton.js";import"../../../../Chart/components/ChartButtons.js";import"../../../../Chart/components/ChartWrapper.js";import"../../../../Chart/components/AxisDropdown.js";import"../../../../Chart/components/ChartSelect.js";import"../../../../Chart/components/buttons/DragToZoomButton.js";import"../../../../Chart/components/buttons/ZoomInButton.js";import"../../../../Chart/components/buttons/ZoomOutButton.js";import"../../../../Chart/components/buttons/PanButton.js";import"../../../../Chart/components/buttons/ResetZoomButton.js";import"../../../../Chart/components/buttons/HideAxesButton.js";import"../../../../Chart/components/buttons/ChartTypeButton.js";import"../../../../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../../../../TruncatedText/index.js";import"../../../../RangeSlider/RangeSlider.js";import"../../../../AdvancedSlider/AdvancedSlider.js";import"../../../../Breadcrumbs/index.js";import"../../../../VirtualizedTable/index.js";import"../../../../EmptyView/EmptyView.js";import"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import E from"../../../../Button/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"../../../../Select/SelectFilterBy.js";import"../../../../CustomSelect/index.js";import"../../../../Tabs/Tabs.js";import"../../../../Tabs/Tab.js";import"../../../../ResizableTable/ResizableTable.js";import"@material-ui/icons/Check";import"@material-ui/icons/Close";import"@material-ui/icons/Edit";import"@material-ui/icons/Delete";import"../../../../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../../../../GradientManager/GradientPreview/GradientPreview.js";import"../../../../GradientManager/GradientSelect.styles.js";import"../../../../GradientPicker/GradientPicker.js";import"../../../../GradientManager/GradientManager.styles.js";import"../../../../Drillstring/BHASchematic.js";import"../../../../Drillstring/BHATable/index.js";import"../../../../Drillstring/BHAComponentIcon.js";import"../../../../Drillstring/BHAComponentDetail/index.js";import"../../../../Drillstring/BHATileIcon.js";import"../../../../Drillstring/BHATile/BHATile.js";import"../../../../Drillstring/BHAList/BHAList.js";import"../../../../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../../../../Casing/CasingTable/index.js";import"../../../../Casing/CasingComponentIcon.js";import"../../../../Casing/CasingTileIcon.js";import"../../../../Casing/CasingTableV2/CasingTableV2.js";import"../../../../Casing/CasingTile/CasingTile.js";import B from"../../../../DisabledSettingsMessage/DisabledSettingsMessage.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"../../../../OffsetWellButton/OffsetWellButton.js";import"../../../../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../../../../OffsetWellPickerV3/index.js";import"../../../../OffsetWellChips/Chip.js";import"../../../../OffsetWellChips/ChipsContainer.js";import"../../../../OffsetWellPickerV4/OffsetWellPickerV4.js";import"../../../../OffsetWellMap/OffsetWellMap.js";import"@material-ui/core/Snackbar";import"../../../../Notifications/Toast.js";import"../../../../Toaster/Toaster.js";import k from"../../../../ConfirmationDialog.js";import"../../../../TextLink/index.js";import"../../../../Avatar/index.js";import"../../../../Template/TemplatePopover/index.js";import"../../../../Template/TemplateSharingDialog/index.js";import"../../../../MenuItem/index.js";import"../../../../PadModeSelect/PadModeSelect.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"../../../../Table/TableContainer/TableContainer.js";import"../../../../Table/TableCell/TableCell.js";import"../../../../Tooltip/ScrollableTooltip.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"../../../../FilesLoader/Icons/FileIcon.js";import"../../../../SearchInput/index.js";import"../../../../FeedItem/FeedItem.js";import"../../../../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../../../../PostInput/PostInput.js";import"../../../../KeyboardDateTimePicker.js";import"../../../../AddComment/Popover.js";import"../../../../AddComment/Popup.js";import"../../../../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../../../../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../../../../StageDesignVActual/ComparisonHeader.js";import"../../../../StageDesignVActual/ComparisonRow.js";import"../../../../EmbeddedApp/DevCenterEmbeddedApp.js";import"../../../../EmbeddedApp/EmbeddedApp.js";import"../../../../Autocomplete/Autocomplete.js";import"../../../../DocumentViewer/DocumentViewer.js";import"../../../../ColorPickerPalette/ColorPickerPalette.js";import"../../../../Search/Search.js";import"../../../../Search/components/Listbox.js";import"../../../../Search/components/Paper.js";import"../../../../Search/components/RecentSearches.js";import"../../../../Search/components/InputAdornmentLeft.js";import"../../../../Search/components/Groups.js";import"../../../../StatusBadge/index.js";import"../../../../Attachment/index.js";import"../../../../EmojiIconButton.js";import"../../../../FileUploadIconButton.js";import"../../../../FilePreview/index.js";import"../../../../FailedFileUploading.js";import"../../../../UserMention/index.js";import"../../../../CommentsInfo/index.js";import"../../../../CommentInput/index.js";import"../../../../Comment/index.js";import"../../../../CommentLoader.js";import"../../../../AssetNameLabel/AssetStatusBadge.js";import"../../../../AssetEditorV2/components/PrimaryAssetSelect.js";import"../../../../AssetEditorV2/components/SecondaryAssetSelect.js";import"../../../../AssetEditorV2/components/SelectItem.js";import O from"./RemoveAppButton.js";import V from"./styles.js";function L(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function F(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?L(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var M="DC_appSettings";function R(n){var s,p=n.AppSettingsComponent,a=n.app,m=n.appData,d=n.appName,L=n.currentUser,M=n.isMultiRig,R=n.isSettingsDialogHidden,w=n.layoutEnvironment,N=n.onAppRemove,W=n.onCloneDashboard,H=n.onSettingsChange,G=n.openIntercom,q=n.segment,U=n.toggleAppSettingsDialog,_=o((function(){var e;return F(F({},l(a.settings)),{},{package:a.settings.package||(null==a||null===(e=a.package)||void 0===e?void 0:e.version)})})),z=t(_,2),Z=z[0],K=z[1],Y=o(!1),J=t(Y,2),Q=J[0],X=J[1],$=o(!1),ee=t($,2),te=ee[0],oe=ee[1],ie=o(!0),re=t(ie,2),ne=re[0],se=re[1],pe=V({isCompletionApp:q===v.COMPLETION}),ae=i(),me=a.id===b,le=function(t,o){return K((function(i){return F(F({},i),{},e({},t,o))}))},de=function(e){return K((function(t){return F(F({},t),e)}))},ce=w&&"asset"===w.type,je=!(M||ce&&q===v.COMPLETION);r((function(){X(!0)}),[]),r((function(){var e;Q&&oe(Boolean(null===(e=ae.current)||void 0===e?void 0:e.clientHeight))}),[Q]);var ue=p&&x(p,{app:a,appData:m,settings:Z,onSettingChange:le,onSettingsChange:de,layoutEnvironment:w,currentUser:L}),Ce=D("div",{className:pe.modalTitleContainer,children:[x(f,{className:pe.appIcon,segment:null==a?void 0:a.segment,iconUrl:null==a||null===(s=a.icon)||void 0===s?void 0:s.url,height:48,width:48}),D("div",{children:[x("div",{children:"".concat(d," Settings")}),D("div",{className:pe.appStoreButton,onClick:function(){var e,t;return window.open((t=null==a||null===(e=a.app)||void 0===e?void 0:e.id,"/app-store/app/".concat(t)),"_top")},children:["Open in Appstore ",x(C,{className:pe.arrowIcon})]})]})]}),ge=D("div",{className:pe.modalActions,children:[!R&&N&&x(O,{appName:d,onAppRemove:N}),D("div",{className:pe.mainActions,children:[x(E,{"data-testid":"".concat("DC_appSettings","_cancel"),variation:"secondary",onClick:U,children:"Cancel"}),R&&x(E,{variation:"primary",onClick:function(){return W()},children:"Copy Dashboard"}),!R&&x(E,{"data-testid":"".concat("DC_appSettings","_save"),className:pe.saveButton,variation:"primary",onClick:function(){Z.package||me?(H(Z),U()):se(!1)},children:"Save"})]})]}),Ae=D(I,{children:[je&&x(y,{appKey:me?null:a.app.app_key,settings:Z,onSettingsChange:de,appType:P[q],isNullable:ce,label:"Asset",isHiddenTitle:!0}),x(T,{className:pe.appVersionSelect,appId:a.app.id,value:Z.package,onChange:function(e){return le("package",e)}})]});return D(h,{open:!0,onClose:U,title:Ce,contentContainerClassName:pe.modalContainer,modalTitleClassName:pe.modalTitle,closeIconClassName:pe.closeIcon,contentClassName:pe.modalContent,actions:ge,children:[!te&&x("div",{className:pe.hiddenAppSettings,ref:ae,children:ue}),D(A,{ErrorView:S,openIntercom:G,children:[x(k,{open:!ne&&!Z.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return se(!0)}}),R&&x(B,{}),!R&&te&&D(I,{children:[D(c,{defaultExpanded:!0,className:pe.assetAccordion,children:[x(j,{classes:{content:pe.summaryContent,expandIcon:pe.expandIcon},expandIcon:x(g,{}),children:"Asset"}),x(u,{classes:{root:pe.accordionDetails},children:Ae})]}),D(c,{className:pe.accordion,defaultExpanded:!0,children:[x(j,{classes:{content:pe.summaryContent,expandIcon:pe.expandIcon},expandIcon:x(g,{}),children:"App Settings"}),x(u,{classes:{root:pe.accordionDetails},children:ue})]})]}),!R&&!te&&Ae]})]})}R.propTypes={AppSettingsComponent:n,app:s({}).isRequired,appData:s({}).isRequired,appName:p.isRequired,currentUser:s({}).isRequired,isMultiRig:a.isRequired,isSettingsDialogHidden:a,layoutEnvironment:s({}).isRequired,onAppRemove:m,onCloneDashboard:m,onSettingsChange:m.isRequired,segment:p.isRequired,toggleAppSettingsDialog:m.isRequired},R.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:d};export{M as PAGE_NAME,R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as n,__awaiter as r,__generator as e}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as t}from"react/jsx-runtime";import{createContext as i,useRef as u,useMemo as c,useContext as o}from"react";var s;!function(n){n.CLOSED="CLOSED",n.OPENNING="OPENNING",n.OPENED="OPENED",n.CLOSING="CLOSING"}(s||(s={}));var a=i(null),l=function(i){var o=i.setIsFullscreenModalMode,l=i.children,f={name:s.CLOSED,currentElementInfo:null},E=u({}),N=c((function(){function n(n){var t=n.transitionFn,i=n.plannedAfterTransitionFinishCb;return r(this,void 0,void 0,(function(){var n;return e(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,t()];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),console.error("Transition error: ",n),[3,3];case 3:return i(),[2]}}))}))}function t(n){var r=n.id;E.current[
|
|
1
|
+
import{__assign as n,__awaiter as r,__generator as e}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as t}from"react/jsx-runtime";import{createContext as i,useRef as u,useMemo as c,useContext as o}from"react";var s;!function(n){n.CLOSED="CLOSED",n.OPENNING="OPENNING",n.OPENED="OPENED",n.CLOSING="CLOSING"}(s||(s={}));var a=i(null),l=function(i){var o=i.setIsFullscreenModalMode,l=i.children,f={name:s.CLOSED,currentElementInfo:null},E=u({}),N=c((function(){function n(n){var t=n.transitionFn,i=n.plannedAfterTransitionFinishCb;return r(this,void 0,void 0,(function(){var n;return e(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,t()];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),console.error("Transition error: ",n),[3,3];case 3:return i(),[2]}}))}))}function t(n){var r,e=n.id;E.current[e]={name:s.OPENED,currentElementInfo:n},null===(r=E.current[e].currentElementInfo)||void 0===r||r.setIsOpened(!0)}function i(r){var e=r.id;E.current[e]={name:s.OPENNING,currentElementInfo:null},n({transitionFn:function(){return o(!0)},plannedAfterTransitionFinishCb:function(){t(r)}})}function u(t){var i=this;E.current[t].name=s.CLOSING,n({transitionFn:function(){return r(i,void 0,void 0,(function(){return e(this,(function(n){return E.current[t].currentElementInfo.setIsOpened(!1),E.current[t].currentElementInfo=null,Object.keys(E.current).some((function(n){var r=E.current[n].name;return r===s.OPENNING||r===s.OPENED}))?[2]:[2,o(!1)]}))}))},plannedAfterTransitionFinishCb:function(){E.current[t].name=s.CLOSED}})}return{requestOpen:function(n){var r,e=n.id;switch((null===(r=E.current)||void 0===r?void 0:r[e])||(E.current[e]=f),E.current[n.id].name){case s.CLOSED:i(n);break;case s.OPENNING:case s.OPENED:t(n);break;case s.CLOSING:i(n)}},requestClose:function(n){var r,e=n.setIsOpened,t=n.id;switch((null===(r=E.current)||void 0===r?void 0:r[t])||(E.current[t]=f),E.current[t].name){case s.OPENNING:case s.OPENED:u(t);break;case s.CLOSING:case s.CLOSED:default:e(!1)}}}}),[o]);return t(a.Provider,n({value:N},{children:l}))};function f(){return o(a)}export{l as DcFullscreenElemsCoordinatorProvider,f as useDcFullscreenElemsCoordinator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevCenterAppView.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DevCenterAppView.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.tsx"],"names":[],"mappings":";AASA,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,MAAyC,CAAC;AAEnG,iBAAS,gBAAgB,CAAC,EACxB,YAAY,EACZ,GAAG,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,uBAAuB,GACxB;;;;;;;;;;;;;CAAA,eAgIA;kBA7IQ,gBAAgB;;;;;;;;AAsJzB,eAAe,gBAAgB,CAAC"}
|
package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as e}from"react/jsx-runtime";import
|
|
1
|
+
import{__assign as t}from'./../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as e}from"react/jsx-runtime";import i from"../../../../ErrorBoundary/ErrorBoundary.js";import"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import r from"../../../../LoadingIndicator/LoadingIndicator.js";import{SEGMENTS as a}from"../../../../../constants/segment.js";import o from"../../../../EmptyView/EmptyAppView/EmptyAppView.js";import p from"../../../../EmptyState/EmptyState.js";import{ChooseAssetButton as s}from"./components/ChooseAssetButton.js";import l from"../AppInfoMessage/AppInfoMessage.js";var n=function(t){return"".concat(t," has no active well")};function u(u){var d,c=u.AppComponent,A=u.app,S=u.appData,m=u.appProps,g=u.availability,E=u.isCLIApp,f=u.isLoading,P=u.isMultiRig,b=u.layoutEnvironment,M=u.openIntercom,I=u.segment,v=u.toggleAppSettingsDialog;if(!A.package)return e(l,t({app:A},{children:e(p,{title:p.APP_MESSAGES.appPackageWasNotFound.title,subtitle:p.APP_MESSAGES.appPackageWasNotFound.subtitle,image:p.IMAGES.AppLoadingError})}));if(f)return e(l,t({app:A},{children:e(r,{})}));if(!g.hasProductSubscription||!g.isAppSubscribedForAsset){var N=p.APP_MESSAGES,h=N.appNotSubscribed,G=N.appNotSubscribedForAsset,F=p.IMAGES.NoSubscription,y=g.hasProductSubscription?G:h,w=y.title,_=y.subtitle;return e(l,t({app:A},{children:e(p,{title:w,subtitle:_,image:F})}))}if(!c)return e(l,t({app:A},{children:e(p,{title:o.APP_MESSAGES.appComponentWasNotFound.title,image:p.IMAGES.AppLoadingError})}));if(!P){var j=E&&e(s,{toggleAppSettingsDialog:v});if(S.rig&&!S.well)return e(l,t({app:A},{children:e(p,{title:n(S.rig.name),image:p.IMAGES.RigHasNoActiveWell,subtitle:j})}));if("general"===(null==b?void 0:b.type)&&I===a.COMPLETION&&!S.fracFleet)return e(l,t({app:A},{children:e(p,{title:o.APP_MESSAGES.fracFleetWasNotFound.title,image:p.IMAGES.FracFleetHasNoActivePad,subtitle:j})}));if("general"===(null==b?void 0:b.type)&&I===a.COMPLETION&&!(null===(d=S.fracFleet)||void 0===d?void 0:d.current_pad_id)&&!A.settings.padId)return e(l,t({app:A},{children:e(p,{image:p.IMAGES.FracFleetHasNoActivePad,subtitle:j,title:p.APP_MESSAGES.fracFleetHasNoPad.title})}));if("general"===(null==b?void 0:b.type)&&I===a.COMPLETION&&(!S.wells||S.wells.length<1))return e(l,t({app:A},{children:e(p,{image:p.IMAGES.NoWellsSelected,subtitle:j,title:p.APP_MESSAGES.padHasNoWells.title})}));if(!(S.rig||S.well||S.settings||S.wells))return e(l,t({app:A},{children:e(p,{image:p.IMAGES.AssetHasNoData,subtitle:j,title:p.APP_MESSAGES.noAssetData.title})}))}return e(i,t({app:A,openIntercom:M},{children:e(c,t({app:A},A.settings,S,m))}))}u.defaultProps={availability:{hasProductSubscription:!0,isAppSubscribedForAsset:!0}};export{u as default,n as getNoActiveWellMessage};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import * as images from './images';
|
|
3
3
|
export interface EmptyStateProps {
|
|
4
|
-
title?: string;
|
|
5
|
-
subtitle?: string;
|
|
4
|
+
title?: string | ReactNode;
|
|
5
|
+
subtitle?: string | ReactNode;
|
|
6
6
|
image?: string;
|
|
7
7
|
classes?: {
|
|
8
8
|
root?: string;
|
|
@@ -22,6 +22,38 @@ declare namespace EmptyState {
|
|
|
22
22
|
classes: {};
|
|
23
23
|
};
|
|
24
24
|
var IMAGES: typeof images;
|
|
25
|
+
var APP_MESSAGES: {
|
|
26
|
+
appNotSubscribed: {
|
|
27
|
+
title: string;
|
|
28
|
+
subtitle: string;
|
|
29
|
+
};
|
|
30
|
+
appNotSubscribedForAsset: {
|
|
31
|
+
title: string;
|
|
32
|
+
subtitle: string;
|
|
33
|
+
};
|
|
34
|
+
internalAppError: {
|
|
35
|
+
title: string;
|
|
36
|
+
};
|
|
37
|
+
appPackageWasNotFound: {
|
|
38
|
+
title: string;
|
|
39
|
+
subtitle: string;
|
|
40
|
+
};
|
|
41
|
+
fracFleetWasNotFound: {
|
|
42
|
+
title: string;
|
|
43
|
+
};
|
|
44
|
+
fracFleetHasNoPad: {
|
|
45
|
+
title: string;
|
|
46
|
+
};
|
|
47
|
+
padHasNoWells: {
|
|
48
|
+
title: string;
|
|
49
|
+
};
|
|
50
|
+
appComponentWasNotFound: {
|
|
51
|
+
title: string;
|
|
52
|
+
};
|
|
53
|
+
noAssetData: {
|
|
54
|
+
title: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
25
57
|
}
|
|
26
58
|
export default EmptyState;
|
|
27
59
|
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAC;AAEpD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAsBjG;kBAtBQ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCnB,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useState as i,useRef as r}from"react";import a from"classnames";import*as o from"./images/index.js";import{NoDataAvailable as m}from"./images/index.js";import l from"../../effects/useResizeObserver.js";import{SIZES as c}from"./constants.js";import{getSize as
|
|
1
|
+
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useState as i,useRef as r}from"react";import a from"classnames";import*as o from"./images/index.js";import{NoDataAvailable as m}from"./images/index.js";import l from"../../effects/useResizeObserver.js";import{SIZES as c,APP_MESSAGES as n}from"./constants.js";import{getSize as d}from"./utils.js";import{useStyles as f}from"./styles.js";function u(o){var m=o.title,n=o.subtitle,u=o.image,p=o.classes,b=o.dataTestId,v=i(c.LARGE),j=v[0],g=v[1],S=r();l({callback:function(e){var t=e[0].borderBoxSize[0].blockSize;g(d(t))},containerRef:S});var A=f({image:u,size:j}),N=j!==c.SMALL;return t("div",e({className:a(A.root,p.root),"data-testid":b},{children:s("div",e({className:a(A.content,p.content),ref:S},{children:[t("div",e({className:a(A.title,p.title)},{children:m})),t("div",e({className:a(A.subtitle,p.subtitle)},{children:n})),N&&t("img",{src:u,className:A.image,alt:"error"})]}))}))}u.defaultProps={title:"No Data Available",subtitle:"",image:m,classes:{}},u.IMAGES=o,u.APP_MESSAGES=n;export{u as default};
|
|
@@ -3,4 +3,36 @@ export declare enum SIZES {
|
|
|
3
3
|
MEDIUM = "medium",
|
|
4
4
|
LARGE = "large"
|
|
5
5
|
}
|
|
6
|
+
export declare const APP_MESSAGES: {
|
|
7
|
+
appNotSubscribed: {
|
|
8
|
+
title: string;
|
|
9
|
+
subtitle: string;
|
|
10
|
+
};
|
|
11
|
+
appNotSubscribedForAsset: {
|
|
12
|
+
title: string;
|
|
13
|
+
subtitle: string;
|
|
14
|
+
};
|
|
15
|
+
internalAppError: {
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
appPackageWasNotFound: {
|
|
19
|
+
title: string;
|
|
20
|
+
subtitle: string;
|
|
21
|
+
};
|
|
22
|
+
fracFleetWasNotFound: {
|
|
23
|
+
title: string;
|
|
24
|
+
};
|
|
25
|
+
fracFleetHasNoPad: {
|
|
26
|
+
title: string;
|
|
27
|
+
};
|
|
28
|
+
padHasNoWells: {
|
|
29
|
+
title: string;
|
|
30
|
+
};
|
|
31
|
+
appComponentWasNotFound: {
|
|
32
|
+
title: string;
|
|
33
|
+
};
|
|
34
|
+
noAssetData: {
|
|
35
|
+
title: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
6
38
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,KAAK;IACf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var t;!function(t){t.SMALL="small",t.MEDIUM="medium",t.LARGE="large"}(t||(t={}));var e={appNotSubscribed:{title:"No Subscription exists for this app.",subtitle:"Contact your Corva Account rep to get access to this app."},appNotSubscribedForAsset:{title:"No Subscription exists for this asset.",subtitle:"Contact your Corva Account rep to get access to this asset."},internalAppError:{title:"App Loading Error"},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"},appComponentWasNotFound:{title:"App component was not found"},noAssetData:{title:"No asset data were found"}};export{e as APP_MESSAGES,t as SIZES};
|