@corva/ui 0.58.0-1 → 0.58.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.
- package/cjs-bundle/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.js +1 -1
- package/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.d.ts +4 -1
- package/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@material-ui/core"),t=require("moment"),a=require("../../../utils/mobileDetect.js"),
|
|
1
|
+
"use strict";var e=require("@material-ui/core"),t=require("moment"),a=require("@material-ui/icons/Warning"),i=require("../../../utils/mobileDetect.js"),n=require("../../UserMention/utils/index.js"),r=require("../../Attachment/index.js"),o=require("../../../utils/convert.js"),l=require("../../Typography.js"),s=require("react/jsx-runtime");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(t),m=c(a),u=e.makeStyles((function(e){return{text:{color:e.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},warningContainer:{display:"flex",alignItems:"center",gap:8,marginTop:16},warningIcon:{fill:e.palette.warning.main},infoField:{color:e.palette.primary.text6,"& span":{color:"#fff"}}}}));module.exports=function(e){var t=e.feedItem,a=t.point,c=(a=void 0===a?{}:a).showNoVisiblePointWarning,h=t.context.hookload_broomstick_comment,g=h.body,f=h.attachment,p=void 0===f?{}:f,x=h.data,j=x.timestamp,v=x.measuredDepth,y=x.activityLabel,N=x.hookload,b=t.mentioned_users,q=u(),w=o.convertValue(+v,"length","ft"),D=o.convertValue(+N,"force","klbf");return s.jsxs("div",{className:q.wrapper,children:[g&&s.jsx(l.Regular14,{"data-testid":"".concat("HookloadCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:n.formatMentionText(g,b,i.isNativeDetected)}),Number.isFinite(v)&&s.jsxs(l.Regular14,{className:q.infoField,gutterBottom:!0,children:["Measured Depth:"," ",s.jsx("span",{children:"".concat(Math.round(w).toLocaleString()," ").concat(o.getUnitDisplay("length"))})]}),N&&s.jsxs(l.Regular14,{className:q.infoField,gutterBottom:!0,children:["Hookload:"," ",s.jsx("span",{children:"".concat(Math.round(D).toLocaleString()," ").concat(o.getUnitDisplay("force"))})]}),y&&s.jsxs(l.Regular14,{className:q.infoField,gutterBottom:!0,children:["Activity: ",s.jsx("span",{children:y})]}),j&&s.jsxs(l.Regular14,{className:q.infoField,gutterBottom:!0,children:["Time: ",s.jsx("span",{children:d.default.unix(j).format("MM/DD/YY HH:mm")})]}),c&&s.jsxs("div",{className:q.warningContainer,children:[s.jsx(m.default,{className:q.warningIcon}),s.jsx(l.Regular12,{children:"Point can’t be highlighted on comment hover when the dot is hidden"})]}),p&&(p.signed_url||p.url||p.name)&&s.jsx("div",{className:q.attachment,children:s.jsx(r,{small:!0,attachmentUrl:p.signed_url||p.url,fileName:p.name,displayName:p.name})})]})};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export default HookloadCommentFeedItem;
|
|
2
|
-
declare function HookloadCommentFeedItem({ feedItem: { context: { hookload_broomstick_comment: { body, attachment, data: { timestamp, measuredDepth, activityLabel, hookload }, }, }, mentioned_users: mentionedUsers, }, }: {
|
|
2
|
+
declare function HookloadCommentFeedItem({ feedItem: { point: { showNoVisiblePointWarning }, context: { hookload_broomstick_comment: { body, attachment, data: { timestamp, measuredDepth, activityLabel, hookload }, }, }, mentioned_users: mentionedUsers, }, }: {
|
|
3
3
|
feedItem: {
|
|
4
|
+
point?: {
|
|
5
|
+
showNoVisiblePointWarning: any;
|
|
6
|
+
};
|
|
4
7
|
context: {
|
|
5
8
|
hookload_broomstick_comment: {
|
|
6
9
|
body: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HookloadCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"HookloadCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.js"],"names":[],"mappings":";AAwCA;;;;;;;;;;;;;;;;;;;gBA2EC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as
|
|
1
|
+
import{makeStyles as t}from"@material-ui/core";import e from"moment";import o from"@material-ui/icons/Warning";import{isNativeDetected as i}from"../../../utils/mobileDetect.js";import{formatMentionText as n}from"../../UserMention/utils/index.js";import a from"../../Attachment/index.js";import{convertValue as r,getUnitDisplay as m}from"../../../utils/convert.js";import{Regular14 as l,Regular12 as c}from"../../Typography.js";import{jsxs as d,jsx as s}from"react/jsx-runtime";var h=t((function(t){return{text:{color:t.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},warningContainer:{display:"flex",alignItems:"center",gap:8,marginTop:16},warningIcon:{fill:t.palette.warning.main},infoField:{color:t.palette.primary.text6,"& span":{color:"#fff"}}}})),p=function(t){var p=t.feedItem,f=p.point,u=(f=void 0===f?{}:f).showNoVisiblePointWarning,g=p.context.hookload_broomstick_comment,v=g.body,N=g.attachment,x=void 0===N?{}:N,y=g.data,b=y.timestamp,w=y.measuredDepth,F=y.activityLabel,j=y.hookload,k=p.mentioned_users,M=h(),_=r(+w,"length","ft"),B=r(+j,"force","klbf");return d("div",{className:M.wrapper,children:[v&&s(l,{"data-testid":"".concat("HookloadCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:n(v,k,i)}),Number.isFinite(w)&&d(l,{className:M.infoField,gutterBottom:!0,children:["Measured Depth:"," ",s("span",{children:"".concat(Math.round(_).toLocaleString()," ").concat(m("length"))})]}),j&&d(l,{className:M.infoField,gutterBottom:!0,children:["Hookload:"," ",s("span",{children:"".concat(Math.round(B).toLocaleString()," ").concat(m("force"))})]}),F&&d(l,{className:M.infoField,gutterBottom:!0,children:["Activity: ",s("span",{children:F})]}),b&&d(l,{className:M.infoField,gutterBottom:!0,children:["Time: ",s("span",{children:e.unix(b).format("MM/DD/YY HH:mm")})]}),u&&d("div",{className:M.warningContainer,children:[s(o,{className:M.warningIcon}),s(c,{children:"Point can’t be highlighted on comment hover when the dot is hidden"})]}),x&&(x.signed_url||x.url||x.name)&&s("div",{className:M.attachment,children:s(a,{small:!0,attachmentUrl:x.signed_url||x.url,fileName:x.name,displayName:x.name})})]})};export{p as default};
|