@corva/ui 3.77.0-2 → 3.77.0-4

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/toConsumableArray"),o=require("react"),n=require("@material-ui/core"),i=require("classnames"),c=require("../FeedCard/FeedCard.js"),r=require("../AttachmentPreview/useStoredAttachments.js"),t=require("../FeedCard/useFeedActivity.js"),a=require("../AttachmentPreview/AttachmentPreview.js");require("../../componentsV2/FileIcon/FileIcon.js"),require("../../componentsV2/ButtonIcon/ButtonIcon.js");var u=require("../../componentsV2/Tooltip/Tooltip.js"),l=require("react/jsx-runtime"),m=require("../../icons/iconParkIcons.js");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("@babel/runtime/helpers/slicedToArray"),require("../../componentsV2/Menu/Menu.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../clients/jsonApi/index.js"),require("../../utils/main.js"),require("../AttachmentPreview/AttachmentImage.js"),require("../AttachmentPreview/AttachmentPreview.scss.js"),require("file-extension"),require("image-extensions"),require("video-extensions");var d=require("../../componentsV2/Avatar/Avatar.js"),j=require("../LinkedText/LinkedText.js"),p=require("./CommentCardReactions.js"),q=require("./CommentCardReplies.js"),h=require("./CommentCard.scss.js");function I(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=I(e),x=I(s),C=I(i);function b(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function f(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?b(Object(o),!0).forEach((function(s){v.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var y=function(e){var s=e.rows;return l.jsx("div",{className:h.metadataRows,children:s.map((function(e){var s=e.label,o=e.value,n=e.unit;return l.jsxs("div",{className:h.metadataRow,children:[l.jsx("span",{className:h.metadataLabel,children:s}),l.jsx("span",{className:h.metadataValue,children:o}),n&&l.jsx("span",{className:h.metadataUnit,children:n})]},s)}))})},O=o.forwardRef((function(e,s){var i=e.activity,I=e.variant,v=void 0===I?"expanded":I,b=e.author,O=e.timestamp,A=e.subtitle,F=e.body,N=e.contextRows,g=e.attachment,R=e.storedAttachments,w=e.isLiked,P=e.likesCount,M=e.commentsCount,k=e.replies,T=e.hasMoreReplies,S=e.moreRepliesCount,D=e.attachments,E=e.onAttachmentClick,L=e.onAttachmentShare,_=e.attachmentSlot,B=e.chip,G=e.chipColor,H=e.onLike,U=e.onReplyToggle,V=e.onForward,z=e.onShowMoreReplies,X=e.menuItems,W=e.isReplyOpen,K=e.replyInput,Z=e.editForm,J=e.width,Q=e.onMouseEnter,Y=e.onMouseLeave,$=e.className,ee=e.testId,se=t.useFeedActivity(i,"comment"),oe=se?[].concat(x.default(null!=X?X:[]),x.default(se.menuItems)):X,ne=se?se.replyInput:K,ie=se?se.isReplyOpen:W,ce=se?se.replies:k,re=!(null==N||!N.length),te=re&&!B,ae=!!(se||H||U||V||null!=oe&&oe.length||te),ue=te&&l.jsx(u.Tooltip,{placement:"top",className:h.metadataTooltip,title:l.jsx(y,{rows:N}),children:l.jsx("span",{className:h.infoButton,"data-testid":"comment-card-info",children:l.jsx(m.InfoIcon,{size:12,strokeWidth:2})})}),le=l.jsx(p.CommentCardReactions,{info:ue,commentsCount:se?se.commentsCount:M,likesCount:se?se.likesCount:P,isLiked:se?se.isLiked:w,menuItems:oe,onLike:se?se.onLike:H,onReplyToggle:se?se.onReplyToggle:U,onForward:V}),me=l.jsxs("div",{className:h.bodyRow,children:[l.jsx("div",{className:h.text,children:l.jsx(j.LinkedText,{children:F})}),B&&l.jsx(u.Tooltip,{placement:"top",className:h.metadataTooltip,title:re?l.jsx(y,{rows:N}):"",children:l.jsx("span",{className:C.default(h.chip,!!G&&h.chipAccented),style:G?{borderLeftColor:G}:void 0,children:B})})]}),de=o.useMemo((function(){return null!=R?R:[g].filter(Boolean)}),[R,g]),je=r.useStoredAttachments(de),pe=je.length?je:D,qe=null!=pe&&pe.length?l.jsx(a.AttachmentPreview,{items:pe,onItemClick:E,onShare:L}):null,he={ref:s,width:J,radius:12,onMouseEnter:Q,onMouseLeave:Y,testId:ee,className:$};if(null!=se&&se.isDeleted)return null;var Ie=function(e){return l.jsxs(l.Fragment,{children:[e,null==se?void 0:se.deleteDialog]})};if("preview"===v)return Ie(l.jsxs(c.FeedCard,f(f({},he),{},{maxHeight:c.FEED_CARD_MAX_HEIGHT_PX,children:[l.jsxs("div",{className:h.compactBody,children:[l.jsxs("div",{className:h.compactTop,children:[l.jsx(d.Avatar,{size:24,name:b.name,imageSrc:b.avatarUrl,className:h.avatar}),l.jsx("span",{className:h.name,children:b.name}),l.jsx("span",{className:h.compactTime,children:O})]}),l.jsx("div",{className:h.scrollBody,children:me})]}),ae&&l.jsx("div",{className:h.compactFooter,children:le})]})));var ve=!!Z,xe=l.jsxs("div",{className:h.header,children:[l.jsx(d.Avatar,{size:24,name:b.name,imageSrc:b.avatarUrl,className:h.avatar}),l.jsxs("div",{className:h.headerText,children:[l.jsxs("div",{className:h.nameRow,children:[l.jsx("span",{className:h.name,children:b.name}),O&&l.jsx("span",{className:h.timestamp,children:O})]}),A&&l.jsx("span",{className:h.subtitle,children:A})]})]});return Ie(ve?l.jsxs(c.FeedCard,f(f({},he),{},{children:[l.jsx("div",{className:h.editHeader,children:xe}),Z]})):l.jsxs(c.FeedCard,f(f({},he),{},{children:[l.jsxs("div",{className:h.capped,style:{maxHeight:c.FEED_CARD_MAX_HEIGHT_PX},children:[l.jsxs("div",{className:h.bodySurface,children:[xe,l.jsxs("div",{className:h.scrollBody,children:[me,(qe||_)&&l.jsxs("div",{className:h.attachment,children:[qe,_]})]})]}),ae&&l.jsx("div",{className:h.footer,children:le})]}),ae&&l.jsx(n.Collapse,{in:ie,timeout:250,unmountOnExit:!0,children:l.jsx("div",{className:h.repliesSection,children:l.jsx(q.CommentCardReplies,{replies:ce,hasMoreReplies:se?se.hasMoreReplies:T,moreRepliesCount:se?se.moreRepliesCount:S,isReplyOpen:ie,replyInput:ne,onShowMoreReplies:se?se.onShowMoreReplies:z})})})]})))}));exports.CommentCard=O;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/toConsumableArray"),o=require("react"),n=require("@material-ui/core"),i=require("classnames"),c=require("../FeedCard/FeedCard.js"),r=require("../AttachmentPreview/useStoredAttachments.js"),t=require("../FeedCard/useFeedActivity.js"),a=require("../AttachmentPreview/AttachmentPreview.js");require("../../componentsV2/FileIcon/FileIcon.js"),require("../../componentsV2/ButtonIcon/ButtonIcon.js");var u=require("../../componentsV2/Tooltip/Tooltip.js"),l=require("react/jsx-runtime"),m=require("../../icons/iconParkIcons.js");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("@babel/runtime/helpers/slicedToArray"),require("../../componentsV2/Menu/Menu.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../clients/jsonApi/index.js"),require("../../utils/main.js"),require("../AttachmentPreview/AttachmentImage.js"),require("../AttachmentPreview/AttachmentPreview.scss.js"),require("file-extension"),require("image-extensions"),require("video-extensions");var d=require("../../componentsV2/Avatar/Avatar.js"),j=require("../LinkedText/LinkedText.js"),p=require("./CommentCardReactions.js"),q=require("./CommentCardReplies.js"),h=require("./CommentCard.scss.js");function I(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=I(e),x=I(s),C=I(i);function b(e,s){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),o.push.apply(o,n)}return o}function f(e){for(var s=1;s<arguments.length;s++){var o=null!=arguments[s]?arguments[s]:{};s%2?b(Object(o),!0).forEach((function(s){v.default(e,s,o[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(o,s))}))}return e}var y=function(e){var s=e.rows;return l.jsx("div",{className:h.metadataRows,children:s.map((function(e){var s=e.label,o=e.value,n=e.unit;return l.jsxs("div",{className:h.metadataRow,children:[l.jsx("span",{className:h.metadataLabel,children:s}),l.jsx("span",{className:h.metadataValue,children:o}),n&&l.jsx("span",{className:h.metadataUnit,children:n})]},s)}))})},O=o.forwardRef((function(e,s){var i=e.activity,I=e.variant,v=void 0===I?"expanded":I,b=e.author,O=e.timestamp,A=e.subtitle,F=e.body,N=e.contextRows,g=e.attachment,R=e.storedAttachments,P=e.isLiked,w=e.likesCount,M=e.commentsCount,k=e.replies,T=e.hasMoreReplies,S=e.moreRepliesCount,D=e.attachments,E=e.onAttachmentClick,L=e.onAttachmentShare,_=e.attachmentSlot,B=e.chip,G=e.chipColor,H=e.onLike,U=e.onReplyToggle,V=e.onForward,z=e.onShowMoreReplies,X=e.menuItems,W=e.isReplyOpen,K=e.replyInput,Z=e.editForm,J=e.width,Q=e.onMouseEnter,Y=e.onMouseLeave,$=e.className,ee=e.testId,se=t.useFeedActivity(i,"comment"),oe=se?[].concat(x.default(null!=X?X:[]),x.default(se.menuItems)):X,ne=se?se.replyInput:K,ie=se?se.isReplyOpen:W,ce=se?se.replies:k,re=!(null==N||!N.length),te=re&&!B,ae=!!(se||H||U||V||null!=oe&&oe.length||te),ue=te&&l.jsx(u.Tooltip,{placement:"top",className:h.metadataTooltip,title:l.jsx(y,{rows:N}),children:l.jsx("span",{className:h.infoButton,"data-testid":"comment-card-info",children:l.jsx(m.InfoIcon,{size:12,strokeWidth:2})})}),le=l.jsx(p.CommentCardReactions,{info:ue,commentsCount:se?se.commentsCount:M,likesCount:se?se.likesCount:w,isLiked:se?se.isLiked:P,menuItems:oe,onLike:se?se.onLike:H,onReplyToggle:se?se.onReplyToggle:U,onForward:V}),me=l.jsxs("div",{className:h.text,children:[B&&l.jsx(u.Tooltip,{placement:"top",className:h.metadataTooltip,title:re?l.jsx(y,{rows:N}):"",children:l.jsxs("span",{className:C.default(h.chip,!!G&&h.chipAccented),style:G?{"--chip-color":G}:void 0,children:[G&&l.jsx("span",{className:h.chipDot}),B]})}),l.jsx(j.LinkedText,{children:F})]}),de=o.useMemo((function(){return null!=R?R:[g].filter(Boolean)}),[R,g]),je=r.useStoredAttachments(de),pe=je.length?je:D,qe=null!=pe&&pe.length?l.jsx(a.AttachmentPreview,{items:pe,onItemClick:E,onShare:L}):null,he={ref:s,width:J,radius:12,onMouseEnter:Q,onMouseLeave:Y,testId:ee,className:$};if(null!=se&&se.isDeleted)return null;var Ie=function(e){return l.jsxs(l.Fragment,{children:[e,null==se?void 0:se.deleteDialog]})};if("preview"===v)return Ie(l.jsxs(c.FeedCard,f(f({},he),{},{maxHeight:c.FEED_CARD_MAX_HEIGHT_PX,children:[l.jsxs("div",{className:h.compactBody,children:[l.jsxs("div",{className:h.compactTop,children:[l.jsx(d.Avatar,{size:24,name:b.name,imageSrc:b.avatarUrl,className:h.avatar}),l.jsx("span",{className:h.name,children:b.name}),l.jsx("span",{className:h.compactTime,children:O})]}),l.jsx("div",{className:h.scrollBody,children:me})]}),ae&&l.jsx("div",{className:h.compactFooter,children:le})]})));var ve=!!Z,xe=l.jsxs("div",{className:h.header,children:[l.jsx(d.Avatar,{size:24,name:b.name,imageSrc:b.avatarUrl,className:h.avatar}),l.jsxs("div",{className:h.headerText,children:[l.jsxs("div",{className:h.nameRow,children:[l.jsx("span",{className:h.name,children:b.name}),O&&l.jsx("span",{className:h.timestamp,children:O})]}),A&&l.jsx("span",{className:h.subtitle,children:A})]})]});return Ie(ve?l.jsxs(c.FeedCard,f(f({},he),{},{children:[l.jsx("div",{className:h.editHeader,children:xe}),Z]})):l.jsxs(c.FeedCard,f(f({},he),{},{children:[l.jsxs("div",{className:h.capped,style:{maxHeight:c.FEED_CARD_MAX_HEIGHT_PX},children:[l.jsxs("div",{className:h.bodySurface,children:[xe,l.jsxs("div",{className:h.scrollBody,children:[me,(qe||_)&&l.jsxs("div",{className:h.attachment,children:[qe,_]})]})]}),ae&&l.jsx("div",{className:h.footer,children:le})]}),ae&&l.jsx(n.Collapse,{in:ie,timeout:250,unmountOnExit:!0,children:l.jsx("div",{className:h.repliesSection,children:l.jsx(q.CommentCardReplies,{replies:ce,hasMoreReplies:se?se.hasMoreReplies:T,moreRepliesCount:se?se.moreRepliesCount:S,isReplyOpen:ie,replyInput:ne,onShowMoreReplies:se?se.onShowMoreReplies:z})})})]})))}));exports.CommentCard=O;
2
2
  //# sourceMappingURL=CommentCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentCard.js","sources":["../../../../src/components/CommentCard/CommentCard.tsx"],"sourcesContent":["import { forwardRef, ReactElement, useMemo } from 'react';\nimport { Collapse } from '@material-ui/core';\nimport classNames from 'classnames';\n\nimport { FeedCard, FEED_CARD_MAX_HEIGHT_PX } from '../FeedCard';\nimport { StoredAttachment } from '../AttachmentPreview/useStoredAttachment';\nimport { useStoredAttachments } from '../AttachmentPreview/useStoredAttachments';\nimport { useFeedActivity } from '../FeedCard/useFeedActivity';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LinkedText } from '../LinkedText';\nimport { InfoIcon } from '../../icons';\n\nimport { CommentCardReactions } from './CommentCardReactions';\nimport { CommentCardReplies } from './CommentCardReplies';\nimport { CommentCardProps, CommentContextRow } from './CommentCard.types';\n\nimport styles from './CommentCard.scss';\n\nconst MetadataTooltip = ({ rows }: { rows: CommentContextRow[] }) => (\n <div className={styles.metadataRows}>\n {rows.map(({ label, value, unit }) => (\n <div key={label} className={styles.metadataRow}>\n <span className={styles.metadataLabel}>{label}</span>\n <span className={styles.metadataValue}>{value}</span>\n {unit && <span className={styles.metadataUnit}>{unit}</span>}\n </div>\n ))}\n </div>\n);\n\nexport const CommentCard = forwardRef<HTMLDivElement, CommentCardProps>((props, ref) => {\n const {\n activity,\n variant = 'expanded',\n author,\n timestamp,\n subtitle,\n body,\n contextRows,\n attachment,\n storedAttachments,\n isLiked,\n likesCount,\n commentsCount,\n replies,\n hasMoreReplies,\n moreRepliesCount,\n attachments,\n onAttachmentClick,\n onAttachmentShare,\n attachmentSlot,\n chip,\n chipColor,\n onLike,\n onReplyToggle,\n onForward,\n onShowMoreReplies,\n menuItems,\n isReplyOpen,\n replyInput,\n editForm,\n width,\n onMouseEnter,\n onMouseLeave,\n className,\n testId,\n } = props;\n\n const activityBinding = useFeedActivity(activity, 'comment');\n const cardMenuItems = activityBinding\n ? [...(menuItems ?? []), ...activityBinding.menuItems]\n : menuItems;\n const cardReplyInput = activityBinding ? activityBinding.replyInput : replyInput;\n const cardIsReplyOpen = activityBinding ? activityBinding.isReplyOpen : isReplyOpen;\n const cardReplies = activityBinding ? activityBinding.replies : replies;\n\n const hasMetadata = !!contextRows?.length;\n // The chip takes over the metadata tooltip when present, so the info icon is redundant.\n const showInfoIcon = hasMetadata && !chip;\n\n const hasFooter = !!(\n activityBinding ||\n onLike ||\n onReplyToggle ||\n onForward ||\n cardMenuItems?.length ||\n showInfoIcon\n );\n\n const info = showInfoIcon && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={<MetadataTooltip rows={contextRows} />}\n >\n <span className={styles.infoButton} data-testid=\"comment-card-info\">\n <InfoIcon size={12} strokeWidth={2} />\n </span>\n </Tooltip>\n );\n\n const reactions = (\n <CommentCardReactions\n info={info}\n commentsCount={activityBinding ? activityBinding.commentsCount : commentsCount}\n likesCount={activityBinding ? activityBinding.likesCount : likesCount}\n isLiked={activityBinding ? activityBinding.isLiked : isLiked}\n menuItems={cardMenuItems}\n onLike={activityBinding ? activityBinding.onLike : onLike}\n onReplyToggle={activityBinding ? activityBinding.onReplyToggle : onReplyToggle}\n onForward={onForward}\n />\n );\n\n const bodyRow = (\n <div className={styles.bodyRow}>\n <div className={styles.text}>\n <LinkedText>{body}</LinkedText>\n </div>\n {chip && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={hasMetadata ? <MetadataTooltip rows={contextRows} /> : ''}\n >\n <span\n className={classNames(styles.chip, !!chipColor && styles.chipAccented)}\n style={chipColor ? { borderLeftColor: chipColor } : undefined}\n >\n {chip}\n </span>\n </Tooltip>\n )}\n </div>\n );\n\n const storedList = useMemo(\n () => storedAttachments ?? ([attachment].filter(Boolean) as StoredAttachment[]),\n [storedAttachments, attachment]\n );\n const storedItems = useStoredAttachments(storedList);\n const items = storedItems.length ? storedItems : attachments;\n\n // Undefined is the norm, which lets AttachmentPreview run its own lightbox; a caller that\n // passes the prop is taking the click over.\n const attachmentPreview = items?.length ? (\n <AttachmentPreview items={items} onItemClick={onAttachmentClick} onShare={onAttachmentShare} />\n ) : null;\n\n const surfaceProps = {\n ref,\n width,\n radius: 12,\n onMouseEnter,\n onMouseLeave,\n testId,\n className,\n };\n\n if (activityBinding?.isDeleted) return null;\n const withOverlays = (card: ReactElement) => (\n <>\n {card}\n {activityBinding?.deleteDialog}\n </>\n );\n\n if (variant === 'preview') {\n return withOverlays(\n <FeedCard {...surfaceProps} maxHeight={FEED_CARD_MAX_HEIGHT_PX}>\n <div className={styles.compactBody}>\n <div className={styles.compactTop}>\n <Avatar\n size={24}\n name={author.name}\n imageSrc={author.avatarUrl}\n className={styles.avatar}\n />\n <span className={styles.name}>{author.name}</span>\n <span className={styles.compactTime}>{timestamp}</span>\n </div>\n <div className={styles.scrollBody}>{bodyRow}</div>\n </div>\n {hasFooter && <div className={styles.compactFooter}>{reactions}</div>}\n </FeedCard>\n );\n }\n\n const editing = !!editForm;\n\n const headerEl = (\n <div className={styles.header}>\n <Avatar size={24} name={author.name} imageSrc={author.avatarUrl} className={styles.avatar} />\n <div className={styles.headerText}>\n <div className={styles.nameRow}>\n <span className={styles.name}>{author.name}</span>\n {timestamp && <span className={styles.timestamp}>{timestamp}</span>}\n </div>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n </div>\n );\n\n if (editing) {\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.editHeader}>{headerEl}</div>\n {editForm}\n </FeedCard>\n );\n }\n\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.capped} style={{ maxHeight: FEED_CARD_MAX_HEIGHT_PX }}>\n <div className={styles.bodySurface}>\n {headerEl}\n\n <div className={styles.scrollBody}>\n {bodyRow}\n {(attachmentPreview || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachmentPreview}\n {attachmentSlot}\n </div>\n )}\n </div>\n </div>\n\n {hasFooter && <div className={styles.footer}>{reactions}</div>}\n </div>\n\n {hasFooter && (\n <Collapse in={cardIsReplyOpen} timeout={250} unmountOnExit>\n <div className={styles.repliesSection}>\n <CommentCardReplies\n replies={cardReplies}\n hasMoreReplies={activityBinding ? activityBinding.hasMoreReplies : hasMoreReplies}\n moreRepliesCount={\n activityBinding ? activityBinding.moreRepliesCount : moreRepliesCount\n }\n isReplyOpen={cardIsReplyOpen}\n replyInput={cardReplyInput}\n onShowMoreReplies={\n activityBinding ? activityBinding.onShowMoreReplies : onShowMoreReplies\n }\n />\n </div>\n </Collapse>\n )}\n </FeedCard>\n );\n});\n"],"names":["MetadataTooltip","_ref","rows","_jsx","className","styles","metadataRows","children","map","_ref2","label","value","unit","_jsxs","metadataRow","jsx","metadataLabel","metadataValue","metadataUnit","CommentCard","forwardRef","props","ref","activity","_props$variant","variant","author","timestamp","subtitle","body","contextRows","attachment","storedAttachments","isLiked","likesCount","commentsCount","replies","hasMoreReplies","moreRepliesCount","attachments","onAttachmentClick","onAttachmentShare","attachmentSlot","chip","chipColor","onLike","onReplyToggle","onForward","onShowMoreReplies","menuItems","isReplyOpen","replyInput","editForm","width","onMouseEnter","onMouseLeave","testId","activityBinding","useFeedActivity","cardMenuItems","cardReplyInput","cardIsReplyOpen","cardReplies","hasMetadata","length","showInfoIcon","hasFooter","info","Tooltip","placement","metadataTooltip","title","infoButton","InfoIcon","size","strokeWidth","reactions","CommentCardReactions","bodyRow","jsxs","text","LinkedText","classNames","chipAccented","style","borderLeftColor","undefined","storedList","useMemo","filter","Boolean","storedItems","useStoredAttachments","items","attachmentPreview","AttachmentPreview","onItemClick","onShare","surfaceProps","radius","isDeleted","withOverlays","card","_Fragment","deleteDialog","FeedCard","maxHeight","FEED_CARD_MAX_HEIGHT_PX","compactBody","compactTop","Avatar","name","imageSrc","avatarUrl","avatar","compactTime","scrollBody","compactFooter","editing","headerEl","header","headerText","nameRow","editHeader","capped","bodySurface","footer","Collapse","in","timeout","un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gH,GAED1G,EAAAkE,KAAA,MAAA,CAAK3E,UAAWC,EAAO+G,WAAW7G,SAAA,CAC/BuE,IACCgB,IAAqBpD,IACrB7B,EAAAkE,KAAA,MAAA,CAAK3E,UAAWC,EAAO0B,WAAWxB,SAC/BuF,CAAAA,GACApD,WAMRwB,IAAa/D,EAAAY,IAAA,MAAA,CAAKX,UAAWC,EAAOyH,OAAOvH,SAAEqE,QAG/CV,IACC/D,EAAAY,IAACgH,WAAQ,CAACC,GAAInE,GAAiBoE,QAAS,IAAKC,eAAa,EAAA3H,SACxDJ,EAAAY,IAAA,MAAA,CAAKX,UAAWC,EAAO8H,eAAe5H,SACpCJ,MAACiI,qBAAkB,CACjBhG,QAAS0B,GACTzB,eAAgBoB,GAAkBA,GAAgBpB,eAAiBA,EACnEC,iBACEmB,GAAkBA,GAAgBnB,iBAAmBA,EAEvDY,YAAaW,GACbV,WAAYS,GACZZ,kBACES,GAAkBA,GAAgBT,kBAAoBA,YAQtE"}
1
+ {"version":3,"file":"CommentCard.js","sources":["../../../../src/components/CommentCard/CommentCard.tsx"],"sourcesContent":["import { CSSProperties, forwardRef, ReactElement, useMemo } from 'react';\nimport { Collapse } from '@material-ui/core';\nimport classNames from 'classnames';\n\nimport { FeedCard, FEED_CARD_MAX_HEIGHT_PX } from '../FeedCard';\nimport { StoredAttachment } from '../AttachmentPreview/useStoredAttachment';\nimport { useStoredAttachments } from '../AttachmentPreview/useStoredAttachments';\nimport { useFeedActivity } from '../FeedCard/useFeedActivity';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LinkedText } from '../LinkedText';\nimport { InfoIcon } from '../../icons';\n\nimport { CommentCardReactions } from './CommentCardReactions';\nimport { CommentCardReplies } from './CommentCardReplies';\nimport { CommentCardProps, CommentContextRow } from './CommentCard.types';\n\nimport styles from './CommentCard.scss';\n\nconst MetadataTooltip = ({ rows }: { rows: CommentContextRow[] }) => (\n <div className={styles.metadataRows}>\n {rows.map(({ label, value, unit }) => (\n <div key={label} className={styles.metadataRow}>\n <span className={styles.metadataLabel}>{label}</span>\n <span className={styles.metadataValue}>{value}</span>\n {unit && <span className={styles.metadataUnit}>{unit}</span>}\n </div>\n ))}\n </div>\n);\n\nexport const CommentCard = forwardRef<HTMLDivElement, CommentCardProps>((props, ref) => {\n const {\n activity,\n variant = 'expanded',\n author,\n timestamp,\n subtitle,\n body,\n contextRows,\n attachment,\n storedAttachments,\n isLiked,\n likesCount,\n commentsCount,\n replies,\n hasMoreReplies,\n moreRepliesCount,\n attachments,\n onAttachmentClick,\n onAttachmentShare,\n attachmentSlot,\n chip,\n chipColor,\n onLike,\n onReplyToggle,\n onForward,\n onShowMoreReplies,\n menuItems,\n isReplyOpen,\n replyInput,\n editForm,\n width,\n onMouseEnter,\n onMouseLeave,\n className,\n testId,\n } = props;\n\n const activityBinding = useFeedActivity(activity, 'comment');\n const cardMenuItems = activityBinding\n ? [...(menuItems ?? []), ...activityBinding.menuItems]\n : menuItems;\n const cardReplyInput = activityBinding ? activityBinding.replyInput : replyInput;\n const cardIsReplyOpen = activityBinding ? activityBinding.isReplyOpen : isReplyOpen;\n const cardReplies = activityBinding ? activityBinding.replies : replies;\n\n const hasMetadata = !!contextRows?.length;\n // The chip takes over the metadata tooltip when present, so the info icon is redundant.\n const showInfoIcon = hasMetadata && !chip;\n\n const hasFooter = !!(\n activityBinding ||\n onLike ||\n onReplyToggle ||\n onForward ||\n cardMenuItems?.length ||\n showInfoIcon\n );\n\n const info = showInfoIcon && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={<MetadataTooltip rows={contextRows} />}\n >\n <span className={styles.infoButton} data-testid=\"comment-card-info\">\n <InfoIcon size={12} strokeWidth={2} />\n </span>\n </Tooltip>\n );\n\n const reactions = (\n <CommentCardReactions\n info={info}\n commentsCount={activityBinding ? activityBinding.commentsCount : commentsCount}\n likesCount={activityBinding ? activityBinding.likesCount : likesCount}\n isLiked={activityBinding ? activityBinding.isLiked : isLiked}\n menuItems={cardMenuItems}\n onLike={activityBinding ? activityBinding.onLike : onLike}\n onReplyToggle={activityBinding ? activityBinding.onReplyToggle : onReplyToggle}\n onForward={onForward}\n />\n );\n\n const bodyRow = (\n <div className={styles.text}>\n {chip && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={hasMetadata ? <MetadataTooltip rows={contextRows} /> : ''}\n >\n <span\n className={classNames(styles.chip, !!chipColor && styles.chipAccented)}\n style={chipColor ? ({ '--chip-color': chipColor } as CSSProperties) : undefined}\n >\n {chipColor && <span className={styles.chipDot} />}\n {chip}\n </span>\n </Tooltip>\n )}\n <LinkedText>{body}</LinkedText>\n </div>\n );\n\n const storedList = useMemo(\n () => storedAttachments ?? ([attachment].filter(Boolean) as StoredAttachment[]),\n [storedAttachments, attachment]\n );\n const storedItems = useStoredAttachments(storedList);\n const items = storedItems.length ? storedItems : attachments;\n\n // Undefined is the norm, which lets AttachmentPreview run its own lightbox; a caller that\n // passes the prop is taking the click over.\n const attachmentPreview = items?.length ? (\n <AttachmentPreview items={items} onItemClick={onAttachmentClick} onShare={onAttachmentShare} />\n ) : null;\n\n const surfaceProps = {\n ref,\n width,\n radius: 12,\n onMouseEnter,\n onMouseLeave,\n testId,\n className,\n };\n\n if (activityBinding?.isDeleted) return null;\n const withOverlays = (card: ReactElement) => (\n <>\n {card}\n {activityBinding?.deleteDialog}\n </>\n );\n\n if (variant === 'preview') {\n return withOverlays(\n <FeedCard {...surfaceProps} maxHeight={FEED_CARD_MAX_HEIGHT_PX}>\n <div className={styles.compactBody}>\n <div className={styles.compactTop}>\n <Avatar\n size={24}\n name={author.name}\n imageSrc={author.avatarUrl}\n className={styles.avatar}\n />\n <span className={styles.name}>{author.name}</span>\n <span className={styles.compactTime}>{timestamp}</span>\n </div>\n <div className={styles.scrollBody}>{bodyRow}</div>\n </div>\n {hasFooter && <div className={styles.compactFooter}>{reactions}</div>}\n </FeedCard>\n );\n }\n\n const editing = !!editForm;\n\n const headerEl = (\n <div className={styles.header}>\n <Avatar size={24} name={author.name} imageSrc={author.avatarUrl} className={styles.avatar} />\n <div className={styles.headerText}>\n <div className={styles.nameRow}>\n <span className={styles.name}>{author.name}</span>\n {timestamp && <span className={styles.timestamp}>{timestamp}</span>}\n </div>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n </div>\n );\n\n if (editing) {\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.editHeader}>{headerEl}</div>\n {editForm}\n </FeedCard>\n );\n }\n\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.capped} style={{ maxHeight: FEED_CARD_MAX_HEIGHT_PX }}>\n <div className={styles.bodySurface}>\n {headerEl}\n\n <div className={styles.scrollBody}>\n {bodyRow}\n {(attachmentPreview || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachmentPreview}\n {attachmentSlot}\n </div>\n )}\n </div>\n </div>\n\n {hasFooter && <div className={styles.footer}>{reactions}</div>}\n </div>\n\n {hasFooter && (\n <Collapse in={cardIsReplyOpen} timeout={250} unmountOnExit>\n <div className={styles.repliesSection}>\n <CommentCardReplies\n replies={cardReplies}\n hasMoreReplies={activityBinding ? activityBinding.hasMoreReplies : hasMoreReplies}\n moreRepliesCount={\n activityBinding ? activityBinding.moreRepliesCount : moreRepliesCount\n }\n isReplyOpen={cardIsReplyOpen}\n replyInput={cardReplyInput}\n onShowMoreReplies={\n activityBinding ? activityBinding.onShowMoreReplies : onShowMoreReplies\n }\n />\n </div>\n </Collapse>\n )}\n </FeedCard>\n );\n});\n"],"names":["MetadataTooltip","_ref","rows","_jsx","className","styles","metadataRows","children","map","_ref2","label","value","unit","_jsxs","metadataRow","jsx","metadataLabel","metadataValue","metadataUnit","CommentCard","forwardRef","props","ref","activity","_props$variant","variant","author","timestamp","subtitle","body","contextRows","attachment","storedAttachments","isLiked","likesCount","commentsCount","replies","hasMoreReplies","moreRepliesCount","attachments","onAttachmentClick","onAttachmentShare","attachmentSlot","chip","chipColor","onLike","onReplyToggle","onForward","onShowMoreReplies","menuItems","isReplyOpen","replyInput","editForm","width","onMouseEnter","onMouseLeave","testId","activityBinding","useFeedActivity","cardMenuItems","cardReplyInput","cardIsReplyOpen","cardReplies","hasMetadata","length","showInfoIcon","hasFooter","info","Tooltip","placement","metadataTooltip","title","infoButton","InfoIcon","size","strokeWidth","reactions","CommentCardReactions","bodyRow","jsxs","text","classNames","chipAccented","style","undefined","chipDot","LinkedText","storedList","useMemo","filter","Boolean","storedItems","useStoredAttachments","items","attachmentPreview","AttachmentPreview","onItemClick","onShare","surfaceProps","radius","isDeleted","withOverlays","card","_Fragment","deleteDialog","FeedCard","maxHeight","FEED_CARD_MAX_HEIGHT_PX","compactBody","compactTop","Avatar","name","imageSrc","avatarUrl","avatar","compactTime","scrollBody","compactFooter","editing","headerEl","header","headerText","nameRow","editHeader","capped","bodySurface","footer","Collapse","in","timeout","unmountOnExit","repliesSection","CommentCardReplies"],"mappings":"29LAoBA,IAAMA,EAAkB,SAAHC,GAAA,IAAMC,IAAAA,KAAI,OAC7BC,EAAAA,IAAA,MAAA,CAAKC,UAAWC,EAAOC,aAAaC,SACjCL,EAAKM,KAAI,SAAAC,GAAA,IAAGC,IAAAA,MAAOC,IAAAA,MAAOC,IAAAA,KAAI,OAC7BC,EAAAA,KAAA,MAAA,CAAiBT,UAAWC,EAAOS,YAAYP,SAC7C,CAAAJ,EAAAY,IAAA,OAAA,CAAMX,UAAWC,EAAOW,cAAcT,SAAEG,IACxCP,EAAAY,IAAA,OAAA,CAAMX,UAAWC,EAAOY,cAAcV,SAAEI,IACvCC,GAAQT,EAAAY,IAAA,OAAA,CAAMX,UAAWC,EAAOa,aAAaX,SAAEK,MAHxCF,OAMR,EAGKS,EAAcC,EAAUA,YAAmC,SAACC,EAAOC,GAC9E,IACEC,EAkCEF,EAlCFE,SAAQC,EAkCNH,EAjCFI,QAAAA,aAAU,WAAUD,EACpBE,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
- "use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')(".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}"),module.exports={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"};
1
+ "use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')(".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);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;box-sizing:border-box;color:var(--palette-primary-text-1);cursor:pointer;display:flex;float:right;font-size:12px;gap:4px;height:24px;line-height:16px;margin:4px 0 0 8px;padding:6px;white-space:nowrap}.CommentCard_chipAccented__Xl8ek{background:linear-gradient(94deg,rgb(from var(--chip-color) r g b/.16) 1%,transparent 35%),rgb(from var(--palette-primary-text-1) r g b/.04);border:.5px solid rgb(from var(--chip-color) r g b/.5)}.CommentCard_chipDot__P-usA{background:var(--chip-color);border-radius:50%;flex-shrink:0;height:6px;width:6px}.CommentCard_text__eAIZM{color:var(--palette-primary-text-1);font-size:12px;line-height:16px;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}"),module.exports={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",chipDot:"CommentCard_chipDot__P-usA",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"};
2
2
  //# sourceMappingURL=CommentCard.scss.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/helpers/slicedToArray"),n=require("@babel/runtime/regenerator"),a=require("jsona"),u=require("lodash"),i=require("../../../../clients/jsonApi/index.js"),l=require("../../../../constants/devcenter.js");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");var s=require("../../../../constants/assetTypes.js");require("../../../../constants/corvaCompanyId.js"),require("../../../GradientManager/configuration/constants.js");var c=require("../../../../utils/devcenter.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=p(e),d=p(t),f=p(r),v=p(n);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=new(p(a).default),m=function(e,t){return+u.get(e,["settings",t])},w=function(e,t){return u.uniq(e.map((function(e){var t=f.default(e,2);return t[0],t[1]})).filter((function(e){return Number.isFinite(e)&&!t.includes(String(e))})))};function y(){return(y=d.default(v.default.mark((function e(t){return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getWells({ids:t,fields:["well.name","well.settings","well.company","well.asset_id","well.last_active_at","well.program","well.pad","well.frac_fleet","well.id","well.rig","rig.name","rig.asset_id","company.id","well.status","well.archivation","well.lon_lat"],include_arhivation_data:!0});case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function b(){return(b=d.default(v.default.mark((function e(t){return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getRigs({ids:t,fields:["rig.name","rig.settings","rig.asset_id","rig.active_well","rig.last_active_well","well.name","well.settings","well.company","rig.program","well.asset_id","well.last_active_at","well.id","well.company.id","well.lon_lat"]});case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function S(){return(S=d.default(v.default.mark((function e(t){return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getResolvedAssets({assets:t});case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}var E=function(e,t,r){return _(_({well:e&&_(_({},e.attributes),{},{id:e.id,companyId:u.get(e,"relationships.company.data.id")}),rig:{name:u.get(t,"attributes.name"),id:u.get(t,"id"),asset_id:u.get(t,"attributes.asset_id")},program:{id:u.get(t,"program.id")||null,name:u.get(t,"program.attributes.name")||null}},r&&{interventionUnit:{id:+r.id,name:r.name,active_well:r.active_well}}),{},{completionWellInfo:{pad:{id:u.get(e,"pad.id")||null,name:u.get(e,"pad.attributes.name")||null},fracFleet:{id:u.get(e,"fracFleet.id")||null,name:u.get(e,"fracFleet.attributes.name")||null}}})};function x(){return(x=d.default(v.default.mark((function e(t){var r;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getFracFleets({ids:t,fields:["frac_fleet.name","frac_fleet.pads","frac_fleet.program","frac_fleet.current_pad_id","frac_fleet.pad_frac_fleets","frac_fleet.pad_frac_fleet.frac_fleet_lines"]});case 5:return r=e.sent,e.abrupt("return",r?h.deserialize(r):[]);case 9:return e.prev=9,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",[]);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function T(){return(T=d.default(v.default.mark((function e(t){return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getInterventionUnits({ids:t,fields:["intervention_unit.name","intervention_unit.type","intervention_unit.active_well"]});case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function A(){return A=d.default(v.default.mark((function e(t,r){var n,a,s;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.keyBy(r,"id"),a=t.map(function(){var e=d.default(v.default.mark((function e(t){var r,a,s,c,p,o;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.default(t,2),a=r[0],s=r[1],c={fields:"all",frac_fleet_id:s},p=n[a],a===l.DEV_CENTER_CLI_APP_ID?c.app_key=u.get(p,["app","app_key"]):c.app_id=u.get(p,["app","id"]),e.prev=4,e.next=7,i.getFracFleetWells(c);case 7:return o=e.sent,e.abrupt("return",o?h.deserialize(o):[]);case 11:return e.prev=11,e.t0=e.catch(4),console.error(e.t0),e.abrupt("return",[]);case 15:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t){return e.apply(this,arguments)}}()),e.next=4,Promise.all(a);case 4:return s=e.sent,e.abrupt("return",s.reduce((function(e,r,n){return e[t[n][0]]=r,e}),{}));case 6:case"end":return e.stop()}}),e)}))),A.apply(this,arguments)}function P(){return P=d.default(v.default.mark((function e(t,r){var n,a,s;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.keyBy(r,"id"),a=t.map(function(){var e=d.default(v.default.mark((function e(t){var r,a,s,c,p,o;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.default(t,2),a=r[0],s=r[1],c={fields:"all"},p=n[a],a===l.DEV_CENTER_CLI_APP_ID?c.app_key=u.get(p,["app","app_key"]):c.app_id=u.get(p,["app","id"]),e.prev=4,e.next=7,i.getPadWells(s,c);case 7:return o=e.sent,e.abrupt("return",o?h.deserialize(o):[]);case 11:return e.prev=11,e.t0=e.catch(4),console.error(e.t0),e.abrupt("return",[]);case 15:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t){return e.apply(this,arguments)}}()),e.next=4,Promise.all(a);case 4:return s=e.sent,e.abrupt("return",s.reduce((function(e,r,n){return e[t[n][0]]=r,e}),{}));case 6:case"end":return e.stop()}}),e)}))),P.apply(this,arguments)}var j=function(e){return[e.id,m(e,s.ASSET_TYPES.well.id),m(e,s.ASSET_TYPES.rig.id),m(e,s.ASSET_TYPES.frac_fleet.id),m(e,s.ASSET_TYPES.pad.id),m(e,s.ASSET_TYPES.intervention_unit.id),m(e,"deprecatedAssetId"),c.getAppSegment(e)].join("-")},I=function(e){return{id:e.id,rig:null,well:null,fracFleet:null,interventionUnit:null,program:{id:null,name:null},completionWellInfo:{fracFleet:{id:null,name:null},pad:{id:null,name:null}},wells:null,isLoading:!0,appHash:j(e)}};exports.fetchAssetEntitiesByAssetIds=function(e){return S.apply(this,arguments)},exports.fetchFracFleetWells=function(e,t){return A.apply(this,arguments)},exports.fetchFracFleets=function(e){return x.apply(this,arguments)},exports.fetchInterventionUnits=function(e){return T.apply(this,arguments)},exports.fetchPadWells=function(e,t){return P.apply(this,arguments)},exports.fetchRigs=function(e){return b.apply(this,arguments)},exports.fetchWells=function(e){return y.apply(this,arguments)},exports.getAppAssetSpecificTypeId=m,exports.getAppHash=j,exports.getAppsDataByFFs=function(e,t,r){return t||r?e.reduce((function(e,n){var a,u,i=f.default(n,2),l=i[0],s=i[1],c=null==t?void 0:t[s],p=null==r?void 0:r[l];return e[l]={fracFleet:c,wells:p,program:{id:(null==c||null===(a=c.program)||void 0===a?void 0:a.id)||null,name:(null==c||null===(u=c.program)||void 0===u?void 0:u.name)||null}},e}),{}):{}},exports.getAppsDataByInterventionUnits=function(e,t,r,n){return!t||u.isEmpty(t)?{}:e.reduce((function(e,a){var u,i=f.default(a,2),l=i[0],s=i[1],c=t[s],p=null===(u=r.find((function(e){return e[0]===l})))||void 0===u?void 0:u[1],o=n[p]||c.well;return e[l]=E(o,null==o?void 0:o.rig,_(_({},c),c.well&&{active_well:_({id:c.well.id},c.well.attributes)})),e}),{})},exports.getAppsDataByPads=function(e,t){return e||t?e.reduce((function(e,r){var n=f.default(r,2),a=n[0];n[1];var u=null==t?void 0:t[a];return e[a]={wells:u},e}),{}):{}},exports.getAppsDataByRigs=function(e,t){return!t||u.isEmpty(t)?{}:e.reduce((function(e,r){var n=f.default(r,2),a=n[0],u=n[1],i=t[u];return e[a]=E(null==i?void 0:i.well,i),e}),{})},exports.getAppsDataByWells=function(e,t){return!t||u.isEmpty(t)?{}:e.reduce((function(e,r){var n=f.default(r,2),a=n[0],u=n[1],i=t[u];return i?(e[a]=E(i,i.rig),e):e}),{})},exports.getInitialAppData=I,exports.getInitialAppsDataState=function(e){return e.reduce((function(e,t){return _(_({},e),{},o.default({},t.id,I(t)))}),{})},exports.getUniqAssetIds=w,exports.isAppNeedingInterventionUnitWellRefresh=function(e){var t=m(e,s.ASSET_TYPES.intervention_unit.id),r=m(e,s.ASSET_TYPES.well.id);return t&&!r},exports.isAppWithSettings=function(e){return Boolean(m(e,s.ASSET_TYPES.well.id)||m(e,s.ASSET_TYPES.rig.id)||m(e,s.ASSET_TYPES.frac_fleet.id)||m(e,s.ASSET_TYPES.pad.id)||m(e,s.ASSET_TYPES.intervention_unit.id))},exports.prepareDataForResolver=function(e,t){var r=[],n=[],a=[],u=[],i=[],l=[],c=[];e.forEach((function(e){var t=m(e,s.ASSET_TYPES.well.id),p=m(e,s.ASSET_TYPES.rig.id),o=m(e,s.ASSET_TYPES.frac_fleet.id),d=m(e,s.ASSET_TYPES.pad.id),f=m(e,s.ASSET_TYPES.intervention_unit.id),v=e.id;c.push([v]),f?(u.push([v,f]),t&&r.push([v,t])):t?r.push([v,t]):p?n.push([v,p]):o&&(a.push([v,o]),d?l.push([v,d]):i.push([v,o]))}));var p=t.current,o=p.rigsById,d=p.wellsById,f=p.fracFleetsById,v=p.interventionUnitsById,g=w(r,Object.keys(d)),_=w(n,Object.keys(o)),h=w(a,Object.keys(f)),y=w(u,Object.keys(v));return{appsWellIds:r,appsRigIds:n,appsFracFleetIds:a,appsPadIds:l,appIds:c,appsFracFleetToFetchWellsIds:i,appsInterventionUnitIds:u,uniqueWellIds:g,uniqueRigIds:_,uniqueFFIds:h,uniqueInterventionUnitIds:y}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/helpers/slicedToArray"),n=require("@babel/runtime/regenerator"),a=require("jsona"),u=require("lodash"),i=require("../../../../clients/jsonApi/index.js"),l=require("../../../../constants/devcenter.js");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");var s=require("../../../../constants/assetTypes.js");require("../../../../constants/corvaCompanyId.js"),require("../../../GradientManager/configuration/constants.js");var c=require("../../../../utils/devcenter.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=p(e),d=p(t),f=p(r),v=p(n);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){o.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=new(p(a).default),m=function(e,t){return+u.get(e,["settings",t])},w=function(e,t){return u.uniq(e.map((function(e){var t=f.default(e,2);return t[0],t[1]})).filter((function(e){return Number.isFinite(e)&&!t.includes(String(e))})))};function y(){return(y=d.default(v.default.mark((function e(t){return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getWells({ids:t,fields:["well.name","well.settings","well.custom_properties","well.company","well.asset_id","well.last_active_at","well.program","well.pad","well.frac_fleet","well.id","well.rig","rig.name","rig.asset_id","company.id","well.status","well.archivation","well.lon_lat"],include_arhivation_data:!0});case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function b(){return(b=d.default(v.default.mark((function e(t){return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getRigs({ids:t,fields:["rig.name","rig.settings","rig.asset_id","rig.active_well","rig.last_active_well","well.name","well.settings","well.custom_properties","well.company","rig.program","well.asset_id","well.last_active_at","well.id","well.company.id","well.lon_lat"]});case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function S(){return(S=d.default(v.default.mark((function e(t){return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getResolvedAssets({assets:t});case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}var E=function(e,t,r){return _(_({well:e&&_(_({},e.attributes),{},{id:e.id,companyId:u.get(e,"relationships.company.data.id")}),rig:{name:u.get(t,"attributes.name"),id:u.get(t,"id"),asset_id:u.get(t,"attributes.asset_id")},program:{id:u.get(t,"program.id")||null,name:u.get(t,"program.attributes.name")||null}},r&&{interventionUnit:{id:+r.id,name:r.name,active_well:r.active_well}}),{},{completionWellInfo:{pad:{id:u.get(e,"pad.id")||null,name:u.get(e,"pad.attributes.name")||null},fracFleet:{id:u.get(e,"fracFleet.id")||null,name:u.get(e,"fracFleet.attributes.name")||null}}})};function x(){return(x=d.default(v.default.mark((function e(t){var r;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getFracFleets({ids:t,fields:["frac_fleet.name","frac_fleet.pads","frac_fleet.program","frac_fleet.current_pad_id","frac_fleet.pad_frac_fleets","frac_fleet.pad_frac_fleet.frac_fleet_lines"]});case 5:return r=e.sent,e.abrupt("return",r?h.deserialize(r):[]);case 9:return e.prev=9,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",[]);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function T(){return(T=d.default(v.default.mark((function e(t){return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,i.getInterventionUnits({ids:t,fields:["intervention_unit.name","intervention_unit.type","intervention_unit.active_well"]});case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),console.error(e.t0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}function A(){return A=d.default(v.default.mark((function e(t,r){var n,a,s;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.keyBy(r,"id"),a=t.map(function(){var e=d.default(v.default.mark((function e(t){var r,a,s,c,p,o;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.default(t,2),a=r[0],s=r[1],c={fields:"all",frac_fleet_id:s},p=n[a],a===l.DEV_CENTER_CLI_APP_ID?c.app_key=u.get(p,["app","app_key"]):c.app_id=u.get(p,["app","id"]),e.prev=4,e.next=7,i.getFracFleetWells(c);case 7:return o=e.sent,e.abrupt("return",o?h.deserialize(o):[]);case 11:return e.prev=11,e.t0=e.catch(4),console.error(e.t0),e.abrupt("return",[]);case 15:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t){return e.apply(this,arguments)}}()),e.next=4,Promise.all(a);case 4:return s=e.sent,e.abrupt("return",s.reduce((function(e,r,n){return e[t[n][0]]=r,e}),{}));case 6:case"end":return e.stop()}}),e)}))),A.apply(this,arguments)}function P(){return P=d.default(v.default.mark((function e(t,r){var n,a,s;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.keyBy(r,"id"),a=t.map(function(){var e=d.default(v.default.mark((function e(t){var r,a,s,c,p,o;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.default(t,2),a=r[0],s=r[1],c={fields:"all"},p=n[a],a===l.DEV_CENTER_CLI_APP_ID?c.app_key=u.get(p,["app","app_key"]):c.app_id=u.get(p,["app","id"]),e.prev=4,e.next=7,i.getPadWells(s,c);case 7:return o=e.sent,e.abrupt("return",o?h.deserialize(o):[]);case 11:return e.prev=11,e.t0=e.catch(4),console.error(e.t0),e.abrupt("return",[]);case 15:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t){return e.apply(this,arguments)}}()),e.next=4,Promise.all(a);case 4:return s=e.sent,e.abrupt("return",s.reduce((function(e,r,n){return e[t[n][0]]=r,e}),{}));case 6:case"end":return e.stop()}}),e)}))),P.apply(this,arguments)}var j=function(e){return[e.id,m(e,s.ASSET_TYPES.well.id),m(e,s.ASSET_TYPES.rig.id),m(e,s.ASSET_TYPES.frac_fleet.id),m(e,s.ASSET_TYPES.pad.id),m(e,s.ASSET_TYPES.intervention_unit.id),m(e,"deprecatedAssetId"),c.getAppSegment(e)].join("-")},I=function(e){return{id:e.id,rig:null,well:null,fracFleet:null,interventionUnit:null,program:{id:null,name:null},completionWellInfo:{fracFleet:{id:null,name:null},pad:{id:null,name:null}},wells:null,isLoading:!0,appHash:j(e)}};exports.fetchAssetEntitiesByAssetIds=function(e){return S.apply(this,arguments)},exports.fetchFracFleetWells=function(e,t){return A.apply(this,arguments)},exports.fetchFracFleets=function(e){return x.apply(this,arguments)},exports.fetchInterventionUnits=function(e){return T.apply(this,arguments)},exports.fetchPadWells=function(e,t){return P.apply(this,arguments)},exports.fetchRigs=function(e){return b.apply(this,arguments)},exports.fetchWells=function(e){return y.apply(this,arguments)},exports.getAppAssetSpecificTypeId=m,exports.getAppHash=j,exports.getAppsDataByFFs=function(e,t,r){return t||r?e.reduce((function(e,n){var a,u,i=f.default(n,2),l=i[0],s=i[1],c=null==t?void 0:t[s],p=null==r?void 0:r[l];return e[l]={fracFleet:c,wells:p,program:{id:(null==c||null===(a=c.program)||void 0===a?void 0:a.id)||null,name:(null==c||null===(u=c.program)||void 0===u?void 0:u.name)||null}},e}),{}):{}},exports.getAppsDataByInterventionUnits=function(e,t,r,n){return!t||u.isEmpty(t)?{}:e.reduce((function(e,a){var u,i=f.default(a,2),l=i[0],s=i[1],c=t[s],p=null===(u=r.find((function(e){return e[0]===l})))||void 0===u?void 0:u[1],o=n[p]||c.well;return e[l]=E(o,null==o?void 0:o.rig,_(_({},c),c.well&&{active_well:_({id:c.well.id},c.well.attributes)})),e}),{})},exports.getAppsDataByPads=function(e,t){return e||t?e.reduce((function(e,r){var n=f.default(r,2),a=n[0];n[1];var u=null==t?void 0:t[a];return e[a]={wells:u},e}),{}):{}},exports.getAppsDataByRigs=function(e,t){return!t||u.isEmpty(t)?{}:e.reduce((function(e,r){var n=f.default(r,2),a=n[0],u=n[1],i=t[u];return e[a]=E(null==i?void 0:i.well,i),e}),{})},exports.getAppsDataByWells=function(e,t){return!t||u.isEmpty(t)?{}:e.reduce((function(e,r){var n=f.default(r,2),a=n[0],u=n[1],i=t[u];return i?(e[a]=E(i,i.rig),e):e}),{})},exports.getInitialAppData=I,exports.getInitialAppsDataState=function(e){return e.reduce((function(e,t){return _(_({},e),{},o.default({},t.id,I(t)))}),{})},exports.getUniqAssetIds=w,exports.isAppNeedingInterventionUnitWellRefresh=function(e){var t=m(e,s.ASSET_TYPES.intervention_unit.id),r=m(e,s.ASSET_TYPES.well.id);return t&&!r},exports.isAppWithSettings=function(e){return Boolean(m(e,s.ASSET_TYPES.well.id)||m(e,s.ASSET_TYPES.rig.id)||m(e,s.ASSET_TYPES.frac_fleet.id)||m(e,s.ASSET_TYPES.pad.id)||m(e,s.ASSET_TYPES.intervention_unit.id))},exports.prepareDataForResolver=function(e,t){var r=[],n=[],a=[],u=[],i=[],l=[],c=[];e.forEach((function(e){var t=m(e,s.ASSET_TYPES.well.id),p=m(e,s.ASSET_TYPES.rig.id),o=m(e,s.ASSET_TYPES.frac_fleet.id),d=m(e,s.ASSET_TYPES.pad.id),f=m(e,s.ASSET_TYPES.intervention_unit.id),v=e.id;c.push([v]),f?(u.push([v,f]),t&&r.push([v,t])):t?r.push([v,t]):p?n.push([v,p]):o&&(a.push([v,o]),d?l.push([v,d]):i.push([v,o]))}));var p=t.current,o=p.rigsById,d=p.wellsById,f=p.fracFleetsById,v=p.interventionUnitsById,g=w(r,Object.keys(d)),_=w(n,Object.keys(o)),h=w(a,Object.keys(f)),y=w(u,Object.keys(v));return{appsWellIds:r,appsRigIds:n,appsFracFleetIds:a,appsPadIds:l,appIds:c,appsFracFleetToFetchWellsIds:i,appsInterventionUnitIds:u,uniqueWellIds:g,uniqueRigIds:_,uniqueFFIds:h,uniqueInterventionUnitIds:y}};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../../../src/components/DevCenter/AppsDataProvider/effects/utils.js"],"sourcesContent":["import Jsona from 'jsona';\nimport { get, isEmpty, keyBy, uniq } from 'lodash';\n\nimport {\n getFracFleets,\n getFracFleetWells,\n getInterventionUnits,\n getPadWells,\n getResolvedAssets,\n getRigs,\n getWells,\n} from '~/clients/jsonApi';\nimport { DEV_CENTER_CLI_APP_ID } from '~constants';\nimport { ASSET_TYPES } from '~/constants/assetTypes';\nimport { getAppSegment } from '~/utils/devcenter';\n\nconst dataFormatter = new Jsona();\n\nexport const getAppAssetSpecificTypeId = (app, typeId) => +get(app, ['settings', typeId]);\n\nexport const getUniqAssetIds = (assetIds, cachedAssetIds) =>\n uniq(\n assetIds\n .map(([_appId, assetId]) => assetId)\n .filter(assetId => Number.isFinite(assetId) && !cachedAssetIds.includes(String(assetId)))\n );\n\nexport async function fetchWells(ids) {\n if (!ids.length) return null;\n\n try {\n // eslint-disable-next-line no-return-await\n return await getWells({\n ids,\n fields: [\n 'well.name',\n 'well.settings',\n 'well.company',\n 'well.asset_id',\n 'well.last_active_at',\n 'well.program',\n 'well.pad',\n 'well.frac_fleet',\n 'well.id',\n 'well.rig',\n 'rig.name',\n 'rig.asset_id',\n 'company.id',\n 'well.status',\n 'well.archivation',\n 'well.lon_lat',\n ],\n include_arhivation_data: true,\n });\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nexport async function fetchRigs(ids) {\n if (!ids.length) return null;\n\n try {\n return await getRigs({\n ids,\n fields: [\n 'rig.name',\n 'rig.settings',\n 'rig.asset_id',\n 'rig.active_well',\n 'rig.last_active_well',\n 'well.name',\n 'well.settings',\n 'well.company',\n 'rig.program',\n 'well.asset_id',\n 'well.last_active_at',\n 'well.id',\n 'well.company.id',\n 'well.lon_lat',\n ],\n });\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nexport async function fetchAssetEntitiesByAssetIds(assetIds) {\n if (!assetIds.length) return null;\n\n try {\n return await getResolvedAssets({\n assets: assetIds,\n });\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nconst getWellObjectFromWellData = (well, rig, interventionUnit) => {\n return {\n well: well && {\n ...well.attributes,\n id: well.id,\n // NOTE: API doesn't return active child company id\n companyId: get(well, 'relationships.company.data.id'),\n },\n rig: {\n name: get(rig, 'attributes.name'),\n id: get(rig, 'id'),\n asset_id: get(rig, 'attributes.asset_id'),\n },\n program: {\n id: get(rig, 'program.id') || null,\n name: get(rig, 'program.attributes.name') || null,\n },\n ...(interventionUnit && {\n interventionUnit: {\n id: +interventionUnit.id,\n name: interventionUnit.name,\n active_well: interventionUnit.active_well,\n },\n }),\n // NOTE: Support ff/pad in mixpanel for Asset Dashboards\n completionWellInfo: {\n pad: {\n id: get(well, 'pad.id') || null,\n name: get(well, 'pad.attributes.name') || null,\n },\n fracFleet: {\n id: get(well, 'fracFleet.id') || null,\n name: get(well, 'fracFleet.attributes.name') || null,\n },\n },\n };\n};\n\nexport const getAppsDataByWells = (appsWellIds, wellsById) => {\n if (!wellsById || isEmpty(wellsById)) return {};\n\n return appsWellIds.reduce((acc, [appId, wellId]) => {\n const well = wellsById[wellId];\n if (!well) return acc;\n\n acc[appId] = getWellObjectFromWellData(well, well.rig);\n\n return acc;\n }, {});\n};\n\nexport const getAppsDataByRigs = (appsRigIds, rigsById) => {\n if (!rigsById || isEmpty(rigsById)) return {};\n\n return appsRigIds.reduce((acc, [appId, rigId]) => {\n const rig = rigsById[rigId];\n acc[appId] = getWellObjectFromWellData(rig?.well, rig);\n\n return acc;\n }, {});\n};\n\nexport const getAppsDataByFFs = (appsFracFleetIds, ffsById, ffWellsData) => {\n if (!ffsById && !ffWellsData) return {};\n\n return appsFracFleetIds.reduce((acc, [appId, ffId]) => {\n const fracFleet = ffsById?.[ffId];\n const wells = ffWellsData?.[appId];\n\n acc[appId] = {\n fracFleet,\n wells,\n program: {\n id: fracFleet?.program?.id || null,\n name: fracFleet?.program?.name || null,\n },\n };\n\n return acc;\n }, {});\n};\n\nexport const getAppsDataByPads = (appsPadIds, padWellsData) => {\n if (!appsPadIds && !padWellsData) return {};\n\n return appsPadIds.reduce((acc, [appId, _padId]) => {\n const wells = padWellsData?.[appId];\n\n acc[appId] = {\n wells,\n };\n\n return acc;\n }, {});\n};\n\nexport const getAppsDataByInterventionUnits = (\n appsInterventionUnitIds,\n interventionUnitsById,\n appsWellIds,\n wellsById\n) => {\n if (!interventionUnitsById || isEmpty(interventionUnitsById)) return {};\n\n return appsInterventionUnitIds.reduce((acc, [appId, interventionUnitId]) => {\n const interventionUnit = interventionUnitsById[interventionUnitId];\n const appWellId = appsWellIds.find(appWellId => appWellId[0] === appId)?.[1];\n const well = wellsById[appWellId] || interventionUnit.well;\n\n acc[appId] = getWellObjectFromWellData(well, well?.rig, {\n ...interventionUnit,\n ...(interventionUnit.well && {\n active_well: { id: interventionUnit.well.id, ...interventionUnit.well.attributes },\n }),\n });\n\n return acc;\n }, {});\n};\n\nexport async function fetchFracFleets(ids) {\n if (!ids.length) return null;\n\n try {\n const response = await getFracFleets({\n ids,\n fields: [\n 'frac_fleet.name',\n 'frac_fleet.pads',\n 'frac_fleet.program',\n 'frac_fleet.current_pad_id',\n 'frac_fleet.pad_frac_fleets',\n 'frac_fleet.pad_frac_fleet.frac_fleet_lines',\n ],\n });\n\n return response ? dataFormatter.deserialize(response) : [];\n } catch (e) {\n console.error(e);\n return [];\n }\n}\n\nexport async function fetchInterventionUnits(ids) {\n if (!ids.length) return null;\n\n try {\n return await getInterventionUnits({\n ids,\n fields: ['intervention_unit.name', 'intervention_unit.type', 'intervention_unit.active_well'],\n });\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nexport async function fetchFracFleetWells(appsFFIds, apps) {\n const appsById = keyBy(apps, 'id');\n const requests = appsFFIds.map(async ([appId, fracFleetId]) => {\n const options = { fields: 'all', frac_fleet_id: fracFleetId };\n\n const app = appsById[appId];\n\n if (appId === DEV_CENTER_CLI_APP_ID) options.app_key = get(app, ['app', 'app_key']);\n else options.app_id = get(app, ['app', 'id']);\n try {\n const response = await getFracFleetWells(options);\n return response ? dataFormatter.deserialize(response) : [];\n } catch (e) {\n console.error(e);\n return [];\n }\n });\n\n const responses = await Promise.all(requests);\n\n return responses.reduce((acc, currFFWells, i) => {\n acc[appsFFIds[i][0]] = currFFWells;\n return acc;\n }, {});\n}\n\nexport async function fetchPadWells(appsPadIds, apps) {\n const appsById = keyBy(apps, 'id');\n const requests = appsPadIds.map(async ([appId, padId]) => {\n const options = { fields: 'all' };\n\n const app = appsById[appId];\n\n if (appId === DEV_CENTER_CLI_APP_ID) options.app_key = get(app, ['app', 'app_key']);\n else options.app_id = get(app, ['app', 'id']);\n try {\n const response = await getPadWells(padId, options);\n return response ? dataFormatter.deserialize(response) : [];\n } catch (e) {\n console.error(e);\n return [];\n }\n });\n\n const responses = await Promise.all(requests);\n\n return responses.reduce((acc, currFFWells, i) => {\n acc[appsPadIds[i][0]] = currFFWells;\n return acc;\n }, {});\n}\n\nexport const getAppHash = app =>\n [\n app.id,\n getAppAssetSpecificTypeId(app, ASSET_TYPES.well.id),\n getAppAssetSpecificTypeId(app, ASSET_TYPES.rig.id),\n getAppAssetSpecificTypeId(app, ASSET_TYPES.frac_fleet.id),\n getAppAssetSpecificTypeId(app, ASSET_TYPES.pad.id),\n getAppAssetSpecificTypeId(app, ASSET_TYPES.intervention_unit.id),\n getAppAssetSpecificTypeId(app, 'deprecatedAssetId'),\n getAppSegment(app),\n ].join('-');\n\nexport const isAppWithSettings = app =>\n Boolean(\n getAppAssetSpecificTypeId(app, ASSET_TYPES.well.id) ||\n getAppAssetSpecificTypeId(app, ASSET_TYPES.rig.id) ||\n getAppAssetSpecificTypeId(app, ASSET_TYPES.frac_fleet.id) ||\n getAppAssetSpecificTypeId(app, ASSET_TYPES.pad.id) ||\n getAppAssetSpecificTypeId(app, ASSET_TYPES.intervention_unit.id)\n );\n\nexport const getInitialAppData = app => ({\n id: app.id,\n rig: null,\n well: null,\n fracFleet: null,\n interventionUnit: null,\n program: {\n id: null,\n name: null,\n },\n completionWellInfo: {\n fracFleet: {\n id: null,\n name: null,\n },\n pad: {\n id: null,\n name: null,\n },\n },\n wells: null,\n isLoading: true,\n appHash: getAppHash(app),\n});\n\nexport const getInitialAppsDataState = apps =>\n apps.reduce(\n (acc, app) => ({\n ...acc,\n [app.id]: getInitialAppData(app),\n }),\n {}\n );\n\nexport const isAppNeedingInterventionUnitWellRefresh = app => {\n const interventionUnitId = getAppAssetSpecificTypeId(app, ASSET_TYPES.intervention_unit.id);\n const wellId = getAppAssetSpecificTypeId(app, ASSET_TYPES.well.id);\n return interventionUnitId && !wellId;\n};\n\nexport const prepareDataForResolver = (apps, cache) => {\n const appsWellIds = [];\n const appsRigIds = [];\n const appsFracFleetIds = [];\n const appsInterventionUnitIds = [];\n const appsFracFleetToFetchWellsIds = [];\n const appsPadIds = [];\n const appIds = [];\n\n apps.forEach(app => {\n const appWellId = getAppAssetSpecificTypeId(app, ASSET_TYPES.well.id);\n const appRigId = getAppAssetSpecificTypeId(app, ASSET_TYPES.rig.id);\n const appFracFleetId = getAppAssetSpecificTypeId(app, ASSET_TYPES.frac_fleet.id);\n const appPadId = getAppAssetSpecificTypeId(app, ASSET_TYPES.pad.id);\n const appInterventionUnitId = getAppAssetSpecificTypeId(app, ASSET_TYPES.intervention_unit.id);\n\n const appId = app.id;\n appIds.push([appId]);\n\n if (appInterventionUnitId) {\n appsInterventionUnitIds.push([appId, appInterventionUnitId]);\n // NOTE: we need to fetch well for intervention unit as there is no well in intervention unit\n if (appWellId) {\n appsWellIds.push([appId, appWellId]);\n }\n } else if (appWellId) {\n appsWellIds.push([appId, appWellId]);\n } else if (appRigId) {\n appsRigIds.push([appId, appRigId]);\n } else if (appFracFleetId) {\n appsFracFleetIds.push([appId, appFracFleetId]);\n if (appPadId) {\n appsPadIds.push([appId, appPadId]);\n } else {\n appsFracFleetToFetchWellsIds.push([appId, appFracFleetId]);\n }\n }\n });\n\n const { rigsById, wellsById, fracFleetsById, interventionUnitsById } = cache.current;\n\n const uniqueWellIds = getUniqAssetIds(appsWellIds, Object.keys(wellsById));\n const uniqueRigIds = getUniqAssetIds(appsRigIds, Object.keys(rigsById));\n const uniqueFFIds = getUniqAssetIds(appsFracFleetIds, Object.keys(fracFleetsById));\n const uniqueInterventionUnitIds = getUniqAssetIds(\n appsInterventionUnitIds,\n Object.keys(interventionUnitsById)\n );\n\n return {\n appsWellIds,\n appsRigIds,\n appsFracFleetIds,\n appsPadIds,\n appIds,\n appsFracFleetToFetchWellsIds,\n appsInterventionUnitIds,\n\n uniqueWellIds,\n uniqueRigIds,\n uniqueFFIds,\n uniqueInterventionUnitIds,\n };\n};\n"],"names":["dataFormatter","Jsona","getAppAssetSpecificTypeId","app","typeId","get","getUniqAssetIds","assetIds","cachedAssetIds","uniq","map","_ref","_ref2","_slicedToArray","filter","assetId","Number","isFinite","includes","String","_fetchWells","_asyncToGenerator","_regeneratorRuntime","mark","ids","wrap","_context","prev","next","length","abrupt","getWells","fields","include_arhivation_data","sent","t0","console","error","stop","_callee","apply","this","arguments","_fetchRigs","_context2","getRigs","_callee2","_fetchAssetEntitiesByAssetIds","_context3","getResolvedAssets","assets","_callee3","getWellObjectFromWellData","well","rig","interventionUnit","_objectSpread","attributes","id","companyId","name","asset_id","program","active_well","completionWellInfo","pad","fracFleet","_fetchFracFleets","response","_context4","getFracFleets","deserialize","_callee4","_fetchInterventionUnits","_context5","getInterventionUnits","_callee5","_fetchFracFleetWells","_callee7","appsFFIds","apps","appsById","requests","responses","_context7","keyBy","_ref14","_callee6","_ref13","_ref15","appId","fracFleetId","options","_context6","frac_fleet_id","DEV_CENTER_CLI_APP_ID","app_key","app_id","getFracFleetWells","_x10","Promise","all","reduce","acc","currFFWells","i","_fetchPadWells","_callee9","appsPadIds","_context9","_ref17","_callee8","_ref16","_ref18","padId","_context8","getPadWells","_x11","getAppHash","ASSET_TYPES","frac_fleet","intervention_unit","getAppSegment","join","getInitialAppData","wells","isLoading","appHash","_x3","_x6","_x7","_x4","_x5","_x8","_x9","_x2","_x","appsFracFleetIds","ffsById","ffWellsData","_ref7","_fracFleet$program","_fracFleet$program2","_ref8","ffId","appsInterventionUnitIds","interventionUnitsById","appsWellIds","wellsById","isEmpty","_ref11","_appsWellIds$find","_ref12","interventionUnitId","appWellId","find","padWellsData","_ref9","_ref10","appsRigIds","rigsById","_ref5","_ref6","rigId","_ref3","_ref4","wellId","Boolean","cache","appsFracFleetToFetchWellsIds","appIds","forEach","appRigId","appFracFleetId","appPadId","appInterventionUnitId","push","current","fracFleetsById","uniqueWellIds","Object","keys","uniqueRigIds","uniqueFFIds","uniqueInterventionUnitIds"],"mappings":"qtDAgBA,IAAMA,EAAgB,SAAIC,SAEbC,EAA4B,SAACC,EAAKC,GAAM,OAAMC,EAAGA,IAACF,EAAK,CAAC,WAAYC,GAAQ,EAE5EE,EAAkB,SAACC,EAAUC,GAAc,OACtDC,OACEF,EACGG,KAAI,SAAAC,GAAA,IAAAC,EAAAC,EAAAA,QAAAF,EAAA,GAAiB,OAATC,EAAA,GAASA,EAAA,EAAa,IAClCE,QAAO,SAAAC,GAAO,OAAIC,OAAOC,SAASF,KAAaP,EAAeU,SAASC,OAAOJ,GAAS,IAC3F,EAiCF,SAAAK,IAAA,OAAAA,EAAAC,EAAA,QAAAC,EAAA,QAAAC,MA/BM,WAA0BC,GAAG,OAAAF,UAAAG,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA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,EAAgBmI,EAAkB2C,OAAOC,KAAKH,IAC5DM,EAA4BlL,EAChC2I,EACAmC,OAAOC,KAAKnC,IAGd,MAAO,CACLC,YAAAA,EACAY,WAAAA,EACAtB,iBAAAA,EACA7B,WAAAA,EACA8D,OAAAA,EACAD,6BAAAA,EACAxB,wBAAAA,EAEAkC,cAAAA,EACAG,aAAAA,EACAC,YAAAA,EACAC,0BAAAA,EAEJ"}
