@corva/ui 0.84.0-4 → 0.84.0-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js +1 -1
- package/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.d.ts.map +1 -1
- package/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.js +1 -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/AppSettingsDialog/components/RemoveAppButton.d.ts +1 -9
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.d.ts.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),i=require("react"),r=require("@material-ui/core/styles"),a=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),i=require("react"),r=require("@material-ui/core/styles"),a=require("../../constants.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(i),n=r.makeStyles((function(e){return{offline:{marginLeft:4,position:"relative",top:-4},livePulsed:{marginLeft:6,position:"relative",transform:"translateX(-50%) translateY(-50%)",width:8,height:8,"&:before":{content:'""',position:"relative",display:"block",width:"150%",height:"150%",boxSizing:"border-box",marginTop:"-2px",marginLeft:"-2px",borderRadius:"45px",backgroundColor:e.palette.success.bright,animation:"$pulseRing 3.25s cubic-bezier(0.215, 0.61, 0.355, 1) infinite"},"&:after":{content:'""',position:"absolute",left:0,top:0,display:"block",width:"100%",height:"100%",backgroundColor:e.palette.success.bright,borderRadius:"15px",boxShadow:"0 0 8px rgba(0,0,0,.3)",animation:"$pulseDot 3.25s cubic-bezier(0.455, 0.03, 0.515, 0.955) -.4s infinite"}},"@keyframes pulseRing":{"0%":{opacity:0,transform:"scale(.55)"},"50%":{opacity:.5},"100%":{opacity:0}},"@keyframes pulseDot":{"0%":{transform:"scale(.6)",opacity:.5},"50%":{transform:"scale(.7)",opacity:1},"100%":{transform:"scale(.6)",opacity:.5}}}})),l=s.default.memo((function(i){var r=i.state,o=n();return r===a.LiveButtonState.Default?null:r===a.LiveButtonState.Live?t.jsx("div",{className:o.livePulsed,"aria-label":"Live indicator"}):t.jsxs("svg",e.__assign({className:o.offline,fill:"none",height:"8",viewBox:"0 0 8 8",width:"8",xmlns:"http://www.w3.org/2000/svg","aria-label":"Idle indicator"},{children:[t.jsx("circle",{opacity:"0.4",cx:"4",cy:"4",r:"4",fill:"#616161"}),t.jsx("circle",{cx:"4",cy:"4",r:"2",fill:"#616161"})]}))}));exports.LiveButtonStateIndicator=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/slicedToArray"),s=require("react"),t=require("prop-types"),r=require("lodash"),i=require("@material-ui/core"),o=require("@material-ui/icons");require("@babel/runtime/helpers/objectWithoutProperties"),require("@material-ui/pickers"),require("@date-io/moment"),require("moment"),require("../../../../../config/theme/index.js");var a=require("react/jsx-runtime"),c=require("../../../../../hocs/withAssetEditorLockHOC.js"),u=require("../../../../ErrorBoundary/ErrorBoundary.js"),l=require("../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js"),p=require("../../../../Button/components/Button/index.js");require("moment-timezone"),require("classnames"),require("../../../../../icons/WithCustomSize.js"),require("../../../../../icons/IconParkProvider.js"),require("../../../../../icons/customIcons/icons/AddMessage.js"),require("../../../../../icons/customIcons/icons/Attention.js"),require("../../../../../icons/customIcons/icons/Collapse.js"),require("../../../../../icons/customIcons/icons/Expand.js"),require("../../../../../icons/customIcons/icons/FolderClosed.js"),require("../../../../../icons/customIcons/icons/FolderOpened.js"),require("../../../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../../../icons/customIcons/icons/Search.js"),require("../../../../../icons/customIcons/icons/Wellhub.js"),require("../../../../../icons/customIcons/icons/MultiRuler.js"),require("../../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js"),require("../../../../Button/components/LiveButton/styles.js");var d=require("../../../../Modal/Modal.js"),m=require("../../../../../constants/devcenter.js");require("../../../../../constants/goals.js");var j=require("../../../../../constants/segment.js");require("../../../../../constants/alerts.js"),require("../../../../../constants/apps.js"),require("../../../../../constants/drillstring.js"),require("../../../../../constants/completion.js"),require("../../../../../constants/appPackages.js"),require("../../../../../constants/notifications.js"),require("../../../../../constants/feed.js"),require("../../../../../constants/bha.js");var g=require("../../../../../constants/assetTypes.js");require("../../../../../utils/env.js"),require("../../../../GradientManager/configuration/constants.js");var v=require("../../../../AssetEditorV2/index.js"),f=require("../../../../AppVersionsSelect/AppVersionsSelect.js"),q=require("../../../../DisabledSettingsMessage/DisabledSettingsMessage.js"),h=require("../../../../ConfirmationDialog.js");require("../../../../../utils/index.js");var x=require("../../../../AppIcon/AppIcon.js"),S=require("../../../../../utils/devcenter.js"),y=require("./components/RemoveAppButton.js"),A=require("../../utils.js"),C=require("./styles.js"),b=require("../../../../../utils/notificationToasts.js");function I(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=I(e),D=I(n);function O(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),s.push.apply(s,t)}return s}function N(e){for(var n=1;n<arguments.length;n++){var s=null!=arguments[n]?arguments[n]:{};n%2?O(Object(s),!0).forEach((function(n){E.default(e,n,s[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):O(Object(s)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(s,n))}))}return e}var P="DC_appSettings",T=c(v);function k(e){var n,t,c,I,O,k,w=e.AppSettingsComponent,M=e.app,R=e.appData,_=e.appName,B=e.currentUser,V=e.isMultiRig,L=e.isSettingsDialogHidden,H=e.layoutEnvironment,F=e.onAppRemove,G=e.onCloneDashboard,U=e.onSettingsChange,W=e.openIntercom,z=e.rigId,Y=e.toggleAppSettingsDialog,K=(null==M||null===(n=M.segment)||void 0===n?void 0:n.length)>1,J=s.useState(S.getAppSegment(M)),Q=D.default(J,2),X=Q[0],Z=Q[1],$=X===j.SEGMENTS.COMPLETION,ee=j.SEGMENT_TO_ASSET_TYPE[X],ne=H&&"asset"===H.type,se=s.useState(!1)[1],te=s.useState(!0),re=D.default(te,2),ie=re[0],oe=re[1],ae=!(V||ne&&$),ce=s.useRef(z);s.useEffect((function(){ie||oe(!0)}),[ie]);var ue=s.useState((function(){var e;return N(N({},r.cloneDeep(M.settings)),{},{package:M.settings.package||(null==M||null===(e=M.package)||void 0===e?void 0:e.version)})})),le=D.default(ue,2),pe=le[0],de=le[1],me=A.getIsSustainabilityApp(null==M||null===(t=M.app)||void 0===t?void 0:t.id),je=s.useState(""),ge=D.default(je,2),ve=ge[0],fe=ge[1],qe=s.useRef(null),he=Boolean(null===(c=qe.current)||void 0===c?void 0:c.clientHeight),xe=C.useStyles({isCompletionApp:$,isSustainabilityApp:me,hasCustomAppSettings:he}),Se=M.id===m.DEV_CENTER_CLI_APP_ID,ye=function(e,n){return de((function(s){return N(N({},s),{},E.default({},e,n))}))},Ae=function(e){return de((function(n){return N(N({},n),e)}))},Ce=ne?T:v;s.useEffect((function(){r.debounce(se,200)(!0)}),[]);var be=a.jsx("div",{ref:qe,children:w&&a.jsx(w,{app:M,appData:R,settings:pe,onSettingChange:ye,onSettingsChange:Ae,layoutEnvironment:H,currentUser:B})}),Ie=a.jsxs("div",{className:xe.modalTitleContainer,children:[a.jsx(x.AppIcon,{className:xe.appIcon,segment:[X],iconUrl:null==M||null===(I=M.app)||void 0===I||null===(O=I.icon)||void 0===O?void 0:O.url,height:48,width:48}),a.jsxs("div",{children:[a.jsx("div",{children:"".concat(_," Settings")}),a.jsxs("div",{"data-testid":"".concat(P,"_appstoreLink"),className:xe.appStoreButton,onClick:function(){var e,n;return window.open((n=null==M||null===(e=M.app)||void 0===e?void 0:e.id,"/app-store/app/".concat(n)),"_top")},children:["Open in Appstore ",a.jsx(o.ArrowForward,{className:xe.arrowIcon})]})]})]}),Ee=a.jsxs("div",{className:xe.modalActions,children:[!L&&F&&a.jsx(y.default,{
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/slicedToArray"),s=require("react"),t=require("prop-types"),r=require("lodash"),i=require("@material-ui/core"),o=require("@material-ui/icons");require("@babel/runtime/helpers/objectWithoutProperties"),require("@material-ui/pickers"),require("@date-io/moment"),require("moment"),require("../../../../../config/theme/index.js");var a=require("react/jsx-runtime"),c=require("../../../../../hocs/withAssetEditorLockHOC.js"),u=require("../../../../ErrorBoundary/ErrorBoundary.js"),l=require("../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js"),p=require("../../../../Button/components/Button/index.js");require("moment-timezone"),require("classnames"),require("../../../../../icons/WithCustomSize.js"),require("../../../../../icons/IconParkProvider.js"),require("../../../../../icons/customIcons/icons/AddMessage.js"),require("../../../../../icons/customIcons/icons/Attention.js"),require("../../../../../icons/customIcons/icons/Collapse.js"),require("../../../../../icons/customIcons/icons/Expand.js"),require("../../../../../icons/customIcons/icons/FolderClosed.js"),require("../../../../../icons/customIcons/icons/FolderOpened.js"),require("../../../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../../../icons/customIcons/icons/Search.js"),require("../../../../../icons/customIcons/icons/Wellhub.js"),require("../../../../../icons/customIcons/icons/MultiRuler.js"),require("../../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js"),require("../../../../Button/components/LiveButton/styles.js");var d=require("../../../../Modal/Modal.js"),m=require("../../../../../constants/devcenter.js");require("../../../../../constants/goals.js");var j=require("../../../../../constants/segment.js");require("../../../../../constants/alerts.js"),require("../../../../../constants/apps.js"),require("../../../../../constants/drillstring.js"),require("../../../../../constants/completion.js"),require("../../../../../constants/appPackages.js"),require("../../../../../constants/notifications.js"),require("../../../../../constants/feed.js"),require("../../../../../constants/bha.js");var g=require("../../../../../constants/assetTypes.js");require("../../../../../utils/env.js"),require("../../../../GradientManager/configuration/constants.js");var v=require("../../../../AssetEditorV2/index.js"),f=require("../../../../AppVersionsSelect/AppVersionsSelect.js"),q=require("../../../../DisabledSettingsMessage/DisabledSettingsMessage.js"),h=require("../../../../ConfirmationDialog.js");require("../../../../../utils/index.js");var x=require("../../../../AppIcon/AppIcon.js"),S=require("../../../../../utils/devcenter.js"),y=require("./components/RemoveAppButton.js"),A=require("../../utils.js"),C=require("./styles.js"),b=require("../../../../../utils/notificationToasts.js");function I(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=I(e),D=I(n);function O(e,n){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),s.push.apply(s,t)}return s}function N(e){for(var n=1;n<arguments.length;n++){var s=null!=arguments[n]?arguments[n]:{};n%2?O(Object(s),!0).forEach((function(n){E.default(e,n,s[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):O(Object(s)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(s,n))}))}return e}var P="DC_appSettings",T=c(v);function k(e){var n,t,c,I,O,k,w=e.AppSettingsComponent,M=e.app,R=e.appData,_=e.appName,B=e.currentUser,V=e.isMultiRig,L=e.isSettingsDialogHidden,H=e.layoutEnvironment,F=e.onAppRemove,G=e.onCloneDashboard,U=e.onSettingsChange,W=e.openIntercom,z=e.rigId,Y=e.toggleAppSettingsDialog,K=(null==M||null===(n=M.segment)||void 0===n?void 0:n.length)>1,J=s.useState(S.getAppSegment(M)),Q=D.default(J,2),X=Q[0],Z=Q[1],$=X===j.SEGMENTS.COMPLETION,ee=j.SEGMENT_TO_ASSET_TYPE[X],ne=H&&"asset"===H.type,se=s.useState(!1)[1],te=s.useState(!0),re=D.default(te,2),ie=re[0],oe=re[1],ae=!(V||ne&&$),ce=s.useRef(z);s.useEffect((function(){ie||oe(!0)}),[ie]);var ue=s.useState((function(){var e;return N(N({},r.cloneDeep(M.settings)),{},{package:M.settings.package||(null==M||null===(e=M.package)||void 0===e?void 0:e.version)})})),le=D.default(ue,2),pe=le[0],de=le[1],me=A.getIsSustainabilityApp(null==M||null===(t=M.app)||void 0===t?void 0:t.id),je=s.useState(""),ge=D.default(je,2),ve=ge[0],fe=ge[1],qe=s.useRef(null),he=Boolean(null===(c=qe.current)||void 0===c?void 0:c.clientHeight),xe=C.useStyles({isCompletionApp:$,isSustainabilityApp:me,hasCustomAppSettings:he}),Se=M.id===m.DEV_CENTER_CLI_APP_ID,ye=function(e,n){return de((function(s){return N(N({},s),{},E.default({},e,n))}))},Ae=function(e){return de((function(n){return N(N({},n),e)}))},Ce=ne?T:v;s.useEffect((function(){r.debounce(se,200)(!0)}),[]);var be=a.jsx("div",{ref:qe,children:w&&a.jsx(w,{app:M,appData:R,settings:pe,onSettingChange:ye,onSettingsChange:Ae,layoutEnvironment:H,currentUser:B})}),Ie=a.jsxs("div",{className:xe.modalTitleContainer,children:[a.jsx(x.AppIcon,{className:xe.appIcon,segment:[X],iconUrl:null==M||null===(I=M.app)||void 0===I||null===(O=I.icon)||void 0===O?void 0:O.url,height:48,width:48}),a.jsxs("div",{children:[a.jsx("div",{children:"".concat(_," Settings")}),a.jsxs("div",{"data-testid":"".concat(P,"_appstoreLink"),className:xe.appStoreButton,onClick:function(){var e,n;return window.open((n=null==M||null===(e=M.app)||void 0===e?void 0:e.id,"/app-store/app/".concat(n)),"_top")},children:["Open in Appstore ",a.jsx(o.ArrowForward,{className:xe.arrowIcon})]})]})]}),Ee=a.jsxs("div",{className:xe.modalActions,children:[!L&&F&&a.jsx(y.default,{onAppRemove:F}),a.jsxs("div",{children:[a.jsx(p,{"data-testid":"".concat(P,"_cancel"),variation:"secondary",onClick:Y,children:"Cancel"}),L&&a.jsx(p,{variation:"primary",onClick:function(){return G()},children:"Copy Dashboard"}),!L&&a.jsx(p,{"data-testid":"".concat(P,"_save"),className:xe.saveButton,variation:"primary",onClick:function(){if(!pe.package&&!Se)return fe("Please select app version");if(ae&&!ne){var e=null==ee?void 0:ee.primaryAsset.assetType.id,n=null==ee?void 0:ee.primaryAsset.assetType.label;if(e&&!pe[e])return fe("Please select ".concat(n))}return U(pe),b.showSuccessNotification("Successfully saved"),Y()},children:"Save"})]})]}),De=a.jsxs(a.Fragment,{children:[K&&a.jsxs(i.FormControl,{className:xe.segmentSelector,children:[a.jsx(i.InputLabel,{children:"Segment"}),a.jsx(i.Select,{value:X,onChange:function(e){var n=e.target.value;ce.current=null,oe(!1),Z(n),de(N(N({package:pe.package,segment:n},r.mapValues(r.keyBy(g.ASSET_TYPES,"id"),(function(){return null}))),{},{assets:null}))},children:M.segment.map((function(e){return a.jsx(i.MenuItem,{className:xe.segmentMenuItem,value:e,children:e},e)}))})]}),ae&&ie&&a.jsx(Ce,{appKey:Se?null:M.app.app_key,appType:ee,defaultValue:ce.current,secondaryDefaultValue:+(null==R||null===(k=R.well)||void 0===k?void 0:k.id),isHiddenMultipleAssetsToggle:!0,isHiddenTitle:!0,isNullable:ne,label:"Asset",onSettingsChange:Ae,settings:pe}),a.jsx(f.default,{className:xe.appVersionSelect,appId:M.app.id,value:pe.package,onChange:function(e){return ye("package",e)}})]});return a.jsx(d,{open:!0,onClose:Y,title:Ie,contentContainerClassName:xe.modalContainer,modalTitleClassName:xe.modalTitle,closeIconClassName:xe.closeIcon,actions:Ee,children:a.jsxs(u,{ErrorView:l,openIntercom:W,children:[a.jsx(h,{open:!!ve,isShowCancel:!1,title:"Validation failed",text:ve,handleOk:function(){return fe("")},classes:{confirmation:xe.confirmationText}}),L&&a.jsx(q,{}),!L&&a.jsxs(a.Fragment,{children:[a.jsxs(i.Accordion,{defaultExpanded:!0,className:xe.assetAccordion,children:[a.jsx(i.AccordionSummary,{classes:{content:xe.summaryContent,expandIcon:xe.expandIcon},expandIcon:a.jsx(o.ExpandMore,{}),children:"Asset"}),a.jsx(i.AccordionDetails,{classes:{root:xe.accordionDetails},children:De})]}),a.jsxs(i.Accordion,{className:xe.accordion,defaultExpanded:!0,children:[a.jsx(i.AccordionSummary,{classes:{content:xe.summaryContent,expandIcon:xe.expandIcon},expandIcon:a.jsx(o.ExpandMore,{}),children:"App Settings"}),a.jsx(i.AccordionDetails,{classes:{root:xe.accordionDetails},children:be})]})]})]})})}k.propTypes={AppSettingsComponent:t.func,app:t.shape({}).isRequired,appData:t.shape({}).isRequired,appName:t.string.isRequired,currentUser:t.shape({}).isRequired,isMultiRig:t.bool.isRequired,isSettingsDialogHidden:t.bool,layoutEnvironment:t.shape({}).isRequired,onAppRemove:t.func,onCloneDashboard:t.func,onSettingsChange:t.func.isRequired,toggleAppSettingsDialog:t.func.isRequired},k.defaultProps={AppSettingsComponent:function(){return null},isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:r.noop},exports.PAGE_NAME=P,exports.default=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),o=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),o=require("react"),n=require("@material-ui/core"),r=require("../../../../../Button/components/Button/index.js"),s=require("react/jsx-runtime");require("moment-timezone"),require("classnames");var t=require("../../../../../../icons/iconParkIcons.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../../../../../icons/customIcons/icons/AddMessage.js"),require("../../../../../../icons/customIcons/icons/Attention.js"),require("../../../../../../icons/customIcons/icons/Collapse.js"),require("../../../../../../icons/customIcons/icons/Expand.js"),require("../../../../../../icons/customIcons/icons/FolderClosed.js"),require("../../../../../../icons/customIcons/icons/FolderOpened.js"),require("../../../../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../../../../icons/customIcons/icons/Search.js"),require("../../../../../../icons/customIcons/icons/Wellhub.js"),require("../../../../../../icons/customIcons/icons/MultiRuler.js"),require("../../../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js"),require("../../../../../Button/components/LiveButton/styles.js");var c=i(e),a=n.makeStyles({removeButtonIcon:{marginRight:8},paperClassName:{width:416}});exports.PAGE_NAME="DC_removeApp",exports.default=function(e){var i=e.onAppRemove,u=a(),l=o.useState(!1),m=c.default(l,2),p=m[0],d=m[1],j=function(){return d(!1)};return s.jsxs(s.Fragment,{children:[s.jsxs(r,{color:"primary","data-testid":"".concat("DC_removeApp","_button"),onClick:function(){return d(!0)},children:[s.jsx(t.DeleteFourIcon,{className:u.removeButtonIcon}),"REMOVE APP"]}),s.jsxs(n.Dialog,{open:p,onClose:j,PaperProps:{elevation:1,className:u.paperClassName},children:[s.jsx(n.DialogTitle,{"data-testid":"".concat("DC_removeApp","_title"),children:"Remove App?"}),s.jsx(n.DialogContent,{children:s.jsx(n.DialogContentText,{children:"App and all related information will be removed immediately. App can be added again from AppStore."})}),s.jsxs(n.DialogActions,{children:[s.jsx(r,{color:"primary","data-testid":"".concat("DC_removeApp","_cancel"),onClick:j,children:"Cancel"}),s.jsx(r,{"data-testid":"".concat("DC_removeApp","_confirm"),onClick:function(){return i()},variation:"primary",children:"Remove"})]})]})]})};
|
package/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAmB,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAsDvE,UAAU,6BAA6B;IACrC,KAAK,EAAE,mBAAmB,CAAC;CAC5B;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAuB5E,CAAC"}
|
package/components/Button/components/LiveButton/components/LiveButtonStateIndicator/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as i}from'./../../../../../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as t}from"react/jsx-runtime";import o from"react";import{makeStyles as r}from"@material-ui/core/styles";import{LiveButtonState as a}from"../../constants.js";var s=r((function(i){return{offline:{marginLeft:4,position:"relative",top:-4},livePulsed:{marginLeft:6,position:"relative",transform:"translateX(-50%) translateY(-50%)",width:8,height:8,"&:before":{content:'""',position:"relative",display:"block",width:"150%",height:"150%",boxSizing:"border-box",marginTop:"-2px",marginLeft:"-2px",borderRadius:"45px",backgroundColor:i.palette.success.bright,animation:"$pulseRing 3.25s cubic-bezier(0.215, 0.61, 0.355, 1) infinite"},"&:after":{content:'""',position:"absolute",left:0,top:0,display:"block",width:"100%",height:"100%",backgroundColor:i.palette.success.bright,borderRadius:"15px",boxShadow:"0 0 8px rgba(0,0,0,.3)",animation:"$pulseDot 3.25s cubic-bezier(0.455, 0.03, 0.515, 0.955) -.4s infinite"}},"@keyframes pulseRing":{"0%":{opacity:0,transform:"scale(.55)"},"50%":{opacity:.5},"100%":{opacity:0}},"@keyframes pulseDot":{"0%":{transform:"scale(.6)",opacity:.5},"50%":{transform:"scale(.7)",opacity:1},"100%":{transform:"scale(.6)",opacity:.5}}}})),l=o.memo((function(o){var r=o.state,l=s();return r===a.Default?null:r===a.Live?e("div",{className:l.livePulsed,"aria-label":"Live indicator"}):t("svg",i({className:l.offline,fill:"none",height:"8",viewBox:"0 0 8 8",width:"8",xmlns:"http://www.w3.org/2000/svg","aria-label":"Idle indicator"},{children:[e("circle",{opacity:"0.4",cx:"4",cy:"4",r:"4",fill:"#616161"}),e("circle",{cx:"4",cy:"4",r:"2",fill:"#616161"})]}))}));export{l as LiveButtonStateIndicator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"],"names":[],"mappings":"AA+BA,yCAA0C;;AAK1C;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js"],"names":[],"mappings":"AA+BA,yCAA0C;;AAK1C;;;;;;;;;;;;;;;gBAqQC;;;;;;;;;;;;;;;;;QAkBuB,4CAAU"}
|
package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as n,useRef as o,useEffect as i}from"react";import{func as s,shape as r,string as a,bool as c}from"prop-types";import{cloneDeep as p,debounce as l,noop as m,mapValues as d,keyBy as u}from"lodash";import{FormControl as g,InputLabel as f,Select as v,MenuItem as h,Accordion as j,AccordionSummary as y,AccordionDetails as C}from"@material-ui/core";import{ArrowForward as S,ExpandMore as b}from"@material-ui/icons";import"@babel/runtime/helpers/objectWithoutProperties";import"@material-ui/pickers";import"@date-io/moment";import"moment";import"../../../../../config/theme/index.js";import{jsx as A,jsxs as I,Fragment as D}from"react/jsx-runtime";import O from"../../../../../hocs/withAssetEditorLockHOC.js";import k from"../../../../ErrorBoundary/ErrorBoundary.js";import E from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as n,useRef as o,useEffect as i}from"react";import{func as s,shape as r,string as a,bool as c}from"prop-types";import{cloneDeep as p,debounce as l,noop as m,mapValues as d,keyBy as u}from"lodash";import{FormControl as g,InputLabel as f,Select as v,MenuItem as h,Accordion as j,AccordionSummary as y,AccordionDetails as C}from"@material-ui/core";import{ArrowForward as S,ExpandMore as b}from"@material-ui/icons";import"@babel/runtime/helpers/objectWithoutProperties";import"@material-ui/pickers";import"@date-io/moment";import"moment";import"../../../../../config/theme/index.js";import{jsx as A,jsxs as I,Fragment as D}from"react/jsx-runtime";import O from"../../../../../hocs/withAssetEditorLockHOC.js";import k from"../../../../ErrorBoundary/ErrorBoundary.js";import E from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import x from"../../../../Button/components/Button/index.js";import"moment-timezone";import"classnames";import"../../../../../icons/WithCustomSize.js";import"../../../../../icons/IconParkProvider.js";import"../../../../../icons/customIcons/icons/AddMessage.js";import"../../../../../icons/customIcons/icons/Attention.js";import"../../../../../icons/customIcons/icons/Collapse.js";import"../../../../../icons/customIcons/icons/Expand.js";import"../../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../../icons/customIcons/icons/Search.js";import"../../../../../icons/customIcons/icons/Wellhub.js";import"../../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../../../Button/components/LiveButton/styles.js";import N from"../../../../Modal/Modal.js";import{DEV_CENTER_CLI_APP_ID as P}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as w,SEGMENT_TO_ASSET_TYPE as R}from"../../../../../constants/segment.js";import"../../../../../constants/alerts.js";import"../../../../../constants/apps.js";import"../../../../../constants/drillstring.js";import"../../../../../constants/completion.js";import"../../../../../constants/appPackages.js";import"../../../../../constants/notifications.js";import"../../../../../constants/feed.js";import"../../../../../constants/bha.js";import{ASSET_TYPES as B}from"../../../../../constants/assetTypes.js";import"../../../../../utils/env.js";import"../../../../GradientManager/configuration/constants.js";import T from"../../../../AssetEditorV2/index.js";import M from"../../../../AppVersionsSelect/AppVersionsSelect.js";import q from"../../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import V from"../../../../ConfirmationDialog.js";import"../../../../../utils/index.js";import{AppIcon as H}from"../../../../AppIcon/AppIcon.js";import{getAppSegment as L}from"../../../../../utils/devcenter.js";import _ from"./components/RemoveAppButton.js";import{getIsSustainabilityApp as U}from"../../utils.js";import{useStyles as W}from"./styles.js";import{showSuccessNotification as z}from"../../../../../utils/notificationToasts.js";function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function G(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?F(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):F(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var K="DC_appSettings",J=O(T);function Q(s){var r,a,c,m,O,F,Q=s.AppSettingsComponent,X=s.app,Y=s.appData,Z=s.appName,$=s.currentUser,ee=s.isMultiRig,te=s.isSettingsDialogHidden,ne=s.layoutEnvironment,oe=s.onAppRemove,ie=s.onCloneDashboard,se=s.onSettingsChange,re=s.openIntercom,ae=s.rigId,ce=s.toggleAppSettingsDialog,pe=(null==X||null===(r=X.segment)||void 0===r?void 0:r.length)>1,le=n(L(X)),me=t(le,2),de=me[0],ue=me[1],ge=de===w.COMPLETION,fe=R[de],ve=ne&&"asset"===ne.type,he=n(!1)[1],je=n(!0),ye=t(je,2),Ce=ye[0],Se=ye[1],be=!(ee||ve&&ge),Ae=o(ae);i((function(){Ce||Se(!0)}),[Ce]);var Ie=n((function(){var e;return G(G({},p(X.settings)),{},{package:X.settings.package||(null==X||null===(e=X.package)||void 0===e?void 0:e.version)})})),De=t(Ie,2),Oe=De[0],ke=De[1],Ee=U(null==X||null===(a=X.app)||void 0===a?void 0:a.id),xe=n(""),Ne=t(xe,2),Pe=Ne[0],we=Ne[1],Re=o(null),Be=Boolean(null===(c=Re.current)||void 0===c?void 0:c.clientHeight),Te=W({isCompletionApp:ge,isSustainabilityApp:Ee,hasCustomAppSettings:Be}),Me=X.id===P,qe=function(t,n){return ke((function(o){return G(G({},o),{},e({},t,n))}))},Ve=function(e){return ke((function(t){return G(G({},t),e)}))},He=ve?J:T;i((function(){l(he,200)(!0)}),[]);var Le=A("div",{ref:Re,children:Q&&A(Q,{app:X,appData:Y,settings:Oe,onSettingChange:qe,onSettingsChange:Ve,layoutEnvironment:ne,currentUser:$})}),_e=I("div",{className:Te.modalTitleContainer,children:[A(H,{className:Te.appIcon,segment:[de],iconUrl:null==X||null===(m=X.app)||void 0===m||null===(O=m.icon)||void 0===O?void 0:O.url,height:48,width:48}),I("div",{children:[A("div",{children:"".concat(Z," Settings")}),I("div",{"data-testid":"".concat(K,"_appstoreLink"),className:Te.appStoreButton,onClick:function(){var e,t;return window.open((t=null==X||null===(e=X.app)||void 0===e?void 0:e.id,"/app-store/app/".concat(t)),"_top")},children:["Open in Appstore ",A(S,{className:Te.arrowIcon})]})]})]}),Ue=I("div",{className:Te.modalActions,children:[!te&&oe&&A(_,{onAppRemove:oe}),I("div",{children:[A(x,{"data-testid":"".concat(K,"_cancel"),variation:"secondary",onClick:ce,children:"Cancel"}),te&&A(x,{variation:"primary",onClick:function(){return ie()},children:"Copy Dashboard"}),!te&&A(x,{"data-testid":"".concat(K,"_save"),className:Te.saveButton,variation:"primary",onClick:function(){if(!Oe.package&&!Me)return we("Please select app version");if(be&&!ve){var e=null==fe?void 0:fe.primaryAsset.assetType.id,t=null==fe?void 0:fe.primaryAsset.assetType.label;if(e&&!Oe[e])return we("Please select ".concat(t))}return se(Oe),z("Successfully saved"),ce()},children:"Save"})]})]}),We=I(D,{children:[pe&&I(g,{className:Te.segmentSelector,children:[A(f,{children:"Segment"}),A(v,{value:de,onChange:function(e){var t=e.target.value;Ae.current=null,Se(!1),ue(t),ke(G(G({package:Oe.package,segment:t},d(u(B,"id"),(function(){return null}))),{},{assets:null}))},children:X.segment.map((function(e){return A(h,{className:Te.segmentMenuItem,value:e,children:e},e)}))})]}),be&&Ce&&A(He,{appKey:Me?null:X.app.app_key,appType:fe,defaultValue:Ae.current,secondaryDefaultValue:+(null==Y||null===(F=Y.well)||void 0===F?void 0:F.id),isHiddenMultipleAssetsToggle:!0,isHiddenTitle:!0,isNullable:ve,label:"Asset",onSettingsChange:Ve,settings:Oe}),A(M,{className:Te.appVersionSelect,appId:X.app.id,value:Oe.package,onChange:function(e){return qe("package",e)}})]});return A(N,{open:!0,onClose:ce,title:_e,contentContainerClassName:Te.modalContainer,modalTitleClassName:Te.modalTitle,closeIconClassName:Te.closeIcon,actions:Ue,children:I(k,{ErrorView:E,openIntercom:re,children:[A(V,{open:!!Pe,isShowCancel:!1,title:"Validation failed",text:Pe,handleOk:function(){return we("")},classes:{confirmation:Te.confirmationText}}),te&&A(q,{}),!te&&I(D,{children:[I(j,{defaultExpanded:!0,className:Te.assetAccordion,children:[A(y,{classes:{content:Te.summaryContent,expandIcon:Te.expandIcon},expandIcon:A(b,{}),children:"Asset"}),A(C,{classes:{root:Te.accordionDetails},children:We})]}),I(j,{className:Te.accordion,defaultExpanded:!0,children:[A(y,{classes:{content:Te.summaryContent,expandIcon:Te.expandIcon},expandIcon:A(b,{}),children:"App Settings"}),A(C,{classes:{root:Te.accordionDetails},children:Le})]})]})]})})}Q.propTypes={AppSettingsComponent:s,app:r({}).isRequired,appData:r({}).isRequired,appName:a.isRequired,currentUser:r({}).isRequired,isMultiRig:c.isRequired,isSettingsDialogHidden:c,layoutEnvironment:r({}).isRequired,onAppRemove:s,onCloneDashboard:s,onSettingsChange:s.isRequired,toggleAppSettingsDialog:s.isRequired},Q.defaultProps={AppSettingsComponent:function(){return null},isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:m};export{K as PAGE_NAME,Q as default};
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
export const PAGE_NAME: "DC_removeApp";
|
|
2
2
|
export default RemoveAppButton;
|
|
3
|
-
declare function RemoveAppButton({
|
|
4
|
-
appName: any;
|
|
3
|
+
declare function RemoveAppButton({ onAppRemove }: {
|
|
5
4
|
onAppRemove: any;
|
|
6
5
|
}): JSX.Element;
|
|
7
|
-
declare namespace RemoveAppButton {
|
|
8
|
-
namespace propTypes {
|
|
9
|
-
const appName: PropTypes.Validator<string>;
|
|
10
|
-
const onAppRemove: PropTypes.Validator<(...args: any[]) => any>;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
import PropTypes from "prop-types";
|
|
14
6
|
//# sourceMappingURL=RemoveAppButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoveAppButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RemoveAppButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js"],"names":[],"mappings":"AAaA,uCAAwC;;AAOxC;;gBAiDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"@babel/runtime/helpers/slicedToArray";import{useState as
|
|
1
|
+
import o from"@babel/runtime/helpers/slicedToArray";import{useState as n}from"react";import{makeStyles as t,Dialog as e,DialogTitle as i,DialogContent as s,DialogContentText as c,DialogActions as r}from"@material-ui/core";import m from"../../../../../Button/components/Button/index.js";import{jsxs as a,Fragment as p,jsx as l}from"react/jsx-runtime";import"moment-timezone";import"classnames";import{DeleteFourIcon as u}from"../../../../../../icons/iconParkIcons.js";import"../../../../../../icons/customIcons/icons/AddMessage.js";import"../../../../../../icons/customIcons/icons/Attention.js";import"../../../../../../icons/customIcons/icons/Collapse.js";import"../../../../../../icons/customIcons/icons/Expand.js";import"../../../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../../../icons/customIcons/icons/Search.js";import"../../../../../../icons/customIcons/icons/Wellhub.js";import"../../../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../../../../../Button/components/LiveButton/styles.js";var d="DC_removeApp",v=t({removeButtonIcon:{marginRight:8},paperClassName:{width:416}});function j(t){var d=t.onAppRemove,j=v(),I=n(!1),f=o(I,2),h=f[0],A=f[1],C=function(){return A(!1)};return a(p,{children:[a(m,{color:"primary","data-testid":"".concat("DC_removeApp","_button"),onClick:function(){return A(!0)},children:[l(u,{className:j.removeButtonIcon}),"REMOVE APP"]}),a(e,{open:h,onClose:C,PaperProps:{elevation:1,className:j.paperClassName},children:[l(i,{"data-testid":"".concat("DC_removeApp","_title"),children:"Remove App?"}),l(s,{children:l(c,{children:"App and all related information will be removed immediately. App can be added again from AppStore."})}),a(r,{children:[l(m,{color:"primary","data-testid":"".concat("DC_removeApp","_cancel"),onClick:C,children:"Cancel"}),l(m,{"data-testid":"".concat("DC_removeApp","_confirm"),onClick:function(){return d()},variation:"primary",children:"Remove"})]})]})]})}export{d as PAGE_NAME,j as default};
|