@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.
@@ -1 +1 @@
1
- "use strict";var e=require("@material-ui/core"),t=require("moment"),a=require("../../../utils/mobileDetect.js"),r=require("../../UserMention/utils/index.js"),i=require("../../Attachment/index.js"),n=require("../../../utils/convert.js"),o=require("react/jsx-runtime");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=s(t),c=e.makeStyles((function(e){return{text:{color:e.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},infoField:{color:e.palette.primary.text6,"& span":{color:"#fff"}}}}));module.exports=function(t){var s=t.feedItem,d=s.context.hookload_broomstick_comment,m=d.body,u=d.attachment,p=void 0===u?{}:u,h=d.data,f=h.timestamp,x=h.measuredDepth,y=h.activityLabel,j=h.hookload,g=s.mentioned_users,v=c(),N=n.convertValue(+x,"length","ft"),b=n.convertValue(+j,"force","klbf");return o.jsxs("div",{className:v.wrapper,children:[m&&o.jsx(e.Typography,{"data-testid":"".concat("HookloadCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:r.formatMentionText(m,g,a.isNativeDetected)}),Number.isFinite(x)&&o.jsxs(e.Typography,{className:v.infoField,children:["Measured Depth:"," ",o.jsx("span",{children:"".concat(Math.round(N).toLocaleString()," ").concat(n.getUnitDisplay("length"))})]}),j&&o.jsxs(e.Typography,{className:v.infoField,children:["Hookload:"," ",o.jsx("span",{children:"".concat(Math.round(b).toLocaleString()," ").concat(n.getUnitDisplay("force"))})]}),y&&o.jsxs(e.Typography,{className:v.infoField,children:["Activity: ",o.jsx("span",{children:y})]}),f&&o.jsxs(e.Typography,{className:v.infoField,children:["Time: ",o.jsx("span",{children:l.default.unix(f).format("MM/DD/YY HH:mm")})]}),p&&(p.signed_url||p.url||p.name)&&o.jsx("div",{className:v.attachment,children:o.jsx(i,{small:!0,attachmentUrl:p.signed_url||p.url,fileName:p.name,displayName:p.name})})]})};
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":";AA6BA;;;;;;;;;;;;;;;;gBAkEC"}
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 e,Typography as t}from"@material-ui/core";import a from"moment";import{isNativeDetected as o}from"../../../utils/mobileDetect.js";import{formatMentionText as i}from"../../UserMention/utils/index.js";import r from"../../Attachment/index.js";import{convertValue as n,getUnitDisplay as m}from"../../../utils/convert.js";import{jsxs as l,jsx as c}from"react/jsx-runtime";var d=e((function(e){return{text:{color:e.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},infoField:{color:e.palette.primary.text6,"& span":{color:"#fff"}}}})),s=function(e){var s=e.feedItem,f=s.context.hookload_broomstick_comment,h=f.body,p=f.attachment,u=void 0===p?{}:p,v=f.data,g=v.timestamp,x=v.measuredDepth,N=v.activityLabel,b=v.hookload,y=s.mentioned_users,F=d(),k=n(+x,"length","ft"),M=n(+b,"force","klbf");return l("div",{className:F.wrapper,children:[h&&c(t,{"data-testid":"".concat("HookloadCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:i(h,y,o)}),Number.isFinite(x)&&l(t,{className:F.infoField,children:["Measured Depth:"," ",c("span",{children:"".concat(Math.round(k).toLocaleString()," ").concat(m("length"))})]}),b&&l(t,{className:F.infoField,children:["Hookload:"," ",c("span",{children:"".concat(Math.round(M).toLocaleString()," ").concat(m("force"))})]}),N&&l(t,{className:F.infoField,children:["Activity: ",c("span",{children:N})]}),g&&l(t,{className:F.infoField,children:["Time: ",c("span",{children:a.unix(g).format("MM/DD/YY HH:mm")})]}),u&&(u.signed_url||u.url||u.name)&&c("div",{className:F.attachment,children:c(r,{small:!0,attachmentUrl:u.signed_url||u.url,fileName:u.name,displayName:u.name})})]})};export{s as default};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.58.0-1",
3
+ "version": "0.58.0-3",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"