@corva/ui 3.4.0-0 → 3.4.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs-bundle/components/AssetEditorV2/index.js +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/DvDCommentFeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/LessonsLearnedFeedItem/index.js +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/NptLessonsCommentFeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/PCCommentFeedItem.js +1 -1
- package/cjs-bundle/components/FeedItem/feedItemTypes/TracesMemoFeedItem.js +1 -1
- package/cjs-bundle/components/PostInput/PostInput.js +1 -1
- package/components/AssetEditorV2/index.d.ts +10 -1
- package/components/AssetEditorV2/index.d.ts.map +1 -1
- package/components/AssetEditorV2/index.js +1 -1
- package/components/FeedItem/feedItemTypes/DvDCommentFeedItem.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/DvDCommentFeedItem.js +1 -1
- package/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.js +1 -1
- package/components/FeedItem/feedItemTypes/LessonsLearnedFeedItem/index.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/LessonsLearnedFeedItem/index.js +1 -1
- package/components/FeedItem/feedItemTypes/NptLessonsCommentFeedItem.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/NptLessonsCommentFeedItem.js +1 -1
- package/components/FeedItem/feedItemTypes/PCCommentFeedItem.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/PCCommentFeedItem.js +1 -1
- package/components/FeedItem/feedItemTypes/TracesMemoFeedItem.d.ts.map +1 -1
- package/components/FeedItem/feedItemTypes/TracesMemoFeedItem.js +1 -1
- package/components/PostInput/PostInput.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/slicedToArray"),a=require("react"),r=require("prop-types"),l=require("lodash"),n=require("classnames"),i=require("@material-ui/core"),u=require("./components/PrimaryAssetSelect.js"),d=require("./components/SecondaryAssetSelect.js");require("./components/SelectItem.js");var o=require("./components/MultipleAssetsToggle.js"),c=require("./components/PrimaryAssetSelectV2.js"),p=require("./constants.js"),f=require("./utils/index.js");require("../../constants/goals.js");var y=require("../../constants/segment.js");require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/appPackages.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js");var
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/helpers/slicedToArray"),a=require("react"),r=require("prop-types"),l=require("lodash"),n=require("classnames"),i=require("@material-ui/core"),u=require("./components/PrimaryAssetSelect.js"),d=require("./components/SecondaryAssetSelect.js");require("./components/SelectItem.js");var o=require("./components/MultipleAssetsToggle.js"),c=require("./components/PrimaryAssetSelectV2.js"),p=require("./constants.js"),f=require("./utils/index.js");require("../../constants/goals.js");var y=require("../../constants/segment.js");require("../../constants/alerts.js"),require("../../constants/apps.js"),require("../../constants/drillstring.js"),require("../../constants/completion.js"),require("../../constants/appPackages.js"),require("../../constants/notifications.js"),require("../../constants/feed.js"),require("../../constants/bha.js");var A=require("../../constants/assetTypes.js");require("../../utils/env.js"),require("../GradientManager/configuration/constants.js");var m=require("react/jsx-runtime");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var S=g(e),b=g(t),v=g(s),T=g(r),h=g(n);function j(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,a)}return s}function q(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?j(Object(s),!0).forEach((function(t){b.default(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):j(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var I=i.makeStyles({title:{fontWeight:400,fontSize:20,margin:"24px 0 16px"}}),E=function(e){var t=e.appKey,s=e.appType,r=e.className,n=e.company,i=e.defaultValue,g=e.secondaryDefaultValue,T=e.disabled,j=e.isHiddenTitle,E=e.isNullable,P=e.label,O=e.onSettingsChange,C=e.primaryAssetFields,_=e.secondaryAssetFields,D=e.isExtendedSelect,F=e.isRequiredAssetId,N=e.settings,V=e.isVisibleMultipleAssetsToggle,x=e.assetsLimit,R=e.isDisabledSecondaryAssetSelect,w=e.isDrillingPlatformApp,G=e.secondaryAssetHelpText,L=e.onChange,k=e.elementsClassNames,H=l.get(s,["primaryAsset","assetType","type"]),Y=l.get(s,["primaryAsset","assetType","id"]),K=l.get(s,["primaryAsset","assetType","label"]),M=l.get(s,["primaryAsset","groups"]),U=l.get(s,["secondaryAsset","assetType","type"]),W=l.get(s,["secondaryAsset","assetType","id"]),z=l.get(s,["secondaryAsset","assetType","label"]),B=l.get(N,Y),J=B?Number(B):null,Q=l.get(N,W)?Number(l.get(N,W)):g||null,X=a.useState({id:J||i}),Z=v.default(X,2),$=Z[0],ee=Z[1],te=a.useState(Q),se=v.default(te,2),ae=se[0],re=se[1],le=a.useState(!1),ne=v.default(le,2),ie=ne[0],ue=ne[1],de=a.useState(),oe=v.default(de,2),ce=oe[0],pe=oe[1],fe=a.useState(!1),ye=v.default(fe,2),Ae=ye[0],me=ye[1],ge=a.useRef(!1),Se=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];O.apply(void 0,t.concat([ge.current]))},be=I(),ve=H===A.ASSET_TYPES.rig.type?c:u,Te=w&&null!=$&&$.assetId?null==$?void 0:$.assetId:null==$?void 0:$.id,he=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ee(t),re(null),ue(!1);var s=(e={},b.default(e,Y,null),b.default(e,W,null),b.default(e,"assets",null),e);Se(s)},je=Ae?Boolean($.length)&&!ie:(null==$?void 0:$.id)&&!ie;return a.useEffect((function(){l.isEmpty(N)&&he(Ae&&[])}),[N]),m.jsxs("div",{className:h.default(be.main,r),children:[!j&&m.jsx("div",{className:h.default(be.title,k.title),children:"Asset"}),V&&m.jsx(o,{onChange:function(e){var t=e.target;ge.current=!!t.checked,me(t.checked),he(t.checked&&[])},className:k.multiAssetSwitch}),m.jsx("div",{className:k.primaryAssetSelect,children:m.jsx(ve,{appKey:t,assetType:H,company:n,currentOption:$,currentValue:null==$?void 0:$.id,"data-testid":"".concat("DC_AppSettingsAssetEditor","_primaryAssetEditorAutocomplete"),defaultValue:i,disableClearable:!E,disabled:T,isNullable:E,isRequiredAssetId:F,label:P,multiple:Ae,onChange:function(e){if(L({primary:e}),Ae)!function(e){var t,s;if(!(e.length>x)){var a=(null===(t=e[0])||void 0===t?void 0:t.group)===y.PAD_GROUP.name,r=(null===(s=e[0])||void 0===s?void 0:s.group)===y.FRAC_FLEET_GROUP.name,l=1===e.length&&a,n=1===e.length&&r;if(l?(ue(!0),pe(y.PAD_GROUP)):n&&pe(y.FRAC_FLEET_GROUP),a){ee(e);var i=null==e?void 0:e.reduce((function(e,t){var s=t.parentFracFleetId,a=t.id,r={fracFleetId:s,padId:a};return D&&(r.assetId=s,r.replacedPadId=a),s?[].concat(S.default(e),[r]):e}),[]);Se({assets:i})}else{ee(e);var u=e.reduce((function(e,t){var s=b.default({},"".concat(t.type,"Id"),t.id);return F&&(s.assetId=t.assetId),D&&(s.assetId=t.assetId||t.id),[].concat(S.default(e),[s])}),[]);Se({assets:u})}}}(e);else{var t=e.id,s=e.type,a=e.parentFracFleetId;if(t)if(s!==A.ASSET_TYPES.pad.type){ee(e),re(null);var r=b.default({},Y,t);F&&(r.assetId=e.assetId),W&&(r[W]=null),Se(r),ue(!1)}else{var l;ee(e),ue(!0),re(t);var n=(l={},b.default(l,A.ASSET_TYPES.frac_fleet.id,Number(a)),b.default(l,A.ASSET_TYPES.pad.id,t),l);Se(n)}}},setCurrentOption:ee,selectedGroup:ce,onGroupChange:function(e){pe(e),he(Ae&&[])},onGroupReset:function(){pe(null),he(Ae&&[])},groups:M,onInputReset:he,onActiveAssetIdChange:function(e){ee((function(t){return q(q({},t),{},{activeWellId:e})}))},isDrillingPlatformApp:w,assetFields:f.getPrimaryAssetFields(H,C,w)})}),je&&m.jsxs("div",{className:k.secondaryAssetSelect,children:[G,m.jsx(d.default,{assetFields:U===A.ASSET_TYPES.pad.type?[].concat(S.default(_),["pad.active","pad.current"]):_,activeWellId:null==$?void 0:$.activeWellId,appKey:t,assetType:U,company:n,currentValue:ae,"data-testid":"".concat("DC_AppSettingsAssetEditor","_secondaryAutoComplete"),defaultValue:Ae?p.ACTIVE_ASSETS_ID:p.ACTIVE_ASSET_ID,disabled:Ae||R||T,isDrillingPlatformApp:w,isNullable:E,isRequiredAssetId:F,onChange:function(e){var t=e.id,s=e.assetId,a=e.name;L({secondary:{name:a}}),re(t);var r=t===p.ACTIVE_ASSET_ID?null:t,l=b.default({},W,r);F&&U===A.ASSET_TYPES.well.type?Se(q(q({},l),{},{replacedAssetId:w?r:s})):Se(l)},parentAssetId:Te,parentAssetType:w?"parent_asset_id":H,primaryAssetLabel:K,secondaryAssetLabel:z})]})]})};E.defaultProps={assetsLimit:null,label:"Choose An Asset",isNullable:!1,defaultValue:void 0,secondaryDefaultValue:void 0,isHiddenTitle:!1,appKey:null,isVisibleMultipleAssetsToggle:!1,isDisabledSecondaryAssetSelect:!1,primaryAssetFields:[],secondaryAssetFields:[],secondaryAssetHelpText:null,onChange:l.noop,elementsClassNames:{}},E.propTypes={assetsLimit:T.default.number,settings:T.default.shape({}).isRequired,appType:T.default.shape({}).isRequired,defaultValue:T.default.any,secondaryDefaultValue:T.default.any,onSettingsChange:T.default.func.isRequired,label:T.default.string,isNullable:T.default.bool,isHiddenTitle:T.default.bool,appKey:T.default.string,isVisibleMultipleAssetsToggle:T.default.bool,isDisabledSecondaryAssetSelect:T.default.bool,primaryAssetFields:T.default.arrayOf(T.default.shape({})),secondaryAssetFields:T.default.arrayOf(T.default.shape({})),secondaryAssetHelpText:T.default.oneOfType([T.default.element,T.default.string]),onChange:T.default.func,elementsClassNames:T.default.shape({title:T.default.string,multiAssetSwitch:T.default.string,primaryAssetSelect:T.default.string,secondaryAssetSelect:T.default.string})},module.exports=E;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@material-ui/core"),t=require("moment"),
|
|
1
|
+
"use strict";var e=require("@material-ui/core"),t=require("moment"),i=require("../../../utils/index.js"),a=require("../../../utils/mobileDetect.js"),n=require("../../UserMention/utils/index.js"),r=require("../../Attachment/index.js"),s=require("react/jsx-runtime");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(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"}}}})),d="DvDCommentFeedItem";module.exports=function(t){var l,m=t.feedItem,u=m.context.dvd_comment,p=u.body,h=u.attachment,f=void 0===h?{}:h,x=u.data,j=x.timestamp,y=x.bitDepth,v=x.holeDepth,g=x.cost,D=m.mentioned_users,N=c(),b=i.convertValue(+y,"length","ft"),F=i.convertValue(+v,"length","ft"),_=i.getUnitDisplay("length"),T=(null==f?void 0:f.signed_url)||(null==f?void 0:f.url),q=(null==f?void 0:f.file_name)||(null==f?void 0:f.name);return s.jsxs("div",{className:N.wrapper,children:[p&&s.jsx(e.Typography,{"data-testid":"".concat(d,"_message"),variant:"body1",gutterBottom:!0,children:n.formatMentionText(p,D,a.isNativeDetected)}),j&&s.jsxs(e.Typography,{className:N.infoField,children:["Time:"," ",s.jsx("span",{"data-testid":"".concat(d,"_time"),children:o.default.unix(j).format("MM.DD.YYYY, HH:mm")})]}),Number.isFinite(F)&&s.jsxs(e.Typography,{className:N.infoField,children:["Hole Depth: ",s.jsx("span",{"data-testid":"".concat(d,"_holeDepth"),children:"".concat(F," ").concat(_)})]}),Number.isFinite(b)&&s.jsxs(e.Typography,{className:N.infoField,children:["Bit Depth: ",s.jsx("span",{"data-testid":"".concat(d,"_bitDepth"),children:"".concat(b," ").concat(_)})]}),g&&Number.isFinite(g)&&s.jsxs(e.Typography,{className:N.infoField,children:["Cost: ",s.jsxs("span",{"data-testid":"".concat(d,"_cost"),children:[(l=g,l.toString().replace(/\B(?=(\d{3})+(?!\d))/g," "))," $"]})]}),f&&T&&s.jsx("div",{className:N.attachment,children:s.jsx(r,{small:!0,attachmentUrl:T,fileName:q,displayName:q})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@material-ui/core"),t=require("moment"),
|
|
1
|
+
"use strict";var e=require("@material-ui/core"),t=require("moment"),i=require("@material-ui/icons/Warning"),a=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(i),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,i=t.point,c=(i=void 0===i?{}:i).showNoVisiblePointWarning,g=t.context.hookload_broomstick_comment,h=g.body,f=g.attachment,p=void 0===f?{}:f,x=g.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"),k=(null==p?void 0:p.signed_url)||(null==p?void 0:p.url),F=(null==p?void 0:p.file_name)||(null==p?void 0:p.name);return s.jsxs("div",{className:q.wrapper,children:[h&&s.jsx(l.Regular14,{"data-testid":"".concat("HookloadCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:n.formatMentionText(h,b,a.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:"This activity is disabled in the application settings or not in range"})]}),p&&(k||F)&&s.jsx("div",{className:q.attachment,children:s.jsx(r,{small:!0,attachmentUrl:k,fileName:F,displayName:F})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("react"),a=require("prop-types"),s=require("@material-ui/core"),i=require("./icons/Critical.js"),r=require("./icons/Major.js"),n=require("./icons/Minor.js"),
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("react"),a=require("prop-types"),s=require("@material-ui/core"),i=require("./icons/Critical.js"),r=require("./icons/Major.js"),n=require("./icons/Minor.js"),l=require("../../../Attachment/index.js"),c=require("../../../../utils/convert.js"),o=require("react/jsx-runtime");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=d(e),u=d(a);function p(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,s)}return a}function j(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?p(Object(a),!0).forEach((function(t){m.default(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):p(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var v="LessonsLearnedFeedItem",h=s.makeStyles({item:{marginTop:"4px"},itemLabel:{fontWeight:"normal",fontSize:"14px",color:"#BDBDBD",marginRight:"8px"},itemValue:{fontSize:"14px",color:"#FFFFFF"},attachment:{paddingTop:10,width:300}});function x(e){var a,s=e.feedItem,d=h(),m=t.useMemo((function(){var e,t,a=(null===(e=s.context)||void 0===e||null===(t=e.lessons_learned)||void 0===t?void 0:t.data)||{};return j(j({},a),{},{md_start:c.convertValue(a.md_start,"length","ft"),tvd_start:c.convertValue(a.tvd_start,"length","ft")})}),[s]),u=null===(a=s.context)||void 0===a?void 0:a.lessons_learned.attachment,p=(null==u?void 0:u.signed_url)||(null==u?void 0:u.url),x=(null==u?void 0:u.file_name)||(null==u?void 0:u.name);return o.jsxs("div",{children:[o.jsx("div",{className:d.item,children:o.jsx("span",{"data-testid":"".concat(v,"_topic"),className:d.itemLabel,children:m.topic})}),o.jsxs("div",{className:d.item,children:[o.jsx("span",{className:d.itemLabel,children:"Event Cause:"}),o.jsx("span",{"data-testid":"".concat(v,"_Cause"),className:d.itemValue,children:m.cause})]}),o.jsxs("div",{className:d.item,style:{display:"flex",alignItems:"center"},children:[o.jsx("span",{className:d.itemLabel,children:"Event Severity:"}),o.jsx("span",{"data-testid":"".concat(v,"_severityIcon"),children:"Major"===m.severity?o.jsx(r,{}):"Critical"===m.severity?o.jsx(i,{}):"Minor"===m.severity?o.jsx(n,{}):null}),o.jsx("span",{"data-testid":"".concat(v,"_Severity"),className:d.itemValue,children:m.severity})]}),o.jsxs("div",{className:d.item,children:[o.jsx("span",{className:d.itemLabel,children:"MD/TVD:"}),o.jsxs("span",{"data-testid":"".concat(v,"_MD/TVD"),className:d.itemValue,children:[Number.isFinite(m.md_start)?m.md_start.fixFloat(2):"-","/",Number.isFinite(m.tvd_start)?m.tvd_start.fixFloat(2):"-"]})]}),o.jsxs("div",{className:d.item,children:[o.jsx("span",{className:d.itemLabel,children:"Hole Section:"}),o.jsx("span",{"data-testid":"".concat(v,"_HoleSection"),className:d.itemValue,children:m.section})]}),o.jsxs("div",{className:d.item,children:[o.jsx("span",{className:d.itemLabel,children:"Operation:"}),o.jsx("span",{"data-testid":"".concat(v,"_Operation"),className:d.itemValue,children:m.activity})]}),o.jsxs("div",{className:d.item,children:[o.jsx("span",{className:d.itemLabel,children:"Description:"}),o.jsx("div",{"data-testid":"".concat(v,"_Description"),className:d.itemValue,children:m.description})]}),u&&(p||x)&&o.jsx("div",{className:d.attachment,children:o.jsx(l,{small:!0,attachmentUrl:p,fileName:x,displayName:x})})]})}x.propTypes={feedItem:u.default.shape().isRequired};var f=t.memo(x);module.exports=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@material-ui/core"),t=require("../../../utils/mobileDetect.js"),
|
|
1
|
+
"use strict";var e=require("@material-ui/core"),t=require("../../../utils/mobileDetect.js"),n=require("../../UserMention/utils/index.js"),i=require("../../Attachment/index.js"),a=require("../../../utils/convert.js"),r=require("../../../constants/feed.js"),l=require("react/jsx-runtime"),s=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(o){var c=o.feedItem,d=c.context[r.FEED_ITEM_TYPES.TRACES_MEMO],m=d.body,u=d.attachment,h=void 0===u?{}:u,p=d.bitDepth,f=d.holeDepth,x=c.mentioned_users,g=s(),j=a.convertValue(+f,"length","ft"),y=a.convertValue(+f,"length","ft"),v=(null==h?void 0:h.signed_url)||(null==h?void 0:h.url),D=(null==h?void 0:h.file_name)||(null==h?void 0:h.name);return l.jsxs("div",{className:g.wrapper,children:[(f||0===f)&&l.jsxs(e.Typography,{className:g.infoField,children:["Hole Depth:"," ",l.jsx("span",{children:"".concat(Math.round(j).toLocaleString()," ").concat(a.getUnitDisplay("length"))})]}),(p||0===f)&&l.jsxs(e.Typography,{className:g.infoField,children:["Bit Depth:"," ",l.jsx("span",{children:"".concat(Math.round(y).toLocaleString()," ").concat(a.getUnitDisplay("length"))})]}),m&&l.jsxs(l.Fragment,{children:[l.jsx(e.Typography,{className:g.infoField,children:"Description:"}),l.jsx(e.Typography,{"data-testid":"".concat("NptLessonsCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:n.formatMentionText(m,x,t.isNativeDetected)})]}),h&&(v||D)&&l.jsx("div",{className:g.attachment,children:l.jsx(i,{small:!0,attachmentUrl:v,fileName:D,displayName:D})})]})};
|
|
@@ -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("../../../utils/mobileDetect.js"),i=require("../../UserMention/utils/index.js"),r=require("../../Attachment/index.js"),n=require("../../../utils/convert.js"),l=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(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 o=t.feedItem,d=o.type,m=o.context[d],u=m.body,p=m.attachment,f=void 0===p?{}:p,h=m.data,x=h.timestamp,v=h.holeDepth,y=o.mentioned_users,j=c(),g=n.convertValue(+v,"length","ft"),q=(null==f?void 0:f.signed_url)||(null==f?void 0:f.url),D=(null==f?void 0:f.file_name)||(null==f?void 0:f.name);return l.jsxs("div",{className:j.wrapper,children:[u&&l.jsx(e.Typography,{"data-testid":"".concat("PCCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:i.formatMentionText(u,y,a.isNativeDetected)}),x&&l.jsxs(e.Typography,{className:j.infoField,children:["Time: ",l.jsx("span",{children:s.default.unix(x).format("MM.DD.YYYY, HH:mm")})]}),(v||0===v)&&l.jsxs(e.Typography,{className:j.infoField,children:["Hole Depth:"," ",l.jsx("span",{children:"".concat(Math.round(g).toLocaleString()," ").concat(n.getUnitDisplay("length"))})]}),f&&(q||D)&&l.jsx("div",{className:j.attachment,children:l.jsx(r,{small:!0,attachmentUrl:q,fileName:D,displayName:D})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("prop-types"),a=require("moment"),i=require("@material-ui/core"),r=require("../../../utils/mobileDetect.js"),
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("prop-types"),a=require("moment"),i=require("@material-ui/core"),r=require("../../../utils/mobileDetect.js"),n=require("../../../utils/index.js"),s=require("../../Typography.js"),l=require("../../Attachment/index.js"),u=require("../../UserMention/utils/index.js"),d=require("../../CollapsibleContent.js"),o=require("../../../constants/feed.js"),c=require("react/jsx-runtime");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=m(e),f=m(t),h=m(a),x="TracesMemoFeedItem",b=i.makeStyles((function(e){return{message:{lineHeight:"20px"},container:{marginBottom:4,lineHeight:"20px"},label:{color:e.palette.primary.text6}}})),g=function(e){var t=e.feedItem,a=t.context[o.FEED_ITEM_TYPES.TRACES_MEMO],m=a.body,p=a.attachment,f=void 0===p?{}:p,g=a.bitDepth,j=a.holeDepth,q=a.timestamp,T=t.mentioned_users,_=b(),y=n.getUnitDisplay("length"),E=n.convertValue(+g,"length","ft"),D=n.convertValue(+j,"length","ft"),R=(null==f?void 0:f.signed_url)||(null==f?void 0:f.url),v=(null==f?void 0:f.file_name)||(null==f?void 0:f.name);return c.jsxs(i.Box,{whiteSpace:"pre-wrap",children:[m&&c.jsx(d,{children:c.jsx(s.Regular14,{className:_.message,"data-testid":"".concat(x,"_message"),variant:"body1",children:u.formatMentionText(m,T,r.isNativeDetected)})}),c.jsxs(i.Box,{mt:1,mb:1,children:[c.jsxs(s.Regular14,{"data-testid":"".concat(x,"_Time"),className:_.container,children:[c.jsx("span",{className:_.label,children:"Time: "}),h.default.unix(q).format(o.FEED_ITEM_TIME_FORMAT)]}),Number.isFinite(j)&&c.jsxs(s.Regular14,{"data-testid":"".concat(x,"_HoleDepth"),className:_.container,children:[c.jsx("span",{className:_.label,children:"Hole Depth: "}),"".concat(D," ").concat(y)]}),Number.isFinite(g)&&c.jsxs(s.Regular14,{"data-testid":"".concat(x,"_BitDepth"),className:_.container,children:[c.jsx("span",{className:_.label,children:"Bit Depth: "}),"".concat(E," ").concat(y)]})]}),f&&R&&c.jsx(l,{attachmentUrl:R,fileName:v,attachmentSize:f.size,size:"medium"})]})};g.propTypes={feedItem:f.default.shape({context:f.default.shape(p.default({},o.FEED_ITEM_TYPES.TRACES_MEMO,f.default.shape({body:f.default.string.isRequired,attachment:f.default.shape({url:f.default.string,size:f.default.number}),bitDepth:f.default.oneOfType([f.default.string,f.default.number]).isRequired,holeDepth:f.default.oneOfType([f.default.string,f.default.number]).isRequired,timestamp:f.default.oneOfType([f.default.string,f.default.number]).isRequired}).isRequired)).isRequired,mentioned_users:f.default.arrayOf(f.default.shape({}))}).isRequired},module.exports=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),n=require("prop-types"),r=require("react"),
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),n=require("prop-types"),r=require("react"),l=require("@material-ui/core"),a=require("classnames"),s=require("lodash"),o=require("./PostInput.css.js"),i=require("../FilePreview/index.js"),u=require("../FailedFileUploading.js"),d=require("../UserMention/index.js"),p=require("../FileUploadIconButton.js"),c=require("../EmojiIconButton.js"),f=require("react/jsx-runtime");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=m(e),h=m(t),j=m(n),v=m(a),w=function(e){var t=e.className,n=e.userCompanyId,a=e.onChange,s=e.onKeyDown,m=e.initialValue,j=e.filePreviewWrapperClass,w=e.smallerView,y=e.suggestionsPortalHost,b=e.allowSuggestionsAboveCursor,x=r.useState(m.body),P=h.default(x,2),q=P[0],C=P[1],F=r.useState(m.attachment),I=h.default(F,2),S=I[0],A=I[1],T=r.useState(null),N=h.default(T,2),D=N[0],U=N[1],V=r.useRef(null);return r.useEffect((function(){V.current&&(V.current.selectionStart=V.current.value.length)}),[]),r.useEffect((function(){a({body:q,attachment:S})}),[q,S]),f.jsxs("div",{className:v.default(o.input,t),children:[f.jsx(l.TextField,{"data-testid":"".concat("PostInput","_input"),className:v.default(o.inputTextField,g.default({},o.inputTextFieldSmaller,w)),placeholder:"Add Comment...",FormHelperTextProps:{component:"div",margin:"dense"},inputRef:V,InputProps:{inputComponent:d,inputProps:{onChange:C,value:q,withLightTheme:!1,companyId:n,autoFocus:!0,className:o.inputInput,placeholder:"Type here...",suggestionsPortalHost:y,allowSuggestionsAboveCursor:b},endAdornment:f.jsxs(l.InputAdornment,{position:"end",className:v.default(o.inputAdornment,g.default({},o.inputAdornmentSmaller,w)),children:[!S&&f.jsx("div",{children:f.jsx(p.default,{openPreviewDialogOnUpload:!1,onFinish:function(e,t,n){A({url:e,file_name:t,size:n})},onError:U})}),f.jsx("div",{children:f.jsx(c,{"data-testid":"".concat("PostInput","_emoji"),handleSelectEmoji:function(e){return C((function(t){return"".concat(t).concat(e.native)}))}})})]}),disableUnderline:!0,classes:{}},onKeyDown:s}),S&&f.jsx(i,{fileName:S.file_name||S.name,fileUrl:S.signed_url||S.url,handleFileDelete:function(){return A(null)},classes:{wrapper:j}}),D&&f.jsx(u,{errorMessage:D})]})};w.propTypes={userCompanyId:j.default.oneOfType([j.default.string,j.default.number]).isRequired,className:j.default.string,onKeyDown:j.default.func,onChange:j.default.func,initialValue:j.default.shape({body:j.default.string,attachment:j.default.shape({})}),filePreviewWrapperClass:j.default.string,suggestionsPortalHost:j.default.node,allowSuggestionsAboveCursor:j.default.bool,smallerView:j.default.bool},w.defaultProps={className:null,initialValue:{body:"",attachment:null},filePreviewWrapperClass:null,onKeyDown:s.noop,onChange:s.noop,smallerView:!1,suggestionsPortalHost:void 0,allowSuggestionsAboveCursor:!1},module.exports=w;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default AppSettingsAssetEditor;
|
|
2
|
-
declare function AppSettingsAssetEditor({ appKey, appType, className, company, defaultValue, secondaryDefaultValue, disabled, isHiddenTitle, isNullable, label, onSettingsChange, primaryAssetFields, secondaryAssetFields, isExtendedSelect, isRequiredAssetId, settings, isVisibleMultipleAssetsToggle, assetsLimit, isDisabledSecondaryAssetSelect, isDrillingPlatformApp, secondaryAssetHelpText, onChange, }: {
|
|
2
|
+
declare function AppSettingsAssetEditor({ appKey, appType, className, company, defaultValue, secondaryDefaultValue, disabled, isHiddenTitle, isNullable, label, onSettingsChange: propsOnSettingsChange, primaryAssetFields, secondaryAssetFields, isExtendedSelect, isRequiredAssetId, settings, isVisibleMultipleAssetsToggle, assetsLimit, isDisabledSecondaryAssetSelect, isDrillingPlatformApp, secondaryAssetHelpText, onChange, elementsClassNames, }: {
|
|
3
3
|
appKey: any;
|
|
4
4
|
appType: any;
|
|
5
5
|
className: any;
|
|
@@ -22,6 +22,7 @@ declare function AppSettingsAssetEditor({ appKey, appType, className, company, d
|
|
|
22
22
|
isDrillingPlatformApp: any;
|
|
23
23
|
secondaryAssetHelpText: any;
|
|
24
24
|
onChange: any;
|
|
25
|
+
elementsClassNames: any;
|
|
25
26
|
}): JSX.Element;
|
|
26
27
|
declare namespace AppSettingsAssetEditor {
|
|
27
28
|
namespace defaultProps {
|
|
@@ -38,6 +39,7 @@ declare namespace AppSettingsAssetEditor {
|
|
|
38
39
|
export let secondaryAssetFields: any[];
|
|
39
40
|
export let secondaryAssetHelpText: any;
|
|
40
41
|
export { noop as onChange };
|
|
42
|
+
export let elementsClassNames: {};
|
|
41
43
|
}
|
|
42
44
|
namespace propTypes {
|
|
43
45
|
let assetsLimit_1: PropTypes.Requireable<number>;
|
|
@@ -68,6 +70,13 @@ declare namespace AppSettingsAssetEditor {
|
|
|
68
70
|
let secondaryAssetHelpText_1: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike>>;
|
|
69
71
|
export { secondaryAssetHelpText_1 as secondaryAssetHelpText };
|
|
70
72
|
export let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
73
|
+
let elementsClassNames_1: PropTypes.Requireable<PropTypes.InferProps<{
|
|
74
|
+
title: PropTypes.Requireable<string>;
|
|
75
|
+
multiAssetSwitch: PropTypes.Requireable<string>;
|
|
76
|
+
primaryAssetSelect: PropTypes.Requireable<string>;
|
|
77
|
+
secondaryAssetSelect: PropTypes.Requireable<string>;
|
|
78
|
+
}>>;
|
|
79
|
+
export { elementsClassNames_1 as elementsClassNames };
|
|
71
80
|
}
|
|
72
81
|
}
|
|
73
82
|
import { noop } from 'lodash';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AssetEditorV2/index.js"],"names":[],"mappings":";AAqBA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AssetEditorV2/index.js"],"names":[],"mappings":";AAqBA;;;;;;;;;;;;;;;;;;;;;;;;gBA6QC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAhSkC,QAAQ;sBADrB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import s from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useState as a,useRef as r,useEffect as n}from"react";import i from"prop-types";import{get as l,isEmpty as o,noop as p}from"lodash";import c from"classnames";import{makeStyles as d}from"@material-ui/core";import u from"./components/PrimaryAssetSelect.js";import m from"./components/SecondaryAssetSelect.js";import"./components/SelectItem.js";import y from"./components/MultipleAssetsToggle.js";import f from"./components/PrimaryAssetSelectV2.js";import{ACTIVE_ASSETS_ID as g,ACTIVE_ASSET_ID as A}from"./constants.js";import{getPrimaryAssetFields as b}from"./utils/index.js";import"../../constants/goals.js";import{PAD_GROUP as v,FRAC_FLEET_GROUP as h}from"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import{ASSET_TYPES as j}from"../../constants/assetTypes.js";import"../../utils/env.js";import"../GradientManager/configuration/constants.js";import{jsxs as I,jsx as S}from"react/jsx-runtime";function T(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);s&&(a=a.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,a)}return t}function O(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?T(Object(a),!0).forEach((function(t){s(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):T(Object(a)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))}))}return e}var C=d({title:{fontWeight:400,fontSize:20,margin:"24px 0 16px"}}),N=function(i){var p=i.appKey,d=i.appType,T=i.className,N=i.company,P=i.defaultValue,D=i.secondaryDefaultValue,V=i.disabled,F=i.isHiddenTitle,w=i.isNullable,x=i.label,R=i.onSettingsChange,_=i.primaryAssetFields,q=i.secondaryAssetFields,E=i.isExtendedSelect,H=i.isRequiredAssetId,k=i.settings,K=i.isVisibleMultipleAssetsToggle,L=i.assetsLimit,M=i.isDisabledSecondaryAssetSelect,G=i.isDrillingPlatformApp,W=i.secondaryAssetHelpText,z=i.onChange,B=i.elementsClassNames,J=l(d,["primaryAsset","assetType","type"]),Q=l(d,["primaryAsset","assetType","id"]),U=l(d,["primaryAsset","assetType","label"]),X=l(d,["primaryAsset","groups"]),Y=l(d,["secondaryAsset","assetType","type"]),Z=l(d,["secondaryAsset","assetType","id"]),$=l(d,["secondaryAsset","assetType","label"]),ee=l(k,Q),se=ee?Number(ee):null,te=l(k,Z)?Number(l(k,Z)):D||null,ae=a({id:se||P}),re=t(ae,2),ne=re[0],ie=re[1],le=a(te),oe=t(le,2),pe=oe[0],ce=oe[1],de=a(!1),ue=t(de,2),me=ue[0],ye=ue[1],fe=a(),ge=t(fe,2),Ae=ge[0],be=ge[1],ve=a(!1),he=t(ve,2),je=he[0],Ie=he[1],Se=r(!1),Te=function(){for(var e=arguments.length,s=new Array(e),t=0;t<e;t++)s[t]=arguments[t];R.apply(void 0,s.concat([Se.current]))},Oe=C(),Ce=J===j.rig.type?f:u,Ne=G&&null!=ne&&ne.assetId?null==ne?void 0:ne.assetId:null==ne?void 0:ne.id,Pe=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ie(t),ce(null),ye(!1);var a=(s(e={},Q,null),s(e,Z,null),s(e,"assets",null),e);Te(a)},De=je?Boolean(ne.length)&&!me:(null==ne?void 0:ne.id)&&!me;return n((function(){o(k)&&Pe(je&&[])}),[k]),I("div",{className:c(Oe.main,T),children:[!F&&S("div",{className:c(Oe.title,B.title),children:"Asset"}),K&&S(y,{onChange:function(e){var s=e.target;Se.current=!!s.checked,Ie(s.checked),Pe(s.checked&&[])},className:B.multiAssetSwitch}),S("div",{className:B.primaryAssetSelect,children:S(Ce,{appKey:p,assetType:J,company:N,currentOption:ne,currentValue:null==ne?void 0:ne.id,"data-testid":"".concat("DC_AppSettingsAssetEditor","_primaryAssetEditorAutocomplete"),defaultValue:P,disableClearable:!w,disabled:V,isNullable:w,isRequiredAssetId:H,label:x,multiple:je,onChange:function(t){if(z({primary:t}),je)!function(t){var a,r;if(!(t.length>L)){var n=(null===(a=t[0])||void 0===a?void 0:a.group)===v.name,i=(null===(r=t[0])||void 0===r?void 0:r.group)===h.name,l=1===t.length&&n,o=1===t.length&&i;if(l?(ye(!0),be(v)):o&&be(h),n){ie(t);var p=null==t?void 0:t.reduce((function(s,t){var a=t.parentFracFleetId,r=t.id,n={fracFleetId:a,padId:r};return E&&(n.assetId=a,n.replacedPadId=r),a?[].concat(e(s),[n]):s}),[]);Te({assets:p})}else{ie(t);var c=t.reduce((function(t,a){var r=s({},"".concat(a.type,"Id"),a.id);return H&&(r.assetId=a.assetId),E&&(r.assetId=a.assetId||a.id),[].concat(e(t),[r])}),[]);Te({assets:c})}}}(t);else{var a=t.id,r=t.type,n=t.parentFracFleetId;if(a)if(r!==j.pad.type){ie(t),ce(null);var i=s({},Q,a);H&&(i.assetId=t.assetId),Z&&(i[Z]=null),Te(i),ye(!1)}else{var l;ie(t),ye(!0),ce(a);var o=(s(l={},j.frac_fleet.id,Number(n)),s(l,j.pad.id,a),l);Te(o)}}},setCurrentOption:ie,selectedGroup:Ae,onGroupChange:function(e){be(e),Pe(je&&[])},onGroupReset:function(){be(null),Pe(je&&[])},groups:X,onInputReset:Pe,onActiveAssetIdChange:function(e){ie((function(s){return O(O({},s),{},{activeWellId:e})}))},isDrillingPlatformApp:G,assetFields:b(J,_,G)})}),De&&I("div",{className:B.secondaryAssetSelect,children:[W,S(m,{assetFields:Y===j.pad.type?[].concat(e(q),["pad.active","pad.current"]):q,activeWellId:null==ne?void 0:ne.activeWellId,appKey:p,assetType:Y,company:N,currentValue:pe,"data-testid":"".concat("DC_AppSettingsAssetEditor","_secondaryAutoComplete"),defaultValue:je?g:A,disabled:je||M||V,isDrillingPlatformApp:G,isNullable:w,isRequiredAssetId:H,onChange:function(e){var t=e.id,a=e.assetId,r=e.name;z({secondary:{name:r}}),ce(t);var n=t===A?null:t,i=s({},Z,n);H&&Y===j.well.type?Te(O(O({},i),{},{replacedAssetId:G?n:a})):Te(i)},parentAssetId:Ne,parentAssetType:G?"parent_asset_id":J,primaryAssetLabel:U,secondaryAssetLabel:$})]})]})};N.defaultProps={assetsLimit:null,label:"Choose An Asset",isNullable:!1,defaultValue:void 0,secondaryDefaultValue:void 0,isHiddenTitle:!1,appKey:null,isVisibleMultipleAssetsToggle:!1,isDisabledSecondaryAssetSelect:!1,primaryAssetFields:[],secondaryAssetFields:[],secondaryAssetHelpText:null,onChange:p,elementsClassNames:{}},N.propTypes={assetsLimit:i.number,settings:i.shape({}).isRequired,appType:i.shape({}).isRequired,defaultValue:i.any,secondaryDefaultValue:i.any,onSettingsChange:i.func.isRequired,label:i.string,isNullable:i.bool,isHiddenTitle:i.bool,appKey:i.string,isVisibleMultipleAssetsToggle:i.bool,isDisabledSecondaryAssetSelect:i.bool,primaryAssetFields:i.arrayOf(i.shape({})),secondaryAssetFields:i.arrayOf(i.shape({})),secondaryAssetHelpText:i.oneOfType([i.element,i.string]),onChange:i.func,elementsClassNames:i.shape({title:i.string,multiAssetSwitch:i.string,primaryAssetSelect:i.string,secondaryAssetSelect:i.string})};export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DvDCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/DvDCommentFeedItem.js"],"names":[],"mappings":";AAiCA;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DvDCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/DvDCommentFeedItem.js"],"names":[],"mappings":";AAiCA;;;;;;;;;;;;;;;;gBAqEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as t,Typography as e}from"@material-ui/core";import
|
|
1
|
+
import{makeStyles as t,Typography as e}from"@material-ui/core";import i from"moment";import{convertValue as a,getUnitDisplay as n}from"../../../utils/index.js";import{isNativeDetected as o}from"../../../utils/mobileDetect.js";import{formatMentionText as r}from"../../UserMention/utils/index.js";import l from"../../Attachment/index.js";import{jsxs as m,jsx as c}from"react/jsx-runtime";var d=t((function(t){return{text:{color:t.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},infoField:{color:t.palette.primary.text6,"& span":{color:"#fff"}}}})),s="DvDCommentFeedItem";var p=function(t){var p,h=t.feedItem,f=h.context.dvd_comment,u=f.body,v=f.attachment,D=void 0===v?{}:v,N=f.data,x=N.timestamp,g=N.bitDepth,F=N.holeDepth,_=N.cost,b=h.mentioned_users,j=d(),y=a(+g,"length","ft"),Y=a(+F,"length","ft"),B=n("length"),H=(null==D?void 0:D.signed_url)||(null==D?void 0:D.url),M=(null==D?void 0:D.file_name)||(null==D?void 0:D.name);return m("div",{className:j.wrapper,children:[u&&c(e,{"data-testid":"".concat(s,"_message"),variant:"body1",gutterBottom:!0,children:r(u,b,o)}),x&&m(e,{className:j.infoField,children:["Time:"," ",c("span",{"data-testid":"".concat(s,"_time"),children:i.unix(x).format("MM.DD.YYYY, HH:mm")})]}),Number.isFinite(Y)&&m(e,{className:j.infoField,children:["Hole Depth: ",c("span",{"data-testid":"".concat(s,"_holeDepth"),children:"".concat(Y," ").concat(B)})]}),Number.isFinite(y)&&m(e,{className:j.infoField,children:["Bit Depth: ",c("span",{"data-testid":"".concat(s,"_bitDepth"),children:"".concat(y," ").concat(B)})]}),_&&Number.isFinite(_)&&m(e,{className:j.infoField,children:["Cost: ",m("span",{"data-testid":"".concat(s,"_cost"),children:[(p=_,p.toString().replace(/\B(?=(\d{3})+(?!\d))/g," "))," $"]})]}),D&&H&&c("div",{className:j.attachment,children:c(l,{small:!0,attachmentUrl:H,fileName:M,displayName:M})})]})};export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HookloadCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.js"],"names":[],"mappings":";AAwCA;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"HookloadCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/HookloadCommentFeedItem.js"],"names":[],"mappings":";AAwCA;;;;;;;;;;;;;;;;;gBAgFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as t}from"@material-ui/core";import e from"moment";import i from"@material-ui/icons/Warning";import{isNativeDetected as
|
|
1
|
+
import{makeStyles as t}from"@material-ui/core";import e from"moment";import i from"@material-ui/icons/Warning";import{isNativeDetected as o}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 l}from"../../../utils/convert.js";import{Regular14 as m,Regular12 as c}from"../../Typography.js";import{jsxs as s,jsx as d}from"react/jsx-runtime";var p=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"}}}})),f=function(t){var f=t.feedItem,h=f.point,u=(h=void 0===h?{}:h).showNoVisiblePointWarning,g=f.context.hookload_broomstick_comment,v=g.body,N=g.attachment,y=void 0===N?{}:N,x=g.data,b=x.timestamp,w=x.measuredDepth,F=x.activityLabel,j=x.hookload,k=f.mentioned_users,M=p(),_=r(+w,"length","ft"),B=r(+j,"force","klbf"),D=(null==y?void 0:y.signed_url)||(null==y?void 0:y.url),I=(null==y?void 0:y.file_name)||(null==y?void 0:y.name);return s("div",{className:M.wrapper,children:[v&&d(m,{"data-testid":"".concat("HookloadCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:n(v,k,o)}),Number.isFinite(w)&&s(m,{className:M.infoField,gutterBottom:!0,children:["Measured Depth:"," ",d("span",{children:"".concat(Math.round(_).toLocaleString()," ").concat(l("length"))})]}),j&&s(m,{className:M.infoField,gutterBottom:!0,children:["Hookload:"," ",d("span",{children:"".concat(Math.round(B).toLocaleString()," ").concat(l("force"))})]}),F&&s(m,{className:M.infoField,gutterBottom:!0,children:["Activity: ",d("span",{children:F})]}),b&&s(m,{className:M.infoField,gutterBottom:!0,children:["Time: ",d("span",{children:e.unix(b).format("MM/DD/YY HH:mm")})]}),u&&s("div",{className:M.warningContainer,children:[d(i,{className:M.warningIcon}),d(c,{children:"This activity is disabled in the application settings or not in range"})]}),y&&(D||I)&&d("div",{className:M.attachment,children:d(a,{small:!0,attachmentUrl:D,fileName:I,displayName:I})})]})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FeedItem/feedItemTypes/LessonsLearnedFeedItem/index.js"],"names":[],"mappings":";;AAiCA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FeedItem/feedItemTypes/LessonsLearnedFeedItem/index.js"],"names":[],"mappings":";;AAiCA;;gBAoFC;;;;;;sBApHqB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import{memo as t,useMemo as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import{memo as t,useMemo as i}from"react";import a from"prop-types";import{makeStyles as r}from"@material-ui/core";import n from"./icons/Critical.js";import s from"./icons/Major.js";import l from"./icons/Minor.js";import c from"../../../Attachment/index.js";import{convertValue as o}from"../../../../utils/convert.js";import{jsxs as m,jsx as d}from"react/jsx-runtime";function p(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var i=1;i<arguments.length;i++){var a=null!=arguments[i]?arguments[i]:{};i%2?p(Object(a),!0).forEach((function(i){e(t,i,a[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):p(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var v="LessonsLearnedFeedItem",h=r({item:{marginTop:"4px"},itemLabel:{fontWeight:"normal",fontSize:"14px",color:"#BDBDBD",marginRight:"8px"},itemValue:{fontSize:"14px",color:"#FFFFFF"},attachment:{paddingTop:10,width:300}});function f(e){var t,a=e.feedItem,r=h(),p=i((function(){var e,t,i=(null===(e=a.context)||void 0===e||null===(t=e.lessons_learned)||void 0===t?void 0:t.data)||{};return u(u({},i),{},{md_start:o(i.md_start,"length","ft"),tvd_start:o(i.tvd_start,"length","ft")})}),[a]),f=null===(t=a.context)||void 0===t?void 0:t.lessons_learned.attachment,b=(null==f?void 0:f.signed_url)||(null==f?void 0:f.url),y=(null==f?void 0:f.file_name)||(null==f?void 0:f.name);return m("div",{children:[d("div",{className:r.item,children:d("span",{"data-testid":"".concat(v,"_topic"),className:r.itemLabel,children:p.topic})}),m("div",{className:r.item,children:[d("span",{className:r.itemLabel,children:"Event Cause:"}),d("span",{"data-testid":"".concat(v,"_Cause"),className:r.itemValue,children:p.cause})]}),m("div",{className:r.item,style:{display:"flex",alignItems:"center"},children:[d("span",{className:r.itemLabel,children:"Event Severity:"}),d("span",{"data-testid":"".concat(v,"_severityIcon"),children:"Major"===p.severity?d(s,{}):"Critical"===p.severity?d(n,{}):"Minor"===p.severity?d(l,{}):null}),d("span",{"data-testid":"".concat(v,"_Severity"),className:r.itemValue,children:p.severity})]}),m("div",{className:r.item,children:[d("span",{className:r.itemLabel,children:"MD/TVD:"}),m("span",{"data-testid":"".concat(v,"_MD/TVD"),className:r.itemValue,children:[Number.isFinite(p.md_start)?p.md_start.fixFloat(2):"-","/",Number.isFinite(p.tvd_start)?p.tvd_start.fixFloat(2):"-"]})]}),m("div",{className:r.item,children:[d("span",{className:r.itemLabel,children:"Hole Section:"}),d("span",{"data-testid":"".concat(v,"_HoleSection"),className:r.itemValue,children:p.section})]}),m("div",{className:r.item,children:[d("span",{className:r.itemLabel,children:"Operation:"}),d("span",{"data-testid":"".concat(v,"_Operation"),className:r.itemValue,children:p.activity})]}),m("div",{className:r.item,children:[d("span",{className:r.itemLabel,children:"Description:"}),d("div",{"data-testid":"".concat(v,"_Description"),className:r.itemValue,children:p.description})]}),f&&(b||y)&&d("div",{className:r.attachment,children:d(c,{small:!0,attachmentUrl:b,fileName:y,displayName:y})})]})}f.propTypes={feedItem:a.shape().isRequired};var b=t(f);export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NptLessonsCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/NptLessonsCommentFeedItem.js"],"names":[],"mappings":";AA6BA;;
|
|
1
|
+
{"version":3,"file":"NptLessonsCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/NptLessonsCommentFeedItem.js"],"names":[],"mappings":";AA6BA;;gBAoDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as t,Typography as e}from"@material-ui/core";import{isNativeDetected as n}from"../../../utils/mobileDetect.js";import{formatMentionText as
|
|
1
|
+
import{makeStyles as t,Typography as e}from"@material-ui/core";import{isNativeDetected as n}from"../../../utils/mobileDetect.js";import{formatMentionText as o}from"../../UserMention/utils/index.js";import i from"../../Attachment/index.js";import{convertValue as a,getUnitDisplay as r}from"../../../utils/convert.js";import{FEED_ITEM_TYPES as l}from"../../../constants/feed.js";import{jsxs as c,jsx as m,Fragment as d}from"react/jsx-runtime";var s=t((function(t){return{text:{color:t.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},infoField:{color:t.palette.primary.text6,"& span":{color:"#fff"}}}})),f=function(t){var f=t.feedItem,h=f.context[l.TRACES_MEMO],p=h.body,u=h.attachment,v=void 0===u?{}:u,g=h.bitDepth,x=h.holeDepth,N=f.mentioned_users,j=s(),D=a(+x,"length","ft"),y=a(+x,"length","ft"),F=(null==v?void 0:v.signed_url)||(null==v?void 0:v.url),M=(null==v?void 0:v.file_name)||(null==v?void 0:v.name);return c("div",{className:j.wrapper,children:[(x||0===x)&&c(e,{className:j.infoField,children:["Hole Depth:"," ",m("span",{children:"".concat(Math.round(D).toLocaleString()," ").concat(r("length"))})]}),(g||0===x)&&c(e,{className:j.infoField,children:["Bit Depth:"," ",m("span",{children:"".concat(Math.round(y).toLocaleString()," ").concat(r("length"))})]}),p&&c(d,{children:[m(e,{className:j.infoField,children:"Description:"}),m(e,{"data-testid":"".concat("NptLessonsCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:o(p,N,n)})]}),v&&(F||M)&&m("div",{className:j.attachment,children:m(i,{small:!0,attachmentUrl:F,fileName:M,displayName:M})})]})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PCCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/PCCommentFeedItem.js"],"names":[],"mappings":";AA6BA;;
|
|
1
|
+
{"version":3,"file":"PCCommentFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/PCCommentFeedItem.js"],"names":[],"mappings":";AA6BA;;gBAqDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as t,Typography as e}from"@material-ui/core";import
|
|
1
|
+
import{makeStyles as t,Typography as e}from"@material-ui/core";import o from"moment";import{isNativeDetected as a}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 l}from"../../../utils/convert.js";import{jsxs as m,jsx as c}from"react/jsx-runtime";var d=t((function(t){return{text:{color:t.palette.primary.text6},value:{color:"#fff"},attachment:{paddingTop:10,width:300},infoField:{color:t.palette.primary.text6,"& span":{color:"#fff"}}}})),s=function(t){var s=t.feedItem,f=s.type,p=s.context[f],u=p.body,h=p.attachment,v=void 0===h?{}:h,x=p.data,g=x.timestamp,y=x.holeDepth,N=s.mentioned_users,j=d(),D=n(+y,"length","ft"),F=(null==v?void 0:v.signed_url)||(null==v?void 0:v.url),M=(null==v?void 0:v.file_name)||(null==v?void 0:v.name);return m("div",{className:j.wrapper,children:[u&&c(e,{"data-testid":"".concat("PCCommentFeedItem","_message"),variant:"body1",gutterBottom:!0,children:i(u,N,a)}),g&&m(e,{className:j.infoField,children:["Time: ",c("span",{children:o.unix(g).format("MM.DD.YYYY, HH:mm")})]}),(y||0===y)&&m(e,{className:j.infoField,children:["Hole Depth:"," ",c("span",{children:"".concat(Math.round(D).toLocaleString()," ").concat(l("length"))})]}),v&&(F||M)&&c("div",{className:j.attachment,children:c(r,{small:!0,attachmentUrl:F,fileName:M,displayName:M})})]})};export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TracesMemoFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/TracesMemoFeedItem.js"],"names":[],"mappings":";AA4BA;;;;;
|
|
1
|
+
{"version":3,"file":"TracesMemoFeedItem.d.ts","sourceRoot":"","sources":["../../../../src/components/FeedItem/feedItemTypes/TracesMemoFeedItem.js"],"names":[],"mappings":";AA4BA;;;;;gBA8DC;;;;;;;;;;;;;;;;;;;;sBAzFqB,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"prop-types";import i from"moment";import{makeStyles as r,Box as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"prop-types";import i from"moment";import{makeStyles as r,Box as n}from"@material-ui/core";import{isNativeDetected as a}from"../../../utils/mobileDetect.js";import{getUnitDisplay as s,convertValue as o}from"../../../utils/index.js";import{Regular14 as m}from"../../Typography.js";import l from"../../Attachment/index.js";import{formatMentionText as c}from"../../UserMention/utils/index.js";import p from"../../CollapsibleContent.js";import{FEED_ITEM_TYPES as d,FEED_ITEM_TIME_FORMAT as h}from"../../../constants/feed.js";import{jsxs as u,jsx as f}from"react/jsx-runtime";var b="TracesMemoFeedItem",g=r((function(e){return{message:{lineHeight:"20px"},container:{marginBottom:4,lineHeight:"20px"},label:{color:e.palette.primary.text6}}})),y=function(e){var t=e.feedItem,r=t.context[d.TRACES_MEMO],y=r.body,x=r.attachment,N=void 0===x?{}:x,T=r.bitDepth,_=r.holeDepth,D=r.timestamp,R=t.mentioned_users,j=g(),v=s("length"),q=o(+T,"length","ft"),M=o(+_,"length","ft"),O=(null==N?void 0:N.signed_url)||(null==N?void 0:N.url),z=(null==N?void 0:N.file_name)||(null==N?void 0:N.name);return u(n,{whiteSpace:"pre-wrap",children:[y&&f(p,{children:f(m,{className:j.message,"data-testid":"".concat(b,"_message"),variant:"body1",children:c(y,R,a)})}),u(n,{mt:1,mb:1,children:[u(m,{"data-testid":"".concat(b,"_Time"),className:j.container,children:[f("span",{className:j.label,children:"Time: "}),i.unix(D).format(h)]}),Number.isFinite(_)&&u(m,{"data-testid":"".concat(b,"_HoleDepth"),className:j.container,children:[f("span",{className:j.label,children:"Hole Depth: "}),"".concat(M," ").concat(v)]}),Number.isFinite(T)&&u(m,{"data-testid":"".concat(b,"_BitDepth"),className:j.container,children:[f("span",{className:j.label,children:"Bit Depth: "}),"".concat(q," ").concat(v)]})]}),N&&O&&f(l,{attachmentUrl:O,fileName:z,attachmentSize:N.size,size:"medium"})]})};y.propTypes={feedItem:t.shape({context:t.shape(e({},d.TRACES_MEMO,t.shape({body:t.string.isRequired,attachment:t.shape({url:t.string,size:t.number}),bitDepth:t.oneOfType([t.string,t.number]).isRequired,holeDepth:t.oneOfType([t.string,t.number]).isRequired,timestamp:t.oneOfType([t.string,t.number]).isRequired}).isRequired)).isRequired,mentioned_users:t.arrayOf(t.shape({}))}).isRequired};export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import n from"prop-types";import{useState as r,useRef as t,useEffect as i}from"react";import{TextField as
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import n from"prop-types";import{useState as r,useRef as t,useEffect as i}from"react";import{TextField as l,InputAdornment as s}from"@material-ui/core";import a from"classnames";import{noop as u}from"lodash";import m from"./PostInput.css.js";import p from"../FilePreview/index.js";import c from"../FailedFileUploading.js";import d from"../UserMention/index.js";import f from"../FileUploadIconButton.js";import g from"../EmojiIconButton.js";import{jsxs as h,jsx as v}from"react/jsx-runtime";var w=function(n){var u=n.className,w=n.userCompanyId,y=n.onChange,P=n.onKeyDown,b=n.initialValue,C=n.filePreviewWrapperClass,j=n.smallerView,F=n.suggestionsPortalHost,I=n.allowSuggestionsAboveCursor,A=r(b.body),N=o(A,2),S=N[0],T=N[1],x=r(b.attachment),D=o(x,2),U=D[0],V=D[1],H=r(null),_=o(H,2),K=_[0],E=_[1],W=t(null);return i((function(){W.current&&(W.current.selectionStart=W.current.value.length)}),[]),i((function(){y({body:S,attachment:U})}),[S,U]),h("div",{className:a(m.input,u),children:[v(l,{"data-testid":"".concat("PostInput","_input"),className:a(m.inputTextField,e({},m.inputTextFieldSmaller,j)),placeholder:"Add Comment...",FormHelperTextProps:{component:"div",margin:"dense"},inputRef:W,InputProps:{inputComponent:d,inputProps:{onChange:T,value:S,withLightTheme:!1,companyId:w,autoFocus:!0,className:m.inputInput,placeholder:"Type here...",suggestionsPortalHost:F,allowSuggestionsAboveCursor:I},endAdornment:h(s,{position:"end",className:a(m.inputAdornment,e({},m.inputAdornmentSmaller,j)),children:[!U&&v("div",{children:v(f,{openPreviewDialogOnUpload:!1,onFinish:function(e,o,n){V({url:e,file_name:o,size:n})},onError:E})}),v("div",{children:v(g,{"data-testid":"".concat("PostInput","_emoji"),handleSelectEmoji:function(e){return T((function(o){return"".concat(o).concat(e.native)}))}})})]}),disableUnderline:!0,classes:{}},onKeyDown:P}),U&&v(p,{fileName:U.file_name||U.name,fileUrl:U.signed_url||U.url,handleFileDelete:function(){return V(null)},classes:{wrapper:C}}),K&&v(c,{errorMessage:K})]})};w.propTypes={userCompanyId:n.oneOfType([n.string,n.number]).isRequired,className:n.string,onKeyDown:n.func,onChange:n.func,initialValue:n.shape({body:n.string,attachment:n.shape({})}),filePreviewWrapperClass:n.string,suggestionsPortalHost:n.node,allowSuggestionsAboveCursor:n.bool,smallerView:n.bool},w.defaultProps={className:null,initialValue:{body:"",attachment:null},filePreviewWrapperClass:null,onKeyDown:u,onChange:u,smallerView:!1,suggestionsPortalHost:void 0,allowSuggestionsAboveCursor:!1};export{w as default};
|