@corva/ui 3.76.0-10 → 3.76.0-2

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.
Files changed (72) hide show
  1. package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js +1 -1
  2. package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
  3. package/cjs-bundle/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
  4. package/cjs-bundle/components/CommentCard/CommentCard.scss.js +1 -1
  5. package/cjs-bundle/components/CommentInput/index.js +1 -1
  6. package/cjs-bundle/components/CommentInput/index.js.map +1 -1
  7. package/cjs-bundle/components/CommentInputNext/CommentInputNext.scss.js +1 -1
  8. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  9. package/cjs-bundle/components/FeedCard/FeedCard.scss.js +1 -1
  10. package/cjs-bundle/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
  11. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
  12. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
  13. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  14. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  15. package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
  16. package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
  17. package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.scss.js +1 -1
  18. package/cjs-bundle/componentsV2/AppHeader/V3/useResponsivity.js +1 -1
  19. package/cjs-bundle/componentsV2/AppHeader/V3/useResponsivity.js.map +1 -1
  20. package/components/AttachmentPreview/AttachmentPreview.d.ts +0 -1
  21. package/components/AttachmentPreview/AttachmentPreview.d.ts.map +1 -1
  22. package/components/AttachmentPreview/AttachmentPreview.js +1 -1
  23. package/components/AttachmentPreview/AttachmentPreview.js.map +1 -1
  24. package/components/AttachmentPreview/AttachmentPreview.scss.js +1 -1
  25. package/components/CommentCard/CommentCard.scss.js +1 -1
  26. package/components/CommentInput/index.d.ts +24 -26
  27. package/components/CommentInput/index.js +1 -1
  28. package/components/CommentInput/index.js.map +1 -1
  29. package/components/CommentInputNext/CommentInputNext.scss.js +1 -1
  30. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts +9 -2
  31. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.d.ts.map +1 -1
  32. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  33. package/components/FeedCard/FeedCard.scss.js +1 -1
  34. package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts +6 -19
  35. package/componentsV2/AppCommonsProvider/AppCommonsContext.d.ts.map +1 -1
  36. package/componentsV2/AppCommonsProvider/AppCommonsContext.js.map +1 -1
  37. package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts +0 -1
  38. package/componentsV2/AppHeader/V3/Actions/Actions.constants.d.ts.map +1 -1
  39. package/componentsV2/AppHeader/V3/Actions/Actions.constants.js +1 -1
  40. package/componentsV2/AppHeader/V3/Actions/Actions.constants.js.map +1 -1
  41. package/componentsV2/AppHeader/V3/Actions/Actions.d.ts.map +1 -1
  42. package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  43. package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  44. package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts.map +1 -1
  45. package/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
  46. package/componentsV2/AppHeader/V3/AppHeaderV3.js.map +1 -1
  47. package/componentsV2/AppHeader/V3/AppHeaderV3.scss.js +1 -1
  48. package/componentsV2/AppHeader/V3/useResponsivity.js +1 -1
  49. package/componentsV2/AppHeader/V3/useResponsivity.js.map +1 -1
  50. package/mcp-server/server.mjs +3 -7
  51. package/package.json +1 -1
  52. package/styles/common.scss +0 -14
  53. package/styles/mixins.scss +0 -14
  54. package/tsconfig.tsbuildinfo +1 -1
  55. package/cjs-bundle/components/AttachmentPreview/useScrollOverflow.js +0 -2
  56. package/cjs-bundle/components/AttachmentPreview/useScrollOverflow.js.map +0 -1
  57. package/cjs-bundle/components/CommentInput/useCommentInput.js +0 -2
  58. package/cjs-bundle/components/CommentInput/useCommentInput.js.map +0 -1
  59. package/components/AttachmentPreview/__tests__/AttachmentPreview.overflow.test.d.ts +0 -2
  60. package/components/AttachmentPreview/__tests__/AttachmentPreview.overflow.test.d.ts.map +0 -1
  61. package/components/AttachmentPreview/useScrollOverflow.d.ts +0 -16
  62. package/components/AttachmentPreview/useScrollOverflow.d.ts.map +0 -1
  63. package/components/AttachmentPreview/useScrollOverflow.js +0 -2
  64. package/components/AttachmentPreview/useScrollOverflow.js.map +0 -1
  65. package/components/CommentInput/__tests__/useCommentInput.test.d.ts +0 -2
  66. package/components/CommentInput/__tests__/useCommentInput.test.d.ts.map +0 -1
  67. package/components/CommentInput/useCommentInput.d.ts +0 -26
  68. package/components/CommentInput/useCommentInput.d.ts.map +0 -1
  69. package/components/CommentInput/useCommentInput.js +0 -2
  70. package/components/CommentInput/useCommentInput.js.map +0 -1
  71. package/componentsV2/AppHeader/__tests__/AppHeaderEmbedded.test.d.ts +0 -2
  72. package/componentsV2/AppHeader/__tests__/AppHeaderEmbedded.test.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),s=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/slicedToArray"),o=require("@babel/runtime/helpers/typeof"),i=require("react"),r=require("classnames"),c=require("../../../ButtonIcon/ButtonIcon.js"),t=require("../../../Tooltip/Tooltip.js"),u=require("../SettingsButton/SettingsButton.js");require("../SettingsButton/SettingsButton.constants.js");var l=require("../../../Menu/Menu.js");require("../../../AppCommonsProvider/AppCommonsProvider.js");var a=require("../../../AppCommonsProvider/AppCommonsContext.js"),m=require("../../../AppPanel/AppPanelsContext.js"),d=require("../../../HideInNativeApp/index.js"),j=require("./Actions.constants.js"),p=require("./Actions.scss.js"),q=require("../../../../icons/iconParkIcons.js"),I=require("../../../../icons/customIcons/icons/AddMessage.js");require("../../../../icons/customIcons/icons/DragOne.js"),require("../../../../icons/customIcons/icons/Attention.js"),require("../../../../icons/customIcons/icons/Collapse.js"),require("../../../../icons/customIcons/icons/Dashboard.js"),require("../../../../icons/customIcons/icons/Expand.js"),require("../../../../icons/customIcons/icons/FolderClosed.js"),require("../../../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../../../icons/customIcons/icons/FolderOpened.js"),require("../../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../../icons/customIcons/icons/Search.js"),require("../../../../icons/customIcons/icons/SearchOne.js"),require("../../../../icons/customIcons/icons/Wellhub.js"),require("../../../../icons/customIcons/icons/MultiRuler.js"),require("../../../../icons/customIcons/icons/Checkbox.js"),require("../../../../icons/customIcons/icons/CheckboxChecked.js"),require("../../../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../../../icons/customIcons/icons/Radio.js"),require("../../../../icons/customIcons/icons/RadioChecked.js"),require("../../../../icons/customIcons/icons/SimulFrac.js"),require("../../../../icons/customIcons/icons/ZipperFrac.js"),require("../../../../icons/customIcons/icons/CautionFilled.js"),require("../../../../icons/customIcons/icons/InfoRounded.js"),require("../../../../icons/customIcons/icons/FlameFilled.js"),require("../../../../icons/customIcons/icons/MoreApp.js"),require("../../../../icons/customIcons/icons/Pad.js"),require("../../../../icons/customIcons/icons/DrilloutUnit.js"),require("../../../../icons/customIcons/icons/FracFleet.js"),require("../../../../icons/customIcons/icons/Global.js"),require("../../../../icons/customIcons/icons/Program.js"),require("../../../../icons/customIcons/icons/Rig.js"),require("../../../../icons/customIcons/icons/Well.js"),require("../../../../icons/customIcons/icons/Gap.js"),require("../../../../icons/customIcons/icons/Pin.js"),require("../../../../icons/customIcons/icons/PinOne.js"),require("../../../../icons/customIcons/icons/PinOneCrossed.js"),require("../../../../icons/customIcons/icons/CloseOneFilled.js"),require("../../../../icons/customIcons/icons/AttentionFilled.js"),require("../../../../icons/customIcons/icons/CheckOneFilled.js"),require("../../../../icons/customIcons/icons/Archive.js"),require("../../../../icons/customIcons/icons/ArchiveCancel.js"),require("../../../../icons/customIcons/icons/Unarchive.js"),require("../../../../icons/customIcons/icons/Archived.js"),require("../../../../icons/customIcons/icons/InterventionUnit.js"),require("../../../../icons/customIcons/icons/CloudDelete.js"),require("../../../../icons/customIcons/icons/Lasso.js"),require("../../../../icons/customIcons/icons/Radius.js"),require("../../../../icons/customIcons/icons/ErrorOps.js"),require("../../../../icons/customIcons/icons/DataTypeOps.js"),require("../../../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../../../icons/customIcons/icons/CalibrationOps.js"),require("../../../../icons/customIcons/icons/CriticalOps.js"),require("../../../../icons/customIcons/icons/Company.js"),require("../../../../icons/customIcons/icons/ArchiveOne.js"),require("../../../../icons/customIcons/icons/ParseBotFusion.js"),require("../../../../icons/customIcons/icons/Connect.js"),require("../../../../icons/customIcons/icons/PuzzleOne.js"),require("../../../../icons/customIcons/icons/Feed.js"),require("../../../../icons/customIcons/icons/Prompt.js"),require("../../../../icons/customIcons/icons/Companies.js"),require("../../../../icons/customIcons/icons/ClipboardAi.js"),require("../../../../icons/customIcons/icons/Key.js"),require("../../../../icons/customIcons/icons/AtSignCrossed.js"),require("../../../../icons/customIcons/icons/MappingManual.js"),require("../../../../icons/customIcons/icons/Mapping.js"),require("../../../../icons/customIcons/icons/Metrics.js"),require("../../../../icons/customIcons/icons/Drops.js"),require("../../../../icons/customIcons/icons/ClipboardSearch.js"),require("../../../../icons/customIcons/icons/Template.js"),require("../../../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../../../icons/customIcons/icons/UnitConversion.js"),require("../../../../icons/customIcons/icons/NPT.js"),require("../../../../icons/customIcons/icons/GuidedFrac.js"),require("../../../../clients/subscriptions/constants.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("querystring"),require("uuid/v1"),require("lodash"),require("../../../../clients/subscriptions.v1.js"),require("../../../../clients/jsonApi/index.js"),require("../../../../clients/subscriptions/subscriptions-client.factory.js"),require("immutable"),require("query-string"),require("../../../../constants/goals.js"),require("../../../../constants/segment.js"),require("../../../../constants/alerts.js"),require("../../../../constants/apps.js"),require("../../../../constants/drillstring.js"),require("../../../../constants/completion.js"),require("../../../../constants/appPackages.js"),require("../../../../constants/notifications.js"),require("../../../../constants/feed.js"),require("../../../../constants/bha.js"),require("../../../../constants/corvaCompanyId.js"),require("../../../../components/GradientManager/configuration/constants.js"),require("../../../../utils/index.js"),require("uuid"),require("jsona"),require("../../../../utils/env.js"),require("../../../../components/StatusBadge/constants.js"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../../../../clients/api/apiCore.js"),require("../../../../clients/constants.js"),require("../../../../clients/sso/auth0.js"),require("../../../../clients/sso/oauth2.js"),require("../../../../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../../../../constants/streamSourceType.js");var C=require("../../../../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),f=require("../../../../utils/mobileDetect.js"),b=require("react/jsx-runtime");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=h(e),A=h(s),g=h(n),v=h(o),M=h(r);function y(e,s){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);s&&(o=o.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.push.apply(n,o)}return n}function O(e){for(var s=1;s<arguments.length;s++){var n=null!=arguments[s]?arguments[s]:{};s%2?y(Object(n),!0).forEach((function(s){A.default(e,s,n[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))}))}return e}var S=function(e){return!!e&&"object"===v.default(e)&&"title"in e};exports.Actions=function(e){var s=e.additionalActions,n=e.showComments,o=e.disableSettings,r=e.hideSettingsUnderMore,h=a.useAppCommonsInternal(),A=h.maximized,v=h.setMaximized,y=h.appSettingsComponent,k=h.isExpanded,B=h.isBrowserFullscreen,T=h.enterBrowserFullscreen,P=h.exitBrowserFullscreen,F=h.isSeparateWindow,w=h.openSeparateWindow,E=h.closeSeparateWindow,D=h.dashboardMeta,N=!(null==D||!D.isEmbedded),z=C.useAppCommentsMode(),R=C.useSetAppCommentsMode(),W=i.useState(!1),U=g.default(W,2),G=U[0],H=U[1],L=i.useRef(null),_=i.useRef(null),K=i.useState(!0),Z=g.default(K,2),J=Z[0],Q=Z[1],V=i.useState(!1),X=g.default(V,2),Y=X[0],$=X[1],ee=i.useRef(null),se=i.useRef(!1),ne=m.useAppSettingsPanel(),oe=ne.open,ie=ne.isOpen,re=!!y&&!o,ce=i.useCallback((function(){H((function(e){return!e}))}),[]),te=i.useCallback((function(){R((function(e){return!e}))}),[R]),ue=i.useCallback((function(){se.current=!1,$(!1)}),[]),le=i.useCallback((function(){Q(!1),ue(),F?null==E||E():B?null==P||P():v(!A)}),[ue,E,P,B,F,A,v]),ae=F?"Close Separate Window":k?"Restore":"Maximize",me=i.useCallback((function(){ee.current&&(clearTimeout(ee.current),ee.current=null)}),[]),de=i.useCallback((function(){!k&&T&&(me(),ee.current=setTimeout((function(){se.current=!0,$(!0)}),500))}),[me,T,k]);i.useEffect((function(){return me}),[me]);var je=i.useCallback((function(){se.current?se.current=!1:le()}),[le]),pe=i.useCallback((function(){ue(),null==w||w()}),[ue,w]),qe=i.useCallback((function(){ue(),null==T||T()}),[ue,T]);i.useEffect((function(){Q(!0)}),[k]);var Ie=i.useMemo((function(){if(f.isInsideNewMobileApp)return[];var e=function(e){return function(){ce(),null==e||e()}},o=(s||[]).filter(S).map((function(s){return O(O({},s),{},{onClick:e(s.onClick)})})),i={icon:b.jsx(q.MessageIcon,{}),onClick:e(te),title:z?"Close Comments Mode":"Add Comment"},c={title:ae,onClick:e(le),icon:k?b.jsx(q.CollapseIcon,{}):b.jsx(q.ExpandIcon,{})},t={title:"Settings",onClick:e(oe),icon:b.jsx(q.SettingTwoIcon,{})};return[].concat(x.default(o),x.default(n?[i]:[]),x.default(r&&re?[t]:[]),x.default(N?[]:[c]))}),[s,z,r,k,ae,oe,re,n,N,te,le,ce]),Ce=Ie.length>(N?0:1),fe=b.jsx(c.ButtonIcon,{size:"small",type:"tertiaryBg",ref:_,onClick:je,onMouseDown:de,onMouseUp:me,onMouseLeave:me,className:Ce?p.fullscreenButton:void 0,testId:k?j.ActionsTestIds.CollapseButtonTestId:j.ActionsTestIds.ExpandButtonTestId,children:k?b.jsx(q.CollapseIcon,{}):b.jsx(q.ExpandIcon,{})}),be=J?b.jsx(t.Tooltip,{title:ae,children:fe}):fe;return b.jsxs(b.Fragment,{children:[b.jsx(d.HideInNativeApp,{children:null==s?void 0:s.map((function(e,s){return S(e)?b.jsx(t.Tooltip,{title:e.title,children:b.jsx(c.ButtonIcon,{size:"small",type:"tertiary",onClick:e.onClick,className:M.default(p.additionalActionButton),testId:j.ActionsTestIds.AdditionalActionItemTestId,children:e.icon})},s):b.jsx(i.Fragment,{children:e},s)}))}),b.jsx(d.HideInNativeApp,{children:n&&b.jsx(t.Tooltip,{title:z?"Close Comments Mode":"Add Comment",children:b.jsx(c.ButtonIcon,{size:"small",type:z?"secondaryBg":"tertiaryBg",onClick:te,className:Ce?p.commentButton:void 0,testId:z?j.ActionsTestIds.CloseCommentButtonTestId:j.ActionsTestIds.AddMessageButtonTestId,children:z?b.jsx(q.CloseSmallIcon,{}):b.jsx(I.AddMessageCustomIcon,{fill:"currentColor"})})})}),re&&b.jsx(u.SettingsButton,{className:r&&!f.isInsideNewMobileApp?p.settingsHiddenUnderMore:void 0}),b.jsxs(d.HideInNativeApp,{children:[!N&&be,!N&&_.current&&b.jsxs(l.Menu,{anchorEl:_.current,open:Y,onClose:ue,placement:"bottom-end",children:[b.jsx(l.Menu.Item,{onClick:le,testId:j.ActionsTestIds.MaximizeItemTestId,children:"Maximize"}),b.jsx(l.Menu.Item,{onClick:qe,testId:j.ActionsTestIds.BrowserFullscreenItemTestId,children:"Full Screen"}),b.jsx(l.Menu.Item,{onClick:pe,testId:j.ActionsTestIds.SeparateWindowItemTestId,children:"Separate Window"})]})]}),b.jsxs(d.HideInNativeApp,{children:[Ce&&b.jsx(t.Tooltip,{title:"More",children:b.jsx(c.ButtonIcon,{type:G||r&&ie?"secondaryBg":"tertiaryBg",className:p.moreButton,ref:L,testId:j.ActionsTestIds.MoreButtonTestId,onClick:ce,size:"small",children:b.jsx(q.MoreOneIcon,{})})}),Ce&&L.current&&b.jsx(l.Menu,{anchorEl:L.current,open:G,onClose:ce,placement:"bottom-end",children:Ie.map((function(e,s){return b.jsx(l.Menu.Item,{size:"large",prefix:e.icon,onClick:e.onClick,children:e.title},s)}))})]})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),s=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/slicedToArray"),o=require("@babel/runtime/helpers/typeof"),i=require("react"),r=require("classnames"),c=require("../../../ButtonIcon/ButtonIcon.js"),t=require("../../../Tooltip/Tooltip.js"),u=require("../SettingsButton/SettingsButton.js");require("../SettingsButton/SettingsButton.constants.js");var l=require("../../../Menu/Menu.js");require("../../../AppCommonsProvider/AppCommonsProvider.js");var a=require("../../../AppCommonsProvider/AppCommonsContext.js"),m=require("../../../AppPanel/AppPanelsContext.js"),d=require("../../../HideInNativeApp/index.js"),j=require("./Actions.constants.js"),p=require("./Actions.scss.js"),q=require("../../../../icons/iconParkIcons.js"),I=require("../../../../icons/customIcons/icons/AddMessage.js");require("../../../../icons/customIcons/icons/DragOne.js"),require("../../../../icons/customIcons/icons/Attention.js"),require("../../../../icons/customIcons/icons/Collapse.js"),require("../../../../icons/customIcons/icons/Dashboard.js"),require("../../../../icons/customIcons/icons/Expand.js"),require("../../../../icons/customIcons/icons/FolderClosed.js"),require("../../../../icons/customIcons/icons/FolderClosedFilled.js"),require("../../../../icons/customIcons/icons/FolderOpened.js"),require("../../../../icons/customIcons/icons/GreaterOrEqual.js"),require("../../../../icons/customIcons/icons/LessOrEqual.js"),require("../../../../icons/customIcons/icons/Search.js"),require("../../../../icons/customIcons/icons/SearchOne.js"),require("../../../../icons/customIcons/icons/Wellhub.js"),require("../../../../icons/customIcons/icons/MultiRuler.js"),require("../../../../icons/customIcons/icons/Checkbox.js"),require("../../../../icons/customIcons/icons/CheckboxChecked.js"),require("../../../../icons/customIcons/icons/CheckboxIndeterminate.js"),require("../../../../icons/customIcons/icons/Radio.js"),require("../../../../icons/customIcons/icons/RadioChecked.js"),require("../../../../icons/customIcons/icons/SimulFrac.js"),require("../../../../icons/customIcons/icons/ZipperFrac.js"),require("../../../../icons/customIcons/icons/CautionFilled.js"),require("../../../../icons/customIcons/icons/InfoRounded.js"),require("../../../../icons/customIcons/icons/FlameFilled.js"),require("../../../../icons/customIcons/icons/MoreApp.js"),require("../../../../icons/customIcons/icons/Pad.js"),require("../../../../icons/customIcons/icons/DrilloutUnit.js"),require("../../../../icons/customIcons/icons/FracFleet.js"),require("../../../../icons/customIcons/icons/Global.js"),require("../../../../icons/customIcons/icons/Program.js"),require("../../../../icons/customIcons/icons/Rig.js"),require("../../../../icons/customIcons/icons/Well.js"),require("../../../../icons/customIcons/icons/Gap.js"),require("../../../../icons/customIcons/icons/Pin.js"),require("../../../../icons/customIcons/icons/PinOne.js"),require("../../../../icons/customIcons/icons/PinOneCrossed.js"),require("../../../../icons/customIcons/icons/CloseOneFilled.js"),require("../../../../icons/customIcons/icons/AttentionFilled.js"),require("../../../../icons/customIcons/icons/CheckOneFilled.js"),require("../../../../icons/customIcons/icons/Archive.js"),require("../../../../icons/customIcons/icons/ArchiveCancel.js"),require("../../../../icons/customIcons/icons/Unarchive.js"),require("../../../../icons/customIcons/icons/Archived.js"),require("../../../../icons/customIcons/icons/InterventionUnit.js"),require("../../../../icons/customIcons/icons/CloudDelete.js"),require("../../../../icons/customIcons/icons/Lasso.js"),require("../../../../icons/customIcons/icons/Radius.js"),require("../../../../icons/customIcons/icons/ErrorOps.js"),require("../../../../icons/customIcons/icons/DataTypeOps.js"),require("../../../../icons/customIcons/icons/FalsePositiveOps.js"),require("../../../../icons/customIcons/icons/CalibrationOps.js"),require("../../../../icons/customIcons/icons/CriticalOps.js"),require("../../../../icons/customIcons/icons/Company.js"),require("../../../../icons/customIcons/icons/ArchiveOne.js"),require("../../../../icons/customIcons/icons/ParseBotFusion.js"),require("../../../../icons/customIcons/icons/Connect.js"),require("../../../../icons/customIcons/icons/PuzzleOne.js"),require("../../../../icons/customIcons/icons/Feed.js"),require("../../../../icons/customIcons/icons/Prompt.js"),require("../../../../icons/customIcons/icons/Companies.js"),require("../../../../icons/customIcons/icons/ClipboardAi.js"),require("../../../../icons/customIcons/icons/Key.js"),require("../../../../icons/customIcons/icons/AtSignCrossed.js"),require("../../../../icons/customIcons/icons/MappingManual.js"),require("../../../../icons/customIcons/icons/Mapping.js"),require("../../../../icons/customIcons/icons/Metrics.js"),require("../../../../icons/customIcons/icons/Drops.js"),require("../../../../icons/customIcons/icons/ClipboardSearch.js"),require("../../../../icons/customIcons/icons/Template.js"),require("../../../../icons/customIcons/icons/ClipboardMetrics.js"),require("../../../../icons/customIcons/icons/ClipboardBuilder.js"),require("../../../../icons/customIcons/icons/UnitConversion.js"),require("../../../../icons/customIcons/icons/NPT.js"),require("../../../../icons/customIcons/icons/GuidedFrac.js"),require("../../../../clients/subscriptions/constants.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("querystring"),require("uuid/v1"),require("lodash"),require("../../../../clients/subscriptions.v1.js"),require("../../../../clients/jsonApi/index.js"),require("../../../../clients/subscriptions/subscriptions-client.factory.js"),require("immutable"),require("query-string"),require("../../../../constants/goals.js"),require("../../../../constants/segment.js"),require("../../../../constants/alerts.js"),require("../../../../constants/apps.js"),require("../../../../constants/drillstring.js"),require("../../../../constants/completion.js"),require("../../../../constants/appPackages.js"),require("../../../../constants/notifications.js"),require("../../../../constants/feed.js"),require("../../../../constants/bha.js"),require("../../../../constants/corvaCompanyId.js"),require("../../../../components/GradientManager/configuration/constants.js"),require("../../../../utils/index.js"),require("uuid"),require("jsona"),require("../../../../utils/env.js"),require("../../../../components/StatusBadge/constants.js"),require("lodash/set"),require("lodash/get"),require("lodash/unset"),require("moment"),require("../../../../clients/api/apiCore.js"),require("../../../../clients/constants.js"),require("../../../../clients/sso/auth0.js"),require("../../../../clients/sso/oauth2.js"),require("../../../../clients/api/rateLimiter.js"),require("lodash/isEmpty"),require("lodash/sortBy"),require("../../../../constants/streamSourceType.js");var C=require("../../../../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js"),f=require("../../../../utils/mobileDetect.js"),b=require("react/jsx-runtime");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=h(e),A=h(s),g=h(n),v=h(o),M=h(r);function y(e,s){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);s&&(o=o.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),n.push.apply(n,o)}return n}function O(e){for(var s=1;s<arguments.length;s++){var n=null!=arguments[s]?arguments[s]:{};s%2?y(Object(n),!0).forEach((function(s){A.default(e,s,n[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))}))}return e}var S=function(e){return!!e&&"object"===v.default(e)&&"title"in e};exports.Actions=function(e){var s=e.additionalActions,n=e.showComments,o=e.disableSettings,r=e.hideSettingsUnderMore,h=a.useAppCommonsInternal(),A=h.maximized,v=h.setMaximized,y=h.appSettingsComponent,k=h.isExpanded,B=h.isBrowserFullscreen,T=h.enterBrowserFullscreen,P=h.exitBrowserFullscreen,F=h.isSeparateWindow,w=h.openSeparateWindow,E=h.closeSeparateWindow,D=C.useAppCommentsMode(),N=C.useSetAppCommentsMode(),z=i.useState(!1),R=g.default(z,2),W=R[0],U=R[1],G=i.useRef(null),H=i.useRef(null),L=i.useState(!0),_=g.default(L,2),K=_[0],Z=_[1],J=i.useState(!1),Q=g.default(J,2),V=Q[0],X=Q[1],Y=i.useRef(null),$=i.useRef(!1),ee=m.useAppSettingsPanel(),se=ee.open,ne=ee.isOpen,oe=!!y&&!o,ie=i.useCallback((function(){U((function(e){return!e}))}),[]),re=i.useCallback((function(){N((function(e){return!e}))}),[N]),ce=i.useCallback((function(){$.current=!1,X(!1)}),[]),te=i.useCallback((function(){Z(!1),ce(),F?null==E||E():B?null==P||P():v(!A)}),[ce,E,P,B,F,A,v]),ue=F?"Close Separate Window":k?"Restore":"Maximize",le=i.useCallback((function(){Y.current&&(clearTimeout(Y.current),Y.current=null)}),[]),ae=i.useCallback((function(){!k&&T&&(le(),Y.current=setTimeout((function(){$.current=!0,X(!0)}),500))}),[le,T,k]);i.useEffect((function(){return le}),[le]);var me=i.useCallback((function(){$.current?$.current=!1:te()}),[te]),de=i.useCallback((function(){ce(),null==w||w()}),[ce,w]),je=i.useCallback((function(){ce(),null==T||T()}),[ce,T]);i.useEffect((function(){Z(!0)}),[k]);var pe=i.useMemo((function(){if(f.isInsideNewMobileApp)return[];var e=function(e){return function(){ie(),null==e||e()}},o=(s||[]).filter(S).map((function(s){return O(O({},s),{},{onClick:e(s.onClick)})})),i={icon:b.jsx(q.MessageIcon,{}),onClick:e(re),title:D?"Close Comments Mode":"Add Comment"},c={title:ue,onClick:e(te),icon:k?b.jsx(q.CollapseIcon,{}):b.jsx(q.ExpandIcon,{})},t={title:"Settings",onClick:e(se),icon:b.jsx(q.SettingTwoIcon,{})};return[].concat(x.default(o),x.default(n?[i]:[]),x.default(r&&oe?[t]:[]),[c])}),[s,D,r,k,ue,se,oe,n,re,te,ie]),qe=pe.length>1,Ie=b.jsx(c.ButtonIcon,{size:"small",type:"tertiaryBg",ref:H,onClick:me,onMouseDown:ae,onMouseUp:le,onMouseLeave:le,className:qe?p.fullscreenButton:void 0,testId:k?j.ActionsTestIds.CollapseButtonTestId:j.ActionsTestIds.ExpandButtonTestId,children:k?b.jsx(q.CollapseIcon,{}):b.jsx(q.ExpandIcon,{})});return b.jsxs(b.Fragment,{children:[b.jsx(d.HideInNativeApp,{children:null==s?void 0:s.map((function(e,s){return S(e)?b.jsx(t.Tooltip,{title:e.title,children:b.jsx(c.ButtonIcon,{size:"small",type:"tertiary",onClick:e.onClick,className:M.default(p.additionalActionButton),testId:j.ActionsTestIds.AdditionalActionItemTestId,children:e.icon})},s):b.jsx(i.Fragment,{children:e},s)}))}),b.jsx(d.HideInNativeApp,{children:n&&b.jsx(t.Tooltip,{title:D?"Close Comments Mode":"Add Comment",children:b.jsx(c.ButtonIcon,{size:"small",type:D?"secondaryBg":"tertiaryBg",onClick:re,className:qe?p.commentButton:void 0,testId:D?j.ActionsTestIds.CloseCommentButtonTestId:j.ActionsTestIds.AddMessageButtonTestId,children:D?b.jsx(q.CloseSmallIcon,{}):b.jsx(I.AddMessageCustomIcon,{fill:"currentColor"})})})}),oe&&b.jsx(u.SettingsButton,{className:r&&!f.isInsideNewMobileApp?p.settingsHiddenUnderMore:void 0}),b.jsxs(d.HideInNativeApp,{children:[K?b.jsx(t.Tooltip,{title:ue,children:Ie}):Ie,H.current&&b.jsxs(l.Menu,{anchorEl:H.current,open:V,onClose:ce,placement:"bottom-end",children:[b.jsx(l.Menu.Item,{onClick:te,testId:j.ActionsTestIds.MaximizeItemTestId,children:"Maximize"}),b.jsx(l.Menu.Item,{onClick:je,testId:j.ActionsTestIds.BrowserFullscreenItemTestId,children:"Full Screen"}),b.jsx(l.Menu.Item,{onClick:de,testId:j.ActionsTestIds.SeparateWindowItemTestId,children:"Separate Window"})]})]}),b.jsxs(d.HideInNativeApp,{children:[qe&&b.jsx(t.Tooltip,{title:"More",children:b.jsx(c.ButtonIcon,{type:W||r&&ne?"secondaryBg":"tertiaryBg",className:p.moreButton,ref:G,onClick:ie,size:"small",children:b.jsx(q.MoreOneIcon,{})})}),qe&&G.current&&b.jsx(l.Menu,{anchorEl:G.current,open:W,onClose:ie,placement:"bottom-end",children:pe.map((function(e,s){return b.jsx(l.Menu.Item,{size:"large",prefix:e.icon,onClick:e.onClick,children:e.title},s)}))})]})]})};
2
2
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.js","sources":["../../../../../../src/componentsV2/AppHeader/V3/Actions/Actions.tsx"],"sourcesContent":["import { Fragment, useCallback, useEffect, useMemo, useRef, useState } 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 { useAppSettingsPanel } from '../../../AppPanel/AppPanelsContext';\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, useSetAppCommentsMode } from '~/effects';\nimport { isInsideNewMobileApp } from '~/utils/mobileDetect';\n\ntype ActionsProps = {\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 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 dashboardMeta,\n } = useAppCommonsInternal();\n const isEmbedded = !!dashboardMeta?.isEmbedded;\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 [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 { open, isOpen } = useAppSettingsPanel();\n const settingsVisible = !!appSettingsComponent && !disableSettings;\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 ...(!isEmbedded ? [maximizeItem] : []),\n ];\n }, [\n additionalActions,\n commentsEnabled,\n hideSettingsUnderMore,\n isExpanded,\n maximizeTooltip,\n open,\n settingsVisible,\n showComments,\n isEmbedded,\n toggleCommentsMode,\n toggleMaximized,\n toggleMoreMenu,\n ]);\n\n // Maximization is already available as a button.\n const hasMenu = menuActionItems.length > (isEmbedded ? 0 : 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 // Hide the tooltip during maximization changes to avoid fullscreen positioning issues.\n const maximizeWithTooltip = showMaximizeTooltip ? (\n <Tooltip title={maximizeTooltip}>{maximizeButton}</Tooltip>\n ) : (\n maximizeButton\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 className={\n hideSettingsUnderMore && !isInsideNewMobileApp\n ? styles.settingsHiddenUnderMore\n : undefined\n }\n />\n )}\n\n <HideInNativeApp>\n {!isEmbedded && maximizeWithTooltip}\n\n {!isEmbedded && 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 && isOpen) ? 'secondaryBg' : 'tertiaryBg'\n }\n className={styles.moreButton}\n ref={moreButtonRef}\n testId={ActionsTestIds.MoreButtonTestId}\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 );\n};\n"],"names":["isActionObject","action","_typeof","_ref","additionalActions","showComments","disableSettings","hideSettingsUnderMore","_useAppCommonsInterna","useAppCommonsInternal","maximized","setMaximized","appSettingsComponent","isExpanded","isBrowserFullscreen","enterBrowserFullscreen","exitBrowserFullscreen","isSeparateWindow","openSeparateWindow","closeSeparateWindow","dashboardMeta","isEmbedded","commentsEnabled","useAppCommentsMode","setCommentsMode","useSetAppCommentsMode","useState","_useState2","_slicedToArray","_useState","moreMenuOpen","setMoreMenuOpen","moreButtonRef","useRef","maximizeButtonRef","_useState4","_useState3","showMaximizeTooltip","setShowMaximizeTooltip","_useState6","_useState5","isModesMenuOpen","setIsModesMenuOpen","longPressTimerRef","isLongPressRef","_useAppSettingsPanel","useAppSettingsPanel","open","isOpen","settingsVisible","toggleMoreMenu","useCallback","value","toggleCommentsMode","closeModesMenu","current","toggleMaximized","maximizeTooltip","cancelLongPress","clearTimeout","handleMaximizeMouseDown","setTimeout","useEffect","handleMaximizeClick","handleSeparateWindowClick","handleBrowserFullscreenClick","menuActionItems","useMemo","isInsideNewMobileApp","getOnClick","handler","objectActions","filter","map","item","_objectSpread","onClick","commentItem","icon","_jsx","MessageIcon","title","maximizeItem","CollapseIcon","ExpandIcon","settingsItem","SettingTwoIcon","_toConsumableArray","hasMenu","length","maximizeButton","jsx","ButtonIcon","size","type","ref","onMouseDown","onMouseUp","onMouseLeave","className","styles","fullscreenButton","undefined","testId","ActionsTestIds","CollapseButtonTestId","ExpandButtonTestId","children","maximizeWithTooltip","Tooltip","_jsxs","_Fragment","HideInNativeApp","index","classNames","additionalActionButton","AdditionalActionItemTestId","Fragment","commentButton","CloseCommentButtonTestId","AddMessageButtonTestId","CloseSmallIcon","AddMessageCustomIcon","fill","SettingsButton","settingsHiddenUnderMore","Menu","anchorEl","onClose","placement","Item","MaximizeItemTestId","BrowserFullscreenItemTestId","SeparateWindowItemTestId","moreButton","MoreButtonTestId","MoreOneIcon","prefix"],"mappings":"6uPAmCA,IAAMA,EAAiB,SAACC,GAAwB,QAC5CA,GAA4B,WAAlBC,EAAA,QAAOD,IAAuB,UAAWA,CAAM,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,EAAcA,eAAC+B,iBACvB3D,QAAS1B,GACT2C,KAAK,QAAOc,SAEZ5B,EAAAA,IAACyD,EAAWA,YAAA,QAKjBhD,IAAWxD,EAAcuB,SACxBwB,EAAAA,IAAC+C,EAAAA,KAAI,CACHC,SAAU/F,EAAcuB,QACxBR,KAAMjB,EACNkG,QAAS9E,GACT+E,UAAU,aAAYtB,SAErBzC,GAAgBO,KAAI,SAACC,EAAMuC,GAAK,OAC/BlC,EAAAY,IAACmC,EAAIA,KAACI,KAAI,CAACrC,KAAK,QAAQ4C,OAAQ/D,EAAKI,KAAkBF,QAASF,EAAKE,QAAQ+B,SAC1EjC,EAAKO,OADwCgC,aAS9D"}
1
+ {"version":3,"file":"Actions.js","sources":["../../../../../../src/componentsV2/AppHeader/V3/Actions/Actions.tsx"],"sourcesContent":["import { Fragment, useCallback, useEffect, useMemo, useRef, useState } 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 { useAppSettingsPanel } from '../../../AppPanel/AppPanelsContext';\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, useSetAppCommentsMode } from '~/effects';\nimport { isInsideNewMobileApp } from '~/utils/mobileDetect';\n\ntype ActionsProps = {\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 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 [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 { open, isOpen } = useAppSettingsPanel();\n const settingsVisible = !!appSettingsComponent && !disableSettings;\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 // 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 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 && isOpen) ? 'secondaryBg' : '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 );\n};\n"],"names":["isActionObject","action","_typeof","_ref","additionalActions","showComments","disableSettings","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","_useState4","_useState3","showMaximizeTooltip","setShowMaximizeTooltip","_useState6","_useState5","isModesMenuOpen","setIsModesMenuOpen","longPressTimerRef","isLongPressRef","_useAppSettingsPanel","useAppSettingsPanel","open","isOpen","settingsVisible","toggleMoreMenu","useCallback","value","toggleCommentsMode","closeModesMenu","current","toggleMaximized","maximizeTooltip","cancelLongPress","clearTimeout","handleMaximizeMouseDown","setTimeout","useEffect","handleMaximizeClick","handleSeparateWindowClick","handleBrowserFullscreenClick","menuActionItems","useMemo","isInsideNewMobileApp","getOnClick","handler","objectActions","filter","map","item","_objectSpread","onClick","commentItem","icon","_jsx","MessageIcon","title","maximizeItem","CollapseIcon","ExpandIcon","settingsItem","SettingTwoIcon","_toConsumableArray","hasMenu","length","maximizeButton","jsx","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"],"mappings":"6uPAmCA,IAAMA,EAAiB,SAACC,GAAwB,QAC5CA,GAA4B,WAAlBC,EAAA,QAAOD,IAAuB,UAAWA,CAAM,kBAItC,SAKHE,GAAA,IAJlBC,IAAAA,kBACAC,IAAAA,aACAC,IAAAA,gBACAC,IAAAA,sBAEAC,EAWIC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AK,OAC/BhC,EAAAY,IAACkC,EAAIA,KAACI,KAAI,CAACpC,KAAK,QAAQ0C,OAAQ7D,EAAKI,KAAkBF,QAASF,EAAKE,QAAQ+B,SAC1EjC,EAAKO,OADwC8B,aAS9D"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("react"),s=require("classnames"),i=require("lodash"),l=require("../../../constants/segment.js"),n=require("../../../utils/devcenter.js"),o=require("../../PadModeSelect/PadModeSelect.js");require("../../PadModeSelect/PadModeSelect.constants.js");var r=require("../AppHeader.constants.js");require("../../AppCommonsProvider/AppCommonsProvider.js");var d=require("../../AppCommonsProvider/AppCommonsContext.js"),a=require("../../HideInNativeApp/index.js"),u=require("../../utils.js"),c=require("./VersionSelect/VersionSelect.js"),p=require("./AssetChips/AssetChips.js"),v=require("./AppTitle/AppTitle.js");require("./AppTitle/AppTitle.constants.js");var f=require("./useResponsivity.js"),j=require("./Actions/Actions.js");require("./Actions/Actions.constants.js");var m=require("./AppHeaderV3.scss.js"),A=require("react/jsx-runtime");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var C=h(e),y=h(s);function b(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function g(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?b(Object(s),!0).forEach((function(t){C.default(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):b(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}exports.AppHeaderV3=function(e){var s,h,C,b,q,x,I,S,M,P,N,O,R,L,w,T,H=e.elementsClassNames,E=e.className,D=e.testId,U=e.logo,V=e.additionalControls,W=e.title,k=e.padModeDisabled,F=e.padModeWells,B=e.dqData,_=e.asset,G=e.lastUpdate,z=e.additionalActions,J=e.showComments,K=e.titleControls,Q=e.disableSettings,X=e.showAssetChips,Y=e.disableAssetSelector,Z=e.titleMenuActions,$=e.titleControlsPosition,ee=void 0===$?"right":$,te=e.responsivenessConfig,se=t.useRef(null),ie=d.useAppCommonsInternal(),le=ie.app,ne=ie.appName,oe=ie.well,re=ie.wells,de=ie.rig,ae=ie.fracFleet,ue=ie.interventionUnit,ce=ie.isExpanded,pe=ie.setSeparateWindowTitle,ve=ie.isInsideNewMobileApp,fe=ie.disableAppAssetSelection,je=ie.isMultiRig,me=ie.dashboardMeta,Ae=!(null==me||!me.isEmbedded),he=F||re,Ce=n.getAppSegment(le)===l.SEGMENTS.COMPLETION&&!oe,ye=!i.isEmpty(he)&&!!ae,be=fe||je,ge=!(Ae||fe||k||ve)&&Ce&&ye,qe=U?"ultranarrow":ge||V||K?"narrow":void 0,xe="left"===ee&&!!K,Ie=t.useRef(null),Se=t.useRef(null),Me=t.useRef(null),Pe=t.useRef(null),Ne=t.useRef(null),Oe=t.useRef(null),Re=t.useRef(null),Le=null!==(s=null!==(h=null!==(C=null==oe?void 0:oe.name)&&void 0!==C?C:null==de?void 0:de.name)&&void 0!==h?h:null==ae?void 0:ae.name)&&void 0!==s?s:null==ue?void 0:ue.name;t.useEffect((function(){null==pe||pe([ne,Le].filter(Boolean).join(" - "))}),[pe,ne,Le]);var we=f.useResponsivity({disabled:ve||Ae,titleControlsLeft:xe,rootRef:se,versionRef:Ie,additionalControlsRef:Me,titleControlsRef:Pe,logoRef:Oe,padModeRef:Se,chipsRef:Ne,actionsRef:Re});return A.jsxs("div",g(g({className:y.default(m.root,Ae&&m.embedded,E),"data-testid":D,ref:se,style:null===(b=we.root)||void 0===b?void 0:b.style},u.AppHeaderFinderProps),{},{children:[!Ae&&A.jsxs(A.Fragment,{children:[A.jsx("div",{className:y.default(m.logoContainer,null==H?void 0:H.logoContainer),ref:Oe,children:U&&"string"==typeof U?A.jsx("img",{className:m.logo,src:U,alt:"Logo"}):U}),A.jsx(v.AppTitle,{title:ce&&null!=Le?Le:W,asset:_,dqData:B,lastUpdate:G,className:y.default(m.title,xe&&m.titleWithControlsLeft,null==H?void 0:H.title),disableAssetSelector:Y,titleMenuActions:Z,style:null===(q=we.title)||void 0===q?void 0:q.style})]}),K&&A.jsx("div",{className:y.default(m.titleControls,xe&&m.titleControlsLeft,(null===(x=we.titleControls)||void 0===x?void 0:x.lastInLine)&&m.lastInLine,null==H?void 0:H.titleControls),ref:Pe,style:null===(I=we.titleControls)||void 0===I?void 0:I.style,children:K}),A.jsx(a.HideInNativeApp,{children:A.jsx("div",{className:m.version,ref:Ie,children:A.jsx(c.VersionSelect,{className:null==H?void 0:H.versionSelect})})}),ge&&A.jsx("div",{className:y.default(m.padMode,(null===(S=we.padMode)||void 0===S?void 0:S.lastInLine)&&m.lastInLine),ref:Se,style:null===(M=we.padMode)||void 0===M?void 0:M.style,children:A.jsx(o.PadModeSelect,{testId:r.AppHeaderTestIds.PadModeSelectTestId})}),V&&A.jsx("div",{className:y.default(m.additionalControls,(null===(P=we.additionalControls)||void 0===P?void 0:P.lastInLine)&&m.lastInLine,null==H?void 0:H.additionalControls),ref:Me,style:null===(N=we.additionalControls)||void 0===N?void 0:N.style,"data-testid":r.AppHeaderTestIds.AdditionalControlsTestId,children:V}),!Ae&&!be&&X&&A.jsx(a.HideInNativeApp,{children:A.jsx("div",{className:y.default(m.assetChips,(null===(O=we.chips)||void 0===O?void 0:O.lastInLine)&&m.lastInLine,null==H?void 0:H.chips),ref:Ne,style:null===(R=we.chips)||void 0===R?void 0:R.style,children:A.jsx(p.AssetChips,{chipsWidth:qe})})}),A.jsx("div",{className:y.default(m.actions,(null===(L=we.actions)||void 0===L?void 0:L.lastInLine)&&m.lastInLine,null==H?void 0:H.actions),ref:Re,style:null===(w=we.actions)||void 0===w?void 0:w.style,"data-testid":r.AppHeaderTestIds.ActionsRootTestId,children:A.jsx(j.Actions,{additionalActions:z,showComments:J,disableSettings:Q,hideSettingsUnderMore:null==te?void 0:te.hideSettingsUnderMore})}),null===(T=we.linebreaks)||void 0===T?void 0:T.map((function(e,t){return A.jsx("div",{className:m.responsivenessLineBreak,style:e},t)}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("react"),s=require("classnames"),i=require("lodash"),l=require("../../../constants/segment.js"),n=require("../../../utils/devcenter.js"),o=require("../../PadModeSelect/PadModeSelect.js");require("../../PadModeSelect/PadModeSelect.constants.js");var r=require("../AppHeader.constants.js");require("../../AppCommonsProvider/AppCommonsProvider.js");var d=require("../../AppCommonsProvider/AppCommonsContext.js"),a=require("../../HideInNativeApp/index.js"),u=require("../../utils.js"),p=require("./VersionSelect/VersionSelect.js"),c=require("./AssetChips/AssetChips.js"),v=require("./AppTitle/AppTitle.js");require("./AppTitle/AppTitle.constants.js");var f=require("./useResponsivity.js"),j=require("./Actions/Actions.js");require("./Actions/Actions.constants.js");var m=require("./AppHeaderV3.scss.js"),A=require("react/jsx-runtime");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=C(e),y=C(s);function b(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function g(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?b(Object(s),!0).forEach((function(t){h.default(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):b(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}exports.AppHeaderV3=function(e){var s,C,h,b,q,I,x,S,P,M,N,O,R,L,w,T,H=e.elementsClassNames,E=e.className,D=e.testId,U=e.logo,V=e.additionalControls,W=e.title,k=e.padModeDisabled,B=e.padModeWells,F=e.dqData,_=e.asset,G=e.lastUpdate,z=e.additionalActions,J=e.showComments,K=e.titleControls,Q=e.disableSettings,X=e.showAssetChips,Y=e.disableAssetSelector,Z=e.titleMenuActions,$=e.titleControlsPosition,ee=void 0===$?"right":$,te=e.responsivenessConfig,se=t.useRef(null),ie=d.useAppCommonsInternal(),le=ie.app,ne=ie.appName,oe=ie.well,re=ie.wells,de=ie.rig,ae=ie.fracFleet,ue=ie.interventionUnit,pe=ie.isExpanded,ce=ie.setSeparateWindowTitle,ve=ie.isInsideNewMobileApp,fe=ie.disableAppAssetSelection,je=ie.isMultiRig,me=B||re,Ae=n.getAppSegment(le)===l.SEGMENTS.COMPLETION&&!oe,Ce=!i.isEmpty(me)&&!!ae,he=fe||je,ye=!fe&&!k&&!ve&&Ae&&Ce,be=U?"ultranarrow":ye||V||K?"narrow":void 0,ge="left"===ee&&!!K,qe=t.useRef(null),Ie=t.useRef(null),xe=t.useRef(null),Se=t.useRef(null),Pe=t.useRef(null),Me=t.useRef(null),Ne=t.useRef(null),Oe=null!==(s=null!==(C=null!==(h=null==oe?void 0:oe.name)&&void 0!==h?h:null==de?void 0:de.name)&&void 0!==C?C:null==ae?void 0:ae.name)&&void 0!==s?s:null==ue?void 0:ue.name;t.useEffect((function(){null==ce||ce([ne,Oe].filter(Boolean).join(" - "))}),[ce,ne,Oe]);var Re=f.useResponsivity({disabled:ve,titleControlsLeft:ge,rootRef:se,versionRef:qe,additionalControlsRef:xe,titleControlsRef:Se,logoRef:Me,padModeRef:Ie,chipsRef:Pe,actionsRef:Ne});return A.jsxs("div",g(g({className:y.default(m.root,E),"data-testid":D,ref:se,style:null===(b=Re.root)||void 0===b?void 0:b.style},u.AppHeaderFinderProps),{},{children:[A.jsx("div",{className:y.default(m.logoContainer,null==H?void 0:H.logoContainer),ref:Me,children:U&&"string"==typeof U?A.jsx("img",{className:m.logo,src:U,alt:"Logo"}):U}),A.jsx(v.AppTitle,{title:pe&&null!=Oe?Oe:W,asset:_,dqData:F,lastUpdate:G,className:y.default(m.title,ge&&m.titleWithControlsLeft,null==H?void 0:H.title),disableAssetSelector:Y,titleMenuActions:Z,style:null===(q=Re.title)||void 0===q?void 0:q.style}),K&&A.jsx("div",{className:y.default(m.titleControls,ge&&m.titleControlsLeft,(null===(I=Re.titleControls)||void 0===I?void 0:I.lastInLine)&&m.lastInLine,null==H?void 0:H.titleControls),ref:Se,style:null===(x=Re.titleControls)||void 0===x?void 0:x.style,children:K}),A.jsx(a.HideInNativeApp,{children:A.jsx("div",{className:m.version,ref:qe,children:A.jsx(p.VersionSelect,{className:null==H?void 0:H.versionSelect})})}),ye&&A.jsx("div",{className:y.default(m.padMode,(null===(S=Re.padMode)||void 0===S?void 0:S.lastInLine)&&m.lastInLine),ref:Ie,style:null===(P=Re.padMode)||void 0===P?void 0:P.style,children:A.jsx(o.PadModeSelect,{testId:r.AppHeaderTestIds.PadModeSelectTestId})}),V&&A.jsx("div",{className:y.default(m.additionalControls,(null===(M=Re.additionalControls)||void 0===M?void 0:M.lastInLine)&&m.lastInLine,null==H?void 0:H.additionalControls),ref:xe,style:null===(N=Re.additionalControls)||void 0===N?void 0:N.style,"data-testid":r.AppHeaderTestIds.AdditionalControlsTestId,children:V}),!he&&X&&A.jsx(a.HideInNativeApp,{children:A.jsx("div",{className:y.default(m.assetChips,(null===(O=Re.chips)||void 0===O?void 0:O.lastInLine)&&m.lastInLine,null==H?void 0:H.chips),ref:Pe,style:null===(R=Re.chips)||void 0===R?void 0:R.style,children:A.jsx(c.AssetChips,{chipsWidth:be})})}),A.jsx("div",{className:y.default(m.actions,(null===(L=Re.actions)||void 0===L?void 0:L.lastInLine)&&m.lastInLine,null==H?void 0:H.actions),ref:Ne,style:null===(w=Re.actions)||void 0===w?void 0:w.style,"data-testid":r.AppHeaderTestIds.ActionsRootTestId,children:A.jsx(j.Actions,{additionalActions:z,showComments:J,disableSettings:Q,hideSettingsUnderMore:null==te?void 0:te.hideSettingsUnderMore})}),null===(T=Re.linebreaks)||void 0===T?void 0:T.map((function(e,t){return A.jsx("div",{className:m.responsivenessLineBreak,style:e},t)}))]}))};
2
2
  //# sourceMappingURL=AppHeaderV3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppHeaderV3.js","sources":["../../../../../src/componentsV2/AppHeader/V3/AppHeaderV3.tsx"],"sourcesContent":["import { FC, ReactElement, ReactNode, useEffect, useRef } 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 dashboardMeta,\n } = useAppCommonsInternal();\n\n const isEmbedded = !!dashboardMeta?.isEmbedded;\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 =\n !isEmbedded && !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 || isEmbedded,\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, isEmbedded && styles.embedded, className)}\n data-testid={testId}\n ref={rootRef}\n style={responsivity.root?.style}\n {...AppHeaderFinderProps}\n >\n {!isEmbedded && (\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 )}\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 {!isEmbedded && !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 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":["_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","dashboardMeta","isEmbedded","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","embedded","ref","style","AppHeaderFinderProps","children","_Fragment","_jsx","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":"ynDAyEiD,SAqB3CA,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,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,qBACAC,IAAAA,iBAAgBC,EAAAnC,EAChBoC,sBAAAA,cAAwB,QAAOD,EAC/BE,KAAAA,qBAEMC,GAAUC,SAAuB,MACvCC,GAcIC,EAAAA,wBAbFC,MAAAA,IACAC,MAAAA,QACAC,MAAAA,KACOC,MAAPC,MACAC,MAAAA,IACAC,MAAAA,UACAC,MAAAA,iBACAC,MAAAA,WACAC,MAAAA,uBACAC,MAAAA,qBACAC,MAAAA,yBACAC,MAAAA,WACAC,MA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AsBiF,0BAIzB,QAFlBtG,EAELiE,GAAasC,kBAAU,IAAAvG,OAAA,EAAvBA,EAAyBwG,KAAI,SAACC,EAAKC,GAAK,OACvC3B,EAAAA,IAAA,MAAA,CAAK7E,UAAWqE,EAAOoC,wBAAyBhC,MAAO8B,GAAUC,EAAS,OAIlF"}
1
+ {"version":3,"file":"AppHeaderV3.js","sources":["../../../../../src/componentsV2/AppHeader/V3/AppHeaderV3.tsx"],"sourcesContent":["import { FC, ReactElement, ReactNode, useEffect, useRef } 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 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":["_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","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":"ynDAyEiD,SAqB3CA,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,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,qBACAC,IAAAA,iBAAgBC,EAAAnC,EAChBoC,sBAAAA,cAAwB,QAAOD,EAC/BE,KAAAA,qBAEMC,GAAUC,SAAuB,MACvCC,GAaIC,EAAAA,wBAZFC,MAAAA,IACAC,MAAAA,QACAC,MAAAA,KACOC,MAAPC,MACAC,MAAAA,IACAC,MAAAA,UACAC,MAAAA,iBACAC,MAAAA,WACAC,MAAAA,uBACAC,MAAAA,qBACAC,MAAAA,yBACAC,MAAAA,WAIIR,GAAQtB,GAAgBqB,GACxBU,GAFUC,gBAAcd,MAEUe,EAAQA,SAACC,aAAed,GAC1De,IAAoB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1
- "use strict";require('./../../../ext-esm/style-inject/dist/style-inject.es.js')(".AppHeaderV3_root__urLNv{--headerV3-responsivity-flexwrap:wrap;align-items:center;display:flex;flex-direction:row;flex-wrap:var(--headerV3-responsivity-flexwrap);gap:0 8px;min-height:48px;overflow:hidden;padding:6px 0;width:100%}.AppHeaderV3_logoContainer__Bv-lU{max-height:36px;max-width:130px;overflow:hidden}.AppHeaderV3_logo__0VO16{display:block;max-height:36px;max-width:100%}.AppHeaderV3_title__vVZB9{flex:1 0 90px;min-width:90px}.AppHeaderV3_titleWithControlsLeft__Mnnkm{--headerV3-responsivity-marginRight:auto;--headerV3-responsivity-maxWidth:100%;flex:0 1 auto;margin-right:var(--headerV3-responsivity-marginRight);max-width:var(--headerV3-responsivity-maxWidth);min-width:1px}.AppHeaderV3_additionalControls__-QrO4,.AppHeaderV3_assetChips__4LwGe,.AppHeaderV3_logoContainer__Bv-lU,.AppHeaderV3_padMode__-uTzy,.AppHeaderV3_titleControls__Yzl06,.AppHeaderV3_version__Acke3{align-items:center;display:flex;flex-flow:row nowrap;flex-shrink:0;gap:8px;min-height:36px;order:var(--headerV3-responsivity-order)}.AppHeaderV3_additionalControls__-QrO4:empty,.AppHeaderV3_assetChips__4LwGe:empty,.AppHeaderV3_logoContainer__Bv-lU:empty,.AppHeaderV3_padMode__-uTzy:empty,.AppHeaderV3_titleControls__Yzl06:empty,.AppHeaderV3_version__Acke3:empty{display:none}.AppHeaderV3_titleControlsLeft__NrIwI{margin-right:auto}.AppHeaderV3_actions__Q0PRr{align-items:center;display:flex;flex:0 0 auto;flex-flow:row nowrap;gap:8px;min-height:36px;order:var(--headerV3-responsivity-order)}.AppHeaderV3_responsivenessLineBreak__2QL6d{flex:0 0 100%}.AppHeaderV3_lastInLine__cbmHb{margin-left:auto}.AppHeaderV3_embedded__2p-8Z{gap:8px;min-height:32px;overflow:visible;padding:0}.AppHeaderV3_embedded__2p-8Z .AppHeaderV3_titleControls__Yzl06{flex:1 1 auto;flex-wrap:wrap;min-width:0}.AppHeaderV3_embedded__2p-8Z .AppHeaderV3_actions__Q0PRr,.AppHeaderV3_embedded__2p-8Z .AppHeaderV3_additionalControls__-QrO4,.AppHeaderV3_embedded__2p-8Z .AppHeaderV3_titleControls__Yzl06,.AppHeaderV3_embedded__2p-8Z .AppHeaderV3_version__Acke3{min-height:32px;order:0}.AppHeaderV3_embedded__2p-8Z .AppHeaderV3_version__Acke3{margin-left:auto}.AppHeaderV3_embedded__2p-8Z .AppHeaderV3_actions__Q0PRr{flex-wrap:wrap}"),module.exports={spacing:"8",gap:"8px",titleMinWidth:"90px",root:"AppHeaderV3_root__urLNv",logoContainer:"AppHeaderV3_logoContainer__Bv-lU",logo:"AppHeaderV3_logo__0VO16",title:"AppHeaderV3_title__vVZB9",titleWithControlsLeft:"AppHeaderV3_titleWithControlsLeft__Mnnkm",additionalControls:"AppHeaderV3_additionalControls__-QrO4",titleControls:"AppHeaderV3_titleControls__Yzl06",assetChips:"AppHeaderV3_assetChips__4LwGe",padMode:"AppHeaderV3_padMode__-uTzy",version:"AppHeaderV3_version__Acke3",titleControlsLeft:"AppHeaderV3_titleControlsLeft__NrIwI",actions:"AppHeaderV3_actions__Q0PRr",responsivenessLineBreak:"AppHeaderV3_responsivenessLineBreak__2QL6d",lastInLine:"AppHeaderV3_lastInLine__cbmHb",embedded:"AppHeaderV3_embedded__2p-8Z"};
1
+ "use strict";require('./../../../ext-esm/style-inject/dist/style-inject.es.js')(".AppHeaderV3_root__urLNv{--headerV3-responsivity-flexwrap:wrap;align-items:center;display:flex;flex-direction:row;flex-wrap:var(--headerV3-responsivity-flexwrap);gap:0 8px;min-height:48px;overflow:hidden;padding:6px 0;width:100%}.AppHeaderV3_logoContainer__Bv-lU{max-height:36px;max-width:130px;overflow:hidden}.AppHeaderV3_logo__0VO16{display:block;max-height:36px;max-width:100%}.AppHeaderV3_title__vVZB9{flex:1 0 90px;min-width:90px}.AppHeaderV3_titleWithControlsLeft__Mnnkm{--headerV3-responsivity-marginRight:auto;--headerV3-responsivity-maxWidth:100%;flex:0 1 auto;margin-right:var(--headerV3-responsivity-marginRight);max-width:var(--headerV3-responsivity-maxWidth);min-width:1px}.AppHeaderV3_additionalControls__-QrO4,.AppHeaderV3_assetChips__4LwGe,.AppHeaderV3_logoContainer__Bv-lU,.AppHeaderV3_padMode__-uTzy,.AppHeaderV3_titleControls__Yzl06,.AppHeaderV3_version__Acke3{align-items:center;display:flex;flex-flow:row nowrap;flex-shrink:0;gap:8px;min-height:36px;order:var(--headerV3-responsivity-order)}.AppHeaderV3_additionalControls__-QrO4:empty,.AppHeaderV3_assetChips__4LwGe:empty,.AppHeaderV3_logoContainer__Bv-lU:empty,.AppHeaderV3_padMode__-uTzy:empty,.AppHeaderV3_titleControls__Yzl06:empty,.AppHeaderV3_version__Acke3:empty{display:none}.AppHeaderV3_titleControlsLeft__NrIwI{margin-right:auto}.AppHeaderV3_actions__Q0PRr{align-items:center;display:flex;flex:0 0 auto;flex-flow:row nowrap;gap:8px;min-height:36px;order:var(--headerV3-responsivity-order)}.AppHeaderV3_responsivenessLineBreak__2QL6d{flex:0 0 100%}.AppHeaderV3_lastInLine__cbmHb{margin-left:auto}"),module.exports={spacing:"8",gap:"8px",titleMinWidth:"90px",root:"AppHeaderV3_root__urLNv",logoContainer:"AppHeaderV3_logoContainer__Bv-lU",logo:"AppHeaderV3_logo__0VO16",title:"AppHeaderV3_title__vVZB9",titleWithControlsLeft:"AppHeaderV3_titleWithControlsLeft__Mnnkm",additionalControls:"AppHeaderV3_additionalControls__-QrO4",titleControls:"AppHeaderV3_titleControls__Yzl06",assetChips:"AppHeaderV3_assetChips__4LwGe",padMode:"AppHeaderV3_padMode__-uTzy",version:"AppHeaderV3_version__Acke3",titleControlsLeft:"AppHeaderV3_titleControlsLeft__NrIwI",actions:"AppHeaderV3_actions__Q0PRr",responsivenessLineBreak:"AppHeaderV3_responsivenessLineBreak__2QL6d",lastInLine:"AppHeaderV3_lastInLine__cbmHb"};
2
2
  //# sourceMappingURL=AppHeaderV3.scss.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),n=require("lodash"),o=require("./constants.scss.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(e),l=i(r);function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){s.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var c=parseInt(o.gap,10),u=parseInt(o.titleMinWidth,10)+c,y=function(e){var r;return(null===(r=e.current)||void 0===r?void 0:r.getBoundingClientRect().width)||0},f=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];var o=t.filter((function(e){return!!e.current&&e.current.offsetWidth>0}));return e+o.reduce((function(e,r){return e+y(r)}),0)+(o.length>1?(o.length-1)*c:0)};exports.useResponsivity=function(e){var r=e.disabled,o=e.actionsRef,i=e.chipsRef,s=e.logoRef,a=e.rootRef,y=e.titleControlsRef,p=e.additionalControlsRef,v=e.versionRef,h=e.padModeRef,b=e.titleControlsLeft,O=t.useState({}),g=l.default(O,2),V=g[0],j=g[1],w=t.useRef(-1);return t.useEffect((function(){var e=n.throttle((function(){requestAnimationFrame((function(){var e,r=(null===(e=a.current)||void 0===e?void 0:e.offsetWidth)||0,t=function(e){var t,l=b&&f(u,s,v,i,o,y,p,h)<=r?d(d({},e),{},{root:{style:d(d({},null===(t=e.root)||void 0===t?void 0:t.style),{},{"--headerV3-responsivity-flexwrap":"nowrap"})}}):e;j((function(e){return n.isEqual(e,l)?e:l}))},l=function(){if(b){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=f.apply(void 0,[0].concat(r))+c;return{"--headerV3-responsivity-maxWidth":"calc(100% - ".concat(n,"px)")}}};f(u,s,v,i,o,y,p,h)<=r?t({title:{style:{"--headerV3-responsivity-marginRight":0}}}):f(u,s,v,i,o)<=r?t({linebreaks:[{order:100}],titleControls:{style:{"--headerV3-responsivity-order":110}},padMode:{style:{"--headerV3-responsivity-order":120}},additionalControls:{style:{"--headerV3-responsivity-order":130},lastInLine:!0},title:{style:l(s,v,i,o)}}):!h.current&&f(u,s,v,i)<=r?t({linebreaks:[{order:100}],titleControls:{style:{"--headerV3-responsivity-order":110}},additionalControls:{style:{"--headerV3-responsivity-order":120}},actions:{style:{"--headerV3-responsivity-order":130},lastInLine:!0},title:{style:l(s,v,i)}}):f(u,s,v,i)<=r&&f(0,y,p,h,o)<=r?t({linebreaks:[{order:100}],titleControls:{style:{"--headerV3-responsivity-order":110}},additionalControls:{style:{"--headerV3-responsivity-order":120}},padMode:{style:{"--headerV3-responsivity-order":130}},actions:{style:{"--headerV3-responsivity-order":140},lastInLine:!0},title:{style:l(s,v,i)}}):t({linebreaks:[{order:100},{order:200}],titleControls:{style:{"--headerV3-responsivity-order":110}},additionalControls:{style:{"--headerV3-responsivity-order":120}},actions:{style:{"--headerV3-responsivity-order":130},lastInLine:!0},padMode:{style:{"--headerV3-responsivity-order":210}},chips:{style:{"--headerV3-responsivity-order":220},lastInLine:!0},title:{style:l(s,v)}})}))}),100,{leading:!0}),t=new ResizeObserver((function(){var r,t=(null===(r=a.current)||void 0===r?void 0:r.offsetWidth)||0;t!==w.current&&e(),w.current=t})),l=new MutationObserver(e);return a.current&&!r&&(t.observe(a.current),l.observe(a.current,{childList:!0,subtree:!0,characterData:!0}),e.cancel()),function(){t.disconnect(),l.disconnect()}}),[o,i,s,a,y,p,v,h,r,b]),r?{}:V};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),n=require("lodash"),o=require("./constants.scss.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=i(e),l=i(r);function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){s.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var c=parseInt(o.gap,10),u=parseInt(o.titleMinWidth,10)+c,y=function(e){var r;return(null===(r=e.current)||void 0===r?void 0:r.getBoundingClientRect().width)||0},f=function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];var o=t.filter((function(e){return!!e.current&&e.current.offsetWidth>0}));return e+o.reduce((function(e,r){return e+y(r)}),0)+(o.length>1?(o.length-1)*c:0)};exports.useResponsivity=function(e){var r=e.disabled,o=e.actionsRef,i=e.chipsRef,s=e.logoRef,a=e.rootRef,y=e.titleControlsRef,p=e.additionalControlsRef,v=e.versionRef,h=e.padModeRef,b=e.titleControlsLeft,O=t.useState({}),g=l.default(O,2),V=g[0],j=g[1],w=t.useRef(-1);return t.useEffect((function(){var e=n.throttle((function(){requestAnimationFrame((function(){var e,r=(null===(e=a.current)||void 0===e?void 0:e.offsetWidth)||0,t=function(e){var t,l=b&&f(u,s,v,i,o,y,p,h)<=r?d(d({},e),{},{root:{style:d(d({},null===(t=e.root)||void 0===t?void 0:t.style),{},{"--headerV3-responsivity-flexwrap":"nowrap"})}}):e;j((function(e){return n.isEqual(e,l)?e:l}))},l=function(){if(b){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=f.apply(void 0,[0].concat(r))+c;return{"--headerV3-responsivity-maxWidth":"calc(100% - ".concat(n,"px)")}}};f(u,s,v,i,o,y,p,h)<=r?t({title:{style:{"--headerV3-responsivity-marginRight":0}}}):f(u,s,v,i,o)<=r?t({linebreaks:[{order:100}],titleControls:{style:{"--headerV3-responsivity-order":110}},padMode:{style:{"--headerV3-responsivity-order":120}},additionalControls:{style:{"--headerV3-responsivity-order":130},lastInLine:!0},title:{style:l(s,v,i,o)}}):!h.current&&f(u,s,v,i)<=r?t({linebreaks:[{order:100}],titleControls:{style:{"--headerV3-responsivity-order":110}},additionalControls:{style:{"--headerV3-responsivity-order":120}},actions:{style:{"--headerV3-responsivity-order":130},lastInLine:!0},title:{style:l(s,v,i)}}):f(u,s,v,i)<=r&&f(0,y,p,h,o)<=r?t({linebreaks:[{order:100}],titleControls:{style:{"--headerV3-responsivity-order":110}},additionalControls:{style:{"--headerV3-responsivity-order":120}},padMode:{style:{"--headerV3-responsivity-order":130}},actions:{style:{"--headerV3-responsivity-order":140},lastInLine:!0},title:{style:l(s,v,i)}}):t({linebreaks:[{order:100},{order:200}],titleControls:{style:{"--headerV3-responsivity-order":110}},additionalControls:{style:{"--headerV3-responsivity-order":120}},actions:{style:{"--headerV3-responsivity-order":130},lastInLine:!0},padMode:{style:{"--headerV3-responsivity-order":210}},chips:{style:{"--headerV3-responsivity-order":220},lastInLine:!0},title:{style:l(s,v)}})}))}),100,{leading:!0}),t=new ResizeObserver((function(){var r,t=(null===(r=a.current)||void 0===r?void 0:r.offsetWidth)||0;t!==w.current&&e(),w.current=t})),l=new MutationObserver(e);return a.current&&!r&&(t.observe(a.current),l.observe(a.current,{childList:!0,subtree:!0,characterData:!0}),e.cancel()),function(){t.disconnect(),l.disconnect()}}),[o,i,s,a,y,p,v,h,r,b]),V};
2
2
  //# sourceMappingURL=useResponsivity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useResponsivity.js","sources":["../../../../../src/componentsV2/AppHeader/V3/useResponsivity.tsx"],"sourcesContent":["import { CSSProperties, RefObject, useEffect, useRef, useState } from 'react';\nimport { isEqual, throttle } from 'lodash';\n\nimport CssConstants from './constants.scss';\n\ntype Params = {\n disabled?: boolean;\n titleControlsLeft?: boolean;\n\n rootRef: RefObject<HTMLElement>;\n versionRef: RefObject<HTMLElement>;\n padModeRef: RefObject<HTMLElement>;\n additionalControlsRef: RefObject<HTMLElement>;\n titleControlsRef: RefObject<HTMLElement>;\n chipsRef: RefObject<HTMLElement>;\n logoRef: RefObject<HTMLElement>;\n actionsRef: RefObject<HTMLElement>;\n};\n\ntype ResponsivityDataItem = {\n style?: CSSProperties & Record<`--${string}`, number | string>;\n lastInLine?: boolean;\n};\n\ntype ResponsivityData = {\n root?: ResponsivityDataItem;\n padMode?: ResponsivityDataItem;\n additionalControls?: ResponsivityDataItem;\n titleControls?: ResponsivityDataItem;\n chips?: ResponsivityDataItem;\n actions?: ResponsivityDataItem;\n title?: ResponsivityDataItem;\n\n linebreaks?: CSSProperties[];\n};\n\nconst gap = parseInt(CssConstants.gap, 10);\nconst titleMinWidth = parseInt(CssConstants.titleMinWidth, 10) + gap;\n\nconst getRefWidth = (ref: RefObject<HTMLElement>) => {\n // This causes a reflow, so if it lags too much - use the `ref.current?.offsetWidth + 1`\n // `ref.current?.offsetWidth` rounds pixel fractions so it may produce incorrect results/need adjustment\n return ref.current?.getBoundingClientRect().width || 0;\n};\n\nconst sumLineWidth = (titleMinWidth: number, ...lineRefs: RefObject<HTMLElement>[]) => {\n const filteredRefs = lineRefs.filter(ref => !!ref.current && ref.current.offsetWidth > 0);\n return (\n titleMinWidth +\n filteredRefs.reduce((acc, ref) => acc + getRefWidth(ref), 0) +\n (filteredRefs.length > 1 ? (filteredRefs.length - 1) * gap : 0)\n );\n};\n\n/**\n * Detects when child elements stop fitting in a single header line and returns CSS orders, linebreaks, & other info for header elements\n *\n * There are several possible layouts:\n *\n * 1. Everything fits in one line\n * 2. 2 lines:\n * [logo] [title] [version] [asset chips] [actions]\n * [title controls] [pad mode] [additional controls]\n * and other variants that fit into 2 lines\n * 3. 3 lines:\n * [logo] [title] [version]\n * [title controls] [additional controls] [actions]\n * [pad mode] [chips]\n */\nexport const useResponsivity = ({\n disabled,\n actionsRef,\n chipsRef,\n logoRef,\n rootRef,\n titleControlsRef,\n additionalControlsRef,\n versionRef,\n padModeRef,\n titleControlsLeft,\n}: Params) => {\n const [value, setValue] = useState<ResponsivityData>({});\n const previousWidthRef = useRef(-1);\n\n useEffect(() => {\n const calculateCss = throttle(\n () => {\n requestAnimationFrame(() => {\n const rootWidth = rootRef.current?.offsetWidth || 0;\n\n const setCss = (baseData: ResponsivityData) => {\n // We need nowrap to properly handle title when app title is very long and we have title controls to the left\n const isNowrap =\n titleControlsLeft &&\n sumLineWidth(\n titleMinWidth,\n logoRef,\n versionRef,\n chipsRef,\n actionsRef,\n titleControlsRef,\n additionalControlsRef,\n padModeRef\n ) <= rootWidth;\n\n const data = isNowrap\n ? {\n ...baseData,\n root: {\n style: {\n ...baseData.root?.style,\n '--headerV3-responsivity-flexwrap': 'nowrap',\n },\n },\n }\n : baseData;\n\n // Prevent unnecessary rerenders & rerender loop: recalc -> update values -> recalc -> update values to the same values\n setValue(value => (isEqual(value, data) ? value : data));\n };\n\n const getTitleMaxWidthStyle = (...refs: RefObject<HTMLElement>[]) => {\n if (!titleControlsLeft) {\n return undefined;\n }\n\n const pixels = sumLineWidth(0, ...refs) + gap;\n return { '--headerV3-responsivity-maxWidth': `calc(100% - ${pixels}px)` };\n };\n\n // Case 1 - everything fits\n if (\n sumLineWidth(\n titleMinWidth,\n logoRef,\n versionRef,\n chipsRef,\n actionsRef,\n titleControlsRef,\n additionalControlsRef,\n padModeRef\n ) <= rootWidth\n ) {\n setCss({\n title: { style: { '--headerV3-responsivity-marginRight': 0 } },\n });\n }\n // 2 lines\n // [logo] [title] [version] [asset chips] [actions]\n // [title controls] [pad mode] [additional controls]\n else if (\n sumLineWidth(titleMinWidth, logoRef, versionRef, chipsRef, actionsRef) <= rootWidth\n ) {\n setCss({\n linebreaks: [{ order: 100 }],\n titleControls: { style: { '--headerV3-responsivity-order': 110 } },\n padMode: { style: { '--headerV3-responsivity-order': 120 } },\n additionalControls: {\n style: { '--headerV3-responsivity-order': 130 },\n lastInLine: true,\n },\n title: { style: getTitleMaxWidthStyle(logoRef, versionRef, chipsRef, actionsRef) },\n });\n }\n // 2 lines - no padmode, has chips\n // [logo] [title] [version] [asset chips]\n // [title controls] [additional controls] [actions]\n else if (\n !padModeRef.current &&\n sumLineWidth(titleMinWidth, logoRef, versionRef, chipsRef) <= rootWidth\n ) {\n setCss({\n linebreaks: [{ order: 100 }],\n titleControls: { style: { '--headerV3-responsivity-order': 110 } },\n additionalControls: { style: { '--headerV3-responsivity-order': 120 } },\n actions: { style: { '--headerV3-responsivity-order': 130 }, lastInLine: true },\n\n title: { style: getTitleMaxWidthStyle(logoRef, versionRef, chipsRef) },\n });\n }\n // 2 lines:\n // [logo] [title] [version] [chips]\n // [title controls] [additional controls] [pad mode] [actions]\n else if (\n sumLineWidth(titleMinWidth, logoRef, versionRef, chipsRef) <= rootWidth &&\n sumLineWidth(0, titleControlsRef, additionalControlsRef, padModeRef, actionsRef) <=\n rootWidth\n ) {\n setCss({\n linebreaks: [{ order: 100 }],\n titleControls: { style: { '--headerV3-responsivity-order': 110 } },\n additionalControls: { style: { '--headerV3-responsivity-order': 120 } },\n padMode: { style: { '--headerV3-responsivity-order': 130 } },\n actions: { style: { '--headerV3-responsivity-order': 140 }, lastInLine: true },\n\n title: { style: getTitleMaxWidthStyle(logoRef, versionRef, chipsRef) },\n });\n }\n // 3 lines\n // [logo] [title] [version]\n // [title controls] [additional controls] [actions]\n // [pad mode] [chips]\n else {\n setCss({\n linebreaks: [{ order: 100 }, { order: 200 }],\n titleControls: { style: { '--headerV3-responsivity-order': 110 } },\n additionalControls: { style: { '--headerV3-responsivity-order': 120 } },\n actions: { style: { '--headerV3-responsivity-order': 130 }, lastInLine: true },\n padMode: { style: { '--headerV3-responsivity-order': 210 } },\n chips: { style: { '--headerV3-responsivity-order': 220 }, lastInLine: true },\n\n title: { style: getTitleMaxWidthStyle(logoRef, versionRef) },\n });\n }\n });\n },\n 100,\n { leading: true }\n );\n\n const resizeObserver = new ResizeObserver(() => {\n const rootWidth = rootRef.current?.offsetWidth || 0;\n if (rootWidth !== previousWidthRef.current) {\n calculateCss();\n }\n previousWidthRef.current = rootWidth;\n });\n const mutationObserver = new MutationObserver(calculateCss);\n\n if (rootRef.current && !disabled) {\n resizeObserver.observe(rootRef.current);\n mutationObserver.observe(rootRef.current, {\n childList: true,\n subtree: true,\n characterData: true,\n });\n calculateCss.cancel();\n }\n\n return () => {\n resizeObserver.disconnect();\n mutationObserver.disconnect();\n };\n }, [\n actionsRef,\n chipsRef,\n logoRef,\n rootRef,\n titleControlsRef,\n additionalControlsRef,\n versionRef,\n padModeRef,\n disabled,\n titleControlsLeft,\n ]);\n\n return disabled ? {} : value;\n};\n"],"names":["gap","parseInt","CssConstants","titleMinWidth","getRefWidth","ref","_ref$current","current","getBoundingClientRect","width","sumLineWidth","_len","arguments","length","lineRefs","Array","_key","filteredRefs","filter","offsetWidth","reduce","acc","_ref","disabled","actionsRef","chipsRef","logoRef","rootRef","titleControlsRef","additionalControlsRef","versionRef","padModeRef","titleControlsLeft","_useState","useState","_useState2","_slicedToArray","value","setValue","previousWidthRef","useRef","useEffect","calculateCss","throttle","requestAnimationFrame","_rootRef$current","rootWidth","setCss","baseData","_baseData$root","data","_objectSpread","root","style","isEqual","getTitleMaxWidthStyle","_len2","refs","_key2","pixels","apply","title","linebreaks","order","titleControls","padMode","additionalControls","lastInLine","actions","chips","leading","resizeObserver","ResizeObserver","_rootRef$current2","mutationObserver","MutationObserver","observe","childList","subtree","characterData","cancel","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ACAR,EACAS,IAGKT,EAAW,CAAE,EAAGc,CACzB"}
1
+ {"version":3,"file":"useResponsivity.js","sources":["../../../../../src/componentsV2/AppHeader/V3/useResponsivity.tsx"],"sourcesContent":["import { CSSProperties, RefObject, useEffect, useRef, useState } from 'react';\nimport { isEqual, throttle } from 'lodash';\n\nimport CssConstants from './constants.scss';\n\ntype Params = {\n disabled?: boolean;\n titleControlsLeft?: boolean;\n\n rootRef: RefObject<HTMLElement>;\n versionRef: RefObject<HTMLElement>;\n padModeRef: RefObject<HTMLElement>;\n additionalControlsRef: RefObject<HTMLElement>;\n titleControlsRef: RefObject<HTMLElement>;\n chipsRef: RefObject<HTMLElement>;\n logoRef: RefObject<HTMLElement>;\n actionsRef: RefObject<HTMLElement>;\n};\n\ntype ResponsivityDataItem = {\n style?: CSSProperties & Record<`--${string}`, number | string>;\n lastInLine?: boolean;\n};\n\ntype ResponsivityData = {\n root?: ResponsivityDataItem;\n padMode?: ResponsivityDataItem;\n additionalControls?: ResponsivityDataItem;\n titleControls?: ResponsivityDataItem;\n chips?: ResponsivityDataItem;\n actions?: ResponsivityDataItem;\n title?: ResponsivityDataItem;\n\n linebreaks?: CSSProperties[];\n};\n\nconst gap = parseInt(CssConstants.gap, 10);\nconst titleMinWidth = parseInt(CssConstants.titleMinWidth, 10) + gap;\n\nconst getRefWidth = (ref: RefObject<HTMLElement>) => {\n // This causes a reflow, so if it lags too much - use the `ref.current?.offsetWidth + 1`\n // `ref.current?.offsetWidth` rounds pixel fractions so it may produce incorrect results/need adjustment\n return ref.current?.getBoundingClientRect().width || 0;\n};\n\nconst sumLineWidth = (titleMinWidth: number, ...lineRefs: RefObject<HTMLElement>[]) => {\n const filteredRefs = lineRefs.filter(ref => !!ref.current && ref.current.offsetWidth > 0);\n return (\n titleMinWidth +\n filteredRefs.reduce((acc, ref) => acc + getRefWidth(ref), 0) +\n (filteredRefs.length > 1 ? (filteredRefs.length - 1) * gap : 0)\n );\n};\n\n/**\n * Detects when child elements stop fitting in a single header line and returns CSS orders, linebreaks, & other info for header elements\n *\n * There are several possible layouts:\n *\n * 1. Everything fits in one line\n * 2. 2 lines:\n * [logo] [title] [version] [asset chips] [actions]\n * [title controls] [pad mode] [additional controls]\n * and other variants that fit into 2 lines\n * 3. 3 lines:\n * [logo] [title] [version]\n * [title controls] [additional controls] [actions]\n * [pad mode] [chips]\n */\nexport const useResponsivity = ({\n disabled,\n actionsRef,\n chipsRef,\n logoRef,\n rootRef,\n titleControlsRef,\n additionalControlsRef,\n versionRef,\n padModeRef,\n titleControlsLeft,\n}: Params) => {\n const [value, setValue] = useState<ResponsivityData>({});\n const previousWidthRef = useRef(-1);\n\n useEffect(() => {\n const calculateCss = throttle(\n () => {\n requestAnimationFrame(() => {\n const rootWidth = rootRef.current?.offsetWidth || 0;\n\n const setCss = (baseData: ResponsivityData) => {\n // We need nowrap to properly handle title when app title is very long and we have title controls to the left\n const isNowrap =\n titleControlsLeft &&\n sumLineWidth(\n titleMinWidth,\n logoRef,\n versionRef,\n chipsRef,\n actionsRef,\n titleControlsRef,\n additionalControlsRef,\n padModeRef\n ) <= rootWidth;\n\n const data = isNowrap\n ? {\n ...baseData,\n root: {\n style: {\n ...baseData.root?.style,\n '--headerV3-responsivity-flexwrap': 'nowrap',\n },\n },\n }\n : baseData;\n\n // Prevent unnecessary rerenders & rerender loop: recalc -> update values -> recalc -> update values to the same values\n setValue(value => (isEqual(value, data) ? value : data));\n };\n\n const getTitleMaxWidthStyle = (...refs: RefObject<HTMLElement>[]) => {\n if (!titleControlsLeft) {\n return undefined;\n }\n\n const pixels = sumLineWidth(0, ...refs) + gap;\n return { '--headerV3-responsivity-maxWidth': `calc(100% - ${pixels}px)` };\n };\n\n // Case 1 - everything fits\n if (\n sumLineWidth(\n titleMinWidth,\n logoRef,\n versionRef,\n chipsRef,\n actionsRef,\n titleControlsRef,\n additionalControlsRef,\n padModeRef\n ) <= rootWidth\n ) {\n setCss({\n title: { style: { '--headerV3-responsivity-marginRight': 0 } },\n });\n }\n // 2 lines\n // [logo] [title] [version] [asset chips] [actions]\n // [title controls] [pad mode] [additional controls]\n else if (\n sumLineWidth(titleMinWidth, logoRef, versionRef, chipsRef, actionsRef) <= rootWidth\n ) {\n setCss({\n linebreaks: [{ order: 100 }],\n titleControls: { style: { '--headerV3-responsivity-order': 110 } },\n padMode: { style: { '--headerV3-responsivity-order': 120 } },\n additionalControls: {\n style: { '--headerV3-responsivity-order': 130 },\n lastInLine: true,\n },\n title: { style: getTitleMaxWidthStyle(logoRef, versionRef, chipsRef, actionsRef) },\n });\n }\n // 2 lines - no padmode, has chips\n // [logo] [title] [version] [asset chips]\n // [title controls] [additional controls] [actions]\n else if (\n !padModeRef.current &&\n sumLineWidth(titleMinWidth, logoRef, versionRef, chipsRef) <= rootWidth\n ) {\n setCss({\n linebreaks: [{ order: 100 }],\n titleControls: { style: { '--headerV3-responsivity-order': 110 } },\n additionalControls: { style: { '--headerV3-responsivity-order': 120 } },\n actions: { style: { '--headerV3-responsivity-order': 130 }, lastInLine: true },\n\n title: { style: getTitleMaxWidthStyle(logoRef, versionRef, chipsRef) },\n });\n }\n // 2 lines:\n // [logo] [title] [version] [chips]\n // [title controls] [additional controls] [pad mode] [actions]\n else if (\n sumLineWidth(titleMinWidth, logoRef, versionRef, chipsRef) <= rootWidth &&\n sumLineWidth(0, titleControlsRef, additionalControlsRef, padModeRef, actionsRef) <=\n rootWidth\n ) {\n setCss({\n linebreaks: [{ order: 100 }],\n titleControls: { style: { '--headerV3-responsivity-order': 110 } },\n additionalControls: { style: { '--headerV3-responsivity-order': 120 } },\n padMode: { style: { '--headerV3-responsivity-order': 130 } },\n actions: { style: { '--headerV3-responsivity-order': 140 }, lastInLine: true },\n\n title: { style: getTitleMaxWidthStyle(logoRef, versionRef, chipsRef) },\n });\n }\n // 3 lines\n // [logo] [title] [version]\n // [title controls] [additional controls] [actions]\n // [pad mode] [chips]\n else {\n setCss({\n linebreaks: [{ order: 100 }, { order: 200 }],\n titleControls: { style: { '--headerV3-responsivity-order': 110 } },\n additionalControls: { style: { '--headerV3-responsivity-order': 120 } },\n actions: { style: { '--headerV3-responsivity-order': 130 }, lastInLine: true },\n padMode: { style: { '--headerV3-responsivity-order': 210 } },\n chips: { style: { '--headerV3-responsivity-order': 220 }, lastInLine: true },\n\n title: { style: getTitleMaxWidthStyle(logoRef, versionRef) },\n });\n }\n });\n },\n 100,\n { leading: true }\n );\n\n const resizeObserver = new ResizeObserver(() => {\n const rootWidth = rootRef.current?.offsetWidth || 0;\n if (rootWidth !== previousWidthRef.current) {\n calculateCss();\n }\n previousWidthRef.current = rootWidth;\n });\n const mutationObserver = new MutationObserver(calculateCss);\n\n if (rootRef.current && !disabled) {\n resizeObserver.observe(rootRef.current);\n mutationObserver.observe(rootRef.current, {\n childList: true,\n subtree: true,\n characterData: true,\n });\n calculateCss.cancel();\n }\n\n return () => {\n resizeObserver.disconnect();\n mutationObserver.disconnect();\n };\n }, [\n actionsRef,\n chipsRef,\n logoRef,\n rootRef,\n titleControlsRef,\n additionalControlsRef,\n versionRef,\n padModeRef,\n disabled,\n titleControlsLeft,\n ]);\n\n return value;\n};\n"],"names":["gap","parseInt","CssConstants","titleMinWidth","getRefWidth","ref","_ref$current","current","getBoundingClientRect","width","sumLineWidth","_len","arguments","length","lineRefs","Array","_key","filteredRefs","filter","offsetWidth","reduce","acc","_ref","disabled","actionsRef","chipsRef","logoRef","rootRef","titleControlsRef","additionalControlsRef","versionRef","padModeRef","titleControlsLeft","_useState","useState","_useState2","_slicedToArray","value","setValue","previousWidthRef","useRef","useEffect","calculateCss","throttle","requestAnimationFrame","_rootRef$current","rootWidth","setCss","baseData","_baseData$root","data","_objectSpread","root","style","isEqual","getTitleMaxWidthStyle","_len2","refs","_key2","pixels","apply","title","linebreaks","order","titleControls","padMode","additionalControls","lastInLine","actions","chips","leading","resizeObserver","ResizeObserver","_rootRef$current2","mutationObserver","MutationObserver","observe","childList","subtree","characterData","cancel","disconnect"],"mappings":"s5BAoCA,IAAMA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2,7 +2,6 @@ import { AttachmentPreviewProps } from './AttachmentPreview.types';
2
2
  /**
3
3
  * Picks the strip that fits — reorderable or plain — and gives it a lightbox. Rendering lives in
4
4
  * `AttachmentRow`, drag-and-drop in `SortableAttachments`, the modal in `useAttachmentLightbox`.
5
- * The strip hides its scrollbar, so overflow arrows are the scroll affordance.
6
5
  */
7
6
  export declare const AttachmentPreview: import("react").ForwardRefExoticComponent<AttachmentPreviewProps & import("react").RefAttributes<HTMLDivElement>>;
8
7
  //# sourceMappingURL=AttachmentPreview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAkCnE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mHA6C7B,CAAC"}
1
+ {"version":3,"file":"AttachmentPreview.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,mHA8B7B,CAAC"}
@@ -1,2 +1,2 @@
1
- import o from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as c,useRef as n,useCallback as i}from"react";import{ButtonIcon as t}from"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as r}from"../../componentsV2/Tooltip/Tooltip.js";import{RightIcon as e,LeftIcon as m}from"../../icons/iconParkIcons.js";import"../../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/InfoRounded.js";import"../../icons/customIcons/icons/FlameFilled.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/PinOne.js";import"../../icons/customIcons/icons/PinOneCrossed.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{useAttachmentLightbox as p}from"../AttachmentLightbox/useAttachmentLightbox.js";import{AttachmentRow as u}from"./AttachmentRow.js";import{SortableAttachments as l}from"./SortableAttachments.js";import{useScrollOverflow as a}from"./useScrollOverflow.js";import j from"./AttachmentPreview.scss.js";import{jsx as I,jsxs as d,Fragment as h}from"react/jsx-runtime";var f=["onReorder","onItemClick","onShare"];function C(o,s){var c=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),c.push.apply(c,n)}return c}function b(s){for(var c=1;c<arguments.length;c++){var n=null!=arguments[c]?arguments[c]:{};c%2?C(Object(n),!0).forEach((function(c){o(s,c,n[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(n,o))}))}return s}var O=function(o){return 1===o?"1 more attachment":"".concat(o," more attachments")},g=function(o){var s=o.direction,c=o.hiddenCount,n=o.onClick;if(!c)return null;var i=1===s;return I(r,{title:O(c),children:I("div",{className:i?j.scrollArrowRight:j.scrollArrowLeft,children:I(t,{size:"xs",type:"tertiaryBg",ariaLabel:O(c),onClick:function(){return n(s)},testId:i?"attachment-scroll-right":"attachment-scroll-left",children:I(i?e:m,{size:"small"})})})})},P=c((function(o,c){var t=o.onReorder,r=o.onItemClick,e=o.onShare,m=s(o,f),C=p(m.items,{onShare:e}),O=C.openAttachment,P=C.lightbox,v=n(null),y=i((function(o){v.current=o,"function"==typeof c?c(o):c&&(c.current=o)}),[c]),A=a(v,m.items),F=A.left,k=A.right,S=A.scrollByPage;if(!m.items.length)return null;var w=!!t&&m.items.length>1?I(l,b(b({},m),{},{ref:y,onReorder:t,onItemClick:null!=r?r:O})):I(u,b(b({},m),{},{ref:y,onShare:e,onItemClick:null!=r?r:O}));return d(h,{children:[d("div",{className:j.stripShell,children:[w,I(g,{direction:-1,hiddenCount:F.hiddenCount,onClick:S}),I(g,{direction:1,hiddenCount:k.hiddenCount,onClick:S})]}),!r&&P]})}));export{P as AttachmentPreview};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as r}from"react";import{useAttachmentLightbox as o}from"../AttachmentLightbox/useAttachmentLightbox.js";import{AttachmentRow as n}from"./AttachmentRow.js";import{SortableAttachments as i}from"./SortableAttachments.js";import{jsx as c,jsxs as m,Fragment as p}from"react/jsx-runtime";var l=["onReorder","onItemClick","onShare"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function f(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?a(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var b=r((function(e,r){var a=e.onReorder,b=e.onItemClick,s=e.onShare,h=t(e,l),u=o(h.items,{onShare:s}),O=u.openAttachment,j=u.lightbox;if(!h.items.length)return null;var g=!!a&&h.items.length>1?c(i,f(f({},h),{},{ref:r,onReorder:a,onItemClick:null!=b?b:O})):c(n,f(f({},h),{},{ref:r,onShare:s,onItemClick:null!=b?b:O}));return m(p,{children:[g,!b&&j]})}));export{b as AttachmentPreview};
2
2
  //# sourceMappingURL=AttachmentPreview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentPreview.js","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"sourcesContent":["import { forwardRef, useCallback, useRef } from 'react';\n\nimport { ButtonIcon } from '../../componentsV2/ButtonIcon';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LeftIcon, RightIcon } from '../../icons';\nimport { useAttachmentLightbox } from '../AttachmentLightbox/useAttachmentLightbox';\n\nimport { AttachmentRow } from './AttachmentRow';\nimport { SortableAttachments } from './SortableAttachments';\nimport { useScrollOverflow } from './useScrollOverflow';\nimport { AttachmentPreviewProps } from './AttachmentPreview.types';\n\nimport styles from './AttachmentPreview.scss';\n\nconst moreLabel = (count: number) =>\n count === 1 ? '1 more attachment' : `${count} more attachments`;\n\ntype ScrollArrowProps = {\n direction: -1 | 1;\n hiddenCount: number;\n onClick: (direction: -1 | 1) => void;\n};\n\nconst ScrollArrow = ({ direction, hiddenCount, onClick }: ScrollArrowProps) => {\n if (!hiddenCount) return null;\n\n const isRight = direction === 1;\n return (\n <Tooltip title={moreLabel(hiddenCount)}>\n <div className={isRight ? styles.scrollArrowRight : styles.scrollArrowLeft}>\n <ButtonIcon\n size=\"xs\"\n type=\"tertiaryBg\"\n ariaLabel={moreLabel(hiddenCount)}\n onClick={() => onClick(direction)}\n testId={isRight ? 'attachment-scroll-right' : 'attachment-scroll-left'}\n >\n {isRight ? <RightIcon size=\"small\" /> : <LeftIcon size=\"small\" />}\n </ButtonIcon>\n </div>\n </Tooltip>\n );\n};\n\n/**\n * Picks the strip that fits — reorderable or plain — and gives it a lightbox. Rendering lives in\n * `AttachmentRow`, drag-and-drop in `SortableAttachments`, the modal in `useAttachmentLightbox`.\n * The strip hides its scrollbar, so overflow arrows are the scroll affordance.\n */\nexport const AttachmentPreview = forwardRef<HTMLDivElement, AttachmentPreviewProps>(\n ({ onReorder, onItemClick, onShare, ...props }, ref) => {\n const { openAttachment, lightbox } = useAttachmentLightbox(props.items, { onShare });\n\n const scrollerRef = useRef<HTMLDivElement | null>(null);\n const setScrollerRef = useCallback(\n (node: HTMLDivElement | null) => {\n scrollerRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [ref]\n );\n const { left, right, scrollByPage } = useScrollOverflow(scrollerRef, props.items);\n\n if (!props.items.length) return null;\n\n const isSortable = !!onReorder && props.items.length > 1;\n const strip = isSortable ? (\n <SortableAttachments\n {...props}\n ref={setScrollerRef}\n onReorder={onReorder}\n onItemClick={onItemClick ?? openAttachment}\n />\n ) : (\n <AttachmentRow\n {...props}\n ref={setScrollerRef}\n onShare={onShare}\n onItemClick={onItemClick ?? openAttachment}\n />\n );\n\n return (\n <>\n <div className={styles.stripShell}>\n {strip}\n <ScrollArrow direction={-1} hiddenCount={left.hiddenCount} onClick={scrollByPage} />\n <ScrollArrow direction={1} hiddenCount={right.hiddenCount} onClick={scrollByPage} />\n </div>\n {!onItemClick && lightbox}\n </>\n );\n }\n);\n"],"names":["moreLabel","count","concat","ScrollArrow","_ref","direction","hiddenCount","onClick","isRight","_jsx","Tooltip","title","children","className","styles","scrollArrowRight","scrollArrowLeft","ButtonIcon","size","type","ariaLabel","testId","RightIcon","LeftIcon","AttachmentPreview","forwardRef","_ref2","ref","onReorder","onItemClick","onShare","props","_objectWithoutProperties","_excluded","_useAttachmentLightbo","useAttachmentLightbox","items","openAttachment","lightbox","scrollerRef","useRef","setScrollerRef","useCallback","node","current","_useScrollOverflow","useScrollOverflow","left","right","scrollByPage","length","strip","SortableAttachments","AttachmentRow","_objectSpread","_jsxs","_Fragment","stripShell"],"mappings":"+nKAcA,IAAMA,EAAY,SAACC,GAAa,OACpB,IAAVA,EAAc,oBAAmB,GAAAC,OAAMD,EAAwB,oBAAA,EAQ3DE,EAAc,SAA2DC,GAAA,IAAxDC,IAAAA,UAAWC,IAAAA,YAAaC,IAAAA,QAC7C,IAAKD,EAAa,OAAO,KAEzB,IAAME,EAAwB,IAAdH,EAChB,OACEI,EAACC,EAAO,CAACC,MAAOX,EAAUM,GAAaM,SACrCH,EAAA,MAAA,CAAKI,UAAWL,EAAUM,EAAOC,iBAAmBD,EAAOE,gBAAgBJ,SACzEH,EAACQ,EAAU,CACTC,KAAK,KACLC,KAAK,aACLC,UAAWpB,EAAUM,GACrBC,QAAS,WAAA,OAAMA,EAAQF,EAAW,EAClCgB,OAAQb,EAAU,0BAA4B,yBAAyBI,SAE5DH,EAAVD,EAAWc,EAA6BC,EAApB,CAACL,KAAK,eAKrC,EAOaM,EAAoBC,GAC/B,SAAAC,EAAgDC,GAAQ,IAArDC,IAAAA,UAAWC,IAAAA,YAAaC,IAAAA,QAAYC,EAAKC,EAAAN,EAAAO,GAC1CC,EAAqCC,EAAsBJ,EAAMK,MAAO,CAAEN,QAAAA,IAAlEO,IAAAA,eAAgBC,IAAAA,SAElBC,EAAcC,EAA8B,MAC5CC,EAAiBC,GACrB,SAACC,GACCJ,EAAYK,QAAUD,EACH,mBAARhB,EAAoBA,EAAIgB,GAC1BhB,IAAKA,EAAIiB,QAAUD,EAC9B,GACA,CAAChB,IAEHkB,EAAsCC,EAAkBP,EAAaR,EAAMK,OAAnEW,IAAAA,KAAMC,IAAAA,MAAOC,IAAAA,aAErB,IAAKlB,EAAMK,MAAMc,OAAQ,OAAO,KAEhC,IACMC,IADevB,GAAaG,EAAMK,MAAMc,OAAS,EAErDzC,EAAC2C,SACKrB,GAAK,GAAA,CACTJ,IAAKc,EACLb,UAAWA,EACXC,YAAaA,QAAAA,EAAeQ,KAG9B5B,EAAC4C,EAAaC,EAAAA,EAAA,CAAA,EACRvB,GAAK,GAAA,CACTJ,IAAKc,EACLX,QAASA,EACTD,YAAaA,QAAAA,EAAeQ,KAIhC,OACEkB,EAAAC,EAAA,CAAA5C,SACE,CAAA2C,EAAA,MAAA,CAAK1C,UAAWC,EAAO2C,WAAW7C,SAC/BuC,CAAAA,EACD1C,EAACN,EAAW,CAACE,WAAY,EAAGC,YAAayC,EAAKzC,YAAaC,QAAS0C,IACpExC,EAACN,EAAW,CAACE,UAAW,EAAGC,YAAa0C,EAAM1C,YAAaC,QAAS0C,QAEpEpB,GAAeS,IAGvB"}
1
+ {"version":3,"file":"AttachmentPreview.js","sources":["../../../src/components/AttachmentPreview/AttachmentPreview.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport { useAttachmentLightbox } from '../AttachmentLightbox/useAttachmentLightbox';\n\nimport { AttachmentRow } from './AttachmentRow';\nimport { SortableAttachments } from './SortableAttachments';\nimport { AttachmentPreviewProps } from './AttachmentPreview.types';\n\n/**\n * Picks the strip that fits — reorderable or plain — and gives it a lightbox. Rendering lives in\n * `AttachmentRow`, drag-and-drop in `SortableAttachments`, the modal in `useAttachmentLightbox`.\n */\nexport const AttachmentPreview = forwardRef<HTMLDivElement, AttachmentPreviewProps>(\n ({ onReorder, onItemClick, onShare, ...props }, ref) => {\n const { openAttachment, lightbox } = useAttachmentLightbox(props.items, { onShare });\n\n if (!props.items.length) return null;\n\n const isSortable = !!onReorder && props.items.length > 1;\n const strip = isSortable ? (\n <SortableAttachments\n {...props}\n ref={ref}\n onReorder={onReorder}\n onItemClick={onItemClick ?? openAttachment}\n />\n ) : (\n <AttachmentRow\n {...props}\n ref={ref}\n onShare={onShare}\n onItemClick={onItemClick ?? openAttachment}\n />\n );\n\n return (\n <>\n {strip}\n {!onItemClick && lightbox}\n </>\n );\n }\n);\n"],"names":["AttachmentPreview","forwardRef","_ref","ref","onReorder","onItemClick","onShare","props","_objectWithoutProperties","_excluded","_useAttachmentLightbo","useAttachmentLightbox","items","openAttachment","lightbox","length","strip","_jsx","SortableAttachments","AttachmentRow","_objectSpread","_jsxs","_Fragment","children"],"mappings":"8gCAYaA,EAAoBC,GAC/B,SAAAC,EAAgDC,GAAQ,IAArDC,IAAAA,UAAWC,IAAAA,YAAaC,IAAAA,QAAYC,EAAKC,EAAAN,EAAAO,GAC1CC,EAAqCC,EAAsBJ,EAAMK,MAAO,CAAEN,QAAAA,IAAlEO,IAAAA,eAAgBC,IAAAA,SAExB,IAAKP,EAAMK,MAAMG,OAAQ,OAAO,KAEhC,IACMC,IADeZ,GAAaG,EAAMK,MAAMG,OAAS,EAErDE,EAACC,SACKX,GAAK,GAAA,CACTJ,IAAKA,EACLC,UAAWA,EACXC,YAAaA,QAAAA,EAAeQ,KAG9BI,EAACE,EAAaC,EAAAA,EAAA,CAAA,EACRb,GAAK,GAAA,CACTJ,IAAKA,EACLG,QAASA,EACTD,YAAaA,QAAAA,EAAeQ,KAIhC,OACEQ,EAAAC,EAAA,CAAAC,SAAA,CACGP,GACCX,GAAeS,IAGvB"}
@@ -1,2 +1,2 @@
1
- import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",scroller:"AttachmentPreview_scroller__ZqYC8",stripShell:"AttachmentPreview_stripShell__ndNiE",scrollArrowRight:"AttachmentPreview_scrollArrowRight__aGmVR",scrollArrowLeft:"AttachmentPreview_scrollArrowLeft__wpsRM",slot:"AttachmentPreview_slot__ewKLo",slotDragging:"AttachmentPreview_slotDragging__hrfJX",slotContent:"AttachmentPreview_slotContent__GNuSu",insertion:"AttachmentPreview_insertion__iFqlp",insertionBefore:"AttachmentPreview_insertionBefore__jyWQM",insertionEdge:"AttachmentPreview_insertionEdge__Bjk1t",insertionAfter:"AttachmentPreview_insertionAfter__4NvhP",dragGhost:"AttachmentPreview_dragGhost__4aSzE",dragGhostHandle:"AttachmentPreview_dragGhostHandle__Gu2CP",thumbnail:"AttachmentPreview_thumbnail__ytI2L",clickable:"AttachmentPreview_clickable__BEXzK",selected:"AttachmentPreview_selected__JRuMO",thumbnailInner:"AttachmentPreview_thumbnailInner__9Ex4-",thumbnailImage:"AttachmentPreview_thumbnailImage__RQ4fL",videoOverlay:"AttachmentPreview_videoOverlay__5Lgi1",playIcon:"AttachmentPreview_playIcon__OOnql",fileCard:"AttachmentPreview_fileCard__oxDbD",fileCardLink:"AttachmentPreview_fileCardLink__TDpvh",fileCardContent:"AttachmentPreview_fileCardContent__c-99Q",fileInfo:"AttachmentPreview_fileInfo__eqJ-B",fileName:"AttachmentPreview_fileName__1Ccg0",fileType:"AttachmentPreview_fileType__0v6E4",tileActions:"AttachmentPreview_tileActions__2nLlw",tileActionLink:"AttachmentPreview_tileActionLink__aMyS4",removeButton:"AttachmentPreview_removeButton__aX-qu",removeButtonVisible:"AttachmentPreview_removeButtonVisible__BVjYB",thumbnailError:"AttachmentPreview_thumbnailError__yyH08",uploadingOverlay:"AttachmentPreview_uploadingOverlay__leV1D",uploadingSpinner:"AttachmentPreview_uploadingSpinner__u-t7d",loader:"AttachmentPreview_loader__HK5bZ",errorOverlay:"AttachmentPreview_errorOverlay__8sM1d",retryButton:"AttachmentPreview_retryButton__tKVV0"};t('.AttachmentPreview_scroller__ZqYC8{-ms-overflow-style:none;align-items:flex-start;display:flex;gap:12px;margin-left:-8px;overflow-x:auto;overflow-y:visible;padding-left:8px;padding-right:8px;padding-top:6px;scroll-behavior:smooth;scrollbar-width:none}.AttachmentPreview_scroller__ZqYC8::-webkit-scrollbar{display:none}.AttachmentPreview_stripShell__ndNiE{max-width:100%;min-width:0;position:relative}.AttachmentPreview_scrollArrowLeft__wpsRM,.AttachmentPreview_scrollArrowRight__aGmVR{pointer-events:auto;position:absolute;top:calc(50% + 3px);transform:translateY(-50%);z-index:6}.AttachmentPreview_scrollArrowLeft__wpsRM button,.AttachmentPreview_scrollArrowRight__aGmVR button{backdrop-filter:blur(8px)}.AttachmentPreview_scrollArrowLeft__wpsRM{left:calc(-12px - var(--attachment-arrow-outset, 0px))}.AttachmentPreview_scrollArrowRight__aGmVR{right:calc(-12px - var(--attachment-arrow-outset, 0px))}@supports not (overflow-clip-margin:12px){.AttachmentPreview_scrollArrowLeft__wpsRM{left:0}.AttachmentPreview_scrollArrowRight__aGmVR{right:0}}.AttachmentPreview_slot__ewKLo{border-radius:8px;cursor:grab;flex-shrink:0;position:relative;touch-action:none}.AttachmentPreview_slot__ewKLo:focus-visible{outline:none}.AttachmentPreview_slot__ewKLo:focus-visible:before{border:2px solid var(--palette-primary-main);border-radius:8px;content:"";inset:0;pointer-events:none;position:absolute;z-index:5}.AttachmentPreview_slotDragging__hrfJX{cursor:grabbing}.AttachmentPreview_slotDragging__hrfJX .AttachmentPreview_slotContent__GNuSu{visibility:hidden}.AttachmentPreview_slotDragging__hrfJX:focus-visible:before{display:none}.AttachmentPreview_slotDragging__hrfJX:after{background:rgb(from var(--palette-primary-text-1) r g b/.04);border:1px dashed var(--palette-primary-text-6);border-radius:8px;content:"";inset:0;position:absolute}.AttachmentPreview_insertion__iFqlp{background:var(--palette-primary-main);border-radius:2px;bottom:0;box-shadow:0 0 6px rgb(from var(--palette-primary-main) r g b/.6);position:absolute;top:0;width:2px;z-index:4}.AttachmentPreview_insertionBefore__jyWQM,.AttachmentPreview_insertionEdge__Bjk1t{left:-7px}.AttachmentPreview_insertionAfter__4NvhP{right:-7px}.AttachmentPreview_dragGhost__4aSzE{background:var(--palette-background-b-6);border-radius:8px;box-shadow:0 10px 20px rgb(from var(--palette-background-b-1) r g b/.45);cursor:grabbing;opacity:.9;position:relative;transform:rotate(4deg)}.AttachmentPreview_dragGhostHandle__Gu2CP{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:2}.AttachmentPreview_dragGhostHandle__Gu2CP button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.16)!important;color:var(--palette-primary-text-1)!important}.AttachmentPreview_dragGhostHandle__Gu2CP svg{color:var(--palette-primary-text-1)}.AttachmentPreview_thumbnail__ytI2L{border-radius:8px;flex-shrink:0;height:64px;overflow:visible;position:relative;width:64px}.AttachmentPreview_clickable__BEXzK{cursor:pointer}.AttachmentPreview_clickable__BEXzK:hover{opacity:.9}.AttachmentPreview_selected__JRuMO:after{border:1px solid var(--palette-primary-main);border-radius:8px;content:"";inset:0;pointer-events:none;position:absolute;z-index:4}.AttachmentPreview_thumbnailInner__9Ex4-{border-radius:8px;inset:0;overflow:hidden;pointer-events:none;position:absolute}.AttachmentPreview_thumbnailImage__RQ4fL{height:100%;left:50%;max-width:none;min-width:100%;object-fit:cover;pointer-events:none;position:absolute;top:0;transform:translateX(-50%);width:auto}.AttachmentPreview_videoOverlay__5Lgi1{align-items:center;background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute}.AttachmentPreview_playIcon__OOnql{color:var(--palette-primary-text-1);font-size:32px}.AttachmentPreview_fileCard__oxDbD{align-items:flex-start;border:1px solid rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:8px;display:flex;flex-direction:column;flex-shrink:0;height:64px;justify-content:center;padding:8px 16px;position:relative;width:142px}.AttachmentPreview_fileCardLink__TDpvh{color:inherit;cursor:pointer;text-decoration:none}.AttachmentPreview_fileCardLink__TDpvh:hover{border-color:rgb(from var(--palette-primary-text-1) r g b/.16)}.AttachmentPreview_fileCardContent__c-99Q{align-items:center;display:flex;gap:8px;width:100%}.AttachmentPreview_fileInfo__eqJ-B{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;justify-content:center;min-width:0}.AttachmentPreview_fileName__1Ccg0{color:var(--palette-primary-text-1)}.AttachmentPreview_fileName__1Ccg0,.AttachmentPreview_fileType__0v6E4{font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.AttachmentPreview_fileType__0v6E4{color:var(--palette-primary-text-6);text-transform:uppercase}.AttachmentPreview_tileActions__2nLlw{display:flex;gap:4px;opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_tileActions__2nLlw button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_tileActions__2nLlw button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD .AttachmentPreview_tileActions__2nLlw:focus-within,.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_tileActions__2nLlw,.AttachmentPreview_thumbnail__ytI2L .AttachmentPreview_tileActions__2nLlw:focus-within,.AttachmentPreview_thumbnail__ytI2L:hover .AttachmentPreview_tileActions__2nLlw{opacity:1}.AttachmentPreview_tileActionLink__aMyS4{display:inline-flex}.AttachmentPreview_removeButton__aX-qu{opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_removeButton__aX-qu button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_removeButton__aX-qu button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_removeButton__aX-qu,.AttachmentPreview_removeButtonVisible__BVjYB,.AttachmentPreview_thumbnail__ytI2L:hover .AttachmentPreview_removeButton__aX-qu{opacity:1}.AttachmentPreview_thumbnailError__yyH08{border:1px solid rgb(from var(--palette-error-main) r g b/.4)}.AttachmentPreview_uploadingOverlay__leV1D{background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_uploadingSpinner__u-t7d{align-items:center;backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:6px;display:flex;height:24px;justify-content:center;position:absolute;right:-6px;top:-6px;width:24px;z-index:2}.AttachmentPreview_loader__HK5bZ{color:var(--palette-primary-text-6)!important;height:14px!important;width:14px!important}.AttachmentPreview_errorOverlay__8sM1d{background:rgb(from var(--palette-error-main) r g b/.08);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_retryButton__tKVV0{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.AttachmentPreview_retryButton__tKVV0 button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_retryButton__tKVV0 button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}');export{e as default};
1
+ import t from'./../../ext-esm/style-inject/dist/style-inject.es.js';var e={spacing:"8",scroller:"AttachmentPreview_scroller__ZqYC8",slot:"AttachmentPreview_slot__ewKLo",slotDragging:"AttachmentPreview_slotDragging__hrfJX",slotContent:"AttachmentPreview_slotContent__GNuSu",insertion:"AttachmentPreview_insertion__iFqlp",insertionBefore:"AttachmentPreview_insertionBefore__jyWQM",insertionEdge:"AttachmentPreview_insertionEdge__Bjk1t",insertionAfter:"AttachmentPreview_insertionAfter__4NvhP",dragGhost:"AttachmentPreview_dragGhost__4aSzE",dragGhostHandle:"AttachmentPreview_dragGhostHandle__Gu2CP",thumbnail:"AttachmentPreview_thumbnail__ytI2L",clickable:"AttachmentPreview_clickable__BEXzK",selected:"AttachmentPreview_selected__JRuMO",thumbnailInner:"AttachmentPreview_thumbnailInner__9Ex4-",thumbnailImage:"AttachmentPreview_thumbnailImage__RQ4fL",videoOverlay:"AttachmentPreview_videoOverlay__5Lgi1",playIcon:"AttachmentPreview_playIcon__OOnql",fileCard:"AttachmentPreview_fileCard__oxDbD",fileCardLink:"AttachmentPreview_fileCardLink__TDpvh",fileCardContent:"AttachmentPreview_fileCardContent__c-99Q",fileInfo:"AttachmentPreview_fileInfo__eqJ-B",fileName:"AttachmentPreview_fileName__1Ccg0",fileType:"AttachmentPreview_fileType__0v6E4",tileActions:"AttachmentPreview_tileActions__2nLlw",tileActionLink:"AttachmentPreview_tileActionLink__aMyS4",removeButton:"AttachmentPreview_removeButton__aX-qu",removeButtonVisible:"AttachmentPreview_removeButtonVisible__BVjYB",thumbnailError:"AttachmentPreview_thumbnailError__yyH08",uploadingOverlay:"AttachmentPreview_uploadingOverlay__leV1D",uploadingSpinner:"AttachmentPreview_uploadingSpinner__u-t7d",loader:"AttachmentPreview_loader__HK5bZ",errorOverlay:"AttachmentPreview_errorOverlay__8sM1d",retryButton:"AttachmentPreview_retryButton__tKVV0"};t('.AttachmentPreview_scroller__ZqYC8{-ms-overflow-style:none;align-items:flex-start;display:flex;gap:12px;margin-left:-8px;overflow-x:auto;overflow-y:visible;padding-left:8px;padding-right:8px;padding-top:6px;scroll-behavior:smooth;scrollbar-width:none}.AttachmentPreview_scroller__ZqYC8::-webkit-scrollbar{display:none}.AttachmentPreview_slot__ewKLo{border-radius:8px;cursor:grab;flex-shrink:0;position:relative;touch-action:none}.AttachmentPreview_slot__ewKLo:focus-visible{outline:none}.AttachmentPreview_slot__ewKLo:focus-visible:before{border:2px solid var(--palette-primary-main);border-radius:8px;content:"";inset:0;pointer-events:none;position:absolute;z-index:5}.AttachmentPreview_slotDragging__hrfJX{cursor:grabbing}.AttachmentPreview_slotDragging__hrfJX .AttachmentPreview_slotContent__GNuSu{visibility:hidden}.AttachmentPreview_slotDragging__hrfJX:focus-visible:before{display:none}.AttachmentPreview_slotDragging__hrfJX:after{background:rgb(from var(--palette-primary-text-1) r g b/.04);border:1px dashed var(--palette-primary-text-6);border-radius:8px;content:"";inset:0;position:absolute}.AttachmentPreview_insertion__iFqlp{background:var(--palette-primary-main);border-radius:2px;bottom:0;box-shadow:0 0 6px rgb(from var(--palette-primary-main) r g b/.6);position:absolute;top:0;width:2px;z-index:4}.AttachmentPreview_insertionBefore__jyWQM,.AttachmentPreview_insertionEdge__Bjk1t{left:-7px}.AttachmentPreview_insertionAfter__4NvhP{right:-7px}.AttachmentPreview_dragGhost__4aSzE{background:var(--palette-background-b-6);border-radius:8px;box-shadow:0 10px 20px rgb(from var(--palette-background-b-1) r g b/.45);cursor:grabbing;opacity:.9;position:relative;transform:rotate(4deg)}.AttachmentPreview_dragGhostHandle__Gu2CP{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:2}.AttachmentPreview_dragGhostHandle__Gu2CP button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.16)!important;color:var(--palette-primary-text-1)!important}.AttachmentPreview_dragGhostHandle__Gu2CP svg{color:var(--palette-primary-text-1)}.AttachmentPreview_thumbnail__ytI2L{border-radius:8px;flex-shrink:0;height:64px;overflow:visible;position:relative;width:64px}.AttachmentPreview_clickable__BEXzK{cursor:pointer}.AttachmentPreview_clickable__BEXzK:hover{opacity:.9}.AttachmentPreview_selected__JRuMO:after{border:1px solid var(--palette-primary-main);border-radius:8px;content:"";inset:0;pointer-events:none;position:absolute;z-index:4}.AttachmentPreview_thumbnailInner__9Ex4-{border-radius:8px;inset:0;overflow:hidden;pointer-events:none;position:absolute}.AttachmentPreview_thumbnailImage__RQ4fL{height:100%;left:50%;max-width:none;min-width:100%;object-fit:cover;pointer-events:none;position:absolute;top:0;transform:translateX(-50%);width:auto}.AttachmentPreview_videoOverlay__5Lgi1{align-items:center;background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute}.AttachmentPreview_playIcon__OOnql{color:var(--palette-primary-text-1);font-size:32px}.AttachmentPreview_fileCard__oxDbD{align-items:flex-start;border:1px solid rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:8px;display:flex;flex-direction:column;flex-shrink:0;height:64px;justify-content:center;padding:8px 16px;position:relative;width:142px}.AttachmentPreview_fileCardLink__TDpvh{color:inherit;cursor:pointer;text-decoration:none}.AttachmentPreview_fileCardLink__TDpvh:hover{border-color:rgb(from var(--palette-primary-text-1) r g b/.16)}.AttachmentPreview_fileCardContent__c-99Q{align-items:center;display:flex;gap:8px;width:100%}.AttachmentPreview_fileInfo__eqJ-B{align-items:flex-start;display:flex;flex:1 0 0;flex-direction:column;justify-content:center;min-width:0}.AttachmentPreview_fileName__1Ccg0{color:var(--palette-primary-text-1)}.AttachmentPreview_fileName__1Ccg0,.AttachmentPreview_fileType__0v6E4{font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.AttachmentPreview_fileType__0v6E4{color:var(--palette-primary-text-6);text-transform:uppercase}.AttachmentPreview_tileActions__2nLlw{display:flex;gap:4px;opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_tileActions__2nLlw button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_tileActions__2nLlw button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD .AttachmentPreview_tileActions__2nLlw:focus-within,.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_tileActions__2nLlw,.AttachmentPreview_thumbnail__ytI2L .AttachmentPreview_tileActions__2nLlw:focus-within,.AttachmentPreview_thumbnail__ytI2L:hover .AttachmentPreview_tileActions__2nLlw{opacity:1}.AttachmentPreview_tileActionLink__aMyS4{display:inline-flex}.AttachmentPreview_removeButton__aX-qu{opacity:0;position:absolute;right:-6px;top:-6px;transition:opacity .2s;z-index:3}.AttachmentPreview_removeButton__aX-qu button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_removeButton__aX-qu button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}.AttachmentPreview_fileCard__oxDbD:hover .AttachmentPreview_removeButton__aX-qu,.AttachmentPreview_removeButtonVisible__BVjYB,.AttachmentPreview_thumbnail__ytI2L:hover .AttachmentPreview_removeButton__aX-qu{opacity:1}.AttachmentPreview_thumbnailError__yyH08{border:1px solid rgb(from var(--palette-error-main) r g b/.4)}.AttachmentPreview_uploadingOverlay__leV1D{background:rgb(from var(--palette-background-b-1) r g b/.5);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_uploadingSpinner__u-t7d{align-items:center;backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08);border-radius:6px;display:flex;height:24px;justify-content:center;position:absolute;right:-6px;top:-6px;width:24px;z-index:2}.AttachmentPreview_loader__HK5bZ{color:var(--palette-primary-text-6)!important;height:14px!important;width:14px!important}.AttachmentPreview_errorOverlay__8sM1d{background:rgb(from var(--palette-error-main) r g b/.08);border-radius:8px;inset:0;pointer-events:none;position:absolute}.AttachmentPreview_retryButton__tKVV0{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.AttachmentPreview_retryButton__tKVV0 button{backdrop-filter:blur(4px);background-color:rgb(from var(--palette-primary-text-1) r g b/.08)!important}.AttachmentPreview_retryButton__tKVV0 button:hover{background-color:rgb(from var(--palette-primary-text-1) r g b/.15)!important}');export{e as default};
2
2
  //# sourceMappingURL=AttachmentPreview.scss.js.map
@@ -1,2 +1,2 @@
1
- import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var t={spacing:"8",capped:"CommentCard_capped__izWBZ",bodySurface:"CommentCard_bodySurface__scobR",editHeader:"CommentCard_editHeader__8aUBt",scrollBody:"CommentCard_scrollBody__CIun9",footer:"CommentCard_footer__z3-CY",repliesSection:"CommentCard_repliesSection__iE7QO",compactBody:"CommentCard_compactBody__zM10O",compactTop:"CommentCard_compactTop__LpiQi",compactTime:"CommentCard_compactTime__JzVQR",compactFooter:"CommentCard_compactFooter__rgB4D",header:"CommentCard_header__T1SH8",headerText:"CommentCard_headerText__DRsQG",nameRow:"CommentCard_nameRow__Or1c0",timestamp:"CommentCard_timestamp__EbJCO",subtitle:"CommentCard_subtitle__d-XRe",avatar:"CommentCard_avatar__NA2ZA",name:"CommentCard_name__9-e7A",chip:"CommentCard_chip__4NUrf",chipAccented:"CommentCard_chipAccented__Xl8ek",bodyRow:"CommentCard_bodyRow__ZUufY",text:"CommentCard_text__eAIZM",attachment:"CommentCard_attachment__KktIn",infoButton:"CommentCard_infoButton__gqcvK",metadataTooltip:"CommentCard_metadataTooltip__AL0xt",metadataRows:"CommentCard_metadataRows__c-kqf",metadataRow:"CommentCard_metadataRow__BqcII",metadataLabel:"CommentCard_metadataLabel__WRWl7",metadataValue:"CommentCard_metadataValue__Xwf7S",metadataUnit:"CommentCard_metadataUnit__Bxeps",contextLine:"CommentCard_contextLine__Jyoui",contextItem:"CommentCard_contextItem__2Xmql",actionsRow:"CommentCard_actionsRow__1Ftxn",actions:"CommentCard_actions__mUmsV",trailingActions:"CommentCard_trailingActions__uGt-3",action:"CommentCard_action__ZfyBP",count:"CommentCard_count__stfpY",liked:"CommentCard_liked__zsBqe",replies:"CommentCard_replies__nRRYo",reply:"CommentCard_reply__7-U7Q",replyHeader:"CommentCard_replyHeader__sWnLA",replyNameRow:"CommentCard_replyNameRow__bs7h2",replyName:"CommentCard_replyName__C8tst",replyTimestamp:"CommentCard_replyTimestamp__YzuW1",replyText:"CommentCard_replyText__8JPKK"};e(".CommentCard_capped__izWBZ{flex-direction:column}.CommentCard_bodySurface__scobR,.CommentCard_capped__izWBZ{overflow-clip-margin:12px;display:flex;overflow:hidden;overflow:clip}.CommentCard_bodySurface__scobR{flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;padding:8px 12px}.CommentCard_editHeader__8aUBt{padding:8px 12px 0}.CommentCard_scrollBody__CIun9{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;margin:0 -24px;min-height:0;overflow-x:hidden;overflow-y:auto;padding:0 24px}.CommentCard_footer__z3-CY{border-top:1px solid var(--palette-background-b-4);display:flex;flex-direction:column;flex-shrink:0;padding:4px 12px 8px}.CommentCard_repliesSection__iE7QO{padding:8px 12px 12px}.CommentCard_compactBody__zM10O{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;overflow:hidden;padding:8px 12px}.CommentCard_compactTop__LpiQi{align-items:center;display:flex;flex-shrink:0;gap:8px}.CommentCard_compactTime__JzVQR{color:var(--palette-primary-text-7);font-size:12px;line-height:16px;margin-left:auto;white-space:nowrap}.CommentCard_compactFooter__rgB4D{border-top:1px solid var(--palette-background-b-4);flex-shrink:0;padding:4px 12px 8px}.CommentCard_header__T1SH8{align-items:center;display:flex;flex-shrink:0;gap:8px}.CommentCard_headerText__DRsQG{display:flex;flex:1 0 0;flex-direction:column;min-width:0;word-break:break-word}.CommentCard_nameRow__Or1c0{align-items:center;display:flex;gap:8px;width:100%}.CommentCard_nameRow__Or1c0 .CommentCard_timestamp__EbJCO{margin-left:auto}.CommentCard_subtitle__d-XRe{color:var(--palette-primary-main);font-size:12px;line-height:16px}.CommentCard_avatar__NA2ZA{flex-shrink:0}.CommentCard_name__9-e7A{color:var(--palette-primary-text-1);flex:0 1 auto;font-size:14px;line-height:20px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CommentCard_timestamp__EbJCO{color:var(--palette-primary-text-7)}.CommentCard_chip__4NUrf,.CommentCard_timestamp__EbJCO{flex-shrink:0;font-size:12px;line-height:16px;white-space:nowrap}.CommentCard_chip__4NUrf{align-items:center;background:rgb(from var(--palette-primary-text-1) r g b/.04);border-radius:8px;color:var(--palette-primary-text-6);display:flex;height:24px;padding:6px 8px}.CommentCard_chipAccented__Xl8ek{border-left:2px solid transparent}.CommentCard_bodyRow__ZUufY{align-items:center;display:flex;gap:8px}.CommentCard_text__eAIZM{color:var(--palette-primary-text-1);flex:1 1 auto;font-size:12px;line-height:16px;min-width:0;white-space:pre-wrap;word-break:break-word}.CommentCard_text__eAIZM a,.CommentCard_text__eAIZM button{font:inherit;padding:0;vertical-align:baseline}.CommentCard_attachment__KktIn{--attachment-arrow-outset:12px;display:flex;flex-direction:column;gap:8px}.CommentCard_infoButton__gqcvK{align-items:center;color:var(--palette-primary-text-6);cursor:default;display:inline-flex}.CommentCard_infoButton__gqcvK:hover{color:var(--palette-primary-text-1)}.CommentCard_metadataTooltip__AL0xt .MuiTooltip-tooltip{max-width:none!important}.CommentCard_metadataRows__c-kqf{display:flex;flex-direction:column;gap:4px;padding:4px 0}.CommentCard_metadataRow__BqcII{align-items:baseline;display:flex;font-size:14px;gap:4px;line-height:20px;white-space:nowrap}.CommentCard_metadataLabel__WRWl7{color:var(--palette-primary-text-6)}.CommentCard_metadataValue__Xwf7S{color:var(--palette-primary-text-1)}.CommentCard_metadataUnit__Bxeps{color:var(--palette-primary-text-6);font-size:12px}.CommentCard_contextLine__Jyoui{align-items:center;color:var(--palette-primary-text-7);column-gap:16px;display:flex;flex-wrap:wrap;font-size:12px;line-height:16px;row-gap:4px}.CommentCard_contextItem__2Xmql{white-space:nowrap}.CommentCard_actionsRow__1Ftxn{align-items:center;display:flex;justify-content:space-between;width:100%}.CommentCard_actions__mUmsV{align-items:center;display:flex;gap:8px}.CommentCard_trailingActions__uGt-3{align-items:center;display:flex;gap:4px}.CommentCard_action__ZfyBP{align-items:center;display:flex;gap:2px}.CommentCard_count__stfpY{color:var(--palette-primary-text-6);font-size:12px;line-height:16px}.CommentCard_liked__zsBqe svg{color:var(--palette-primary-main)}.CommentCard_replies__nRRYo{display:flex;flex-direction:column;gap:8px}.CommentCard_reply__7-U7Q{display:flex;flex-direction:column;gap:4px}.CommentCard_replyHeader__sWnLA{align-items:center;display:flex;gap:8px}.CommentCard_replyNameRow__bs7h2{align-items:center;display:flex;flex:1 0 0;gap:12px;min-width:0}.CommentCard_replyName__C8tst{color:var(--palette-primary-text-1);font-size:14px;line-height:20px;white-space:nowrap}.CommentCard_replyTimestamp__YzuW1{color:var(--palette-primary-text-7);flex:1 0 0;font-size:12px;line-height:16px;min-width:0}.CommentCard_replyText__8JPKK{color:var(--palette-primary-text-1);font-size:12px;line-height:16px;padding-left:40px;white-space:pre-wrap;word-break:break-word}.CommentCard_replyText__8JPKK a,.CommentCard_replyText__8JPKK button{font:inherit;padding:0;vertical-align:baseline}");export{t as default};
1
+ import e from'./../../ext-esm/style-inject/dist/style-inject.es.js';var t={spacing:"8",capped:"CommentCard_capped__izWBZ",bodySurface:"CommentCard_bodySurface__scobR",editHeader:"CommentCard_editHeader__8aUBt",scrollBody:"CommentCard_scrollBody__CIun9",footer:"CommentCard_footer__z3-CY",repliesSection:"CommentCard_repliesSection__iE7QO",compactBody:"CommentCard_compactBody__zM10O",compactTop:"CommentCard_compactTop__LpiQi",compactTime:"CommentCard_compactTime__JzVQR",compactFooter:"CommentCard_compactFooter__rgB4D",header:"CommentCard_header__T1SH8",headerText:"CommentCard_headerText__DRsQG",nameRow:"CommentCard_nameRow__Or1c0",timestamp:"CommentCard_timestamp__EbJCO",subtitle:"CommentCard_subtitle__d-XRe",avatar:"CommentCard_avatar__NA2ZA",name:"CommentCard_name__9-e7A",chip:"CommentCard_chip__4NUrf",chipAccented:"CommentCard_chipAccented__Xl8ek",bodyRow:"CommentCard_bodyRow__ZUufY",text:"CommentCard_text__eAIZM",attachment:"CommentCard_attachment__KktIn",infoButton:"CommentCard_infoButton__gqcvK",metadataTooltip:"CommentCard_metadataTooltip__AL0xt",metadataRows:"CommentCard_metadataRows__c-kqf",metadataRow:"CommentCard_metadataRow__BqcII",metadataLabel:"CommentCard_metadataLabel__WRWl7",metadataValue:"CommentCard_metadataValue__Xwf7S",metadataUnit:"CommentCard_metadataUnit__Bxeps",contextLine:"CommentCard_contextLine__Jyoui",contextItem:"CommentCard_contextItem__2Xmql",actionsRow:"CommentCard_actionsRow__1Ftxn",actions:"CommentCard_actions__mUmsV",trailingActions:"CommentCard_trailingActions__uGt-3",action:"CommentCard_action__ZfyBP",count:"CommentCard_count__stfpY",liked:"CommentCard_liked__zsBqe",replies:"CommentCard_replies__nRRYo",reply:"CommentCard_reply__7-U7Q",replyHeader:"CommentCard_replyHeader__sWnLA",replyNameRow:"CommentCard_replyNameRow__bs7h2",replyName:"CommentCard_replyName__C8tst",replyTimestamp:"CommentCard_replyTimestamp__YzuW1",replyText:"CommentCard_replyText__8JPKK"};e(".CommentCard_capped__izWBZ{display:flex;flex-direction:column;overflow:hidden}.CommentCard_bodySurface__scobR{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;overflow:hidden;padding:8px 12px}.CommentCard_editHeader__8aUBt{padding:8px 12px 0}.CommentCard_scrollBody__CIun9{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;overflow-x:hidden;overflow-y:auto}.CommentCard_footer__z3-CY{border-top:1px solid var(--palette-background-b-4);display:flex;flex-direction:column;flex-shrink:0;padding:4px 12px 8px}.CommentCard_repliesSection__iE7QO{padding:8px 12px 12px}.CommentCard_compactBody__zM10O{display:flex;flex:1 1 auto;flex-direction:column;gap:8px;min-height:0;overflow:hidden;padding:8px 12px}.CommentCard_compactTop__LpiQi{align-items:center;display:flex;flex-shrink:0;gap:8px}.CommentCard_compactTime__JzVQR{color:var(--palette-primary-text-7);font-size:12px;line-height:16px;margin-left:auto;white-space:nowrap}.CommentCard_compactFooter__rgB4D{border-top:1px solid var(--palette-background-b-4);flex-shrink:0;padding:4px 12px 8px}.CommentCard_header__T1SH8{align-items:center;display:flex;flex-shrink:0;gap:8px}.CommentCard_headerText__DRsQG{display:flex;flex:1 0 0;flex-direction:column;min-width:0;word-break:break-word}.CommentCard_nameRow__Or1c0{align-items:center;display:flex;gap:8px;width:100%}.CommentCard_nameRow__Or1c0 .CommentCard_timestamp__EbJCO{margin-left:auto}.CommentCard_subtitle__d-XRe{color:var(--palette-primary-main);font-size:12px;line-height:16px}.CommentCard_avatar__NA2ZA{flex-shrink:0}.CommentCard_name__9-e7A{color:var(--palette-primary-text-1);flex:0 1 auto;font-size:14px;line-height:20px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CommentCard_timestamp__EbJCO{color:var(--palette-primary-text-7)}.CommentCard_chip__4NUrf,.CommentCard_timestamp__EbJCO{flex-shrink:0;font-size:12px;line-height:16px;white-space:nowrap}.CommentCard_chip__4NUrf{align-items:center;background:rgb(from var(--palette-primary-text-1) r g b/.04);border-radius:8px;color:var(--palette-primary-text-6);display:flex;height:24px;padding:6px 8px}.CommentCard_chipAccented__Xl8ek{border-left:2px solid transparent}.CommentCard_bodyRow__ZUufY{align-items:center;display:flex;gap:8px}.CommentCard_text__eAIZM{color:var(--palette-primary-text-1);flex:1 1 auto;font-size:12px;line-height:16px;min-width:0;white-space:pre-wrap;word-break:break-word}.CommentCard_text__eAIZM a,.CommentCard_text__eAIZM button{font:inherit;padding:0;vertical-align:baseline}.CommentCard_attachment__KktIn{display:flex;flex-direction:column;gap:8px}.CommentCard_infoButton__gqcvK{align-items:center;color:var(--palette-primary-text-6);cursor:default;display:inline-flex}.CommentCard_infoButton__gqcvK:hover{color:var(--palette-primary-text-1)}.CommentCard_metadataTooltip__AL0xt .MuiTooltip-tooltip{max-width:none!important}.CommentCard_metadataRows__c-kqf{display:flex;flex-direction:column;gap:4px;padding:4px 0}.CommentCard_metadataRow__BqcII{align-items:baseline;display:flex;font-size:14px;gap:4px;line-height:20px;white-space:nowrap}.CommentCard_metadataLabel__WRWl7{color:var(--palette-primary-text-6)}.CommentCard_metadataValue__Xwf7S{color:var(--palette-primary-text-1)}.CommentCard_metadataUnit__Bxeps{color:var(--palette-primary-text-6);font-size:12px}.CommentCard_contextLine__Jyoui{align-items:center;color:var(--palette-primary-text-7);column-gap:16px;display:flex;flex-wrap:wrap;font-size:12px;line-height:16px;row-gap:4px}.CommentCard_contextItem__2Xmql{white-space:nowrap}.CommentCard_actionsRow__1Ftxn{align-items:center;display:flex;justify-content:space-between;width:100%}.CommentCard_actions__mUmsV{align-items:center;display:flex;gap:8px}.CommentCard_trailingActions__uGt-3{align-items:center;display:flex;gap:4px}.CommentCard_action__ZfyBP{align-items:center;display:flex;gap:2px}.CommentCard_count__stfpY{color:var(--palette-primary-text-6);font-size:12px;line-height:16px}.CommentCard_liked__zsBqe svg{color:var(--palette-primary-main)}.CommentCard_replies__nRRYo{display:flex;flex-direction:column;gap:8px}.CommentCard_reply__7-U7Q{display:flex;flex-direction:column;gap:4px}.CommentCard_replyHeader__sWnLA{align-items:center;display:flex;gap:8px}.CommentCard_replyNameRow__bs7h2{align-items:center;display:flex;flex:1 0 0;gap:12px;min-width:0}.CommentCard_replyName__C8tst{color:var(--palette-primary-text-1);font-size:14px;line-height:20px;white-space:nowrap}.CommentCard_replyTimestamp__YzuW1{color:var(--palette-primary-text-7);flex:1 0 0;font-size:12px;line-height:16px;min-width:0}.CommentCard_replyText__8JPKK{color:var(--palette-primary-text-1);font-size:12px;line-height:16px;padding-left:40px;white-space:pre-wrap;word-break:break-word}.CommentCard_replyText__8JPKK a,.CommentCard_replyText__8JPKK button{font:inherit;padding:0;vertical-align:baseline}");export{t as default};
2
2
  //# sourceMappingURL=CommentCard.scss.js.map