@corva/ui 3.53.0-9 → 3.53.0

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.
Files changed (75) hide show
  1. package/assets/24e85195c257f1a487266abb9fc7a2bf.png +0 -0
  2. package/assets/573240ce4ae3f03b1dcda59a6122d385.png +0 -0
  3. package/assets/611a0b004a47e773eef650c39e484dde.png +0 -0
  4. package/assets/637021239e939e67a50264c22fdad2cf.png +0 -0
  5. package/assets/9fd5109325b72bf1dea0d2984b0478b8.png +0 -0
  6. package/assets/c901dbd37bce6a412f2c0f0ceecfea1d.png +0 -0
  7. package/cjs-bundle/components/AppIcon/assets/CompletionAppIcon.js +1 -1
  8. package/cjs-bundle/components/AppIcon/assets/CompletionAppIconBe.js +1 -1
  9. package/cjs-bundle/components/AppIcon/assets/DrillingAppIcon.js +1 -1
  10. package/cjs-bundle/components/AppIcon/assets/DrillingAppIconBe.js +1 -1
  11. package/cjs-bundle/components/AppIcon/assets/InterventionAppIcon.js +2 -0
  12. package/cjs-bundle/components/AppIcon/assets/InterventionAppIcon.js.map +1 -0
  13. package/cjs-bundle/components/AppIcon/assets/NoSegmentAppIcon.js +1 -1
  14. package/cjs-bundle/components/AppIcon/assets/NoSegmentAppIconBeIdle.js +1 -1
  15. package/cjs-bundle/components/AppIcon/utils.js +1 -1
  16. package/cjs-bundle/components/AppIcon/utils.js.map +1 -1
  17. package/cjs-bundle/components/Drillstring/DrillstringDetail/DrillstringDetail.js +1 -1
  18. package/cjs-bundle/components/Drillstring/DrillstringDetail/DrillstringDetail.js.map +1 -1
  19. package/cjs-bundle/components/FeedItem/feedItemTypes/BhaFeedItem/components/BhaSchematic.js +1 -1
  20. package/cjs-bundle/components/FeedItem/feedItemTypes/BhaFeedItem/components/BhaSchematic.js.map +1 -1
  21. package/cjs-bundle/components/FeedItem/feedItemTypes/BhaFeedItem/components/Info.js +1 -1
  22. package/cjs-bundle/components/FeedItem/feedItemTypes/BhaFeedItem/components/Info.js.map +1 -1
  23. package/cjs-bundle/components/FeedItem/feedItemTypes/FluidReportFeedItem.js +1 -1
  24. package/cjs-bundle/components/FeedItem/feedItemTypes/FluidReportFeedItem.js.map +1 -1
  25. package/cjs-bundle/components/FileUploadIconButton.js +1 -1
  26. package/cjs-bundle/components/FileUploadIconButton.js.map +1 -1
  27. package/cjs-bundle/components/UserMention/index.js +1 -1
  28. package/cjs-bundle/components/UserMention/index.js.map +1 -1
  29. package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.scss.js +1 -1
  30. package/components/AppIcon/assets/CompletionAppIcon.d.ts.map +1 -1
  31. package/components/AppIcon/assets/CompletionAppIcon.js +1 -1
  32. package/components/AppIcon/assets/CompletionAppIconBe.d.ts.map +1 -1
  33. package/components/AppIcon/assets/CompletionAppIconBe.js +1 -1
  34. package/components/AppIcon/assets/DrillingAppIcon.d.ts.map +1 -1
  35. package/components/AppIcon/assets/DrillingAppIcon.js +1 -1
  36. package/components/AppIcon/assets/DrillingAppIconBe.d.ts.map +1 -1
  37. package/components/AppIcon/assets/DrillingAppIconBe.js +1 -1
  38. package/components/AppIcon/assets/InterventionAppIcon.d.ts +4 -0
  39. package/components/AppIcon/assets/InterventionAppIcon.d.ts.map +1 -0
  40. package/components/AppIcon/assets/InterventionAppIcon.js +2 -0
  41. package/components/AppIcon/assets/InterventionAppIcon.js.map +1 -0
  42. package/components/AppIcon/assets/NoSegmentAppIcon.d.ts.map +1 -1
  43. package/components/AppIcon/assets/NoSegmentAppIcon.js +1 -1
  44. package/components/AppIcon/assets/NoSegmentAppIconBeIdle.d.ts.map +1 -1
  45. package/components/AppIcon/assets/NoSegmentAppIconBeIdle.js +1 -1
  46. package/components/AppIcon/utils.d.ts.map +1 -1
  47. package/components/AppIcon/utils.js +1 -1
  48. package/components/AppIcon/utils.js.map +1 -1
  49. package/components/Drillstring/DrillstringDetail/DrillstringDetail.d.ts +8 -4
  50. package/components/Drillstring/DrillstringDetail/DrillstringDetail.d.ts.map +1 -1
  51. package/components/Drillstring/DrillstringDetail/DrillstringDetail.js +1 -1
  52. package/components/Drillstring/DrillstringDetail/DrillstringDetail.js.map +1 -1
  53. package/components/FeedItem/feedItemTypes/BhaFeedItem/components/BhaSchematic.d.ts +1 -1
  54. package/components/FeedItem/feedItemTypes/BhaFeedItem/components/BhaSchematic.js +1 -1
  55. package/components/FeedItem/feedItemTypes/BhaFeedItem/components/BhaSchematic.js.map +1 -1
  56. package/components/FeedItem/feedItemTypes/BhaFeedItem/components/Info.js +1 -1
  57. package/components/FeedItem/feedItemTypes/BhaFeedItem/components/Info.js.map +1 -1
  58. package/components/FeedItem/feedItemTypes/FluidReportFeedItem.js +1 -1
  59. package/components/FeedItem/feedItemTypes/FluidReportFeedItem.js.map +1 -1
  60. package/components/FileUploadIconButton.d.ts +3 -1
  61. package/components/FileUploadIconButton.d.ts.map +1 -1
  62. package/components/FileUploadIconButton.js +1 -1
  63. package/components/FileUploadIconButton.js.map +1 -1
  64. package/components/UserMention/index.js +1 -1
  65. package/components/UserMention/index.js.map +1 -1
  66. package/componentsV2/Autocomplete/Autocomplete.scss.js +1 -1
  67. package/mcp-server/server.mjs +228 -2
  68. package/mcp-server/server.mjs.map +1 -1
  69. package/package.json +1 -1
  70. package/tsconfig.tsbuildinfo +1 -1
  71. package/assets/3f1e09e6e814329ccfc22c5f2fb49320.png +0 -0
  72. package/assets/747c045c9381addbc4c6aecd531ccbff.png +0 -0
  73. package/assets/9f235cc0306a992ec6aecee01ad6956b.png +0 -0
  74. package/assets/cc3725c7d2b2258f38e3e25e49ce0a53.png +0 -0
  75. package/assets/dad8511026615181e47069625c14a00d.png +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";var i=require("prop-types"),e=require("@material-ui/core"),l=require("../../../../Drillstring/BhaIndicator/BhaIndicator.js"),r=require("../../../../Drillstring/BHASchematic.js"),t=require("../../../../Drillstring/DrillstringDetail/DrillstringDetail.js"),a=require("../../../../../utils/convert.js"),n=require("../../../../../utils/bha.js"),s=require("react/jsx-runtime"),o=e.makeStyles({wrapper:{width:200,cursor:"pointer",marginTop:-52,marginBottom:-52},bhaDetail:{maxWidth:1500,maxHeight:"80%"}}),d=function(i){var d,g,D,h,u,c=i.feedItem,p=i.drillStringData,m=i.handleShowDrillstringDetailDialog,x=i.isShowDrillstringDetailDialog,j=i.handleHideDrillstringDetailDialog,q=o(),v=null===(d=c.well)||void 0===d?void 0:d.id,S=null===(g=c.context)||void 0===g||null===(D=g.bha)||void 0===D||null===(h=D.data)||void 0===h?void 0:h.id,f=n.getBHAInformation(v,S,p),w=n.calculateBHALengthMax(p),H=null===(u=f.data)||void 0===u?void 0:u.components,B=H&&n.getBHASchematic(H);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:q.wrapper,onClick:m,children:B&&s.jsx(r,{containerHeight:160,schematic:B,bhaLengthMax:w},v)}),s.jsx(l,{align:"left"}),s.jsx(e.Dialog,{classes:{paperScrollPaper:q.bhaDetail},open:x,onClose:j,scroll:"paper",children:s.jsx(e.DialogContent,{children:s.jsx(t,{drillStringInfo:f,unit:a.getUnitDisplay("length"),onDone:j})})})]})};d.propTypes={feedItem:i.shape().isRequired,drillStringData:i.shape().isRequired,isShowDrillstringDetailDialog:i.bool.isRequired,handleShowDrillstringDetailDialog:i.func.isRequired,handleHideDrillstringDetailDialog:i.func.isRequired},module.exports=d;
1
+ "use strict";var i=require("prop-types"),e=require("@material-ui/core"),r=require("../../../../Drillstring/BhaIndicator/BhaIndicator.js"),l=require("../../../../Drillstring/BHASchematic.js"),a=require("../../../../Drillstring/DrillstringDetail/DrillstringDetail.js"),t=require("../../../../../utils/convert.js"),n=require("../../../../../utils/bha.js"),s=require("react/jsx-runtime"),o=e.makeStyles({wrapper:{width:200,cursor:"pointer",marginTop:-52,marginBottom:-52},bhaDetail:{maxWidth:1500,maxHeight:"80%"}}),d=function(i){var d,g,D,h,u,c=i.feedItem,p=i.drillStringData,m=i.handleShowDrillstringDetailDialog,x=i.isShowDrillstringDetailDialog,j=i.handleHideDrillstringDetailDialog,q=o(),v=null===(d=c.well)||void 0===d?void 0:d.id,S=null===(g=c.context)||void 0===g||null===(D=g.bha)||void 0===D||null===(h=D.data)||void 0===h?void 0:h.id,f=n.getBHAInformation(v,S,p),w=n.calculateBHALengthMax(p),H=null===(u=f.data)||void 0===u?void 0:u.components,B=H&&n.getBHASchematic(H);return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:q.wrapper,onClick:m,children:B&&s.jsx(l,{containerHeight:160,schematic:B,bhaLengthMax:w},v)}),s.jsx(r,{align:"left"}),s.jsx(e.Dialog,{classes:{paperScrollPaper:q.bhaDetail},open:x,onClose:j,scroll:"paper",children:s.jsx(e.DialogContent,{children:s.jsx(a,{drillStringInfo:f,unit:t.getUnitDisplay("length"),onDone:j})})})]})};d.propTypes={feedItem:i.shape().isRequired,drillStringData:i.arrayOf(i.shape()).isRequired,isShowDrillstringDetailDialog:i.bool.isRequired,handleShowDrillstringDetailDialog:i.func.isRequired,handleHideDrillstringDetailDialog:i.func.isRequired},module.exports=d;
2
2
  //# sourceMappingURL=BhaSchematic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BhaSchematic.js","sources":["../../../../../../../src/components/FeedItem/feedItemTypes/BhaFeedItem/components/BhaSchematic.js"],"sourcesContent":["import { shape, func, bool } from 'prop-types';\nimport { Dialog, DialogContent, makeStyles } from '@material-ui/core';\n\nimport BhaIndicator from '~/components/Drillstring/BhaIndicator';\nimport BHASchematic from '~/components/Drillstring/BHASchematic';\nimport DrillstringDetail from '~/components/Drillstring/DrillstringDetail';\nimport { getUnitDisplay } from '~/utils/convert';\nimport { getBHAInformation, calculateBHALengthMax, getBHASchematic } from '~/utils/bha';\n\nconst useStyles = makeStyles({\n wrapper: {\n width: 200,\n cursor: 'pointer',\n marginTop: -52,\n marginBottom: -52,\n },\n bhaDetail: {\n maxWidth: 1500,\n maxHeight: '80%',\n },\n});\n\nconst BhaSchematic = ({\n feedItem,\n drillStringData,\n handleShowDrillstringDetailDialog,\n isShowDrillstringDetailDialog,\n handleHideDrillstringDetailDialog,\n}) => {\n const classes = useStyles();\n\n const wellId = feedItem.well?.id;\n const bhaId = feedItem.context?.bha?.data?.id;\n\n const bhaInfo = getBHAInformation(wellId, bhaId, drillStringData);\n const bhaLengthMax = calculateBHALengthMax(drillStringData);\n const components = bhaInfo.data?.components;\n const schematicData = components && getBHASchematic(components);\n\n return (\n <>\n <div className={classes.wrapper} onClick={handleShowDrillstringDetailDialog}>\n {schematicData && (\n <BHASchematic\n key={wellId}\n containerHeight={160}\n schematic={schematicData}\n bhaLengthMax={bhaLengthMax}\n />\n )}\n </div>\n\n <BhaIndicator align=\"left\" />\n\n <Dialog\n classes={{\n paperScrollPaper: classes.bhaDetail,\n }}\n open={isShowDrillstringDetailDialog}\n onClose={handleHideDrillstringDetailDialog}\n scroll=\"paper\"\n >\n <DialogContent>\n <DrillstringDetail\n drillStringInfo={bhaInfo}\n unit={getUnitDisplay('length')}\n onDone={handleHideDrillstringDetailDialog}\n />\n </DialogContent>\n </Dialog>\n </>\n );\n};\n\nBhaSchematic.propTypes = {\n feedItem: shape().isRequired,\n drillStringData: shape().isRequired,\n isShowDrillstringDetailDialog: bool.isRequired,\n handleShowDrillstringDetailDialog: func.isRequired,\n handleHideDrillstringDetailDialog: func.isRequired,\n};\n\nexport default BhaSchematic;\n"],"names":["useStyles","makeStyles","wrapper","width","cursor","marginTop","marginBottom","bhaDetail","maxWidth","maxHeight","BhaSchematic","_ref","_feedItem$well","_feedItem$context","_feedItem$context$bha","_feedItem$context$bha2","_bhaInfo$data","feedItem","drillStringData","handleShowDrillstringDetailDialog","isShowDrillstringDetailDialog","handleHideDrillstringDetailDialog","classes","wellId","well","id","bhaId","context","bha","data","bhaInfo","getBHAInformation","bhaLengthMax","calculateBHALengthMax","components","schematicData","getBHASchematic","_jsxs","_Fragment","children","_jsx","jsx","className","onClick","BHASchematic","containerHeight","schematic","BhaIndicator","align","Dialog","paperScrollPaper","open","onClose","scroll","DialogContent","DrillstringDetail","drillStringInfo","unit","getUnitDisplay","onDone","propTypes","shape","isRequired","bool","func"],"mappings":"gYASMA,EAAYC,EAAAA,WAAW,CAC3BC,QAAS,CACPC,MAAO,IACPC,OAAQ,UACRC,WAAY,GACZC,cAAe,IAEjBC,UAAW,CACTC,SAAU,KACVC,UAAW,SAITC,EAAe,SAMfC,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EALJC,IAAAA,SACAC,IAAAA,gBACAC,IAAAA,kCACAC,IAAAA,8BACAC,IAAAA,kCAEMC,EAAUtB,IAEVuB,EAAsB,QAAbN,EAAAA,EAASO,YAAI,IAAAZ,OAAA,EAAbA,EAAea,GACxBC,EAAwB,QAAnBb,EAAGI,EAASU,eAAO,IAAAd,GAAhB,QAAgBC,EAAhBD,EAAkBe,WAAlB,IAAAd,GAA2B,QAA3BC,EAAAD,EAAuBe,YAAI,IAAAd,OAAX,EAAhBA,EAA6BU,GAErCK,EAAUC,EAAiBA,kBAACR,EAAQG,EAAOR,GAC3Cc,EAAeC,wBAAsBf,GACrCgB,EAAyB,QAAZJ,EAAAA,EAAQD,YAAI,IAAAb,OAAA,EAAZA,EAAckB,WAC3BC,EAAgBD,GAAcE,EAAeA,gBAACF,GAEpD,OACEG,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SACE,CAAAC,EAAAC,IAAA,MAAA,CAAKC,UAAWpB,EAAQpB,QAASyC,QAASxB,EAAkCoB,SACzEJ,GACCK,EAAAC,IAACG,EAAY,CAEXC,gBAAiB,IACjBC,UAAWX,EACXH,aAAcA,GAHTT,KAQXiB,MAACO,EAAY,CAACC,MAAM,SAEpBR,MAACS,SAAM,CACL3B,QAAS,CACP4B,iBAAkB5B,EAAQf,WAE5B4C,KAAM/B,EACNgC,QAAS/B,EACTgC,OAAO,QAAOd,SAEdC,MAACc,gBAAa,CAAAf,SACZC,MAACe,EAAiB,CAChBC,gBAAiB1B,EACjB2B,KAAMC,EAAcA,eAAC,UACrBC,OAAQtC,UAMpB,EAEAX,EAAakD,UAAY,CACvB3C,SAAU4C,EAAKA,QAAGC,WAClB5C,gBAAiB2C,EAAKA,QAAGC,WACzB1C,8BAA+B2C,EAAIA,KAACD,WACpC3C,kCAAmC6C,EAAIA,KAACF,WACxCzC,kCAAmC2C,EAAIA,KAACF"}
