@corva/ui 0.68.0-4 → 0.68.0-6
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/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js +1 -1
- package/cjs-bundle/components/Icons/DangerousIcon.js +1 -1
- package/cjs-bundle/hocs/withAssetEditorLockHOC.js +1 -1
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.d.ts.map +1 -1
- package/components/DevCenter/AppSettingsPopover/AppSettingsPopover.js +1 -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/Icons/DangerousIcon.d.ts.map +1 -1
- package/components/Icons/DangerousIcon.js +1 -1
- package/hocs/withAssetEditorLockHOC.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"),o=require("react"),i=require("classnames"),n=require("@material-ui/core"),r=require("@material-ui/icons"),a=require("../../../utils/mobileDetect.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),o=require("react"),i=require("classnames"),n=require("@material-ui/core"),r=require("@material-ui/icons"),a=require("../../../utils/mobileDetect.js"),s=require("../../IconButton/index.js"),l=require("../../Modal/Modal.js"),c=require("../../Button/index.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(i),u=a.isNativeDetected||a.isMobileDetected,g=n.makeStyles((function(e){return{popoverPaper:{marginTop:function(e){return e.isScrollable?0:8},minWidth:286,width:286,overflowY:"hidden",backgroundColor:e.palette.background.b9,maxHeight:function(e){var t=e.maxHeight;return t?t-24:"calc(100% - 24px)"},"&.scrollable":{height:function(e){return e.maxHeight||"100%"}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(e.palette.background.b9,", ").concat(e.palette.background.b9," 79%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},shadow:{position:"absolute",bottom:0,width:"100%",height:16,background:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9," 100%)")},modalActions:{display:"flex",justifyContent:"flex-end"}}}));exports.AppSettingsPopover=function(i){var d=i.Trigger,h=i.children,v=i.classes,m=i.defaultScrollable,b=void 0!==m&&m,x=i.header,f=void 0===x?"Settings":x,_=i.iconSettingsProps,j=void 0===_?{}:_,C=i.maxHeight,S=void 0===C?null:C,k=i.modalActions,P=void 0===k?null:k,q=i.modalProps,H=void 0===q?{}:q,w=i.onClose,N=void 0===w?function(){}:w,T=e.__rest(i,["Trigger","children","classes","defaultScrollable","header","iconSettingsProps","maxHeight","modalActions","modalProps","onClose"]),y=o.useState(null),A=y[0],z=y[1],D=o.useState(!0),M=D[0],O=D[1],B=g({maxHeight:S,isScrollable:M,isNativeDetected:a.isNativeDetected}),I=v||{},E=I.popoverContent,Y=e.__rest(I,["popoverContent"]),F=function(){z(null),N()},L=Boolean(A),W=function(e){return z(e.currentTarget)},X=P||t.jsx(c,e.__assign({variation:"secondary",onClick:F},{children:"CLOSE"}));return t.jsxs(t.Fragment,{children:[d?t.jsx(d,{onClick:W}):t.jsx(s,e.__assign({isActive:L,onClick:W,size:"small",tooltipProps:{title:"Settings"},variant:"contained"},j,{children:t.jsx(r.Settings,{})})),!u&&t.jsxs(n.Popover,e.__assign({open:L,anchorEl:A,onClose:F,anchorOrigin:{vertical:M?"top":"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12},T,{classes:e.__assign(e.__assign({},Y),{paper:p.default(B.popoverPaper,M&&"scrollable",null==Y?void 0:Y.paper)})},{children:[t.jsxs("div",e.__assign({className:p.default(B.popoverHeader,M&&"scrollable")},{children:[t.jsx("div",e.__assign({className:B.headerTitle},{children:f})),t.jsx(s,e.__assign({tooltipProps:{title:"Close"},onClick:F},{children:t.jsx(r.Close,{})}))]})),t.jsx("div",e.__assign({className:p.default(B.popoverContentContainer,M&&"scrollable"),ref:function(e){e&&e.scrollHeight<=e.clientHeight&&!b&&O(!1)}},{children:t.jsx("div",e.__assign({className:p.default(B.popoverContent,E)},{children:h}))})),t.jsx("div",{className:B.shadow})]})),u&&t.jsx(l,e.__assign({actions:X,onClose:F,open:L,actionsClassName:B.modalActions,title:f},H,{children:h}))]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),r=require("prop-types"),i=require("lodash"),s=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"),l=require("../../../../ErrorBoundary/ErrorBoundary.js"),p=require("../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js"),u=require("../../../../Button/index.js"),d=require("../../../../Modal/Modal.js"),g=require("../../../../AssetEditorV2/index.js"),j=require("../../../../AppVersionsSelect/AppVersionsSelect.js"),m=require("../../../../DisabledSettingsMessage/DisabledSettingsMessage.js"),f=require("../../../../ConfirmationDialog.js"),h=require("../../../../../constants/devcenter.js");require("../../../../../constants/goals.js");var v=require("../../../../../constants/segment.js");require("../../../../../constants/alerts.js"),require("../../../../../constants/apps.js"),require("../../../../../constants/drillstring.js"),require("../../../../../constants/completion.js"),require("../../../../../constants/notifications.js"),require("../../../../../constants/feed.js"),require("../../../../../constants/bha.js"),require("../../../../../utils/env.js"),require("../../../../GradientManager/configuration/constants.js"),require("../../../../../utils/index.js");var q=require("../../../../AppIcon/AppIcon.js"),x=require("./RemoveAppButton.js"),A=require("./styles.js"),S=require("../../utils.js"),C=require("../../../../../utils/notificationToasts.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=y(e),E=y(n);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function N(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){b.default(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var O="DC_appSettings",I=c(g);function w(e){var n,r,c,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),r=require("prop-types"),i=require("lodash"),s=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"),l=require("../../../../ErrorBoundary/ErrorBoundary.js"),p=require("../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js"),u=require("../../../../Button/index.js"),d=require("../../../../Modal/Modal.js"),g=require("../../../../AssetEditorV2/index.js"),j=require("../../../../AppVersionsSelect/AppVersionsSelect.js"),m=require("../../../../DisabledSettingsMessage/DisabledSettingsMessage.js"),f=require("../../../../ConfirmationDialog.js"),h=require("../../../../../constants/devcenter.js");require("../../../../../constants/goals.js");var v=require("../../../../../constants/segment.js");require("../../../../../constants/alerts.js"),require("../../../../../constants/apps.js"),require("../../../../../constants/drillstring.js"),require("../../../../../constants/completion.js"),require("../../../../../constants/notifications.js"),require("../../../../../constants/feed.js"),require("../../../../../constants/bha.js"),require("../../../../../utils/env.js"),require("../../../../GradientManager/configuration/constants.js"),require("../../../../../utils/index.js");var q=require("../../../../AppIcon/AppIcon.js"),x=require("./RemoveAppButton.js"),A=require("./styles.js"),S=require("../../utils.js"),C=require("../../../../../utils/notificationToasts.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=y(e),E=y(n);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function N(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){b.default(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var O="DC_appSettings",I=c(g);function w(e){var n,r,c,y=e.AppSettingsComponent,D=e.app,w=e.appData,P=e.appName,R=e.currentUser,T=e.isMultiRig,k=e.isSettingsDialogHidden,M=e.layoutEnvironment,_=e.onAppRemove,V=e.onCloneDashboard,B=e.onSettingsChange,H=e.openIntercom,G=e.rigId,L=e.segment,U=e.toggleAppSettingsDialog,F=t.useState(!1),Y=E.default(F,2);Y[0];var K=Y[1],W=t.useState((function(){var e;return N(N({},i.cloneDeep(D.settings)),{},{package:D.settings.package||(null==D||null===(e=D.package)||void 0===e?void 0:e.version)})})),z=E.default(W,2),J=z[0],Q=z[1],X=S.getIsSustainabilityApp(null==D||null===(n=D.app)||void 0===n?void 0:n.id),Z=t.useState(!0),$=E.default(Z,2),ee=$[0],ne=$[1],te=t.useRef(null),re=Boolean(null===(r=te.current)||void 0===r?void 0:r.clientHeight),ie=A({isCompletionApp:L===v.SEGMENTS.COMPLETION,isSustainabilityApp:X,hasCustomAppSettings:re}),se=D.id===h.DEV_CENTER_CLI_APP_ID,oe=function(e,n){return Q((function(t){return N(N({},t),{},b.default({},e,n))}))},ae=function(e){return Q((function(n){return N(N({},n),e)}))},ce=M&&"asset"===M.type,le=!(T||ce&&L===v.SEGMENTS.COMPLETION),pe=ce?I:g;t.useEffect((function(){i.debounce(K,200)(!0)}),[]);var ue=a.jsx("div",{ref:te,children:y&&a.jsx(y,{app:D,appData:w,settings:J,onSettingChange:oe,onSettingsChange:ae,layoutEnvironment:M,currentUser:R})}),de=a.jsxs("div",{className:ie.modalTitleContainer,children:[a.jsx(q.AppIcon,{className:ie.appIcon,segment:null==D?void 0:D.segment,iconUrl:null==D||null===(c=D.icon)||void 0===c?void 0:c.url,height:48,width:48}),a.jsxs("div",{children:[a.jsx("div",{children:"".concat(P," Settings")}),a.jsxs("div",{"data-testid":"".concat(O,"_appstoreLink"),className:ie.appStoreButton,onClick:function(){var e,n;return window.open((n=null==D||null===(e=D.app)||void 0===e?void 0:e.id,"/app-store/app/".concat(n)),"_top")},children:["Open in Appstore ",a.jsx(o.ArrowForward,{className:ie.arrowIcon})]})]})]}),ge=a.jsxs("div",{className:ie.modalActions,children:[!k&&_&&a.jsx(x.default,{appName:P,onAppRemove:_}),a.jsxs("div",{className:ie.mainActions,children:[a.jsx(u,{"data-testid":"".concat(O,"_cancel"),variation:"secondary",onClick:U,children:"Cancel"}),k&&a.jsx(u,{variation:"primary",onClick:function(){return V()},children:"Copy Dashboard"}),!k&&a.jsx(u,{"data-testid":"".concat(O,"_save"),className:ie.saveButton,variation:"primary",onClick:function(){J.package||se?(B(J),C.showSuccessNotification("Successfully saved"),U()):ne(!1)},children:"Save"})]})]}),je=a.jsxs(a.Fragment,{children:[le&&a.jsx(pe,{appKey:se?null:D.app.app_key,appType:v.SEGMENT_TO_ASSET_TYPE[L],defaultValue:G,isHiddenMultipleAssetsToggle:!0,isHiddenTitle:!0,isNullable:ce,label:"Asset",onSettingsChange:ae,settings:J}),a.jsx(j.default,{className:ie.appVersionSelect,appId:D.app.id,value:J.package,onChange:function(e){return oe("package",e)}})]});return a.jsx(d,{open:!0,onClose:U,title:de,contentContainerClassName:ie.modalContainer,modalTitleClassName:ie.modalTitle,closeIconClassName:ie.closeIcon,contentClassName:ie.modalContent,actions:ge,children:a.jsxs(l,{ErrorView:p,openIntercom:H,children:[a.jsx(f,{open:!ee&&!J.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return ne(!0)}}),k&&a.jsx(m,{}),!k&&a.jsxs(a.Fragment,{children:[a.jsxs(s.Accordion,{defaultExpanded:!0,className:ie.assetAccordion,children:[a.jsx(s.AccordionSummary,{classes:{content:ie.summaryContent,expandIcon:ie.expandIcon},expandIcon:a.jsx(o.ExpandMore,{}),children:"Asset"}),a.jsx(s.AccordionDetails,{classes:{root:ie.accordionDetails},children:je})]}),a.jsxs(s.Accordion,{className:ie.accordion,defaultExpanded:!0,children:[a.jsx(s.AccordionSummary,{classes:{content:ie.summaryContent,expandIcon:ie.expandIcon},expandIcon:a.jsx(o.ExpandMore,{}),children:"App Settings"}),a.jsx(s.AccordionDetails,{classes:{root:ie.accordionDetails},children:ue})]})]})]})})}w.propTypes={AppSettingsComponent:r.node,app:r.shape({}).isRequired,appData:r.shape({}).isRequired,appName:r.string.isRequired,currentUser:r.shape({}).isRequired,isMultiRig:r.bool.isRequired,isSettingsDialogHidden:r.bool,layoutEnvironment:r.shape({}).isRequired,onAppRemove:r.func,onCloneDashboard:r.func,onSettingsChange:r.func.isRequired,segment:r.string.isRequired,toggleAppSettingsDialog:r.func.isRequired},w.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:i.noop},exports.PAGE_NAME=O,exports.default=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core"),r=require("react/jsx-runtime"),t=e.createSvgIcon(r.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core"),r=require("react/jsx-runtime"),t=e.createSvgIcon(r.jsx("g",{transform:"scale(1.111)",children:r.jsx("path",{d:"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM17 15.74L15.74 17 12 13.26 8.26 17 7 15.74 10.74 12 7 8.26 8.26 7 12 10.74 15.74 7 17 8.26 13.26 12 17 15.74z",transform:"translate(-1.2 -1.2)"})}),"DangerousIcon");exports.DangerousIcon=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("react"),n=require("@material-ui/core"),
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("react"),n=require("@material-ui/core"),o=require("@material-ui/icons"),i=require("react/jsx-runtime");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(e),l=a(t);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=n.makeStyles((function(e){return{root:{display:"flex"},assetEditorWrapper:{width:"100%"},iconButtonWrapper:{height:36,marginTop:10,marginLeft:16},iconButton:{color:e.palette.primary.text6,width:36,height:36,"&:hover":{backgroundColor:e.palette.background.b7}}}}));module.exports=function(e){return function(t){var a=d(),c=t.onChangeEditorField,u=t.onSettingsChange,p=r.useState(!0),f=l.default(p,2),b=f[0],h=f[1],m=r.useState(!0),j=l.default(m,2),O=j[0],g=j[1],y=function(){c("assetId",null),c("replacedAssetId",null),c("replacedAssetTime",null)},v=function(){u({rigId:null,wellId:null})};r.useEffect((function(){O||g(!0)}),[O]);var x=b?o.LockOutlined:o.ReplayOutlined;return i.jsxs("div",{className:a.root,children:[i.jsx(n.Tooltip,{title:b?"This app is using current dashboard asset.":"",placement:"bottom",children:i.jsx("div",{className:a.assetEditorWrapper,children:O&&i.jsx(e,s(s({},t),{},{disabled:b}))})}),i.jsx(n.Tooltip,{title:b?"Unlock Asset":"Return default",placement:"bottom",children:i.jsx("div",{className:a.iconButtonWrapper,children:i.jsx(n.IconButton,{className:a.iconButton,"data-testid":"".concat(b?"UnlockAsset":"ReturnDefault","_IconButton"),onClick:function(){var e=!b;(h(e),e)&&((c?y:v)(),g(!1))},children:i.jsx(x,{})})})})]})}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSettingsPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppSettingsPopover/AppSettingsPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAc,YAAY,EAAW,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppSettingsPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppSettingsPopover/AppSettingsPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAc,YAAY,EAAW,MAAM,mBAAmB,CAAC;AAoEtE,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC3D,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,GAAG;QACjC,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,CAAC,EAAE;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAClC,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,EACR,OAAO,EACP,iBAAyB,EACzB,MAAmB,EACnB,iBAAsB,EACtB,SAAgB,EAChB,YAAmB,EACnB,UAAe,EACf,OAAkB,EAClB,GAAG,YAAY,EAChB,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAoGvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o,__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as i,Fragment as r}from"react/jsx-runtime";import{useState as n}from"react";import l from"classnames";import{makeStyles as a,Popover as c}from"@material-ui/core";import{Settings as s,Close as d}from"@material-ui/icons";import{isNativeDetected as p,isMobileDetected as m}from"../../../utils/mobileDetect.js";import h from"../../IconButton/index.js";import g from"../../Modal/Modal.js";import u from"../../Button/index.js";var v=p||m,f=a((function(o){return{popoverPaper:{marginTop:function(o){return o.isScrollable?0:8},minWidth:286,width:286,overflowY:"hidden",backgroundColor:o.palette.background.b9,maxHeight:function(o){var e=o.maxHeight;return e?e-24:"calc(100% - 24px)"},"&.scrollable":{height:function(o){return o.maxHeight||"100%"}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(o.palette.background.b9,", ").concat(o.palette.background.b9," 79%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},shadow:{position:"absolute",bottom:0,width:"100%",height:16,background:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(o.palette.background.b9," 100%)")},
|
|
1
|
+
import{__rest as o,__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as i,Fragment as r}from"react/jsx-runtime";import{useState as n}from"react";import l from"classnames";import{makeStyles as a,Popover as c}from"@material-ui/core";import{Settings as s,Close as d}from"@material-ui/icons";import{isNativeDetected as p,isMobileDetected as m}from"../../../utils/mobileDetect.js";import h from"../../IconButton/index.js";import g from"../../Modal/Modal.js";import u from"../../Button/index.js";var v=p||m,f=a((function(o){return{popoverPaper:{marginTop:function(o){return o.isScrollable?0:8},minWidth:286,width:286,overflowY:"hidden",backgroundColor:o.palette.background.b9,maxHeight:function(o){var e=o.maxHeight;return e?e-24:"calc(100% - 24px)"},"&.scrollable":{height:function(o){return o.maxHeight||"100%"}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(o.palette.background.b9,", ").concat(o.palette.background.b9," 79%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},shadow:{position:"absolute",bottom:0,width:"100%",height:16,background:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(o.palette.background.b9," 100%)")},modalActions:{display:"flex",justifyContent:"flex-end"}}}));function b(a){var m=a.Trigger,b=a.children,C=a.classes,x=a.defaultScrollable,k=void 0!==x&&x,H=a.header,S=void 0===H?"Settings":H,w=a.iconSettingsProps,T=void 0===w?{}:w,j=a.maxHeight,P=void 0===j?null:j,N=a.modalActions,y=void 0===N?null:N,z=a.modalProps,A=void 0===z?{}:z,B=a.onClose,I=void 0===B?function(){}:B,O=o(a,["Trigger","children","classes","defaultScrollable","header","iconSettingsProps","maxHeight","modalActions","modalProps","onClose"]),D=n(null),E=D[0],M=D[1],Y=n(!0),L=Y[0],W=Y[1],X=f({maxHeight:P,isScrollable:L,isNativeDetected:p}),_=C||{},q=_.popoverContent,F=o(_,["popoverContent"]),G=function(){M(null),I()},J=Boolean(E),K=function(o){return M(o.currentTarget)},Q=y||t(u,e({variation:"secondary",onClick:G},{children:"CLOSE"}));return i(r,{children:[m?t(m,{onClick:K}):t(h,e({isActive:J,onClick:K,size:"small",tooltipProps:{title:"Settings"},variant:"contained"},T,{children:t(s,{})})),!v&&i(c,e({open:J,anchorEl:E,onClose:G,anchorOrigin:{vertical:L?"top":"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12},O,{classes:e(e({},F),{paper:l(X.popoverPaper,L&&"scrollable",null==F?void 0:F.paper)})},{children:[i("div",e({className:l(X.popoverHeader,L&&"scrollable")},{children:[t("div",e({className:X.headerTitle},{children:S})),t(h,e({tooltipProps:{title:"Close"},onClick:G},{children:t(d,{})}))]})),t("div",e({className:l(X.popoverContentContainer,L&&"scrollable"),ref:function(o){o&&o.scrollHeight<=o.clientHeight&&!k&&W(!1)}},{children:t("div",e({className:l(X.popoverContent,q)},{children:b}))})),t("div",{className:X.shadow})]})),v&&t(g,e({actions:Q,onClose:G,open:J,actionsClassName:X.modalActions,title:S},A,{children:b}))]})}export{b as AppSettingsPopover};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js"],"names":[],"mappings":"AA0BA,yCAA0C;;AAK1C;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AppSettingsDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialogV2/AppSettingsDialog.js"],"names":[],"mappings":"AA0BA,yCAA0C;;AAK1C;;;;;;;;;;;;;;;;gBA0NC"}
|
|
@@ -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{node as r,shape as s,string as a,bool as p,func as l}from"prop-types";import{cloneDeep as c,debounce as d,noop as m}from"lodash";import{Accordion as u,AccordionSummary as g,AccordionDetails as f}from"@material-ui/core";import{ArrowForward as h,ExpandMore as v}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 j,jsxs as C,Fragment as y}from"react/jsx-runtime";import b from"../../../../../hocs/withAssetEditorLockHOC.js";import A from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import D from"../../../../Button/index.js";import O from"../../../../Modal/Modal.js";import N from"../../../../AssetEditorV2/index.js";import I from"../../../../AppVersionsSelect/AppVersionsSelect.js";import k from"../../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import E from"../../../../ConfirmationDialog.js";import{DEV_CENTER_CLI_APP_ID as R}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as w,SEGMENT_TO_ASSET_TYPE as x}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{AppIcon as P}from"../../../../AppIcon/AppIcon.js";import T from"./RemoveAppButton.js";import M from"./styles.js";import{getIsSustainabilityApp as q}from"../../utils.js";import{showSuccessNotification as V}from"../../../../../utils/notificationToasts.js";function B(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 H(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?B(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):B(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var _="DC_appSettings",L=b(N);function U(r){var s,a,p,l=r.AppSettingsComponent,m=r.app,b=r.appData,
|
|
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{node as r,shape as s,string as a,bool as p,func as l}from"prop-types";import{cloneDeep as c,debounce as d,noop as m}from"lodash";import{Accordion as u,AccordionSummary as g,AccordionDetails as f}from"@material-ui/core";import{ArrowForward as h,ExpandMore as v}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 j,jsxs as C,Fragment as y}from"react/jsx-runtime";import b from"../../../../../hocs/withAssetEditorLockHOC.js";import A from"../../../../ErrorBoundary/ErrorBoundary.js";import S from"../../../../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import D from"../../../../Button/index.js";import O from"../../../../Modal/Modal.js";import N from"../../../../AssetEditorV2/index.js";import I from"../../../../AppVersionsSelect/AppVersionsSelect.js";import k from"../../../../DisabledSettingsMessage/DisabledSettingsMessage.js";import E from"../../../../ConfirmationDialog.js";import{DEV_CENTER_CLI_APP_ID as R}from"../../../../../constants/devcenter.js";import"../../../../../constants/goals.js";import{SEGMENTS as w,SEGMENT_TO_ASSET_TYPE as x}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{AppIcon as P}from"../../../../AppIcon/AppIcon.js";import T from"./RemoveAppButton.js";import M from"./styles.js";import{getIsSustainabilityApp as q}from"../../utils.js";import{showSuccessNotification as V}from"../../../../../utils/notificationToasts.js";function B(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 H(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?B(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):B(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var _="DC_appSettings",L=b(N);function U(r){var s,a,p,l=r.AppSettingsComponent,m=r.app,b=r.appData,B=r.appName,U=r.currentUser,G=r.isMultiRig,K=r.isSettingsDialogHidden,W=r.layoutEnvironment,Y=r.onAppRemove,z=r.onCloneDashboard,F=r.onSettingsChange,J=r.openIntercom,Q=r.rigId,X=r.segment,Z=r.toggleAppSettingsDialog,$=n(!1),ee=t($,2);ee[0];var te=ee[1],ne=n((function(){var e;return H(H({},c(m.settings)),{},{package:m.settings.package||(null==m||null===(e=m.package)||void 0===e?void 0:e.version)})})),oe=t(ne,2),ie=oe[0],re=oe[1],se=q(null==m||null===(s=m.app)||void 0===s?void 0:s.id),ae=n(!0),pe=t(ae,2),le=pe[0],ce=pe[1],de=o(null),me=Boolean(null===(a=de.current)||void 0===a?void 0:a.clientHeight),ue=M({isCompletionApp:X===w.COMPLETION,isSustainabilityApp:se,hasCustomAppSettings:me}),ge=m.id===R,fe=function(t,n){return re((function(o){return H(H({},o),{},e({},t,n))}))},he=function(e){return re((function(t){return H(H({},t),e)}))},ve=W&&"asset"===W.type,je=!(G||ve&&X===w.COMPLETION),Ce=ve?L:N;i((function(){d(te,200)(!0)}),[]);var ye=j("div",{ref:de,children:l&&j(l,{app:m,appData:b,settings:ie,onSettingChange:fe,onSettingsChange:he,layoutEnvironment:W,currentUser:U})}),be=C("div",{className:ue.modalTitleContainer,children:[j(P,{className:ue.appIcon,segment:null==m?void 0:m.segment,iconUrl:null==m||null===(p=m.icon)||void 0===p?void 0:p.url,height:48,width:48}),C("div",{children:[j("div",{children:"".concat(B," Settings")}),C("div",{"data-testid":"".concat(_,"_appstoreLink"),className:ue.appStoreButton,onClick:function(){var e,t;return window.open((t=null==m||null===(e=m.app)||void 0===e?void 0:e.id,"/app-store/app/".concat(t)),"_top")},children:["Open in Appstore ",j(h,{className:ue.arrowIcon})]})]})]}),Ae=C("div",{className:ue.modalActions,children:[!K&&Y&&j(T,{appName:B,onAppRemove:Y}),C("div",{className:ue.mainActions,children:[j(D,{"data-testid":"".concat(_,"_cancel"),variation:"secondary",onClick:Z,children:"Cancel"}),K&&j(D,{variation:"primary",onClick:function(){return z()},children:"Copy Dashboard"}),!K&&j(D,{"data-testid":"".concat(_,"_save"),className:ue.saveButton,variation:"primary",onClick:function(){ie.package||ge?(F(ie),V("Successfully saved"),Z()):ce(!1)},children:"Save"})]})]}),Se=C(y,{children:[je&&j(Ce,{appKey:ge?null:m.app.app_key,appType:x[X],defaultValue:Q,isHiddenMultipleAssetsToggle:!0,isHiddenTitle:!0,isNullable:ve,label:"Asset",onSettingsChange:he,settings:ie}),j(I,{className:ue.appVersionSelect,appId:m.app.id,value:ie.package,onChange:function(e){return fe("package",e)}})]});return j(O,{open:!0,onClose:Z,title:be,contentContainerClassName:ue.modalContainer,modalTitleClassName:ue.modalTitle,closeIconClassName:ue.closeIcon,contentClassName:ue.modalContent,actions:Ae,children:C(A,{ErrorView:S,openIntercom:J,children:[j(E,{open:!le&&!ie.package,isShowCancel:!1,title:"Validation failed",text:"You should select the app version to proceed",handleOk:function(){return ce(!0)}}),K&&j(k,{}),!K&&C(y,{children:[C(u,{defaultExpanded:!0,className:ue.assetAccordion,children:[j(g,{classes:{content:ue.summaryContent,expandIcon:ue.expandIcon},expandIcon:j(v,{}),children:"Asset"}),j(f,{classes:{root:ue.accordionDetails},children:Se})]}),C(u,{className:ue.accordion,defaultExpanded:!0,children:[j(g,{classes:{content:ue.summaryContent,expandIcon:ue.expandIcon},expandIcon:j(v,{}),children:"App Settings"}),j(f,{classes:{root:ue.accordionDetails},children:ye})]})]})]})})}U.propTypes={AppSettingsComponent:r,app:s({}).isRequired,appData:s({}).isRequired,appName:a.isRequired,currentUser:s({}).isRequired,isMultiRig:p.isRequired,isSettingsDialogHidden:p,layoutEnvironment:s({}).isRequired,onAppRemove:l,onCloneDashboard:l,onSettingsChange:l.isRequired,segment:a.isRequired,toggleAppSettingsDialog:l.isRequired},U.defaultProps={AppSettingsComponent:null,isSettingsDialogHidden:!1,onAppRemove:void 0,onCloneDashboard:m};export{_ as PAGE_NAME,U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DangerousIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/DangerousIcon.js"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"DangerousIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/DangerousIcon.js"],"names":[],"mappings":"AAEA,yJAQE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSvgIcon as r}from"@material-ui/core";import{
|
|
1
|
+
import{createSvgIcon as r}from"@material-ui/core";import{jsx as a}from"react/jsx-runtime";var t=r(a("g",{transform:"scale(1.111)",children:a("path",{d:"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM17 15.74L15.74 17 12 13.26 8.26 17 7 15.74 10.74 12 7 8.26 8.26 7 12 10.74 15.74 7 17 8.26 13.26 12 17 15.74z",transform:"translate(-1.2 -1.2)"})}),"DangerousIcon");export{t as DangerousIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as r,useEffect as n}from"react";import{makeStyles as o,Tooltip as i,IconButton as a}from"@material-ui/core";import{LockOutlined as c,ReplayOutlined as l}from"@material-ui/icons";import{jsxs as s,jsx as u}from"react/jsx-runtime";function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?p(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var m=o((function(e){return{root:{display:"flex"},assetEditorWrapper:{width:"100%"},iconButtonWrapper:{height:36,marginTop:10,marginLeft:16},iconButton:{color:e.palette.primary.text6,width:36,height:36,"&:hover":{backgroundColor:e.palette.background.b7}}}})),f=function(e){return function(o){var p=m(),f=o.onChangeEditorField,b=o.onSettingsChange,h=r(!0),g=t(h,2),O=g[0],y=g[1],j=r(!0),v=t(j,2),w=v[0],P=v[1],k=function(){f("assetId",null),f("replacedAssetId",null),f("replacedAssetTime",null)},A=function(){b({rigId:null,wellId:null})};n((function(){w||P(!0)}),[w]);var B=O?c:l;return s("div",{className:p.root,children:[u(i,{title:O?"This app is using current dashboard asset.":"",placement:"bottom",children:u("div",{className:p.assetEditorWrapper,children:w&&u(e,d(d({},o),{},{disabled:O}))})}),u(i,{title:O?"Unlock Asset":"Return default",placement:"bottom",children:u("div",{className:p.iconButtonWrapper,children:u(a,{className:p.iconButton,"data-testid":"".concat(O?"UnlockAsset":"ReturnDefault","_IconButton"),onClick:function(){var e=!O;(y(e),e)&&((f?k:A)(),P(!1))},children:u(B,{})})})})]})}};export{f as default};
|