1
+ {"version":3,"file":"utils.js","sources":["../../../../../../src/components/DevCenter/AppsDataProvider/effects/utils.js"],"sourcesContent":["import Jsona from 'jsona';\nimport { get, isEmpty, keyBy, uniq } from 'lodash';\n\nimport {\n getFracFleets,\n getFracFleetWells,\n getInterventionUnits,\n getPadWells,\n getResolvedAssets,\n getRigs,\n getWells,\n} from '~/clients/jsonApi';\nimport { DEV_CENTER_CLI_APP_ID } from '~constants';\nimport { ASSET_TYPES } from '~/constants/assetTypes';\nimport { getAppSegment } from '~/utils/devcenter';\n\nconst dataFormatter = new Jsona();\n\nexport const getAppAssetSpecificTypeId = (app, typeId) => +get(app, ['settings', typeId]);\n\nexport const getUniqAssetIds = (assetIds, cachedAssetIds) =>\n uniq(\n assetIds\n .map(([_appId, assetId]) => assetId)\n .filter(assetId => Number.isFinite(assetId) && !cachedAssetIds.includes(String(assetId)))\n );\n\nexport async function fetchWells(ids) {\n if (!ids.length) return null;\n\n try {\n // eslint-disable-next-line no-return-await\n return await getWells({\n ids,\n fields: [\n 'well.name',\n 'well.settings',\n 'well.custom_properties',\n 'well.company',\n 'well.asset_id',\n 'well.last_active_at',\n 'well.program',\n 'well.pad',\n 'well.frac_fleet',\n 'well.id',\n 'well.rig',\n 'rig.name',\n 'rig.asset_id',\n 'company.id',\n 'well.status',\n 'well.archivation',\n 'well.lon_lat',\n ],\n include_arhivation_data: true,\n });\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nexport async function fetchRigs(ids) {\n if (!ids.length) return null;\n\n try {\n return await getRigs({\n ids,\n fields: [\n 'rig.name',\n 'rig.settings',\n 'rig.asset_id',\n 'rig.active_well',\n 'rig.last_active_well',\n 'well.name',\n 'well.settings',\n 'well.custom_properties',\n 'well.company',\n 'rig.program',\n 'well.asset_id',\n 'well.last_active_at',\n 'well.id',\n 'well.company.id',\n 'well.lon_lat',\n ],\n });\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nexport async function fetchAssetEntitiesByAssetIds(assetIds) {\n if (!assetIds.length) return null;\n\n try {\n return await getResolvedAssets({\n assets: assetIds,\n });\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nconst getWellObjectFromWellData = (well, rig, interventionUnit) => {\n return {\n well: well && {\n ...well.attributes,\n id: well.id,\n // NOTE: API doesn't return active child company id\n companyId: get(well, 'relationships.company.data.id'),\n },\n rig: {\n name: get(rig, 'attributes.name'),\n id: get(rig, 'id'),\n asset_id: get(rig, 'attributes.asset_id'),\n },\n program: {\n id: get(rig, 'program.id') || null,\n name: get(rig, 'program.attributes.name') || null,\n },\n ...(interventionUnit && {\n interventionUnit: {\n id: +interventionUnit.id,\n name: interventionUnit.name,\n active_well: interventionUnit.active_well,\n },\n }),\n // NOTE: Support ff/pad in mixpanel for Asset Dashboards\n completionWellInfo: {\n pad: {\n id: get(well, 'pad.id') || null,\n name: get(well, 'pad.attributes.name') || null,\n },\n fracFleet: {\n id: get(well, 'fracFleet.id') || null,\n name: get(well, 'fracFleet.attributes.name') || null,\n },\n },\n };\n};\n\nexport const getAppsDataByWells = (appsWellIds, wellsById) => {\n if (!wellsById || isEmpty(wellsById)) return {};\n\n return appsWellIds.reduce((acc, [appId, wellId]) => {\n const well = wellsById[wellId];\n if (!well) return acc;\n\n acc[appId] = getWellObjectFromWellData(well, well.rig);\n\n return acc;\n }, {});\n};\n\nexport const getAppsDataByRigs = (appsRigIds, rigsById) => {\n if (!rigsById || isEmpty(rigsById)) return {};\n\n return appsRigIds.reduce((acc, [appId, rigId]) => {\n const rig = rigsById[rigId];\n acc[appId] = getWellObjectFromWellData(rig?.well, rig);\n\n return acc;\n }, {});\n};\n\nexport const getAppsDataByFFs = (appsFracFleetIds, ffsById, ffWellsData) => {\n if (!ffsById && !ffWellsData) return {};\n\n return appsFracFleetIds.reduce((acc, [appId, ffId]) => {\n const fracFleet = ffsById?.[ffId];\n const wells = ffWellsData?.[appId];\n\n acc[appId] = {\n fracFleet,\n wells,\n program: {\n id: fracFleet?.program?.id || null,\n name: fracFleet?.program?.name || null,\n },\n };\n\n return acc;\n }, {});\n};\n\nexport const getAppsDataByPads = (appsPadIds, padWellsData) => {\n if (!appsPadIds && !padWellsData) return {};\n\n return appsPadIds.reduce((acc, [appId, _padId]) => {\n const wells = padWellsData?.[appId];\n\n acc[appId] = {\n wells,\n };\n\n return acc;\n }, {});\n};\n\nexport const getAppsDataByInterventionUnits = (\n appsInterventionUnitIds,\n interventionUnitsById,\n appsWellIds,\n wellsById\n) => {\n if (!interventionUnitsById || isEmpty(interventionUnitsById)) return {};\n\n return appsInterventionUnitIds.reduce((acc, [appId, interventionUnitId]) => {\n const interventionUnit = interventionUnitsById[interventionUnitId];\n const appWellId = appsWellIds.find(appWellId => appWellId[0] === appId)?.[1];\n const well = wellsById[appWellId] || interventionUnit.well;\n\n acc[appId] = getWellObjectFromWellData(well, well?.rig, {\n ...interventionUnit,\n ...(interventionUnit.well && {\n active_well: { id: interventionUnit.well.id, ...interventionUnit.well.attributes },\n }),\n });\n\n return acc;\n }, {});\n};\n\nexport async function fetchFracFleets(ids) {\n if (!ids.length) return null;\n\n try {\n const response = await getFracFleets({\n ids,\n fields: [\n 'frac_fleet.name',\n 'frac_fleet.pads',\n 'frac_fleet.program',\n 'frac_fleet.current_pad_id',\n 'frac_fleet.pad_frac_fleets',\n 'frac_fleet.pad_frac_fleet.frac_fleet_lines',\n ],\n });\n\n return response ? dataFormatter.deserialize(response) : [];\n } catch (e) {\n console.error(e);\n return [];\n }\n}\n\nexport async function fetchInterventionUnits(ids) {\n if (!ids.length) return null;\n\n try {\n return await getInterventionUnits({\n ids,\n fields: ['intervention_unit.name', 'intervention_unit.type', 'intervention_unit.active_well'],\n });\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nexport async function fetchFracFleetWells(appsFFIds, apps) {\n const appsById = keyBy(apps, 'id');\n const requests = appsFFIds.map(async ([appId, fracFleetId]) => {\n const options = { fields: 'all', frac_fleet_id: fracFleetId };\n\n const app = appsById[appId];\n\n if (appId === DEV_CENTER_CLI_APP_ID) options.app_key = get(app, ['app', 'app_key']);\n else options.app_id = get(app, ['app', 'id']);\n try {\n const response = await getFracFleetWells(options);\n return response ? dataFormatter.deserialize(response) : [];\n } catch (e) {\n console.error(e);\n return [];\n }\n });\n\n const responses = await Promise.all(requests);\n\n return responses.reduce((acc, currFFWells, i) => {\n acc[appsFFIds[i][0]] = currFFWells;\n return acc;\n }, {});\n}\n\nexport async function fetchPadWells(appsPadIds, apps) {\n const appsById = keyBy(apps, 'id');\n const requests = appsPadIds.map(async ([appId, padId]) => {\n const options = { fields: 'all' };\n\n const app = appsById[appId];\n\n if (appId === DEV_CENTER_CLI_APP_ID) options.app_key = get(app, ['app', 'app_key']);\n else options.app_id = get(app, ['app', 'id']);\n try {\n const response = await getPadWells(padId, options);\n return response ? dataFormatter.deserialize(response) : [];\n } catch (e) {\n console.error(e);\n return [];\n }\n });\n\n const responses = await Promise.all(requests);\n\n return responses.reduce((acc, currFFWells, i) => {\n acc[appsPadIds[i][0]] = currFFWells;\n return acc;\n }, {});\n}\n\nexport const getAppHash = app =>\n [\n app.id,\n getAppAssetSpecificTypeId(app, ASSET_TYPES.well.id),\n getAppAssetSpecificTypeId(app, ASSET_TYPES.rig.id),\n getAppAssetSpecificTypeId(app, ASSET_TYPES.frac_fleet.id),\n getAppAssetSpecificTypeId(app, ASSET_TYPES.pad.id),\n getAppAssetSpecificTypeId(app, ASSET_TYPES.intervention_unit.id),\n getAppAssetSpecificTypeId(app, 'deprecatedAssetId'),\n getAppSegment(app),\n ].join('-');\n\nexport const isAppWithSettings = app =>\n Boolean(\n getAppAssetSpecificTypeId(app, ASSET_TYPES.well.id) ||\n getAppAssetSpecificTypeId(app, ASSET_TYPES.rig.id) ||\n getAppAssetSpecificTypeId(app, ASSET_TYPES.frac_fleet.id) ||\n getAppAssetSpecificTypeId(app, ASSET_TYPES.pad.id) ||\n getAppAssetSpecificTypeId(app, ASSET_TYPES.intervention_unit.id)\n );\n\nexport const getInitialAppData = app => ({\n id: app.id,\n rig: null,\n well: null,\n fracFleet: null,\n interventionUnit: null,\n program: {\n id: null,\n name: null,\n },\n completionWellInfo: {\n fracFleet: {\n id: null,\n name: null,\n },\n pad: {\n id: null,\n name: null,\n },\n },\n wells: null,\n isLoading: true,\n appHash: getAppHash(app),\n});\n\nexport const getInitialAppsDataState = apps =>\n apps.reduce(\n (acc, app) => ({\n ...acc,\n [app.id]: getInitialAppData(app),\n }),\n {}\n );\n\nexport const isAppNeedingInterventionUnitWellRefresh = app => {\n const interventionUnitId = getAppAssetSpecificTypeId(app, ASSET_TYPES.intervention_unit.id);\n const wellId = getAppAssetSpecificTypeId(app, ASSET_TYPES.well.id);\n return interventionUnitId && !wellId;\n};\n\nexport const prepareDataForResolver = (apps, cache) => {\n const appsWellIds = [];\n const appsRigIds = [];\n const appsFracFleetIds = [];\n const appsInterventionUnitIds = [];\n const appsFracFleetToFetchWellsIds = [];\n const appsPadIds = [];\n const appIds = [];\n\n apps.forEach(app => {\n const appWellId = getAppAssetSpecificTypeId(app, ASSET_TYPES.well.id);\n const appRigId = getAppAssetSpecificTypeId(app, ASSET_TYPES.rig.id);\n const appFracFleetId = getAppAssetSpecificTypeId(app, ASSET_TYPES.frac_fleet.id);\n const appPadId = getAppAssetSpecificTypeId(app, ASSET_TYPES.pad.id);\n const appInterventionUnitId = getAppAssetSpecificTypeId(app, ASSET_TYPES.intervention_unit.id);\n\n const appId = app.id;\n appIds.push([appId]);\n\n if (appInterventionUnitId) {\n appsInterventionUnitIds.push([appId, appInterventionUnitId]);\n // NOTE: we need to fetch well for intervention unit as there is no well in intervention unit\n if (appWellId) {\n appsWellIds.push([appId, appWellId]);\n }\n } else if (appWellId) {\n appsWellIds.push([appId, appWellId]);\n } else if (appRigId) {\n appsRigIds.push([appId, appRigId]);\n } else if (appFracFleetId) {\n appsFracFleetIds.push([appId, appFracFleetId]);\n if (appPadId) {\n appsPadIds.push([appId, appPadId]);\n } else {\n appsFracFleetToFetchWellsIds.push([appId, appFracFleetId]);\n }\n }\n });\n\n const { rigsById, wellsById, fracFleetsById, interventionUnitsById } = cache.current;\n\n const uniqueWellIds = getUniqAssetIds(appsWellIds, Object.keys(wellsById));\n const uniqueRigIds = getUniqAssetIds(appsRigIds, Object.keys(rigsById));\n const uniqueFFIds = getUniqAssetIds(appsFracFleetIds, Object.keys(fracFleetsById));\n const uniqueInterventionUnitIds = getUniqAssetIds(\n appsInterventionUnitIds,\n Object.keys(interventionUnitsById)\n );\n\n return {\n appsWellIds,\n appsRigIds,\n appsFracFleetIds,\n appsPadIds,\n appIds,\n appsFracFleetToFetchWellsIds,\n appsInterventionUnitIds,\n\n uniqueWellIds,\n uniqueRigIds,\n uniqueFFIds,\n uniqueInterventionUnitIds,\n };\n};\n"],"names":["dataFormatter","Jsona","getAppAssetSpecificTypeId","app","typeId","get","getUniqAssetIds","assetIds","cachedAssetIds","uniq","map","_ref","_ref2","_slicedToArray","filter","assetId","Number","isFinite","includes","String","_fetchWells","_asyncToGenerator","_regeneratorRuntime","mark","ids","wrap","_context","prev","next","length","abrupt","getWells","fields","include_arhivation_data","sent","t0","console","error","stop","_callee","apply","this","arguments","_fetchRigs","_context2","getRigs","_callee2","_fetchAssetEntitiesByAssetIds","_context3","getResolvedAssets","assets","_callee3","getWellObjectFromWellData","well","rig","interventionUnit","_objectSpread","attributes","id","companyId","name","asset_id","program","active_well","completionWellInfo","pad","fracFleet","_fetchFracFleets","response","_context4","getFracFleets","deserialize","_callee4","_fetchInterventionUnits","_context5","getInterventionUnits","_callee5","_fetchFracFleetWells","_callee7","appsFFIds","apps","appsById","requests","responses","_context7","keyBy","_ref14","_callee6","_ref13","_ref15","appId","fracFleetId","options","_context6","frac_fleet_id","DEV_CENTER_CLI_APP_ID","app_key","app_id","getFracFleetWells","_x10","Promise","all","reduce","acc","currFFWells","i","_fetchPadWells","_callee9","appsPadIds","_context9","_ref17","_callee8","_ref16","_ref18","padId","_context8","getPadWells","_x11","getAppHash","ASSET_TYPES","frac_fleet","intervention_unit","getAppSegment","join","getInitialAppData","wells","isLoading","appHash","_x3","_x6","_x7","_x4","_x5","_x8","_x9","_x2","_x","appsFracFleetIds","ffsById","ffWellsData","_ref7","_fracFleet$program","_fracFleet$program2","_ref8","ffId","appsInterventionUnitIds","interventionUnitsById","appsWellIds","wellsById","isEmpty","_ref11","_appsWellIds$find","_ref12","interventionUnitId","appWellId","find","padWellsData","_ref9","_ref10","appsRigIds","rigsById","_ref5","_ref6","rigId","_ref3","_ref4","wellId","Boolean","cache","appsFracFleetToFetchWellsIds","appIds","forEach","appRigId","appFracFleetId","appPadId","appInterventionUnitId","push","current","fracFleetsById","uniqueWellIds","Object","keys","uniqueRigIds","uniqueFFIds","uniqueInterventionUnitIds"],"mappings":"qtDAgBA,IAAMA,EAAgB,SAAIC,SAEbC,EAA4B,SAACC,EAAKC,GAAM,OAAMC,EAAGA,IAACF,EAAK,CAAC,WAAYC,GAAQ,EAE5EE,EAAkB,SAACC,EAAUC,GAAc,OACtDC,OACEF,EACGG,KAAI,SAAAC,GAAA,IAAAC,EAAAC,EAAAA,QAAAF,EAAA,GAAiB,OAATC,EAAA,GAASA,EAAA,EAAa,IAClCE,QAAO,SAAAC,GAAO,OAAIC,OAAOC,SAASF,KAAaP,EAAeU,SAASC,OAAOJ,GAAS,IAC3F,EAkCF,SAAAK,IAAA,OAAAA,EAAAC,EAAA,QAAAC,EAAA,QAAAC,MAhCM,WAA0BC,GAAG,OAAAF,UAAAG,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,GAC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L,EAAgBmI,EAAkB2C,OAAOC,KAAKH,IAC5DM,EAA4BlL,EAChC2I,EACAmC,OAAOC,KAAKnC,IAGd,MAAO,CACLC,YAAAA,EACAY,WAAAA,EACAtB,iBAAAA,EACA7B,WAAAA,EACA8D,OAAAA,EACAD,6BAAAA,EACAxB,wBAAAA,EAEAkC,cAAAA,EACAG,aAAAA,EACAC,YAAAA,EACAC,0BAAAA,EAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"CommentCard.d.ts","sourceRoot":"","sources":["../../../src/components/CommentCard/CommentCard.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAqB,MAAM,qBAAqB,CAAC;AAgB1E,eAAO,MAAM,WAAW,6GA8NtB,CAAC"}
1
+ {"version":3,"file":"CommentCard.d.ts","sourceRoot":"","sources":["../../../src/components/CommentCard/CommentCard.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAqB,MAAM,qBAAqB,CAAC;AAgB1E,eAAO,MAAM,WAAW,6GA6NtB,CAAC"}
@@ -1,2 +1,2 @@
1
- import o from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/helpers/toConsumableArray";import{forwardRef as n,useMemo as i}from"react";import{Collapse as c}from"@material-ui/core";import e from"classnames";import{FeedCard as t,FEED_CARD_MAX_HEIGHT_PX as r}from"../FeedCard/FeedCard.js";import{useStoredAttachments as m}from"../AttachmentPreview/useStoredAttachments.js";import{useFeedActivity as a}from"../FeedCard/useFeedActivity.js";import{AttachmentPreview as l}from"../AttachmentPreview/AttachmentPreview.js";import"../../componentsV2/FileIcon/FileIcon.js";import"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as p}from"../../componentsV2/Tooltip/Tooltip.js";import{jsx as u,jsxs as d,Fragment as j}from"react/jsx-runtime";import{InfoIcon as h}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"@babel/runtime/helpers/slicedToArray";import"../../componentsV2/Menu/Menu.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../clients/jsonApi/index.js";import"../../utils/main.js";import"../AttachmentPreview/AttachmentImage.js";import"../AttachmentPreview/AttachmentPreview.scss.js";import"file-extension";import"image-extensions";import"video-extensions";import{Avatar as I}from"../../componentsV2/Avatar/Avatar.js";import{LinkedText as v}from"../LinkedText/LinkedText.js";import{CommentCardReactions as C}from"./CommentCardReactions.js";import{CommentCardReplies as f}from"./CommentCardReplies.js";import b from"./CommentCard.scss.js";function y(o,s){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),n.push.apply(n,i)}return n}function O(s){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?y(Object(i),!0).forEach((function(n){o(s,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}var N=function(o){var s=o.rows;return u("div",{className:b.metadataRows,children:s.map((function(o){var s=o.label,n=o.value,i=o.unit;return d("div",{className:b.metadataRow,children:[u("span",{className:b.metadataLabel,children:s}),u("span",{className:b.metadataValue,children:n}),i&&u("span",{className:b.metadataUnit,children:i})]},s)}))})},g=n((function(o,n){var y=o.activity,g=o.variant,w=void 0===g?"expanded":g,A=o.author,F=o.timestamp,R=o.subtitle,P=o.body,k=o.contextRows,M=o.attachment,x=o.storedAttachments,S=o.isLiked,T=o.likesCount,L=o.commentsCount,D=o.replies,B=o.hasMoreReplies,E=o.moreRepliesCount,U=o.attachments,V=o.onAttachmentClick,z=o.onAttachmentShare,G=o.attachmentSlot,H=o.chip,W=o.chipColor,q=o.onLike,K=o.onReplyToggle,Z=o.onForward,J=o.onShowMoreReplies,Q=o.menuItems,X=o.isReplyOpen,Y=o.replyInput,$=o.editForm,_=o.width,oo=o.onMouseEnter,so=o.onMouseLeave,no=o.className,io=o.testId,co=a(y,"comment"),eo=co?[].concat(s(null!=Q?Q:[]),s(co.menuItems)):Q,to=co?co.replyInput:Y,ro=co?co.isReplyOpen:X,mo=co?co.replies:D,ao=!(null==k||!k.length),lo=ao&&!H,po=!!(co||q||K||Z||null!=eo&&eo.length||lo),uo=lo&&u(p,{placement:"top",className:b.metadataTooltip,title:u(N,{rows:k}),children:u("span",{className:b.infoButton,"data-testid":"comment-card-info",children:u(h,{size:12,strokeWidth:2})})}),jo=u(C,{info:uo,commentsCount:co?co.commentsCount:L,likesCount:co?co.likesCount:T,isLiked:co?co.isLiked:S,menuItems:eo,onLike:co?co.onLike:q,onReplyToggle:co?co.onReplyToggle:K,onForward:Z}),ho=d("div",{className:b.bodyRow,children:[u("div",{className:b.text,children:u(v,{children:P})}),H&&u(p,{placement:"top",className:b.metadataTooltip,title:ao?u(N,{rows:k}):"",children:u("span",{className:e(b.chip,!!W&&b.chipAccented),style:W?{borderLeftColor:W}:void 0,children:H})})]}),Io=i((function(){return null!=x?x:[M].filter(Boolean)}),[x,M]),vo=m(Io),Co=vo.length?vo:U,fo=null!=Co&&Co.length?u(l,{items:Co,onItemClick:V,onShare:z}):null,bo={ref:n,width:_,radius:12,onMouseEnter:oo,onMouseLeave:so,testId:io,className:no};if(null!=co&&co.isDeleted)return null;var yo=function(o){return d(j,{children:[o,null==co?void 0:co.deleteDialog]})};if("preview"===w)return yo(d(t,O(O({},bo),{},{maxHeight:r,children:[d("div",{className:b.compactBody,children:[d("div",{className:b.compactTop,children:[u(I,{size:24,name:A.name,imageSrc:A.avatarUrl,className:b.avatar}),u("span",{className:b.name,children:A.name}),u("span",{className:b.compactTime,children:F})]}),u("div",{className:b.scrollBody,children:ho})]}),po&&u("div",{className:b.compactFooter,children:jo})]})));var Oo=!!$,No=d("div",{className:b.header,children:[u(I,{size:24,name:A.name,imageSrc:A.avatarUrl,className:b.avatar}),d("div",{className:b.headerText,children:[d("div",{className:b.nameRow,children:[u("span",{className:b.name,children:A.name}),F&&u("span",{className:b.timestamp,children:F})]}),R&&u("span",{className:b.subtitle,children:R})]})]});return yo(d(t,O(O({},bo),{},Oo?{children:[u("div",{className:b.editHeader,children:No}),$]}:{children:[d("div",{className:b.capped,style:{maxHeight:r},children:[d("div",{className:b.bodySurface,children:[No,d("div",{className:b.scrollBody,children:[ho,(fo||G)&&d("div",{className:b.attachment,children:[fo,G]})]})]}),po&&u("div",{className:b.footer,children:jo})]}),po&&u(c,{in:ro,timeout:250,unmountOnExit:!0,children:u("div",{className:b.repliesSection,children:u(f,{replies:mo,hasMoreReplies:co?co.hasMoreReplies:B,moreRepliesCount:co?co.moreRepliesCount:E,isReplyOpen:ro,replyInput:to,onShowMoreReplies:co?co.onShowMoreReplies:J})})})]})))}));export{g as CommentCard};
1
+ import o from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/helpers/toConsumableArray";import{forwardRef as n,useMemo as i}from"react";import{Collapse as c}from"@material-ui/core";import e from"classnames";import{FeedCard as t,FEED_CARD_MAX_HEIGHT_PX as r}from"../FeedCard/FeedCard.js";import{useStoredAttachments as m}from"../AttachmentPreview/useStoredAttachments.js";import{useFeedActivity as a}from"../FeedCard/useFeedActivity.js";import{AttachmentPreview as l}from"../AttachmentPreview/AttachmentPreview.js";import"../../componentsV2/FileIcon/FileIcon.js";import"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as p}from"../../componentsV2/Tooltip/Tooltip.js";import{jsx as u,jsxs as d,Fragment as j}from"react/jsx-runtime";import{InfoIcon as h}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"@babel/runtime/helpers/slicedToArray";import"../../componentsV2/Menu/Menu.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../clients/jsonApi/index.js";import"../../utils/main.js";import"../AttachmentPreview/AttachmentImage.js";import"../AttachmentPreview/AttachmentPreview.scss.js";import"file-extension";import"image-extensions";import"video-extensions";import{Avatar as I}from"../../componentsV2/Avatar/Avatar.js";import{LinkedText as v}from"../LinkedText/LinkedText.js";import{CommentCardReactions as C}from"./CommentCardReactions.js";import{CommentCardReplies as f}from"./CommentCardReplies.js";import b from"./CommentCard.scss.js";function O(o,s){var n=Object.keys(o);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable}))),n.push.apply(n,i)}return n}function y(s){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?O(Object(i),!0).forEach((function(n){o(s,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):O(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}var N=function(o){var s=o.rows;return u("div",{className:b.metadataRows,children:s.map((function(o){var s=o.label,n=o.value,i=o.unit;return d("div",{className:b.metadataRow,children:[u("span",{className:b.metadataLabel,children:s}),u("span",{className:b.metadataValue,children:n}),i&&u("span",{className:b.metadataUnit,children:i})]},s)}))})},g=n((function(o,n){var O=o.activity,g=o.variant,A=void 0===g?"expanded":g,F=o.author,w=o.timestamp,R=o.subtitle,P=o.body,k=o.contextRows,M=o.attachment,x=o.storedAttachments,S=o.isLiked,T=o.likesCount,D=o.commentsCount,L=o.replies,B=o.hasMoreReplies,E=o.moreRepliesCount,U=o.attachments,V=o.onAttachmentClick,z=o.onAttachmentShare,G=o.attachmentSlot,H=o.chip,W=o.chipColor,q=o.onLike,K=o.onReplyToggle,Z=o.onForward,J=o.onShowMoreReplies,Q=o.menuItems,X=o.isReplyOpen,Y=o.replyInput,$=o.editForm,_=o.width,oo=o.onMouseEnter,so=o.onMouseLeave,no=o.className,io=o.testId,co=a(O,"comment"),eo=co?[].concat(s(null!=Q?Q:[]),s(co.menuItems)):Q,to=co?co.replyInput:Y,ro=co?co.isReplyOpen:X,mo=co?co.replies:L,ao=!(null==k||!k.length),lo=ao&&!H,po=!!(co||q||K||Z||null!=eo&&eo.length||lo),uo=lo&&u(p,{placement:"top",className:b.metadataTooltip,title:u(N,{rows:k}),children:u("span",{className:b.infoButton,"data-testid":"comment-card-info",children:u(h,{size:12,strokeWidth:2})})}),jo=u(C,{info:uo,commentsCount:co?co.commentsCount:D,likesCount:co?co.likesCount:T,isLiked:co?co.isLiked:S,menuItems:eo,onLike:co?co.onLike:q,onReplyToggle:co?co.onReplyToggle:K,onForward:Z}),ho=d("div",{className:b.text,children:[H&&u(p,{placement:"top",className:b.metadataTooltip,title:ao?u(N,{rows:k}):"",children:d("span",{className:e(b.chip,!!W&&b.chipAccented),style:W?{"--chip-color":W}:void 0,children:[W&&u("span",{className:b.chipDot}),H]})}),u(v,{children:P})]}),Io=i((function(){return null!=x?x:[M].filter(Boolean)}),[x,M]),vo=m(Io),Co=vo.length?vo:U,fo=null!=Co&&Co.length?u(l,{items:Co,onItemClick:V,onShare:z}):null,bo={ref:n,width:_,radius:12,onMouseEnter:oo,onMouseLeave:so,testId:io,className:no};if(null!=co&&co.isDeleted)return null;var Oo=function(o){return d(j,{children:[o,null==co?void 0:co.deleteDialog]})};if("preview"===A)return Oo(d(t,y(y({},bo),{},{maxHeight:r,children:[d("div",{className:b.compactBody,children:[d("div",{className:b.compactTop,children:[u(I,{size:24,name:F.name,imageSrc:F.avatarUrl,className:b.avatar}),u("span",{className:b.name,children:F.name}),u("span",{className:b.compactTime,children:w})]}),u("div",{className:b.scrollBody,children:ho})]}),po&&u("div",{className:b.compactFooter,children:jo})]})));var yo=!!$,No=d("div",{className:b.header,children:[u(I,{size:24,name:F.name,imageSrc:F.avatarUrl,className:b.avatar}),d("div",{className:b.headerText,children:[d("div",{className:b.nameRow,children:[u("span",{className:b.name,children:F.name}),w&&u("span",{className:b.timestamp,children:w})]}),R&&u("span",{className:b.subtitle,children:R})]})]});return Oo(d(t,y(y({},bo),{},yo?{children:[u("div",{className:b.editHeader,children:No}),$]}:{children:[d("div",{className:b.capped,style:{maxHeight:r},children:[d("div",{className:b.bodySurface,children:[No,d("div",{className:b.scrollBody,children:[ho,(fo||G)&&d("div",{className:b.attachment,children:[fo,G]})]})]}),po&&u("div",{className:b.footer,children:jo})]}),po&&u(c,{in:ro,timeout:250,unmountOnExit:!0,children:u("div",{className:b.repliesSection,children:u(f,{replies:mo,hasMoreReplies:co?co.hasMoreReplies:B,moreRepliesCount:co?co.moreRepliesCount:E,isReplyOpen:ro,replyInput:to,onShowMoreReplies:co?co.onShowMoreReplies:J})})})]})))}));export{g as CommentCard};
2
2
  //# sourceMappingURL=CommentCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommentCard.js","sources":["../../../src/components/CommentCard/CommentCard.tsx"],"sourcesContent":["import { forwardRef, ReactElement, useMemo } from 'react';\nimport { Collapse } from '@material-ui/core';\nimport classNames from 'classnames';\n\nimport { FeedCard, FEED_CARD_MAX_HEIGHT_PX } from '../FeedCard';\nimport { StoredAttachment } from '../AttachmentPreview/useStoredAttachment';\nimport { useStoredAttachments } from '../AttachmentPreview/useStoredAttachments';\nimport { useFeedActivity } from '../FeedCard/useFeedActivity';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LinkedText } from '../LinkedText';\nimport { InfoIcon } from '../../icons';\n\nimport { CommentCardReactions } from './CommentCardReactions';\nimport { CommentCardReplies } from './CommentCardReplies';\nimport { CommentCardProps, CommentContextRow } from './CommentCard.types';\n\nimport styles from './CommentCard.scss';\n\nconst MetadataTooltip = ({ rows }: { rows: CommentContextRow[] }) => (\n <div className={styles.metadataRows}>\n {rows.map(({ label, value, unit }) => (\n <div key={label} className={styles.metadataRow}>\n <span className={styles.metadataLabel}>{label}</span>\n <span className={styles.metadataValue}>{value}</span>\n {unit && <span className={styles.metadataUnit}>{unit}</span>}\n </div>\n ))}\n </div>\n);\n\nexport const CommentCard = forwardRef<HTMLDivElement, CommentCardProps>((props, ref) => {\n const {\n activity,\n variant = 'expanded',\n author,\n timestamp,\n subtitle,\n body,\n contextRows,\n attachment,\n storedAttachments,\n isLiked,\n likesCount,\n commentsCount,\n replies,\n hasMoreReplies,\n moreRepliesCount,\n attachments,\n onAttachmentClick,\n onAttachmentShare,\n attachmentSlot,\n chip,\n chipColor,\n onLike,\n onReplyToggle,\n onForward,\n onShowMoreReplies,\n menuItems,\n isReplyOpen,\n replyInput,\n editForm,\n width,\n onMouseEnter,\n onMouseLeave,\n className,\n testId,\n } = props;\n\n const activityBinding = useFeedActivity(activity, 'comment');\n const cardMenuItems = activityBinding\n ? [...(menuItems ?? []), ...activityBinding.menuItems]\n : menuItems;\n const cardReplyInput = activityBinding ? activityBinding.replyInput : replyInput;\n const cardIsReplyOpen = activityBinding ? activityBinding.isReplyOpen : isReplyOpen;\n const cardReplies = activityBinding ? activityBinding.replies : replies;\n\n const hasMetadata = !!contextRows?.length;\n // The chip takes over the metadata tooltip when present, so the info icon is redundant.\n const showInfoIcon = hasMetadata && !chip;\n\n const hasFooter = !!(\n activityBinding ||\n onLike ||\n onReplyToggle ||\n onForward ||\n cardMenuItems?.length ||\n showInfoIcon\n );\n\n const info = showInfoIcon && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={<MetadataTooltip rows={contextRows} />}\n >\n <span className={styles.infoButton} data-testid=\"comment-card-info\">\n <InfoIcon size={12} strokeWidth={2} />\n </span>\n </Tooltip>\n );\n\n const reactions = (\n <CommentCardReactions\n info={info}\n commentsCount={activityBinding ? activityBinding.commentsCount : commentsCount}\n likesCount={activityBinding ? activityBinding.likesCount : likesCount}\n isLiked={activityBinding ? activityBinding.isLiked : isLiked}\n menuItems={cardMenuItems}\n onLike={activityBinding ? activityBinding.onLike : onLike}\n onReplyToggle={activityBinding ? activityBinding.onReplyToggle : onReplyToggle}\n onForward={onForward}\n />\n );\n\n const bodyRow = (\n <div className={styles.bodyRow}>\n <div className={styles.text}>\n <LinkedText>{body}</LinkedText>\n </div>\n {chip && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={hasMetadata ? <MetadataTooltip rows={contextRows} /> : ''}\n >\n <span\n className={classNames(styles.chip, !!chipColor && styles.chipAccented)}\n style={chipColor ? { borderLeftColor: chipColor } : undefined}\n >\n {chip}\n </span>\n </Tooltip>\n )}\n </div>\n );\n\n const storedList = useMemo(\n () => storedAttachments ?? ([attachment].filter(Boolean) as StoredAttachment[]),\n [storedAttachments, attachment]\n );\n const storedItems = useStoredAttachments(storedList);\n const items = storedItems.length ? storedItems : attachments;\n\n // Undefined is the norm, which lets AttachmentPreview run its own lightbox; a caller that\n // passes the prop is taking the click over.\n const attachmentPreview = items?.length ? (\n <AttachmentPreview items={items} onItemClick={onAttachmentClick} onShare={onAttachmentShare} />\n ) : null;\n\n const surfaceProps = {\n ref,\n width,\n radius: 12,\n onMouseEnter,\n onMouseLeave,\n testId,\n className,\n };\n\n if (activityBinding?.isDeleted) return null;\n const withOverlays = (card: ReactElement) => (\n <>\n {card}\n {activityBinding?.deleteDialog}\n </>\n );\n\n if (variant === 'preview') {\n return withOverlays(\n <FeedCard {...surfaceProps} maxHeight={FEED_CARD_MAX_HEIGHT_PX}>\n <div className={styles.compactBody}>\n <div className={styles.compactTop}>\n <Avatar\n size={24}\n name={author.name}\n imageSrc={author.avatarUrl}\n className={styles.avatar}\n />\n <span className={styles.name}>{author.name}</span>\n <span className={styles.compactTime}>{timestamp}</span>\n </div>\n <div className={styles.scrollBody}>{bodyRow}</div>\n </div>\n {hasFooter && <div className={styles.compactFooter}>{reactions}</div>}\n </FeedCard>\n );\n }\n\n const editing = !!editForm;\n\n const headerEl = (\n <div className={styles.header}>\n <Avatar size={24} name={author.name} imageSrc={author.avatarUrl} className={styles.avatar} />\n <div className={styles.headerText}>\n <div className={styles.nameRow}>\n <span className={styles.name}>{author.name}</span>\n {timestamp && <span className={styles.timestamp}>{timestamp}</span>}\n </div>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n </div>\n );\n\n if (editing) {\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.editHeader}>{headerEl}</div>\n {editForm}\n </FeedCard>\n );\n }\n\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.capped} style={{ maxHeight: FEED_CARD_MAX_HEIGHT_PX }}>\n <div className={styles.bodySurface}>\n {headerEl}\n\n <div className={styles.scrollBody}>\n {bodyRow}\n {(attachmentPreview || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachmentPreview}\n {attachmentSlot}\n </div>\n )}\n </div>\n </div>\n\n {hasFooter && <div className={styles.footer}>{reactions}</div>}\n </div>\n\n {hasFooter && (\n <Collapse in={cardIsReplyOpen} timeout={250} unmountOnExit>\n <div className={styles.repliesSection}>\n <CommentCardReplies\n replies={cardReplies}\n hasMoreReplies={activityBinding ? activityBinding.hasMoreReplies : hasMoreReplies}\n moreRepliesCount={\n activityBinding ? activityBinding.moreRepliesCount : moreRepliesCount\n }\n isReplyOpen={cardIsReplyOpen}\n replyInput={cardReplyInput}\n onShowMoreReplies={\n activityBinding ? activityBinding.onShowMoreReplies : onShowMoreReplies\n }\n />\n </div>\n </Collapse>\n )}\n </FeedCard>\n );\n});\n"],"names":["MetadataTooltip","_ref","rows","_jsx","className","styles","metadataRows","children","map","_ref2","label","value","unit","_jsxs","metadataRow","metadataLabel","metadataValue","metadataUnit","CommentCard","forwardRef","props","ref","activity","_props$variant","variant","author","timestamp","subtitle","body","contextRows","attachment","storedAttachments","isLiked","likesCount","commentsCount","replies","hasMoreReplies","moreRepliesCount","attachments","onAttachmentClick","onAttachmentShare","attachmentSlot","chip","chipColor","onLike","onReplyToggle","onForward","onShowMoreReplies","menuItems","isReplyOpen","replyInput","editForm","width","onMouseEnter","onMouseLeave","testId","activityBinding","useFeedActivity","cardMenuItems","cardReplyInput","cardIsReplyOpen","cardReplies","hasMetadata","length","showInfoIcon","hasFooter","info","Tooltip","placement","metadataTooltip","title","infoButton","InfoIcon","size","strokeWidth","reactions","CommentCardReactions","bodyRow","text","LinkedText","classNames","chipAccented","style","borderLeftColor","undefined","storedList","useMemo","filter","Boolean","storedItems","useStoredAttachments","items","attachmentPreview","AttachmentPreview","onItemClick","onShare","surfaceProps","radius","isDeleted","withOverlays","card","_Fragment","deleteDialog","FeedCard","maxHeight","FEED_CARD_MAX_HEIGHT_PX","compactBody","compactTop","Avatar","name","imageSrc","avatarUrl","avatar","compactTime","scrollBody","compactFooter","editing","headerEl","header","headerText","nameRow","editHeader","capped","bodySurface","footer","Collapse","in","timeout","unmountOnExit","repliesSection","CommentCardReplies"],"mappings":"w0LAoBA,IAAMA,EAAkB,SAAHC,GAAA,IAAMC,IAAAA,KAAI,OAC7BC,EAAA,MAAA,CAAKC,UAAWC,EAAOC,aAAaC,SACjCL,EAAKM,KAAI,SAAAC,GAAA,IAAGC,IAAAA,MAAOC,IAAAA,MAAOC,IAAAA,KAAI,OAC7BC,EAAA,MAAA,CAAiBT,UAAWC,EAAOS,YAAYP,SAC7C,CAAAJ,EAAA,OAAA,CAAMC,UAAWC,EAAOU,cAAcR,SAAEG,IACxCP,EAAA,OAAA,CAAMC,UAAWC,EAAOW,cAAcT,SAAEI,IACvCC,G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EAAOwG,KAAKtG,SAAEkB,EAAOoF,OACrCnF,GAAavB,EAAA,OAAA,CAAMC,UAAWC,EAAOqB,UAAUnB,SAAEmB,OAEnDC,GAAYxB,EAAA,OAAA,CAAMC,UAAWC,EAAOsB,SAASpB,SAAEoB,UAKtD,OACSwE,GACLtF,EAAC0F,SAAaP,IAAY,GAF1BoB,GAE0B,CAAA7G,SACxB,CAAAJ,EAAA,MAAA,CAAKC,UAAWC,EAAOoH,WAAWlH,SAAE8G,KACnClE,IAMqB,CAAA5C,SACxB,CAAAM,EAAA,MAAA,CAAKT,UAAWC,EAAOqH,OAAQxC,MAAO,CAAEsB,UAAWC,GAA0BlG,SAC3E,CAAAM,EAAA,MAAA,CAAKT,UAAWC,EAAOsH,YAAYpH,SAAA,CAChC8G,GAEDxG,EAAA,MAAA,CAAKT,UAAWC,EAAO6G,WAAW3G,SAAA,CAC/BsE,IACCe,IAAqBnD,IACrB5B,EAAA,MAAA,CAAKT,UAAWC,EAAOyB,WAAWvB,SAC/BqF,CAAAA,GACAnD,WAMRwB,IAAa9D,EAAA,MAAA,CAAKC,UAAWC,EAAOuH,OAAOrH,SAAEoE,QAG/CV,IACC9D,EAAC0H,EAAQ,CAACC,GAAIlE,GAAiBmE,QAAS,IAAKC,eAAa,EAAAzH,SACxDJ,EAAA,MAAA,CAAKC,UAAWC,EAAO4H,eAAe1H,SACpCJ,EAAC+H,EAAkB,CACjB/F,QAAS0B,GACTzB,eAAgBoB,GAAkBA,GAAgBpB,eAAiBA,EACnEC,iBACEmB,GAAkBA,GAAgBnB,iBAAmBA,EAEvDY,YAAaW,GACbV,WAAYS,GACZZ,kBACES,GAAkBA,GAAgBT,kBAAoBA,YAQtE"}
1
+ {"version":3,"file":"CommentCard.js","sources":["../../../src/components/CommentCard/CommentCard.tsx"],"sourcesContent":["import { CSSProperties, forwardRef, ReactElement, useMemo } from 'react';\nimport { Collapse } from '@material-ui/core';\nimport classNames from 'classnames';\n\nimport { FeedCard, FEED_CARD_MAX_HEIGHT_PX } from '../FeedCard';\nimport { StoredAttachment } from '../AttachmentPreview/useStoredAttachment';\nimport { useStoredAttachments } from '../AttachmentPreview/useStoredAttachments';\nimport { useFeedActivity } from '../FeedCard/useFeedActivity';\nimport { AttachmentPreview } from '../AttachmentPreview';\nimport { Avatar } from '../../componentsV2/Avatar';\nimport { Tooltip } from '../../componentsV2/Tooltip';\nimport { LinkedText } from '../LinkedText';\nimport { InfoIcon } from '../../icons';\n\nimport { CommentCardReactions } from './CommentCardReactions';\nimport { CommentCardReplies } from './CommentCardReplies';\nimport { CommentCardProps, CommentContextRow } from './CommentCard.types';\n\nimport styles from './CommentCard.scss';\n\nconst MetadataTooltip = ({ rows }: { rows: CommentContextRow[] }) => (\n <div className={styles.metadataRows}>\n {rows.map(({ label, value, unit }) => (\n <div key={label} className={styles.metadataRow}>\n <span className={styles.metadataLabel}>{label}</span>\n <span className={styles.metadataValue}>{value}</span>\n {unit && <span className={styles.metadataUnit}>{unit}</span>}\n </div>\n ))}\n </div>\n);\n\nexport const CommentCard = forwardRef<HTMLDivElement, CommentCardProps>((props, ref) => {\n const {\n activity,\n variant = 'expanded',\n author,\n timestamp,\n subtitle,\n body,\n contextRows,\n attachment,\n storedAttachments,\n isLiked,\n likesCount,\n commentsCount,\n replies,\n hasMoreReplies,\n moreRepliesCount,\n attachments,\n onAttachmentClick,\n onAttachmentShare,\n attachmentSlot,\n chip,\n chipColor,\n onLike,\n onReplyToggle,\n onForward,\n onShowMoreReplies,\n menuItems,\n isReplyOpen,\n replyInput,\n editForm,\n width,\n onMouseEnter,\n onMouseLeave,\n className,\n testId,\n } = props;\n\n const activityBinding = useFeedActivity(activity, 'comment');\n const cardMenuItems = activityBinding\n ? [...(menuItems ?? []), ...activityBinding.menuItems]\n : menuItems;\n const cardReplyInput = activityBinding ? activityBinding.replyInput : replyInput;\n const cardIsReplyOpen = activityBinding ? activityBinding.isReplyOpen : isReplyOpen;\n const cardReplies = activityBinding ? activityBinding.replies : replies;\n\n const hasMetadata = !!contextRows?.length;\n // The chip takes over the metadata tooltip when present, so the info icon is redundant.\n const showInfoIcon = hasMetadata && !chip;\n\n const hasFooter = !!(\n activityBinding ||\n onLike ||\n onReplyToggle ||\n onForward ||\n cardMenuItems?.length ||\n showInfoIcon\n );\n\n const info = showInfoIcon && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={<MetadataTooltip rows={contextRows} />}\n >\n <span className={styles.infoButton} data-testid=\"comment-card-info\">\n <InfoIcon size={12} strokeWidth={2} />\n </span>\n </Tooltip>\n );\n\n const reactions = (\n <CommentCardReactions\n info={info}\n commentsCount={activityBinding ? activityBinding.commentsCount : commentsCount}\n likesCount={activityBinding ? activityBinding.likesCount : likesCount}\n isLiked={activityBinding ? activityBinding.isLiked : isLiked}\n menuItems={cardMenuItems}\n onLike={activityBinding ? activityBinding.onLike : onLike}\n onReplyToggle={activityBinding ? activityBinding.onReplyToggle : onReplyToggle}\n onForward={onForward}\n />\n );\n\n const bodyRow = (\n <div className={styles.text}>\n {chip && (\n <Tooltip\n placement=\"top\"\n className={styles.metadataTooltip}\n title={hasMetadata ? <MetadataTooltip rows={contextRows} /> : ''}\n >\n <span\n className={classNames(styles.chip, !!chipColor && styles.chipAccented)}\n style={chipColor ? ({ '--chip-color': chipColor } as CSSProperties) : undefined}\n >\n {chipColor && <span className={styles.chipDot} />}\n {chip}\n </span>\n </Tooltip>\n )}\n <LinkedText>{body}</LinkedText>\n </div>\n );\n\n const storedList = useMemo(\n () => storedAttachments ?? ([attachment].filter(Boolean) as StoredAttachment[]),\n [storedAttachments, attachment]\n );\n const storedItems = useStoredAttachments(storedList);\n const items = storedItems.length ? storedItems : attachments;\n\n // Undefined is the norm, which lets AttachmentPreview run its own lightbox; a caller that\n // passes the prop is taking the click over.\n const attachmentPreview = items?.length ? (\n <AttachmentPreview items={items} onItemClick={onAttachmentClick} onShare={onAttachmentShare} />\n ) : null;\n\n const surfaceProps = {\n ref,\n width,\n radius: 12,\n onMouseEnter,\n onMouseLeave,\n testId,\n className,\n };\n\n if (activityBinding?.isDeleted) return null;\n const withOverlays = (card: ReactElement) => (\n <>\n {card}\n {activityBinding?.deleteDialog}\n </>\n );\n\n if (variant === 'preview') {\n return withOverlays(\n <FeedCard {...surfaceProps} maxHeight={FEED_CARD_MAX_HEIGHT_PX}>\n <div className={styles.compactBody}>\n <div className={styles.compactTop}>\n <Avatar\n size={24}\n name={author.name}\n imageSrc={author.avatarUrl}\n className={styles.avatar}\n />\n <span className={styles.name}>{author.name}</span>\n <span className={styles.compactTime}>{timestamp}</span>\n </div>\n <div className={styles.scrollBody}>{bodyRow}</div>\n </div>\n {hasFooter && <div className={styles.compactFooter}>{reactions}</div>}\n </FeedCard>\n );\n }\n\n const editing = !!editForm;\n\n const headerEl = (\n <div className={styles.header}>\n <Avatar size={24} name={author.name} imageSrc={author.avatarUrl} className={styles.avatar} />\n <div className={styles.headerText}>\n <div className={styles.nameRow}>\n <span className={styles.name}>{author.name}</span>\n {timestamp && <span className={styles.timestamp}>{timestamp}</span>}\n </div>\n {subtitle && <span className={styles.subtitle}>{subtitle}</span>}\n </div>\n </div>\n );\n\n if (editing) {\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.editHeader}>{headerEl}</div>\n {editForm}\n </FeedCard>\n );\n }\n\n return withOverlays(\n <FeedCard {...surfaceProps}>\n <div className={styles.capped} style={{ maxHeight: FEED_CARD_MAX_HEIGHT_PX }}>\n <div className={styles.bodySurface}>\n {headerEl}\n\n <div className={styles.scrollBody}>\n {bodyRow}\n {(attachmentPreview || attachmentSlot) && (\n <div className={styles.attachment}>\n {attachmentPreview}\n {attachmentSlot}\n </div>\n )}\n </div>\n </div>\n\n {hasFooter && <div className={styles.footer}>{reactions}</div>}\n </div>\n\n {hasFooter && (\n <Collapse in={cardIsReplyOpen} timeout={250} unmountOnExit>\n <div className={styles.repliesSection}>\n <CommentCardReplies\n replies={cardReplies}\n hasMoreReplies={activityBinding ? activityBinding.hasMoreReplies : hasMoreReplies}\n moreRepliesCount={\n activityBinding ? activityBinding.moreRepliesCount : moreRepliesCount\n }\n isReplyOpen={cardIsReplyOpen}\n replyInput={cardReplyInput}\n onShowMoreReplies={\n activityBinding ? activityBinding.onShowMoreReplies : onShowMoreReplies\n }\n />\n </div>\n </Collapse>\n )}\n </FeedCard>\n );\n});\n"],"names":["MetadataTooltip","_ref","rows","_jsx","className","styles","metadataRows","children","map","_ref2","label","value","unit","_jsxs","metadataRow","metadataLabel","metadataValue","metadataUnit","CommentCard","forwardRef","props","ref","activity","_props$variant","variant","author","timestamp","subtitle","body","contextRows","attachment","storedAttachments","isLiked","likesCount","commentsCount","replies","hasMoreReplies","moreRepliesCount","attachments","onAttachmentClick","onAttachmentShare","attachmentSlot","chip","chipColor","onLike","onReplyToggle","onForward","onShowMoreReplies","menuItems","isReplyOpen","replyInput","editForm","width","onMouseEnter","onMouseLeave","testId","activityBinding","useFeedActivity","cardMenuItems","cardReplyInput","cardIsReplyOpen","cardReplies","hasMetadata","length","showInfoIcon","hasFooter","info","Tooltip","placement","metadataTooltip","title","infoButton","InfoIcon","size","strokeWidth","reactions","CommentCardReactions","bodyRow","text","classNames","chipAccented","style","undefined","chipDot","LinkedText","storedList","useMemo","filter","Boolean","storedItems","useStoredAttachments","items","attachmentPreview","AttachmentPreview","onItemClick","onShare","surfaceProps","radius","isDeleted","withOverlays","card","_Fragment","deleteDialog","FeedCard","maxHeight","FEED_CARD_MAX_HEIGHT_PX","compactBody","compactTop","Avatar","name","imageSrc","avatarUrl","avatar","compactTime","scrollBody","compactFooter","editing","headerEl","header","headerText","nameRow","editHeader","capped","bodySurface","footer","Collapse","in","timeout","unmountOnExit","repliesSection","CommentCardReplies"],"mappings":"w0LAoBA,IAAMA,EAAkB,SAAHC,GAAA,IAAMC,IAAAA,KAAI,OAC7BC,EAAA,MAAA,CAAKC,UAAWC,EAAOC,aAAaC,SACjCL,EAAKM,KAAI,SAAAC,GAAA,IAAGC,IAAAA,MAAOC,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AAgBT,kBAAoBA,YAQtE"}
@@ -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",chipDot:"CommentCard_chipDot__P-usA",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);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;box-sizing:border-box;color:var(--palette-primary-text-1);cursor:pointer;display:flex;float:right;font-size:12px;gap:4px;height:24px;line-height:16px;margin:4px 0 0 8px;padding:6px;white-space:nowrap}.CommentCard_chipAccented__Xl8ek{background:linear-gradient(94deg,rgb(from var(--chip-color) r g b/.16) 1%,transparent 35%),rgb(from var(--palette-primary-text-1) r g b/.04);border:.5px solid rgb(from var(--chip-color) r g b/.5)}.CommentCard_chipDot__P-usA{background:var(--chip-color);border-radius:50%;flex-shrink:0;height:6px;width:6px}.CommentCard_text__eAIZM{color:var(--palette-primary-text-1);font-size:12px;line-height:16px;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};
2
2
  //# sourceMappingURL=CommentCard.scss.js.map
@@ -52,7 +52,6 @@ export type CommentCardProps = {
52
52
  onAttachmentShare?: (item: AttachmentPreviewItem) => void;
53
53
  attachmentSlot?: ReactNode;
54
54
  chip?: ReactNode;
55
- /** Colours the chip's leading edge. */
56
55
  chipColor?: string;
57
56
  onLike?: () => void;
58
57
  onReplyToggle?: () => void;