1
+ {"version":3,"file":"BhaSchematic.js","sources":["../../../../../../../src/components/FeedItem/feedItemTypes/BhaFeedItem/components/BhaSchematic.js"],"sourcesContent":["import { shape, func, bool, arrayOf } from 'prop-types';\nimport { Dialog, DialogContent, makeStyles } from '@material-ui/core';\n\nimport BhaIndicator from '~/components/Drillstring/BhaIndicator';\nimport BHASchematic from '~/components/Drillstring/BHASchematic';\nimport DrillstringDetail from '~/components/Drillstring/DrillstringDetail';\nimport { getUnitDisplay } from '~/utils/convert';\nimport { getBHAInformation, calculateBHALengthMax, getBHASchematic } from '~/utils/bha';\n\nconst useStyles = makeStyles({\n wrapper: {\n width: 200,\n cursor: 'pointer',\n marginTop: -52,\n marginBottom: -52,\n },\n bhaDetail: {\n maxWidth: 1500,\n maxHeight: '80%',\n },\n});\n\nconst BhaSchematic = ({\n feedItem,\n drillStringData,\n handleShowDrillstringDetailDialog,\n isShowDrillstringDetailDialog,\n handleHideDrillstringDetailDialog,\n}) => {\n const classes = useStyles();\n\n const wellId = feedItem.well?.id;\n const bhaId = feedItem.context?.bha?.data?.id;\n\n const bhaInfo = getBHAInformation(wellId, bhaId, drillStringData);\n const bhaLengthMax = calculateBHALengthMax(drillStringData);\n const components = bhaInfo.data?.components;\n const schematicData = components && getBHASchematic(components);\n\n return (\n <>\n <div className={classes.wrapper} onClick={handleShowDrillstringDetailDialog}>\n {schematicData && (\n <BHASchematic\n key={wellId}\n containerHeight={160}\n schematic={schematicData}\n bhaLengthMax={bhaLengthMax}\n />\n )}\n </div>\n\n <BhaIndicator align=\"left\" />\n\n <Dialog\n classes={{\n paperScrollPaper: classes.bhaDetail,\n }}\n open={isShowDrillstringDetailDialog}\n onClose={handleHideDrillstringDetailDialog}\n scroll=\"paper\"\n >\n <DialogContent>\n <DrillstringDetail\n drillStringInfo={bhaInfo}\n unit={getUnitDisplay('length')}\n onDone={handleHideDrillstringDetailDialog}\n />\n </DialogContent>\n </Dialog>\n </>\n );\n};\n\nBhaSchematic.propTypes = {\n feedItem: shape().isRequired,\n drillStringData: arrayOf(shape()).isRequired,\n isShowDrillstringDetailDialog: bool.isRequired,\n handleShowDrillstringDetailDialog: func.isRequired,\n handleHideDrillstringDetailDialog: func.isRequired,\n};\n\nexport default BhaSchematic;\n"],"names":["useStyles","makeStyles","wrapper","width","cursor","marginTop","marginBottom","bhaDetail","maxWidth","maxHeight","BhaSchematic","_ref","_feedItem$well","_feedItem$context","_feedItem$context$bha","_feedItem$context$bha2","_bhaInfo$data","feedItem","drillStringData","handleShowDrillstringDetailDialog","isShowDrillstringDetailDialog","handleHideDrillstringDetailDialog","classes","wellId","well","id","bhaId","context","bha","data","bhaInfo","getBHAInformation","bhaLengthMax","calculateBHALengthMax","components","schematicData","getBHASchematic","_jsxs","_Fragment","children","_jsx","jsx","className","onClick","BHASchematic","containerHeight","schematic","BhaIndicator","align","Dialog","paperScrollPaper","open","onClose","scroll","DialogContent","DrillstringDetail","drillStringInfo","unit","getUnitDisplay","onDone","propTypes","shape","isRequired","arrayOf","bool","func"],"mappings":"gYASMA,EAAYC,EAAAA,WAAW,CAC3BC,QAAS,CACPC,MAAO,IACPC,OAAQ,UACRC,WAAY,GACZC,cAAe,IAEjBC,UAAW,CACTC,SAAU,KACVC,UAAW,SAITC,EAAe,SAMfC,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EALJC,IAAAA,SACAC,IAAAA,gBACAC,IAAAA,kCACAC,IAAAA,8BACAC,IAAAA,kCAEMC,EAAUtB,IAEVuB,EAAsB,QAAbN,EAAAA,EAASO,YAAI,IAAAZ,OAAA,EAAbA,EAAea,GACxBC,EAAwB,QAAnBb,EAAGI,EAASU,eAAO,IAAAd,GAAhB,QAAgBC,EAAhBD,EAAkBe,WAAlB,IAAAd,GAA2B,QAA3BC,EAAAD,EAAuBe,YAAI,IAAAd,OAAX,EAAhBA,EAA6BU,GAErCK,EAAUC,EAAiBA,kBAACR,EAAQG,EAAOR,GAC3Cc,EAAeC,wBAAsBf,GACrCgB,EAAyB,QAAZJ,EAAAA,EAAQD,YAAI,IAAAb,OAAA,EAAZA,EAAckB,WAC3BC,EAAgBD,GAAcE,EAAeA,gBAACF,GAEpD,OACEG,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SACE,CAAAC,EAAAC,IAAA,MAAA,CAAKC,UAAWpB,EAAQpB,QAASyC,QAASxB,EAAkCoB,SACzEJ,GACCK,EAAAC,IAACG,EAAY,CAEXC,gBAAiB,IACjBC,UAAWX,EACXH,aAAcA,GAHTT,KAQXiB,MAACO,EAAY,CAACC,MAAM,SAEpBR,MAACS,SAAM,CACL3B,QAAS,CACP4B,iBAAkB5B,EAAQf,WAE5B4C,KAAM/B,EACNgC,QAAS/B,EACTgC,OAAO,QAAOd,SAEdC,MAACc,gBAAa,CAAAf,SACZC,MAACe,EAAiB,CAChBC,gBAAiB1B,EACjB2B,KAAMC,EAAcA,eAAC,UACrBC,OAAQtC,UAMpB,EAEAX,EAAakD,UAAY,CACvB3C,SAAU4C,EAAKA,QAAGC,WAClB5C,gBAAiB6C,EAAOA,QAACF,WAASC,WAClC1C,8BAA+B4C,EAAIA,KAACF,WACpC3C,kCAAmC8C,EAAIA,KAACH,WACxCzC,kCAAmC4C,EAAIA,KAACH"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("prop-types"),a=require("@material-ui/core"),i=require("../../../../../utils/bha.js"),t=require("react/jsx-runtime"),r=a.makeStyles((function(e){return{labelGrid:{marginRight:11},planUnit:{color:e.palette.grey[400],marginLeft:5,fontSize:12},planText:{color:e.palette.grey[400]},pointValue:{display:"flex",alignItems:"center"},columnWithMargin:{marginRight:40}}})),n=function(e){var n,l,s=e.feedItem,o=e.bitComponent,d=e.pageName,p=r(),c=null===(n=s.context)||void 0===n||null===(l=n.bha)||void 0===l?void 0:l.data,h=null==c?void 0:c.components,m=null==c?void 0:c.start_depth,y=i.getBhaBitSize(h),u=i.getBhaDepthIn(m),g=(null==o?void 0:o.make)||"-",x=(null==o?void 0:o.model)||"-";return t.jsxs(a.Grid,{container:!0,spacing:16,justify:"flex-start",children:[t.jsxs(a.Grid,{item:!0,className:p.labelGrid,children:[t.jsx(a.Typography,{variant:"body2",className:p.planText,children:"Bit Size:"}),t.jsx(a.Typography,{variant:"body2",className:p.planText,children:"Depth In:"})]}),t.jsxs(a.Grid,{item:!0,className:p.columnWithMargin,children:[t.jsx(a.Typography,{variant:"body2",className:p.pointValue,children:y}),t.jsx(a.Typography,{variant:"body2","data-testid":"".concat(d,"_bitSize"),className:p.pointValue,children:u})]}),t.jsxs(a.Grid,{item:!0,className:p.labelGrid,children:[t.jsx(a.Typography,{variant:"body2",className:p.planText,children:"Bit Maker:"}),t.jsx(a.Typography,{variant:"body2",className:p.planText,children:"Bit Model:"})]}),t.jsxs(a.Grid,{item:!0,children:[t.jsx(a.Typography,{variant:"body2","data-testid":"".concat(d,"_bitMaker"),className:p.pointValue,children:g}),t.jsx(a.Typography,{variant:"body2","data-testid":"".concat(d,"_bitModel"),className:p.pointValue,children:x})]})]})};n.propTypes={feedItem:e.shape().isRequired,bitComponent:e.shape().isRequired,pageName:e.string.isRequired},module.exports=n;
1
+ "use strict";var e=require("prop-types"),a=require("@material-ui/core"),i=require("../../../../../utils/bha.js"),t=require("react/jsx-runtime"),r=a.makeStyles((function(e){return{labelGrid:{marginRight:11},planUnit:{color:e.palette.grey[400],marginLeft:5,fontSize:12},planText:{color:e.palette.grey[400]},pointValue:{display:"flex",alignItems:"center"},columnWithMargin:{marginRight:40}}})),n=function(e){var n,l,s=e.feedItem,o=e.bitComponent,d=e.pageName,p=r(),c=null===(n=s.context)||void 0===n||null===(l=n.bha)||void 0===l?void 0:l.data,h=null==c?void 0:c.components,m=null==c?void 0:c.start_depth,y=i.getBhaBitSize(h),u=i.getBhaDepthIn(m),g=(null==o?void 0:o.make)||"-",x=(null==o?void 0:o.model)||"-";return t.jsxs(a.Grid,{container:!0,justify:"flex-start",children:[t.jsxs(a.Grid,{item:!0,className:p.labelGrid,children:[t.jsx(a.Typography,{variant:"body2",className:p.planText,children:"Bit Size:"}),t.jsx(a.Typography,{variant:"body2",className:p.planText,children:"Depth In:"})]}),t.jsxs(a.Grid,{item:!0,className:p.columnWithMargin,children:[t.jsx(a.Typography,{variant:"body2",className:p.pointValue,children:y}),t.jsx(a.Typography,{variant:"body2","data-testid":"".concat(d,"_bitSize"),className:p.pointValue,children:u})]}),t.jsxs(a.Grid,{item:!0,className:p.labelGrid,children:[t.jsx(a.Typography,{variant:"body2",className:p.planText,children:"Bit Maker:"}),t.jsx(a.Typography,{variant:"body2",className:p.planText,children:"Bit Model:"})]}),t.jsxs(a.Grid,{item:!0,children:[t.jsx(a.Typography,{variant:"body2","data-testid":"".concat(d,"_bitMaker"),className:p.pointValue,children:g}),t.jsx(a.Typography,{variant:"body2","data-testid":"".concat(d,"_bitModel"),className:p.pointValue,children:x})]})]})};n.propTypes={feedItem:e.shape().isRequired,bitComponent:e.shape().isRequired,pageName:e.string.isRequired},module.exports=n;
2
2
  //# sourceMappingURL=Info.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Info.js","sources":["../../../../../../../src/components/FeedItem/feedItemTypes/BhaFeedItem/components/Info.js"],"sourcesContent":["import { shape, string } from 'prop-types';\nimport { Typography, Grid, makeStyles } from '@material-ui/core';\n\nimport { getBhaBitSize, getBhaDepthIn } from '~/utils/bha';\n\nconst useStyles = makeStyles(theme => ({\n labelGrid: {\n marginRight: 11,\n },\n planUnit: {\n color: theme.palette.grey[400],\n marginLeft: 5,\n fontSize: 12,\n },\n planText: {\n color: theme.palette.grey[400],\n },\n pointValue: {\n display: 'flex',\n alignItems: 'center',\n },\n columnWithMargin: {\n marginRight: 40,\n },\n}));\n\nconst Info = ({ feedItem, bitComponent, pageName }) => {\n const classes = useStyles();\n\n const bhaData = feedItem.context?.bha?.data;\n const components = bhaData?.components;\n const startDepth = bhaData?.start_depth;\n\n const bitSize = getBhaBitSize(components);\n const depthIn = getBhaDepthIn(startDepth);\n\n const bitMaker = bitComponent?.make || '-';\n const bitModel = bitComponent?.model || '-';\n\n return (\n <Grid container spacing={16} justify=\"flex-start\">\n <Grid item className={classes.labelGrid}>\n <Typography variant=\"body2\" className={classes.planText}>\n Bit Size:\n </Typography>\n <Typography variant=\"body2\" className={classes.planText}>\n Depth In:\n </Typography>\n </Grid>\n <Grid item className={classes.columnWithMargin}>\n <Typography variant=\"body2\" className={classes.pointValue}>\n {bitSize}\n </Typography>\n <Typography\n variant=\"body2\"\n data-testid={`${pageName}_bitSize`}\n className={classes.pointValue}\n >\n {depthIn}\n </Typography>\n </Grid>\n <Grid item className={classes.labelGrid}>\n <Typography variant=\"body2\" className={classes.planText}>\n Bit Maker:\n </Typography>\n <Typography variant=\"body2\" className={classes.planText}>\n Bit Model:\n </Typography>\n </Grid>\n <Grid item>\n <Typography\n variant=\"body2\"\n data-testid={`${pageName}_bitMaker`}\n className={classes.pointValue}\n >\n {bitMaker}\n </Typography>\n <Typography\n variant=\"body2\"\n data-testid={`${pageName}_bitModel`}\n className={classes.pointValue}\n >\n {bitModel}\n </Typography>\n </Grid>\n </Grid>\n );\n};\n\nInfo.propTypes = {\n feedItem: shape().isRequired,\n bitComponent: shape().isRequired,\n pageName: string.isRequired,\n};\n\nexport default Info;\n"],"names":["useStyles","makeStyles","theme","labelGrid","marginRight","planUnit","color","palette","grey","marginLeft","fontSize","planText","pointValue","display","alignItems","columnWithMargin","Info","_ref","_feedItem$context","_feedItem$context$bha","feedItem","bitComponent","pageName","classes","bhaData","context","bha","data","components","startDepth","start_depth","bitSize","getBhaBitSize","depthIn","getBhaDepthIn","bitMaker","make","bitModel","model","_jsxs","Grid","container","spacing","justify","children","item","className","_jsx","Typography","variant","concat","propTypes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7BX,OAGLM,OAACC,OAAI,CAACK,MAAI,EAACC,UAAWvB,EAAQpB,UAAUyC,SAAA,CACtCG,MAACC,aAAU,CAACC,QAAQ,QAAQH,UAAWvB,EAAQZ,SAASiC,SAAA,eAGxDG,MAACC,aAAU,CAACC,QAAQ,QAAQH,UAAWvB,EAAQZ,SAASiC,SAAA,kBAI1DL,OAACC,OAAI,CAACK,MAAI,EAAAD,SAAA,CACRG,MAACC,aAAU,CACTC,QAAQ,QACR,cAAA,GAAAC,OAAgB5B,EAAoB,aACpCwB,UAAWvB,EAAQX,WAAWgC,SAE7BT,IAEHY,MAACC,aAAU,CACTC,QAAQ,QACR,cAAA,GAAAC,OAAgB5B,EAAoB,aACpCwB,UAAWvB,EAAQX,WAAWgC,SAE7BP,SAKX,EAEArB,EAAKmC,UAAY,CACf/B,SAAUgC,EAAKA,QAAGC,WAClBhC,aAAc+B,EAAKA,QAAGC,WACtB/B,SAAUgC,EAAMA,OAACD"}
1
+ {"version":3,"file":"Info.js","sources":["../../../../../../../src/components/FeedItem/feedItemTypes/BhaFeedItem/components/Info.js"],"sourcesContent":["import { shape, string } from 'prop-types';\nimport { Typography, Grid, makeStyles } from '@material-ui/core';\n\nimport { getBhaBitSize, getBhaDepthIn } from '~/utils/bha';\n\nconst useStyles = makeStyles(theme => ({\n labelGrid: {\n marginRight: 11,\n },\n planUnit: {\n color: theme.palette.grey[400],\n marginLeft: 5,\n fontSize: 12,\n },\n planText: {\n color: theme.palette.grey[400],\n },\n pointValue: {\n display: 'flex',\n alignItems: 'center',\n },\n columnWithMargin: {\n marginRight: 40,\n },\n}));\n\nconst Info = ({ feedItem, bitComponent, pageName }) => {\n const classes = useStyles();\n\n const bhaData = feedItem.context?.bha?.data;\n const components = bhaData?.components;\n const startDepth = bhaData?.start_depth;\n\n const bitSize = getBhaBitSize(components);\n const depthIn = getBhaDepthIn(startDepth);\n\n const bitMaker = bitComponent?.make || '-';\n const bitModel = bitComponent?.model || '-';\n\n return (\n <Grid container justify=\"flex-start\">\n <Grid item className={classes.labelGrid}>\n <Typography variant=\"body2\" className={classes.planText}>\n Bit Size:\n </Typography>\n <Typography variant=\"body2\" className={classes.planText}>\n Depth In:\n </Typography>\n </Grid>\n <Grid item className={classes.columnWithMargin}>\n <Typography variant=\"body2\" className={classes.pointValue}>\n {bitSize}\n </Typography>\n <Typography\n variant=\"body2\"\n data-testid={`${pageName}_bitSize`}\n className={classes.pointValue}\n >\n {depthIn}\n </Typography>\n </Grid>\n <Grid item className={classes.labelGrid}>\n <Typography variant=\"body2\" className={classes.planText}>\n Bit Maker:\n </Typography>\n <Typography variant=\"body2\" className={classes.planText}>\n Bit Model:\n </Typography>\n </Grid>\n <Grid item>\n <Typography\n variant=\"body2\"\n data-testid={`${pageName}_bitMaker`}\n className={classes.pointValue}\n >\n {bitMaker}\n </Typography>\n <Typography\n variant=\"body2\"\n data-testid={`${pageName}_bitModel`}\n className={classes.pointValue}\n >\n {bitModel}\n </Typography>\n </Grid>\n </Grid>\n );\n};\n\nInfo.propTypes = {\n feedItem: shape().isRequired,\n bitComponent: shape().isRequired,\n pageName: string.isRequired,\n};\n\nexport default Info;\n"],"names":["useStyles","makeStyles","theme","labelGrid","marginRight","planUnit","color","palette","grey","marginLeft","fontSize","planText","pointValue","display","alignItems","columnWithMargin","Info","_ref","_feedItem$context","_feedItem$context$bha","feedItem","bitComponent","pageName","classes","bhaData","context","bha","data","components","startDepth","start_depth","bitSize","getBhaBitSize","depthIn","getBhaDepthIn","bitMaker","make","bitModel","model","_jsxs","Grid","container","justify","children","item","className","_jsx","Typography","variant","concat","propTypes","shape","isRequired","string"],"mappings":"gJAKMA,EAAYC,EAAAA,YAAW,SAAAC,GAAK,MAAK,CACrCC,UAAW,CACTC,YAAa,IAEfC,SAAU,CACRC,MAAOJ,EAAMK,QAAQC,KAAK,KAC1BC,WAAY,EACZC,SAAU,IAEZC,SAAU,CACRL,MAAOJ,EAAMK,QAAQC,KAAK,MAE5BI,WAAY,CACVC,QAAS,O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AAA,CACRG,MAACC,aAAU,CACTC,QAAQ,QACR,cAAA,GAAAC,OAAgB3B,EAAoB,aACpCuB,UAAWtB,EAAQX,WAAW+B,SAE7BR,IAEHW,MAACC,aAAU,CACTC,QAAQ,QACR,cAAA,GAAAC,OAAgB3B,EAAoB,aACpCuB,UAAWtB,EAAQX,WAAW+B,SAE7BN,SAKX,EAEArB,EAAKkC,UAAY,CACf9B,SAAU+B,EAAKA,QAAGC,WAClB/B,aAAc8B,EAAKA,QAAGC,WACtB9B,SAAU+B,EAAMA,OAACD"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react"),i=require("prop-types"),t=require("classnames"),r=require("@material-ui/core"),a=require("@material-ui/core/colors/blue"),n=require("../../../utils/convert.js"),s=require("../../../utils/FluidCheckUtils.js"),c=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=o(t),u=o(a),p="fluidReportActivity",l=r.makeStyles((function(e){return{density:{color:u.default[300]},unit:{color:e.palette.grey[400],marginLeft:5},oneLineText:{display:"flex",alignItems:"center"},title:{color:e.palette.grey[400]},columnWithMargin:{marginRight:40}}})),y=function(i){var t=i.feedItem.context.fluid_report.data,a=t.depth,o=t.mud_type,u=t.mud_density,y=t.viscosity,m=y.pv,h=void 0===m?"":m,g=y.yp,f=void 0===g?"":g,x=y.rpm_readings,v=l(),q=s.ctop(a,"length","ft"),R=q?q.formatNumeral("0,0"):"-",j=n.getUnitDisplay("length"),T=n.convertValue(+u,"density","ppg").formatNumeral("0,0.00"),b=n.getUnitDisplay("density"),N=n.getUnitDisplay("yp"),_=Number.isFinite(h)?h.fixFloat(3):h,D=Number.isFinite(f)?f.fixFloat(3):f,F=e.useMemo((function(){var e=x.length-1;return x.reduce((function(i,t,r){var a=r===e?"":", ",n="".concat(t.rpm,"/").concat(t.dial_reading);return"".concat(i).concat(n).concat(a)}),"")}),[x]);return c.jsxs(r.Grid,{container:!0,spacing:"40",justify:"flex-start",children:[c.jsxs(r.Grid,{item:!0,className:v.columnWithMargin,children:[c.jsx(r.Typography,{variant:"body2",children:"Density"}),c.jsxs(r.Typography,{variant:"h6","data-testid":"".concat(p,"_density"),className:d.default(v.density,v.oneLineText),children:[T,c.jsxs(r.Typography,{component:"span",variant:"caption",className:v.unit,children:["(",b,")"]})]}),c.jsxs(r.Typography,{className:v.oneLineText,children:[R,c.jsxs(r.Typography,{component:"span",variant:"caption",className:v.unit,children:["(",j,")"]})," / ",o]})]}),c.jsxs(r.Grid,{item:!0,children:[c.jsxs(r.Typography,{variant:"body2","data-testid":"".concat(p,"_viscosity"),className:v.oneLineText,children:[c.jsx(r.Typography,{variant:"span",className:v.title,children:"PV: "}),"".concat(_," ").concat("cP"," / YP: ").concat(D),c.jsx(r.Typography,{component:"span",variant:"caption",className:v.unit,children:N})]}),c.jsx(r.Typography,{variant:"body2",className:v.title,children:"Rheometer Readings (RPM/Dial Reading):"}),c.jsx(r.Typography,{variant:"body2","data-testid":"".concat(p,"_rheometerReadings"),children:F})]})]})};y.propTypes={feedItem:i.shape({context:i.shape({fluid_report:i.shape({data:i.shape({depth:i.number.isRequired,mud_type:i.string.isRequired,mud_density:i.number.isRequired,viscosity:i.shape({pv:i.number.isRequired,yp:i.number.isRequired,rpm_readings:i.arrayOf(i.shape({id:i.string.isRequired,dial_reading:i.number.isRequired,rpm:i.number.isRequired})).isRequired}).isRequired}).isRequired}).isRequired}).isRequired}).isRequired},module.exports=y;
1
+ "use strict";var e=require("react"),i=require("prop-types"),t=require("classnames"),r=require("@material-ui/core"),a=require("@material-ui/core/colors/blue"),n=require("../../../utils/convert.js"),s=require("../../../utils/FluidCheckUtils.js"),c=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=o(t),u=o(a),p="fluidReportActivity",l=r.makeStyles((function(e){return{density:{color:u.default[300]},unit:{color:e.palette.grey[400],marginLeft:5},oneLineText:{display:"flex",alignItems:"center"},title:{color:e.palette.grey[400]},columnWithMargin:{marginRight:40}}})),y=function(i){var t=i.feedItem.context.fluid_report.data,a=t.depth,o=t.mud_type,u=t.mud_density,y=t.viscosity,m=y.pv,h=void 0===m?"":m,g=y.yp,f=void 0===g?"":g,x=y.rpm_readings,v=l(),q=s.ctop(a,"length","ft"),R=q?q.formatNumeral("0,0"):"-",j=n.getUnitDisplay("length"),T=n.convertValue(+u,"density","ppg").formatNumeral("0,0.00"),b=n.getUnitDisplay("density"),N=n.getUnitDisplay("yp"),_=Number.isFinite(h)?h.fixFloat(3):h,D=Number.isFinite(f)?f.fixFloat(3):f,F=e.useMemo((function(){var e=x.length-1;return x.reduce((function(i,t,r){var a=r===e?"":", ",n="".concat(t.rpm,"/").concat(t.dial_reading);return"".concat(i).concat(n).concat(a)}),"")}),[x]);return c.jsxs(r.Grid,{container:!0,justify:"flex-start",children:[c.jsxs(r.Grid,{item:!0,className:v.columnWithMargin,children:[c.jsx(r.Typography,{variant:"body2",children:"Density"}),c.jsxs(r.Typography,{variant:"h6","data-testid":"".concat(p,"_density"),className:d.default(v.density,v.oneLineText),children:[T,c.jsxs(r.Typography,{component:"span",variant:"caption",className:v.unit,children:["(",b,")"]})]}),c.jsxs(r.Typography,{className:v.oneLineText,children:[R,c.jsxs(r.Typography,{component:"span",variant:"caption",className:v.unit,children:["(",j,")"]})," / ",o]})]}),c.jsxs(r.Grid,{item:!0,children:[c.jsxs(r.Typography,{variant:"body2","data-testid":"".concat(p,"_viscosity"),className:v.oneLineText,children:[c.jsx(r.Typography,{variant:"span",className:v.title,children:"PV: "}),"".concat(_," ").concat("cP"," / YP: ").concat(D),c.jsx(r.Typography,{component:"span",variant:"caption",className:v.unit,children:N})]}),c.jsx(r.Typography,{variant:"body2",className:v.title,children:"Rheometer Readings (RPM/Dial Reading):"}),c.jsx(r.Typography,{variant:"body2","data-testid":"".concat(p,"_rheometerReadings"),children:F})]})]})};y.propTypes={feedItem:i.shape({context:i.shape({fluid_report:i.shape({data:i.shape({depth:i.number.isRequired,mud_type:i.string.isRequired,mud_density:i.number.isRequired,viscosity:i.shape({pv:i.number.isRequired,yp:i.number.isRequired,rpm_readings:i.arrayOf(i.shape({id:i.string.isRequired,dial_reading:i.number.isRequired,rpm:i.number.isRequired})).isRequired}).isRequired}).isRequired}).isRequired}).isRequired}).isRequired},module.exports=y;
2
2
  //# sourceMappingURL=FluidReportFeedItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FluidReportFeedItem.js","sources":["../../../../../src/components/FeedItem/feedItemTypes/FluidReportFeedItem.js"],"sourcesContent":["import { useMemo } from 'react';\nimport { shape, number, string, arrayOf } from 'prop-types';\nimport classNames from 'classnames';\nimport { Typography, Grid, makeStyles } from '@material-ui/core';\nimport blue from '@material-ui/core/colors/blue';\n\nimport { convertValue, getUnitDisplay } from '~/utils/convert';\nimport { ctop } from '~/utils/FluidCheckUtils';\n\nconst PAGE_NAME = 'fluidReportActivity';\n\nconst useStyles = makeStyles(theme => ({\n density: {\n color: blue[300],\n },\n unit: {\n color: theme.palette.grey[400],\n marginLeft: 5,\n },\n oneLineText: {\n display: 'flex',\n alignItems: 'center',\n },\n title: {\n color: theme.palette.grey[400],\n },\n columnWithMargin: {\n marginRight: 40,\n },\n}));\n\nconst FluidReportFeedItem = ({\n feedItem: {\n context: {\n fluid_report: {\n data: {\n depth: depthNotConverted,\n mud_type: mudType,\n mud_density: mudDensity,\n viscosity: { pv = '', yp = '', rpm_readings: rpmReadings },\n },\n },\n },\n },\n}) => {\n const classes = useStyles();\n\n const depth = ctop(depthNotConverted, 'length', 'ft');\n const depthString = depth ? depth.formatNumeral('0,0') : '-';\n const depthUnit = getUnitDisplay('length');\n\n const convertedMudDensity = convertValue(+mudDensity, 'density', 'ppg');\n const mudDensityFormatted = convertedMudDensity.formatNumeral('0,0.00');\n const densityUnit = getUnitDisplay('density');\n\n const pvUnit = 'cP';\n const ypUnit = getUnitDisplay('yp');\n const pvFormatted = Number.isFinite(pv) ? pv.fixFloat(3) : pv;\n const ypFormatted = Number.isFinite(yp) ? yp.fixFloat(3) : yp;\n\n const rheometerReadingsString = useMemo(() => {\n const rpmReadingsLastItemIndex = rpmReadings.length - 1;\n\n return rpmReadings.reduce((resultString, reading, index) => {\n const commaString = index === rpmReadingsLastItemIndex ? '' : ', ';\n const readingString = `${reading.rpm}/${reading.dial_reading}`;\n return `${resultString}${readingString}${commaString}`;\n }, '');\n }, [rpmReadings]);\n\n return (\n <Grid container spacing=\"40\" justify=\"flex-start\">\n <Grid item className={classes.columnWithMargin}>\n <Typography variant=\"body2\">Density</Typography>\n <Typography\n variant=\"h6\"\n data-testid={`${PAGE_NAME}_density`}\n className={classNames(classes.density, classes.oneLineText)}\n >\n {mudDensityFormatted}\n <Typography component=\"span\" variant=\"caption\" className={classes.unit}>\n ({densityUnit})\n </Typography>\n </Typography>\n <Typography className={classes.oneLineText}>\n {depthString}\n <Typography component=\"span\" variant=\"caption\" className={classes.unit}>\n ({depthUnit})\n </Typography>\n &nbsp;/ {mudType}\n </Typography>\n </Grid>\n <Grid item>\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_viscosity`}\n className={classes.oneLineText}\n >\n <Typography variant=\"span\" className={classes.title}>\n PV:&nbsp;\n </Typography>\n {`${pvFormatted} ${pvUnit} / YP: ${ypFormatted}`}\n <Typography component=\"span\" variant=\"caption\" className={classes.unit}>\n {ypUnit}\n </Typography>\n </Typography>\n <Typography variant=\"body2\" className={classes.title}>\n Rheometer Readings (RPM/Dial Reading):\n </Typography>\n <Typography variant=\"body2\" data-testid={`${PAGE_NAME}_rheometerReadings`}>\n {rheometerReadingsString}\n </Typography>\n </Grid>\n </Grid>\n );\n};\n\nFluidReportFeedItem.propTypes = {\n feedItem: shape({\n context: shape({\n fluid_report: shape({\n data: shape({\n depth: number.isRequired,\n mud_type: string.isRequired,\n mud_density: number.isRequired,\n viscosity: shape({\n pv: number.isRequired,\n yp: number.isRequired,\n rpm_readings: arrayOf(\n shape({\n id: string.isRequired,\n dial_reading: number.isRequired,\n rpm: number.isRequired,\n })\n ).isRequired,\n }).isRequired,\n }).isRequired,\n }).isRequired,\n }).isRequired,\n }).isRequired,\n};\n\nexport default FluidReportFeedItem;\n"],"names":["PAGE_NAME","useStyles","makeStyles","theme","density","color","blue","unit","palette","grey","marginLeft","oneLineText","display","alignItems","title","columnWithMargin","marginRight","FluidReportFeedItem","_ref","_ref$feedItem$context","feedItem","context","fluid_report","data","depthNotConverted","depth","mudType","mud_type","mudDensity","mud_density","_ref$feedItem$context2","viscosity","_ref$feedItem$context3","pv","_ref$feedItem$context4","yp","rpmReadings","rpm_readings","classes","ctop","depthString","formatNumeral","depthUnit","getUnitDisplay","mudDensityFormatted","convertValue","densityUnit","ypUnit","pvFormatted","Number","isFinite","fixFloat","ypFormatted","rheometerReadingsString","useMemo","rpmReadingsLastItemIndex","length","reduce","resultString","reading","index","commaString","readingString","rpm","dial_reading","concat","_jsxs","Grid","container","spacing","justify","children","item","className","_jsx","Typography","variant","classNames","jsxs","component","pvUnit","propTypes","shape","number","isRequired","string","arrayOf","id"],"mappings":"6WASMA,EAAY,sBAEZC,EAAYC,EAAAA,YAAW,SAAAC,GAAK,MAAK,CACrCC,QAAS,CACPC,MAAOC,EAAI,QAAC,MAEdC,KAAM,CACJF,MAAOF,EAAMK,QAAQC,KAAK,KAC1BC,WAAY,GAEdC,YAAa,CACXC,QAAS,OACTC,WAAY,UAEdC,MAAO,CACLT,MAAOF,EAAMK,QAAQC,KAAK,MAE5BM,iBAAkB,CAChBC,YAAa,IAEhB,IAEKC,EAAsB,SAatBC,GAAA,IAAAC,EAAAD,EAZJE,SACEC,QACEC,aACEC,KACSC,IAAPC,MACUC,IAAVC,SACaC,IAAbC,YAAWC,EAAAX,EACXY,UAASC,EAAAF,EAAIG,GAAAA,aAAK,GAAED,EAAAE,EAAAJ,EAAEK,GAAAA,aAAK,GAAED,EAAgBE,IAAdC,aAMjCC,EAAUrC,IAEVwB,EAAQc,EAAIA,KAACf,EAAmB,SAAU,MAC1CgB,EAAcf,EAAQA,EAA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,OAACC,OAAI,CAACK,MAAI,EAAAD,SAAA,CACRL,OAACS,aAAU,CACTC,QAAQ,QACR,cAAA,GAAAX,OAAgBjE,EAAsB,cACtCyE,UAAWnC,EAAQ3B,YAAY4D,SAAA,CAE/BG,MAACC,aAAU,CAACC,QAAQ,OAAOH,UAAWnC,EAAQxB,MAAMyD,SAAA,SAEvC,GAAAN,OACTjB,EAAegC,KAAAA,OA9CZ,uBA8C4B5B,GACnCsB,EAAAA,IAACC,EAAAA,WAAU,CAACI,UAAU,OAAOH,QAAQ,UAAUH,UAAWnC,EAAQ/B,KAAKgE,SACpExB,OAGL2B,MAACC,aAAU,CAACC,QAAQ,QAAQH,UAAWnC,EAAQxB,MAAMyD,SAAA,2CAGrDG,MAACC,aAAU,CAACC,QAAQ,QAAQ,cAAA,GAAAX,OAAgBjE,EAA8B,sBAAAuE,SACvElB,SAKX,EAEApC,EAAoBgE,UAAY,CAC9B7D,SAAU8D,EAAAA,MAAM,CACd7D,QAAS6D,EAAAA,MAAM,CACb5D,aAAc4D,EAAAA,MAAM,CAClB3D,KAAM2D,EAAAA,MAAM,CACVzD,MAAO0D,EAAMA,OAACC,WACdzD,SAAU0D,EAAMA,OAACD,WACjBvD,YAAasD,EAAMA,OAACC,WACpBrD,UAAWmD,EAAAA,MAAM,CACfjD,GAAIkD,EAAMA,OAACC,WACXjD,GAAIgD,EAAMA,OAACC,WACX/C,aAAciD,EAAOA,QACnBJ,QAAM,CACJK,GAAIF,EAAMA,OAACD,WACXpB,aAAcmB,EAAMA,OAACC,WACrBrB,IAAKoB,EAAMA,OAACC,cAEdA,aACDA,aACFA,aACFA,aACFA,aACFA"}
1
+ {"version":3,"file":"FluidReportFeedItem.js","sources":["../../../../../src/components/FeedItem/feedItemTypes/FluidReportFeedItem.js"],"sourcesContent":["import { useMemo } from 'react';\nimport { shape, number, string, arrayOf } from 'prop-types';\nimport classNames from 'classnames';\nimport { Typography, Grid, makeStyles } from '@material-ui/core';\nimport blue from '@material-ui/core/colors/blue';\n\nimport { convertValue, getUnitDisplay } from '~/utils/convert';\nimport { ctop } from '~/utils/FluidCheckUtils';\n\nconst PAGE_NAME = 'fluidReportActivity';\n\nconst useStyles = makeStyles(theme => ({\n density: {\n color: blue[300],\n },\n unit: {\n color: theme.palette.grey[400],\n marginLeft: 5,\n },\n oneLineText: {\n display: 'flex',\n alignItems: 'center',\n },\n title: {\n color: theme.palette.grey[400],\n },\n columnWithMargin: {\n marginRight: 40,\n },\n}));\n\nconst FluidReportFeedItem = ({\n feedItem: {\n context: {\n fluid_report: {\n data: {\n depth: depthNotConverted,\n mud_type: mudType,\n mud_density: mudDensity,\n viscosity: { pv = '', yp = '', rpm_readings: rpmReadings },\n },\n },\n },\n },\n}) => {\n const classes = useStyles();\n\n const depth = ctop(depthNotConverted, 'length', 'ft');\n const depthString = depth ? depth.formatNumeral('0,0') : '-';\n const depthUnit = getUnitDisplay('length');\n\n const convertedMudDensity = convertValue(+mudDensity, 'density', 'ppg');\n const mudDensityFormatted = convertedMudDensity.formatNumeral('0,0.00');\n const densityUnit = getUnitDisplay('density');\n\n const pvUnit = 'cP';\n const ypUnit = getUnitDisplay('yp');\n const pvFormatted = Number.isFinite(pv) ? pv.fixFloat(3) : pv;\n const ypFormatted = Number.isFinite(yp) ? yp.fixFloat(3) : yp;\n\n const rheometerReadingsString = useMemo(() => {\n const rpmReadingsLastItemIndex = rpmReadings.length - 1;\n\n return rpmReadings.reduce((resultString, reading, index) => {\n const commaString = index === rpmReadingsLastItemIndex ? '' : ', ';\n const readingString = `${reading.rpm}/${reading.dial_reading}`;\n return `${resultString}${readingString}${commaString}`;\n }, '');\n }, [rpmReadings]);\n\n return (\n <Grid container justify=\"flex-start\">\n <Grid item className={classes.columnWithMargin}>\n <Typography variant=\"body2\">Density</Typography>\n <Typography\n variant=\"h6\"\n data-testid={`${PAGE_NAME}_density`}\n className={classNames(classes.density, classes.oneLineText)}\n >\n {mudDensityFormatted}\n <Typography component=\"span\" variant=\"caption\" className={classes.unit}>\n ({densityUnit})\n </Typography>\n </Typography>\n <Typography className={classes.oneLineText}>\n {depthString}\n <Typography component=\"span\" variant=\"caption\" className={classes.unit}>\n ({depthUnit})\n </Typography>\n &nbsp;/ {mudType}\n </Typography>\n </Grid>\n <Grid item>\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_viscosity`}\n className={classes.oneLineText}\n >\n <Typography variant=\"span\" className={classes.title}>\n PV:&nbsp;\n </Typography>\n {`${pvFormatted} ${pvUnit} / YP: ${ypFormatted}`}\n <Typography component=\"span\" variant=\"caption\" className={classes.unit}>\n {ypUnit}\n </Typography>\n </Typography>\n <Typography variant=\"body2\" className={classes.title}>\n Rheometer Readings (RPM/Dial Reading):\n </Typography>\n <Typography variant=\"body2\" data-testid={`${PAGE_NAME}_rheometerReadings`}>\n {rheometerReadingsString}\n </Typography>\n </Grid>\n </Grid>\n );\n};\n\nFluidReportFeedItem.propTypes = {\n feedItem: shape({\n context: shape({\n fluid_report: shape({\n data: shape({\n depth: number.isRequired,\n mud_type: string.isRequired,\n mud_density: number.isRequired,\n viscosity: shape({\n pv: number.isRequired,\n yp: number.isRequired,\n rpm_readings: arrayOf(\n shape({\n id: string.isRequired,\n dial_reading: number.isRequired,\n rpm: number.isRequired,\n })\n ).isRequired,\n }).isRequired,\n }).isRequired,\n }).isRequired,\n }).isRequired,\n }).isRequired,\n};\n\nexport default FluidReportFeedItem;\n"],"names":["PAGE_NAME","useStyles","makeStyles","theme","density","color","blue","unit","palette","grey","marginLeft","oneLineText","display","alignItems","title","columnWithMargin","marginRight","FluidReportFeedItem","_ref","_ref$feedItem$context","feedItem","context","fluid_report","data","depthNotConverted","depth","mudType","mud_type","mudDensity","mud_density","_ref$feedItem$context2","viscosity","_ref$feedItem$context3","pv","_ref$feedItem$context4","yp","rpmReadings","rpm_readings","classes","ctop","depthString","formatNumeral","depthUnit","getUnitDisplay","mudDensityFormatted","convertValue","densityUnit","ypUnit","pvFormatted","Number","isFinite","fixFloat","ypFormatted","rheometerReadingsString","useMemo","rpmReadingsLastItemIndex","length","reduce","resultString","reading","index","commaString","readingString","rpm","dial_reading","concat","_jsxs","Grid","container","justify","children","item","className","_jsx","Typography","variant","classNames","jsxs","component","pvUnit","propTypes","shape","number","isRequired","string","arrayOf","id"],"mappings":"6WASMA,EAAY,sBAEZC,EAAYC,EAAAA,YAAW,SAAAC,GAAK,MAAK,CACrCC,QAAS,CACPC,MAAOC,EAAI,QAAC,MAEdC,KAAM,CACJF,MAAOF,EAAMK,QAAQC,KAAK,KAC1BC,WAAY,GAEdC,YAAa,CACXC,QAAS,OACTC,WAAY,UAEdC,MAAO,CACLT,MAAOF,EAAMK,QAAQC,KAAK,MAE5BM,iBAAkB,CAChBC,YAAa,IAEhB,IAEKC,EAAsB,SAatBC,GAAA,IAAAC,EAAAD,EAZJE,SACEC,QACEC,aACEC,KACSC,IAAPC,MACUC,IAAVC,SACaC,IAAbC,YAAWC,EAAAX,EACXY,UAASC,EAAAF,EAAIG,GAAAA,aAAK,GAAED,EAAAE,EAAAJ,EAAEK,GAAAA,aAAK,GAAED,EAAgBE,IAAdC,aAMjCC,EAAUrC,IAEVwB,EAAQc,EAAIA,KAACf,EAAmB,SAAU,MAC1CgB,EAAcf,EAAQA,EAAMgB,cAAc,OAAS,IACnDC,EAAYC,iBAAe,UAG3BC,EADsBC,EAAAA,cAAcjB,EAAY,UAAW,OACjBa,cAAc,UACxDK,EAAcH,iBAAe,WAG7BI,EAASJ,iBAAe,MACxBK,EAAcC,OAAOC,SAASjB,GAAMA,EAAGkB,SAAS,GAAKlB,EACrDmB,EAAcH,OAAOC,SAASf,GAAMA,EAAGgB,SAAS,GAAKhB,EAErDkB,EAA0BC,EAAAA,SAAQ,WACtC,IAAMC,EAA2BnB,EAAYoB,OAAS,EAEtD,OAAOpB,EAAYqB,QAAO,SAACC,EAAcC,EAASC,GAChD,IAAMC,EAAcD,IAAUL,EAA2B,GAAK,KACxDO,YAAmBH,EAAQI,IAAOJ,KAAAA,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C,aAAU,CAACC,QAAQ,QAAQ,cAAA,GAAAV,OAAgBjE,EAA8B,sBAAAsE,SACvEjB,SAKX,EAEApC,EAAoB+D,UAAY,CAC9B5D,SAAU6D,EAAAA,MAAM,CACd5D,QAAS4D,EAAAA,MAAM,CACb3D,aAAc2D,EAAAA,MAAM,CAClB1D,KAAM0D,EAAAA,MAAM,CACVxD,MAAOyD,EAAMA,OAACC,WACdxD,SAAUyD,EAAMA,OAACD,WACjBtD,YAAaqD,EAAMA,OAACC,WACpBpD,UAAWkD,EAAAA,MAAM,CACfhD,GAAIiD,EAAMA,OAACC,WACXhD,GAAI+C,EAAMA,OAACC,WACX9C,aAAcgD,EAAOA,QACnBJ,QAAM,CACJK,GAAIF,EAAMA,OAACD,WACXnB,aAAckB,EAAMA,OAACC,WACrBpB,IAAKmB,EAAMA,OAACC,cAEdA,aACDA,aACFA,aACFA,aACFA,aACFA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/regenerator"),u=require("react"),d=require("prop-types"),p=require("react-s3-uploader/s3upload"),c=require("@material-ui/core/CircularProgress"),f=require("@material-ui/icons/PhotoCamera"),h=require("./PostPreviewDialog/index.js"),b=require("./Icons/AttachIcon.js"),g=require("./IconButton/index.js"),F=require("../clients/jsonApi/index.js"),v=require("../utils/mobileDetect.js"),m=require("react/jsx-runtime");function U(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var P=U(e),y=U(t),S=U(r),j=U(l),O=U(i),q=U(a),w=U(n),D=U(o),x=U(s),I=U(d),C=U(p),R=U(c),T=U(f);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){D.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,l=w.default(e);if(t){var i=w.default(this).constructor;r=Reflect.construct(l,arguments,i)}else r=l.apply(this,arguments);return q.default(this,r)}}var k=function(e){O.default(r,e);var t=_(r);function r(e){var l,i;return y.default(this,r),l=t.call(this,e),D.default(j.default(l),"onFinish",P.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F.getS3DownloadLink(l.state.s3FileName);case 2:t=e.sent,l.setState({currentUpload:null,uploadingFileToS3:!1,openFileUploadPreviewDialog:l.props.openPreviewDialogOnUpload,s3FileUrl:t.url},(function(){l.props.onFinish&&l.props.onFinish(l.state.s3FileUrl,l.state.s3FileName,l.state.s3FileSize)}));case 4:case"end":return e.stop()}}),e)})))),D.default(j.default(l),"onError",(function(e){l.props.onError&&l.props.onError(e),console.error(e)})),D.default(j.default(l),"getSignedUrl",(i=P.default(x.default.mark((function e(t,r){var i;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,F.getS3SignedUrl(t.name,t.type);case 3:i=e.sent,e.next=10;break;case 6:return e.prev=6,e.t0=e.catch(0),l.setState({uploadingFileToS3:null,currentUpload:null},(function(){l.onError(e.t0.message)})),e.abrupt("return");case 10:l.setState({s3FileUrl:i.signed_url,s3FileName:i.file_name,s3FileSize:t.size}),r(N(N({},i),{},{signedUrl:i.signed_url}));case 12:case"end":return e.stop()}}),e,null,[[0,6]])}))),function(e,t){return i.apply(this,arguments)})),D.default(j.default(l),"preprocess",(function(e,t){t(e)})),D.default(j.default(l),"uploadFile",(function(e){if(e.target.files[0]){l.clearUpload();var t=new C.default({fileElement:l.fileInput.current,getSignedUrl:l.getSignedUrl,preprocess:l.preprocess,onProgress:function(){},onFinishS3Put:l.onFinish,onError:l.onError});l.setState({uploadingFileToS3:!0,currentUpload:{uploader:t}})}})),D.default(j.default(l),"handleCloseFileUploadPreviewDialog",(function(){l.setState({openFileUploadPreviewDialog:!1})})),D.default(j.default(l),"handleShare",(function(e,t,r){l.setState({openFileUploadPreviewDialog:!1},(function(){l.props.handleShare&&l.props.handleShare(e,t,r)}))})),l.state={currentUpload:null,s3FileUrl:null,s3FileName:null,s3FileSize:null,uploadingFileToS3:!1,openFileUploadPreviewDialog:!1},l.fileInput=u.createRef(),l}return S.default(r,[{key:"clearUpload",value:function(){var e=this.state.currentUpload;e&&e.uploader&&e.uploader.abortUpload()}},{key:"renderUploadButton",value:function(){var e=v.isNativeDetected?T.default:b,t=D.default({},"data-file-upload-button","");return m.jsxs("label",N(N({htmlFor:this.props.inputId},t),{},{children:[m.jsx("input",{ref:this.fileInput,id:this.props.inputId,type:"file",disabled:this.props.disabled,onChange:this.uploadFile,style:{display:"none"}}),m.jsx(g,{"data-testid":"".concat("fileUpload","_attachFileButton"),"aria-label":"File Upload",disabled:this.props.disabled,component:this.props.disabled?"button":"span",className:this.props.fileUploadIconClassName,disableRipple:this.props.disableRipple,tooltipProps:this.props.tooltipProps,children:m.jsx(e,{})})]}))}},{key:"render",value:function(){return m.jsxs(m.Fragment,{children:[this.state.uploadingFileToS3?m.jsx(R.default,{"data-testid":"generic_uploadProgress",size:18}):this.renderUploadButton(),this.state.openFileUploadPreviewDialog&&m.jsx(h,{open:this.state.openFileUploadPreviewDialog,fileUrl:this.state.s3FileUrl,fileName:this.state.s3FileName,fileSize:this.state.s3FileSize,handleShare:this.handleShare,handleClose:this.handleCloseFileUploadPreviewDialog,additionalFields:this.props.additionalFields,requiredFields:this.props.requiredFields,message:this.props.message})]})}}]),r}(u.PureComponent);k.propTypes={additionalFields:I.default.arrayOf(I.default.node),classes:I.default.shape({}).isRequired,tooltipProps:I.default.shape({}),disableRipple:I.default.bool,disabled:I.default.bool,fileUploadIconClassName:I.default.string,handleShare:I.default.func,inputId:I.default.string,message:I.default.string,onError:I.default.func,onFinish:I.default.func,openPreviewDialogOnUpload:I.default.bool,requiredFields:I.default.arrayOf(I.default.string)},k.defaultProps={additionalFields:[],disableRipple:!1,disabled:!1,fileUploadIconClassName:void 0,handleShare:void 0,inputId:"icon-button-file",message:void 0,onError:void 0,onFinish:void 0,openPreviewDialogOnUpload:!0,requiredFields:[],tooltipProps:{title:"Attach File"}},exports.FILE_UPLOAD_BUTTON_DATA_ATTR="data-file-upload-button",exports.default=k;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/regenerator"),u=require("react"),d=require("prop-types"),p=require("react-s3-uploader/s3upload"),c=require("@material-ui/core/CircularProgress"),f=require("@material-ui/icons/PhotoCamera"),h=require("./PostPreviewDialog/index.js"),b=require("./Icons/AttachIcon.js"),g=require("./IconButton/index.js"),F=require("../clients/jsonApi/index.js"),v=require("../utils/mobileDetect.js"),m=require("react/jsx-runtime");function U(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var P=U(e),y=U(t),S=U(r),j=U(l),O=U(i),q=U(a),w=U(n),D=U(o),x=U(s),I=U(d),C=U(p),T=U(c),E=U(f);function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){D.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,l=w.default(e);if(t){var i=w.default(this).constructor;r=Reflect.construct(l,arguments,i)}else r=l.apply(this,arguments);return q.default(this,r)}}var k=function(e){O.default(r,e);var t=_(r);function r(e){var l,i;return y.default(this,r),l=t.call(this,e),D.default(j.default(l),"onFinish",P.default(x.default.mark((function e(){var t;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F.getS3DownloadLink(l.state.s3FileName);case 2:t=e.sent,l.setState({currentUpload:null,uploadingFileToS3:!1,openFileUploadPreviewDialog:l.props.openPreviewDialogOnUpload,s3FileUrl:t.url},(function(){l.props.onFinish&&l.props.onFinish(l.state.s3FileUrl,l.state.s3FileName,l.state.s3FileSize)}));case 4:case"end":return e.stop()}}),e)})))),D.default(j.default(l),"onError",(function(e){l.props.onError&&l.props.onError(e),console.error(e)})),D.default(j.default(l),"getSignedUrl",(i=P.default(x.default.mark((function e(t,r){var i;return x.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,F.getS3SignedUrl(t.name,t.type);case 3:i=e.sent,e.next=10;break;case 6:return e.prev=6,e.t0=e.catch(0),l.setState({uploadingFileToS3:null,currentUpload:null},(function(){l.onError(e.t0.message)})),e.abrupt("return");case 10:l.setState({s3FileUrl:i.signed_url,s3FileName:i.file_name,s3FileSize:t.size}),r(R(R({},i),{},{signedUrl:i.signed_url}));case 12:case"end":return e.stop()}}),e,null,[[0,6]])}))),function(e,t){return i.apply(this,arguments)})),D.default(j.default(l),"preprocess",(function(e,t){t(e)})),D.default(j.default(l),"uploadFile",(function(e){if(e.target.files[0]){l.clearUpload();var t=new C.default({fileElement:l.fileInput.current,getSignedUrl:l.getSignedUrl,preprocess:l.preprocess,onProgress:function(){},onFinishS3Put:l.onFinish,onError:l.onError});l.setState({uploadingFileToS3:!0,currentUpload:{uploader:t}})}})),D.default(j.default(l),"handleCloseFileUploadPreviewDialog",(function(){l.setState({openFileUploadPreviewDialog:!1})})),D.default(j.default(l),"handleShare",(function(e,t,r){l.setState({openFileUploadPreviewDialog:!1},(function(){l.props.handleShare&&l.props.handleShare(e,t,r)}))})),l.state={currentUpload:null,s3FileUrl:null,s3FileName:null,s3FileSize:null,uploadingFileToS3:!1,openFileUploadPreviewDialog:!1},l.fileInput=u.createRef(),l}return S.default(r,[{key:"clearUpload",value:function(){var e=this.state.currentUpload;e&&e.uploader&&e.uploader.abortUpload()}},{key:"renderUploadButton",value:function(){var e=v.isNativeDetected?E.default:b,t=D.default({},"data-file-upload-button","");return m.jsxs("label",R(R({htmlFor:this.props.inputId},t),{},{children:[m.jsx("input",{ref:this.fileInput,id:this.props.inputId,type:"file",disabled:this.props.disabled,onChange:this.uploadFile,style:{display:"none"}}),m.jsx(g,{"data-testid":"".concat("fileUpload","_attachFileButton"),"aria-label":"File Upload",disabled:this.props.disabled,component:this.props.disabled?"button":"span",className:this.props.fileUploadIconClassName,disableRipple:this.props.disableRipple,tooltipProps:this.props.tooltipProps,children:m.jsx(e,{})})]}))}},{key:"render",value:function(){return m.jsxs(m.Fragment,{children:[this.state.uploadingFileToS3?m.jsx(T.default,{"data-testid":"generic_uploadProgress",size:18}):this.renderUploadButton(),this.state.openFileUploadPreviewDialog&&m.jsx(h,{open:this.state.openFileUploadPreviewDialog,fileUrl:this.state.s3FileUrl,fileName:this.state.s3FileName,fileSize:this.state.s3FileSize,handleShare:this.handleShare,handleClose:this.handleCloseFileUploadPreviewDialog,additionalFields:this.props.additionalFields,requiredFields:this.props.requiredFields,message:this.props.message})]})}}]),r}(u.PureComponent);k.propTypes={additionalFields:I.default.arrayOf(I.default.node),classes:I.default.shape({}),tooltipProps:I.default.shape({}),disableRipple:I.default.bool,disabled:I.default.bool,fileUploadIconClassName:I.default.string,handleShare:I.default.func,inputId:I.default.string,message:I.default.string,onError:I.default.func,onFinish:I.default.func,openPreviewDialogOnUpload:I.default.bool,requiredFields:I.default.arrayOf(I.default.string)},k.defaultProps={additionalFields:[],classes:{},disableRipple:!1,disabled:!1,fileUploadIconClassName:void 0,handleShare:void 0,inputId:"icon-button-file",message:void 0,onError:void 0,onFinish:void 0,openPreviewDialogOnUpload:!0,requiredFields:[],tooltipProps:{title:"Attach File"}},exports.FILE_UPLOAD_BUTTON_DATA_ATTR="data-file-upload-button",exports.default=k;
2
2
  //# sourceMappingURL=FileUploadIconButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploadIconButton.js","sources":["../../../src/components/FileUploadIconButton.js"],"sourcesContent":["import { createRef, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport S3Upload from 'react-s3-uploader/s3upload';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport PhotoCameraIcon from '@material-ui/icons/PhotoCamera';\n\nimport PostPreviewDialog from '~components/PostPreviewDialog';\nimport AttachIcon from '~components/Icons/AttachIcon';\nimport IconButton from '~components/IconButton';\nimport { getS3SignedUrl, getS3DownloadLink } from '~/clients/jsonApi';\nimport { isNativeDetected } from '~/utils/mobileDetect';\n\nconst PAGE_NAME = 'fileUpload';\n\n// Data attr helps to identify the select file action; Is used to prevent the tooltip from closing\nexport const FILE_UPLOAD_BUTTON_DATA_ATTR = 'data-file-upload-button';\n\nclass FileUploadIconButton extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n currentUpload: null,\n\n s3FileUrl: null,\n s3FileName: null,\n s3FileSize: null,\n\n uploadingFileToS3: false,\n\n openFileUploadPreviewDialog: false,\n };\n\n this.fileInput = createRef();\n }\n\n onFinish = async () => {\n const s3DownloadLinkResponse = await getS3DownloadLink(this.state.s3FileName);\n this.setState(\n {\n currentUpload: null,\n uploadingFileToS3: false,\n openFileUploadPreviewDialog: this.props.openPreviewDialogOnUpload,\n s3FileUrl: s3DownloadLinkResponse.url,\n },\n () => {\n if (this.props.onFinish)\n this.props.onFinish(this.state.s3FileUrl, this.state.s3FileName, this.state.s3FileSize);\n }\n );\n };\n\n onError = fileUploadingError => {\n if (this.props.onError) this.props.onError(fileUploadingError);\n console.error(fileUploadingError);\n };\n\n getSignedUrl = async (file, callback) => {\n let data;\n try {\n data = await getS3SignedUrl(file.name, file.type);\n } catch (e) {\n this.setState(\n {\n uploadingFileToS3: null,\n currentUpload: null,\n },\n () => {\n this.onError(e.message);\n }\n );\n return;\n }\n\n this.setState({\n s3FileUrl: data.signed_url,\n s3FileName: data.file_name,\n s3FileSize: file.size,\n });\n\n // NOTE: Add node for 'signedUrl' which is the expected name by uploader component\n callback({\n ...data,\n signedUrl: data.signed_url,\n });\n };\n\n preprocess = (file, next) => {\n next(file);\n };\n\n uploadFile = event => {\n if (!event.target.files[0]) {\n return;\n }\n\n this.clearUpload();\n const uploader = new S3Upload({\n fileElement: this.fileInput.current,\n getSignedUrl: this.getSignedUrl,\n preprocess: this.preprocess,\n onProgress: () => {}, // NOTE: Prevents logging to console\n onFinishS3Put: this.onFinish,\n onError: this.onError,\n });\n\n this.setState({\n uploadingFileToS3: true,\n currentUpload: {\n uploader,\n },\n });\n };\n\n clearUpload() {\n const { currentUpload } = this.state;\n if (currentUpload && currentUpload.uploader) {\n currentUpload.uploader.abortUpload();\n }\n }\n\n handleCloseFileUploadPreviewDialog = () => {\n this.setState({ openFileUploadPreviewDialog: false });\n };\n\n handleShare = (comment, fileName, fileSize) => {\n this.setState({ openFileUploadPreviewDialog: false }, () => {\n if (this.props.handleShare) {\n this.props.handleShare(comment, fileName, fileSize);\n }\n });\n };\n\n renderUploadButton() {\n const Icon = isNativeDetected ? PhotoCameraIcon : AttachIcon;\n const labelDataAttributes = { [FILE_UPLOAD_BUTTON_DATA_ATTR]: '' };\n\n return (\n <label htmlFor={this.props.inputId} {...labelDataAttributes}>\n <input\n ref={this.fileInput}\n id={this.props.inputId}\n type=\"file\"\n disabled={this.props.disabled}\n onChange={this.uploadFile}\n style={{ display: 'none' }}\n />\n <IconButton\n data-testid={`${PAGE_NAME}_attachFileButton`}\n aria-label=\"File Upload\"\n disabled={this.props.disabled}\n component={this.props.disabled ? 'button' : 'span'}\n className={this.props.fileUploadIconClassName}\n disableRipple={this.props.disableRipple}\n tooltipProps={this.props.tooltipProps}\n >\n <Icon />\n </IconButton>\n </label>\n );\n }\n\n render() {\n return (\n <>\n {this.state.uploadingFileToS3 ? (\n <CircularProgress data-testid=\"generic_uploadProgress\" size={18} />\n ) : (\n this.renderUploadButton()\n )}\n\n {this.state.openFileUploadPreviewDialog && (\n <PostPreviewDialog\n open={this.state.openFileUploadPreviewDialog}\n fileUrl={this.state.s3FileUrl}\n fileName={this.state.s3FileName}\n fileSize={this.state.s3FileSize}\n handleShare={this.handleShare}\n handleClose={this.handleCloseFileUploadPreviewDialog}\n additionalFields={this.props.additionalFields}\n requiredFields={this.props.requiredFields}\n message={this.props.message}\n />\n )}\n </>\n );\n }\n}\n\nFileUploadIconButton.propTypes = {\n additionalFields: PropTypes.arrayOf(PropTypes.node),\n classes: PropTypes.shape({}).isRequired,\n tooltipProps: PropTypes.shape({}),\n disableRipple: PropTypes.bool,\n disabled: PropTypes.bool,\n fileUploadIconClassName: PropTypes.string,\n handleShare: PropTypes.func,\n inputId: PropTypes.string,\n message: PropTypes.string,\n onError: PropTypes.func,\n onFinish: PropTypes.func,\n openPreviewDialogOnUpload: PropTypes.bool,\n requiredFields: PropTypes.arrayOf(PropTypes.string),\n};\n\nFileUploadIconButton.defaultProps = {\n additionalFields: [],\n disableRipple: false,\n disabled: false,\n fileUploadIconClassName: undefined,\n handleShare: undefined,\n inputId: 'icon-button-file',\n message: undefined,\n onError: undefined,\n onFinish: undefined,\n openPreviewDialogOnUpload: true,\n requiredFields: [],\n tooltipProps: { title: 'Attach File' },\n};\n\nexport default FileUploadIconButton;\n"],"names":["FileUploadIconButton","_PureComponent","_inherits","_super","_createSuper","props","_this","_ref2","_classCallCheck","this","call","_defineProperty","_assertThisInitialized","_asyncToGenerator","_regeneratorRuntime","mark","_callee","s3DownloadLinkResponse","wrap","_context","prev","next","getS3DownloadLink","state","s3FileName","sent","setState","currentUpload","uploadingFileToS3","openFileUploadPreviewDialog","openPreviewDialogOnUpload","s3FileUrl","url","onFinish","s3FileSize","stop","fileUploadingError","onError","console","error","_callee2","file","callback","data","_context2","getS3SignedUrl","name","type","t0","message","abrupt","signed_url","file_name","size","signedUrl","_x","_x2","apply","arguments","event","target","files","clearUpload","uploader","S3Upload","fileElement","fileInput","current","getSignedUrl","preprocess","onProgress","onFinishS3Put","comment","fileName","fileSize","handleShare","createRef","_createClass","key","value","abortUpload","Icon","isNativeDetected","PhotoCameraIcon","AttachIcon","labelDataAttributes","_jsxs","_objectSpread","htmlFor","inputId","children","_jsx","jsx","ref","id","disabled","onChange","uploadFile","style","display","IconButton","concat","component","className","fileUploadIconClassName","disableRipple","tooltipProps","_Fragment","CircularProgress","renderUploadButton","PostPreviewDialog","open","fileUrl","handleClose","handleCloseFileUploadPreviewDialog","additionalFields","requiredFields","PureComponent","propTypes","PropTypes","arrayOf","node","classes","shape","isRequired","bool","string","func","defaultProps","undefined","title"],"mappings":"6kEAYA,IAKMA,EAAoB,SAAAC,GAAAC,U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KoG,qBAGNpG,KAAKc,MAAMM,6BACV8D,MAACmB,EAAiB,CAChBC,KAAMtG,KAAKc,MAAMM,4BACjBmF,QAASvG,KAAKc,MAAMQ,UACpB0C,SAAUhE,KAAKc,MAAMC,WACrBkD,SAAUjE,KAAKc,MAAMW,WACrByC,YAAalE,KAAKkE,YAClBsC,YAAaxG,KAAKyG,mCAClBC,iBAAkB1G,KAAKJ,MAAM8G,iBAC7BC,eAAgB3G,KAAKJ,MAAM+G,eAC3BnE,QAASxC,KAAKJ,MAAM4C,YAK9B,KAACjD,CAAA,CAzKuB,CAASqH,iBA4KnCrH,EAAqBsH,UAAY,CAC/BH,iBAAkBI,EAAS,QAACC,QAAQD,EAAAA,QAAUE,MAC9CC,QAASH,EAAS,QAACI,MAAM,CAAA,GAAIC,WAC7BlB,aAAca,EAAAA,QAAUI,MAAM,IAC9BlB,cAAec,EAAS,QAACM,KACzB9B,SAAUwB,EAAS,QAACM,KACpBrB,wBAAyBe,EAAS,QAACO,OACnCnD,YAAa4C,EAAS,QAACQ,KACvBtC,QAAS8B,EAAS,QAACO,OACnB7E,QAASsE,EAAS,QAACO,OACnBzF,QAASkF,EAAS,QAACQ,KACnB9F,SAAUsF,EAAS,QAACQ,KACpBjG,0BAA2ByF,EAAS,QAACM,KACrCT,eAAgBG,EAAS,QAACC,QAAQD,EAAAA,QAAUO,SAG9C9H,EAAqBgI,aAAe,CAClCb,iBAAkB,GAClBV,eAAe,EACfV,UAAU,EACVS,6BAAyByB,EACzBtD,iBAAasD,EACbxC,QAAS,mBACTxC,aAASgF,EACT5F,aAAS4F,EACThG,cAAUgG,EACVnG,2BAA2B,EAC3BsF,eAAgB,GAChBV,aAAc,CAAEwB,MAAO,qDA1MmB"}
