@corva/ui 3.74.0-5 → 3.74.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/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js +2 -0
- package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js.map +1 -0
- package/cjs-bundle/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
- package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js +1 -1
- package/cjs-bundle/componentsV2/AppCommonsProvider/utils.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
- package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
- package/cjs-bundle/utils/devcenter.js +1 -1
- package/cjs-bundle/utils/devcenter.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts +8 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
- package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.d.ts.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
- package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts +2 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/__tests__/useFullscreenModes.test.d.ts.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts +10 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.d.ts.map +1 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js +2 -0
- package/components/DevCenter/IsolatedDevCenterAppContainer/useFullscreenModes.js.map +1 -0
- package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts +4 -2
- package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts.map +1 -1
- package/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
- package/componentsV2/AppCommonsProvider/utils.d.ts +1 -1
- package/componentsV2/AppCommonsProvider/utils.d.ts.map +1 -1
- package/componentsV2/AppCommonsProvider/utils.js +1 -1
- package/componentsV2/AppCommonsProvider/utils.js.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts +4 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
- package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts.map +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
- package/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
- package/mcp-server/server.mjs +9 -9
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/types/shared/Common.d.ts +9 -0
- package/types/shared/Common.d.ts.map +1 -1
- package/utils/devcenter.d.ts +1 -0
- package/utils/devcenter.d.ts.map +1 -1
- package/utils/devcenter.js +1 -1
- package/utils/devcenter.js.map +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"@babel/runtime/helpers/toConsumableArray";import s from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/helpers/typeof";import{useState as i,useRef as c,useCallback as r,useMemo as e,useEffect as m,Fragment as p}from"react";import l from"classnames";import{ButtonIcon as u}from"../../../ButtonIcon/ButtonIcon.js";import{Tooltip as a}from"../../../Tooltip/Tooltip.js";import{SettingsButton as j}from"../SettingsButton/SettingsButton.js";import"../SettingsButton/SettingsButton.constants.js";import{Menu as d}from"../../../Menu/Menu.js";import"../../../AppCommonsProvider/AppCommonsProvider.js";import{useAppCommonsInternal as I}from"../../../AppCommonsProvider/AppCommonsContext.js";import{Popover as f}from"../../../Popover/Popover.js";import{AppSettings as C}from"../../../AppSettings/AppSettings.js";import"../../../AppSettings/AppSettings.constants.js";import{useAppSettingPinning as h}from"../../../AppSettings/AppSettingsPinningContext.js";import{useAppSize as g}from"../../../AppSizeProvider/AppSizeProvider.js";import{HideInNativeApp as b}from"../../../HideInNativeApp/index.js";import{ActionsTestIds as v}from"./Actions.constants.js";import y from"./Actions.scss.js";import{CollapseIcon as A,ExpandIcon as O,CloseSmallIcon as S,MoreOneIcon as P,MessageIcon as k,SettingTwoIcon as B}from"../../../../icons/iconParkIcons.js";import{AddMessageCustomIcon as F}from"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/DragOne.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.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/SearchOne.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Global.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../icons/customIcons/icons/InterventionUnit.js";import"../../../../icons/customIcons/icons/CloudDelete.js";import"../../../../icons/customIcons/icons/Lasso.js";import"../../../../icons/customIcons/icons/Radius.js";import"../../../../icons/customIcons/icons/ErrorOps.js";import"../../../../icons/customIcons/icons/DataTypeOps.js";import"../../../../icons/customIcons/icons/FalsePositiveOps.js";import"../../../../icons/customIcons/icons/CalibrationOps.js";import"../../../../icons/customIcons/icons/CriticalOps.js";import"../../../../icons/customIcons/icons/Company.js";import"../../../../icons/customIcons/icons/ArchiveOne.js";import"../../../../icons/customIcons/icons/ParseBotFusion.js";import"../../../../icons/customIcons/icons/Connect.js";import"../../../../icons/customIcons/icons/PuzzleOne.js";import"../../../../icons/customIcons/icons/Feed.js";import"../../../../icons/customIcons/icons/Prompt.js";import"../../../../icons/customIcons/icons/Companies.js";import"../../../../icons/customIcons/icons/ClipboardAi.js";import"../../../../icons/customIcons/icons/Key.js";import"../../../../icons/customIcons/icons/AtSignCrossed.js";import"../../../../icons/customIcons/icons/MappingManual.js";import"../../../../icons/customIcons/icons/Mapping.js";import"../../../../icons/customIcons/icons/Metrics.js";import"../../../../icons/customIcons/icons/Drops.js";import"../../../../icons/customIcons/icons/ClipboardSearch.js";import"../../../../icons/customIcons/icons/Template.js";import"../../../../icons/customIcons/icons/ClipboardMetrics.js";import"../../../../icons/customIcons/icons/ClipboardBuilder.js";import"../../../../icons/customIcons/icons/UnitConversion.js";import"../../../../icons/customIcons/icons/NPT.js";import"../../../../icons/customIcons/icons/GuidedFrac.js";import"../../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"lodash";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import x from"../../../../effects/useOutsideClick.js";import"immutable";import"query-string";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/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../../components/GradientManager/configuration/constants.js";import"../../../../utils/index.js";import"uuid";import"jsona";import"../../../../utils/env.js";import"../../../../components/StatusBadge/constants.js";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../../constants/streamSourceType.js";import{useAppCommentsMode as M,useSetAppCommentsMode as D}from"../../../../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import{isInsideNewMobileApp as T}from"../../../../utils/mobileDetect.js";import{jsx as z,jsxs as E,Fragment as w}from"react/jsx-runtime";function N(o,s){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),t.push.apply(t,n)}return t}function G(o){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){s(o,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(n,s))}))}return o}var R=function(o){return!!o&&"object"===n(o)&&"title"in o},U=function(s){var n=s.additionalActions,N=s.showComments,U=s.disableSettings,q=s.rootRef,H=s.hideSettingsUnderMore,L=I(),W=L.maximized,K=L.setMaximized,Z=L.appSettingsComponent,J=M(),Q=D(),V=i(!1),X=t(V,2),Y=X[0],$=X[1],_=c(null),oo=c(null),so=i(!0),to=t(so,2),no=to[0],io=to[1],co=c(null),ro=h(),eo=ro.isPinned,mo=ro.close,po=ro.open,lo=ro.isPopoverOpen,uo=ro.animatePopover,ao=r((function(){mo(!1)}),[mo]),jo=(g()||{}).height,Io=!!Z&&!U,fo=e((function(){return{maxHeight:"".concat(jo,"px")}}),[jo]),Co=r((function(){$((function(o){return!o}))}),[]),ho=r((function(){Q((function(o){return!o}))}),[Q]),go=r((function(){io(!1),K(!W)}),[W,K]);m((function(){io(!0)}),[W]);var bo=e((function(){if(T)return[];var s=function(o){return function(){Co(),null==o||o()}},t=(n||[]).filter(R).map((function(o){return G(G({},o),{},{onClick:s(o.onClick)})})),i={icon:z(k,{}),onClick:s(ho),title:J?"Close Comments Mode":"Add Comment"},c={title:"Full Screen",onClick:s(go),icon:z(O,{})},r={title:"Settings",onClick:s(po),icon:z(B,{})};return[].concat(o(t),o(N?[i]:[]),o(H&&Io?[r]:[]),[c])}),[n,J,H,po,Io,N,ho,go,Co]);x(co,ao,[oo.current,'[role="tooltip"]','[role="presentation"]']);var vo=bo.length>1,yo=z(u,{size:"small",type:"tertiaryBg",onClick:go,className:vo?y.fullscreenButton:void 0,testId:W?v.CollapseButtonTestId:v.ExpandButtonTestId,children:z(W?A:O,{})});return E(w,{children:[z(b,{children:null==n?void 0:n.map((function(o,s){return R(o)?z(a,{title:o.title,children:z(u,{size:"small",type:"tertiary",onClick:o.onClick,className:l(y.additionalActionButton),testId:v.AdditionalActionItemTestId,children:o.icon})},s):z(p,{children:o},s)}))}),z(b,{children:N&&z(a,{title:J?"Close Comments Mode":"Add Comment",children:z(u,{size:"small",type:J?"secondaryBg":"tertiaryBg",onClick:ho,className:vo?y.commentButton:void 0,testId:J?v.CloseCommentButtonTestId:v.AddMessageButtonTestId,children:J?z(S,{}):z(F,{fill:"currentColor"})})})}),Io&&z(j,{ref:oo,closeSettings:ao,className:H&&!T?y.settingsHiddenUnderMore:void 0}),z(b,{children:no?z(a,{title:W?"Close Full Screen":"Full Screen",children:yo}):yo}),E(b,{children:[vo&&z(a,{title:"More",children:z(u,{type:Y||H&&lo?"secondaryBg":"tertiaryBg",className:y.moreButton,ref:_,onClick:Co,size:"small",children:z(P,{})})}),vo&&_.current&&z(d,{anchorEl:_.current,open:Y,onClose:Co,placement:"bottom-end",children:bo.map((function(o,s){return z(d.Item,{size:"large",prefix:o.icon,onClick:o.onClick,children:o.title},s)}))})]}),Io&&q.current&&!eo&&z(f,{open:lo,placement:"bottom-end",anchorEl:q.current,onClose:ao,className:y.settingsPopover,preventScroll:!1,backdrop:!1,animate:uo,children:z(C,{rootStyles:fo,ref:co,onClose:ao})})]})};export{U as Actions};
|
|
1
|
+
import o from"@babel/runtime/helpers/toConsumableArray";import s from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/helpers/typeof";import{useState as i,useRef as c,useCallback as e,useMemo as r,useEffect as m,Fragment as p}from"react";import l from"classnames";import{ButtonIcon as u}from"../../../ButtonIcon/ButtonIcon.js";import{Tooltip as a}from"../../../Tooltip/Tooltip.js";import{SettingsButton as d}from"../SettingsButton/SettingsButton.js";import"../SettingsButton/SettingsButton.constants.js";import{Menu as j}from"../../../Menu/Menu.js";import"../../../AppCommonsProvider/AppCommonsProvider.js";import{useAppCommonsInternal as I}from"../../../AppCommonsProvider/AppCommonsContext.js";import{Popover as f}from"../../../Popover/Popover.js";import{AppSettings as C}from"../../../AppSettings/AppSettings.js";import"../../../AppSettings/AppSettings.constants.js";import{useAppSettingPinning as h}from"../../../AppSettings/AppSettingsPinningContext.js";import{useAppSize as g}from"../../../AppSizeProvider/AppSizeProvider.js";import{HideInNativeApp as b}from"../../../HideInNativeApp/index.js";import{ActionsTestIds as v}from"./Actions.constants.js";import y from"./Actions.scss.js";import{CollapseIcon as S,ExpandIcon as A,CloseSmallIcon as O,MoreOneIcon as P,MessageIcon as B,SettingTwoIcon as k}from"../../../../icons/iconParkIcons.js";import{AddMessageCustomIcon as M}from"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/DragOne.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.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/SearchOne.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Global.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../icons/customIcons/icons/InterventionUnit.js";import"../../../../icons/customIcons/icons/CloudDelete.js";import"../../../../icons/customIcons/icons/Lasso.js";import"../../../../icons/customIcons/icons/Radius.js";import"../../../../icons/customIcons/icons/ErrorOps.js";import"../../../../icons/customIcons/icons/DataTypeOps.js";import"../../../../icons/customIcons/icons/FalsePositiveOps.js";import"../../../../icons/customIcons/icons/CalibrationOps.js";import"../../../../icons/customIcons/icons/CriticalOps.js";import"../../../../icons/customIcons/icons/Company.js";import"../../../../icons/customIcons/icons/ArchiveOne.js";import"../../../../icons/customIcons/icons/ParseBotFusion.js";import"../../../../icons/customIcons/icons/Connect.js";import"../../../../icons/customIcons/icons/PuzzleOne.js";import"../../../../icons/customIcons/icons/Feed.js";import"../../../../icons/customIcons/icons/Prompt.js";import"../../../../icons/customIcons/icons/Companies.js";import"../../../../icons/customIcons/icons/ClipboardAi.js";import"../../../../icons/customIcons/icons/Key.js";import"../../../../icons/customIcons/icons/AtSignCrossed.js";import"../../../../icons/customIcons/icons/MappingManual.js";import"../../../../icons/customIcons/icons/Mapping.js";import"../../../../icons/customIcons/icons/Metrics.js";import"../../../../icons/customIcons/icons/Drops.js";import"../../../../icons/customIcons/icons/ClipboardSearch.js";import"../../../../icons/customIcons/icons/Template.js";import"../../../../icons/customIcons/icons/ClipboardMetrics.js";import"../../../../icons/customIcons/icons/ClipboardBuilder.js";import"../../../../icons/customIcons/icons/UnitConversion.js";import"../../../../icons/customIcons/icons/NPT.js";import"../../../../icons/customIcons/icons/GuidedFrac.js";import"../../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"lodash";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import x from"../../../../effects/useOutsideClick.js";import"immutable";import"query-string";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/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../../components/GradientManager/configuration/constants.js";import"../../../../utils/index.js";import"uuid";import"jsona";import"../../../../utils/env.js";import"../../../../components/StatusBadge/constants.js";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../../constants/streamSourceType.js";import{useAppCommentsMode as F,useSetAppCommentsMode as w}from"../../../../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import{isInsideNewMobileApp as T}from"../../../../utils/mobileDetect.js";import{jsx as z,jsxs as D,Fragment as E}from"react/jsx-runtime";function N(o,s){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),t.push.apply(t,n)}return t}function W(o){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){s(o,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(s){Object.defineProperty(o,s,Object.getOwnPropertyDescriptor(n,s))}))}return o}var R=function(o){return!!o&&"object"===n(o)&&"title"in o},U=function(s){var n=s.additionalActions,N=s.showComments,U=s.disableSettings,G=s.rootRef,q=s.hideSettingsUnderMore,L=I(),H=L.maximized,K=L.setMaximized,Z=L.appSettingsComponent,J=L.isExpanded,Q=L.isBrowserFullscreen,V=L.enterBrowserFullscreen,X=L.exitBrowserFullscreen,Y=L.isSeparateWindow,$=L.openSeparateWindow,_=L.closeSeparateWindow,oo=F(),so=w(),to=i(!1),no=t(to,2),io=no[0],co=no[1],eo=c(null),ro=c(null),mo=c(null),po=i(!0),lo=t(po,2),uo=lo[0],ao=lo[1],jo=i(!1),Io=t(jo,2),fo=Io[0],Co=Io[1],ho=c(null),go=c(!1),bo=c(null),vo=h(),yo=vo.isPinned,So=vo.close,Ao=vo.open,Oo=vo.isPopoverOpen,Po=vo.animatePopover,Bo=e((function(){So(!1)}),[So]),ko=(g()||{}).height,Mo=!!Z&&!U,xo=r((function(){return{maxHeight:"".concat(ko,"px")}}),[ko]),Fo=e((function(){co((function(o){return!o}))}),[]),wo=e((function(){so((function(o){return!o}))}),[so]),To=e((function(){go.current=!1,Co(!1)}),[]),zo=e((function(){ao(!1),To(),Y?null==_||_():Q?null==X||X():K(!H)}),[To,_,X,Q,Y,H,K]),Do=Y?"Close Separate Window":J?"Restore":"Maximize",Eo=e((function(){ho.current&&(clearTimeout(ho.current),ho.current=null)}),[]),No=e((function(){!J&&V&&(Eo(),ho.current=setTimeout((function(){go.current=!0,Co(!0)}),500))}),[Eo,V,J]);m((function(){return Eo}),[Eo]);var Wo=e((function(){go.current?go.current=!1:zo()}),[zo]),Ro=e((function(){To(),null==$||$()}),[To,$]),Uo=e((function(){To(),null==V||V()}),[To,V]);m((function(){ao(!0)}),[J]);var Go=r((function(){if(T)return[];var s=function(o){return function(){Fo(),null==o||o()}},t=(n||[]).filter(R).map((function(o){return W(W({},o),{},{onClick:s(o.onClick)})})),i={icon:z(B,{}),onClick:s(wo),title:oo?"Close Comments Mode":"Add Comment"},c={title:Do,onClick:s(zo),icon:z(J?S:A,{})},e={title:"Settings",onClick:s(Ao),icon:z(k,{})};return[].concat(o(t),o(N?[i]:[]),o(q&&Mo?[e]:[]),[c])}),[n,oo,q,J,Do,Ao,Mo,N,wo,zo,Fo]);x(bo,Bo,[mo.current,'[role="tooltip"]','[role="presentation"]']);var qo=Go.length>1,Lo=z(u,{size:"small",type:"tertiaryBg",ref:ro,onClick:Wo,onMouseDown:No,onMouseUp:Eo,onMouseLeave:Eo,className:qo?y.fullscreenButton:void 0,testId:J?v.CollapseButtonTestId:v.ExpandButtonTestId,children:z(J?S:A,{})});return D(E,{children:[z(b,{children:null==n?void 0:n.map((function(o,s){return R(o)?z(a,{title:o.title,children:z(u,{size:"small",type:"tertiary",onClick:o.onClick,className:l(y.additionalActionButton),testId:v.AdditionalActionItemTestId,children:o.icon})},s):z(p,{children:o},s)}))}),z(b,{children:N&&z(a,{title:oo?"Close Comments Mode":"Add Comment",children:z(u,{size:"small",type:oo?"secondaryBg":"tertiaryBg",onClick:wo,className:qo?y.commentButton:void 0,testId:oo?v.CloseCommentButtonTestId:v.AddMessageButtonTestId,children:oo?z(O,{}):z(M,{fill:"currentColor"})})})}),Mo&&z(d,{ref:mo,closeSettings:Bo,className:q&&!T?y.settingsHiddenUnderMore:void 0}),D(b,{children:[uo?z(a,{title:Do,children:Lo}):Lo,ro.current&&D(j,{anchorEl:ro.current,open:fo,onClose:To,placement:"bottom-end",children:[z(j.Item,{onClick:zo,testId:v.MaximizeItemTestId,children:"Maximize"}),z(j.Item,{onClick:Uo,testId:v.BrowserFullscreenItemTestId,children:"Full Screen"}),z(j.Item,{onClick:Ro,testId:v.SeparateWindowItemTestId,children:"Separate Window"})]})]}),D(b,{children:[qo&&z(a,{title:"More",children:z(u,{type:io||q&&Oo?"secondaryBg":"tertiaryBg",className:y.moreButton,ref:eo,onClick:Fo,size:"small",children:z(P,{})})}),qo&&eo.current&&z(j,{anchorEl:eo.current,open:io,onClose:Fo,placement:"bottom-end",children:Go.map((function(o,s){return z(j.Item,{size:"large",prefix:o.icon,onClick:o.onClick,children:o.title},s)}))})]}),Mo&&G.current&&!yo&&z(f,{open:Oo,placement:"bottom-end",anchorEl:G.current,onClose:Bo,className:y.settingsPopover,preventScroll:!1,backdrop:!1,animate:Po,children:z(C,{rootStyles:xo,ref:bo,onClose:Bo})})]})};export{U as Actions};
|
|
2
2
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/componentsV2/AppHeader/V3/Actions/Actions.tsx"],"sourcesContent":["import {\n CSSProperties,\n Fragment,\n RefObject,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport classNames from 'classnames';\n\nimport { ButtonIcon } from '../../../ButtonIcon';\nimport { Tooltip } from '../../../Tooltip';\nimport { SettingsButton } from '../SettingsButton';\nimport { AdditionalAction, AdditionalActionObject } from '../constants';\nimport { Menu } from '../../../Menu';\nimport { useAppCommonsInternal } from '../../../AppCommonsProvider';\nimport { Popover } from '../../../Popover';\nimport { AppSettings } from '../../../AppSettings';\nimport { useAppSettingPinning } from '../../../AppSettings/AppSettingsPinningContext';\nimport { useAppSize } from '../../../AppSizeProvider';\nimport { HideInNativeApp } from '../../../HideInNativeApp';\n\nimport { ActionsTestIds } from './Actions.constants';\n\nimport styles from './Actions.scss';\n\nimport {\n AddMessageCustomIcon,\n CloseSmallIcon,\n CollapseIcon,\n ExpandIcon,\n MessageIcon,\n MoreOneIcon,\n SettingTwoIcon,\n} from '~/icons';\nimport { useAppCommentsMode, useOutsideClick, useSetAppCommentsMode } from '~/effects';\nimport { isInsideNewMobileApp } from '~/utils/mobileDetect';\n\ntype ActionsProps = {\n rootRef: RefObject<HTMLDivElement>;\n additionalActions?: AdditionalAction[];\n showComments?: boolean;\n disableSettings?: boolean;\n hideSettingsUnderMore?: boolean;\n};\n\nconst isActionObject = (action: AdditionalAction): action is AdditionalActionObject =>\n !!action && typeof action === 'object' && 'title' in action;\n\nexport const Actions = ({\n additionalActions,\n showComments,\n disableSettings,\n rootRef,\n hideSettingsUnderMore,\n}: ActionsProps) => {\n const { maximized, setMaximized, appSettingsComponent } = useAppCommonsInternal();\n const commentsEnabled = useAppCommentsMode();\n const setCommentsMode = useSetAppCommentsMode();\n const [moreMenuOpen, setMoreMenuOpen] = useState(false);\n const moreButtonRef = useRef<HTMLButtonElement>(null);\n const settingsButtonRef = useRef<HTMLButtonElement>(null);\n const [showMaximizeTooltip, setShowMaximizeTooltip] = useState(true);\n\n const popoverContentRef = useRef<HTMLDivElement>(null);\n const { isPinned, close, open, isPopoverOpen, animatePopover } = useAppSettingPinning();\n const closeSettings = useCallback(() => {\n close(false);\n }, [close]);\n const { height } = useAppSize() || {};\n const settingsVisible = !!appSettingsComponent && !disableSettings;\n\n const wrapperStyle = useMemo<CSSProperties>(() => ({ maxHeight: `${height}px` }), [height]);\n\n const toggleMoreMenu = useCallback(() => {\n setMoreMenuOpen(value => !value);\n }, []);\n\n const toggleCommentsMode = useCallback(() => {\n setCommentsMode(value => !value);\n }, [setCommentsMode]);\n\n const toggleMaximized = useCallback(() => {\n setShowMaximizeTooltip(false);\n setMaximized(!maximized);\n }, [maximized, setMaximized]);\n\n useEffect(() => {\n setShowMaximizeTooltip(true);\n }, [maximized]);\n\n const menuActionItems = useMemo(() => {\n if (isInsideNewMobileApp) return [];\n\n const getOnClick = (handler: AdditionalActionObject['onClick']) => () => {\n toggleMoreMenu();\n handler?.();\n };\n\n const objectActions = (additionalActions || [])\n .filter(isActionObject)\n .map(item => ({ ...item, onClick: getOnClick(item.onClick) }));\n\n const commentItem: AdditionalActionObject = {\n icon: <MessageIcon />,\n onClick: getOnClick(toggleCommentsMode),\n title: commentsEnabled ? 'Close Comments Mode' : 'Add Comment',\n };\n\n const maximizeItem: AdditionalActionObject = {\n title: 'Full Screen',\n onClick: getOnClick(toggleMaximized),\n icon: <ExpandIcon />,\n };\n\n const settingsItem = {\n title: 'Settings',\n onClick: getOnClick(open),\n icon: <SettingTwoIcon />,\n };\n\n return [\n ...objectActions,\n ...(showComments ? [commentItem] : []),\n ...(hideSettingsUnderMore && settingsVisible ? [settingsItem] : []),\n maximizeItem,\n ];\n }, [\n additionalActions,\n commentsEnabled,\n hideSettingsUnderMore,\n open,\n settingsVisible,\n showComments,\n toggleCommentsMode,\n toggleMaximized,\n toggleMoreMenu,\n ]);\n\n useOutsideClick(popoverContentRef, closeSettings, [\n settingsButtonRef.current,\n // Do not react on clicks inside popovers/modals/autocomplete dropdowns, etc\n '[role=\"tooltip\"]',\n '[role=\"presentation\"]',\n ]);\n\n // Show menu only if there's something there besides the fullscreen item\n const hasMenu = menuActionItems.length > 1;\n\n const maximizeButton = (\n <ButtonIcon\n size=\"small\"\n type=\"tertiaryBg\"\n onClick={toggleMaximized}\n className={hasMenu ? styles.fullscreenButton : undefined}\n testId={maximized ? ActionsTestIds.CollapseButtonTestId : ActionsTestIds.ExpandButtonTestId}\n >\n {maximized ? <CollapseIcon /> : <ExpandIcon />}\n </ButtonIcon>\n );\n\n return (\n <>\n <HideInNativeApp>\n {additionalActions?.map((action, index) =>\n !isActionObject(action) ? (\n <Fragment key={index}>{action}</Fragment>\n ) : (\n <Tooltip title={action.title} key={index}>\n <ButtonIcon\n size=\"small\"\n type=\"tertiary\"\n onClick={action.onClick}\n className={classNames(styles.additionalActionButton)}\n testId={ActionsTestIds.AdditionalActionItemTestId}\n >\n {action.icon}\n </ButtonIcon>\n </Tooltip>\n )\n )}\n </HideInNativeApp>\n\n <HideInNativeApp>\n {showComments && (\n <Tooltip title={commentsEnabled ? 'Close Comments Mode' : 'Add Comment'}>\n <ButtonIcon\n size=\"small\"\n type={commentsEnabled ? 'secondaryBg' : 'tertiaryBg'}\n onClick={toggleCommentsMode}\n className={hasMenu ? styles.commentButton : undefined}\n testId={\n commentsEnabled\n ? ActionsTestIds.CloseCommentButtonTestId\n : ActionsTestIds.AddMessageButtonTestId\n }\n >\n {commentsEnabled ? <CloseSmallIcon /> : <AddMessageCustomIcon fill=\"currentColor\" />}\n </ButtonIcon>\n </Tooltip>\n )}\n </HideInNativeApp>\n\n {settingsVisible && (\n <SettingsButton\n ref={settingsButtonRef}\n closeSettings={closeSettings}\n className={\n hideSettingsUnderMore && !isInsideNewMobileApp\n ? styles.settingsHiddenUnderMore\n : undefined\n }\n />\n )}\n\n {/* \n Our \"pseudo-fullscreen\" system gets a stroke when we try to go fullscreen when a tooltip is shown (and we're in a \"pseudo-fullscreen\" mode) \n and we change actual \"fullscreen\" status of an app.\n So we don't show tooltip when user clicks the button, and we expect the \"fullscreen\" status to change.\n */}\n <HideInNativeApp>\n {showMaximizeTooltip ? (\n <Tooltip title={maximized ? 'Close Full Screen' : 'Full Screen'}>\n {maximizeButton}\n </Tooltip>\n ) : (\n maximizeButton\n )}\n </HideInNativeApp>\n\n <HideInNativeApp>\n {hasMenu && (\n <Tooltip title=\"More\">\n <ButtonIcon\n type={\n moreMenuOpen || (hideSettingsUnderMore && isPopoverOpen)\n ? 'secondaryBg'\n : 'tertiaryBg'\n }\n className={styles.moreButton}\n ref={moreButtonRef}\n onClick={toggleMoreMenu}\n size=\"small\"\n >\n <MoreOneIcon />\n </ButtonIcon>\n </Tooltip>\n )}\n\n {hasMenu && moreButtonRef.current && (\n <Menu\n anchorEl={moreButtonRef.current}\n open={moreMenuOpen}\n onClose={toggleMoreMenu}\n placement=\"bottom-end\"\n >\n {menuActionItems.map((item, index) => (\n <Menu.Item size=\"large\" prefix={item.icon} key={index} onClick={item.onClick}>\n {item.title}\n </Menu.Item>\n ))}\n </Menu>\n )}\n </HideInNativeApp>\n\n {settingsVisible && rootRef.current && !isPinned && (\n <Popover\n open={isPopoverOpen}\n placement=\"bottom-end\"\n anchorEl={rootRef.current}\n onClose={closeSettings}\n className={styles.settingsPopover}\n preventScroll={false}\n backdrop={false}\n animate={animatePopover}\n >\n <AppSettings rootStyles={wrapperStyle} ref={popoverContentRef} onClose={closeSettings} />\n </Popover>\n )}\n </>\n );\n};\n"],"names":["isActionObject","action","_typeof","Actions","_ref","additionalActions","showComments","disableSettings","rootRef","hideSettingsUnderMore","_useAppCommonsInterna","useAppCommonsInternal","maximized","setMaximized","appSettingsComponent","commentsEnabled","useAppCommentsMode","setCommentsMode","useSetAppCommentsMode","useState","_useState2","_slicedToArray","_useState","moreMenuOpen","setMoreMenuOpen","moreButtonRef","useRef","settingsButtonRef","_useState4","_useState3","showMaximizeTooltip","setShowMaximizeTooltip","popoverContentRef","_useAppSettingPinning","useAppSettingPinning","isPinned","close","open","isPopoverOpen","animatePopover","closeSettings","useCallback","height","useAppSize","settingsVisible","wrapperStyle","useMemo","maxHeight","toggleMoreMenu","value","toggleCommentsMode","toggleMaximized","useEffect","menuActionItems","isInsideNewMobileApp","getOnClick","handler","objectActions","filter","map","item","_objectSpread","onClick","commentItem","icon","_jsx","MessageIcon","title","maximizeItem","ExpandIcon","settingsItem","SettingTwoIcon","_toConsumableArray","useOutsideClick","current","hasMenu","length","maximizeButton","ButtonIcon","size","type","className","styles","fullscreenButton","undefined","testId","ActionsTestIds","CollapseButtonTestId","ExpandButtonTestId","children","CollapseIcon","_jsxs","_Fragment","HideInNativeApp","index","Tooltip","classNames","additionalActionButton","AdditionalActionItemTestId","Fragment","commentButton","CloseCommentButtonTestId","AddMessageButtonTestId","CloseSmallIcon","AddMessageCustomIcon","fill","SettingsButton","ref","settingsHiddenUnderMore","moreButton","MoreOneIcon","Menu","anchorEl","onClose","placement","Item","prefix","Popover","settingsPopover","preventScroll","backdrop","animate","AppSettings","rootStyles"],"mappings":"owPAgDA,IAAMA,EAAiB,SAACC,GAAwB,QAC5CA,GAA4B,WAAlBC,EAAOD,IAAuB,UAAWA,CAAM,EAEhDE,EAAU,SAMHC,GAAA,IALlBC,IAAAA,kBACAC,IAAAA,aACAC,IAAAA,gBACAC,IAAAA,QACAC,IAAAA,sBAEAC,EAA0DC,IAAlDC,IAAAA,UAAWC,IAAAA,aAAcC,IAAAA,qBAC3BC,EAAkBC,IAClBC,EAAkBC,IACgBC,EAAAA,GAAS,GAAMC,EAAAC,EAAAC,EAAA,GAAhDC,EAAYH,EAAA,GAAEI,EAAeJ,EAAA,GAC9BK,EAAgBC,EAA0B,MAC1CC,GAAoBD,EAA0B,MACEP,GAAAA,GAAS,GAAKS,GAAAP,EAAAQ,GAAA,GAA7DC,GAAmBF,GAAA,GAAEG,GAAsBH,GAAA,GAE5CI,GAAoBN,EAAuB,MACjDO,GAAiEC,IAAzDC,MAAAA,SAAUC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8B,EAAO,CAAC5B,MAAOvD,EAAY,oBAAsB,cAAc6E,SAC7DZ,KAGHA,KAIJc,EAACE,EAAe,CAAAJ,SACbd,CAAAA,IACCV,EAAC8B,EAAO,CAAC5B,MAAM,OAAMsB,SACnBxB,EAACa,EAAU,CACTE,KACEzD,GAAiBd,GAAyB6B,GACtC,cACA,aAEN2C,UAAWC,EAAO2B,WAClBF,IAAKlF,EACLqC,QAASd,GACT+B,KAAK,QAAOU,SAEZxB,EAAC6C,EAAW,QAKjBnC,IAAWlD,EAAciD,SACxBT,EAAC8C,EAAI,CACHC,SAAUvF,EAAciD,QACxBrC,KAAMd,EACN0F,QAASjE,GACTkE,UAAU,aAAYzB,SAErBpC,GAAgBM,KAAI,SAACC,EAAMkC,GAAK,OAC/B7B,EAAC8C,EAAKI,KAAI,CAACpC,KAAK,QAAQqC,OAAQxD,EAAKI,KAAkBF,QAASF,EAAKE,QAAQ2B,SAC1E7B,EAAKO,OADwC2B,WAQvDlD,IAAmBpC,EAAQkE,UAAYvC,IACtC8B,EAACoD,EAAO,CACNhF,KAAMC,GACN4E,UAAU,aACVF,SAAUxG,EAAQkE,QAClBuC,QAASzE,GACTyC,UAAWC,EAAOoC,gBAClBC,eAAe,EACfC,UAAU,EACVC,QAASlF,GAAekD,SAExBxB,EAACyD,EAAW,CAACC,WAAY9E,GAAc8D,IAAK3E,GAAmBiF,QAASzE,SAKlF"}
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/componentsV2/AppHeader/V3/Actions/Actions.tsx"],"sourcesContent":["import {\n CSSProperties,\n Fragment,\n RefObject,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport classNames from 'classnames';\n\nimport { ButtonIcon } from '../../../ButtonIcon';\nimport { Tooltip } from '../../../Tooltip';\nimport { SettingsButton } from '../SettingsButton';\nimport { AdditionalAction, AdditionalActionObject } from '../constants';\nimport { Menu } from '../../../Menu';\nimport { useAppCommonsInternal } from '../../../AppCommonsProvider';\nimport { Popover } from '../../../Popover';\nimport { AppSettings } from '../../../AppSettings';\nimport { useAppSettingPinning } from '../../../AppSettings/AppSettingsPinningContext';\nimport { useAppSize } from '../../../AppSizeProvider';\nimport { HideInNativeApp } from '../../../HideInNativeApp';\n\nimport { ActionsTestIds } from './Actions.constants';\n\nimport styles from './Actions.scss';\n\nimport {\n AddMessageCustomIcon,\n CloseSmallIcon,\n CollapseIcon,\n ExpandIcon,\n MessageIcon,\n MoreOneIcon,\n SettingTwoIcon,\n} from '~/icons';\nimport { useAppCommentsMode, useOutsideClick, useSetAppCommentsMode } from '~/effects';\nimport { isInsideNewMobileApp } from '~/utils/mobileDetect';\n\ntype ActionsProps = {\n rootRef: RefObject<HTMLDivElement>;\n additionalActions?: AdditionalAction[];\n showComments?: boolean;\n disableSettings?: boolean;\n hideSettingsUnderMore?: boolean;\n};\n\nconst isActionObject = (action: AdditionalAction): action is AdditionalActionObject =>\n !!action && typeof action === 'object' && 'title' in action;\n\nconst LONG_PRESS_DELAY_MS = 500;\n\nexport const Actions = ({\n additionalActions,\n showComments,\n disableSettings,\n rootRef,\n hideSettingsUnderMore,\n}: ActionsProps) => {\n const {\n maximized,\n setMaximized,\n appSettingsComponent,\n isExpanded,\n isBrowserFullscreen,\n enterBrowserFullscreen,\n exitBrowserFullscreen,\n isSeparateWindow,\n openSeparateWindow,\n closeSeparateWindow,\n } = useAppCommonsInternal();\n const commentsEnabled = useAppCommentsMode();\n const setCommentsMode = useSetAppCommentsMode();\n const [moreMenuOpen, setMoreMenuOpen] = useState(false);\n const moreButtonRef = useRef<HTMLButtonElement>(null);\n const maximizeButtonRef = useRef<HTMLButtonElement>(null);\n const settingsButtonRef = useRef<HTMLButtonElement>(null);\n const [showMaximizeTooltip, setShowMaximizeTooltip] = useState(true);\n const [isModesMenuOpen, setIsModesMenuOpen] = useState(false);\n const longPressTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const isLongPressRef = useRef(false);\n\n const popoverContentRef = useRef<HTMLDivElement>(null);\n const { isPinned, close, open, isPopoverOpen, animatePopover } = useAppSettingPinning();\n const closeSettings = useCallback(() => {\n close(false);\n }, [close]);\n const { height } = useAppSize() || {};\n const settingsVisible = !!appSettingsComponent && !disableSettings;\n\n const wrapperStyle = useMemo<CSSProperties>(() => ({ maxHeight: `${height}px` }), [height]);\n\n const toggleMoreMenu = useCallback(() => {\n setMoreMenuOpen(value => !value);\n }, []);\n\n const toggleCommentsMode = useCallback(() => {\n setCommentsMode(value => !value);\n }, [setCommentsMode]);\n\n const closeModesMenu = useCallback(() => {\n isLongPressRef.current = false;\n setIsModesMenuOpen(false);\n }, []);\n\n const toggleMaximized = useCallback(() => {\n setShowMaximizeTooltip(false);\n closeModesMenu();\n\n if (isSeparateWindow) {\n closeSeparateWindow?.();\n return;\n }\n\n if (isBrowserFullscreen) {\n exitBrowserFullscreen?.();\n return;\n }\n\n setMaximized(!maximized);\n }, [\n closeModesMenu,\n closeSeparateWindow,\n exitBrowserFullscreen,\n isBrowserFullscreen,\n isSeparateWindow,\n maximized,\n setMaximized,\n ]);\n\n const maximizeTooltip = isSeparateWindow\n ? 'Close Separate Window'\n : isExpanded\n ? 'Restore'\n : 'Maximize';\n\n const cancelLongPress = useCallback(() => {\n if (longPressTimerRef.current) {\n clearTimeout(longPressTimerRef.current);\n longPressTimerRef.current = null;\n }\n }, []);\n\n const handleMaximizeMouseDown = useCallback(() => {\n if (isExpanded || !enterBrowserFullscreen) return;\n\n cancelLongPress();\n longPressTimerRef.current = setTimeout(() => {\n isLongPressRef.current = true;\n setIsModesMenuOpen(true);\n }, LONG_PRESS_DELAY_MS);\n }, [cancelLongPress, enterBrowserFullscreen, isExpanded]);\n\n useEffect(() => cancelLongPress, [cancelLongPress]);\n\n const handleMaximizeClick = useCallback(() => {\n if (isLongPressRef.current) {\n isLongPressRef.current = false;\n return;\n }\n\n toggleMaximized();\n }, [toggleMaximized]);\n\n const handleSeparateWindowClick = useCallback(() => {\n closeModesMenu();\n openSeparateWindow?.();\n }, [closeModesMenu, openSeparateWindow]);\n\n const handleBrowserFullscreenClick = useCallback(() => {\n closeModesMenu();\n enterBrowserFullscreen?.();\n }, [closeModesMenu, enterBrowserFullscreen]);\n\n useEffect(() => {\n setShowMaximizeTooltip(true);\n }, [isExpanded]);\n\n const menuActionItems = useMemo(() => {\n if (isInsideNewMobileApp) return [];\n\n const getOnClick = (handler: AdditionalActionObject['onClick']) => () => {\n toggleMoreMenu();\n handler?.();\n };\n\n const objectActions = (additionalActions || [])\n .filter(isActionObject)\n .map(item => ({ ...item, onClick: getOnClick(item.onClick) }));\n\n const commentItem: AdditionalActionObject = {\n icon: <MessageIcon />,\n onClick: getOnClick(toggleCommentsMode),\n title: commentsEnabled ? 'Close Comments Mode' : 'Add Comment',\n };\n\n const maximizeItem: AdditionalActionObject = {\n title: maximizeTooltip,\n onClick: getOnClick(toggleMaximized),\n icon: isExpanded ? <CollapseIcon /> : <ExpandIcon />,\n };\n\n const settingsItem = {\n title: 'Settings',\n onClick: getOnClick(open),\n icon: <SettingTwoIcon />,\n };\n\n return [\n ...objectActions,\n ...(showComments ? [commentItem] : []),\n ...(hideSettingsUnderMore && settingsVisible ? [settingsItem] : []),\n maximizeItem,\n ];\n }, [\n additionalActions,\n commentsEnabled,\n hideSettingsUnderMore,\n isExpanded,\n maximizeTooltip,\n open,\n settingsVisible,\n showComments,\n toggleCommentsMode,\n toggleMaximized,\n toggleMoreMenu,\n ]);\n\n useOutsideClick(popoverContentRef, closeSettings, [\n settingsButtonRef.current,\n // Do not react on clicks inside popovers/modals/autocomplete dropdowns, etc\n '[role=\"tooltip\"]',\n '[role=\"presentation\"]',\n ]);\n\n // Show menu only if there's something there besides the fullscreen item\n const hasMenu = menuActionItems.length > 1;\n\n const maximizeButton = (\n <ButtonIcon\n size=\"small\"\n type=\"tertiaryBg\"\n ref={maximizeButtonRef}\n onClick={handleMaximizeClick}\n onMouseDown={handleMaximizeMouseDown}\n onMouseUp={cancelLongPress}\n onMouseLeave={cancelLongPress}\n className={hasMenu ? styles.fullscreenButton : undefined}\n testId={isExpanded ? ActionsTestIds.CollapseButtonTestId : ActionsTestIds.ExpandButtonTestId}\n >\n {isExpanded ? <CollapseIcon /> : <ExpandIcon />}\n </ButtonIcon>\n );\n\n return (\n <>\n <HideInNativeApp>\n {additionalActions?.map((action, index) =>\n !isActionObject(action) ? (\n <Fragment key={index}>{action}</Fragment>\n ) : (\n <Tooltip title={action.title} key={index}>\n <ButtonIcon\n size=\"small\"\n type=\"tertiary\"\n onClick={action.onClick}\n className={classNames(styles.additionalActionButton)}\n testId={ActionsTestIds.AdditionalActionItemTestId}\n >\n {action.icon}\n </ButtonIcon>\n </Tooltip>\n )\n )}\n </HideInNativeApp>\n\n <HideInNativeApp>\n {showComments && (\n <Tooltip title={commentsEnabled ? 'Close Comments Mode' : 'Add Comment'}>\n <ButtonIcon\n size=\"small\"\n type={commentsEnabled ? 'secondaryBg' : 'tertiaryBg'}\n onClick={toggleCommentsMode}\n className={hasMenu ? styles.commentButton : undefined}\n testId={\n commentsEnabled\n ? ActionsTestIds.CloseCommentButtonTestId\n : ActionsTestIds.AddMessageButtonTestId\n }\n >\n {commentsEnabled ? <CloseSmallIcon /> : <AddMessageCustomIcon fill=\"currentColor\" />}\n </ButtonIcon>\n </Tooltip>\n )}\n </HideInNativeApp>\n\n {settingsVisible && (\n <SettingsButton\n ref={settingsButtonRef}\n closeSettings={closeSettings}\n className={\n hideSettingsUnderMore && !isInsideNewMobileApp\n ? styles.settingsHiddenUnderMore\n : undefined\n }\n />\n )}\n\n {/* \n Our \"pseudo-fullscreen\" system gets a stroke when we try to go fullscreen when a tooltip is shown (and we're in a \"pseudo-fullscreen\" mode) \n and we change actual \"fullscreen\" status of an app.\n So we don't show tooltip when user clicks the button, and we expect the \"fullscreen\" status to change.\n */}\n <HideInNativeApp>\n {showMaximizeTooltip ? (\n <Tooltip title={maximizeTooltip}>{maximizeButton}</Tooltip>\n ) : (\n maximizeButton\n )}\n\n {maximizeButtonRef.current && (\n <Menu\n anchorEl={maximizeButtonRef.current}\n open={isModesMenuOpen}\n onClose={closeModesMenu}\n placement=\"bottom-end\"\n >\n <Menu.Item onClick={toggleMaximized} testId={ActionsTestIds.MaximizeItemTestId}>\n Maximize\n </Menu.Item>\n <Menu.Item\n onClick={handleBrowserFullscreenClick}\n testId={ActionsTestIds.BrowserFullscreenItemTestId}\n >\n Full Screen\n </Menu.Item>\n <Menu.Item\n onClick={handleSeparateWindowClick}\n testId={ActionsTestIds.SeparateWindowItemTestId}\n >\n Separate Window\n </Menu.Item>\n </Menu>\n )}\n </HideInNativeApp>\n\n <HideInNativeApp>\n {hasMenu && (\n <Tooltip title=\"More\">\n <ButtonIcon\n type={\n moreMenuOpen || (hideSettingsUnderMore && isPopoverOpen)\n ? 'secondaryBg'\n : 'tertiaryBg'\n }\n className={styles.moreButton}\n ref={moreButtonRef}\n onClick={toggleMoreMenu}\n size=\"small\"\n >\n <MoreOneIcon />\n </ButtonIcon>\n </Tooltip>\n )}\n\n {hasMenu && moreButtonRef.current && (\n <Menu\n anchorEl={moreButtonRef.current}\n open={moreMenuOpen}\n onClose={toggleMoreMenu}\n placement=\"bottom-end\"\n >\n {menuActionItems.map((item, index) => (\n <Menu.Item size=\"large\" prefix={item.icon} key={index} onClick={item.onClick}>\n {item.title}\n </Menu.Item>\n ))}\n </Menu>\n )}\n </HideInNativeApp>\n\n {settingsVisible && rootRef.current && !isPinned && (\n <Popover\n open={isPopoverOpen}\n placement=\"bottom-end\"\n anchorEl={rootRef.current}\n onClose={closeSettings}\n className={styles.settingsPopover}\n preventScroll={false}\n backdrop={false}\n animate={animatePopover}\n >\n <AppSettings rootStyles={wrapperStyle} ref={popoverContentRef} onClose={closeSettings} />\n </Popover>\n )}\n </>\n );\n};\n"],"names":["isActionObject","action","_typeof","Actions","_ref","additionalActions","showComments","disableSettings","rootRef","hideSettingsUnderMore","_useAppCommonsInterna","useAppCommonsInternal","maximized","setMaximized","appSettingsComponent","isExpanded","isBrowserFullscreen","enterBrowserFullscreen","exitBrowserFullscreen","isSeparateWindow","openSeparateWindow","closeSeparateWindow","commentsEnabled","useAppCommentsMode","setCommentsMode","useSetAppCommentsMode","useState","_useState2","_slicedToArray","_useState","moreMenuOpen","setMoreMenuOpen","moreButtonRef","useRef","maximizeButtonRef","settingsButtonRef","_useState4","_useState3","showMaximizeTooltip","setShowMaximizeTooltip","_useState6","_useState5","isModesMenuOpen","setIsModesMenuOpen","longPressTimerRef","isLongPressRef","popoverContentRef","_useAppSettingPinning","useAppSettingPinning","isPinned","close","open","isPopoverOpen","animatePopover","closeSettings","useCallback","height","useAppSize","settingsVisible","wrapperStyle","useMemo","maxHeight","toggleMoreMenu","value","toggleCommentsMode","closeModesMenu","current","toggleMaximized","maximizeTooltip","cancelLongPress","clearTimeout","handleMaximizeMouseDown","setTimeout","useEffect","handleMaximizeClick","handleSeparateWindowClick","handleBrowserFullscreenClick","menuActionItems","isInsideNewMobileApp","getOnClick","handler","objectActions","filter","map","item","_objectSpread","onClick","commentItem","icon","_jsx","MessageIcon","title","maximizeItem","CollapseIcon","ExpandIcon","settingsItem","SettingTwoIcon","_toConsumableArray","useOutsideClick","hasMenu","length","maximizeButton","ButtonIcon","size","type","ref","onMouseDown","onMouseUp","onMouseLeave","className","styles","fullscreenButton","undefined","testId","ActionsTestIds","CollapseButtonTestId","ExpandButtonTestId","children","_jsxs","_Fragment","HideInNativeApp","index","Tooltip","classNames","additionalActionButton","AdditionalActionItemTestId","Fragment","commentButton","CloseCommentButtonTestId","AddMessageButtonTestId","CloseSmallIcon","AddMessageCustomIcon","fill","SettingsButton","settingsHiddenUnderMore","Menu","anchorEl","onClose","placement","Item","MaximizeItemTestId","BrowserFullscreenItemTestId","SeparateWindowItemTestId","moreButton","MoreOneIcon","prefix","Popover","settingsPopover","preventScroll","backdrop","animate","AppSettings","rootStyles"],"mappings":"owPAgDA,IAAMA,EAAiB,SAACC,GAAwB,QAC5CA,GAA4B,WAAlBC,EAAOD,IA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K,OAC/BhC,EAAC8C,EAAKI,KAAI,CAACpC,KAAK,QAAQ0C,OAAQ7D,EAAKI,KAAkBF,QAASF,EAAKE,QAAQ+B,SAC1EjC,EAAKO,OADwC8B,WAQvD/D,IAAmBlD,EAAQ0D,UAAYjB,IACtCwC,EAACyD,EAAO,CACN/F,KAAMC,GACNsF,UAAU,aACVF,SAAUhI,EAAQ0D,QAClBuE,QAASnF,GACTuD,UAAWC,EAAOqC,gBAClBC,eAAe,EACfC,UAAU,EACVC,QAASjG,GAAegE,SAExB5B,EAAC8D,EAAW,CAACC,WAAY7F,GAAc8C,IAAK3D,GAAmB2F,QAASnF,SAKlF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeaderV3.d.ts","sourceRoot":"","sources":["../../../../src/componentsV2/AppHeader/V3/AppHeaderV3.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"AppHeaderV3.d.ts","sourceRoot":"","sources":["../../../../src/componentsV2/AppHeader/V3/AppHeaderV3.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAqB,EAAE,EAAE,MAAM,OAAO,CAAC;AAOvE,OAAO,EAAoB,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAQjE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAKhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAE7B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAE/B;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEzC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IAEF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,OAAO,CAAC,CAAC;IAEjE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IAErC;;;OAGG;IACH,oBAAoB,CAAC,EAAE;QACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;KACjC,CAAC;IAEF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA2M5C,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{useRef as t}from"react";import
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{useRef as t,useEffect as o}from"react";import i from"classnames";import{isEmpty as l}from"lodash";import{SEGMENTS as s}from"../../../constants/segment.js";import{getAppSegment as n}from"../../../utils/devcenter.js";import{PadModeSelect as r}from"../../PadModeSelect/PadModeSelect.js";import"../../PadModeSelect/PadModeSelect.constants.js";import{AppHeaderTestIds as d}from"../AppHeader.constants.js";import"../../AppCommonsProvider/AppCommonsProvider.js";import{useAppCommonsInternal as a}from"../../AppCommonsProvider/AppCommonsContext.js";import{HideInNativeApp as p}from"../../HideInNativeApp/index.js";import{AppHeaderFinderProps as c}from"../../utils.js";import{VersionSelect as m}from"./VersionSelect/VersionSelect.js";import{AssetChips as v}from"./AssetChips/AssetChips.js";import{AppTitle as u}from"./AppTitle/AppTitle.js";import"./AppTitle/AppTitle.constants.js";import{useResponsivity as f}from"./useResponsivity.js";import{Actions as h}from"./Actions/Actions.js";import"./Actions/Actions.constants.js";import C from"./AppHeaderV3.scss.js";import{jsxs as j,jsx as y}from"react/jsx-runtime";function A(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 b(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?A(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var g=function(e){var A,g,O,P,I,M,N,S,L,w,R,T,D,x,U,E,W=e.elementsClassNames,k=e.className,H=e.testId,V=e.logo,q=e.additionalControls,B=e.title,F=e.padModeDisabled,z=e.padModeWells,G=e.dqData,J=e.asset,K=e.lastUpdate,Q=e.additionalActions,X=e.showComments,Y=e.titleControls,Z=e.disableSettings,$=e.showAssetChips,_=e.disableAssetSelector,ee=e.titleMenuActions,te=e.titleControlsPosition,oe=void 0===te?"right":te,ie=e.responsivenessConfig,le=t(null),se=a(),ne=se.app,re=se.appName,de=se.well,ae=se.wells,pe=se.rig,ce=se.fracFleet,me=se.interventionUnit,ve=se.isExpanded,ue=se.setSeparateWindowTitle,fe=se.isInsideNewMobileApp,he=se.disableAppAssetSelection,Ce=se.isMultiRig,je=z||ae,ye=n(ne)===s.COMPLETION&&!de,Ae=!l(je)&&!!ce,be=he||Ce,ge=!he&&!F&&!fe&&ye&&Ae,Oe=V?"ultranarrow":ge||q||Y?"narrow":void 0,Pe="left"===oe&&!!Y,Ie=t(null),Me=t(null),Ne=t(null),Se=t(null),Le=t(null),we=t(null),Re=t(null),Te=null!==(A=null!==(g=null!==(O=null==de?void 0:de.name)&&void 0!==O?O:null==pe?void 0:pe.name)&&void 0!==g?g:null==ce?void 0:ce.name)&&void 0!==A?A:null==me?void 0:me.name;o((function(){null==ue||ue([re,Te].filter(Boolean).join(" - "))}),[ue,re,Te]);var De=f({disabled:fe,titleControlsLeft:Pe,rootRef:le,versionRef:Ie,additionalControlsRef:Ne,titleControlsRef:Se,logoRef:we,padModeRef:Me,chipsRef:Le,actionsRef:Re});return j("div",b(b({className:i(C.root,k),"data-testid":H,ref:le,style:null===(P=De.root)||void 0===P?void 0:P.style},c),{},{children:[y("div",{className:i(C.logoContainer,null==W?void 0:W.logoContainer),ref:we,children:V&&"string"==typeof V?y("img",{className:C.logo,src:V,alt:"Logo"}):V}),y(u,{title:ve&&null!=Te?Te:B,asset:J,dqData:G,lastUpdate:K,className:i(C.title,Pe&&C.titleWithControlsLeft,null==W?void 0:W.title),disableAssetSelector:_,titleMenuActions:ee,style:null===(I=De.title)||void 0===I?void 0:I.style}),Y&&y("div",{className:i(C.titleControls,Pe&&C.titleControlsLeft,(null===(M=De.titleControls)||void 0===M?void 0:M.lastInLine)&&C.lastInLine,null==W?void 0:W.titleControls),ref:Se,style:null===(N=De.titleControls)||void 0===N?void 0:N.style,children:Y}),y(p,{children:y("div",{className:C.version,ref:Ie,children:y(m,{className:null==W?void 0:W.versionSelect})})}),ge&&y("div",{className:i(C.padMode,(null===(S=De.padMode)||void 0===S?void 0:S.lastInLine)&&C.lastInLine),ref:Me,style:null===(L=De.padMode)||void 0===L?void 0:L.style,children:y(r,{testId:d.PadModeSelectTestId})}),q&&y("div",{className:i(C.additionalControls,(null===(w=De.additionalControls)||void 0===w?void 0:w.lastInLine)&&C.lastInLine,null==W?void 0:W.additionalControls),ref:Ne,style:null===(R=De.additionalControls)||void 0===R?void 0:R.style,"data-testid":d.AdditionalControlsTestId,children:q}),!be&&$&&y(p,{children:y("div",{className:i(C.assetChips,(null===(T=De.chips)||void 0===T?void 0:T.lastInLine)&&C.lastInLine,null==W?void 0:W.chips),ref:Le,style:null===(D=De.chips)||void 0===D?void 0:D.style,children:y(v,{chipsWidth:Oe})})}),y("div",{className:i(C.actions,(null===(x=De.actions)||void 0===x?void 0:x.lastInLine)&&C.lastInLine,null==W?void 0:W.actions),ref:Re,style:null===(U=De.actions)||void 0===U?void 0:U.style,"data-testid":d.ActionsRootTestId,children:y(h,{additionalActions:Q,showComments:X,disableSettings:Z,rootRef:le,hideSettingsUnderMore:null==ie?void 0:ie.hideSettingsUnderMore})}),null===(E=De.linebreaks)||void 0===E?void 0:E.map((function(e,t){return y("div",{className:C.responsivenessLineBreak,style:e},t)}))]}))};export{g as AppHeaderV3};
|
|
2
2
|
//# sourceMappingURL=AppHeaderV3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeaderV3.js","sources":["../../../../src/componentsV2/AppHeader/V3/AppHeaderV3.tsx"],"sourcesContent":["import { ReactElement, ReactNode, useRef, FC } from 'react';\nimport classNames from 'classnames';\nimport { isEmpty } from 'lodash';\n\nimport { SEGMENTS } from '../../../constants/segment';\nimport { getAppSegment } from '../../../utils/devcenter';\nimport { PadModeSelect } from '../../PadModeSelect';\nimport { AppHeaderTestIds, Asset, UseWellnessAlertsReturnType } from '../AppHeader.constants';\nimport { useAppCommonsInternal } from '../../AppCommonsProvider';\nimport { HideInNativeApp } from '../../HideInNativeApp';\nimport { AppHeaderFinderProps } from '../../utils';\n\nimport { VersionSelect } from './VersionSelect';\nimport { AssetChips } from './AssetChips';\nimport { AppTitle } from './AppTitle';\nimport { useResponsivity } from './useResponsivity';\nimport { AdditionalAction, TitleMenuAction } from './constants';\nimport { Actions } from './Actions';\n\nimport styles from './AppHeaderV3.scss';\n\nexport type AppHeaderV3Props = {\n logo?: string | ReactElement;\n\n additionalControls?: ReactNode;\n\n /**\n * Used to put some controls alongside title\n */\n titleControls?: ReactNode;\n titleControlsPosition?: 'right' | 'left';\n\n /**\n * An escape hatch to tweak the styling of internal elements\n *\n * `buttons`, `titleControls` and `versionSelect` are for *V3 only*\n */\n elementsClassNames?: {\n title?: string;\n additionalControls?: string;\n chips?: string;\n actions?: string;\n versionSelect?: string;\n titleControls?: string;\n logoContainer?: string;\n };\n\n title?: ReactNode;\n padModeDisabled?: boolean;\n padModeWells?: ReturnType<typeof useAppCommonsInternal>['wells'];\n\n lastUpdate?: number | string | Date;\n asset?: Asset | Asset[];\n dqData?: UseWellnessAlertsReturnType;\n showComments?: boolean;\n additionalActions?: AdditionalAction[];\n disableSettings?: boolean;\n showAssetChips?: boolean;\n disableAssetSelector?: boolean;\n titleMenuActions?: TitleMenuAction[];\n\n /**\n * Configuration for responsive behavior of header elements\n * - `hideSettingsUnderMore`: When true, settings button will be hidden under \"More\" menu at smaller screen sizes\n */\n responsivenessConfig?: {\n hideSettingsUnderMore?: boolean;\n };\n\n className?: string;\n testId?: string;\n};\n\nexport const AppHeaderV3: FC<AppHeaderV3Props> = ({\n elementsClassNames,\n className,\n testId,\n logo,\n additionalControls,\n title,\n padModeDisabled,\n padModeWells,\n dqData,\n asset,\n lastUpdate,\n additionalActions,\n showComments,\n titleControls,\n disableSettings,\n showAssetChips,\n disableAssetSelector,\n titleMenuActions,\n titleControlsPosition = 'right',\n responsivenessConfig,\n}) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const {\n app,\n well,\n wells: contextWells,\n fracFleet,\n isInsideNewMobileApp,\n disableAppAssetSelection,\n isMultiRig,\n } = useAppCommonsInternal();\n\n const segment = getAppSegment(app);\n const wells = padModeWells || contextWells;\n const isCompletionPadMode = segment === SEGMENTS.COMPLETION && !well;\n const hasPadModeAssets = !isEmpty(wells) && !!fracFleet;\n const shouldDisableAssetControls = disableAppAssetSelection || isMultiRig;\n const canShowPadMode = !disableAppAssetSelection && !padModeDisabled && !isInsideNewMobileApp;\n const hasPadMode = canShowPadMode && isCompletionPadMode && hasPadModeAssets;\n\n const possiblyNarrowChips =\n hasPadMode || !!additionalControls || !!titleControls ? 'narrow' : undefined;\n const chipsWidth = logo ? 'ultranarrow' : possiblyNarrowChips;\n\n const titleControlsLeft = titleControlsPosition === 'left' && !!titleControls;\n\n const versionRef = useRef<HTMLDivElement>(null);\n const padModeRef = useRef<HTMLDivElement>(null);\n const additionalControlsRef = useRef<HTMLDivElement>(null);\n const titleControlsRef = useRef<HTMLDivElement>(null);\n const chipsRef = useRef<HTMLDivElement>(null);\n const logoRef = useRef<HTMLDivElement>(null);\n const actionsRef = useRef<HTMLDivElement>(null);\n\n const responsivity = useResponsivity({\n disabled: isInsideNewMobileApp,\n titleControlsLeft,\n\n rootRef,\n versionRef,\n additionalControlsRef,\n titleControlsRef,\n logoRef,\n padModeRef,\n chipsRef,\n actionsRef,\n });\n\n return (\n <div\n className={classNames(styles.root, className)}\n data-testid={testId}\n ref={rootRef}\n style={responsivity.root?.style}\n {...AppHeaderFinderProps}\n >\n <div\n className={classNames(styles.logoContainer, elementsClassNames?.logoContainer)}\n ref={logoRef}\n >\n {logo && typeof logo === 'string' ? (\n <img className={styles.logo} src={logo} alt=\"Logo\" />\n ) : (\n logo\n )}\n </div>\n\n <AppTitle\n title={title}\n asset={asset}\n dqData={dqData}\n lastUpdate={lastUpdate}\n className={classNames(\n styles.title,\n titleControlsLeft && styles.titleWithControlsLeft,\n elementsClassNames?.title\n )}\n disableAssetSelector={disableAssetSelector}\n titleMenuActions={titleMenuActions}\n style={responsivity.title?.style}\n />\n\n {titleControls && (\n <div\n className={classNames(\n styles.titleControls,\n titleControlsLeft && styles.titleControlsLeft,\n responsivity.titleControls?.lastInLine && styles.lastInLine,\n elementsClassNames?.titleControls\n )}\n ref={titleControlsRef}\n style={responsivity.titleControls?.style}\n >\n {titleControls}\n </div>\n )}\n\n <HideInNativeApp>\n <div className={styles.version} ref={versionRef}>\n <VersionSelect className={elementsClassNames?.versionSelect} />\n </div>\n </HideInNativeApp>\n\n {hasPadMode && (\n <div\n className={classNames(\n styles.padMode,\n responsivity.padMode?.lastInLine && styles.lastInLine\n )}\n ref={padModeRef}\n style={responsivity.padMode?.style}\n >\n <PadModeSelect testId={AppHeaderTestIds.PadModeSelectTestId} />\n </div>\n )}\n\n {additionalControls && (\n <div\n className={classNames(\n styles.additionalControls,\n responsivity.additionalControls?.lastInLine && styles.lastInLine,\n elementsClassNames?.additionalControls\n )}\n ref={additionalControlsRef}\n style={responsivity.additionalControls?.style}\n data-testid={AppHeaderTestIds.AdditionalControlsTestId}\n >\n {additionalControls}\n </div>\n )}\n\n {!shouldDisableAssetControls && showAssetChips && (\n <HideInNativeApp>\n <div\n className={classNames(\n styles.assetChips,\n responsivity.chips?.lastInLine && styles.lastInLine,\n elementsClassNames?.chips\n )}\n ref={chipsRef}\n style={responsivity.chips?.style}\n >\n <AssetChips chipsWidth={chipsWidth} />\n </div>\n </HideInNativeApp>\n )}\n\n <div\n className={classNames(\n styles.actions,\n responsivity.actions?.lastInLine && styles.lastInLine,\n elementsClassNames?.actions\n )}\n ref={actionsRef}\n style={responsivity.actions?.style}\n data-testid={AppHeaderTestIds.ActionsRootTestId}\n >\n <Actions\n additionalActions={additionalActions}\n showComments={showComments}\n disableSettings={disableSettings}\n rootRef={rootRef}\n hideSettingsUnderMore={responsivenessConfig?.hideSettingsUnderMore}\n />\n </div>\n\n {responsivity.linebreaks?.map((css, index) => (\n <div className={styles.responsivenessLineBreak} style={css} key={index} />\n ))}\n </div>\n );\n};\n"],"names":["AppHeaderV3","_ref","_responsivity$root","_responsivity$title","_responsivity$titleCo","_responsivity$titleCo2","_responsivity$padMode","_responsivity$padMode2","_responsivity$additio","_responsivity$additio2","_responsivity$chips","_responsivity$chips2","_responsivity$actions","_responsivity$actions2","_responsivity$linebre","elementsClassNames","className","testId","logo","additionalControls","title","padModeDisabled","padModeWells","dqData","asset","lastUpdate","additionalActions","showComments","titleControls","disableSettings","showAssetChips","disableAssetSelector","titleMenuActions","_ref$titleControlsPos","titleControlsPosition","responsivenessConfig","rootRef","useRef","_useAppCommonsInterna","useAppCommonsInternal","app","well","contextWells","wells","fracFleet","isInsideNewMobileApp","disableAppAssetSelection","isMultiRig","isCompletionPadMode","getAppSegment","SEGMENTS","COMPLETION","hasPadModeAssets","isEmpty","shouldDisableAssetControls","hasPadMode","chipsWidth","undefined","titleControlsLeft","versionRef","padModeRef","additionalControlsRef","titleControlsRef","chipsRef","logoRef","actionsRef","responsivity","useResponsivity","disabled","_jsxs","_objectSpread","classNames","styles","root","ref","style","AppHeaderFinderProps","children","_jsx","logoContainer","src","alt","AppTitle","titleWithControlsLeft","lastInLine","HideInNativeApp","version","VersionSelect","versionSelect","padMode","PadModeSelect","AppHeaderTestIds","PadModeSelectTestId","AdditionalControlsTestId","assetChips","chips","AssetChips","actions","ActionsRootTestId","Actions","hideSettingsUnderMore","linebreaks","map","css","index","responsivenessLineBreak"],"mappings":"wrDAyEaA,IAAAA,EAAoC,SAqB3CC,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EApBJC,IAAAA,mBACAC,IAAAA,UACAC,IAAAA,OACAC,IAAAA,KACAC,IAAAA,mBACAC,IAAAA,MACAC,IAAAA,gBACAC,IAAAA,aACAC,IAAAA,OACAC,IAAAA,MACAC,IAAAA,WACAC,IAAAA,kBACAC,IAAAA,aACAC,IAAAA,cACAC,IAAAA,gBACAC,IAAAA,eACAC,IAAAA,qBACA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C,IAA8BxB,GAC9BgD,EAACO,EAAe,CAAAR,SACdC,EAAA,MAAA,CACE9D,UAAWuD,EACTC,EAAOsB,YACP,QAAA5B,EAAAA,GAAa6B,aAAb,IAAArF,OAAA,EAAAA,EAAoB0E,aAAcZ,EAAOY,WACzCrE,aAAAA,EAAAA,EAAoBgF,OAEtBrB,IAAKX,GACLY,MAAyB,UAAlBT,GAAa6B,aAAK,IAAApF,OAAA,EAAlBA,EAAoBgE,MAAME,SAEjCC,EAACkB,EAAU,CAACxC,WAAYA,SAK9BsB,EAAA,MAAA,CACE9D,UAAWuD,EACTC,EAAOyB,SACP,QAAA/B,EAAAA,GAAa+B,eAAb,IAAArF,OAAA,EAAAA,EAAsBwE,aAAcZ,EAAOY,WAC3CrE,aAAAA,EAAAA,EAAoBkF,SAEtBvB,IAAKT,GACLU,MAA2B,UAApBT,GAAa+B,eAAO,IAAApF,OAAA,EAApBA,EAAsB8D,MAC7B,cAAagB,EAAiBO,kBAAkBrB,SAEhDC,EAACqB,EAAO,CACNzE,kBAAmBA,EACnBC,aAAcA,EACdE,gBAAiBA,EACjBO,QAASA,GACTgE,sBAAuBjE,aAAoB,EAApBA,EAAsBiE,0BAIzB,QAFlBtF,EAELoD,GAAamC,kBAAU,IAAAvF,OAAA,EAAvBA,EAAyBwF,KAAI,SAACC,EAAKC,GAAK,OACvC1B,EAAA,MAAA,CAAK9D,UAAWwD,EAAOiC,wBAAyB9B,MAAO4B,GAAUC,EAAS,OAIlF"}
|
|
1
|
+
{"version":3,"file":"AppHeaderV3.js","sources":["../../../../src/componentsV2/AppHeader/V3/AppHeaderV3.tsx"],"sourcesContent":["import { ReactElement, ReactNode, useEffect, useRef, FC } from 'react';\nimport classNames from 'classnames';\nimport { isEmpty } from 'lodash';\n\nimport { SEGMENTS } from '../../../constants/segment';\nimport { getAppSegment } from '../../../utils/devcenter';\nimport { PadModeSelect } from '../../PadModeSelect';\nimport { AppHeaderTestIds, Asset, UseWellnessAlertsReturnType } from '../AppHeader.constants';\nimport { useAppCommonsInternal } from '../../AppCommonsProvider';\nimport { HideInNativeApp } from '../../HideInNativeApp';\nimport { AppHeaderFinderProps } from '../../utils';\n\nimport { VersionSelect } from './VersionSelect';\nimport { AssetChips } from './AssetChips';\nimport { AppTitle } from './AppTitle';\nimport { useResponsivity } from './useResponsivity';\nimport { AdditionalAction, TitleMenuAction } from './constants';\nimport { Actions } from './Actions';\n\nimport styles from './AppHeaderV3.scss';\n\nexport type AppHeaderV3Props = {\n logo?: string | ReactElement;\n\n additionalControls?: ReactNode;\n\n /**\n * Used to put some controls alongside title\n */\n titleControls?: ReactNode;\n titleControlsPosition?: 'right' | 'left';\n\n /**\n * An escape hatch to tweak the styling of internal elements\n *\n * `buttons`, `titleControls` and `versionSelect` are for *V3 only*\n */\n elementsClassNames?: {\n title?: string;\n additionalControls?: string;\n chips?: string;\n actions?: string;\n versionSelect?: string;\n titleControls?: string;\n logoContainer?: string;\n };\n\n title?: ReactNode;\n padModeDisabled?: boolean;\n padModeWells?: ReturnType<typeof useAppCommonsInternal>['wells'];\n\n lastUpdate?: number | string | Date;\n asset?: Asset | Asset[];\n dqData?: UseWellnessAlertsReturnType;\n showComments?: boolean;\n additionalActions?: AdditionalAction[];\n disableSettings?: boolean;\n showAssetChips?: boolean;\n disableAssetSelector?: boolean;\n titleMenuActions?: TitleMenuAction[];\n\n /**\n * Configuration for responsive behavior of header elements\n * - `hideSettingsUnderMore`: When true, settings button will be hidden under \"More\" menu at smaller screen sizes\n */\n responsivenessConfig?: {\n hideSettingsUnderMore?: boolean;\n };\n\n className?: string;\n testId?: string;\n};\n\nexport const AppHeaderV3: FC<AppHeaderV3Props> = ({\n elementsClassNames,\n className,\n testId,\n logo,\n additionalControls,\n title,\n padModeDisabled,\n padModeWells,\n dqData,\n asset,\n lastUpdate,\n additionalActions,\n showComments,\n titleControls,\n disableSettings,\n showAssetChips,\n disableAssetSelector,\n titleMenuActions,\n titleControlsPosition = 'right',\n responsivenessConfig,\n}) => {\n const rootRef = useRef<HTMLDivElement>(null);\n const {\n app,\n appName,\n well,\n wells: contextWells,\n rig,\n fracFleet,\n interventionUnit,\n isExpanded,\n setSeparateWindowTitle,\n isInsideNewMobileApp,\n disableAppAssetSelection,\n isMultiRig,\n } = useAppCommonsInternal();\n\n const segment = getAppSegment(app);\n const wells = padModeWells || contextWells;\n const isCompletionPadMode = segment === SEGMENTS.COMPLETION && !well;\n const hasPadModeAssets = !isEmpty(wells) && !!fracFleet;\n const shouldDisableAssetControls = disableAppAssetSelection || isMultiRig;\n const canShowPadMode = !disableAppAssetSelection && !padModeDisabled && !isInsideNewMobileApp;\n const hasPadMode = canShowPadMode && isCompletionPadMode && hasPadModeAssets;\n\n const possiblyNarrowChips =\n hasPadMode || !!additionalControls || !!titleControls ? 'narrow' : undefined;\n const chipsWidth = logo ? 'ultranarrow' : possiblyNarrowChips;\n\n const titleControlsLeft = titleControlsPosition === 'left' && !!titleControls;\n\n const versionRef = useRef<HTMLDivElement>(null);\n const padModeRef = useRef<HTMLDivElement>(null);\n const additionalControlsRef = useRef<HTMLDivElement>(null);\n const titleControlsRef = useRef<HTMLDivElement>(null);\n const chipsRef = useRef<HTMLDivElement>(null);\n const logoRef = useRef<HTMLDivElement>(null);\n const actionsRef = useRef<HTMLDivElement>(null);\n\n const assetName = well?.name ?? rig?.name ?? fracFleet?.name ?? interventionUnit?.name;\n\n useEffect(() => {\n setSeparateWindowTitle?.([appName, assetName].filter(Boolean).join(' - '));\n }, [setSeparateWindowTitle, appName, assetName]);\n\n const responsivity = useResponsivity({\n disabled: isInsideNewMobileApp,\n titleControlsLeft,\n\n rootRef,\n versionRef,\n additionalControlsRef,\n titleControlsRef,\n logoRef,\n padModeRef,\n chipsRef,\n actionsRef,\n });\n\n return (\n <div\n className={classNames(styles.root, className)}\n data-testid={testId}\n ref={rootRef}\n style={responsivity.root?.style}\n {...AppHeaderFinderProps}\n >\n <div\n className={classNames(styles.logoContainer, elementsClassNames?.logoContainer)}\n ref={logoRef}\n >\n {logo && typeof logo === 'string' ? (\n <img className={styles.logo} src={logo} alt=\"Logo\" />\n ) : (\n logo\n )}\n </div>\n\n <AppTitle\n title={isExpanded ? assetName ?? title : title}\n asset={asset}\n dqData={dqData}\n lastUpdate={lastUpdate}\n className={classNames(\n styles.title,\n titleControlsLeft && styles.titleWithControlsLeft,\n elementsClassNames?.title\n )}\n disableAssetSelector={disableAssetSelector}\n titleMenuActions={titleMenuActions}\n style={responsivity.title?.style}\n />\n\n {titleControls && (\n <div\n className={classNames(\n styles.titleControls,\n titleControlsLeft && styles.titleControlsLeft,\n responsivity.titleControls?.lastInLine && styles.lastInLine,\n elementsClassNames?.titleControls\n )}\n ref={titleControlsRef}\n style={responsivity.titleControls?.style}\n >\n {titleControls}\n </div>\n )}\n\n <HideInNativeApp>\n <div className={styles.version} ref={versionRef}>\n <VersionSelect className={elementsClassNames?.versionSelect} />\n </div>\n </HideInNativeApp>\n\n {hasPadMode && (\n <div\n className={classNames(\n styles.padMode,\n responsivity.padMode?.lastInLine && styles.lastInLine\n )}\n ref={padModeRef}\n style={responsivity.padMode?.style}\n >\n <PadModeSelect testId={AppHeaderTestIds.PadModeSelectTestId} />\n </div>\n )}\n\n {additionalControls && (\n <div\n className={classNames(\n styles.additionalControls,\n responsivity.additionalControls?.lastInLine && styles.lastInLine,\n elementsClassNames?.additionalControls\n )}\n ref={additionalControlsRef}\n style={responsivity.additionalControls?.style}\n data-testid={AppHeaderTestIds.AdditionalControlsTestId}\n >\n {additionalControls}\n </div>\n )}\n\n {!shouldDisableAssetControls && showAssetChips && (\n <HideInNativeApp>\n <div\n className={classNames(\n styles.assetChips,\n responsivity.chips?.lastInLine && styles.lastInLine,\n elementsClassNames?.chips\n )}\n ref={chipsRef}\n style={responsivity.chips?.style}\n >\n <AssetChips chipsWidth={chipsWidth} />\n </div>\n </HideInNativeApp>\n )}\n\n <div\n className={classNames(\n styles.actions,\n responsivity.actions?.lastInLine && styles.lastInLine,\n elementsClassNames?.actions\n )}\n ref={actionsRef}\n style={responsivity.actions?.style}\n data-testid={AppHeaderTestIds.ActionsRootTestId}\n >\n <Actions\n additionalActions={additionalActions}\n showComments={showComments}\n disableSettings={disableSettings}\n rootRef={rootRef}\n hideSettingsUnderMore={responsivenessConfig?.hideSettingsUnderMore}\n />\n </div>\n\n {responsivity.linebreaks?.map((css, index) => (\n <div className={styles.responsivenessLineBreak} style={css} key={index} />\n ))}\n </div>\n );\n};\n"],"names":["AppHeaderV3","_ref","_ref2","_ref3","_well$name","_responsivity$root","_responsivity$title","_responsivity$titleCo","_responsivity$titleCo2","_responsivity$padMode","_responsivity$padMode2","_responsivity$additio","_responsivity$additio2","_responsivity$chips","_responsivity$chips2","_responsivity$actions","_responsivity$actions2","_responsivity$linebre","elementsClassNames","className","testId","logo","additionalControls","title","padModeDisabled","padModeWells","dqData","asset","lastUpdate","additionalActions","showComments","titleControls","disableSettings","showAssetChips","disableAssetSelector","titleMenuActions","_ref$titleControlsPos","titleControlsPosition","responsivenessConfig","rootRef","useRef","_useAppCommonsInterna","useAppCommonsInternal","app","appName","well","contextWells","wells","rig","fracFleet","interventionUnit","isExpanded","setSeparateWindowTitle","isInsideNewMobileApp","disableAppAssetSelection","isMultiRig","isCompletionPadMode","getAppSegment","SEGMENTS","COMPLETION","hasPadModeAssets","isEmpty","shouldDisableAssetControls","hasPadMode","chipsWidth","undefined","titleControlsLeft","versionRef","padModeRef","additionalControlsRef","titleControlsRef","chipsRef","logoRef","actionsRef","assetName","name","useEffect","filter","Boolean","join","responsivity","useResponsivity","disabled","_jsxs","_objectSpread","classNames","styles","root","ref","style","AppHeaderFinderProps","children","_jsx","logoContainer","src","alt","AppTitle","titleWithControlsLeft","lastInLine","HideInNativeApp","version","VersionSelect","versionSelect","padMode","PadModeSelect","AppHeaderTestIds","PadModeSelectTestId","AdditionalControlsTestId","assetChips","chips","AssetChips","actions","ActionsRootTestId","Actions","hideSettingsUnderMore","linebreaks","map","css","index","responsivenessLineBreak"],"mappings":"usDAyE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