@corva/ui 3.77.0-2 → 3.77.0-3

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 +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,GAAQT,EAAA,OAAA,CAAMC,UAAWC,EAAOY,aAAaV,SAAEK,MAHxCF,OAMR,EAGKQ,EAAcC,GAA6C,SAACC,EAAOC,GAC9E,IACEC,EAkCEF,EAlCFE,SAAQC,EAkCNH,EAjCFI,QAAAA,aAAU,WAAUD,EACpBE,EAgCEL,EAhCFK,OACAC,EA+BEN,EA/BFM,UACAC,EA8BEP,EA9BFO,SACAC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AA,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,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,GAAQT,EAAA,OAAA,CAAMC,UAAWC,EAAOY,aAAaV,S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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,OAAQzC,MAAO,CAAEuB,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,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;
@@ -1 +1 @@
1
- {"version":3,"file":"CommentCard.types.d.ts","sourceRoot":"","sources":["../../../src/components/CommentCard/CommentCard.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACjC,MAAM,EAAE,aAAa,CAAC;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AAC,EAAE,SAAS,CAAC;IAEvB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAE1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -248,7 +248,7 @@ const validateDsn = dsn => {
248
248
 
249
249
  const MCP_SERVER_VERSION = '1.5.0';
250
250
 
251
- var version = "3.77.0-2";
251
+ var version = "3.77.0-3";
252
252
 
253
253
  const CORVA_UI_VERSION = version;
254
254
 
@@ -9764,7 +9764,7 @@ var componentsV1Data = [{
9764
9764
  exportName: "CommentCard"
9765
9765
  },
9766
9766
  category: "v1",
9767
- description: "See the [Comments migration guide](?path=/docs/components-v2-comments-migration-guide--docs). Comment card on the shared `FeedCard` surface. Two variants:\n\n- **`expanded`** (default) — header (avatar + name + timestamp, optional accent `subtitle`), body ending with the trace `chip` (its leading edge takes the trace `chipColor`), an optional attachment slot, the actions row, and — once `isReplyOpen` — the reply input above the replies list.\n- **`preview`** — compact list card: the same header + body, with the actions row in a bordered footer.\n\nActions row (Figma 2799:61842): `reply · like · share` on the left (each showing its count when `> 0`; the active like turns accent), then the info icon and the kebab `menuItems` on the right. Depth/time metadata lives only in a hover tooltip — never inline on the card: on the trace `chip` when there is one (the info icon is hidden then), otherwise on the info icon.",
9767
+ description: "See the [Comments migration guide](?path=/docs/components-v2-comments-migration-guide--docs). Comment card on the shared `FeedCard` surface. Two variants:\n\n- **`expanded`** (default) — header (avatar + name + timestamp, optional accent `subtitle`), body ending with the trace `chip` (`chipColor` fills its leading dot and tints its border and background), an optional attachment slot, the actions row, and — once `isReplyOpen` — the reply input above the replies list.\n- **`preview`** — compact list card: the same header + body, with the actions row in a bordered footer.\n\nActions row (Figma 2799:61842): `reply · like · share` on the left (each showing its count when `> 0`; the active like turns accent), then the info icon and the kebab `menuItems` on the right. Depth/time metadata lives only in a hover tooltip — never inline on the card: on the trace `chip` when there is one (the info icon is hidden then), otherwise on the info icon.",
9768
9768
  agentSummary: "Full comment card on the FeedCard surface: avatar header, body with trace chip, likes and replies. FeedCard alone is just the bare panel.",
9769
9769
  isExperimental: true,
9770
9770
  isDeprecated: false,
@@ -27819,7 +27819,7 @@ var entries = [{
27819
27819
  specifier: "@corva/ui/components",
27820
27820
  exportName: "CommentCard"
27821
27821
  },
27822
- searchText: "commentcard full comment card on the feedcard surface: avatar header, body with trace chip, likes and replies. feedcard alone is just the bare panel. see the [comments migration guide](?path=/docs/components-v2-comments-migration-guide--docs). comment card on the shared `feedcard` surface. two variants: - **`expanded`** (default) — header (avatar + name + timestamp, optional accent `subtitle`), body ending with the trace `chip` (its leading edge takes the trace `chipcolor`), an optional attachment slot, the actions row, and — once `isreplyopen` — the reply input above the replies list. - **`preview`** — compact list card: the same header + body, with the actions row in a bordered footer. actions row (figma 2799:61842): `reply · like · share` on the left (each showing its count when `> 0`; the active like turns accent), then the info icon and the kebab `menuitems` on the right. depth/time metadata lives only in a hover tooltip — never inline on the card: on the trace `chip` when there is one (the info icon is hidden then), otherwise on the info icon. commentcard comments migration guide comment card shared feedcard surface variants expanded",
27822
+ searchText: "commentcard full comment card on the feedcard surface: avatar header, body with trace chip, likes and replies. feedcard alone is just the bare panel. see the [comments migration guide](?path=/docs/components-v2-comments-migration-guide--docs). comment card on the shared `feedcard` surface. two variants: - **`expanded`** (default) — header (avatar + name + timestamp, optional accent `subtitle`), body ending with the trace `chip` (`chipcolor` fills its leading dot and tints its border and background), an optional attachment slot, the actions row, and — once `isreplyopen` — the reply input above the replies list. - **`preview`** — compact list card: the same header + body, with the actions row in a bordered footer. actions row (figma 2799:61842): `reply · like · share` on the left (each showing its count when `> 0`; the active like turns accent), then the info icon and the kebab `menuitems` on the right. depth/time metadata lives only in a hover tooltip — never inline on the card: on the trace `chip` when there is one (the info icon is hidden then), otherwise on the info icon. commentcard comments migration guide comment card shared feedcard surface variants expanded",
27823
27823
  isDeprecated: false
27824
27824
  }, {
27825
27825
  id: "component-v1-CommentComposer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "3.77.0-2",
3
+ "version": "3.77.0-3",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Shared components/utils for Corva ui projects",
6
6
  "repository": {