1
+ {"version":3,"file":"FileUploadIconButton.js","sources":["../../../src/components/FileUploadIconButton.js"],"sourcesContent":["import { createRef, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport S3Upload from 'react-s3-uploader/s3upload';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport PhotoCameraIcon from '@material-ui/icons/PhotoCamera';\n\nimport PostPreviewDialog from '~components/PostPreviewDialog';\nimport AttachIcon from '~components/Icons/AttachIcon';\nimport IconButton from '~components/IconButton';\nimport { getS3SignedUrl, getS3DownloadLink } from '~/clients/jsonApi';\nimport { isNativeDetected } from '~/utils/mobileDetect';\n\nconst PAGE_NAME = 'fileUpload';\n\n// Data attr helps to identify the select file action; Is used to prevent the tooltip from closing\nexport const FILE_UPLOAD_BUTTON_DATA_ATTR = 'data-file-upload-button';\n\nclass FileUploadIconButton extends PureComponent {\n constructor(props) {\n super(props);\n\n this.state = {\n currentUpload: null,\n\n s3FileUrl: null,\n s3FileName: null,\n s3FileSize: null,\n\n uploadingFileToS3: false,\n\n openFileUploadPreviewDialog: false,\n };\n\n this.fileInput = createRef();\n }\n\n onFinish = async () => {\n const s3DownloadLinkResponse = await getS3DownloadLink(this.state.s3FileName);\n this.setState(\n {\n currentUpload: null,\n uploadingFileToS3: false,\n openFileUploadPreviewDialog: this.props.openPreviewDialogOnUpload,\n s3FileUrl: s3DownloadLinkResponse.url,\n },\n () => {\n if (this.props.onFinish)\n this.props.onFinish(this.state.s3FileUrl, this.state.s3FileName, this.state.s3FileSize);\n }\n );\n };\n\n onError = fileUploadingError => {\n if (this.props.onError) this.props.onError(fileUploadingError);\n console.error(fileUploadingError);\n };\n\n getSignedUrl = async (file, callback) => {\n let data;\n try {\n data = await getS3SignedUrl(file.name, file.type);\n } catch (e) {\n this.setState(\n {\n uploadingFileToS3: null,\n currentUpload: null,\n },\n () => {\n this.onError(e.message);\n }\n );\n return;\n }\n\n this.setState({\n s3FileUrl: data.signed_url,\n s3FileName: data.file_name,\n s3FileSize: file.size,\n });\n\n // NOTE: Add node for 'signedUrl' which is the expected name by uploader component\n callback({\n ...data,\n signedUrl: data.signed_url,\n });\n };\n\n preprocess = (file, next) => {\n next(file);\n };\n\n uploadFile = event => {\n if (!event.target.files[0]) {\n return;\n }\n\n this.clearUpload();\n const uploader = new S3Upload({\n fileElement: this.fileInput.current,\n getSignedUrl: this.getSignedUrl,\n preprocess: this.preprocess,\n onProgress: () => {}, // NOTE: Prevents logging to console\n onFinishS3Put: this.onFinish,\n onError: this.onError,\n });\n\n this.setState({\n uploadingFileToS3: true,\n currentUpload: {\n uploader,\n },\n });\n };\n\n clearUpload() {\n const { currentUpload } = this.state;\n if (currentUpload && currentUpload.uploader) {\n currentUpload.uploader.abortUpload();\n }\n }\n\n handleCloseFileUploadPreviewDialog = () => {\n this.setState({ openFileUploadPreviewDialog: false });\n };\n\n handleShare = (comment, fileName, fileSize) => {\n this.setState({ openFileUploadPreviewDialog: false }, () => {\n if (this.props.handleShare) {\n this.props.handleShare(comment, fileName, fileSize);\n }\n });\n };\n\n renderUploadButton() {\n const Icon = isNativeDetected ? PhotoCameraIcon : AttachIcon;\n const labelDataAttributes = { [FILE_UPLOAD_BUTTON_DATA_ATTR]: '' };\n\n return (\n <label htmlFor={this.props.inputId} {...labelDataAttributes}>\n <input\n ref={this.fileInput}\n id={this.props.inputId}\n type=\"file\"\n disabled={this.props.disabled}\n onChange={this.uploadFile}\n style={{ display: 'none' }}\n />\n <IconButton\n data-testid={`${PAGE_NAME}_attachFileButton`}\n aria-label=\"File Upload\"\n disabled={this.props.disabled}\n component={this.props.disabled ? 'button' : 'span'}\n className={this.props.fileUploadIconClassName}\n disableRipple={this.props.disableRipple}\n tooltipProps={this.props.tooltipProps}\n >\n <Icon />\n </IconButton>\n </label>\n );\n }\n\n render() {\n return (\n <>\n {this.state.uploadingFileToS3 ? (\n <CircularProgress data-testid=\"generic_uploadProgress\" size={18} />\n ) : (\n this.renderUploadButton()\n )}\n\n {this.state.openFileUploadPreviewDialog && (\n <PostPreviewDialog\n open={this.state.openFileUploadPreviewDialog}\n fileUrl={this.state.s3FileUrl}\n fileName={this.state.s3FileName}\n fileSize={this.state.s3FileSize}\n handleShare={this.handleShare}\n handleClose={this.handleCloseFileUploadPreviewDialog}\n additionalFields={this.props.additionalFields}\n requiredFields={this.props.requiredFields}\n message={this.props.message}\n />\n )}\n </>\n );\n }\n}\n\nFileUploadIconButton.propTypes = {\n additionalFields: PropTypes.arrayOf(PropTypes.node),\n classes: PropTypes.shape({}),\n tooltipProps: PropTypes.shape({}),\n disableRipple: PropTypes.bool,\n disabled: PropTypes.bool,\n fileUploadIconClassName: PropTypes.string,\n handleShare: PropTypes.func,\n inputId: PropTypes.string,\n message: PropTypes.string,\n onError: PropTypes.func,\n onFinish: PropTypes.func,\n openPreviewDialogOnUpload: PropTypes.bool,\n requiredFields: PropTypes.arrayOf(PropTypes.string),\n};\n\nFileUploadIconButton.defaultProps = {\n additionalFields: [],\n classes: {},\n disableRipple: false,\n disabled: false,\n fileUploadIconClassName: undefined,\n handleShare: undefined,\n inputId: 'icon-button-file',\n message: undefined,\n onError: undefined,\n onFinish: undefined,\n openPreviewDialogOnUpload: true,\n requiredFields: [],\n tooltipProps: { title: 'Attach File' },\n};\n\nexport default FileUploadIconButton;\n"],"names":["FileUploadIconButton","_PureComponent","_inherits","_super","_createSuper","props","_this","_ref2","_classCallCheck","this","call","_defineProperty","_assertThisInitialized","_asyncToGenerator","_regeneratorRuntime","mark","_callee","s3DownloadLinkResponse","wrap","_context","prev","next","getS3DownloadLink","state","s3FileName","sent","setState","currentUpload","uploadingFileToS3","openFileUploadPreviewDialog","openPreviewDialogOnUpload","s3FileUrl","url","onFinish","s3FileSize","stop","fileUploadingError","onError","console","error","_callee2","file","callback","data","_context2","getS3SignedUrl","name","type","t0","message","abrupt","signed_url","file_name","size","signedUrl","_x","_x2","apply","arguments","event","target","files","clearUpload","uploader","S3Upload","fileElement","fileInput","current","getSignedUrl","preprocess","onProgress","onFinishS3Put","comment","fileName","fileSize","handleShare","createRef","_createClass","key","value","abortUpload","Icon","isNativeDetected","PhotoCameraIcon","AttachIcon","labelDataAttributes","_jsxs","_objectSpread","htmlFor","inputId","children","_jsx","jsx","ref","id","disabled","onChange","uploadFile","style","display","IconButton","concat","component","className","fileUploadIconClassName","disableRipple","tooltipProps","_Fragment","CircularProgress","renderUploadButton","PostPreviewDialog","open","fileUrl","handleClose","handleCloseFileUploadPreviewDialog","additionalFields","requiredFields","PureComponent","propTypes","PropTypes","arrayOf","node","classes","shape","bool","string","func","defaultProps","undefined","title"],"mappings":"6kEAYA,IAKMA,EAAoB,SAAAC,GAAAC,UAAAF,EAAAC,GAAA,IAAAE,EAAAC,EAAAJ,GACxB,SAAAA,EAAYK,GAAO,IAAAC,EAuCJC,EAxBgB,OAfZC,UAAAC,KAAAT,GACjBM,EAAAH,EAAAO,KAAAD,KAAMJ,GAAOM,UAiBJC,EAAAA,QAAAN,GAAA,WAAAO,EAAAA,QAAAC,EAAA,QAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAA,OAAAH,UAAAI,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EAC4BC,oBAAkBhB,EAAKiB,MAAMC,YAAW,KAAA,EAAvEP,EAAsBE,EAAAM,KAC5BnB,EAAKoB,SACH,CACEC,cAAe,KACfC,mBAAmB,EACnBC,4BAA6BvB,EAAKD,MAAMyB,0BACxCC,UAAWd,EAAuBe,MAEpC,WACM1B,EAAKD,MAAM4B,UACb3B,EAAKD,MAAM4B,SAAS3B,EAAKiB,MAAMQ,UAAWzB,EAAKiB,MAAMC,WAAYlB,EAAKiB,MAAMW,WAChF,IACA,KAAA,EAAA,IAAA,MAAA,OAAAf,EAAAgB,OAAA,GAAAnB,EACH,MAAAL,EAAAA,QAESC,EAAAA,QAAAN,GAAA,WAAA,SAAA8B,GACJ9B,EAAKD,MAAMgC,SAAS/B,EAAKD,MAAMgC,QAAQD,GAC3CE,QAAQC,MAAMH,MACfzB,EAAAA,QAAAC,EAAA,QAAAN,GAAA,gBAEcC,EAAAM,EAAAA,QAAAC,EAAA,QAAAC,MAAA,SAAAyB,EAAOC,EAAMC,GAAQ,IAAAC,E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cAAU+F,EACVlG,2BAA2B,EAC3BsF,eAAgB,GAChBV,aAAc,CAAEuB,MAAO,qDA3MmB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("react"),o=require("lodash"),t=require("prop-types"),r=require("@material-ui/core/styles"),s=require("react-mentions"),i=require("@material-ui/core/colors/blue"),a=require("./utils/index.js"),u=require("./constants.js"),l=require("./style.css.js"),c=require("../Avatar/index.js");require("../../permissions/PermissionsContext.js");var d=require("../../permissions/constants/index.js");require("@babel/runtime/helpers/slicedToArray");var f=require("../../permissions/withPermissionsHOC.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../clients/jsonApi/index.js"),require("../../permissions/ProvidePermissions.js");var p=require("react/jsx-runtime");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=g(e),b=g(t);function h(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function y(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?h(Object(o),!0).forEach((function(n){m.default(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var j={backgroundColor:g(i).default[100]},v={color:"#00bcd4"},q={suggestions:{item:{"&focused":{backgroundColor:"rgba(0, 0, 0, 0.08)"}}}},w=y(y({},q),{},{input:{color:"#fff",caretColor:"#fff",zIndex:1},highlighter:{color:"#fff"}}),P=y(y({},q),{},{input:{color:"#000"}}),_=function(e){var t=e.onChange,r=e.singleLine,i=e.suggestionsPortalHost,d=e.value,f=e.inputRef,g=e.classes,m=e.style,b=e.withLightTheme,h=e.placeholder,q=e.onMount,_=e.onKeyDown,O=e.onKeyUp,C=e.onFocus,S=e.onBlur,x=e.autoFocus,R=e.disabled,A=e.companyId,F=e.currentUser,K=e.isCompanySelectVisible,M=e.mentionProps,U=e.allowSuggestionsAboveCursor;n.useEffect(q,[]);var D=n.useCallback(o.debounce((function(e,n){var o=K&&F&&F.company_id!==A?[F.company_id,A]:null;a.handleFetchUsers(e,n,o)}),400),[A]),I=Object.assign(b?P:w,m);return p.jsx(s.MentionsInput,{value:d,onChange:function(e,n){t(n)},singleLine:r,allowSpaceInQuery:!0,classNames:l,placeholder:h,suggestionsPortalHost:i,inputRef:f,style:I,onKeyDown:_,onKeyUp:O,autoFocus:x,onFocus:C,onBlur:S,disabled:R,allowSuggestionsAboveCursor:U,children:p.jsx(s.Mention,y({markup:u.USER_MARKUP,renderSuggestion:function(e){return function(e,n){return p.jsxs("div",{className:l.mention__suggestion,children:[p.jsx(c.AvatarComponent,{alt:e.display,displayName:e.display,className:n.avatar,imgSrc:e.photo}),p.jsxs("div",{className:l.mention__suggestion__info,children:[p.jsx("span",{"data-testid":"".concat("userMention","_name_").concat(e.display),className:l.mention__suggestion__info__name,children:e.display}),e.title&&p.jsx("span",{className:l.mention__suggestion__info__group,children:e.title})]})]})}(e,g)},trigger:"@",data:D,displayTransform:function(e,n){return"@".concat(n)},style:b?j:v,appendSpaceOnAdd:!0},M))})};_.propTypes={onChange:b.default.func,singleLine:b.default.bool,suggestionsPortalHost:b.default.shape({current:b.default.instanceOf(Element)}),value:b.default.string,inputRef:b.default.shape({}),classes:b.default.shape({avatar:b.default.string.isRequired}).isRequired,withLightTheme:b.default.bool,placeholder:b.default.string,style:b.default.shape({}),mentionProps:b.default.shape({}),onMount:b.default.func,onKeyDown:b.default.func,onKeyUp:b.default.func,onFocus:b.default.func,onBlur:b.default.func,autoFocus:b.default.bool,disabled:b.default.bool,currentUser:b.default.shape({company_id:b.default.number.isRequired}).isRequired,companyId:b.default.number,isCompanySelectVisible:b.default.bool.isRequired,allowSuggestionsAboveCursor:b.default.bool},_.defaultProps={onChange:function(){},singleLine:!1,suggestionsPortalHost:null,value:"",inputRef:null,withLightTheme:!1,placeholder:"Mention people using '@'",style:{suggestions:{list:{background:"#414141"},item:{color:"white",height:30,"&focused":{backgroundColor:"rgba(255, 255, 255, 0.08)"}}}},mentionProps:{},onMount:function(){},onKeyDown:function(){},onKeyUp:function(){},onFocus:function(){},onBlur:function(){},autoFocus:!0,disabled:!1,allowSuggestionsAboveCursor:!1,companyId:null};var O=f.withPermissionsHOC({isCompanySelectVisible:d.PERMISSIONS.companySelectorView})(r.withStyles({avatar:{height:45,width:45,border:"1.5px solid #fff"}})(_));module.exports=O;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("react"),o=require("lodash"),t=require("prop-types"),r=require("@material-ui/core/styles"),s=require("react-mentions"),i=require("@material-ui/core/colors/blue"),a=require("./utils/index.js"),u=require("./constants.js"),l=require("./style.css.js"),c=require("../Avatar/index.js");require("../../permissions/PermissionsContext.js");var d=require("../../permissions/constants/index.js");require("@babel/runtime/helpers/slicedToArray");var f=require("../../permissions/withPermissionsHOC.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("../../clients/jsonApi/index.js"),require("../../permissions/ProvidePermissions.js");var p=require("react/jsx-runtime");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=g(e),b=g(t);function h(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function y(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?h(Object(o),!0).forEach((function(n){m.default(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var j={backgroundColor:g(i).default[100]},v={color:"#00bcd4"},q={suggestions:{item:{"&focused":{backgroundColor:"rgba(0, 0, 0, 0.08)"}}}},w=y(y({},q),{},{input:{color:"#fff",caretColor:"#fff",zIndex:1},highlighter:{color:"#fff"}}),P=y(y({},q),{},{input:{color:"#000"}}),_=function(e){var t=e.onChange,r=e.singleLine,i=e.suggestionsPortalHost,d=e.value,f=e.inputRef,g=e.classes,m=e.style,b=e.withLightTheme,h=e.placeholder,q=e.onMount,_=e.onKeyDown,O=e.onKeyUp,C=e.onFocus,S=e.onBlur,x=e.autoFocus,R=e.disabled,A=e.companyId,U=e.currentUser,F=e.isCompanySelectVisible,K=e.mentionProps,M=e.allowSuggestionsAboveCursor;n.useEffect(q,[]);var D=n.useCallback(o.debounce((function(e,n){var o=F&&U&&U.company_id!==A?[U.company_id,A]:null;a.handleFetchUsers(e,n,o)}),400),[A]),I=Object.assign(b?P:w,m);return p.jsx(s.MentionsInput,{value:d,onChange:function(e,n){t(n)},singleLine:r,allowSpaceInQuery:!0,classNames:l,placeholder:h,suggestionsPortalHost:i,inputRef:f,style:I,onKeyDown:_,onKeyUp:O,autoFocus:x,onFocus:C,onBlur:S,disabled:R,allowSuggestionsAboveCursor:M,children:p.jsx(s.Mention,y({markup:u.USER_MARKUP,renderSuggestion:function(e){return function(e,n){return p.jsxs("div",{className:l.mention__suggestion,children:[p.jsx(c.AvatarComponent,{alt:e.display,displayName:e.display,className:n.avatar,imgSrc:e.photo}),p.jsxs("div",{className:l.mention__suggestion__info,children:[p.jsx("span",{"data-testid":"".concat("userMention","_name_").concat(e.display),className:l.mention__suggestion__info__name,children:e.display}),e.title&&p.jsx("span",{className:l.mention__suggestion__info__group,children:e.title})]})]})}(e,g)},trigger:"@",data:D,displayTransform:function(e,n){return"@".concat(n)},style:b?j:v,appendSpaceOnAdd:!0},K))})};_.propTypes={onChange:b.default.func,singleLine:b.default.bool,suggestionsPortalHost:b.default.shape({current:b.default.instanceOf(Element)}),value:b.default.string,inputRef:b.default.shape({}),classes:b.default.shape({avatar:b.default.string.isRequired}).isRequired,withLightTheme:b.default.bool,placeholder:b.default.string,style:b.default.shape({}),mentionProps:b.default.shape({}),onMount:b.default.func,onKeyDown:b.default.func,onKeyUp:b.default.func,onFocus:b.default.func,onBlur:b.default.func,autoFocus:b.default.bool,disabled:b.default.bool,currentUser:b.default.shape({company_id:b.default.number.isRequired}),companyId:b.default.number,isCompanySelectVisible:b.default.bool.isRequired,allowSuggestionsAboveCursor:b.default.bool},_.defaultProps={onChange:function(){},singleLine:!1,suggestionsPortalHost:null,value:"",inputRef:null,withLightTheme:!1,placeholder:"Mention people using '@'",style:{suggestions:{list:{background:"#414141"},item:{color:"white",height:30,"&focused":{backgroundColor:"rgba(255, 255, 255, 0.08)"}}}},mentionProps:{},onMount:function(){},onKeyDown:function(){},onKeyUp:function(){},onFocus:function(){},onBlur:function(){},autoFocus:!0,disabled:!1,allowSuggestionsAboveCursor:!1,companyId:null,currentUser:null};var O=f.withPermissionsHOC({isCompanySelectVisible:d.PERMISSIONS.companySelectorView})(r.withStyles({avatar:{height:45,width:45,border:"1.5px solid #fff"}})(_));module.exports=O;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/UserMention/index.js"],"sourcesContent":["import { useCallback, useEffect } from 'react';\nimport { debounce } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { MentionsInput, Mention } from 'react-mentions';\nimport blue from '@material-ui/core/colors/blue';\n\nimport { handleFetchUsers } from './utils';\nimport { USER_MARKUP } from './constants';\n\nimport styles from './style.css';\n\nimport Avatar from '~components/Avatar';\nimport { withPermissionsHOC, PERMISSIONS } from '~/permissions';\n\nconst PAGE_NAME = 'userMention';\n\nconst muiStyles = {\n avatar: {\n height: 45,\n width: 45,\n border: '1.5px solid #fff',\n },\n};\n\nconst mentionLightStyle = {\n backgroundColor: blue[100],\n};\nconst mentionDarkStyle = {\n color: '#00bcd4',\n};\n\n// NOTE: IMPORTANT! 'input', 'mention' and 'highliter' should always have same font/latter/height/line etc values\nconst inputStyles = {\n suggestions: {\n item: {\n '&focused': {\n backgroundColor: 'rgba(0, 0, 0, 0.08)',\n },\n },\n },\n};\n\nconst darkThemeInputStyles = {\n ...inputStyles,\n input: {\n color: '#fff',\n caretColor: '#fff',\n zIndex: 1,\n },\n highlighter: {\n color: '#fff',\n },\n};\n\nconst lightThemeInputStyles = {\n ...inputStyles,\n input: { color: '#000' },\n};\n\nconst renderSuggestion = (entry, classes) => (\n <div className={styles.mention__suggestion}>\n <Avatar\n alt={entry.display}\n displayName={entry.display}\n className={classes.avatar}\n imgSrc={entry.photo}\n />\n <div className={styles.mention__suggestion__info}>\n <span\n data-testid={`${PAGE_NAME}_name_${entry.display}`}\n className={styles.mention__suggestion__info__name}\n >\n {entry.display}\n </span>\n {entry.title && (\n <span className={styles.mention__suggestion__info__group}>{entry.title}</span>\n )}\n </div>\n </div>\n);\n\nconst UserMention = ({\n onChange,\n singleLine,\n suggestionsPortalHost,\n value,\n inputRef,\n classes,\n style,\n withLightTheme,\n placeholder,\n onMount,\n onKeyDown,\n onKeyUp,\n onFocus,\n onBlur,\n autoFocus,\n disabled,\n companyId,\n currentUser,\n isCompanySelectVisible,\n mentionProps,\n allowSuggestionsAboveCursor,\n}) => {\n useEffect(onMount, []);\n\n const fetchUsers = (search, callback) => {\n const companyIds =\n isCompanySelectVisible && currentUser && currentUser.company_id !== companyId\n ? [currentUser.company_id, companyId]\n : null;\n\n handleFetchUsers(search, callback, companyIds);\n };\n\n const debouncedUsersFetch = useCallback(debounce(fetchUsers, 400), [companyId]);\n\n const onInputChange = (event, newValue) => {\n onChange(newValue);\n };\n\n const themedStyle = Object.assign(\n withLightTheme ? lightThemeInputStyles : darkThemeInputStyles,\n style\n );\n\n return (\n <MentionsInput\n value={value}\n onChange={onInputChange}\n singleLine={singleLine}\n allowSpaceInQuery\n classNames={styles}\n placeholder={placeholder}\n suggestionsPortalHost={suggestionsPortalHost}\n inputRef={inputRef}\n style={themedStyle}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n autoFocus={autoFocus}\n onFocus={onFocus}\n onBlur={onBlur}\n disabled={disabled}\n allowSuggestionsAboveCursor={allowSuggestionsAboveCursor}\n >\n <Mention\n markup={USER_MARKUP}\n renderSuggestion={entry => renderSuggestion(entry, classes)}\n trigger=\"@\"\n data={debouncedUsersFetch}\n displayTransform={(id, display) => `@${display}`}\n style={withLightTheme ? mentionLightStyle : mentionDarkStyle}\n appendSpaceOnAdd\n {...mentionProps}\n />\n </MentionsInput>\n );\n};\n\nUserMention.propTypes = {\n onChange: PropTypes.func,\n singleLine: PropTypes.bool,\n suggestionsPortalHost: PropTypes.shape({\n current: PropTypes.instanceOf(Element),\n }),\n value: PropTypes.string,\n inputRef: PropTypes.shape({}),\n classes: PropTypes.shape({\n avatar: PropTypes.string.isRequired,\n }).isRequired,\n withLightTheme: PropTypes.bool,\n placeholder: PropTypes.string,\n style: PropTypes.shape({}),\n mentionProps: PropTypes.shape({}),\n onMount: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyUp: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n autoFocus: PropTypes.bool,\n disabled: PropTypes.bool,\n\n currentUser: PropTypes.shape({\n company_id: PropTypes.number.isRequired,\n }).isRequired,\n companyId: PropTypes.number,\n isCompanySelectVisible: PropTypes.bool.isRequired,\n allowSuggestionsAboveCursor: PropTypes.bool,\n};\n\nUserMention.defaultProps = {\n onChange: () => undefined,\n singleLine: false,\n suggestionsPortalHost: null,\n value: '',\n inputRef: null,\n withLightTheme: false,\n placeholder: \"Mention people using '@'\",\n style: {\n suggestions: {\n list: {\n background: '#414141',\n },\n item: {\n color: 'white',\n height: 30,\n '&focused': {\n backgroundColor: 'rgba(255, 255, 255, 0.08)',\n },\n },\n },\n },\n mentionProps: {},\n onMount: () => undefined,\n onKeyDown: () => undefined,\n onKeyUp: () => undefined,\n onFocus: () => undefined,\n onBlur: () => undefined,\n autoFocus: true,\n disabled: false,\n allowSuggestionsAboveCursor: false,\n companyId: null,\n};\n\nexport default withPermissionsHOC({ isCompanySelectVisible: PERMISSIONS.companySelectorView })(\n withStyles(muiStyles)(UserMention)\n);\n"],"names":["mentionLightStyle","backgroundColor","mentionDarkStyle","color","inputStyles","suggestions","item","darkThemeInputStyles","input","caretColor","zIndex","highlighter","lightThemeInputStyles","UserMention","_ref","onChange","singleLine","suggestionsPortalHost","value","inputRef","classes","style","withLightTheme","placeholder","onMount","onKeyDown","onKeyUp","onFocus","onBlur","autoFocus","disabled","companyId","currentUser","isCompanySelectVisible","mentionProps","allowSuggestionsAboveCursor","useEffect","debouncedUsersFetch","useCallback","debounce","search","callback","companyIds","company_id","handleFetchUsers","themedStyle","Object","assign","_jsx","MentionsInput","event","newValue","allowSpaceInQuery","classNames","styles","children","Mention","_objectSpread","markup","USER_MARKUP","renderSuggestion","entry","_jsxs","className","mention__suggestion","Avatar","alt","display","displayName","avatar","imgSrc","photo","jsxs","mention__suggestion__info","jsx","concat","mention__suggestion__info__name","title","mention__suggestion__info__group","trigger","data","displayTransform","id","appendSpaceOnAdd","propTypes","PropTypes","func","bool","shape","current","instanceOf","Element","string","isRequired","number","defaultProps","list","background","height","UserMention$1","withPermissionsHOC","PERMISSIONS","companySelectorView","withStyles","width","border"],"mappings":"k7CAeA,IAUMA,EAAoB,CACxBC,qBAAqB,QAAC,MAElBC,EAAmB,CACvBC,MAAO,WAIHC,EAAc,CAClBC,YAAa,CACXC,KAAM,CACJ,WAAY,CACVL,gBAAiB,0BAMnBM,SACDH,GAAW,CAAA,EAAA,CACdI,MAAO,CACLL,MAAO,OACPM,WAAY,OACZC,OAAQ,GAEVC,YAAa,CACXR,MAAO,UAILS,SACDR,GAAW,CAAA,EAAA,CACdI,MAAO,CAAEL,MAAO,UAyBZU,EAAc,SAsBdC,GAAA,IArBJC,IAAAA,SACAC,IAAAA,WACAC,IAAAA,sBACAC,IAAAA,MACAC,IA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AY,EACZC,sBAAuB,KACvBC,MAAO,GACPC,SAAU,KACVG,gBAAgB,EAChBC,YAAa,2BACbF,MAAO,CACLhB,YAAa,CACX2F,KAAM,CACJC,WAAY,WAEd3F,KAAM,CACJH,MAAO,QACP+F,OAAQ,GACR,WAAY,CACVjG,gBAAiB,gCAKzBiC,aAAc,CAAE,EAChBV,QAAS,WAAe,EACxBC,UAAW,WAAe,EAC1BC,QAAS,WAAe,EACxBC,QAAS,WAAe,EACxBC,OAAQ,WAAe,EACvBC,WAAW,EACXC,UAAU,EACVK,6BAA6B,EAC7BJ,UAAW,MAGb,IAAAoE,EAAeC,qBAAmB,CAAEnE,uBAAwBoE,EAAWA,YAACC,qBAAzDF,CACbG,EAAUA,WAjNM,CAChBlC,OAAQ,CACN6B,OAAQ,GACRM,MAAO,GACPC,OAAQ,qBA6MVF,CAAsB1F"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/UserMention/index.js"],"sourcesContent":["import { useCallback, useEffect } from 'react';\nimport { debounce } from 'lodash';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { MentionsInput, Mention } from 'react-mentions';\nimport blue from '@material-ui/core/colors/blue';\n\nimport { handleFetchUsers } from './utils';\nimport { USER_MARKUP } from './constants';\n\nimport styles from './style.css';\n\nimport Avatar from '~components/Avatar';\nimport { withPermissionsHOC, PERMISSIONS } from '~/permissions';\n\nconst PAGE_NAME = 'userMention';\n\nconst muiStyles = {\n avatar: {\n height: 45,\n width: 45,\n border: '1.5px solid #fff',\n },\n};\n\nconst mentionLightStyle = {\n backgroundColor: blue[100],\n};\nconst mentionDarkStyle = {\n color: '#00bcd4',\n};\n\n// NOTE: IMPORTANT! 'input', 'mention' and 'highliter' should always have same font/latter/height/line etc values\nconst inputStyles = {\n suggestions: {\n item: {\n '&focused': {\n backgroundColor: 'rgba(0, 0, 0, 0.08)',\n },\n },\n },\n};\n\nconst darkThemeInputStyles = {\n ...inputStyles,\n input: {\n color: '#fff',\n caretColor: '#fff',\n zIndex: 1,\n },\n highlighter: {\n color: '#fff',\n },\n};\n\nconst lightThemeInputStyles = {\n ...inputStyles,\n input: { color: '#000' },\n};\n\nconst renderSuggestion = (entry, classes) => (\n <div className={styles.mention__suggestion}>\n <Avatar\n alt={entry.display}\n displayName={entry.display}\n className={classes.avatar}\n imgSrc={entry.photo}\n />\n <div className={styles.mention__suggestion__info}>\n <span\n data-testid={`${PAGE_NAME}_name_${entry.display}`}\n className={styles.mention__suggestion__info__name}\n >\n {entry.display}\n </span>\n {entry.title && (\n <span className={styles.mention__suggestion__info__group}>{entry.title}</span>\n )}\n </div>\n </div>\n);\n\nconst UserMention = ({\n onChange,\n singleLine,\n suggestionsPortalHost,\n value,\n inputRef,\n classes,\n style,\n withLightTheme,\n placeholder,\n onMount,\n onKeyDown,\n onKeyUp,\n onFocus,\n onBlur,\n autoFocus,\n disabled,\n companyId,\n currentUser,\n isCompanySelectVisible,\n mentionProps,\n allowSuggestionsAboveCursor,\n}) => {\n useEffect(onMount, []);\n\n const fetchUsers = (search, callback) => {\n const companyIds =\n isCompanySelectVisible && currentUser && currentUser.company_id !== companyId\n ? [currentUser.company_id, companyId]\n : null;\n\n handleFetchUsers(search, callback, companyIds);\n };\n\n const debouncedUsersFetch = useCallback(debounce(fetchUsers, 400), [companyId]);\n\n const onInputChange = (event, newValue) => {\n onChange(newValue);\n };\n\n const themedStyle = Object.assign(\n withLightTheme ? lightThemeInputStyles : darkThemeInputStyles,\n style\n );\n\n return (\n <MentionsInput\n value={value}\n onChange={onInputChange}\n singleLine={singleLine}\n allowSpaceInQuery\n classNames={styles}\n placeholder={placeholder}\n suggestionsPortalHost={suggestionsPortalHost}\n inputRef={inputRef}\n style={themedStyle}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n autoFocus={autoFocus}\n onFocus={onFocus}\n onBlur={onBlur}\n disabled={disabled}\n allowSuggestionsAboveCursor={allowSuggestionsAboveCursor}\n >\n <Mention\n markup={USER_MARKUP}\n renderSuggestion={entry => renderSuggestion(entry, classes)}\n trigger=\"@\"\n data={debouncedUsersFetch}\n displayTransform={(id, display) => `@${display}`}\n style={withLightTheme ? mentionLightStyle : mentionDarkStyle}\n appendSpaceOnAdd\n {...mentionProps}\n />\n </MentionsInput>\n );\n};\n\nUserMention.propTypes = {\n onChange: PropTypes.func,\n singleLine: PropTypes.bool,\n suggestionsPortalHost: PropTypes.shape({\n current: PropTypes.instanceOf(Element),\n }),\n value: PropTypes.string,\n inputRef: PropTypes.shape({}),\n classes: PropTypes.shape({\n avatar: PropTypes.string.isRequired,\n }).isRequired,\n withLightTheme: PropTypes.bool,\n placeholder: PropTypes.string,\n style: PropTypes.shape({}),\n mentionProps: PropTypes.shape({}),\n onMount: PropTypes.func,\n onKeyDown: PropTypes.func,\n onKeyUp: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n autoFocus: PropTypes.bool,\n disabled: PropTypes.bool,\n\n currentUser: PropTypes.shape({\n company_id: PropTypes.number.isRequired,\n }),\n companyId: PropTypes.number,\n isCompanySelectVisible: PropTypes.bool.isRequired,\n allowSuggestionsAboveCursor: PropTypes.bool,\n};\n\nUserMention.defaultProps = {\n onChange: () => undefined,\n singleLine: false,\n suggestionsPortalHost: null,\n value: '',\n inputRef: null,\n withLightTheme: false,\n placeholder: \"Mention people using '@'\",\n style: {\n suggestions: {\n list: {\n background: '#414141',\n },\n item: {\n color: 'white',\n height: 30,\n '&focused': {\n backgroundColor: 'rgba(255, 255, 255, 0.08)',\n },\n },\n },\n },\n mentionProps: {},\n onMount: () => undefined,\n onKeyDown: () => undefined,\n onKeyUp: () => undefined,\n onFocus: () => undefined,\n onBlur: () => undefined,\n autoFocus: true,\n disabled: false,\n allowSuggestionsAboveCursor: false,\n companyId: null,\n currentUser: null,\n};\n\nexport default withPermissionsHOC({ isCompanySelectVisible: PERMISSIONS.companySelectorView })(\n withStyles(muiStyles)(UserMention)\n);\n"],"names":["mentionLightStyle","backgroundColor","mentionDarkStyle","color","inputStyles","suggestions","item","darkThemeInputStyles","input","caretColor","zIndex","highlighter","lightThemeInputStyles","UserMention","_ref","onChange","singleLine","suggestionsPortalHost","value","inputRef","classes","style","withLightTheme","placeholder","onMount","onKeyDown","onKeyUp","onFocus","onBlur","autoFocus","disabled","companyId","currentUser","isCompanySelectVisible","mentionProps","allowSuggestionsAboveCursor","useEffect","debouncedUsersFetch","useCallback","debounce","search","callback","companyIds","company_id","handleFetchUsers","themedStyle","Object","assign","_jsx","MentionsInput","event","newValue","allowSpaceInQuery","classNames","styles","children","Mention","_objectSpread","markup","USER_MARKUP","renderSuggestion","entry","_jsxs","className","mention__suggestion","Avatar","alt","display","displayName","avatar","imgSrc","photo","jsxs","mention__suggestion__info","jsx","concat","mention__suggestion__info__name","title","mention__suggestion__info__group","trigger","data","displayTransform","id","appendSpaceOnAdd","propTypes","PropTypes","func","bool","shape","current","instanceOf","Element","string","isRequired","number","defaultProps","list","background","height","UserMention$1","withPermissionsHOC","PERMISSIONS","companySelectorView","withStyles","width","border"],"mappings":"k7CAeA,IAUMA,EAAoB,CACxBC,qBAAqB,QAAC,MAElBC,EAAmB,CACvBC,MAAO,WAIHC,EAAc,CAClBC,YAAa,CACXC,KAAM,CACJ,WAAY,CACVL,gBAAiB,0BAMnBM,SACDH,GAAW,CAAA,EAAA,CACdI,MAAO,CACLL,MAAO,OACPM,WAAY,OACZC,OAAQ,GAEVC,YAAa,CACXR,MAAO,UAILS,SACDR,GAAW,CAAA,EAAA,CACdI,MAAO,CAAEL,MAAO,UAyBZU,EAAc,SAsBdC,GAAA,IArBJC,IAAAA,SACAC,IAAAA,WACAC,IAAAA,sBACAC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,MACAC,IAAAA,eACAC,IAAAA,YACAC,IAAAA,QACAC,IAAAA,UACAC,IAAAA,QACAC,IAAAA,QACAC,IAAAA,OACAC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,UACAC,IAAAA,YACAC,I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gCAKzBiC,aAAc,CAAE,EAChBV,QAAS,WAAe,EACxBC,UAAW,WAAe,EAC1BC,QAAS,WAAe,EACxBC,QAAS,WAAe,EACxBC,OAAQ,WAAe,EACvBC,WAAW,EACXC,UAAU,EACVK,6BAA6B,EAC7BJ,UAAW,KACXC,YAAa,MAGf,IAAAmE,EAAeC,qBAAmB,CAAEnE,uBAAwBoE,EAAWA,YAACC,qBAAzDF,CACbG,EAAUA,WAlNM,CAChBlC,OAAQ,CACN6B,OAAQ,GACRM,MAAO,GACPC,OAAQ,qBA8MVF,CAAsB1F"}
@@ -1,2 +1,2 @@
1
- "use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')('.Autocomplete_root__4SidE{width:100%}.Autocomplete_root__4SidE .MuiAutocomplete-endAdornment{display:contents}.Autocomplete_root__4SidE .MuiAutocomplete-clearIndicator,.Autocomplete_root__4SidE .MuiAutocomplete-popupIndicator{margin:0;padding:0;visibility:visible}.Autocomplete_root__4SidE .MuiAutocomplete-clearIndicator .MuiTouchRipple-root,.Autocomplete_root__4SidE .MuiAutocomplete-popupIndicator .MuiTouchRipple-root{display:none}.Autocomplete_root__4SidE .MuiAutocomplete-clearIndicator,.Autocomplete_root__4SidE .MuiAutocomplete-popupIndicator{background-color:transparent!important;transition:transform .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1)}.Autocomplete_root__4SidE .MuiAutocomplete-clearIndicator svg,.Autocomplete_root__4SidE .MuiAutocomplete-popupIndicator svg{display:block}.Autocomplete_root__4SidE .MuiInputAdornment-positionStart{max-width:70%}.Autocomplete_paper__Vq6DC{--corvaui-background:var(--palette-background-b-9);background-color:var(--palette-background-b-9)!important;box-shadow:0 8px 24px 0 rgba(0,0,0,.24)!important;display:flex;flex-flow:column wrap;margin:8px 0;max-height:40vh;overflow:hidden;padding:0;position:relative}.Autocomplete_paper__Vq6DC:before{background:linear-gradient(180deg,rgb(from var(--corvaui-background) r g b/1) 0,rgb(from var(--corvaui-background) r g b/0) 100%);content:"";height:8px;inset:0 10px auto 0;position:absolute;z-index:1}.Autocomplete_paper__Vq6DC:after{background:linear-gradient(0deg,rgb(from var(--corvaui-background) r g b/1) 0,rgb(from var(--corvaui-background) r g b/0) 100%);content:"";height:8px;inset:auto 10px 0 0;position:absolute;z-index:1}.Autocomplete_paper__Vq6DC:has(.Autocomplete_sticky__0-eTa){padding-top:8px}.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox{flex:0 1 auto;max-height:unset;padding:8px 0}.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox,.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox li{width:100%}.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox:has(.Autocomplete_sticky__0-eTa){padding-top:0}.Autocomplete_paper__Vq6DC li.MuiAutocomplete-option{background:var(--corvaui-background)!important;display:block;padding:0 16px!important;z-index:1}.Autocomplete_paper__Vq6DC li.MuiAutocomplete-option[data-focus=true] .Autocomplete_menuItem__c2Qka{background-color:rgb(from var(--palette-primary-text-1) r g b/.08)}.Autocomplete_paper__Vq6DC li.MuiAutocomplete-option:has(.Autocomplete_sticky__0-eTa){left:0;position:sticky;top:0}.Autocomplete_paper__Vq6DC .Autocomplete_sticky__0-eTa{border-bottom:1px solid rgb(from var(--palette-primary-text-1) r g b/.25);overflow:visible}.Autocomplete_paper__Vq6DC .Autocomplete_listboxScrolled__n34NV .Autocomplete_sticky__0-eTa:after{background:linear-gradient(0deg,rgb(from var(--corvaui-background) r g b/0) 0,rgb(from var(--corvaui-background) r g b/1) 100%);content:"";height:8px;inset:100% 0 auto 0;margin-top:1px;position:absolute}.Autocomplete_paper__Vq6DC .MuiAutocomplete-noOptions{align-items:center;color:var(--palette-primary-text-6);display:flex;font-size:12px;font-style:italic;justify-content:center;min-height:31px;padding:0}.Autocomplete_paper__Vq6DC .MuiAutocomplete-groupLabel{background:var(--corvaui-background)!important;color:var(--palette-primary-text-7);font-size:12px;font-weight:400;line-height:16px}.Autocomplete_paper__Vq6DC .MuiAutocomplete-groupLabel:not(:empty){padding-top:8px}.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox li+li .MuiAutocomplete-groupLabel:not(:empty){margin-top:8px}.Autocomplete_checkboxSmall__TjdiN{margin-right:-8px}.Autocomplete_checkboxMedium__LUbff{margin-right:-12px}.Autocomplete_selectedValue__iGHNh{overflow:hidden}.Autocomplete_selectedValueChip__5QOEK{flex:0 0 auto;margin:-3px 0;max-width:calc(33% - 8px)}.Autocomplete_inputContainer__RKk5j{flex-wrap:wrap;position:relative;row-gap:14px}.Autocomplete_inputContainer__RKk5j .Autocomplete_selectedValue__iGHNh{max-width:50%}.Autocomplete_prefix__WzSbL{display:contents}.Autocomplete_input__FHTVO{flex:1 1;max-width:100%;min-width:150px}.Autocomplete_withArrow__pNaNX .Autocomplete_input__FHTVO,.Autocomplete_withClear__RGtWV .Autocomplete_input__FHTVO{padding-right:24px}.Autocomplete_withArrow__pNaNX.Autocomplete_withClear__RGtWV .Autocomplete_input__FHTVO{padding-right:48px}.Autocomplete_suffix__y3P7i{bottom:calc(var(--corvaui-textinput-inputheight)/2 + 6px);height:var(--corvaui-textinput-inputheight);position:absolute;right:7px;transform:translateY(50%)}.Autocomplete_readOnlyInput__mD5xQ{cursor:inherit}'),module.exports={spacing:"8",root:"Autocomplete_root__4SidE",paper:"Autocomplete_paper__Vq6DC",sticky:"Autocomplete_sticky__0-eTa",menuItem:"Autocomplete_menuItem__c2Qka",listboxScrolled:"Autocomplete_listboxScrolled__n34NV",checkboxSmall:"Autocomplete_checkboxSmall__TjdiN",checkboxMedium:"Autocomplete_checkboxMedium__LUbff",selectedValue:"Autocomplete_selectedValue__iGHNh",selectedValueChip:"Autocomplete_selectedValueChip__5QOEK",inputContainer:"Autocomplete_inputContainer__RKk5j",prefix:"Autocomplete_prefix__WzSbL",input:"Autocomplete_input__FHTVO",withArrow:"Autocomplete_withArrow__pNaNX",withClear:"Autocomplete_withClear__RGtWV",suffix:"Autocomplete_suffix__y3P7i",readOnlyInput:"Autocomplete_readOnlyInput__mD5xQ"};
1
+ "use strict";require('./../../ext-esm/style-inject/dist/style-inject.es.js')('.Autocomplete_root__4SidE{width:100%}.Autocomplete_root__4SidE .MuiAutocomplete-endAdornment{display:contents}.Autocomplete_root__4SidE .MuiAutocomplete-clearIndicator,.Autocomplete_root__4SidE .MuiAutocomplete-popupIndicator{margin:0;padding:0;visibility:visible}.Autocomplete_root__4SidE .MuiAutocomplete-clearIndicator .MuiTouchRipple-root,.Autocomplete_root__4SidE .MuiAutocomplete-popupIndicator .MuiTouchRipple-root{display:none}.Autocomplete_root__4SidE .MuiAutocomplete-clearIndicator,.Autocomplete_root__4SidE .MuiAutocomplete-popupIndicator{background-color:transparent!important;transition:transform .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1)}.Autocomplete_root__4SidE .MuiAutocomplete-clearIndicator svg,.Autocomplete_root__4SidE .MuiAutocomplete-popupIndicator svg{display:block}.Autocomplete_root__4SidE .MuiInputAdornment-positionStart{max-width:70%}.Autocomplete_paper__Vq6DC{--corvaui-background:var(--palette-background-b-9);background-color:var(--palette-background-b-9)!important;box-shadow:0 8px 24px 0 rgba(0,0,0,.24)!important;display:flex;flex-flow:column wrap;margin:8px 0;max-height:40vh;overflow:hidden;padding:0;position:relative}.Autocomplete_paper__Vq6DC:before{background:linear-gradient(180deg,rgb(from var(--corvaui-background) r g b/1) 0,rgb(from var(--corvaui-background) r g b/0) 100%);content:"";height:8px;inset:0 10px auto 0;position:absolute;z-index:1}.Autocomplete_paper__Vq6DC:after{background:linear-gradient(0deg,rgb(from var(--corvaui-background) r g b/1) 0,rgb(from var(--corvaui-background) r g b/0) 100%);content:"";height:8px;inset:auto 10px 0 0;position:absolute;z-index:1}.Autocomplete_paper__Vq6DC:has(.Autocomplete_sticky__0-eTa){padding-top:8px}.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox{flex:0 1 auto;max-height:unset;padding:8px 0}.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox,.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox li{width:100%}.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox:has(.Autocomplete_sticky__0-eTa){padding-top:0}.Autocomplete_paper__Vq6DC li.MuiAutocomplete-option{background:var(--corvaui-background)!important;display:block;padding:0 16px!important;z-index:1}.Autocomplete_paper__Vq6DC li.MuiAutocomplete-option[data-focus=true] .Autocomplete_menuItem__c2Qka{background-color:rgb(from var(--palette-primary-text-1) r g b/.08)}.Autocomplete_paper__Vq6DC li.MuiAutocomplete-option:has(.Autocomplete_sticky__0-eTa){left:0;position:sticky;top:0}.Autocomplete_paper__Vq6DC .Autocomplete_sticky__0-eTa{border-bottom:1px solid rgb(from var(--palette-primary-text-1) r g b/.25);overflow:visible}.Autocomplete_paper__Vq6DC .Autocomplete_listboxScrolled__n34NV .Autocomplete_sticky__0-eTa:after{background:linear-gradient(0deg,rgb(from var(--corvaui-background) r g b/0) 0,rgb(from var(--corvaui-background) r g b/1) 100%);content:"";height:8px;inset:100% 0 auto 0;margin-top:1px;position:absolute}.Autocomplete_paper__Vq6DC .MuiAutocomplete-noOptions{align-items:center;color:var(--palette-primary-text-6);display:flex;font-size:12px;font-style:italic;justify-content:center;min-height:31px;padding:0}.Autocomplete_paper__Vq6DC .MuiAutocomplete-groupLabel{background:var(--corvaui-background)!important;color:var(--palette-primary-text-7);font-size:12px;font-weight:400;line-height:16px}.Autocomplete_paper__Vq6DC .MuiAutocomplete-groupLabel:not(:empty){padding-top:8px}.Autocomplete_paper__Vq6DC .MuiAutocomplete-listbox li+li .MuiAutocomplete-groupLabel:not(:empty){margin-top:8px}.Autocomplete_checkboxSmall__TjdiN{margin-right:-8px}.Autocomplete_checkboxMedium__LUbff{margin-right:-12px}.Autocomplete_selectedValue__iGHNh{max-width:100%;overflow:hidden}.Autocomplete_selectedValueChip__5QOEK{flex:0 0 auto;margin:-3px 0;max-width:calc(33% - 8px)}.Autocomplete_inputContainer__RKk5j{flex-wrap:wrap;position:relative;row-gap:14px}.Autocomplete_inputContainer__RKk5j .Autocomplete_selectedValue__iGHNh{font-size:inherit;line-height:inherit;max-width:50%}.Autocomplete_prefix__WzSbL{display:contents}.Autocomplete_input__FHTVO{flex:1 1;max-width:100%;min-width:150px}.Autocomplete_withArrow__pNaNX .Autocomplete_input__FHTVO,.Autocomplete_withClear__RGtWV .Autocomplete_input__FHTVO{padding-right:24px}.Autocomplete_withArrow__pNaNX.Autocomplete_withClear__RGtWV .Autocomplete_input__FHTVO{padding-right:48px}.Autocomplete_suffix__y3P7i{bottom:calc(var(--corvaui-textinput-inputheight)/2 + 6px);height:var(--corvaui-textinput-inputheight);position:absolute;right:7px;transform:translateY(50%)}.Autocomplete_readOnlyInput__mD5xQ{cursor:inherit}'),module.exports={spacing:"8",root:"Autocomplete_root__4SidE",paper:"Autocomplete_paper__Vq6DC",sticky:"Autocomplete_sticky__0-eTa",menuItem:"Autocomplete_menuItem__c2Qka",listboxScrolled:"Autocomplete_listboxScrolled__n34NV",checkboxSmall:"Autocomplete_checkboxSmall__TjdiN",checkboxMedium:"Autocomplete_checkboxMedium__LUbff",selectedValue:"Autocomplete_selectedValue__iGHNh",selectedValueChip:"Autocomplete_selectedValueChip__5QOEK",inputContainer:"Autocomplete_inputContainer__RKk5j",prefix:"Autocomplete_prefix__WzSbL",input:"Autocomplete_input__FHTVO",withArrow:"Autocomplete_withArrow__pNaNX",withClear:"Autocomplete_withClear__RGtWV",suffix:"Autocomplete_suffix__y3P7i",readOnlyInput:"Autocomplete_readOnlyInput__mD5xQ"};
2
2
  //# sourceMappingURL=Autocomplete.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CompletionAppIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/AppIcon/assets/CompletionAppIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,iBAAS,iBAAiB,CAAC,EACzB,KAAU,EACV,MAAW,EACX,SAAS,EACT,aAAa,EAAE,SAA+B,GAC/C,EAAE,SAAS,eAqGX;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"CompletionAppIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/AppIcon/assets/CompletionAppIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,iBAAS,iBAAiB,CAAC,EACzB,KAAU,EACV,MAAW,EACX,SAAS,EACT,aAAa,EAAE,SAA+B,GAC/C,EAAE,SAAS,eAiSX;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,2 +1,2 @@
1
- import{jsxs as t,jsx as i}from"react/jsx-runtime";function l(l){var C=l.width,e=void 0===C?36:C,r=l.height,a=void 0===r?36:r,o=l.className,n=l["data-testid"];return t("svg",{"data-testid":"".concat(void 0===n?"CompletionAppIcon":n,"_completionFe"),width:e,height:a,className:o,viewBox:"0 0 320 320",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("g",{clipPath:"url(#clip0_2127_3321)",children:[i("path",{d:"M160 10.7879C77.5916 10.7879 10.7864 77.593 10.7864 160.001C10.7864 242.41 77.5916 309.215 160 309.215C242.408 309.215 309.213 242.41 309.213 160.001C309.213 77.593 242.408 10.7879 160 10.7879Z",fill:"url(#paint0_linear_2127_3321)"}),i("path",{d:"M226.25 0H93.75C42 0 0 42 0 93.75V226.25C0 278 42 320 93.75 320H226.25C278 320 320 278 320 226.25V93.75C320 42 278 0 226.25 0ZM160.5 299C83.75 299 21.5 236.75 21.5 160C21.5 83.25 83.75 21 160.5 21C237.25 21 299.5 83.25 299.5 160C299.5 236.75 237.25 299 160.5 299Z",fill:"url(#paint1_linear_2127_3321)"}),i("path",{d:"M160.499 18.5C141.499 18.5 122.749 22.25 105.499 29.75C88.7493 37 73.4993 47 60.4993 60C47.4993 73 37.2493 88.25 30.2493 105C22.7493 122.5 18.9993 141 18.9993 160C18.9993 179 22.7493 197.75 29.9993 215C37.2493 231.75 47.2493 247 60.2493 260C73.2493 273 88.4993 283.25 105.249 290.25C122.749 297.75 141.249 301.5 160.249 301.5C179.249 301.5 197.999 297.75 215.249 290.25C231.999 283 247.249 273 260.249 260C273.249 247 283.499 231.75 290.499 215C297.999 197.5 301.749 179 301.749 160C301.749 141 297.999 122.25 290.499 105C283.249 88.25 273.249 73 260.249 60C247.249 47 231.999 36.75 215.249 29.75C198.249 22.25 179.499 18.5 160.499 18.5ZM160.499 21C237.249 21 299.499 83.25 299.499 160C299.499 236.75 237.249 299 160.499 299C83.7493 299 21.4993 236.75 21.4993 160C21.4993 83.25 83.7493 21 160.499 21Z",fill:"url(#paint2_linear_2127_3321)"}),i("g",{clipPath:"url(#clip1_2127_3321)",children:t("g",{clipPath:"url(#clip2_2127_3321)",children:[i("path",{d:"M234.017 105.374H199.532V95.5781C199.532 86.882 192.436 79.7852 183.739 79.7852H85.7832C77.0871 79.7852 69.9902 86.882 69.9902 95.5781V198.732C69.9902 207.428 77.0871 214.525 85.7832 214.525H94.7792C96.2785 214.525 97.5779 213.326 97.5779 211.726C97.5779 210.127 96.3785 208.927 94.7792 208.927H85.7832C80.1857 208.927 75.5877 204.33 75.5877 198.732V131.762H115.07V224.321C115.07 233.017 122.167 240.114 130.863 240.114H234.017C242.713 240.114 249.81 233.017 249.81 224.321V121.167C249.81 112.471 242.713 105.374 234.017 105.374ZM244.212 121.167V151.753H120.668V128.963V121.167C120.668 115.569 125.266 110.971 130.863 110.971H196.734H233.917C239.714 110.871 244.212 115.469 244.212 121.167ZM75.6877 126.164V95.6781C75.6877 90.0806 80.2856 85.4826 85.8831 85.4826H183.839C189.437 85.4826 194.035 90.0806 194.035 95.6781V105.474H130.863C122.167 105.474 115.07 112.571 115.07 121.267V126.364H75.6877V126.164ZM120.668 224.221V157.151H155.252V234.416H130.863C125.266 234.516 120.668 229.918 120.668 224.221ZM234.017 234.516H160.75V157.251H244.312V224.321C244.212 229.918 239.714 234.516 234.017 234.516Z",fill:"white"}),i("path",{d:"M146.256 124.664C142.958 124.664 140.259 127.363 140.259 130.661C140.259 133.96 142.958 136.659 146.256 136.659C149.555 136.659 152.254 133.96 152.254 130.661C152.154 127.363 149.555 124.664 146.256 124.664Z",fill:"white"}),i("path",{d:"M166.047 124.664C162.749 124.664 160.05 127.363 160.05 130.661C160.05 133.96 162.749 136.659 166.047 136.659C169.346 136.659 172.045 133.96 172.045 130.661C172.045 127.363 169.346 124.664 166.047 124.664Z",fill:"white"}),i("path",{d:"M185.839 124.664C182.54 124.664 179.841 127.363 179.841 130.661C179.841 133.96 182.54 136.659 185.839 136.659C189.137 136.659 191.836 133.96 191.836 130.661C191.836 127.363 189.137 124.664 185.839 124.664Z",fill:"white"}),i("path",{d:"M220.323 172.945H182.44C180.941 172.945 179.641 174.145 179.641 175.744C179.641 177.343 180.841 178.543 182.44 178.543H220.323C221.822 178.543 223.122 177.343 223.122 175.744C223.122 174.145 221.822 172.945 220.323 172.945Z",fill:"white"}),i("path",{d:"M220.323 203.629H182.44C180.941 203.629 179.641 204.828 179.641 206.428C179.641 208.027 180.841 209.226 182.44 209.226H220.323C221.822 209.226 223.122 208.027 223.122 206.428C223.122 204.828 221.822 203.629 220.323 203.629Z",fill:"white"})]})})]}),t("defs",{children:[t("linearGradient",{id:"paint0_linear_2127_3321",x1:"309.213",y1:"161.991",x2:"10.7864",y2:"161.991",gradientUnits:"userSpaceOnUse",children:[i("stop",{stopColor:"#3F33A9"}),i("stop",{offset:"1",stopColor:"#DA4583"})]}),t("linearGradient",{id:"paint1_linear_2127_3321",x1:"160",y1:"442.496",x2:"160",y2:"122.496",gradientUnits:"userSpaceOnUse",children:[i("stop",{stopColor:"#D1D1D1"}),i("stop",{offset:"0.1978",stopColor:"#DBDBDC"}),i("stop",{offset:"0.6835",stopColor:"#F0F0F1"}),i("stop",{offset:"1",stopColor:"#F8F7F9"})]}),t("linearGradient",{id:"paint2_linear_2127_3321",x1:"157.612",y1:"18.4177",x2:"163.391",y2:"301.574",gradientUnits:"userSpaceOnUse",children:[i("stop",{stopColor:"#BFBFBF"}),i("stop",{offset:"0.9816",stopColor:"#F8F7F9"})]}),i("clipPath",{id:"clip0_2127_3321",children:i("rect",{width:"320",height:"320",fill:"white"})}),i("clipPath",{id:"clip1_2127_3321",children:i("rect",{width:"224",height:"224",fill:"white",transform:"translate(48 48)"})}),i("clipPath",{id:"clip2_2127_3321",children:i("rect",{width:"223.9",height:"223.9",fill:"white",transform:"translate(48 48)"})})]})]})}export{l as default};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";function o(o){var r=o.width,i=void 0===r?36:r,l=o.height,s=void 0===l?36:l,a=o.className,p=o["data-testid"];return t("svg",{"data-testid":"".concat(void 0===p?"CompletionAppIcon":p,"_completionFe"),width:i,height:s,className:a,viewBox:"0 0 280 280",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M210 0H70C31.3401 0 0 31.3401 0 70V210C0 248.66 31.3401 280 70 280H210C248.66 280 280 248.66 280 210V70C280 31.3401 248.66 0 210 0Z",fill:"url(#paint0_linear_4521_70602)"}),e("path",{opacity:"0.3",d:"M210 0H70C31.3401 0 0 31.3401 0 70V210C0 248.66 31.3401 280 70 280H210C248.66 280 280 248.66 280 210V70C280 31.3401 248.66 0 210 0Z",fill:"url(#paint1_linear_4521_70602)",style:{mixBlendMode:"multiply"}}),e("path",{d:"M140 259C205.722 259 259 205.722 259 140C259 74.2779 205.722 20.9998 140 20.9998C74.2781 20.9998 21 74.2779 21 140C21 205.722 74.2781 259 140 259Z",fill:"url(#paint2_radial_4521_70602)"}),e("path",{d:"M258.975 140.428C258.978 140.283 258.998 140.144 258.998 139.999C258.998 139.903 258.985 139.812 258.985 139.717H254.384V111.922H255.526C255.471 111.683 255.403 111.448 255.345 111.211H254.384V107.477C254.124 106.564 253.954 105.615 253.673 104.712V111.211H225.878V83.4159H244.701C244.571 83.174 244.421 82.9459 244.287 82.7049H225.878V57.7619C225.636 57.5077 225.413 57.2321 225.167 56.9796V82.7049H197.372V54.91H223.106C222.853 54.6635 222.576 54.443 222.324 54.199H197.372V35.7578C197.13 35.6245 196.904 35.4652 196.661 35.3331V54.199H168.866V26.4041H175.535C174.653 26.1276 173.727 25.949 172.835 25.6931H168.866V24.6728C168.627 24.6135 168.395 24.5481 168.155 24.49V25.6931H140.36V21.0169C140.237 21.0165 140.121 20.9985 139.998 20.9985C139.879 20.9985 139.766 21.0156 139.65 21.016V25.6931H111.855V24.4857C111.615 24.5434 111.383 24.6097 111.144 24.6686V25.6931H107.158C106.266 25.949 105.343 26.1276 104.458 26.4041H111.144V54.199H83.3487V35.3259C83.106 35.4579 82.8805 35.6147 82.6378 35.7484V54.199H57.6729C57.4166 54.443 57.1397 54.6634 56.8902 54.91H82.6378V82.7049H54.8428V56.9629C54.5967 57.215 54.3746 57.4906 54.1319 57.7452V82.7049H35.7056C35.5723 82.9459 35.4219 83.174 35.2921 83.4159H54.1319V111.211H26.337V104.652C26.0567 105.555 25.8858 106.504 25.626 107.417V111.211H24.6519C24.5904 111.448 24.5254 111.683 24.4673 111.922H25.626V139.717H21.0117C21.0117 139.812 20.998 139.903 20.998 139.999C20.998 140.144 21.0186 140.283 21.0186 140.428H25.626V168.223H24.5049C24.563 168.461 24.6279 168.696 24.6895 168.934H25.6261V172.581C25.8859 173.494 26.0567 174.442 26.337 175.346V168.934H54.132V196.729H35.3639C35.4972 196.972 35.6613 197.196 35.798 197.439H54.132V222.253C54.3747 222.507 54.5968 222.782 54.8429 223.034V197.439H82.6379V225.234H57.051C57.3039 225.48 57.5773 225.702 57.8337 225.945H82.6379V244.249C82.8806 244.383 83.1062 244.539 83.3488 244.671V225.945H111.144V253.74H104.964C105.87 254.018 106.817 254.194 107.733 254.451H111.144V255.329C111.383 255.388 111.615 255.454 111.855 255.512V254.451H139.65V258.981C139.766 258.982 139.879 258.999 139.998 258.999C140.121 258.999 140.238 258.981 140.361 258.98V254.451H168.156V255.507C168.395 255.449 168.627 255.384 168.867 255.325V254.451H172.264C173.177 254.194 174.123 254.018 175.029 253.74H168.867V225.945H196.661V244.664C196.904 244.532 197.13 244.373 197.372 244.24V225.945H222.163C222.416 225.702 222.693 225.48 222.946 225.234H197.372V197.439H225.167V223.018C225.414 222.765 225.636 222.49 225.878 222.236V197.439H244.199C244.332 197.196 244.499 196.972 244.629 196.728H225.878V168.934H253.673V175.286C253.954 174.383 254.124 173.434 254.384 172.521V168.934H255.307C255.365 168.696 255.43 168.461 255.488 168.223H254.384V140.428L258.975 140.428ZM54.1322 168.223H26.3373V140.428H54.1322V168.223ZM54.1322 139.717H26.3373V111.922H54.1322V139.717ZM82.6381 196.729H54.8431V168.934H82.6381V196.729ZM82.6381 168.223H54.8431V140.428H82.6381V168.223ZM82.6381 139.717H54.8431V111.922H82.6381V139.717ZM82.6381 111.211H54.8431V83.416H82.6381V111.211ZM111.144 225.234H83.349V197.439H111.144V225.234ZM111.144 196.729H83.349V168.934H111.144V196.729ZM111.144 168.223H83.349V140.428H111.144V168.223ZM111.144 139.717H83.349V111.922H111.144V139.717ZM111.144 111.211H83.349V83.416H111.144V111.211ZM111.144 82.705H83.349V54.9101H111.144V82.705ZM139.65 253.74H111.855V225.945H139.65V253.74ZM139.65 225.234H111.855V197.439H139.65V225.234ZM139.65 196.729H111.855V168.934H139.65V196.729ZM139.65 168.223H111.855V140.428H139.65V168.223ZM139.65 139.717H111.855V111.922H139.65V139.717ZM139.65 111.211H111.855V83.416H139.65V111.211ZM139.65 82.705H111.855V54.9101H139.65V82.705ZM139.65 54.1992H111.855V26.4042H139.65V54.1992ZM168.156 253.74H140.361V225.945H168.156V253.74ZM168.156 225.234H140.361V197.439H168.156V225.234ZM168.156 196.729H140.361V168.934H168.156V196.729ZM168.156 168.223H140.361V140.428H168.156V168.223ZM168.156 139.717H140.361V111.922H168.156V139.717ZM168.156 111.211H140.361V83.416H168.156V111.211ZM168.156 82.705H140.361V54.9101H168.156V82.705ZM168.156 54.1992H140.361V26.4042H168.156V54.1992ZM196.662 225.234H168.867V197.439H196.662V225.234ZM196.662 196.729H168.867V168.934H196.662V196.729ZM196.662 168.223H168.867V140.428H196.662V168.223ZM196.662 139.717H168.867V111.922H196.662V139.717ZM196.662 111.211H168.867V83.416H196.662V111.211ZM196.662 82.705H168.867V54.9101H196.662V82.705ZM225.167 196.729H197.372V168.934H225.167V196.729ZM225.167 168.223H197.372V140.428H225.167V168.223ZM225.167 139.717H197.372V111.922H225.167V139.717ZM225.167 111.211H197.372V83.416H225.167V111.211ZM253.673 168.223H225.878V140.428H253.673V168.223ZM253.673 139.717H225.878V111.922H253.673V139.717Z",fill:"url(#paint3_radial_4521_70602)"}),e("g",{filter:"url(#filter0_d_4521_70602)",children:e("path",{d:"M187.281 68.6479H138.394C124.895 68.6479 113.951 79.5916 113.951 93.0912V141.978C113.951 155.478 124.895 166.421 138.394 166.421H187.281C200.781 166.421 211.724 155.478 211.724 141.978V93.0912C211.724 79.5916 200.781 68.6479 187.281 68.6479Z",fill:"white"})}),e("g",{filter:"url(#filter1_d_4521_70602)",children:e("path",{d:"M202.394 111.203C206.539 138.261 183.564 161.236 156.506 157.091C139.645 154.507 125.864 140.726 123.281 123.865C119.136 96.8073 142.111 73.8323 169.168 77.9774C186.03 80.5606 199.811 94.3415 202.394 111.203Z",fill:"url(#paint4_linear_4521_70602)"})}),e("g",{filter:"url(#filter2_d_4521_70602)",children:e("path",{d:"M141.605 113.576H92.7187C79.219 113.576 68.2754 124.52 68.2754 138.019V186.906C68.2754 200.406 79.219 211.349 92.7187 211.349H141.605C155.105 211.349 166.049 200.406 166.049 186.906V138.019C166.049 124.52 155.105 113.576 141.605 113.576Z",fill:"url(#paint5_linear_4521_70602)"})}),e("g",{opacity:"0.35",children:e("path",{d:"M141.605 115.166C154.206 115.166 164.458 125.418 164.458 138.019V186.906C164.458 199.507 154.206 209.758 141.605 209.758H92.7187C80.1176 209.758 69.8659 199.507 69.8659 186.906V138.019C69.8659 125.418 80.1176 115.166 92.7187 115.166H141.605ZM141.605 113.576H92.7187C79.219 113.576 68.2754 124.52 68.2754 138.019V186.906C68.2754 200.405 79.219 211.349 92.7187 211.349H141.605C155.105 211.349 166.049 200.405 166.049 186.906V138.019C166.049 124.52 155.105 113.576 141.605 113.576Z",fill:"white"})}),e("path",{d:"M156.74 155.971C160.89 183.064 137.885 206.069 110.792 201.918C93.9089 199.332 80.1102 185.533 77.5237 168.649C73.3732 141.557 96.3781 118.552 123.471 122.702C140.354 125.289 154.153 139.087 156.74 155.971Z",fill:"url(#paint6_radial_4521_70602)"}),e("mask",{id:"mask0_4521_70602",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"18",y:"18",width:"244",height:"244",children:e("path",{d:"M261.449 140.001C261.449 207.061 207.059 261.451 139.998 261.451C72.8692 261.451 18.5508 207.061 18.5508 140.001C18.5508 72.8708 72.8691 18.5508 139.998 18.5508C207.059 18.5508 261.449 72.8709 261.449 140.001Z",fill:"white"})}),e("g",{mask:"url(#mask0_4521_70602)",children:e("g",{filter:"url(#filter3_d_4521_70602)",children:e("path",{d:"M140 18.5508C72.8689 18.5508 18.5488 72.8709 18.5488 140.001C18.5488 207.061 72.8689 261.451 140 261.451C207.06 261.451 261.45 207.061 261.45 140.001C261.45 72.8708 207.06 18.5508 140 18.5508ZM140 259.001C74.2686 259.001 20.9995 205.661 20.9995 140.001C20.9995 74.2709 74.2686 21.001 140 21.001C205.73 21.001 259 74.2709 259 140.001C259 205.661 205.729 259.001 140 259.001Z",fill:"#A9B7C6"})})}),t("defs",{children:[t("filter",{id:"filter0_d_4521_70602",x:"104.926",y:"64.1351",width:"115.825",height:"115.825",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e("feOffset",{dy:"4.51283"}),e("feGaussianBlur",{stdDeviation:"4.51283"}),e("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),e("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4521_70602"}),e("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4521_70602",result:"shape"})]}),t("filter",{id:"filter1_d_4521_70602",x:"114.098",y:"73.1428",width:"97.4807",height:"97.4799",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e("feOffset",{dy:"4.34868"}),e("feGaussianBlur",{stdDeviation:"4.34868"}),e("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),e("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4521_70602"}),e("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4521_70602",result:"shape"})]}),t("filter",{id:"filter2_d_4521_70602",x:"59.2497",y:"109.063",width:"115.825",height:"115.825",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e("feOffset",{dy:"4.51283"}),e("feGaussianBlur",{stdDeviation:"4.51283"}),e("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),e("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4521_70602"}),e("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4521_70602",result:"shape"})]}),t("filter",{id:"filter3_d_4521_70602",x:"-2.78298",y:"-2.78102",width:"285.566",height:"285.564",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e("feOffset",{}),e("feGaussianBlur",{stdDeviation:"10.6659"}),e("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0"}),e("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4521_70602"}),e("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4521_70602",result:"shape"})]}),t("linearGradient",{id:"paint0_linear_4521_70602",x1:"140",y1:"0",x2:"140",y2:"280",gradientUnits:"userSpaceOnUse",children:[e("stop",{offset:"0.0018",stopColor:"#F6F5F7"}),e("stop",{offset:"0.2008",stopColor:"#F0F0F3"}),e("stop",{offset:"0.464",stopColor:"#DFE2E8"}),e("stop",{offset:"0.7618",stopColor:"#C4CCD7"}),e("stop",{offset:"1",stopColor:"#A9B7C6"})]}),t("linearGradient",{id:"paint1_linear_4521_70602",x1:"30.625",y1:"11.5856",x2:"249.375",y2:"268.414",gradientUnits:"userSpaceOnUse",children:[e("stop",{offset:"0.375",stopColor:"white"}),e("stop",{offset:"0.4241",stopColor:"#CCCCCC"}),e("stop",{offset:"0.4772",stopColor:"#9C9C9C"}),e("stop",{offset:"0.5336",stopColor:"#727272"}),e("stop",{offset:"0.5922",stopColor:"#4F4F4F"}),e("stop",{offset:"0.6538",stopColor:"#323232"}),e("stop",{offset:"0.7192",stopColor:"#1C1C1C"}),e("stop",{offset:"0.7902",stopColor:"#0C0C0C"}),e("stop",{offset:"0.8711",stopColor:"#020202"}),e("stop",{offset:"0.9832"})]}),t("radialGradient",{id:"paint2_radial_4521_70602",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(140.077 140.012) rotate(-90) scale(144.021)",children:[e("stop",{stopColor:"#D80070"}),e("stop",{offset:"0.9995",stopColor:"#3C00D9"})]}),t("radialGradient",{id:"paint3_radial_4521_70602",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(139.998 139.999) scale(119 119)",children:[e("stop",{stopColor:"#FE51A7"}),e("stop",{offset:"0.2267",stopColor:"#FE51A7",stopOpacity:"0.574109"}),e("stop",{offset:"0.7479",stopColor:"#FE51A7",stopOpacity:"0.0243048"}),e("stop",{offset:"0.8795",stopColor:"#FE51A7",stopOpacity:"0"})]}),t("linearGradient",{id:"paint4_linear_4521_70602",x1:"131.605",y1:"90.9633",x2:"197.817",y2:"147.293",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#E93582"}),e("stop",{offset:"1",stopColor:"#853CF2"})]}),t("linearGradient",{id:"paint5_linear_4521_70602",x1:"74.5794",y1:"120.19",x2:"165.167",y2:"210.119",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#E93582"}),e("stop",{offset:"1",stopColor:"#853CF2"})]}),t("radialGradient",{id:"paint6_radial_4521_70602",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(117.132 162.31) scale(40.0946 40.0946)",children:[e("stop",{offset:"0.606",stopColor:"white",stopOpacity:"0"}),e("stop",{offset:"0.6593",stopColor:"white",stopOpacity:"0.01"}),e("stop",{offset:"0.709",stopColor:"white",stopOpacity:"0.01"}),e("stop",{offset:"0.7574",stopColor:"white",stopOpacity:"0.0177156"}),e("stop",{offset:"0.805",stopColor:"white",stopOpacity:"0.0564062"}),e("stop",{offset:"0.8519",stopColor:"white",stopOpacity:"0.138533"}),e("stop",{offset:"0.8984",stopColor:"white",stopOpacity:"0.288691"}),e("stop",{offset:"0.9446",stopColor:"white",stopOpacity:"0.536996"}),e("stop",{offset:"0.9894",stopColor:"white",stopOpacity:"0.909162"}),e("stop",{offset:"0.9981",stopColor:"white"})]})]})]})}export{o as default};
2
2
  //# sourceMappingURL=CompletionAppIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CompletionAppIconBe.d.ts","sourceRoot":"","sources":["../../../../src/components/AppIcon/assets/CompletionAppIconBe.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,iBAAS,mBAAmB,CAAC,EAC3B,KAAU,EACV,MAAW,EACX,SAAS,EACT,aAAa,EAAE,SAAiC,GACjD,EAAE,SAAS,eA6FX;AAED,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"CompletionAppIconBe.d.ts","sourceRoot":"","sources":["../../../../src/components/AppIcon/assets/CompletionAppIconBe.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,iBAAS,mBAAmB,CAAC,EAC3B,KAAU,EACV,MAAW,EACX,SAAS,EACT,aAAa,EAAE,SAAiC,GACjD,EAAE,SAAS,eAiSX;AAED,eAAe,mBAAmB,CAAC"}
@@ -1,2 +1,2 @@
1
- import{jsxs as C,jsx as t}from"react/jsx-runtime";function i(i){var l=i.width,e=void 0===l?36:l,r=i.height,a=void 0===r?36:r,o=i.className,n=i["data-testid"];return C("svg",{"data-testid":"".concat(void 0===n?"CompletionAppIconBe":n,"_completionBe"),width:e,height:a,className:o,viewBox:"0 0 320 320",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[C("g",{clipPath:"url(#clip0_2127_3424)",children:[t("path",{d:"M160 10.7879C77.5916 10.7879 10.7864 77.593 10.7864 160.001C10.7864 242.41 77.5916 309.215 160 309.215C242.408 309.215 309.213 242.41 309.213 160.001C309.213 77.593 242.408 10.7879 160 10.7879Z",fill:"url(#paint0_linear_2127_3424)"}),t("path",{d:"M226.25 0H93.75C42 0 0 42 0 93.75V226.25C0 278 42 320 93.75 320H226.25C278 320 320 278 320 226.25V93.75C320 42 278 0 226.25 0ZM160.5 299C83.75 299 21.5 236.75 21.5 160C21.5 83.25 83.75 21 160.5 21C237.25 21 299.5 83.25 299.5 160C299.5 236.75 237.25 299 160.5 299Z",fill:"url(#paint1_linear_2127_3424)"}),t("path",{d:"M160.499 18.5C141.499 18.5 122.749 22.25 105.499 29.75C88.7493 37 73.4993 47 60.4993 60C47.4993 73 37.2493 88.25 30.2493 105C22.7493 122.5 18.9993 141 18.9993 160C18.9993 179 22.7493 197.75 29.9993 215C37.2493 231.75 47.2493 247 60.2493 260C73.2493 273 88.4993 283.25 105.249 290.25C122.749 297.75 141.249 301.5 160.249 301.5C179.249 301.5 197.999 297.75 215.249 290.25C231.999 283 247.249 273 260.249 260C273.249 247 283.499 231.75 290.499 215C297.999 197.5 301.749 179 301.749 160C301.749 141 297.999 122.25 290.499 105C283.249 88.25 273.249 73 260.249 60C247.249 47 231.999 36.75 215.249 29.75C198.249 22.25 179.499 18.5 160.499 18.5ZM160.499 21C237.249 21 299.499 83.25 299.499 160C299.499 236.75 237.249 299 160.499 299C83.7493 299 21.4993 236.75 21.4993 160C21.4993 83.25 83.7493 21 160.499 21Z",fill:"url(#paint2_linear_2127_3424)"}),t("g",{clipPath:"url(#clip1_2127_3424)",children:C("g",{clipPath:"url(#clip2_2127_3424)",children:[t("path",{d:"M130.663 206.032C133.262 203.134 138.16 202.034 141.758 203.534C145.557 205.133 148.055 209.031 147.756 213.229C147.556 216.328 149.855 219.127 152.953 219.427C155.252 219.726 157.551 219.826 159.85 219.826C162.049 219.826 164.248 219.726 166.447 219.427C169.546 219.127 171.845 216.428 171.745 213.329C171.645 209.231 174.044 205.433 177.842 203.833C181.44 202.334 186.238 203.434 188.837 206.332C190.936 208.631 194.435 208.931 196.834 207.032C200.432 204.233 203.631 201.035 206.529 197.436C208.528 195.037 208.229 191.439 205.93 189.34C202.831 186.541 201.831 182.043 203.431 178.245C204.93 174.646 208.628 172.248 212.427 172.248H213.026C216.125 172.447 218.924 170.148 219.224 167.05C219.723 162.552 219.723 157.954 219.224 153.456C218.824 150.257 215.625 148.158 212.826 148.158C208.728 148.158 205.13 145.759 203.631 142.061C202.031 138.263 203.131 133.865 206.129 131.066C208.428 128.967 208.728 125.468 206.829 123.07C204.03 119.471 200.832 116.273 197.333 113.474C194.934 111.475 191.336 111.775 189.237 114.074C186.638 116.972 181.74 118.072 178.142 116.572C174.344 114.973 171.845 111.075 172.145 106.877C172.345 103.778 170.046 100.979 166.947 100.68C162.449 100.18 157.951 100.18 153.453 100.68C150.354 100.979 148.055 103.678 148.155 106.777C148.255 110.875 145.856 114.773 142.058 116.273C138.46 117.772 133.662 116.672 131.063 113.774C128.964 111.475 125.465 111.175 122.967 113.074C119.368 115.873 116.17 119.071 113.271 122.67C111.272 125.069 111.572 128.667 113.871 130.766C116.969 133.565 117.969 138.063 116.37 141.861C114.87 145.559 110.972 147.858 106.574 147.858C103.475 147.759 100.876 149.958 100.477 153.056C99.9769 157.554 99.9769 162.152 100.477 166.65C100.876 169.849 104.075 171.948 107.074 171.948C110.972 171.848 114.67 174.347 116.17 178.045C117.769 181.843 116.769 186.241 113.671 189.04C111.372 191.139 111.072 194.638 112.971 197.037C115.77 200.535 118.868 203.734 122.467 206.632C124.966 208.631 128.464 208.431 130.663 206.032ZM125.965 202.434C122.767 199.835 119.868 196.937 117.369 193.738C117.269 193.538 117.269 193.338 117.369 193.238C122.067 188.84 123.666 181.943 121.267 176.046C118.868 170.149 113.071 166.35 106.974 166.55C106.574 166.55 106.074 166.25 105.974 166.15C105.574 162.052 105.574 157.954 105.974 153.956C105.974 153.656 106.174 153.556 106.474 153.556C113.171 153.556 119.068 149.858 121.467 144.16C123.966 138.163 122.467 131.166 117.569 126.868C117.369 126.768 117.369 126.468 117.569 126.268C120.168 123.07 123.067 120.171 126.365 117.572C126.565 117.472 126.765 117.472 126.965 117.572C131.163 122.17 138.36 123.869 144.157 121.47C150.055 119.071 153.853 113.074 153.653 106.677C153.653 106.477 153.753 106.277 154.053 106.277C158.051 105.877 162.149 105.877 166.247 106.277C166.447 106.277 166.647 106.477 166.647 106.677C166.247 113.174 170.046 119.271 176.043 121.77C181.84 124.169 189.137 122.57 193.335 117.872C193.435 117.672 193.735 117.672 193.935 117.872C197.133 120.371 199.932 123.269 202.531 126.568C202.631 126.768 202.631 126.968 202.531 127.068C197.833 131.366 196.234 138.363 198.633 144.26C201.032 150.057 206.629 153.756 213.026 153.756C213.326 153.756 213.826 154.056 213.926 154.156C214.426 158.254 214.326 162.352 213.926 166.35C213.926 166.55 213.726 166.75 213.526 166.75C213.426 166.75 213.426 166.75 213.326 166.75H212.527C206.429 166.75 200.632 170.548 198.333 176.146C195.834 182.143 197.333 189.14 202.231 193.438C202.431 193.538 202.431 193.838 202.231 194.038C199.632 197.236 196.734 200.135 193.435 202.734C193.235 202.834 193.035 202.834 192.835 202.734C188.637 198.136 181.44 196.437 175.643 198.836C169.746 201.235 165.947 207.232 166.147 213.629C166.147 213.829 166.047 214.029 165.748 214.029C161.749 214.429 157.551 214.429 153.553 214.029C153.353 214.029 153.153 213.829 153.153 213.629C153.553 207.132 149.755 201.035 143.757 198.536C141.958 197.736 139.959 197.436 138.06 197.436C133.762 197.436 129.364 199.236 126.465 202.434C126.365 202.534 126.165 202.534 125.965 202.434Z",fill:"white"}),t("path",{d:"M159.95 175.844C168.646 175.844 175.743 168.747 175.743 160.051C175.743 151.355 168.646 144.258 159.95 144.258C151.254 144.258 144.157 151.355 144.157 160.051C144.157 168.747 151.254 175.844 159.95 175.844ZM159.95 149.855C165.648 149.855 170.146 154.453 170.146 160.051C170.146 165.648 165.548 170.246 159.95 170.246C154.353 170.246 149.755 165.648 149.755 160.051C149.755 154.453 154.253 149.855 159.95 149.855Z",fill:"white"}),t("path",{d:"M224.221 98.2806C225.421 96.4814 226.121 94.3823 226.121 92.1833C226.221 86.086 221.323 81.0882 215.225 80.9883C212.227 80.9883 209.528 82.0878 207.329 84.0869C205.23 86.186 204.03 88.8848 204.03 91.8834C203.931 97.9807 208.828 103.078 214.926 103.078H215.026C216.725 103.078 218.424 102.679 220.023 101.879C235.916 117.872 244.612 138.962 244.312 161.652C243.713 207.232 206.529 243.916 161.05 243.916C160.75 243.916 160.35 243.916 160.05 243.916C149.355 243.816 138.96 241.617 129.164 237.618C127.765 237.019 126.165 237.718 125.565 239.118C124.966 240.517 125.665 242.116 127.065 242.716C137.46 247.014 148.555 249.313 159.95 249.413C160.35 249.413 160.65 249.413 161.05 249.413C209.528 249.413 249.21 210.331 249.81 161.652C250.11 137.763 241.014 115.273 224.221 98.2806ZM214.926 97.5809C211.927 97.5809 209.428 95.082 209.428 91.9834C209.428 90.484 210.028 89.0847 211.127 88.0851C212.127 87.0856 213.526 86.4858 215.026 86.4858C215.026 86.4858 215.026 86.4858 215.125 86.4858C218.124 86.4858 220.623 88.9847 220.623 92.0833C220.623 93.5827 220.023 94.982 218.924 95.9816C217.824 97.0811 216.425 97.5809 214.926 97.5809Z",fill:"white"}),t("path",{d:"M104.975 216.926H104.875C103.075 216.926 101.376 217.326 99.9768 218.125C84.0839 202.132 75.3878 180.942 75.6877 158.352C76.2874 112.372 114.071 75.4889 160.05 76.0886C170.745 76.1886 181.141 78.3876 190.936 82.3858C192.336 82.9856 193.935 82.2859 194.535 80.8865C195.134 79.4871 194.435 77.8878 193.035 77.2881C182.54 72.99 171.545 70.691 160.05 70.4911C111.072 69.8914 70.6899 109.274 70.0902 158.252C69.7903 182.241 78.8863 204.731 95.6788 221.824C94.4793 223.523 93.7796 225.622 93.7796 227.921C93.6797 234.018 98.5775 239.016 104.675 239.116H104.775C110.772 239.116 115.77 234.218 115.87 228.221C115.87 225.222 114.77 222.523 112.771 220.324C110.772 218.125 107.973 216.926 104.975 216.926ZM104.775 233.518C101.676 233.518 99.2772 230.92 99.2772 227.921C99.2772 224.922 101.776 222.423 104.775 222.423C104.775 222.423 104.775 222.423 104.875 222.423C106.374 222.423 107.773 223.023 108.773 224.123C109.772 225.222 110.372 226.621 110.372 228.021C110.372 231.119 107.873 233.518 104.775 233.518Z",fill:"white"})]})})]}),C("defs",{children:[C("linearGradient",{id:"paint0_linear_2127_3424",x1:"309.213",y1:"161.991",x2:"10.7864",y2:"161.991",gradientUnits:"userSpaceOnUse",children:[t("stop",{stopColor:"#3F33A9"}),t("stop",{offset:"1",stopColor:"#DA4583"})]}),C("linearGradient",{id:"paint1_linear_2127_3424",x1:"160",y1:"442.496",x2:"160",y2:"122.496",gradientUnits:"userSpaceOnUse",children:[t("stop",{stopColor:"#D1D1D1"}),t("stop",{offset:"0.1978",stopColor:"#DBDBDC"}),t("stop",{offset:"0.6835",stopColor:"#F0F0F1"}),t("stop",{offset:"1",stopColor:"#F8F7F9"})]}),C("linearGradient",{id:"paint2_linear_2127_3424",x1:"157.612",y1:"18.4177",x2:"163.391",y2:"301.574",gradientUnits:"userSpaceOnUse",children:[t("stop",{stopColor:"#BFBFBF"}),t("stop",{offset:"0.9816",stopColor:"#F8F7F9"})]}),t("clipPath",{id:"clip0_2127_3424",children:t("rect",{width:"320",height:"320",fill:"white"})}),t("clipPath",{id:"clip1_2127_3424",children:t("rect",{width:"224",height:"224",fill:"white",transform:"translate(48 48)"})}),t("clipPath",{id:"clip2_2127_3424",children:t("rect",{width:"223.9",height:"223.9",fill:"white",transform:"translate(48 48)"})})]})]})}export{i as default};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";function o(o){var r=o.width,i=void 0===r?36:r,C=o.height,l=void 0===C?36:C,s=o.className,a=o["data-testid"];return t("svg",{"data-testid":"".concat(void 0===a?"CompletionAppIconBe":a,"_completionBe"),width:i,height:l,className:s,viewBox:"0 0 280 280",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M210 0H70C31.3401 0 0 31.3401 0 70V210C0 248.66 31.3401 280 70 280H210C248.66 280 280 248.66 280 210V70C280 31.3401 248.66 0 210 0Z",fill:"url(#paint0_linear_4521_70814)"}),e("path",{opacity:"0.3",d:"M210 0H70C31.3401 0 0 31.3401 0 70V210C0 248.66 31.3401 280 70 280H210C248.66 280 280 248.66 280 210V70C280 31.3401 248.66 0 210 0Z",fill:"url(#paint1_linear_4521_70814)",style:{mixBlendMode:"multiply"}}),e("path",{d:"M140 259C205.722 259 259 205.722 259 140C259 74.2781 205.722 21 140 21C74.2781 21 21 74.2781 21 140C21 205.722 74.2781 259 140 259Z",fill:"url(#paint2_radial_4521_70814)"}),e("path",{d:"M258.975 140.429C258.978 140.284 258.998 140.145 258.998 140C258.998 139.905 258.985 139.813 258.985 139.718H254.384V111.923H255.526C255.471 111.685 255.403 111.45 255.345 111.212H254.384V107.478C254.124 106.565 253.954 105.617 253.673 104.713V111.212H225.878V83.4174H244.701C244.571 83.1755 244.421 82.9474 244.287 82.7064H225.878V57.7633C225.636 57.5092 225.413 57.2335 225.167 56.981V82.7064H197.372V54.9115H223.106C222.853 54.665 222.576 54.4445 222.324 54.2005H197.372V35.7593C197.13 35.626 196.904 35.4666 196.661 35.3346V54.2005H168.866V26.4055H175.535C174.653 26.1291 173.727 25.9505 172.835 25.6946H168.866V24.6743C168.627 24.6149 168.395 24.5496 168.155 24.4915V25.6946H140.36V21.0184C140.237 21.0179 140.121 21 139.998 21C139.879 21 139.766 21.0171 139.65 21.0175V25.6946H111.855V24.4872C111.615 24.5449 111.383 24.6111 111.144 24.6701V25.6946H107.158C106.266 25.9505 105.343 26.1291 104.458 26.4055H111.144V54.2005H83.3487V35.3273C83.106 35.4593 82.8805 35.6162 82.6378 35.7499V54.2005H57.6729C57.4166 54.4445 57.1397 54.6649 56.8902 54.9115H82.6378V82.7064H54.8428V56.9644C54.5967 57.2164 54.3746 57.492 54.1319 57.7467V82.7064H35.7056C35.5723 82.9474 35.4219 83.1755 35.2921 83.4174H54.1319V111.212H26.337V104.653C26.0567 105.557 25.8858 106.505 25.626 107.418V111.212H24.6519C24.5904 111.45 24.5254 111.685 24.4673 111.923H25.626V139.718H21.0117C21.0117 139.813 20.998 139.905 20.998 140C20.998 140.145 21.0186 140.284 21.0186 140.429H25.626V168.224H24.5049C24.563 168.462 24.6279 168.697 24.6895 168.935H25.6261V172.582C25.8859 173.495 26.0567 174.444 26.337 175.348V168.935H54.132V196.73H35.3639C35.4972 196.974 35.6613 197.197 35.798 197.441H54.132V222.254C54.3747 222.509 54.5968 222.784 54.8429 223.036V197.441H82.6379V225.236H57.051C57.3039 225.482 57.5773 225.703 57.8337 225.947H82.6379V244.25C82.8806 244.384 83.1062 244.541 83.3488 244.673V225.947H111.144V253.742H104.964C105.87 254.02 106.817 254.196 107.733 254.453H111.144V255.33C111.383 255.389 111.615 255.455 111.855 255.513V254.453H139.65V258.983C139.766 258.983 139.879 259 139.998 259C140.121 259 140.238 258.982 140.361 258.982V254.453H168.156V255.509C168.395 255.451 168.627 255.385 168.867 255.326V254.453H172.264C173.177 254.196 174.123 254.02 175.029 253.742H168.867V225.947H196.661V244.666C196.904 244.534 197.13 244.375 197.372 244.241V225.947H222.163C222.416 225.703 222.693 225.482 222.946 225.236H197.372V197.441H225.167V223.019C225.414 222.767 225.636 222.492 225.878 222.237V197.441H244.199C244.332 197.197 244.499 196.974 244.629 196.73H225.878V168.935H253.673V175.288C253.954 174.384 254.124 173.435 254.384 172.523V168.935H255.307C255.365 168.697 255.43 168.462 255.488 168.224H254.384V140.429L258.975 140.429ZM54.1322 168.224H26.3373V140.429H54.1322V168.224ZM54.1322 139.718H26.3373V111.923H54.1322V139.718ZM82.6381 196.73H54.8431V168.935H82.6381V196.73ZM82.6381 168.224H54.8431V140.429H82.6381V168.224ZM82.6381 139.718H54.8431V111.923H82.6381V139.718ZM82.6381 111.212H54.8431V83.4175H82.6381V111.212ZM111.144 225.236H83.349V197.441H111.144V225.236ZM111.144 196.73H83.349V168.935H111.144V196.73ZM111.144 168.224H83.349V140.429H111.144V168.224ZM111.144 139.718H83.349V111.923H111.144V139.718ZM111.144 111.212H83.349V83.4175H111.144V111.212ZM111.144 82.7066H83.349V54.9116H111.144V82.7066ZM139.65 253.742H111.855V225.947H139.65V253.742ZM139.65 225.236H111.855V197.441H139.65V225.236ZM139.65 196.73H111.855V168.935H139.65V196.73ZM139.65 168.224H111.855V140.429H139.65V168.224ZM139.65 139.718H111.855V111.923H139.65V139.718ZM139.65 111.212H111.855V83.4175H139.65V111.212ZM139.65 82.7066H111.855V54.9116H139.65V82.7066ZM139.65 54.2007H111.855V26.4057H139.65V54.2007ZM168.156 253.742H140.361V225.947H168.156V253.742ZM168.156 225.236H140.361V197.441H168.156V225.236ZM168.156 196.73H140.361V168.935H168.156V196.73ZM168.156 168.224H140.361V140.429H168.156V168.224ZM168.156 139.718H140.361V111.923H168.156V139.718ZM168.156 111.212H140.361V83.4175H168.156V111.212ZM168.156 82.7066H140.361V54.9116H168.156V82.7066ZM168.156 54.2007H140.361V26.4057H168.156V54.2007ZM196.662 225.236H168.867V197.441H196.662V225.236ZM196.662 196.73H168.867V168.935H196.662V196.73ZM196.662 168.224H168.867V140.429H196.662V168.224ZM196.662 139.718H168.867V111.923H196.662V139.718ZM196.662 111.212H168.867V83.4175H196.662V111.212ZM196.662 82.7066H168.867V54.9116H196.662V82.7066ZM225.167 196.73H197.372V168.935H225.167V196.73ZM225.167 168.224H197.372V140.429H225.167V168.224ZM225.167 139.718H197.372V111.923H225.167V139.718ZM225.167 111.212H197.372V83.4175H225.167V111.212ZM253.673 168.224H225.878V140.429H253.673V168.224ZM253.673 139.718H225.878V111.923H253.673V139.718Z",fill:"url(#paint3_radial_4521_70814)"}),e("mask",{id:"mask0_4521_70814",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"18",y:"18",width:"244",height:"244",children:e("path",{d:"M261.449 140C261.449 207.06 207.059 261.45 139.998 261.45C72.8692 261.45 18.5508 207.06 18.5508 140C18.5508 72.8698 72.8691 18.5498 139.998 18.5498C207.059 18.5498 261.449 72.8699 261.449 140Z",fill:"white"})}),e("g",{mask:"url(#mask0_4521_70814)",children:e("g",{filter:"url(#filter0_d_4521_70814)",children:e("path",{d:"M140 18.5498C72.8689 18.5498 18.5488 72.8699 18.5488 140C18.5488 207.06 72.8689 261.45 140 261.45C207.06 261.45 261.45 207.06 261.45 140C261.45 72.8698 207.06 18.5498 140 18.5498ZM140 259C74.2686 259 20.9995 205.66 20.9995 140C20.9995 74.27 74.2686 21 140 21C205.73 21 259 74.2699 259 140C259 205.66 205.729 259 140 259Z",fill:"#A9B7C6"})})}),e("g",{filter:"url(#filter1_d_4521_70814)",children:e("path",{d:"M191.066 82.1354L197.387 81.4611L203.067 80.8551C203.457 80.8135 203.834 81.0059 204.03 81.3457L209.116 90.1978L214.203 99.05C214.398 99.3897 214.375 99.8127 214.143 100.128L210.759 104.731L206.993 109.853C205.63 111.707 204.946 113.897 204.941 116.087C204.937 118.278 205.612 120.47 206.968 122.33L210.713 127.467L214.078 132.083C214.308 132.4 214.33 132.823 214.134 133.162L209.011 141.993L203.888 150.825C203.692 151.164 203.313 151.355 202.924 151.311L197.246 150.682L190.928 149.982C188.64 149.729 186.402 150.231 184.503 151.322C182.603 152.414 181.042 154.095 180.11 156.199L177.533 162.01L175.218 167.233C175.059 167.591 174.703 167.822 174.312 167.821L164.102 167.8L153.892 167.779C153.501 167.778 153.146 167.546 152.989 167.187L150.695 161.956L148.142 156.134C147.217 154.026 145.664 152.339 143.769 151.239C141.874 150.14 139.638 149.629 137.349 149.873L131.028 150.548L125.348 151.154C124.958 151.195 124.58 151.003 124.385 150.663L119.298 141.811L114.212 132.959C114.016 132.619 114.04 132.196 114.272 131.88L117.656 127.278L121.421 122.156C122.785 120.301 123.469 118.112 123.474 115.922C123.478 113.731 122.803 111.539 121.447 109.679L117.702 104.542L114.337 99.9254C114.106 99.6088 114.084 99.1857 114.281 98.8467L119.404 90.0154L124.527 81.1839C124.723 80.845 125.101 80.6541 125.491 80.6972L131.169 81.3263L137.487 82.0264C139.775 82.2799 142.013 81.7779 143.912 80.6864C145.812 79.595 147.372 77.9141 148.305 75.8099L150.882 69.9983L153.197 64.7761C153.356 64.4178 153.711 64.1872 154.103 64.188L164.313 64.2088L174.522 64.2296C174.914 64.2304 175.269 64.4625 175.426 64.8213L177.72 70.0529L180.273 75.8749C181.197 77.9829 182.751 79.6701 184.646 80.7693C186.541 81.8684 188.777 82.3796 191.066 82.1354Z",fill:"white"})}),e("g",{filter:"url(#filter2_d_4521_70814)",children:e("path",{d:"M189.326 111.983C191.959 129.166 177.369 143.757 160.186 141.124C149.478 139.484 140.726 130.732 139.086 120.025C136.454 102.842 151.044 88.2515 168.227 90.8838C178.934 92.5242 187.686 101.276 189.326 111.983Z",fill:"url(#paint4_linear_4521_70814)"})}),e("g",{filter:"url(#filter3_d_4521_70814)",children:e("path",{d:"M142.654 129.756L148.975 129.082L154.655 128.476C155.045 128.434 155.422 128.627 155.617 128.966L160.704 137.818L165.791 146.671C165.986 147.01 165.963 147.433 165.73 147.749L162.347 152.351L158.581 157.473C157.218 159.328 156.534 161.517 156.529 163.708C156.525 165.898 157.2 168.09 158.556 169.95L162.301 175.088L165.665 179.704C165.896 180.021 165.918 180.444 165.722 180.783L160.599 189.614L155.476 198.445C155.279 198.784 154.901 198.975 154.512 198.932L148.834 198.303L142.516 197.603C140.228 197.349 137.99 197.851 136.09 198.943C134.191 200.034 132.63 201.715 131.697 203.819L129.121 209.631L126.806 214.853C126.647 215.211 126.291 215.442 125.899 215.441L115.69 215.421L105.48 215.4C105.088 215.399 104.734 215.167 104.577 214.808L102.283 209.576L99.7297 203.754C98.8054 201.646 97.2515 199.959 95.3566 198.86C93.4617 197.761 91.2257 197.25 88.9369 197.494L82.6156 198.168L76.9354 198.774C76.5458 198.816 76.1683 198.623 75.9731 198.284L70.8863 189.432L65.7995 180.579C65.6042 180.24 65.628 179.817 65.8601 179.501L69.2437 174.898L73.0093 169.777C74.3727 167.922 75.057 165.733 75.0614 163.542C75.0659 161.352 74.3906 159.16 73.0347 157.299L69.29 152.162L65.9251 147.546C65.6943 147.229 65.6722 146.806 65.8688 146.467L70.9916 137.636L76.1145 128.805C76.3111 128.466 76.6893 128.275 77.0788 128.318L82.7564 128.947L89.0749 129.647C91.3627 129.901 93.6007 129.398 95.5001 128.307C97.3995 127.216 98.9602 125.535 99.8931 123.43L102.47 117.619L104.785 112.397C104.944 112.038 105.299 111.808 105.691 111.809L115.901 111.829L126.11 111.85C126.502 111.851 126.857 112.083 127.014 112.442L129.308 117.674L131.861 123.496C132.785 125.604 134.339 127.291 136.234 128.39C138.129 129.489 140.365 130 142.654 129.756Z",fill:"url(#paint5_linear_4521_70814)"})}),e("g",{opacity:"0.35",children:e("path",{d:"M106.142 113.495L115.897 113.515L125.652 113.535L127.764 118.35L130.317 124.172C131.369 126.571 133.123 128.534 135.388 129.848C137.252 130.93 139.376 131.501 141.528 131.501C141.962 131.501 142.4 131.478 142.832 131.432L149.154 130.758L154.382 130.2L159.242 138.659L164.103 147.116L160.989 151.353L157.223 156.475C155.671 158.585 154.849 161.085 154.843 163.704C154.838 166.323 155.65 168.826 157.193 170.944L160.938 176.081L164.035 180.33L159.141 188.768L154.246 197.206L149.02 196.628L142.701 195.927C142.253 195.877 141.798 195.852 141.348 195.852C139.213 195.852 137.105 196.416 135.25 197.481C132.979 198.786 131.218 200.741 130.156 203.136L127.579 208.947L125.449 213.755L115.693 213.735L105.938 213.715L103.827 208.9L101.273 203.078C100.222 200.679 98.468 198.716 96.2026 197.402C94.338 196.32 92.2147 195.748 90.0621 195.748C89.6287 195.748 89.19 195.771 88.758 195.818L82.4368 196.492L77.2083 197.05L72.3481 188.591L67.4876 180.133L70.6021 175.897L74.3676 170.775C75.9189 168.664 76.7417 166.165 76.7472 163.545C76.7527 160.926 75.9398 158.423 74.3972 156.307L70.6525 151.169L67.5553 146.92L72.45 138.482L77.345 130.043L82.5707 130.623L88.8895 131.322C89.3377 131.372 89.793 131.397 90.2426 131.397C92.3771 131.397 94.4857 130.834 96.3401 129.768C98.6107 128.464 100.372 126.508 101.434 124.114L104.011 118.302L106.142 113.495ZM105.69 111.808C105.298 111.808 104.944 112.039 104.785 112.396L102.47 117.619L99.8932 123.43C98.96 125.534 97.3994 127.215 95.5 128.307C93.9254 129.211 92.1181 129.711 90.2425 129.711C89.8559 129.711 89.466 129.69 89.0751 129.647L82.7563 128.947L77.0788 128.318C77.0421 128.314 77.0057 128.312 76.9696 128.312C76.6197 128.312 76.2927 128.497 76.1145 128.805L70.9917 137.636L65.8689 146.467C65.6724 146.806 65.6943 147.229 65.9251 147.546L69.2901 152.162L73.0348 157.299C74.3904 159.159 75.0659 161.351 75.0615 163.542C75.0569 165.732 74.3726 167.922 73.0094 169.776L69.2438 174.898L65.8602 179.501C65.628 179.816 65.6042 180.239 65.7994 180.579L70.8864 189.431L75.973 198.283C76.1507 198.593 76.479 198.78 76.83 198.78C76.865 198.78 76.9001 198.778 76.9354 198.774L82.6157 198.168L88.9368 197.494C89.3139 197.454 89.6892 197.434 90.0621 197.434C91.9527 197.434 93.7737 197.942 95.3566 198.86C97.2513 199.959 98.8051 201.646 99.7294 203.754L102.283 209.577L104.576 214.808C104.734 215.167 105.088 215.399 105.48 215.4L115.69 215.421L125.899 215.441H125.901C126.292 215.441 126.647 215.211 126.805 214.853L129.121 209.631L131.697 203.819C132.63 201.715 134.191 200.034 136.09 198.943C137.665 198.038 139.472 197.538 141.348 197.538C141.735 197.538 142.124 197.559 142.515 197.603L148.834 198.303L154.512 198.932C154.548 198.935 154.585 198.938 154.621 198.938C154.971 198.938 155.298 198.753 155.476 198.445L160.599 189.614L165.722 180.783C165.918 180.444 165.896 180.02 165.665 179.704L162.3 175.088L158.556 169.951C157.2 168.09 156.524 165.898 156.529 163.708C156.533 161.517 157.218 159.328 158.581 157.474L162.347 152.351L165.73 147.749C165.962 147.433 165.986 147.01 165.791 146.67L160.704 137.819L155.617 128.966C155.44 128.657 155.112 128.47 154.76 128.47C154.725 128.47 154.69 128.472 154.655 128.475L148.975 129.082L142.653 129.756C142.276 129.796 141.901 129.815 141.528 129.815C139.638 129.815 137.817 129.308 136.234 128.389C134.339 127.29 132.785 125.603 131.861 123.496L129.308 117.673L127.014 112.442C126.857 112.083 126.502 111.851 126.11 111.85L115.901 111.829L105.691 111.808L105.69 111.808Z",fill:"white"})}),e("path",{d:"M140.914 159.604C143.547 176.787 128.956 191.377 111.773 188.745C101.066 187.104 92.3142 178.353 90.6739 167.645C88.0415 150.462 102.632 135.872 119.815 138.504C130.522 140.145 139.274 148.896 140.914 159.604Z",fill:"url(#paint6_radial_4521_70814)"}),t("defs",{children:[t("filter",{id:"filter0_d_4521_70814",x:"-2.78298",y:"-2.782",width:"285.566",height:"285.564",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e("feOffset",{}),e("feGaussianBlur",{stdDeviation:"10.6659"}),e("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0"}),e("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4521_70814"}),e("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4521_70814",result:"shape"})]}),t("filter",{id:"filter1_d_4521_70814",x:"107.526",y:"60.9107",width:"113.363",height:"116.742",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e("feOffset",{dy:"3.27727"}),e("feGaussianBlur",{stdDeviation:"3.27727"}),e("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),e("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4521_70814"}),e("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4521_70814",result:"shape"})]}),t("filter",{id:"filter2_d_4521_70814",x:"133.254",y:"87.8136",width:"61.904",height:"61.9044",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e("feOffset",{dy:"2.76163"}),e("feGaussianBlur",{stdDeviation:"2.76163"}),e("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),e("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4521_70814"}),e("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4521_70814",result:"shape"})]}),t("filter",{id:"filter3_d_4521_70814",x:"59.1134",y:"108.531",width:"113.363",height:"116.742",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e("feOffset",{dy:"3.27727"}),e("feGaussianBlur",{stdDeviation:"3.27727"}),e("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),e("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4521_70814"}),e("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4521_70814",result:"shape"})]}),t("linearGradient",{id:"paint0_linear_4521_70814",x1:"140",y1:"0",x2:"140",y2:"280",gradientUnits:"userSpaceOnUse",children:[e("stop",{offset:"0.0018",stopColor:"#F6F5F7"}),e("stop",{offset:"0.2008",stopColor:"#F0F0F3"}),e("stop",{offset:"0.464",stopColor:"#DFE2E8"}),e("stop",{offset:"0.7618",stopColor:"#C4CCD7"}),e("stop",{offset:"1",stopColor:"#A9B7C6"})]}),t("linearGradient",{id:"paint1_linear_4521_70814",x1:"30.625",y1:"11.5857",x2:"249.375",y2:"268.414",gradientUnits:"userSpaceOnUse",children:[e("stop",{offset:"0.375",stopColor:"white"}),e("stop",{offset:"0.4241",stopColor:"#CCCCCC"}),e("stop",{offset:"0.4772",stopColor:"#9C9C9C"}),e("stop",{offset:"0.5336",stopColor:"#727272"}),e("stop",{offset:"0.5922",stopColor:"#4F4F4F"}),e("stop",{offset:"0.6538",stopColor:"#323232"}),e("stop",{offset:"0.7192",stopColor:"#1C1C1C"}),e("stop",{offset:"0.7902",stopColor:"#0C0C0C"}),e("stop",{offset:"0.8711",stopColor:"#020202"}),e("stop",{offset:"0.9832"})]}),t("radialGradient",{id:"paint2_radial_4521_70814",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(140.056 139.747) rotate(-90) scale(144.021 144.021)",children:[e("stop",{stopColor:"#D80070"}),e("stop",{offset:"0.9995",stopColor:"#3C00D9"})]}),t("radialGradient",{id:"paint3_radial_4521_70814",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(139.998 140) scale(119 119)",children:[e("stop",{stopColor:"#FE51A7"}),e("stop",{offset:"0.2267",stopColor:"#FE51A7",stopOpacity:"0.574109"}),e("stop",{offset:"0.7479",stopColor:"#FE51A7",stopOpacity:"0.0243048"}),e("stop",{offset:"0.8795",stopColor:"#FE51A7",stopOpacity:"0"})]}),t("linearGradient",{id:"paint4_linear_4521_70814",x1:"144.372",y1:"99.1304",x2:"186.42",y2:"134.902",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#E93582"}),e("stop",{offset:"1",stopColor:"#853CF2"})]}),t("linearGradient",{id:"paint5_linear_4521_70814",x1:"74.2792",y1:"123.692",x2:"155.579",y2:"201.892",gradientUnits:"userSpaceOnUse",children:[e("stop",{stopColor:"#E93582"}),e("stop",{offset:"1",stopColor:"#853CF2"})]}),t("radialGradient",{id:"paint6_radial_4521_70814",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(115.809 163.629) scale(25.4297 25.4297)",children:[e("stop",{offset:"0.606",stopColor:"white",stopOpacity:"0"}),e("stop",{offset:"0.6593",stopColor:"white",stopOpacity:"0.01"}),e("stop",{offset:"0.709",stopColor:"white",stopOpacity:"0.01"}),e("stop",{offset:"0.7574",stopColor:"white",stopOpacity:"0.0177156"}),e("stop",{offset:"0.805",stopColor:"white",stopOpacity:"0.0564062"}),e("stop",{offset:"0.8519",stopColor:"white",stopOpacity:"0.138533"}),e("stop",{offset:"0.8984",stopColor:"white",stopOpacity:"0.288691"}),e("stop",{offset:"0.9446",stopColor:"white",stopOpacity:"0.536996"}),e("stop",{offset:"0.9894",stopColor:"white",stopOpacity:"0.909162"}),e("stop",{offset:"0.9981",stopColor:"white"})]})]})]})}export{o as default};
2
2
  //# sourceMappingURL=CompletionAppIconBe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrillingAppIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/AppIcon/assets/DrillingAppIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,iBAAS,eAAe,CAAC,EACvB,KAAU,EACV,MAAW,EACX,SAAS,EACT,aAAa,EAAE,SAA6B,GAC7C,EAAE,SAAS,eAqGX;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"DrillingAppIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/AppIcon/assets/DrillingAppIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,iBAAS,eAAe,CAAC,EACvB,KAAU,EACV,MAAW,EACX,SAAS,EACT,aAAa,EAAE,SAA6B,GAC7C,EAAE,SAAS,eAqSX;AAED,eAAe,eAAe,CAAC"}