@corva/ui 3.73.0-7 → 3.73.0-8

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 (1103) hide show
  1. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  2. package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
  3. package/cjs-bundle/components/AddComment/Popup.js +1 -1
  4. package/cjs-bundle/components/AddComment/Popup.js.map +1 -1
  5. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  6. package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
  7. package/cjs-bundle/components/AnchorsList/AnchorsList.js +1 -1
  8. package/cjs-bundle/components/AnchorsList/AnchorsList.js.map +1 -1
  9. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  10. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  11. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/Annotation/index.js +1 -1
  12. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/Annotation/index.js.map +1 -1
  13. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js +1 -1
  14. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js.map +1 -1
  15. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js +1 -1
  16. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  17. package/cjs-bundle/components/Annotations/components/LastAnnotation/index.js +1 -1
  18. package/cjs-bundle/components/Annotations/components/LastAnnotation/index.js.map +1 -1
  19. package/cjs-bundle/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
  20. package/cjs-bundle/components/AppVersionsSelect/AppVersionsSelect.js.map +1 -1
  21. package/cjs-bundle/components/AssetEditor/AssetEditorAutocomplete.js +1 -1
  22. package/cjs-bundle/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
  23. package/cjs-bundle/components/AssetEditor/SingleAssetEditor.js +1 -1
  24. package/cjs-bundle/components/AssetEditor/SingleAssetEditor.js.map +1 -1
  25. package/cjs-bundle/components/AssetEditor/index.js +1 -1
  26. package/cjs-bundle/components/AssetEditor/index.js.map +1 -1
  27. package/cjs-bundle/components/AssetEditorV2/components/MultipleAssetsToggle.js +1 -1
  28. package/cjs-bundle/components/AssetEditorV2/components/MultipleAssetsToggle.js.map +1 -1
  29. package/cjs-bundle/components/AssetEditorV2/components/PrimaryAssetSelect.js +1 -1
  30. package/cjs-bundle/components/AssetEditorV2/components/PrimaryAssetSelect.js.map +1 -1
  31. package/cjs-bundle/components/AssetEditorV2/components/PrimaryAssetSelectV2.js +1 -1
  32. package/cjs-bundle/components/AssetEditorV2/components/PrimaryAssetSelectV2.js.map +1 -1
  33. package/cjs-bundle/components/AssetEditorV2/components/SecondaryAssetSelect.js +1 -1
  34. package/cjs-bundle/components/AssetEditorV2/components/SecondaryAssetSelect.js.map +1 -1
  35. package/cjs-bundle/components/AssetEditorV2/components/SelectItem.js +1 -1
  36. package/cjs-bundle/components/AssetEditorV2/components/SelectItem.js.map +1 -1
  37. package/cjs-bundle/components/AssetEditorV2/index.js +1 -1
  38. package/cjs-bundle/components/AssetEditorV2/index.js.map +1 -1
  39. package/cjs-bundle/components/Attachment/index.js +1 -1
  40. package/cjs-bundle/components/Attachment/index.js.map +1 -1
  41. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  42. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  43. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/index.js +1 -1
  44. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/index.js.map +1 -1
  45. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/NumberCircle.js +1 -1
  46. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/NumberCircle.js.map +1 -1
  47. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js +1 -1
  48. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js.map +1 -1
  49. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  50. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  51. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  52. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  53. package/cjs-bundle/components/Button/components/Button/index.js +1 -1
  54. package/cjs-bundle/components/Button/components/Button/index.js.map +1 -1
  55. package/cjs-bundle/components/Casing/CasingComponentIcon.js +1 -1
  56. package/cjs-bundle/components/Casing/CasingComponentIcon.js.map +1 -1
  57. package/cjs-bundle/components/Casing/CasingTableV2/CasingTableV2.js +1 -1
  58. package/cjs-bundle/components/Casing/CasingTableV2/CasingTableV2.js.map +1 -1
  59. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  60. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  61. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  62. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  63. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  64. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  65. package/cjs-bundle/components/Casing/CasingTile/CasingTile.js +1 -1
  66. package/cjs-bundle/components/Casing/CasingTile/CasingTile.js.map +1 -1
  67. package/cjs-bundle/components/Chart/components/ChartWrapper.js +1 -1
  68. package/cjs-bundle/components/Chart/components/ChartWrapper.js.map +1 -1
  69. package/cjs-bundle/components/Chart/components/buttons/ChartTypeButton.js +1 -1
  70. package/cjs-bundle/components/Chart/components/buttons/ChartTypeButton.js.map +1 -1
  71. package/cjs-bundle/components/Chart/components/buttons/DragToZoomButton.js +1 -1
  72. package/cjs-bundle/components/Chart/components/buttons/DragToZoomButton.js.map +1 -1
  73. package/cjs-bundle/components/Chart/components/buttons/HideAxesButton.js +1 -1
  74. package/cjs-bundle/components/Chart/components/buttons/HideAxesButton.js.map +1 -1
  75. package/cjs-bundle/components/Chart/components/buttons/PanButton.js +1 -1
  76. package/cjs-bundle/components/Chart/components/buttons/PanButton.js.map +1 -1
  77. package/cjs-bundle/components/Chart/components/buttons/ResetZoomButton.js +1 -1
  78. package/cjs-bundle/components/Chart/components/buttons/ResetZoomButton.js.map +1 -1
  79. package/cjs-bundle/components/Chart/components/buttons/ZoomInButton.js +1 -1
  80. package/cjs-bundle/components/Chart/components/buttons/ZoomInButton.js.map +1 -1
  81. package/cjs-bundle/components/Chart/components/buttons/ZoomOutButton.js +1 -1
  82. package/cjs-bundle/components/Chart/components/buttons/ZoomOutButton.js.map +1 -1
  83. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  84. package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
  85. package/cjs-bundle/components/CollapsibleContent.js +1 -1
  86. package/cjs-bundle/components/CollapsibleContent.js.map +1 -1
  87. package/cjs-bundle/components/ColorPicker/PaletteChromePicker/Palette/Palette.js +1 -1
  88. package/cjs-bundle/components/ColorPicker/PaletteChromePicker/Palette/Palette.js.map +1 -1
  89. package/cjs-bundle/components/CommentWrapper.js +1 -1
  90. package/cjs-bundle/components/CommentWrapper.js.map +1 -1
  91. package/cjs-bundle/components/CommentsInfo/index.js +1 -1
  92. package/cjs-bundle/components/CommentsInfo/index.js.map +1 -1
  93. package/cjs-bundle/components/CustomSelect/index.js +1 -1
  94. package/cjs-bundle/components/CustomSelect/index.js.map +1 -1
  95. package/cjs-bundle/components/DatePicker/index.js +1 -1
  96. package/cjs-bundle/components/DatePicker/index.js.map +1 -1
  97. package/cjs-bundle/components/DateTimePicker/index.js +1 -1
  98. package/cjs-bundle/components/DateTimePicker/index.js.map +1 -1
  99. package/cjs-bundle/components/DevCenter/AppHeader/AppHeader.js +1 -1
  100. package/cjs-bundle/components/DevCenter/AppHeader/AppHeader.js.map +1 -1
  101. package/cjs-bundle/components/DevCenter/AppHeader/PadMode.js +1 -1
  102. package/cjs-bundle/components/DevCenter/AppHeader/PadMode.js.map +1 -1
  103. package/cjs-bundle/components/DevCenter/AppsDataProvider/AppsDataProvider.js +1 -1
  104. package/cjs-bundle/components/DevCenter/AppsDataProvider/AppsDataProvider.js.map +1 -1
  105. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js.map +1 -1
  106. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  107. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  108. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
  109. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js.map +1 -1
  110. package/cjs-bundle/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js +1 -1
  111. package/cjs-bundle/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js.map +1 -1
  112. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  113. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
  114. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  115. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js.map +1 -1
  116. package/cjs-bundle/components/DevCenter/NavigationBar/NavigationBar.js +1 -1
  117. package/cjs-bundle/components/DevCenter/NavigationBar/NavigationBar.js.map +1 -1
  118. package/cjs-bundle/components/DevCenter/SideBar/SideBar.js +1 -1
  119. package/cjs-bundle/components/DevCenter/SideBar/SideBar.js.map +1 -1
  120. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  121. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  122. package/cjs-bundle/components/Drillstring/BHAComponentIcon.js +1 -1
  123. package/cjs-bundle/components/Drillstring/BHAComponentIcon.js.map +1 -1
  124. package/cjs-bundle/components/Drillstring/BHAComponentsTable/BHAComponentsTable.js +1 -1
  125. package/cjs-bundle/components/Drillstring/BHAComponentsTable/BHAComponentsTable.js.map +1 -1
  126. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  127. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  128. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  129. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  130. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  131. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  132. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  133. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  134. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  135. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  136. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  137. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  138. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  139. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  140. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Measurement.js +1 -1
  141. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Measurement.js.map +1 -1
  142. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  143. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  144. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/NozzleSize/index.js +1 -1
  145. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/NozzleSize/index.js.map +1 -1
  146. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  147. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  148. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/PressureLoss/index.js +1 -1
  149. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/PressureLoss/index.js.map +1 -1
  150. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  151. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  152. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  153. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  154. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  155. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  156. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Suggestions/Suggestions.js +1 -1
  157. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Suggestions/Suggestions.js.map +1 -1
  158. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  159. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  160. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  161. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  162. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.js +1 -1
  163. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.js.map +1 -1
  164. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/FormatedNumber.js +1 -1
  165. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/FormatedNumber.js.map +1 -1
  166. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/InputText.js +1 -1
  167. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/InputText.js.map +1 -1
  168. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.js +1 -1
  169. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.js.map +1 -1
  170. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/SelectField.js +1 -1
  171. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/SelectField.js.map +1 -1
  172. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/SharedEditorElements.js +1 -1
  173. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/SharedEditorElements.js.map +1 -1
  174. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/StaticField.js +1 -1
  175. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/StaticField.js.map +1 -1
  176. package/cjs-bundle/components/Drillstring/BHAList/BHAList.js +1 -1
  177. package/cjs-bundle/components/Drillstring/BHAList/BHAList.js.map +1 -1
  178. package/cjs-bundle/components/Drillstring/BHASchematic.js +1 -1
  179. package/cjs-bundle/components/Drillstring/BHASchematic.js.map +1 -1
  180. package/cjs-bundle/components/Drillstring/BHATile/BHATile.js +1 -1
  181. package/cjs-bundle/components/Drillstring/BHATile/BHATile.js.map +1 -1
  182. package/cjs-bundle/components/Drillstring/BhaIndicator/BhaIndicator.js +1 -1
  183. package/cjs-bundle/components/Drillstring/BhaIndicator/BhaIndicator.js.map +1 -1
  184. package/cjs-bundle/components/Drillstring/DrillstringDetail/DrillstringDetail.js +1 -1
  185. package/cjs-bundle/components/Drillstring/DrillstringDetail/DrillstringDetail.js.map +1 -1
  186. package/cjs-bundle/components/EChartsWrapper/EChartsWrapper.js +1 -1
  187. package/cjs-bundle/components/EChartsWrapper/EChartsWrapper.js.map +1 -1
  188. package/cjs-bundle/components/EditableItem/EditableItem/index.js +1 -1
  189. package/cjs-bundle/components/EditableItem/EditableItem/index.js.map +1 -1
  190. package/cjs-bundle/components/EditableItem/EditableItemWithBadge/index.js +1 -1
  191. package/cjs-bundle/components/EditableItem/EditableItemWithBadge/index.js.map +1 -1
  192. package/cjs-bundle/components/EmbeddedApp/DevCenterEmbeddedApp.js +1 -1
  193. package/cjs-bundle/components/EmbeddedApp/DevCenterEmbeddedApp.js.map +1 -1
  194. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js +1 -1
  195. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  196. package/cjs-bundle/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js +1 -1
  197. package/cjs-bundle/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js.map +1 -1
  198. package/cjs-bundle/components/FailedFileUploading.js +1 -1
  199. package/cjs-bundle/components/FailedFileUploading.js.map +1 -1
  200. package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
  201. package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
  202. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditModal.js +1 -1
  203. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditModal.js.map +1 -1
  204. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  205. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  206. package/cjs-bundle/components/FeedItem/components/FeedComments.js +1 -1
  207. package/cjs-bundle/components/FeedItem/components/FeedComments.js.map +1 -1
  208. package/cjs-bundle/components/FeedItem/components/LessonsLearnedLeafIcon.js +1 -1
  209. package/cjs-bundle/components/FeedItem/components/LessonsLearnedLeafIcon.js.map +1 -1
  210. package/cjs-bundle/components/FeedItem/feedItemTypes/AlertFeedItem.js +1 -1
  211. package/cjs-bundle/components/FeedItem/feedItemTypes/AlertFeedItem.js.map +1 -1
  212. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  213. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  214. package/cjs-bundle/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/AccuracyPlan.js +1 -1
  215. package/cjs-bundle/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/AccuracyPlan.js.map +1 -1
  216. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/components/TargetChanges.js +1 -1
  217. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/components/TargetChanges.js.map +1 -1
  218. package/cjs-bundle/components/FileTypeIcon.js +1 -1
  219. package/cjs-bundle/components/FileTypeIcon.js.map +1 -1
  220. package/cjs-bundle/components/FilesLoader/FilesLoader.js +1 -1
  221. package/cjs-bundle/components/FilesLoader/FilesLoader.js.map +1 -1
  222. package/cjs-bundle/components/FolderMenuItem/components/FolderIcon.js +1 -1
  223. package/cjs-bundle/components/FolderMenuItem/components/FolderIcon.js.map +1 -1
  224. package/cjs-bundle/components/FolderMenuItem/index.js +1 -1
  225. package/cjs-bundle/components/FolderMenuItem/index.js.map +1 -1
  226. package/cjs-bundle/components/FolderMenuItemWithLinks/index.js +1 -1
  227. package/cjs-bundle/components/FolderMenuItemWithLinks/index.js.map +1 -1
  228. package/cjs-bundle/components/Formula/RootXIcon.js +1 -1
  229. package/cjs-bundle/components/Formula/RootXIcon.js.map +1 -1
  230. package/cjs-bundle/components/GoogleDocsViewer/index.js +1 -1
  231. package/cjs-bundle/components/GoogleDocsViewer/index.js.map +1 -1
  232. package/cjs-bundle/components/IconMenu/index.js +1 -1
  233. package/cjs-bundle/components/IconMenu/index.js.map +1 -1
  234. package/cjs-bundle/components/Icons/AnnotationIcon.js +1 -1
  235. package/cjs-bundle/components/Icons/AnnotationIcon.js.map +1 -1
  236. package/cjs-bundle/components/Icons/AttachIcon.js +1 -1
  237. package/cjs-bundle/components/Icons/AttachIcon.js.map +1 -1
  238. package/cjs-bundle/components/Icons/EmojiIcon.js +1 -1
  239. package/cjs-bundle/components/Icons/EmojiIcon.js.map +1 -1
  240. package/cjs-bundle/components/Icons/RecommendationIcon.js +1 -1
  241. package/cjs-bundle/components/Icons/RecommendationIcon.js.map +1 -1
  242. package/cjs-bundle/components/Icons/SendIcon.js +1 -1
  243. package/cjs-bundle/components/Icons/SendIcon.js.map +1 -1
  244. package/cjs-bundle/components/KeyboardDateTimePicker.js +1 -1
  245. package/cjs-bundle/components/KeyboardDateTimePicker.js.map +1 -1
  246. package/cjs-bundle/components/LabelsCounter/LabelsCounter.js +1 -1
  247. package/cjs-bundle/components/LabelsCounter/LabelsCounter.js.map +1 -1
  248. package/cjs-bundle/components/LoadingIndicator/FullScreenLoadingIndicator.js +1 -1
  249. package/cjs-bundle/components/LoadingIndicator/FullScreenLoadingIndicator.js.map +1 -1
  250. package/cjs-bundle/components/LoadingIndicator/InlineLoadingIndicator.js +1 -1
  251. package/cjs-bundle/components/LoadingIndicator/InlineLoadingIndicator.js.map +1 -1
  252. package/cjs-bundle/components/LoadingIndicator/Loader.js +1 -1
  253. package/cjs-bundle/components/LoadingIndicator/Loader.js.map +1 -1
  254. package/cjs-bundle/components/MiddleTruncate/MiddleTruncate.js +1 -1
  255. package/cjs-bundle/components/MiddleTruncate/MiddleTruncate.js.map +1 -1
  256. package/cjs-bundle/components/OffsetWellButton/OffsetWellButton.js +1 -1
  257. package/cjs-bundle/components/OffsetWellButton/OffsetWellButton.js.map +1 -1
  258. package/cjs-bundle/components/OffsetWellChips/Chip.js +1 -1
  259. package/cjs-bundle/components/OffsetWellChips/Chip.js.map +1 -1
  260. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  261. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  262. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ClearFiltersButton.js +1 -1
  263. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ClearFiltersButton.js.map +1 -1
  264. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/MultiSelect.js +1 -1
  265. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/MultiSelect.js.map +1 -1
  266. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
  267. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js.map +1 -1
  268. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/RadiusInput.js +1 -1
  269. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/RadiusInput.js.map +1 -1
  270. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  271. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js.map +1 -1
  272. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SingleSelect.js +1 -1
  273. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SingleSelect.js.map +1 -1
  274. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SubjectWellSearch.js +1 -1
  275. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SubjectWellSearch.js.map +1 -1
  276. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  277. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  278. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/index.js +1 -1
  279. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/index.js.map +1 -1
  280. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  281. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  282. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/index.js +1 -1
  283. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/index.js.map +1 -1
  284. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  285. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  286. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsSelect.js +1 -1
  287. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsSelect.js.map +1 -1
  288. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/index.js +1 -1
  289. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/index.js.map +1 -1
  290. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/index.js +1 -1
  291. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/index.js.map +1 -1
  292. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  293. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  294. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/index.js +1 -1
  295. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/index.js.map +1 -1
  296. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  297. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  298. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/index.js +1 -1
  299. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/index.js.map +1 -1
  300. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  301. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  302. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  303. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  304. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  305. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  306. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  307. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  308. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  309. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  310. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  311. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  312. package/cjs-bundle/components/OffsetWellPickerV3/index.js +1 -1
  313. package/cjs-bundle/components/OffsetWellPickerV3/index.js.map +1 -1
  314. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  315. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  316. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  317. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  318. package/cjs-bundle/components/PadOffsetsPicker/OffsetAssetChip.js +1 -1
  319. package/cjs-bundle/components/PadOffsetsPicker/OffsetAssetChip.js.map +1 -1
  320. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  321. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  322. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  323. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  324. package/cjs-bundle/components/ParameterCharts/AddEditTrack.js +1 -1
  325. package/cjs-bundle/components/ParameterCharts/AddEditTrack.js.map +1 -1
  326. package/cjs-bundle/components/ParameterCharts/ParameterCharts.js +1 -1
  327. package/cjs-bundle/components/ParameterCharts/ParameterCharts.js.map +1 -1
  328. package/cjs-bundle/components/ParameterCharts/components/TraceHeader.js +1 -1
  329. package/cjs-bundle/components/ParameterCharts/components/TraceHeader.js.map +1 -1
  330. package/cjs-bundle/components/ParameterCharts/components/TraceSelect.js +1 -1
  331. package/cjs-bundle/components/ParameterCharts/components/TraceSelect.js.map +1 -1
  332. package/cjs-bundle/components/ParameterCharts/components/Track.js +1 -1
  333. package/cjs-bundle/components/ParameterCharts/components/Track.js.map +1 -1
  334. package/cjs-bundle/components/PinnableFilters/PinnableFilters.js +1 -1
  335. package/cjs-bundle/components/PinnableFilters/PinnableFilters.js.map +1 -1
  336. package/cjs-bundle/components/Popover/Popover.js +1 -1
  337. package/cjs-bundle/components/Popover/Popover.js.map +1 -1
  338. package/cjs-bundle/components/Popper/Popper.js +1 -1
  339. package/cjs-bundle/components/Popper/Popper.js.map +1 -1
  340. package/cjs-bundle/components/PostInput/PostInput.js +1 -1
  341. package/cjs-bundle/components/PostInput/PostInput.js.map +1 -1
  342. package/cjs-bundle/components/PriceInput/FormattedNumber.js +1 -1
  343. package/cjs-bundle/components/PriceInput/FormattedNumber.js.map +1 -1
  344. package/cjs-bundle/components/PriceInput/PriceInput.js +1 -1
  345. package/cjs-bundle/components/PriceInput/PriceInput.js.map +1 -1
  346. package/cjs-bundle/components/SearchInput/index.js +1 -1
  347. package/cjs-bundle/components/SearchInput/index.js.map +1 -1
  348. package/cjs-bundle/components/SettingEditors/DropdownEditor/index.js +1 -1
  349. package/cjs-bundle/components/SettingEditors/DropdownEditor/index.js.map +1 -1
  350. package/cjs-bundle/components/SlateFormattedText/Elements/ImageElement/ImageElement.js +1 -1
  351. package/cjs-bundle/components/SlateFormattedText/Elements/ImageElement/ImageElement.js.map +1 -1
  352. package/cjs-bundle/components/SlateFormattedText/SlateFormattedText.js +1 -1
  353. package/cjs-bundle/components/SlateFormattedText/SlateFormattedText.js.map +1 -1
  354. package/cjs-bundle/components/StageDesignVActual/ComparisonBar/ComparisonBar.js +1 -1
  355. package/cjs-bundle/components/StageDesignVActual/ComparisonBar/ComparisonBar.js.map +1 -1
  356. package/cjs-bundle/components/StageDesignVActual/ComparisonHeader.js +1 -1
  357. package/cjs-bundle/components/StageDesignVActual/ComparisonHeader.js.map +1 -1
  358. package/cjs-bundle/components/StageDesignVActual/ComparisonRow.js +1 -1
  359. package/cjs-bundle/components/StageDesignVActual/ComparisonRow.js.map +1 -1
  360. package/cjs-bundle/components/StageDesignVActual/ElementsComparison/ElementsComparison.js +1 -1
  361. package/cjs-bundle/components/StageDesignVActual/ElementsComparison/ElementsComparison.js.map +1 -1
  362. package/cjs-bundle/components/SwitchControl/index.js +1 -1
  363. package/cjs-bundle/components/SwitchControl/index.js.map +1 -1
  364. package/cjs-bundle/components/Template/TemplatePopover/index.js +1 -1
  365. package/cjs-bundle/components/Template/TemplatePopover/index.js.map +1 -1
  366. package/cjs-bundle/components/Template/TemplateSharingDialog/index.js +1 -1
  367. package/cjs-bundle/components/Template/TemplateSharingDialog/index.js.map +1 -1
  368. package/cjs-bundle/components/TracesEditModal/TracesEditModal.js +1 -1
  369. package/cjs-bundle/components/TracesEditModal/TracesEditModal.js.map +1 -1
  370. package/cjs-bundle/components/UserCard/index.js +1 -1
  371. package/cjs-bundle/components/UserCard/index.js.map +1 -1
  372. package/cjs-bundle/components/UserCardPopover.js +1 -1
  373. package/cjs-bundle/components/UserCardPopover.js.map +1 -1
  374. package/cjs-bundle/components/UserMention/index.js +1 -1
  375. package/cjs-bundle/components/UserMention/index.js.map +1 -1
  376. package/cjs-bundle/components/WellSummary/ActivitySummaryChart.js +1 -1
  377. package/cjs-bundle/components/WellSummary/ActivitySummaryChart.js.map +1 -1
  378. package/cjs-bundle/components/WellSummary/FracWirelineTimeChart.js +1 -1
  379. package/cjs-bundle/components/WellSummary/FracWirelineTimeChart.js.map +1 -1
  380. package/cjs-bundle/components/WellSummary/WellSummaryItemLabel.js +1 -1
  381. package/cjs-bundle/components/WellSummary/WellSummaryItemLabel.js.map +1 -1
  382. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  383. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  384. package/components/AddComment/Popover.d.ts +9 -15
  385. package/components/AddComment/Popover.d.ts.map +1 -1
  386. package/components/AddComment/Popover.js +1 -1
  387. package/components/AddComment/Popover.js.map +1 -1
  388. package/components/AddComment/Popup.d.ts +8 -16
  389. package/components/AddComment/Popup.d.ts.map +1 -1
  390. package/components/AddComment/Popup.js +1 -1
  391. package/components/AddComment/Popup.js.map +1 -1
  392. package/components/AddComment/components/Content.d.ts +8 -15
  393. package/components/AddComment/components/Content.d.ts.map +1 -1
  394. package/components/AddComment/components/Content.js +1 -1
  395. package/components/AddComment/components/Content.js.map +1 -1
  396. package/components/AnchorsList/AnchorsList.d.ts +0 -4
  397. package/components/AnchorsList/AnchorsList.d.ts.map +1 -1
  398. package/components/AnchorsList/AnchorsList.js +1 -1
  399. package/components/AnchorsList/AnchorsList.js.map +1 -1
  400. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  401. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  402. package/components/Annotations/components/AnnotationsList/components/Annotation/index.js +1 -1
  403. package/components/Annotations/components/AnnotationsList/components/Annotation/index.js.map +1 -1
  404. package/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.d.ts +11 -56
  405. package/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.d.ts.map +1 -1
  406. package/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js +1 -1
  407. package/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js.map +1 -1
  408. package/components/Annotations/components/AnnotationsList/index.d.ts +18 -22
  409. package/components/Annotations/components/AnnotationsList/index.js +1 -1
  410. package/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  411. package/components/Annotations/components/LastAnnotation/index.js +1 -1
  412. package/components/Annotations/components/LastAnnotation/index.js.map +1 -1
  413. package/components/AppVersionsSelect/AppVersionsSelect.d.ts +7 -16
  414. package/components/AppVersionsSelect/AppVersionsSelect.d.ts.map +1 -1
  415. package/components/AppVersionsSelect/AppVersionsSelect.js +1 -1
  416. package/components/AppVersionsSelect/AppVersionsSelect.js.map +1 -1
  417. package/components/AssetEditor/AssetEditorAutocomplete.d.ts +13 -96
  418. package/components/AssetEditor/AssetEditorAutocomplete.d.ts.map +1 -1
  419. package/components/AssetEditor/AssetEditorAutocomplete.js +1 -1
  420. package/components/AssetEditor/AssetEditorAutocomplete.js.map +1 -1
  421. package/components/AssetEditor/SingleAssetEditor.d.ts +2 -29
  422. package/components/AssetEditor/SingleAssetEditor.js +1 -1
  423. package/components/AssetEditor/SingleAssetEditor.js.map +1 -1
  424. package/components/AssetEditor/index.d.ts +3 -9
  425. package/components/AssetEditor/index.d.ts.map +1 -1
  426. package/components/AssetEditor/index.js +1 -1
  427. package/components/AssetEditor/index.js.map +1 -1
  428. package/components/AssetEditorV2/components/MultipleAssetsToggle.d.ts +3 -8
  429. package/components/AssetEditorV2/components/MultipleAssetsToggle.d.ts.map +1 -1
  430. package/components/AssetEditorV2/components/MultipleAssetsToggle.js +1 -1
  431. package/components/AssetEditorV2/components/MultipleAssetsToggle.js.map +1 -1
  432. package/components/AssetEditorV2/components/PrimaryAssetSelect.d.ts +8 -14
  433. package/components/AssetEditorV2/components/PrimaryAssetSelect.d.ts.map +1 -1
  434. package/components/AssetEditorV2/components/PrimaryAssetSelect.js +1 -1
  435. package/components/AssetEditorV2/components/PrimaryAssetSelect.js.map +1 -1
  436. package/components/AssetEditorV2/components/PrimaryAssetSelectV2.d.ts +8 -14
  437. package/components/AssetEditorV2/components/PrimaryAssetSelectV2.d.ts.map +1 -1
  438. package/components/AssetEditorV2/components/PrimaryAssetSelectV2.js +1 -1
  439. package/components/AssetEditorV2/components/PrimaryAssetSelectV2.js.map +1 -1
  440. package/components/AssetEditorV2/components/SecondaryAssetSelect.d.ts +0 -10
  441. package/components/AssetEditorV2/components/SecondaryAssetSelect.d.ts.map +1 -1
  442. package/components/AssetEditorV2/components/SecondaryAssetSelect.js +1 -1
  443. package/components/AssetEditorV2/components/SecondaryAssetSelect.js.map +1 -1
  444. package/components/AssetEditorV2/components/SelectItem.d.ts.map +1 -1
  445. package/components/AssetEditorV2/components/SelectItem.js +1 -1
  446. package/components/AssetEditorV2/components/SelectItem.js.map +1 -1
  447. package/components/AssetEditorV2/index.d.ts +12 -28
  448. package/components/AssetEditorV2/index.d.ts.map +1 -1
  449. package/components/AssetEditorV2/index.js +1 -1
  450. package/components/AssetEditorV2/index.js.map +1 -1
  451. package/components/Attachment/index.d.ts +2 -16
  452. package/components/Attachment/index.js +1 -1
  453. package/components/Attachment/index.js.map +1 -1
  454. package/components/BICOffsetPickerDialog/components/Map/Map.d.ts +5 -5
  455. package/components/BICOffsetPickerDialog/components/Map/Map.d.ts.map +1 -1
  456. package/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  457. package/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  458. package/components/BICOffsetPickerDialog/components/Map/index.d.ts +3 -3
  459. package/components/BICOffsetPickerDialog/components/Map/index.d.ts.map +1 -1
  460. package/components/BICOffsetPickerDialog/components/Map/index.js +1 -1
  461. package/components/BICOffsetPickerDialog/components/Map/index.js.map +1 -1
  462. package/components/BICOffsetPickerDialog/components/WellSection/NumberCircle.d.ts +4 -10
  463. package/components/BICOffsetPickerDialog/components/WellSection/NumberCircle.d.ts.map +1 -1
  464. package/components/BICOffsetPickerDialog/components/WellSection/NumberCircle.js +1 -1
  465. package/components/BICOffsetPickerDialog/components/WellSection/NumberCircle.js.map +1 -1
  466. package/components/BICOffsetPickerDialog/components/WellSection/SectionItem.d.ts +5 -5
  467. package/components/BICOffsetPickerDialog/components/WellSection/SectionItem.d.ts.map +1 -1
  468. package/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js +1 -1
  469. package/components/BICOffsetPickerDialog/components/WellSection/SectionItem.js.map +1 -1
  470. package/components/BICOffsetPickerDialog/components/WellSection/index.d.ts +2 -2
  471. package/components/BICOffsetPickerDialog/components/WellSection/index.d.ts.map +1 -1
  472. package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  473. package/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  474. package/components/BICOffsetPickerDialog/index.d.ts +5 -12
  475. package/components/BICOffsetPickerDialog/index.d.ts.map +1 -1
  476. package/components/BICOffsetPickerDialog/index.js +1 -1
  477. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  478. package/components/Button/components/Button/index.d.ts.map +1 -1
  479. package/components/Button/components/Button/index.js +1 -1
  480. package/components/Button/components/Button/index.js.map +1 -1
  481. package/components/Casing/CasingComponentIcon.d.ts +2 -6
  482. package/components/Casing/CasingComponentIcon.d.ts.map +1 -1
  483. package/components/Casing/CasingComponentIcon.js +1 -1
  484. package/components/Casing/CasingComponentIcon.js.map +1 -1
  485. package/components/Casing/CasingTableV2/CasingTableV2.d.ts +4 -10
  486. package/components/Casing/CasingTableV2/CasingTableV2.d.ts.map +1 -1
  487. package/components/Casing/CasingTableV2/CasingTableV2.js +1 -1
  488. package/components/Casing/CasingTableV2/CasingTableV2.js.map +1 -1
  489. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.d.ts +2 -2
  490. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.d.ts.map +1 -1
  491. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  492. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  493. package/components/Casing/CasingTableV2/components/Component.d.ts +3 -3
  494. package/components/Casing/CasingTableV2/components/Component.d.ts.map +1 -1
  495. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  496. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  497. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.d.ts +2 -2
  498. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.d.ts.map +1 -1
  499. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  500. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  501. package/components/Casing/CasingTile/CasingTile.d.ts +4 -9
  502. package/components/Casing/CasingTile/CasingTile.d.ts.map +1 -1
  503. package/components/Casing/CasingTile/CasingTile.js +1 -1
  504. package/components/Casing/CasingTile/CasingTile.js.map +1 -1
  505. package/components/Chart/components/ChartWrapper.d.ts +4 -8
  506. package/components/Chart/components/ChartWrapper.d.ts.map +1 -1
  507. package/components/Chart/components/ChartWrapper.js +1 -1
  508. package/components/Chart/components/ChartWrapper.js.map +1 -1
  509. package/components/Chart/components/buttons/ChartTypeButton.d.ts +4 -9
  510. package/components/Chart/components/buttons/ChartTypeButton.d.ts.map +1 -1
  511. package/components/Chart/components/buttons/ChartTypeButton.js +1 -1
  512. package/components/Chart/components/buttons/ChartTypeButton.js.map +1 -1
  513. package/components/Chart/components/buttons/DragToZoomButton.d.ts +5 -10
  514. package/components/Chart/components/buttons/DragToZoomButton.d.ts.map +1 -1
  515. package/components/Chart/components/buttons/DragToZoomButton.js +1 -1
  516. package/components/Chart/components/buttons/DragToZoomButton.js.map +1 -1
  517. package/components/Chart/components/buttons/HideAxesButton.d.ts +4 -6
  518. package/components/Chart/components/buttons/HideAxesButton.d.ts.map +1 -1
  519. package/components/Chart/components/buttons/HideAxesButton.js +1 -1
  520. package/components/Chart/components/buttons/HideAxesButton.js.map +1 -1
  521. package/components/Chart/components/buttons/PanButton.d.ts +5 -10
  522. package/components/Chart/components/buttons/PanButton.d.ts.map +1 -1
  523. package/components/Chart/components/buttons/PanButton.js +1 -1
  524. package/components/Chart/components/buttons/PanButton.js.map +1 -1
  525. package/components/Chart/components/buttons/ResetZoomButton.d.ts +5 -11
  526. package/components/Chart/components/buttons/ResetZoomButton.d.ts.map +1 -1
  527. package/components/Chart/components/buttons/ResetZoomButton.js +1 -1
  528. package/components/Chart/components/buttons/ResetZoomButton.js.map +1 -1
  529. package/components/Chart/components/buttons/ZoomInButton.d.ts +5 -9
  530. package/components/Chart/components/buttons/ZoomInButton.d.ts.map +1 -1
  531. package/components/Chart/components/buttons/ZoomInButton.js +1 -1
  532. package/components/Chart/components/buttons/ZoomInButton.js.map +1 -1
  533. package/components/Chart/components/buttons/ZoomOutButton.d.ts +5 -9
  534. package/components/Chart/components/buttons/ZoomOutButton.d.ts.map +1 -1
  535. package/components/Chart/components/buttons/ZoomOutButton.js +1 -1
  536. package/components/Chart/components/buttons/ZoomOutButton.js.map +1 -1
  537. package/components/CollapsableSidebar.d.ts +8 -33
  538. package/components/CollapsableSidebar.d.ts.map +1 -1
  539. package/components/CollapsableSidebar.js +1 -1
  540. package/components/CollapsableSidebar.js.map +1 -1
  541. package/components/CollapsibleContent.d.ts +1 -4
  542. package/components/CollapsibleContent.d.ts.map +1 -1
  543. package/components/CollapsibleContent.js +1 -1
  544. package/components/CollapsibleContent.js.map +1 -1
  545. package/components/ColorPicker/PaletteChromePicker/Palette/Palette.js +1 -1
  546. package/components/ColorPicker/PaletteChromePicker/Palette/Palette.js.map +1 -1
  547. package/components/CommentWrapper.d.ts +12 -16
  548. package/components/CommentWrapper.js +1 -1
  549. package/components/CommentWrapper.js.map +1 -1
  550. package/components/CommentsInfo/index.d.ts +23 -30
  551. package/components/CommentsInfo/index.d.ts.map +1 -1
  552. package/components/CommentsInfo/index.js +1 -1
  553. package/components/CommentsInfo/index.js.map +1 -1
  554. package/components/CustomSelect/index.d.ts +3 -6
  555. package/components/CustomSelect/index.d.ts.map +1 -1
  556. package/components/CustomSelect/index.js +1 -1
  557. package/components/CustomSelect/index.js.map +1 -1
  558. package/components/DatePicker/index.d.ts +1 -5
  559. package/components/DatePicker/index.d.ts.map +1 -1
  560. package/components/DatePicker/index.js +1 -1
  561. package/components/DatePicker/index.js.map +1 -1
  562. package/components/DateTimePicker/index.d.ts +0 -5
  563. package/components/DateTimePicker/index.d.ts.map +1 -1
  564. package/components/DateTimePicker/index.js +1 -1
  565. package/components/DateTimePicker/index.js.map +1 -1
  566. package/components/DevCenter/AppHeader/AppHeader.d.ts +18 -40
  567. package/components/DevCenter/AppHeader/AppHeader.d.ts.map +1 -1
  568. package/components/DevCenter/AppHeader/AppHeader.js +1 -1
  569. package/components/DevCenter/AppHeader/AppHeader.js.map +1 -1
  570. package/components/DevCenter/AppHeader/PadMode.d.ts +4 -14
  571. package/components/DevCenter/AppHeader/PadMode.d.ts.map +1 -1
  572. package/components/DevCenter/AppHeader/PadMode.js +1 -1
  573. package/components/DevCenter/AppHeader/PadMode.js.map +1 -1
  574. package/components/DevCenter/AppsDataProvider/AppsDataProvider.d.ts +1 -5
  575. package/components/DevCenter/AppsDataProvider/AppsDataProvider.d.ts.map +1 -1
  576. package/components/DevCenter/AppsDataProvider/AppsDataProvider.js +1 -1
  577. package/components/DevCenter/AppsDataProvider/AppsDataProvider.js.map +1 -1
  578. package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.d.ts +3 -8
  579. package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.d.ts.map +1 -1
  580. package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js.map +1 -1
  581. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.d.ts +5 -11
  582. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.d.ts.map +1 -1
  583. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  584. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  585. package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.d.ts +1 -9
  586. package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.d.ts.map +1 -1
  587. package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
  588. package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js.map +1 -1
  589. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.d.ts +1 -13
  590. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.d.ts.map +1 -1
  591. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js +1 -1
  592. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js.map +1 -1
  593. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.d.ts.map +1 -1
  594. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js +1 -1
  595. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js.map +1 -1
  596. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.d.ts +3 -8
  597. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.d.ts.map +1 -1
  598. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  599. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js.map +1 -1
  600. package/components/DevCenter/NavigationBar/NavigationBar.d.ts +5 -13
  601. package/components/DevCenter/NavigationBar/NavigationBar.d.ts.map +1 -1
  602. package/components/DevCenter/NavigationBar/NavigationBar.js +1 -1
  603. package/components/DevCenter/NavigationBar/NavigationBar.js.map +1 -1
  604. package/components/DevCenter/SideBar/SideBar.d.ts +11 -35
  605. package/components/DevCenter/SideBar/SideBar.d.ts.map +1 -1
  606. package/components/DevCenter/SideBar/SideBar.js +1 -1
  607. package/components/DevCenter/SideBar/SideBar.js.map +1 -1
  608. package/components/DevCenter/icons/CorvaLogoSmall.d.ts +3 -8
  609. package/components/DevCenter/icons/CorvaLogoSmall.d.ts.map +1 -1
  610. package/components/DevCenter/icons/DevCenterIcon.d.ts +3 -8
  611. package/components/DevCenter/icons/DevCenterIcon.d.ts.map +1 -1
  612. package/components/DocumentViewer/DocumentViewer.d.ts +1 -6
  613. package/components/DocumentViewer/DocumentViewer.d.ts.map +1 -1
  614. package/components/DocumentViewer/DocumentViewer.js +1 -1
  615. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  616. package/components/Drillstring/BHAComponentIcon.d.ts +2 -6
  617. package/components/Drillstring/BHAComponentIcon.d.ts.map +1 -1
  618. package/components/Drillstring/BHAComponentIcon.js +1 -1
  619. package/components/Drillstring/BHAComponentIcon.js.map +1 -1
  620. package/components/Drillstring/BHAComponentsTable/BHAComponentsTable.d.ts +4 -10
  621. package/components/Drillstring/BHAComponentsTable/BHAComponentsTable.d.ts.map +1 -1
  622. package/components/Drillstring/BHAComponentsTable/BHAComponentsTable.js +1 -1
  623. package/components/Drillstring/BHAComponentsTable/BHAComponentsTable.js.map +1 -1
  624. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.d.ts +1 -1
  625. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.d.ts.map +1 -1
  626. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  627. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  628. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.d.ts +1 -1
  629. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.d.ts.map +1 -1
  630. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  631. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  632. package/components/Drillstring/BHAComponentsTable/components/Component.d.ts +3 -3
  633. package/components/Drillstring/BHAComponentsTable/components/Component.d.ts.map +1 -1
  634. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  635. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  636. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.d.ts +1 -1
  637. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.d.ts.map +1 -1
  638. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  639. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  640. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.d.ts +2 -2
  641. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.d.ts.map +1 -1
  642. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  643. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  644. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.d.ts +1 -1
  645. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.d.ts.map +1 -1
  646. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  647. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  648. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.d.ts +1 -1
  649. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.d.ts.map +1 -1
  650. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  651. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  652. package/components/Drillstring/BHAComponentsTable/components/Lwd/Measurement.d.ts +4 -4
  653. package/components/Drillstring/BHAComponentsTable/components/Lwd/Measurement.d.ts.map +1 -1
  654. package/components/Drillstring/BHAComponentsTable/components/Lwd/Measurement.js +1 -1
  655. package/components/Drillstring/BHAComponentsTable/components/Lwd/Measurement.js.map +1 -1
  656. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.d.ts +1 -1
  657. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.d.ts.map +1 -1
  658. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  659. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  660. package/components/Drillstring/BHAComponentsTable/components/NozzleSize/index.d.ts +4 -4
  661. package/components/Drillstring/BHAComponentsTable/components/NozzleSize/index.d.ts.map +1 -1
  662. package/components/Drillstring/BHAComponentsTable/components/NozzleSize/index.js +1 -1
  663. package/components/Drillstring/BHAComponentsTable/components/NozzleSize/index.js.map +1 -1
  664. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.d.ts +1 -1
  665. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.d.ts.map +1 -1
  666. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  667. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  668. package/components/Drillstring/BHAComponentsTable/components/PressureLoss/index.d.ts +5 -5
  669. package/components/Drillstring/BHAComponentsTable/components/PressureLoss/index.d.ts.map +1 -1
  670. package/components/Drillstring/BHAComponentsTable/components/PressureLoss/index.js +1 -1
  671. package/components/Drillstring/BHAComponentsTable/components/PressureLoss/index.js.map +1 -1
  672. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.d.ts +1 -1
  673. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.d.ts.map +1 -1
  674. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  675. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  676. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.d.ts +1 -1
  677. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.d.ts.map +1 -1
  678. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  679. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  680. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.d.ts +1 -1
  681. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.d.ts.map +1 -1
  682. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  683. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  684. package/components/Drillstring/BHAComponentsTable/components/Suggestions/Suggestions.d.ts +2 -2
  685. package/components/Drillstring/BHAComponentsTable/components/Suggestions/Suggestions.d.ts.map +1 -1
  686. package/components/Drillstring/BHAComponentsTable/components/Suggestions/Suggestions.js +1 -1
  687. package/components/Drillstring/BHAComponentsTable/components/Suggestions/Suggestions.js.map +1 -1
  688. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.d.ts +1 -1
  689. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.d.ts.map +1 -1
  690. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  691. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  692. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  693. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  694. package/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.d.ts +1 -4
  695. package/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.d.ts.map +1 -1
  696. package/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.js +1 -1
  697. package/components/Drillstring/BHAComponentsTable/components/shared/ExpandCollapseButton.js.map +1 -1
  698. package/components/Drillstring/BHAComponentsTable/components/shared/FormatedNumber.d.ts +3 -8
  699. package/components/Drillstring/BHAComponentsTable/components/shared/FormatedNumber.d.ts.map +1 -1
  700. package/components/Drillstring/BHAComponentsTable/components/shared/FormatedNumber.js +1 -1
  701. package/components/Drillstring/BHAComponentsTable/components/shared/FormatedNumber.js.map +1 -1
  702. package/components/Drillstring/BHAComponentsTable/components/shared/InputText.d.ts +4 -10
  703. package/components/Drillstring/BHAComponentsTable/components/shared/InputText.d.ts.map +1 -1
  704. package/components/Drillstring/BHAComponentsTable/components/shared/InputText.js +1 -1
  705. package/components/Drillstring/BHAComponentsTable/components/shared/InputText.js.map +1 -1
  706. package/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.d.ts +1 -4
  707. package/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.d.ts.map +1 -1
  708. package/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.js +1 -1
  709. package/components/Drillstring/BHAComponentsTable/components/shared/SaveButton.js.map +1 -1
  710. package/components/Drillstring/BHAComponentsTable/components/shared/SelectField.d.ts +3 -8
  711. package/components/Drillstring/BHAComponentsTable/components/shared/SelectField.d.ts.map +1 -1
  712. package/components/Drillstring/BHAComponentsTable/components/shared/SelectField.js +1 -1
  713. package/components/Drillstring/BHAComponentsTable/components/shared/SelectField.js.map +1 -1
  714. package/components/Drillstring/BHAComponentsTable/components/shared/SharedEditorElements.d.ts +1 -4
  715. package/components/Drillstring/BHAComponentsTable/components/shared/SharedEditorElements.d.ts.map +1 -1
  716. package/components/Drillstring/BHAComponentsTable/components/shared/SharedEditorElements.js +1 -1
  717. package/components/Drillstring/BHAComponentsTable/components/shared/SharedEditorElements.js.map +1 -1
  718. package/components/Drillstring/BHAComponentsTable/components/shared/StaticField.d.ts +5 -11
  719. package/components/Drillstring/BHAComponentsTable/components/shared/StaticField.d.ts.map +1 -1
  720. package/components/Drillstring/BHAComponentsTable/components/shared/StaticField.js +1 -1
  721. package/components/Drillstring/BHAComponentsTable/components/shared/StaticField.js.map +1 -1
  722. package/components/Drillstring/BHAList/BHAList.d.ts +5 -12
  723. package/components/Drillstring/BHAList/BHAList.d.ts.map +1 -1
  724. package/components/Drillstring/BHAList/BHAList.js +1 -1
  725. package/components/Drillstring/BHAList/BHAList.js.map +1 -1
  726. package/components/Drillstring/BHASchematic.d.ts +2 -6
  727. package/components/Drillstring/BHASchematic.d.ts.map +1 -1
  728. package/components/Drillstring/BHASchematic.js +1 -1
  729. package/components/Drillstring/BHASchematic.js.map +1 -1
  730. package/components/Drillstring/BHATile/BHATile.d.ts +6 -13
  731. package/components/Drillstring/BHATile/BHATile.d.ts.map +1 -1
  732. package/components/Drillstring/BHATile/BHATile.js +1 -1
  733. package/components/Drillstring/BHATile/BHATile.js.map +1 -1
  734. package/components/Drillstring/BhaIndicator/BhaIndicator.d.ts +1 -4
  735. package/components/Drillstring/BhaIndicator/BhaIndicator.d.ts.map +1 -1
  736. package/components/Drillstring/BhaIndicator/BhaIndicator.js +1 -1
  737. package/components/Drillstring/BhaIndicator/BhaIndicator.js.map +1 -1
  738. package/components/Drillstring/DrillstringDetail/DrillstringDetail.d.ts +0 -3
  739. package/components/Drillstring/DrillstringDetail/DrillstringDetail.d.ts.map +1 -1
  740. package/components/Drillstring/DrillstringDetail/DrillstringDetail.js +1 -1
  741. package/components/Drillstring/DrillstringDetail/DrillstringDetail.js.map +1 -1
  742. package/components/EChartsWrapper/EChartsWrapper.d.ts.map +1 -1
  743. package/components/EChartsWrapper/EChartsWrapper.js +1 -1
  744. package/components/EChartsWrapper/EChartsWrapper.js.map +1 -1
  745. package/components/EditableItem/EditableItem/index.d.ts +0 -8
  746. package/components/EditableItem/EditableItem/index.d.ts.map +1 -1
  747. package/components/EditableItem/EditableItem/index.js +1 -1
  748. package/components/EditableItem/EditableItem/index.js.map +1 -1
  749. package/components/EditableItem/EditableItemWithBadge/index.d.ts +4 -4
  750. package/components/EditableItem/EditableItemWithBadge/index.d.ts.map +1 -1
  751. package/components/EditableItem/EditableItemWithBadge/index.js +1 -1
  752. package/components/EditableItem/EditableItemWithBadge/index.js.map +1 -1
  753. package/components/EmbeddedApp/DevCenterEmbeddedApp.d.ts +3 -10
  754. package/components/EmbeddedApp/DevCenterEmbeddedApp.d.ts.map +1 -1
  755. package/components/EmbeddedApp/DevCenterEmbeddedApp.js +1 -1
  756. package/components/EmbeddedApp/DevCenterEmbeddedApp.js.map +1 -1
  757. package/components/EmbeddedApp/EmbeddedApp.d.ts +1 -20
  758. package/components/EmbeddedApp/EmbeddedApp.d.ts.map +1 -1
  759. package/components/EmbeddedApp/EmbeddedApp.js +1 -1
  760. package/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  761. package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.d.ts +0 -3
  762. package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.d.ts.map +1 -1
  763. package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js +1 -1
  764. package/components/ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js.map +1 -1
  765. package/components/FailedFileUploading.d.ts +2 -5
  766. package/components/FailedFileUploading.js +1 -1
  767. package/components/FailedFileUploading.js.map +1 -1
  768. package/components/FeedItem/FeedItem.js +1 -1
  769. package/components/FeedItem/FeedItem.js.map +1 -1
  770. package/components/FeedItem/FeedItemEditProvider/FeedItemEditModal.d.ts +0 -5
  771. package/components/FeedItem/FeedItemEditProvider/FeedItemEditModal.d.ts.map +1 -1
  772. package/components/FeedItem/FeedItemEditProvider/FeedItemEditModal.js +1 -1
  773. package/components/FeedItem/FeedItemEditProvider/FeedItemEditModal.js.map +1 -1
  774. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.d.ts +5 -10
  775. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.d.ts.map +1 -1
  776. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  777. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  778. package/components/FeedItem/components/FeedComments.js +1 -1
  779. package/components/FeedItem/components/FeedComments.js.map +1 -1
  780. package/components/FeedItem/components/LessonsLearnedLeafIcon.d.ts +2 -6
  781. package/components/FeedItem/components/LessonsLearnedLeafIcon.d.ts.map +1 -1
  782. package/components/FeedItem/components/LessonsLearnedLeafIcon.js +1 -1
  783. package/components/FeedItem/components/LessonsLearnedLeafIcon.js.map +1 -1
  784. package/components/FeedItem/feedItemTypes/AlertFeedItem.d.ts +0 -3
  785. package/components/FeedItem/feedItemTypes/AlertFeedItem.d.ts.map +1 -1
  786. package/components/FeedItem/feedItemTypes/AlertFeedItem.js +1 -1
  787. package/components/FeedItem/feedItemTypes/AlertFeedItem.js.map +1 -1
  788. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.d.ts +0 -3
  789. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.d.ts.map +1 -1
  790. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  791. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  792. package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/AccuracyPlan.d.ts +4 -9
  793. package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/AccuracyPlan.d.ts.map +1 -1
  794. package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/AccuracyPlan.js +1 -1
  795. package/components/FeedItem/feedItemTypes/SurveyStationFeedItem/components/AccuracyPlan.js.map +1 -1
  796. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/components/TargetChanges.d.ts +1 -4
  797. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/components/TargetChanges.d.ts.map +1 -1
  798. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/components/TargetChanges.js +1 -1
  799. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/components/TargetChanges.js.map +1 -1
  800. package/components/FileTypeIcon.d.ts +1 -5
  801. package/components/FileTypeIcon.d.ts.map +1 -1
  802. package/components/FileTypeIcon.js +1 -1
  803. package/components/FileTypeIcon.js.map +1 -1
  804. package/components/FilesLoader/FilesLoader.d.ts +0 -16
  805. package/components/FilesLoader/FilesLoader.d.ts.map +1 -1
  806. package/components/FilesLoader/FilesLoader.js +1 -1
  807. package/components/FilesLoader/FilesLoader.js.map +1 -1
  808. package/components/FolderMenuItem/components/FolderIcon.d.ts +2 -6
  809. package/components/FolderMenuItem/components/FolderIcon.d.ts.map +1 -1
  810. package/components/FolderMenuItem/components/FolderIcon.js +1 -1
  811. package/components/FolderMenuItem/components/FolderIcon.js.map +1 -1
  812. package/components/FolderMenuItem/index.d.ts +3 -8
  813. package/components/FolderMenuItem/index.d.ts.map +1 -1
  814. package/components/FolderMenuItem/index.js +1 -1
  815. package/components/FolderMenuItem/index.js.map +1 -1
  816. package/components/FolderMenuItemWithLinks/index.d.ts +5 -10
  817. package/components/FolderMenuItemWithLinks/index.d.ts.map +1 -1
  818. package/components/FolderMenuItemWithLinks/index.js +1 -1
  819. package/components/FolderMenuItemWithLinks/index.js.map +1 -1
  820. package/components/Formula/RootXIcon.d.ts +1 -4
  821. package/components/Formula/RootXIcon.d.ts.map +1 -1
  822. package/components/Formula/RootXIcon.js +1 -1
  823. package/components/Formula/RootXIcon.js.map +1 -1
  824. package/components/GoogleDocsViewer/index.d.ts +2 -8
  825. package/components/GoogleDocsViewer/index.d.ts.map +1 -1
  826. package/components/GoogleDocsViewer/index.js +1 -1
  827. package/components/GoogleDocsViewer/index.js.map +1 -1
  828. package/components/IconMenu/index.d.ts +21 -67
  829. package/components/IconMenu/index.d.ts.map +1 -1
  830. package/components/IconMenu/index.js +1 -1
  831. package/components/IconMenu/index.js.map +1 -1
  832. package/components/Icons/AnnotationIcon.d.ts +2 -6
  833. package/components/Icons/AnnotationIcon.d.ts.map +1 -1
  834. package/components/Icons/AnnotationIcon.js +1 -1
  835. package/components/Icons/AnnotationIcon.js.map +1 -1
  836. package/components/Icons/AttachIcon.d.ts +2 -6
  837. package/components/Icons/AttachIcon.d.ts.map +1 -1
  838. package/components/Icons/AttachIcon.js +1 -1
  839. package/components/Icons/AttachIcon.js.map +1 -1
  840. package/components/Icons/EmojiIcon.d.ts +2 -6
  841. package/components/Icons/EmojiIcon.d.ts.map +1 -1
  842. package/components/Icons/EmojiIcon.js +1 -1
  843. package/components/Icons/EmojiIcon.js.map +1 -1
  844. package/components/Icons/RecommendationIcon.d.ts +2 -6
  845. package/components/Icons/RecommendationIcon.d.ts.map +1 -1
  846. package/components/Icons/RecommendationIcon.js +1 -1
  847. package/components/Icons/RecommendationIcon.js.map +1 -1
  848. package/components/Icons/SendIcon.d.ts +2 -6
  849. package/components/Icons/SendIcon.d.ts.map +1 -1
  850. package/components/Icons/SendIcon.js +1 -1
  851. package/components/Icons/SendIcon.js.map +1 -1
  852. package/components/KeyboardDateTimePicker.d.ts +7 -6
  853. package/components/KeyboardDateTimePicker.d.ts.map +1 -1
  854. package/components/KeyboardDateTimePicker.js +1 -1
  855. package/components/KeyboardDateTimePicker.js.map +1 -1
  856. package/components/LabelsCounter/LabelsCounter.d.ts +1 -4
  857. package/components/LabelsCounter/LabelsCounter.d.ts.map +1 -1
  858. package/components/LabelsCounter/LabelsCounter.js +1 -1
  859. package/components/LabelsCounter/LabelsCounter.js.map +1 -1
  860. package/components/LoadingIndicator/FullScreenLoadingIndicator.d.ts +1 -6
  861. package/components/LoadingIndicator/FullScreenLoadingIndicator.d.ts.map +1 -1
  862. package/components/LoadingIndicator/FullScreenLoadingIndicator.js +1 -1
  863. package/components/LoadingIndicator/FullScreenLoadingIndicator.js.map +1 -1
  864. package/components/LoadingIndicator/InlineLoadingIndicator.d.ts +1 -6
  865. package/components/LoadingIndicator/InlineLoadingIndicator.d.ts.map +1 -1
  866. package/components/LoadingIndicator/InlineLoadingIndicator.js +1 -1
  867. package/components/LoadingIndicator/InlineLoadingIndicator.js.map +1 -1
  868. package/components/LoadingIndicator/Loader.d.ts +0 -4
  869. package/components/LoadingIndicator/Loader.d.ts.map +1 -1
  870. package/components/LoadingIndicator/Loader.js +1 -1
  871. package/components/LoadingIndicator/Loader.js.map +1 -1
  872. package/components/MiddleTruncate/MiddleTruncate.d.ts +1 -13
  873. package/components/MiddleTruncate/MiddleTruncate.d.ts.map +1 -1
  874. package/components/MiddleTruncate/MiddleTruncate.js +1 -1
  875. package/components/MiddleTruncate/MiddleTruncate.js.map +1 -1
  876. package/components/OffsetWellButton/OffsetWellButton.d.ts +1 -10
  877. package/components/OffsetWellButton/OffsetWellButton.d.ts.map +1 -1
  878. package/components/OffsetWellButton/OffsetWellButton.js +1 -1
  879. package/components/OffsetWellButton/OffsetWellButton.js.map +1 -1
  880. package/components/OffsetWellChips/Chip.d.ts +1 -11
  881. package/components/OffsetWellChips/Chip.d.ts.map +1 -1
  882. package/components/OffsetWellChips/Chip.js +1 -1
  883. package/components/OffsetWellChips/Chip.js.map +1 -1
  884. package/components/OffsetWellChips/types.d.ts +4 -4
  885. package/components/OffsetWellChips/types.d.ts.map +1 -1
  886. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.d.ts +7 -16
  887. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.d.ts.map +1 -1
  888. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  889. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  890. package/components/OffsetWellPickerV2/components/Filter/ClearFiltersButton.d.ts +1 -4
  891. package/components/OffsetWellPickerV2/components/Filter/ClearFiltersButton.d.ts.map +1 -1
  892. package/components/OffsetWellPickerV2/components/Filter/ClearFiltersButton.js +1 -1
  893. package/components/OffsetWellPickerV2/components/Filter/ClearFiltersButton.js.map +1 -1
  894. package/components/OffsetWellPickerV2/components/Filter/MultiSelect.d.ts +1 -4
  895. package/components/OffsetWellPickerV2/components/Filter/MultiSelect.d.ts.map +1 -1
  896. package/components/OffsetWellPickerV2/components/Filter/MultiSelect.js +1 -1
  897. package/components/OffsetWellPickerV2/components/Filter/MultiSelect.js.map +1 -1
  898. package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.d.ts +10 -12
  899. package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
  900. package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js.map +1 -1
  901. package/components/OffsetWellPickerV2/components/Filter/RadiusInput.d.ts +11 -13
  902. package/components/OffsetWellPickerV2/components/Filter/RadiusInput.js +1 -1
  903. package/components/OffsetWellPickerV2/components/Filter/RadiusInput.js.map +1 -1
  904. package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.d.ts +10 -12
  905. package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  906. package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js.map +1 -1
  907. package/components/OffsetWellPickerV2/components/Filter/SingleSelect.d.ts +3 -7
  908. package/components/OffsetWellPickerV2/components/Filter/SingleSelect.d.ts.map +1 -1
  909. package/components/OffsetWellPickerV2/components/Filter/SingleSelect.js +1 -1
  910. package/components/OffsetWellPickerV2/components/Filter/SingleSelect.js.map +1 -1
  911. package/components/OffsetWellPickerV2/components/Filter/SubjectWellSearch.d.ts +1 -1
  912. package/components/OffsetWellPickerV2/components/Filter/SubjectWellSearch.d.ts.map +1 -1
  913. package/components/OffsetWellPickerV2/components/Filter/SubjectWellSearch.js +1 -1
  914. package/components/OffsetWellPickerV2/components/Filter/SubjectWellSearch.js.map +1 -1
  915. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  916. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  917. package/components/OffsetWellPickerV2/components/Filter/index.d.ts +1 -1
  918. package/components/OffsetWellPickerV2/components/Filter/index.d.ts.map +1 -1
  919. package/components/OffsetWellPickerV2/components/Filter/index.js +1 -1
  920. package/components/OffsetWellPickerV2/components/Filter/index.js.map +1 -1
  921. package/components/OffsetWellPickerV2/components/Map/Map.d.ts +6 -6
  922. package/components/OffsetWellPickerV2/components/Map/Map.d.ts.map +1 -1
  923. package/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  924. package/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  925. package/components/OffsetWellPickerV2/components/Map/index.d.ts +2 -2
  926. package/components/OffsetWellPickerV2/components/Map/index.d.ts.map +1 -1
  927. package/components/OffsetWellPickerV2/components/Map/index.js +1 -1
  928. package/components/OffsetWellPickerV2/components/Map/index.js.map +1 -1
  929. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.d.ts +10 -12
  930. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  931. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  932. package/components/OffsetWellPickerV2/components/Table/MetricsSelect.d.ts +11 -13
  933. package/components/OffsetWellPickerV2/components/Table/MetricsSelect.js +1 -1
  934. package/components/OffsetWellPickerV2/components/Table/MetricsSelect.js.map +1 -1
  935. package/components/OffsetWellPickerV2/components/Table/index.d.ts +20 -29
  936. package/components/OffsetWellPickerV2/components/Table/index.js +1 -1
  937. package/components/OffsetWellPickerV2/components/Table/index.js.map +1 -1
  938. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/index.js +1 -1
  939. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/index.js.map +1 -1
  940. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.d.ts +4 -4
  941. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.d.ts.map +1 -1
  942. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  943. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  944. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/index.d.ts +2 -2
  945. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/index.d.ts.map +1 -1
  946. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/index.js +1 -1
  947. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/index.js.map +1 -1
  948. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  949. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  950. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/index.d.ts.map +1 -1
  951. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/index.js +1 -1
  952. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/index.js.map +1 -1
  953. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.d.ts +4 -4
  954. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.d.ts.map +1 -1
  955. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  956. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  957. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  958. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  959. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  960. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  961. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  962. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  963. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  964. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  965. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  966. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  967. package/components/OffsetWellPickerV3/index.d.ts +7 -16
  968. package/components/OffsetWellPickerV3/index.d.ts.map +1 -1
  969. package/components/OffsetWellPickerV3/index.js +1 -1
  970. package/components/OffsetWellPickerV3/index.js.map +1 -1
  971. package/components/OffsetWellPickerV4/components/Filter/MultiSelect.d.ts +2 -6
  972. package/components/OffsetWellPickerV4/components/Filter/MultiSelect.d.ts.map +1 -1
  973. package/components/OffsetWellPickerV4/components/Filter/PeriodSelect.d.ts +1 -4
  974. package/components/OffsetWellPickerV4/components/Filter/PeriodSelect.d.ts.map +1 -1
  975. package/components/OffsetWellPickerV4/components/Filter/RadiusInput.d.ts +2 -5
  976. package/components/OffsetWellPickerV4/components/Filter/RadiusInput.d.ts.map +1 -1
  977. package/components/OffsetWellPickerV4/components/Filter/SingleSelect.d.ts +2 -6
  978. package/components/OffsetWellPickerV4/components/Filter/SingleSelect.d.ts.map +1 -1
  979. package/components/OffsetWellPickerV4/components/Map/WellsMap.d.ts +2 -6
  980. package/components/OffsetWellPickerV4/components/Map/WellsMap.d.ts.map +1 -1
  981. package/components/OffsetWellPickerV4/components/OffsetWellsTable/SubjectWellMark.d.ts +1 -4
  982. package/components/OffsetWellPickerV4/components/OffsetWellsTable/SubjectWellMark.d.ts.map +1 -1
  983. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  984. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  985. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  986. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  987. package/components/PadOffsetsPicker/OffsetAssetChip.d.ts +5 -11
  988. package/components/PadOffsetsPicker/OffsetAssetChip.d.ts.map +1 -1
  989. package/components/PadOffsetsPicker/OffsetAssetChip.js +1 -1
  990. package/components/PadOffsetsPicker/OffsetAssetChip.js.map +1 -1
  991. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  992. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  993. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  994. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  995. package/components/ParameterCharts/AddEditTrack.d.ts +12 -28
  996. package/components/ParameterCharts/AddEditTrack.js +1 -1
  997. package/components/ParameterCharts/AddEditTrack.js.map +1 -1
  998. package/components/ParameterCharts/ParameterCharts.d.ts +5 -12
  999. package/components/ParameterCharts/ParameterCharts.d.ts.map +1 -1
  1000. package/components/ParameterCharts/ParameterCharts.js +1 -1
  1001. package/components/ParameterCharts/ParameterCharts.js.map +1 -1
  1002. package/components/ParameterCharts/components/TraceHeader.d.ts +13 -89
  1003. package/components/ParameterCharts/components/TraceHeader.d.ts.map +1 -1
  1004. package/components/ParameterCharts/components/TraceHeader.js +1 -1
  1005. package/components/ParameterCharts/components/TraceHeader.js.map +1 -1
  1006. package/components/ParameterCharts/components/TraceSelect.d.ts +12 -18
  1007. package/components/ParameterCharts/components/TraceSelect.js +1 -1
  1008. package/components/ParameterCharts/components/TraceSelect.js.map +1 -1
  1009. package/components/ParameterCharts/components/Track.d.ts +1 -4
  1010. package/components/ParameterCharts/components/Track.d.ts.map +1 -1
  1011. package/components/ParameterCharts/components/Track.js +1 -1
  1012. package/components/ParameterCharts/components/Track.js.map +1 -1
  1013. package/components/PinnableFilters/PinnableFilters.d.ts.map +1 -1
  1014. package/components/PinnableFilters/PinnableFilters.js +1 -1
  1015. package/components/PinnableFilters/PinnableFilters.js.map +1 -1
  1016. package/components/Popover/Popover.js +1 -1
  1017. package/components/Popover/Popover.js.map +1 -1
  1018. package/components/Popper/Popper.js +1 -1
  1019. package/components/Popper/Popper.js.map +1 -1
  1020. package/components/PostInput/PostInput.d.ts +10 -20
  1021. package/components/PostInput/PostInput.d.ts.map +1 -1
  1022. package/components/PostInput/PostInput.js +1 -1
  1023. package/components/PostInput/PostInput.js.map +1 -1
  1024. package/components/PriceInput/FormattedNumber.d.ts +0 -3
  1025. package/components/PriceInput/FormattedNumber.d.ts.map +1 -1
  1026. package/components/PriceInput/FormattedNumber.js +1 -1
  1027. package/components/PriceInput/FormattedNumber.js.map +1 -1
  1028. package/components/PriceInput/PriceInput.d.ts +4 -4
  1029. package/components/PriceInput/PriceInput.d.ts.map +1 -1
  1030. package/components/PriceInput/PriceInput.js +1 -1
  1031. package/components/PriceInput/PriceInput.js.map +1 -1
  1032. package/components/SearchInput/index.d.ts +1 -4
  1033. package/components/SearchInput/index.d.ts.map +1 -1
  1034. package/components/SearchInput/index.js +1 -1
  1035. package/components/SearchInput/index.js.map +1 -1
  1036. package/components/SettingEditors/DropdownEditor/index.d.ts +21 -30
  1037. package/components/SettingEditors/DropdownEditor/index.d.ts.map +1 -1
  1038. package/components/SettingEditors/DropdownEditor/index.js +1 -1
  1039. package/components/SettingEditors/DropdownEditor/index.js.map +1 -1
  1040. package/components/SlateFormattedText/Elements/ImageElement/ImageElement.d.ts +0 -4
  1041. package/components/SlateFormattedText/Elements/ImageElement/ImageElement.d.ts.map +1 -1
  1042. package/components/SlateFormattedText/Elements/ImageElement/ImageElement.js +1 -1
  1043. package/components/SlateFormattedText/Elements/ImageElement/ImageElement.js.map +1 -1
  1044. package/components/SlateFormattedText/SlateFormattedText.d.ts +4 -11
  1045. package/components/SlateFormattedText/SlateFormattedText.d.ts.map +1 -1
  1046. package/components/SlateFormattedText/SlateFormattedText.js +1 -1
  1047. package/components/SlateFormattedText/SlateFormattedText.js.map +1 -1
  1048. package/components/StageDesignVActual/ComparisonBar/ComparisonBar.d.ts +1 -6
  1049. package/components/StageDesignVActual/ComparisonBar/ComparisonBar.d.ts.map +1 -1
  1050. package/components/StageDesignVActual/ComparisonBar/ComparisonBar.js +1 -1
  1051. package/components/StageDesignVActual/ComparisonBar/ComparisonBar.js.map +1 -1
  1052. package/components/StageDesignVActual/ComparisonHeader.d.ts +1 -7
  1053. package/components/StageDesignVActual/ComparisonHeader.d.ts.map +1 -1
  1054. package/components/StageDesignVActual/ComparisonHeader.js +1 -1
  1055. package/components/StageDesignVActual/ComparisonHeader.js.map +1 -1
  1056. package/components/StageDesignVActual/ComparisonRow.d.ts +7 -16
  1057. package/components/StageDesignVActual/ComparisonRow.d.ts.map +1 -1
  1058. package/components/StageDesignVActual/ComparisonRow.js +1 -1
  1059. package/components/StageDesignVActual/ComparisonRow.js.map +1 -1
  1060. package/components/StageDesignVActual/ElementsComparison/ElementsComparison.d.ts +7 -15
  1061. package/components/StageDesignVActual/ElementsComparison/ElementsComparison.d.ts.map +1 -1
  1062. package/components/StageDesignVActual/ElementsComparison/ElementsComparison.js +1 -1
  1063. package/components/StageDesignVActual/ElementsComparison/ElementsComparison.js.map +1 -1
  1064. package/components/SwitchControl/index.d.ts.map +1 -1
  1065. package/components/SwitchControl/index.js +1 -1
  1066. package/components/SwitchControl/index.js.map +1 -1
  1067. package/components/Template/TemplatePopover/index.d.ts +8 -18
  1068. package/components/Template/TemplatePopover/index.d.ts.map +1 -1
  1069. package/components/Template/TemplatePopover/index.js +1 -1
  1070. package/components/Template/TemplatePopover/index.js.map +1 -1
  1071. package/components/Template/TemplateSharingDialog/index.d.ts +1 -4
  1072. package/components/Template/TemplateSharingDialog/index.d.ts.map +1 -1
  1073. package/components/Template/TemplateSharingDialog/index.js +1 -1
  1074. package/components/Template/TemplateSharingDialog/index.js.map +1 -1
  1075. package/components/TracesEditModal/TracesEditModal.d.ts +5 -13
  1076. package/components/TracesEditModal/TracesEditModal.d.ts.map +1 -1
  1077. package/components/TracesEditModal/TracesEditModal.js +1 -1
  1078. package/components/TracesEditModal/TracesEditModal.js.map +1 -1
  1079. package/components/UserCard/index.d.ts +1 -1
  1080. package/components/UserCard/index.js +1 -1
  1081. package/components/UserCard/index.js.map +1 -1
  1082. package/components/UserCardPopover.d.ts +14 -5
  1083. package/components/UserCardPopover.js +1 -1
  1084. package/components/UserCardPopover.js.map +1 -1
  1085. package/components/UserMention/index.js +1 -1
  1086. package/components/UserMention/index.js.map +1 -1
  1087. package/components/WellSummary/ActivitySummaryChart.d.ts +3 -7
  1088. package/components/WellSummary/ActivitySummaryChart.d.ts.map +1 -1
  1089. package/components/WellSummary/ActivitySummaryChart.js +1 -1
  1090. package/components/WellSummary/ActivitySummaryChart.js.map +1 -1
  1091. package/components/WellSummary/FracWirelineTimeChart.d.ts +0 -4
  1092. package/components/WellSummary/FracWirelineTimeChart.d.ts.map +1 -1
  1093. package/components/WellSummary/FracWirelineTimeChart.js +1 -1
  1094. package/components/WellSummary/FracWirelineTimeChart.js.map +1 -1
  1095. package/components/WellSummary/WellSummaryItemLabel.d.ts +1 -4
  1096. package/components/WellSummary/WellSummaryItemLabel.d.ts.map +1 -1
  1097. package/components/WellSummary/WellSummaryItemLabel.js +1 -1
  1098. package/components/WellSummary/WellSummaryItemLabel.js.map +1 -1
  1099. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  1100. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  1101. package/mcp-server/server.mjs +5 -5
  1102. package/package.json +1 -1
  1103. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AnchorsList.js","sources":["../../../../src/components/AnchorsList/AnchorsList.js"],"sourcesContent":["// This component has been copy-pasted from MUI documentation\n// https://github.com/mui-org/material-ui/blob/master/docs/src/modules/components/AppTableOfContents.js\n\nimport { useMemo, useCallback, useRef, useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { throttle, noop } from 'lodash';\nimport classNames from 'classnames';\nimport { makeStyles, Typography, Link } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n top: 70,\n width: 175,\n flexShrink: 0,\n position: 'sticky',\n height: 'calc(100vh - 70px)',\n overflowY: 'auto',\n padding: theme.spacing(2, 0),\n display: 'none',\n [theme.breakpoints.up('sm')]: {\n display: 'block',\n },\n },\n title: {\n color: theme.palette.primary.text8,\n margin: '0 0 8px 16px',\n lineHeight: '24px',\n fontSize: 10,\n fontWeight: 500,\n letterSpacing: 1,\n },\n contents: {\n marginTop: theme.spacing(2),\n paddingLeft: theme.spacing(1),\n },\n ul: {\n padding: 0,\n margin: 0,\n listStyle: 'none',\n borderLeft: `1px solid ${theme.palette.background.b9}`,\n },\n li: { display: 'flex', '&:not(:first-of-type)': { marginTop: 8 } },\n item: {\n color: theme.palette.primary.text6,\n display: 'inline-block',\n margin: '7px 16px',\n fontSize: 12,\n fontWeight: 400,\n letter: '0.4px',\n lineHeight: '16px',\n },\n active: { color: theme.palette.text.primary, fontWeight: 500 },\n activeItemBorder: {\n height: 30,\n width: '2px',\n backgroundColor: '#03BCD4',\n borderRadius: '0 2px 2px 0',\n position: 'absolute',\n },\n}));\n\n// TODO: these nodes are mutable sources. Use createMutableSource once it's stable\nfunction getItemsClient(headings) {\n return headings.map(item => ({ ...item, node: document.getElementById(item.hash) }));\n}\n\nfunction useThrottledOnScroll(callback, delay) {\n const throttledCallback = useMemo(\n () => (callback ? throttle(callback, delay) : noop),\n [callback, delay]\n );\n\n useEffect(() => {\n if (throttledCallback === noop) return undefined;\n window.addEventListener('scroll', throttledCallback);\n\n return () => {\n window.removeEventListener('scroll', throttledCallback);\n throttledCallback.cancel();\n };\n }, [throttledCallback]);\n}\n\nfunction AnchorsList(props) {\n const { title, items } = props;\n const classes = useStyles();\n\n const itemsWithNodeRef = useRef([]);\n useEffect(() => {\n itemsWithNodeRef.current = getItemsClient(items);\n }, [items]);\n\n const [activeState, setActiveState] = useState(null);\n const clickedRef = useRef(false);\n const unsetClickedRef = useRef(null);\n const findActiveIndex = useCallback(() => {\n // Don't set the active index based on scroll if a link was just clicked\n if (clickedRef.current) return;\n\n let active;\n for (let i = itemsWithNodeRef.current.length - 1; i >= 0; i -= 1) {\n // No hash if we're near the top of the page\n if (document.documentElement.scrollTop < 100) {\n active = { hash: null };\n break;\n }\n\n const item = itemsWithNodeRef.current[i];\n\n if (\n item.node &&\n item.node.offsetTop <\n document.documentElement.scrollTop + document.documentElement.clientHeight / 8\n ) {\n active = item;\n break;\n }\n }\n if (active && activeState !== active.hash) setActiveState(active.hash);\n }, [activeState]);\n\n // Corresponds to 10 frames at 60 Hz\n useThrottledOnScroll(items.length > 0 ? findActiveIndex : null, 166);\n\n const handleClick = hash => event => {\n // Ignore click for new tab/new window behavior\n if (\n event.defaultPrevented ||\n event.button !== 0 || // ignore everything but left-click\n event.metaKey ||\n event.ctrlKey ||\n event.altKey ||\n event.shiftKey\n ) {\n return;\n }\n\n // Used to disable findActiveIndex if the page scrolls due to a click\n clickedRef.current = true;\n unsetClickedRef.current = setTimeout(() => {\n clickedRef.current = false;\n }, 1000);\n\n if (activeState !== hash) {\n setActiveState(hash);\n }\n };\n\n useEffect(\n () => () => {\n clearTimeout(unsetClickedRef.current);\n },\n []\n );\n\n useEffect(() => {\n // Fires after component has been mounted. We need this to scroll to anchor on initial load\n const { hash } = window.location;\n if (!hash) return;\n const element = document.getElementById(hash.substr(1));\n if (element) {\n setTimeout(() => {\n element.scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'smooth' });\n }, 50);\n }\n }, []);\n\n return (\n <nav className={classes.root} data-testid=\"anchors-list\">\n {items.length > 0 && (\n <>\n <div className={classes.title}>{title}</div>\n <Typography component=\"ul\" className={classes.ul}>\n {items.map(item => {\n const isActive = activeState === item.hash;\n\n return (\n <li key={item.text} className={classes.li}>\n {isActive && <div className={classes.activeItemBorder} />}\n <Link\n display=\"block\"\n href={`#${item.hash}`}\n underline=\"none\"\n onClick={handleClick(item.hash)}\n className={classNames(classes.item, isActive && classes.active)}\n data-testid={`anchor-item-${item.hash}`}\n >\n <span>{item.text}</span>\n </Link>\n </li>\n );\n })}\n </Typography>\n </>\n )}\n </nav>\n );\n}\n\nAnchorsList.defaultProps = {\n title: 'ON THIS PAGE',\n items: [],\n};\n\nAnchorsList.propTypes = {\n title: PropTypes.string,\n items: PropTypes.arrayOf(PropTypes.shape({ hash: PropTypes.string, text: PropTypes.string })),\n};\n\nexport default AnchorsList;\n"],"names":["useStyles","makeStyles","theme","root","_defineProperty","top","width","flexShrink","position","height","overflowY","padding","spacing","display","breakpoints","up","title","color","palette","primary","text8","margin","lineHeight","fontSize","fontWeight","letterSpacing","contents","marginTop","paddingLeft","ul","listStyle","borderLeft","background","b9","li","item","text6","letter","active","text","activeItemBorder","backgroundColor","borderRadius","AnchorsList","props","items","classes","itemsWithNodeRef","useRef","useEffect","current","map","_objectSpread","node","document","getElementById","hash","callback","delay","throttledCallback","useState","_useState2","_slicedToArray","_useState","activeState","setActiveState","clickedRef","unsetClickedRef","findActiveIndex","useCallback","i","length","documentElement","scrollTop","offsetTop","clientHeight","useMemo","throttle","noop","window","addEventListener","removeEventListener","cancel","clearTimeout","location","element","substr","setTimeout","scrollIntoView","block","inline","behavior","_jsx","className","children","_jsxs","_Fragment","jsx","Typography","component","isActive","Link","href","underline","onClick","event","defaultPrevented","button","metaKey","ctrlKey","altKey","shiftKey","classNames","defaultProps","propTypes","PropTypes","string","arrayOf","shape"],"mappings":"07BASA,IAAMA,EAAYC,EAAAA,YAAW,SAAAC,GAAK,MAAK,CACrCC,KAAIC,EAAAA,QAAA,CACFC,IAAK,GACLC,MAAO,IACPC,WAAY,EACZC,SAAU,SACVC,OAAQ,qBACRC,UAAW,OACXC,QAAST,EAAMU,QAAQ,EAAG,GAC1BC,QAAS,QACRX,EAAMY,YAAYC,GAAG,MAAQ,CAC5BF,QAAS,UAGbG,MAAO,CACLC,MAAOf,EAAMgB,QAAQC,QAAQC,MAC7BC,OAAQ,eACRC,WAAY,OACZC,SAAU,GACVC,WAAY,IACZC,cAAe,GAEjBC,SAAU,CACRC,UAAWzB,EAAMU,QAAQ,GACzBgB,YAAa1B,EAAMU,QAAQ,IAE7BiB,GAAI,CACFlB,QAAS,EACTU,OAAQ,EACRS,UAAW,OACXC,+BAAyB7B,EAAMgB,QAAQc,WAAWC,KAEpDC,GAAI,CAAErB,QAAS,OAAQ,wBAAyB,CAAEc,UAAW,IAC7DQ,KAAM,CACJlB,MAAOf,EAAMgB,QAAQC,QAAQiB,MAC7BvB,QAAS,eACTQ,OAAQ,WACRE,SAAU,GACVC,WAAY,IACZa,OAAQ,QACRf,WAAY,QAEdgB,OAAQ,CAAErB,MAAOf,EAAMgB,QAAQqB,KAAKpB,QAASK,WAAY,KACzDgB,iBAAkB,CAChB/B,OAAQ,GACRH,MAAO,MACPmC,gBAAiB,UACjBC,aAAc,cACdlC,SAAU,YAEb,IAwBD,SAASmC,EAAYC,GACnB,IAAQ5B,EAAiB4B,EAAjB5B,MAAO6B,EAAUD,EAAVC,MACTC,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,eAAAA,OAAAA,EAAKqB,MAAOsC,SAExCF,EAAAK,IAAA,OAAA,CAAAH,SAAO3D,EAAKI,WAVPJ,EAAKI,eAoB9B,CAEAI,EAAYsE,aAAe,CACzBjG,MAAO,eACP6B,MAAO,IAGTF,EAAYuE,UAAY,CACtBlG,MAAOmG,EAAS,QAACC,OACjBvE,MAAOsE,EAAS,QAACE,QAAQF,EAAAA,QAAUG,MAAM,CAAE9D,KAAM2D,EAAS,QAACC,OAAQ7E,KAAM4E,EAAS,QAACC"}
1
+ {"version":3,"file":"AnchorsList.js","sources":["../../../../src/components/AnchorsList/AnchorsList.js"],"sourcesContent":["// This component has been copy-pasted from MUI documentation\n// https://github.com/mui-org/material-ui/blob/master/docs/src/modules/components/AppTableOfContents.js\n\nimport { useMemo, useCallback, useRef, useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { throttle, noop } from 'lodash';\nimport classNames from 'classnames';\nimport { makeStyles, Typography, Link } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n top: 70,\n width: 175,\n flexShrink: 0,\n position: 'sticky',\n height: 'calc(100vh - 70px)',\n overflowY: 'auto',\n padding: theme.spacing(2, 0),\n display: 'none',\n [theme.breakpoints.up('sm')]: {\n display: 'block',\n },\n },\n title: {\n color: theme.palette.primary.text8,\n margin: '0 0 8px 16px',\n lineHeight: '24px',\n fontSize: 10,\n fontWeight: 500,\n letterSpacing: 1,\n },\n contents: {\n marginTop: theme.spacing(2),\n paddingLeft: theme.spacing(1),\n },\n ul: {\n padding: 0,\n margin: 0,\n listStyle: 'none',\n borderLeft: `1px solid ${theme.palette.background.b9}`,\n },\n li: { display: 'flex', '&:not(:first-of-type)': { marginTop: 8 } },\n item: {\n color: theme.palette.primary.text6,\n display: 'inline-block',\n margin: '7px 16px',\n fontSize: 12,\n fontWeight: 400,\n letter: '0.4px',\n lineHeight: '16px',\n },\n active: { color: theme.palette.text.primary, fontWeight: 500 },\n activeItemBorder: {\n height: 30,\n width: '2px',\n backgroundColor: '#03BCD4',\n borderRadius: '0 2px 2px 0',\n position: 'absolute',\n },\n}));\n\n// TODO: these nodes are mutable sources. Use createMutableSource once it's stable\nfunction getItemsClient(headings) {\n return headings.map(item => ({ ...item, node: document.getElementById(item.hash) }));\n}\n\nfunction useThrottledOnScroll(callback, delay) {\n const throttledCallback = useMemo(\n () => (callback ? throttle(callback, delay) : noop),\n [callback, delay]\n );\n\n useEffect(() => {\n if (throttledCallback === noop) return undefined;\n window.addEventListener('scroll', throttledCallback);\n\n return () => {\n window.removeEventListener('scroll', throttledCallback);\n throttledCallback.cancel();\n };\n }, [throttledCallback]);\n}\n\nfunction AnchorsList(props) {\n const { title = 'ON THIS PAGE', items = DEFAULT_ANCHORS_LIST_ITEMS } = props;\n const classes = useStyles();\n\n const itemsWithNodeRef = useRef([]);\n useEffect(() => {\n itemsWithNodeRef.current = getItemsClient(items);\n }, [items]);\n\n const [activeState, setActiveState] = useState(null);\n const clickedRef = useRef(false);\n const unsetClickedRef = useRef(null);\n const findActiveIndex = useCallback(() => {\n // Don't set the active index based on scroll if a link was just clicked\n if (clickedRef.current) return;\n\n let active;\n for (let i = itemsWithNodeRef.current.length - 1; i >= 0; i -= 1) {\n // No hash if we're near the top of the page\n if (document.documentElement.scrollTop < 100) {\n active = { hash: null };\n break;\n }\n\n const item = itemsWithNodeRef.current[i];\n\n if (\n item.node &&\n item.node.offsetTop <\n document.documentElement.scrollTop + document.documentElement.clientHeight / 8\n ) {\n active = item;\n break;\n }\n }\n if (active && activeState !== active.hash) setActiveState(active.hash);\n }, [activeState]);\n\n // Corresponds to 10 frames at 60 Hz\n useThrottledOnScroll(items.length > 0 ? findActiveIndex : null, 166);\n\n const handleClick = hash => event => {\n // Ignore click for new tab/new window behavior\n if (\n event.defaultPrevented ||\n event.button !== 0 || // ignore everything but left-click\n event.metaKey ||\n event.ctrlKey ||\n event.altKey ||\n event.shiftKey\n ) {\n return;\n }\n\n // Used to disable findActiveIndex if the page scrolls due to a click\n clickedRef.current = true;\n unsetClickedRef.current = setTimeout(() => {\n clickedRef.current = false;\n }, 1000);\n\n if (activeState !== hash) {\n setActiveState(hash);\n }\n };\n\n useEffect(\n () => () => {\n clearTimeout(unsetClickedRef.current);\n },\n []\n );\n\n useEffect(() => {\n // Fires after component has been mounted. We need this to scroll to anchor on initial load\n const { hash } = window.location;\n if (!hash) return;\n const element = document.getElementById(hash.substr(1));\n if (element) {\n setTimeout(() => {\n element.scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'smooth' });\n }, 50);\n }\n }, []);\n\n return (\n <nav className={classes.root} data-testid=\"anchors-list\">\n {items.length > 0 && (\n <>\n <div className={classes.title}>{title}</div>\n <Typography component=\"ul\" className={classes.ul}>\n {items.map(item => {\n const isActive = activeState === item.hash;\n\n return (\n <li key={item.text} className={classes.li}>\n {isActive && <div className={classes.activeItemBorder} />}\n <Link\n display=\"block\"\n href={`#${item.hash}`}\n underline=\"none\"\n onClick={handleClick(item.hash)}\n className={classNames(classes.item, isActive && classes.active)}\n data-testid={`anchor-item-${item.hash}`}\n >\n <span>{item.text}</span>\n </Link>\n </li>\n );\n })}\n </Typography>\n </>\n )}\n </nav>\n );\n}\n\nconst DEFAULT_ANCHORS_LIST_ITEMS = [];\n\nAnchorsList.propTypes = {\n title: PropTypes.string,\n items: PropTypes.arrayOf(PropTypes.shape({ hash: PropTypes.string, text: PropTypes.string })),\n};\n\nexport default AnchorsList;\n"],"names":["useStyles","makeStyles","theme","root","_defineProperty","top","width","flexShrink","position","height","overflowY","padding","spacing","display","breakpoints","up","title","color","palette","primary","text8","margin","lineHeight","fontSize","fontWeight","letterSpacing","contents","marginTop","paddingLeft","ul","listStyle","borderLeft","background","b9","li","item","text6","letter","active","text","activeItemBorder","backgroundColor","borderRadius","AnchorsList","props","_props$title","_props$items","items","DEFAULT_ANCHORS_LIST_ITEMS","classes","itemsWithNodeRef","useRef","useEffect","current","map","_objectSpread","node","document","getElementById","hash","callback","delay","throttledCallback","useState","_useState2","_slicedToArray","_useState","activeState","setActiveState","clickedRef","unsetClickedRef","findActiveIndex","useCallback","i","length","documentElement","scrollTop","offsetTop","clientHeight","useMemo","throttle","noop","window","addEventListener","removeEventListener","cancel","clearTimeout","location","element","substr","setTimeout","scrollIntoView","block","inline","behavior","_jsx","className","children","_jsxs","_Fragment","jsx","Typography","component","isActive","Link","href","underline","onClick","event","defaultPrevented","button","metaKey","ctrlKey","altKey","shiftKey","classNames","propTypes","PropTypes","string","arrayOf","shape"],"mappings":"07BASA,IAAMA,EAAYC,EAAAA,YAAW,SAAAC,GAAK,MAAK,CACrCC,KAAIC,EAAAA,QAAA,CACFC,IAAK,GACLC,MAAO,IACPC,WAAY,EACZC,SAAU,SACVC,OAAQ,qBACRC,UAAW,OACXC,QAAST,EAAMU,QAAQ,EAAG,GAC1BC,QAAS,QACRX,EAAMY,YAAYC,GAAG,MAAQ,CAC5BF,QAAS,UAGbG,MAAO,CACLC,MAAOf,EAAMgB,QAAQC,QAAQC,MAC7BC,OAAQ,eACRC,WAAY,OACZC,SAAU,GACVC,WAAY,IACZC,cAAe,GAEjBC,SAAU,CACRC,UAAWzB,EAAMU,QAAQ,GACzBgB,YAAa1B,EAAMU,QAAQ,IAE7BiB,GAAI,CACFlB,QAAS,EACTU,OAAQ,EACRS,UAAW,OACXC,+BAAyB7B,EAAMgB,QAAQc,WAAWC,KAEpDC,GAAI,CAAErB,QAAS,OAAQ,wBAAyB,CAAEc,UAAW,IAC7DQ,KAAM,CACJlB,MAAOf,EAAMgB,QAAQC,QAAQiB,MAC7BvB,QAAS,eACTQ,OAAQ,WACRE,SAAU,GACVC,WAAY,IACZa,OAAQ,QACRf,WAAY,QAEdgB,OAAQ,CAAErB,MAAOf,EAAMgB,QAAQqB,KAAKpB,QAASK,WAAY,KACzDgB,iBAAkB,CAChB/B,OAAQ,GACRH,MAAO,MACPmC,gBAAiB,UACjBC,aAAc,cACdlC,SAAU,YAEb,IAwBD,SAASmC,EAAYC,GACnB,IAAuEA,E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R,GAClBS,EAAeT,MAwCDqC,UAAWmB,EAAU,QAAClE,EAAQd,KAAMoE,GAAYtD,EAAQX,QACxD,cAA4BH,eAAAA,OAAAA,EAAKwB,MAAOsC,SAExCF,EAAAK,IAAA,OAAA,CAAAH,SAAO9D,EAAKI,WAVPJ,EAAKI,eAoB9B,CAEA,IAAMS,EAA6B,GAEnCL,EAAYyE,UAAY,CACtBpG,MAAOqG,EAAS,QAACC,OACjBvE,MAAOsE,EAAS,QAACE,QAAQF,EAAAA,QAAUG,MAAM,CAAE7D,KAAM0D,EAAS,QAACC,OAAQ/E,KAAM8E,EAAS,QAACC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/helpers/slicedToArray"),n=require("@babel/runtime/regenerator"),a=require("react"),i=require("prop-types"),s=require("classnames"),o=require("lodash"),u=require("moment"),d=require("@material-ui/core/styles"),c=require("@material-ui/core"),l=require("../../../../AnnotationsContext.js"),p=require("../../../../constants.js"),m=require("../AnnotationInput/index.js"),h=require("./style.css.js"),f=require("../../../../../Avatar/index.js"),q=require("../../../../../../effects/useOutsideClick.js");require("../../../../../../utils/index.js");var v=require("../../../../../../clients/jsonApi/index.js");require("../../../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js"),require("../../../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js");var A=require("../../../../../DevCenter/DevCenterRouterContext/hocs/withUniversalLocationHOC.js"),y=require("react/jsx-runtime"),b=require("../../../../../../utils/notificationToasts.js");function j(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=j(e),C=j(t),I=j(r),g=j(n),N=j(s),R=j(u),_=function(e){var t,r=e.appId,n=e.assetId,i=e.assetCompanyId,s=e.appSettings,u=e.currentUser,d=e.classes,A=e.location,j=e.dashboardType,_=l.useAnnotationsDispatch(),T=a.useState(!1),D=I.default(T,2),w=D[0],P=D[1],U=a.useRef(null);q(U,(function(){P(!1)}));var F,k=(F=C.default(g.default.mark((function e(t,a,i){var u,d,c,l;return g.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,u={app_id:r,asset_id:n,body:t,active_until:a,attachment:{file_name:i&&i.attachmentName,s3_link:i&&i.attachmentUrl},settings:s},d={},j&&(d.dashboard_type=j),(c=o.get(A,"query.time"))&&(u.data_timestamp=R.default(c).format()),e.next=8,v.postAnnotation(u,d);case 8:l=e.sent,_({type:p.ADD_ANNOTATION,annotation:l}),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),b.showErrorNotification("Error during annotation creation"),console.error(e.t0),e.abrupt("return");case 17:b.showSuccessNotification("Annotation has been added"),P(!1);case 19:case"end":return e.stop()}}),e,null,[[0,12]])}))),function(e,t,r){return F.apply(this,arguments)});return y.jsxs("div",{className:h.cAddAnnotationFormInput,children:[y.jsx(f.AvatarComponent,{displayName:"".concat(u.first_name," ").concat(u.last_name),imgSrc:u.profile_photo,size:36}),y.jsxs("div",{className:N.default(h.cAddAnnotationFormInputPaper,(t={},x.default(t,h.cAddAnnotationFormInputPaperOpened,w),x.default(t,h.cAddAnnotationFormInputPaperClosed,!w),t)),children:[y.jsx(c.Fade,{in:!w,timeout:500,children:y.jsx(c.Paper,{className:h.cAddAnnotationFormInputPaperLabel,children:y.jsx(c.Typography,{variant:"body2","data-testid":"".concat("AppAnnotationsPo","_collapsedInput"),className:d.inputLabel,onClick:function(){return P(!0)},children:"Type annotation here"})})}),y.jsx(c.Fade,{in:w,timeout:100,children:y.jsx("div",{className:h.cAddAnnotationFormInputPaperAddAnnotation,children:w&&y.jsx(m,{onSend:k,assetCompanyId:i,currentUser:u})})})]})]})};_.propTypes={appId:i.number.isRequired,assetId:i.number.isRequired,assetCompanyId:i.number.isRequired,appSettings:i.shape().isRequired,currentUser:i.shape({}),classes:i.shape().isRequired,location:i.shape().isRequired,dashboardType:i.string},_.defaultProps={currentUser:{},dashboardType:null};var T=o.flowRight([d.withStyles((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"}}})),A.withUniversalLocationHOC])(a.memo(_));module.exports=T;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/helpers/slicedToArray"),n=require("@babel/runtime/regenerator"),a=require("react"),i=require("prop-types"),s=require("classnames"),o=require("lodash"),u=require("moment"),d=require("@material-ui/core/styles"),c=require("@material-ui/core"),l=require("../../../../AnnotationsContext.js"),p=require("../../../../constants.js"),m=require("../AnnotationInput/index.js"),h=require("./style.css.js"),f=require("../../../../../Avatar/index.js"),q=require("../../../../../../effects/useOutsideClick.js");require("../../../../../../utils/index.js");var v=require("../../../../../../clients/jsonApi/index.js");require("../../../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js"),require("../../../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js");var A=require("../../../../../DevCenter/DevCenterRouterContext/hocs/withUniversalLocationHOC.js"),y=require("react/jsx-runtime"),j=require("../../../../../../utils/notificationToasts.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=b(e),C=b(t),I=b(r),g=b(n),N=b(s),R=b(u),_=function(e){var t,r=e.appId,n=e.assetId,i=e.assetCompanyId,s=e.appSettings,u=e.currentUser,d=void 0===u?D:u,A=e.classes,b=e.location,_=e.dashboardType,T=void 0===_?null:_,w=l.useAnnotationsDispatch(),F=a.useState(!1),P=I.default(F,2),U=P[0],k=P[1],L=a.useRef(null);q(L,(function(){k(!1)}));var S,O=(S=C.default(g.default.mark((function e(t,a,i){var u,d,c,l;return g.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,u={app_id:r,asset_id:n,body:t,active_until:a,attachment:{file_name:i&&i.attachmentName,s3_link:i&&i.attachmentUrl},settings:s},d={},T&&(d.dashboard_type=T),(c=o.get(b,"query.time"))&&(u.data_timestamp=R.default(c).format()),e.next=8,v.postAnnotation(u,d);case 8:l=e.sent,w({type:p.ADD_ANNOTATION,annotation:l}),e.next=17;break;case 12:return e.prev=12,e.t0=e.catch(0),j.showErrorNotification("Error during annotation creation"),console.error(e.t0),e.abrupt("return");case 17:j.showSuccessNotification("Annotation has been added"),k(!1);case 19:case"end":return e.stop()}}),e,null,[[0,12]])}))),function(e,t,r){return S.apply(this,arguments)});return y.jsxs("div",{className:h.cAddAnnotationFormInput,children:[y.jsx(f.AvatarComponent,{displayName:"".concat(d.first_name," ").concat(d.last_name),imgSrc:d.profile_photo,size:36}),y.jsxs("div",{className:N.default(h.cAddAnnotationFormInputPaper,(t={},x.default(t,h.cAddAnnotationFormInputPaperOpened,U),x.default(t,h.cAddAnnotationFormInputPaperClosed,!U),t)),children:[y.jsx(c.Fade,{in:!U,timeout:500,children:y.jsx(c.Paper,{className:h.cAddAnnotationFormInputPaperLabel,children:y.jsx(c.Typography,{variant:"body2","data-testid":"".concat("AppAnnotationsPo","_collapsedInput"),className:A.inputLabel,onClick:function(){return k(!0)},children:"Type annotation here"})})}),y.jsx(c.Fade,{in:U,timeout:100,children:y.jsx("div",{className:h.cAddAnnotationFormInputPaperAddAnnotation,children:U&&y.jsx(m,{onSend:O,assetCompanyId:i,currentUser:d})})})]})]})};_.propTypes={appId:i.number.isRequired,assetId:i.number.isRequired,assetCompanyId:i.number.isRequired,appSettings:i.shape().isRequired,currentUser:i.shape({}),classes:i.shape().isRequired,location:i.shape().isRequired,dashboardType:i.string};var D={},T=o.flowRight([d.withStyles((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"}}})),A.withUniversalLocationHOC])(a.memo(_));module.exports=T;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../../src/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js"],"sourcesContent":["import { memo, useState, useRef } from 'react';\nimport { number, shape, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { get, flowRight } from 'lodash';\nimport moment from 'moment';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Fade, Typography } from '@material-ui/core';\n\nimport { useAnnotationsDispatch } from '../../../../AnnotationsContext';\nimport { ADD_ANNOTATION } from '../../../../constants';\nimport AnnotationInput from '../AnnotationInput';\n\nimport styles from './style.css';\n\nimport Avatar from '~components/Avatar';\nimport useOutsideClick from '~effects/useOutsideClick';\nimport { showSuccessNotification, showErrorNotification } from '~/utils';\nimport { postAnnotation } from '~/clients/jsonApi';\nimport { withUniversalLocationHOC } from '~/components/DevCenter/DevCenterRouterContext';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst ANNOTATION_PLACEHOLDER = 'Type annotation here';\n\nconst muiStyles = theme => ({\n inputLabel: {\n color: theme.palette.grey[700],\n fontWeight: 200,\n width: '100%',\n },\n});\n\nconst AddAnnotationForm = ({\n appId,\n assetId,\n assetCompanyId,\n appSettings,\n currentUser,\n classes,\n location,\n dashboardType,\n}) => {\n const dispatch = useAnnotationsDispatch();\n\n const [inputIsOpen, setInputIsOpen] = useState(false);\n\n const containerRef = useRef(null);\n useOutsideClick(containerRef, () => {\n setInputIsOpen(false);\n });\n\n const handlePost = async (body, period, attachment) => {\n try {\n const annotation = {\n app_id: appId,\n asset_id: assetId,\n body,\n active_until: period,\n attachment: {\n file_name: attachment && attachment.attachmentName,\n s3_link: attachment && attachment.attachmentUrl,\n },\n settings: appSettings,\n };\n const options = {};\n if (dashboardType) options.dashboard_type = dashboardType;\n\n const queryTime = get(location, 'query.time');\n if (queryTime) annotation.data_timestamp = moment(queryTime).format();\n\n const newAnnotation = await postAnnotation(annotation, options);\n dispatch({ type: ADD_ANNOTATION, annotation: newAnnotation });\n } catch (e) {\n showErrorNotification('Error during annotation creation');\n console.error(e);\n return;\n }\n\n showSuccessNotification('Annotation has been added');\n setInputIsOpen(false);\n };\n\n return (\n <div className={styles.cAddAnnotationFormInput}>\n <Avatar\n displayName={`${currentUser.first_name} ${currentUser.last_name}`}\n imgSrc={currentUser.profile_photo}\n size={36}\n />\n <div\n className={classNames(styles.cAddAnnotationFormInputPaper, {\n [styles.cAddAnnotationFormInputPaperOpened]: inputIsOpen,\n [styles.cAddAnnotationFormInputPaperClosed]: !inputIsOpen,\n })}\n >\n <Fade in={!inputIsOpen} timeout={500}>\n <Paper className={styles.cAddAnnotationFormInputPaperLabel}>\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_collapsedInput`}\n className={classes.inputLabel}\n onClick={() => setInputIsOpen(true)}\n >\n {ANNOTATION_PLACEHOLDER}\n </Typography>\n </Paper>\n </Fade>\n <Fade in={inputIsOpen} timeout={100}>\n <div className={styles.cAddAnnotationFormInputPaperAddAnnotation}>\n {inputIsOpen && (\n <AnnotationInput\n onSend={handlePost}\n assetCompanyId={assetCompanyId}\n currentUser={currentUser}\n />\n )}\n </div>\n </Fade>\n </div>\n </div>\n );\n};\n\nAddAnnotationForm.propTypes = {\n appId: number.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape().isRequired,\n currentUser: shape({}),\n classes: shape().isRequired,\n location: shape().isRequired,\n dashboardType: string,\n};\n\nAddAnnotationForm.defaultProps = {\n currentUser: {},\n dashboardType: null,\n};\n\nexport default flowRight([withStyles(muiStyles), withUniversalLocationHOC])(\n memo(AddAnnotationForm)\n);\n"],"names":["AddAnnotationForm","_ref","_classNames","appId","assetId","assetCompanyId","appSettings","currentUser","classes","location","dashboardType","dispatch","useAnnotationsDispatch","useState","_useState2","_slicedToArray","_useState","inputIsOpen","setInputIsOpen","containerRef","useRef","useOutsideClick","_ref2","handlePost","_asyncToGenerator","_regeneratorRuntime","mark","body","period","attachment","annotation","options","queryTime","newAnnotation","wrap","_context","prev","next","app_id","asset_id","active_until","file_name","attachmentName","s3_link","attachmentUrl","settings","dashboard_type","get","data_timestamp","moment","format","postAnnotation","sent","type","ADD_ANNOTATION","t0","showErrorNotification","console","error","abrupt","showSuccessNotification","stop","_callee","_x","_x2","_x3","apply","this","arguments","_jsxs","className","styles","cAddAnnotationFormInput","children","_jsx","Avatar","displayName","concat","first_name","last_name","imgSrc","profile_photo","size","jsxs","classNames","cAddAnnotationFormInputPaper","cAddAnnotationFormInputPaperOpened","cAddAnnotationFormInputPaperClosed","Fade","in","timeout","Paper","cAddAnnotationFormInputPaperLabel","Typography","variant","inputLabel","onClick","jsx","cAddAnnotationFormInputPaperAddAnnotation","AnnotationInput","onSend","propTypes","number","isRequired","shape","string","defaultProps","AddAnnotationForm$1","flowRight","withStyles","theme","color","palette","grey","fontWeight","width","withUniversalLocationHOC","memo"],"mappings":"4sCAgCMA,EAAoB,SASpBC,GAAA,IAAAC,EARJC,IAAAA,MACAC,IAAAA,QACAC,IAAAA,eACAC,IAAAA,YACAC,IAAAA,YACAC,IAAAA,QACAC,IAAAA,SACAC,IAAAA,cAEMC,EAAWC,EAAAA,yBAEqBC,EAAAA,EAAQA,UAAC,GAAMC,EAAAC,EAAAA,QAAAC,EAAA,GAA9CC,EAAWH,EAAA,GAAEI,EAAcJ,EAAA,GAE5BK,EAAeC,SAAO,MAC5BC,EAAgBF,GAAc,WAC5BD,GAAe,EACjB,IAEA,IAAgBI,EAAVC,GAAUD,EAAAE,EAAA,QAAAC,UAAAC,MAAG,SAAOC,EAAAA,EAAMC,EAAQC,GAAU,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAR,UAAAS,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAiBwB,OAjBxBF,EAAAC,KAAA,EAExCN,EAAa,CACjBQ,OAAQnC,EACRoC,SAAUnC,EACVuB,KAAAA,EACAa,aAAcZ,EACdC,WAAY,CACVY,UAAWZ,GAAcA,EAAWa,eACpCC,QAASd,GAAcA,EAAWe,eAEpCC,SAAUvC,GAENyB,EAAU,CAAA,EACZrB,IAAeqB,EAAQe,eAAiBpC,IAEtCsB,EAAYe,EAAGA,IAACtC,EAAU,iBACjBqB,EAAWkB,eAAiBC,EAAM,QAAC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K3B,UAAWC,EAAO2B,0CAA0CzB,SAC9DxD,GACCyD,EAAAuB,IAACE,EAAe,CACdC,OAAQ7E,EACRlB,eAAgBA,EAChBE,YAAaA,aAQ7B,EAEAP,EAAkBqG,UAAY,CAC5BlG,MAAOmG,EAAMA,OAACC,WACdnG,QAASkG,EAAMA,OAACC,WAChBlG,eAAgBiG,EAAMA,OAACC,WACvBjG,YAAakG,EAAKA,QAAGD,WACrBhG,YAAaiG,EAAKA,MAAC,IACnBhG,QAASgG,EAAKA,QAAGD,WACjB9F,SAAU+F,EAAKA,QAAGD,WAClB7F,cAAe+F,EAAAA,QAGjBzG,EAAkB0G,aAAe,CAC/BnG,YAAa,CAAE,EACfG,cAAe,MAGjB,IAAAiG,EAAeC,YAAU,CAACC,EAAUA,YAnHlB,SAAAC,GAAK,MAAK,CAC1Bf,WAAY,CACVgB,MAAOD,EAAME,QAAQC,KAAK,KAC1BC,WAAY,IACZC,MAAO,QAEV,IA6GgDC,EAAwBA,0BAA1DR,CACbS,EAAAA,KAAKrH"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../src/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js"],"sourcesContent":["import { memo, useState, useRef } from 'react';\nimport { number, shape, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { get, flowRight } from 'lodash';\nimport moment from 'moment';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Fade, Typography } from '@material-ui/core';\n\nimport { useAnnotationsDispatch } from '../../../../AnnotationsContext';\nimport { ADD_ANNOTATION } from '../../../../constants';\nimport AnnotationInput from '../AnnotationInput';\n\nimport styles from './style.css';\n\nimport Avatar from '~components/Avatar';\nimport useOutsideClick from '~effects/useOutsideClick';\nimport { showSuccessNotification, showErrorNotification } from '~/utils';\nimport { postAnnotation } from '~/clients/jsonApi';\nimport { withUniversalLocationHOC } from '~/components/DevCenter/DevCenterRouterContext';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst ANNOTATION_PLACEHOLDER = 'Type annotation here';\n\nconst muiStyles = theme => ({\n inputLabel: {\n color: theme.palette.grey[700],\n fontWeight: 200,\n width: '100%',\n },\n});\n\nconst AddAnnotationForm = ({\n appId,\n assetId,\n assetCompanyId,\n appSettings,\n currentUser = DEFAULT_ADD_ANNOTATION_FORM_CURRENT_USER,\n classes,\n location,\n dashboardType = null,\n}) => {\n const dispatch = useAnnotationsDispatch();\n\n const [inputIsOpen, setInputIsOpen] = useState(false);\n\n const containerRef = useRef(null);\n useOutsideClick(containerRef, () => {\n setInputIsOpen(false);\n });\n\n const handlePost = async (body, period, attachment) => {\n try {\n const annotation = {\n app_id: appId,\n asset_id: assetId,\n body,\n active_until: period,\n attachment: {\n file_name: attachment && attachment.attachmentName,\n s3_link: attachment && attachment.attachmentUrl,\n },\n settings: appSettings,\n };\n const options = {};\n if (dashboardType) options.dashboard_type = dashboardType;\n\n const queryTime = get(location, 'query.time');\n if (queryTime) annotation.data_timestamp = moment(queryTime).format();\n\n const newAnnotation = await postAnnotation(annotation, options);\n dispatch({ type: ADD_ANNOTATION, annotation: newAnnotation });\n } catch (e) {\n showErrorNotification('Error during annotation creation');\n console.error(e);\n return;\n }\n\n showSuccessNotification('Annotation has been added');\n setInputIsOpen(false);\n };\n\n return (\n <div className={styles.cAddAnnotationFormInput}>\n <Avatar\n displayName={`${currentUser.first_name} ${currentUser.last_name}`}\n imgSrc={currentUser.profile_photo}\n size={36}\n />\n <div\n className={classNames(styles.cAddAnnotationFormInputPaper, {\n [styles.cAddAnnotationFormInputPaperOpened]: inputIsOpen,\n [styles.cAddAnnotationFormInputPaperClosed]: !inputIsOpen,\n })}\n >\n <Fade in={!inputIsOpen} timeout={500}>\n <Paper className={styles.cAddAnnotationFormInputPaperLabel}>\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_collapsedInput`}\n className={classes.inputLabel}\n onClick={() => setInputIsOpen(true)}\n >\n {ANNOTATION_PLACEHOLDER}\n </Typography>\n </Paper>\n </Fade>\n <Fade in={inputIsOpen} timeout={100}>\n <div className={styles.cAddAnnotationFormInputPaperAddAnnotation}>\n {inputIsOpen && (\n <AnnotationInput\n onSend={handlePost}\n assetCompanyId={assetCompanyId}\n currentUser={currentUser}\n />\n )}\n </div>\n </Fade>\n </div>\n </div>\n );\n};\n\nAddAnnotationForm.propTypes = {\n appId: number.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape().isRequired,\n currentUser: shape({}),\n classes: shape().isRequired,\n location: shape().isRequired,\n dashboardType: string,\n};\n\nconst DEFAULT_ADD_ANNOTATION_FORM_CURRENT_USER = {};\n\nexport default flowRight([withStyles(muiStyles), withUniversalLocationHOC])(\n memo(AddAnnotationForm)\n);\n"],"names":["AddAnnotationForm","_ref","_classNames","appId","assetId","assetCompanyId","appSettings","_ref$currentUser","currentUser","DEFAULT_ADD_ANNOTATION_FORM_CURRENT_USER","classes","location","_ref$dashboardType","dashboardType","dispatch","useAnnotationsDispatch","useState","_useState2","_slicedToArray","_useState","inputIsOpen","setInputIsOpen","containerRef","useRef","useOutsideClick","_ref2","handlePost","_asyncToGenerator","_regeneratorRuntime","mark","body","period","attachment","annotation","options","queryTime","newAnnotation","wrap","_context","prev","next","app_id","asset_id","active_until","file_name","attachmentName","s3_link","attachmentUrl","settings","dashboard_type","get","data_timestamp","moment","format","postAnnotation","sent","type","ADD_ANNOTATION","t0","showErrorNotification","console","error","abrupt","showSuccessNotification","stop","_callee","_x","_x2","_x3","apply","this","arguments","_jsxs","className","styles","cAddAnnotationFormInput","children","_jsx","Avatar","displayName","concat","first_name","last_name","imgSrc","profile_photo","size","jsxs","classNames","cAddAnnotationFormInputPaper","cAddAnnotationFormInputPaperOpened","cAddAnnotationFormInputPaperClosed","Fade","in","timeout","Paper","cAddAnnotationFormInputPaperLabel","Typography","variant","inputLabel","onClick","jsx","cAddAnnotationFormInputPaperAddAnnotation","AnnotationInput","onSend","propTypes","number","isRequired","shape","string","AddAnnotationForm$1","flowRight","withStyles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EAAKA,QAAGD,WACrBlG,YAAamG,EAAKA,MAAC,IACnBjG,QAASiG,EAAKA,QAAGD,WACjB/F,SAAUgG,EAAKA,QAAGD,WAClB7F,cAAe+F,EAAAA,QAGjB,IAAMnG,EAA2C,CAAA,EAEjDoG,EAAeC,YAAU,CAACC,EAAUA,YAhHlB,SAAAC,GAAK,MAAK,CAC1Bd,WAAY,CACVe,MAAOD,EAAME,QAAQC,KAAK,KAC1BC,WAAY,IACZC,MAAO,QAEV,IA0GgDC,EAAwBA,0BAA1DR,CACbS,EAAAA,KAAKvH"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/slicedToArray"),a=require("@babel/runtime/regenerator"),i=require("react"),r=require("classnames"),s=require("prop-types"),o=require("@material-ui/core/styles"),c=require("lodash"),u=require("@material-ui/core/withWidth"),d=require("moment"),l=require("@material-ui/core"),m=require("@material-ui/core/colors/grey"),p=require("@material-ui/icons/MoreVert"),h=require("../AnnotationComments/index.js"),f=require("../../../../AnnotationsContext.js"),q=require("../../../../constants.js"),x=require("../AnnotationInput/index.js"),v=require("./style.css.js"),j=require("../../../../../Avatar/index.js"),A=require("../../../../../UserCardPopover.js"),g=require("../../../../../ConfirmationDialog.js"),y=require("../../../../../CommentsInfo/index.js"),b=require("../../../../../UserMention/utils/index.js"),C=require("../../../../../Attachment/index.js"),_=require("../../../../../../utils/mobileDetect.js"),N=require("../../../../../../clients/jsonApi/index.js"),R=require("react/jsx-runtime");function T(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var I=T(e),M=T(t),D=T(n),w=T(a),k=T(r),E=T(u),O=T(d),S=T(m),U=T(p),B="AppAnnotationItemPo",P=function(e){var t=e.user,n=e.currentUser,a=e.classes;return R.jsx("div",{className:v.cAnnotationUserAvatar,children:_.isNativeDetected?R.jsx(j.AvatarComponent,{displayName:"".concat(t.first_name," ").concat(t.last_name),imgSrc:t.profile_photo,size:38,className:a.avatar}):R.jsx(A,{user:t,currentUser:n,children:R.jsx(j.AvatarComponent,{displayName:"".concat(t.first_name," ").concat(t.last_name),imgSrc:t.profile_photo,size:38,className:a.avatar})})})},z=function(e){var t=e.actionsMenuAnchorEl,n=e.handleToggleActionsMenu,a=e.classes,i=e.handleEdit,r=e.handleDelete;return R.jsxs(R.Fragment,{children:[R.jsx(l.IconButton,{"data-testid":"".concat(B,"_menuButton"),"aria-label":"Actions","aria-owns":t?v.cAnnotationContainerActionsMenu:void 0,"aria-haspopup":"true",className:a.iconButtonRoot,onClick:n,children:R.jsx(U.default,{htmlColor:S.default[400]})}),R.jsxs(l.Menu,{id:"cAnnotationContainerActionsMenu",anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:t,open:!!t,onClick:n,children:[R.jsx(l.MenuItem,{"data-testid":"".concat(B,"_editMenuItem"),onClick:i,children:"Edit"}),R.jsx(l.MenuItem,{"data-testid":"".concat(B,"_deleteMenuItem"),onClick:r,children:"Delete"})]})]})},L=function(e){var t,n,a=e.included,r=e.annotation,s=e.assetCompanyId,o=e.classes,c=e.showSuccessNotification,d=e.width,m=i.useState(!1),p=D.default(m,2),j=p[0],A=p[1],T=i.useState(null),E=D.default(T,2),S=E[0],U=E[1],L=i.useState(!1),W=D.default(L,2),F=W[0],Y=W[1],G=i.useState(!1),H=D.default(G,2),V=H[0],J=H[1],K=!u.isWidthUp("sm",d),Q=r.attributes.comments_count||0,X=i.useState(Q),Z=D.default(X,2),$=Z[0],ee=Z[1],te=f.useAnnotationsDispatch(),ne=r.relationships.comment_users.data.reduce((function(e,t){var n=t.id,i=a.find((function(e){return e.id===n}));return i&&e.push(i.attributes),e}),[]),ae=ne.map((function(e){var t=e.last_name,n=e.first_name;return"".concat(n," ").concat(t)})),ie=(t=M.default(w.default.mark((function e(){return w.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,N.deleteAnnotation(r.id);case 3:e.sent&&(te({type:q.DELETE_ANNOTATION,id:r.id}),c("Annotation has been deleted")),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),function(){return t.apply(this,arguments)}),re=(n=M.default(w.default.mark((function e(t,n,a){var i,s;return w.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i={body:t,active_until:n,attachment:{file_name:a&&a.attachmentName,signed_url:a&&a.attachmentUrl}},e.next=4,N.patchAnnotation(r.id,i);case 4:s=e.sent,te({type:q.EDIT_ANNOTATION,annotation:s,id:r.id}),e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return");case 12:c("Annotation has been changed"),Y(!1);case 14:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,t,a){return n.apply(this,arguments)}),se=r.relationships.user.data.id,oe=a.find((function(e){var t=e.type,n=e.id;return"user"===t&&n===se})),ce=oe.attributes,ue=r.attributes.attachment;return R.jsxs(l.Paper,{className:o.container,elevation:0,children:[R.jsxs("div",{"data-testid":"".concat(B,"_annotation_").concat(r.attributes.body),className:v.cAnnotationContainer,children:[R.jsx(P,{user:ce,classes:o,isNative:_.isNativeDetected,currentUser:oe}),R.jsxs("div",{className:v.cAnnotationContainerTop,children:[R.jsxs("div",{className:v.cAnnotationContainerTopMainInfo,children:[R.jsx(l.Typography,{variant:"body2","data-testid":"".concat(B,"_userName"),children:"".concat(ce.first_name," ").concat(ce.last_name)}),R.jsx(l.Typography,{"data-testid":"".concat(B,"_addDate"),variant:"caption",className:o.createdAt,children:O.default(r.attributes.created_at).format("MM/DD/YY H:mm")})]}),R.jsx("div",{className:k.default(v.cAnnotationContainerTopMenu,I.default({},v.cAnnotationContainerTopMenuSmall,K)),children:R.jsx(z,{actionsMenuAnchorEl:S,handleToggleActionsMenu:function(e){var t=e.currentTarget;U(S?null:t)},handleEdit:function(){return Y(!0)},handleDelete:function(){return J(!0)},classes:o})})]}),R.jsx(l.Divider,{className:o.headerDividerRoot}),R.jsx("div",{"data-testid":"".concat(B,"_message"),className:v.cAnnotationContainerContent,children:F?R.jsx(x,{initialText:r.attributes.body,assetCompanyId:s,initialPeriod:r.attributes.created_at,initialAttachment:ue,onSend:re,onClose:function(){return Y(!1)},closeOnEsc:!0}):R.jsxs(R.Fragment,{children:[b.formatMentionText(r.attributes.body,r.relationships.mentioned_users.data,_.isNativeDetected,null,oe),ue&&ue.signed_url&&R.jsx(C,{attachmentUrl:ue.signed_url,fileName:ue.file_name,size:"small"})]})})]}),R.jsxs("div",{"data-testid":"".concat(B,"_comments_").concat(r.attributes.body),className:v.cAnnotationComments,children:[R.jsxs("div",{className:v.cAnnotationCommentsInfo,children:[R.jsx(l.Typography,{"data-testid":"".concat(B,"_commentButton"),variant:"caption",color:"primary",className:o.link,onClick:function(){return A(!0)},children:"Comment"}),R.jsx(y,{commentsCount:$,usersWhoCommented:ae,activeUsersList:ne,currentUser:oe,small:!0})]}),R.jsx(h,{annotationId:r.id,commentInputIsOpen:j,setCommentInputIsOpen:A,commentsCount:$,initialCommentsCount:Q,assetCompanyId:s,setCommentsCount:ee,currentUser:oe})]}),V&&R.jsx(g,{open:V,text:"Do you really want to delete annotation?",handleClose:function(){return J(!1)},handleOk:ie,okText:"Delete"})]})};P.propTypes={user:s.shape({id:s.number.isRequired,first_name:s.string.isRequired,last_name:s.string.isRequired,profile_photo:s.string.isRequired}).isRequired,currentUser:s.shape({}).isRequired,classes:s.shape({}).isRequired},z.propTypes={actionsMenuAnchorEl:s.oneOf([s.node,null]).isRequired,handleToggleActionsMenu:s.func.isRequired,classes:s.shape({}).isRequired,handleDelete:s.func.isRequired,handleEdit:s.func.isRequired},L.propTypes={included:s.arrayOf(s.shape({})).isRequired,annotation:s.shape({relationships:s.shape({user:s.shape({data:s.shape({id:s.string.isRequired}).isRequired}).isRequired,mentioned_users:s.shape({data:s.arrayOf(s.shape({})).isRequired}).isRequired}).isRequired,attributes:s.shape({body:s.string.isRequired,created_at:s.string.isRequired})}).isRequired,classes:s.shape({}).isRequired,showSuccessNotification:s.func,width:s.string.isRequired,assetCompanyId:s.number.isRequired},L.defaultProps={showSuccessNotification:function(){}};var W=c.flowRight([o.withStyles((function(e){return{container:{backgroundColor:"#3b3b3be6",marginBottom:16,marginLeft:26},headerDividerRoot:{margin:"10px 0"},createdAt:{color:e.palette.grey[700],marginLeft:5},link:{cursor:"pointer"},iconButtonRoot:{height:24,width:24,padding:0,margin:"0 -10px 0 5px"}}})),E.default()])(L);module.exports=W;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/slicedToArray"),a=require("@babel/runtime/regenerator"),i=require("react"),r=require("classnames"),s=require("prop-types"),o=require("@material-ui/core/styles"),c=require("lodash"),u=require("@material-ui/core/withWidth"),d=require("moment"),l=require("@material-ui/core"),m=require("@material-ui/core/colors/grey"),p=require("@material-ui/icons/MoreVert"),h=require("../AnnotationComments/index.js"),f=require("../../../../AnnotationsContext.js"),q=require("../../../../constants.js"),x=require("../AnnotationInput/index.js"),v=require("./style.css.js"),j=require("../../../../../Avatar/index.js"),A=require("../../../../../UserCardPopover.js"),g=require("../../../../../ConfirmationDialog.js"),y=require("../../../../../CommentsInfo/index.js"),b=require("../../../../../UserMention/utils/index.js"),C=require("../../../../../Attachment/index.js"),_=require("../../../../../../utils/mobileDetect.js"),N=require("../../../../../../clients/jsonApi/index.js"),R=require("react/jsx-runtime");function T(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var I=T(e),M=T(t),D=T(n),k=T(a),w=T(r),E=T(u),O=T(d),U=T(m),S=T(p),B="AppAnnotationItemPo",z=function(e){var t=e.user,n=e.currentUser,a=e.classes;return R.jsx("div",{className:v.cAnnotationUserAvatar,children:_.isNativeDetected?R.jsx(j.AvatarComponent,{displayName:"".concat(t.first_name," ").concat(t.last_name),imgSrc:t.profile_photo,size:38,className:a.avatar}):R.jsx(A,{user:t,currentUser:n,children:R.jsx(j.AvatarComponent,{displayName:"".concat(t.first_name," ").concat(t.last_name),imgSrc:t.profile_photo,size:38,className:a.avatar})})})},P=function(e){var t=e.actionsMenuAnchorEl,n=e.handleToggleActionsMenu,a=e.classes,i=e.handleEdit,r=e.handleDelete;return R.jsxs(R.Fragment,{children:[R.jsx(l.IconButton,{"data-testid":"".concat(B,"_menuButton"),"aria-label":"Actions","aria-owns":t?v.cAnnotationContainerActionsMenu:void 0,"aria-haspopup":"true",className:a.iconButtonRoot,onClick:n,children:R.jsx(S.default,{htmlColor:U.default[400]})}),R.jsxs(l.Menu,{id:"cAnnotationContainerActionsMenu",anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},anchorEl:t,open:!!t,onClick:n,children:[R.jsx(l.MenuItem,{"data-testid":"".concat(B,"_editMenuItem"),onClick:i,children:"Edit"}),R.jsx(l.MenuItem,{"data-testid":"".concat(B,"_deleteMenuItem"),onClick:r,children:"Delete"})]})]})},L=function(e){var t,n,a=e.included,r=e.annotation,s=e.assetCompanyId,o=e.classes,c=e.showSuccessNotification,d=void 0===c?W:c,m=e.width,p=i.useState(!1),j=D.default(p,2),A=j[0],T=j[1],E=i.useState(null),U=D.default(E,2),S=U[0],L=U[1],F=i.useState(!1),Y=D.default(F,2),G=Y[0],H=Y[1],V=i.useState(!1),J=D.default(V,2),K=J[0],Q=J[1],X=!u.isWidthUp("sm",m),Z=r.attributes.comments_count||0,$=i.useState(Z),ee=D.default($,2),te=ee[0],ne=ee[1],ae=f.useAnnotationsDispatch(),ie=r.relationships.comment_users.data.reduce((function(e,t){var n=t.id,i=a.find((function(e){return e.id===n}));return i&&e.push(i.attributes),e}),[]),re=ie.map((function(e){var t=e.last_name,n=e.first_name;return"".concat(n," ").concat(t)})),se=(t=M.default(k.default.mark((function e(){return k.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,N.deleteAnnotation(r.id);case 3:e.sent&&(ae({type:q.DELETE_ANNOTATION,id:r.id}),d("Annotation has been deleted")),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])}))),function(){return t.apply(this,arguments)}),oe=(n=M.default(k.default.mark((function e(t,n,a){var i,s;return k.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i={body:t,active_until:n,attachment:{file_name:a&&a.attachmentName,signed_url:a&&a.attachmentUrl}},e.next=4,N.patchAnnotation(r.id,i);case 4:s=e.sent,ae({type:q.EDIT_ANNOTATION,annotation:s,id:r.id}),e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return");case 12:d("Annotation has been changed"),H(!1);case 14:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,t,a){return n.apply(this,arguments)}),ce=r.relationships.user.data.id,ue=a.find((function(e){var t=e.type,n=e.id;return"user"===t&&n===ce})),de=ue.attributes,le=r.attributes.attachment;return R.jsxs(l.Paper,{className:o.container,elevation:0,children:[R.jsxs("div",{"data-testid":"".concat(B,"_annotation_").concat(r.attributes.body),className:v.cAnnotationContainer,children:[R.jsx(z,{user:de,classes:o,isNative:_.isNativeDetected,currentUser:ue}),R.jsxs("div",{className:v.cAnnotationContainerTop,children:[R.jsxs("div",{className:v.cAnnotationContainerTopMainInfo,children:[R.jsx(l.Typography,{variant:"body2","data-testid":"".concat(B,"_userName"),children:"".concat(de.first_name," ").concat(de.last_name)}),R.jsx(l.Typography,{"data-testid":"".concat(B,"_addDate"),variant:"caption",className:o.createdAt,children:O.default(r.attributes.created_at).format("MM/DD/YY H:mm")})]}),R.jsx("div",{className:w.default(v.cAnnotationContainerTopMenu,I.default({},v.cAnnotationContainerTopMenuSmall,X)),children:R.jsx(P,{actionsMenuAnchorEl:S,handleToggleActionsMenu:function(e){var t=e.currentTarget;L(S?null:t)},handleEdit:function(){return H(!0)},handleDelete:function(){return Q(!0)},classes:o})})]}),R.jsx(l.Divider,{className:o.headerDividerRoot}),R.jsx("div",{"data-testid":"".concat(B,"_message"),className:v.cAnnotationContainerContent,children:G?R.jsx(x,{initialText:r.attributes.body,assetCompanyId:s,initialPeriod:r.attributes.created_at,initialAttachment:le,onSend:oe,onClose:function(){return H(!1)},closeOnEsc:!0}):R.jsxs(R.Fragment,{children:[b.formatMentionText(r.attributes.body,r.relationships.mentioned_users.data,_.isNativeDetected,null,ue),le&&le.signed_url&&R.jsx(C,{attachmentUrl:le.signed_url,fileName:le.file_name,size:"small"})]})})]}),R.jsxs("div",{"data-testid":"".concat(B,"_comments_").concat(r.attributes.body),className:v.cAnnotationComments,children:[R.jsxs("div",{className:v.cAnnotationCommentsInfo,children:[R.jsx(l.Typography,{"data-testid":"".concat(B,"_commentButton"),variant:"caption",color:"primary",className:o.link,onClick:function(){return T(!0)},children:"Comment"}),R.jsx(y,{commentsCount:te,usersWhoCommented:re,activeUsersList:ie,currentUser:ue,small:!0})]}),R.jsx(h,{annotationId:r.id,commentInputIsOpen:A,setCommentInputIsOpen:T,commentsCount:te,initialCommentsCount:Z,assetCompanyId:s,setCommentsCount:ne,currentUser:ue})]}),K&&R.jsx(g,{open:K,text:"Do you really want to delete annotation?",handleClose:function(){return Q(!1)},handleOk:se,okText:"Delete"})]})};z.propTypes={user:s.shape({id:s.number.isRequired,first_name:s.string.isRequired,last_name:s.string.isRequired,profile_photo:s.string.isRequired}).isRequired,currentUser:s.shape({}).isRequired,classes:s.shape({}).isRequired},P.propTypes={actionsMenuAnchorEl:s.oneOf([s.node,null]).isRequired,handleToggleActionsMenu:s.func.isRequired,classes:s.shape({}).isRequired,handleDelete:s.func.isRequired,handleEdit:s.func.isRequired},L.propTypes={included:s.arrayOf(s.shape({})).isRequired,annotation:s.shape({relationships:s.shape({user:s.shape({data:s.shape({id:s.string.isRequired}).isRequired}).isRequired,mentioned_users:s.shape({data:s.arrayOf(s.shape({})).isRequired}).isRequired}).isRequired,attributes:s.shape({body:s.string.isRequired,created_at:s.string.isRequired})}).isRequired,classes:s.shape({}).isRequired,showSuccessNotification:s.func,width:s.string.isRequired,assetCompanyId:s.number.isRequired};var W=function(){},F=c.flowRight([o.withStyles((function(e){return{container:{backgroundColor:"#3b3b3be6",marginBottom:16,marginLeft:26},headerDividerRoot:{margin:"10px 0"},createdAt:{color:e.palette.grey[700],marginLeft:5},link:{cursor:"pointer"},iconButtonRoot:{height:24,width:24,padding:0,margin:"0 -10px 0 5px"}}})),E.default()])(L);module.exports=F;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../../src/components/Annotations/components/AnnotationsList/components/Annotation/index.js"],"sourcesContent":["import { useState } from 'react';\nimport classNames from 'classnames';\nimport { shape, string, arrayOf, func, node, oneOf, number } from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { flowRight } from 'lodash';\nimport withWidth, { isWidthUp } from '@material-ui/core/withWidth';\nimport moment from 'moment';\nimport { Paper, Typography, Divider, MenuItem, IconButton, Menu } from '@material-ui/core';\nimport grey from '@material-ui/core/colors/grey';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\n\nimport AnnotationComments from '../AnnotationComments';\nimport { useAnnotationsDispatch } from '../../../../AnnotationsContext';\nimport { DELETE_ANNOTATION, EDIT_ANNOTATION } from '../../../../constants';\nimport AnnotationInput from '../AnnotationInput';\n\nimport styles from './style.css';\n\nimport Avatar from '~components/Avatar';\nimport UserCardPopover from '~components/UserCardPopover';\nimport ConfirmationDialog from '~components/ConfirmationDialog';\nimport CommentsInfo from '~components/CommentsInfo';\nimport { formatMentionText } from '~components/UserMention/utils';\nimport Attachment from '~components/Attachment';\nimport { isNativeDetected as isNative } from '~/utils/mobileDetect';\nimport { deleteAnnotation, patchAnnotation } from '~/clients/jsonApi';\n\nconst PAGE_NAME = 'AppAnnotationItemPo';\n\nconst CREATED_AT_FORMAT = 'MM/DD/YY H:mm';\n\nconst muiStyles = theme => ({\n container: { backgroundColor: '#3b3b3be6', marginBottom: 16, marginLeft: 26 },\n headerDividerRoot: { margin: '10px 0' },\n createdAt: { color: theme.palette.grey[700], marginLeft: 5 },\n link: { cursor: 'pointer' },\n iconButtonRoot: {\n height: 24,\n width: 24,\n padding: 0,\n margin: '0 -10px 0 5px',\n },\n});\n\nconst UserAvatar = ({ user, currentUser, classes }) => (\n <div className={styles.cAnnotationUserAvatar}>\n {isNative ? (\n <Avatar\n // eslint-disable-next-line camelcase\n displayName={`${user.first_name} ${user.last_name}`}\n imgSrc={user.profile_photo}\n size={38}\n className={classes.avatar}\n />\n ) : (\n <UserCardPopover user={user} currentUser={currentUser}>\n <Avatar\n displayName={`${user.first_name} ${user.last_name}`}\n imgSrc={user.profile_photo}\n size={38}\n className={classes.avatar}\n />\n </UserCardPopover>\n )}\n </div>\n);\n\nconst MenuButton = ({\n actionsMenuAnchorEl,\n handleToggleActionsMenu,\n classes,\n handleEdit,\n handleDelete,\n}) => (\n <>\n <IconButton\n data-testid={`${PAGE_NAME}_menuButton`}\n aria-label=\"Actions\"\n aria-owns={actionsMenuAnchorEl ? styles.cAnnotationContainerActionsMenu : undefined}\n aria-haspopup=\"true\"\n className={classes.iconButtonRoot}\n onClick={handleToggleActionsMenu}\n >\n <MoreVertIcon htmlColor={grey[400]} />\n </IconButton>\n\n <Menu\n id=\"cAnnotationContainerActionsMenu\"\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n anchorEl={actionsMenuAnchorEl}\n open={!!actionsMenuAnchorEl}\n onClick={handleToggleActionsMenu}\n >\n <MenuItem data-testid={`${PAGE_NAME}_editMenuItem`} onClick={handleEdit}>\n Edit\n </MenuItem>\n <MenuItem data-testid={`${PAGE_NAME}_deleteMenuItem`} onClick={handleDelete}>\n Delete\n </MenuItem>\n </Menu>\n </>\n);\n\nconst Annotation = ({\n included,\n annotation,\n assetCompanyId,\n classes,\n showSuccessNotification,\n width,\n}) => {\n const [commentInputIsOpen, setCommentInputIsOpen] = useState(false);\n const [actionsMenuAnchorEl, setActionsMenuAnchorEl] = useState(null);\n const [isEdit, setIsEdit] = useState(false);\n const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);\n const isSmallScreen = !isWidthUp('sm', width);\n\n const initialCommentsCount = annotation.attributes.comments_count || 0;\n const [commentsCount, setCommentsCount] = useState(initialCommentsCount);\n\n const dispatch = useAnnotationsDispatch();\n\n const activeUsersList = annotation.relationships.comment_users.data.reduce((users, { id }) => {\n const userData = included.find(user => user.id === id);\n if (userData) {\n users.push(userData.attributes);\n }\n return users;\n }, []);\n\n const userWhoCommented = activeUsersList.map(\n // eslint-disable-next-line camelcase\n ({ last_name, first_name }) => `${first_name} ${last_name}`\n );\n\n const handleToggleActionsMenu = event => {\n const currentT = event.currentTarget;\n setActionsMenuAnchorEl(actionsMenuAnchorEl ? null : currentT);\n };\n\n const handleDelete = async () => {\n try {\n const response = await deleteAnnotation(annotation.id);\n if (response) {\n dispatch({ type: DELETE_ANNOTATION, id: annotation.id });\n showSuccessNotification('Annotation has been deleted');\n }\n } catch (e) {\n console.error(e);\n }\n };\n\n const handleEdit = async (body, period, attachment) => {\n try {\n const changedAnnotation = {\n body,\n active_until: period,\n attachment: {\n file_name: attachment && attachment.attachmentName,\n signed_url: attachment && attachment.attachmentUrl,\n },\n };\n const updatedAnnotation = await patchAnnotation(annotation.id, changedAnnotation);\n dispatch({ type: EDIT_ANNOTATION, annotation: updatedAnnotation, id: annotation.id });\n } catch (e) {\n console.error(e);\n return;\n }\n\n showSuccessNotification('Annotation has been changed');\n setIsEdit(false);\n };\n\n const userId = annotation.relationships.user.data.id;\n const currentUser = included.find(({ type, id }) => type === 'user' && id === userId);\n const userData = currentUser.attributes;\n const { attachment } = annotation.attributes;\n\n return (\n <Paper className={classes.container} elevation={0}>\n <div\n data-testid={`${PAGE_NAME}_annotation_${annotation.attributes.body}`}\n className={styles.cAnnotationContainer}\n >\n <UserAvatar\n user={userData}\n classes={classes}\n isNative={isNative}\n currentUser={currentUser}\n />\n\n <div className={styles.cAnnotationContainerTop}>\n <div className={styles.cAnnotationContainerTopMainInfo}>\n <Typography variant=\"body2\" data-testid={`${PAGE_NAME}_userName`}>\n {`${userData.first_name} ${userData.last_name}`}\n </Typography>\n <Typography\n data-testid={`${PAGE_NAME}_addDate`}\n variant=\"caption\"\n className={classes.createdAt}\n >\n {moment(annotation.attributes.created_at).format(CREATED_AT_FORMAT)}\n </Typography>\n </div>\n <div\n className={classNames(styles.cAnnotationContainerTopMenu, {\n [styles.cAnnotationContainerTopMenuSmall]: isSmallScreen,\n })}\n >\n <MenuButton\n actionsMenuAnchorEl={actionsMenuAnchorEl}\n handleToggleActionsMenu={handleToggleActionsMenu}\n handleEdit={() => setIsEdit(true)}\n handleDelete={() => setDeleteDialogOpen(true)}\n classes={classes}\n />\n </div>\n </div>\n\n <Divider className={classes.headerDividerRoot} />\n\n <div data-testid={`${PAGE_NAME}_message`} className={styles.cAnnotationContainerContent}>\n {isEdit ? (\n <AnnotationInput\n initialText={annotation.attributes.body}\n assetCompanyId={assetCompanyId}\n initialPeriod={annotation.attributes.created_at}\n initialAttachment={attachment}\n onSend={handleEdit}\n onClose={() => setIsEdit(false)}\n closeOnEsc\n />\n ) : (\n <>\n {formatMentionText(\n annotation.attributes.body,\n annotation.relationships.mentioned_users.data,\n isNative,\n null,\n currentUser\n )}\n {attachment && attachment.signed_url && (\n <Attachment\n attachmentUrl={attachment.signed_url}\n fileName={attachment.file_name}\n size=\"small\"\n />\n )}\n </>\n )}\n </div>\n </div>\n <div\n data-testid={`${PAGE_NAME}_comments_${annotation.attributes.body}`}\n className={styles.cAnnotationComments}\n >\n <div className={styles.cAnnotationCommentsInfo}>\n <Typography\n data-testid={`${PAGE_NAME}_commentButton`}\n variant=\"caption\"\n color=\"primary\"\n className={classes.link}\n onClick={() => setCommentInputIsOpen(true)}\n >\n Comment\n </Typography>\n <CommentsInfo\n commentsCount={commentsCount}\n usersWhoCommented={userWhoCommented}\n activeUsersList={activeUsersList}\n currentUser={currentUser}\n small\n />\n </div>\n <AnnotationComments\n annotationId={annotation.id}\n commentInputIsOpen={commentInputIsOpen}\n setCommentInputIsOpen={setCommentInputIsOpen}\n commentsCount={commentsCount}\n initialCommentsCount={initialCommentsCount}\n assetCompanyId={assetCompanyId}\n setCommentsCount={setCommentsCount}\n currentUser={currentUser}\n />\n </div>\n {deleteDialogOpen && (\n <ConfirmationDialog\n open={deleteDialogOpen}\n text=\"Do you really want to delete annotation?\"\n handleClose={() => setDeleteDialogOpen(false)}\n handleOk={handleDelete}\n okText=\"Delete\"\n />\n )}\n </Paper>\n );\n};\n\nUserAvatar.propTypes = {\n user: shape({\n id: number.isRequired,\n first_name: string.isRequired,\n last_name: string.isRequired,\n profile_photo: string.isRequired,\n }).isRequired,\n currentUser: shape({}).isRequired,\n classes: shape({}).isRequired,\n};\n\nMenuButton.propTypes = {\n actionsMenuAnchorEl: oneOf([node, null]).isRequired,\n handleToggleActionsMenu: func.isRequired,\n classes: shape({}).isRequired,\n handleDelete: func.isRequired,\n handleEdit: func.isRequired,\n};\n\nAnnotation.propTypes = {\n included: arrayOf(shape({})).isRequired,\n annotation: shape({\n relationships: shape({\n user: shape({ data: shape({ id: string.isRequired }).isRequired }).isRequired,\n mentioned_users: shape({ data: arrayOf(shape({})).isRequired }).isRequired,\n }).isRequired,\n attributes: shape({ body: string.isRequired, created_at: string.isRequired }),\n }).isRequired,\n classes: shape({}).isRequired,\n showSuccessNotification: func,\n width: string.isRequired,\n assetCompanyId: number.isRequired,\n};\n\nAnnotation.defaultProps = {\n showSuccessNotification: () => undefined,\n};\n\nexport default flowRight([withStyles(muiStyles), withWidth()])(Annotation);\n"],"names":["PAGE_NAME","UserAvatar","_ref","user","currentUser","classes","_jsx","className","styles","cAnnotationUserAvatar","children","isNative","Avatar","AvatarComponent","displayName","concat","first_name","last_name","imgSrc","profile_photo","size","avatar","UserCardPopover","MenuButton","_ref2","actionsMenuAnchorEl","handleToggleActionsMenu","handleEdit","handleDelete","_jsxs","_Fragment","IconButton","cAnnotationContainerActionsMenu","undefined","iconButtonRoot","onClick","MoreVertIcon","htmlColor","grey","Menu","id","anchorOrigin","vertical","horizontal","transformOrigin","anchorEl","open","MenuItem","Annotation","_ref3","_ref6","_ref7","included","annotation","assetCompanyId","showSuccessNotification","width","useState","_useState2","_slicedToArray","_useState","commentInputIsOpen","setCommentInputIsOpen","_useState4","_useState3","setActionsMenuAnchorEl","_useState6","_useState5","isEdit","setIsEdit","_useState8","_useState7","deleteDialogOpen","setDeleteDialogOpen","isSmallScreen","isWidthUp","initialCommentsCount","attributes","comments_count","_useState10","_useState9","commentsCount","setCommentsCount","dispatch","useAnnotationsDispatch","activeUsersList","relationships","comment_users","data","reduce","users","_ref4","userData","find","push","userWhoCommented","map","_ref5","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","deleteAnnotation","sent","type","DELETE_ANNOTATION","t0","console","error","stop","apply","this","arguments","body","period","attachment","changedAnnotation","updatedAnnotation","_context2","active_until","file_name","attachmentName","signed_url","attachmentUrl","patchAnnotation","EDIT_ANNOTATION","abrupt","_callee2","_x","_x2","_x3","userId","_ref8","Paper","container","elevation","jsxs","cAnnotationContainer","isNativeDetected","cAnnotationContainerTop","cAnnotationContainerTopMainInfo","Typography","variant","createdAt","moment","created_at","format","jsx","classNames","cAnnotationContainerTopMenu","cAnnotationContainerTopMenuSmall","event","currentT","currentTarget","Divider","headerDividerRoot","cAnnotationContainerContent","AnnotationInput","initialText","initialPeriod","initialAttachment","onSend","onClose","closeOnEsc","formatMentionText","mentioned_users","Attachment","fileName","cAnnotationComments","cAnnotationCommentsInfo","color","link","CommentsInfo","usersWhoCommented","small","AnnotationComments","annotationId","ConfirmationDialog","text","handleClose","handleOk","okText","propTypes","shape","number","isRequired","string","oneOf","node","func","arrayOf","defaultProps","Annotation$1","flowRight","withStyles","theme","backgroundColor","marginBottom","marginLeft","margin","palette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MAAM,CAAEnG,KAAM0G,EAAAA,QAAQP,EAAAA,MAAM,CAAE,IAAGE,aAAcA,aAC/DA,WACHhH,WAAY8G,EAAAA,MAAM,CAAEtE,KAAMyE,EAAMA,OAACD,WAAYxC,WAAYyC,EAAMA,OAACD,eAC/DA,WACHxL,QAASsL,EAAAA,MAAM,CAAE,GAAEE,WACnBtI,wBAAyB0I,EAAIA,KAC7BzI,MAAOsI,EAAMA,OAACD,WACdvI,eAAgBsI,EAAMA,OAACC,YAGzB7I,EAAWmJ,aAAe,CACxB5I,wBAAyB,WAAe,GAG1C,IAAA6I,EAAeC,EAASA,UAAC,CAACC,EAAAA,YAlTR,SAAAC,GAAK,MAAK,CAC1B7D,UAAW,CAAE8D,gBAAiB,YAAaC,aAAc,GAAIC,WAAY,IACzE3C,kBAAmB,CAAE4C,OAAQ,UAC7BxD,UAAW,CAAE2B,MAAOyB,EAAMK,QAAQtK,KAAK,KAAMoK,WAAY,GACzD3B,KAAM,CAAE8B,OAAQ,WAChB3K,eAAgB,CACd4K,OAAQ,GACRtJ,MAAO,GACPuJ,QAAS,EACTJ,OAAQ,iBAEX,IAuSgDK,EAAAA,WAAlCX,CAAgDrJ"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../src/components/Annotations/components/AnnotationsList/components/Annotation/index.js"],"sourcesContent":["import { useState } from 'react';\nimport classNames from 'classnames';\nimport { shape, string, arrayOf, func, node, oneOf, number } from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { flowRight } from 'lodash';\nimport withWidth, { isWidthUp } from '@material-ui/core/withWidth';\nimport moment from 'moment';\nimport { Paper, Typography, Divider, MenuItem, IconButton, Menu } from '@material-ui/core';\nimport grey from '@material-ui/core/colors/grey';\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\n\nimport AnnotationComments from '../AnnotationComments';\nimport { useAnnotationsDispatch } from '../../../../AnnotationsContext';\nimport { DELETE_ANNOTATION, EDIT_ANNOTATION } from '../../../../constants';\nimport AnnotationInput from '../AnnotationInput';\n\nimport styles from './style.css';\n\nimport Avatar from '~components/Avatar';\nimport UserCardPopover from '~components/UserCardPopover';\nimport ConfirmationDialog from '~components/ConfirmationDialog';\nimport CommentsInfo from '~components/CommentsInfo';\nimport { formatMentionText } from '~components/UserMention/utils';\nimport Attachment from '~components/Attachment';\nimport { isNativeDetected as isNative } from '~/utils/mobileDetect';\nimport { deleteAnnotation, patchAnnotation } from '~/clients/jsonApi';\n\nconst PAGE_NAME = 'AppAnnotationItemPo';\n\nconst CREATED_AT_FORMAT = 'MM/DD/YY H:mm';\n\nconst muiStyles = theme => ({\n container: { backgroundColor: '#3b3b3be6', marginBottom: 16, marginLeft: 26 },\n headerDividerRoot: { margin: '10px 0' },\n createdAt: { color: theme.palette.grey[700], marginLeft: 5 },\n link: { cursor: 'pointer' },\n iconButtonRoot: {\n height: 24,\n width: 24,\n padding: 0,\n margin: '0 -10px 0 5px',\n },\n});\n\nconst UserAvatar = ({ user, currentUser, classes }) => (\n <div className={styles.cAnnotationUserAvatar}>\n {isNative ? (\n <Avatar\n // eslint-disable-next-line camelcase\n displayName={`${user.first_name} ${user.last_name}`}\n imgSrc={user.profile_photo}\n size={38}\n className={classes.avatar}\n />\n ) : (\n <UserCardPopover user={user} currentUser={currentUser}>\n <Avatar\n displayName={`${user.first_name} ${user.last_name}`}\n imgSrc={user.profile_photo}\n size={38}\n className={classes.avatar}\n />\n </UserCardPopover>\n )}\n </div>\n);\n\nconst MenuButton = ({\n actionsMenuAnchorEl,\n handleToggleActionsMenu,\n classes,\n handleEdit,\n handleDelete,\n}) => (\n <>\n <IconButton\n data-testid={`${PAGE_NAME}_menuButton`}\n aria-label=\"Actions\"\n aria-owns={actionsMenuAnchorEl ? styles.cAnnotationContainerActionsMenu : undefined}\n aria-haspopup=\"true\"\n className={classes.iconButtonRoot}\n onClick={handleToggleActionsMenu}\n >\n <MoreVertIcon htmlColor={grey[400]} />\n </IconButton>\n\n <Menu\n id=\"cAnnotationContainerActionsMenu\"\n anchorOrigin={{ vertical: 'top', horizontal: 'right' }}\n transformOrigin={{ vertical: 'top', horizontal: 'right' }}\n anchorEl={actionsMenuAnchorEl}\n open={!!actionsMenuAnchorEl}\n onClick={handleToggleActionsMenu}\n >\n <MenuItem data-testid={`${PAGE_NAME}_editMenuItem`} onClick={handleEdit}>\n Edit\n </MenuItem>\n <MenuItem data-testid={`${PAGE_NAME}_deleteMenuItem`} onClick={handleDelete}>\n Delete\n </MenuItem>\n </Menu>\n </>\n);\n\nconst Annotation = ({\n included,\n annotation,\n assetCompanyId,\n classes,\n showSuccessNotification = DEFAULT_ANNOTATION_SHOW_SUCCESS_NOTIFICATION,\n width,\n}) => {\n const [commentInputIsOpen, setCommentInputIsOpen] = useState(false);\n const [actionsMenuAnchorEl, setActionsMenuAnchorEl] = useState(null);\n const [isEdit, setIsEdit] = useState(false);\n const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);\n const isSmallScreen = !isWidthUp('sm', width);\n\n const initialCommentsCount = annotation.attributes.comments_count || 0;\n const [commentsCount, setCommentsCount] = useState(initialCommentsCount);\n\n const dispatch = useAnnotationsDispatch();\n\n const activeUsersList = annotation.relationships.comment_users.data.reduce((users, { id }) => {\n const userData = included.find(user => user.id === id);\n if (userData) {\n users.push(userData.attributes);\n }\n return users;\n }, []);\n\n const userWhoCommented = activeUsersList.map(\n // eslint-disable-next-line camelcase\n ({ last_name, first_name }) => `${first_name} ${last_name}`\n );\n\n const handleToggleActionsMenu = event => {\n const currentT = event.currentTarget;\n setActionsMenuAnchorEl(actionsMenuAnchorEl ? null : currentT);\n };\n\n const handleDelete = async () => {\n try {\n const response = await deleteAnnotation(annotation.id);\n if (response) {\n dispatch({ type: DELETE_ANNOTATION, id: annotation.id });\n showSuccessNotification('Annotation has been deleted');\n }\n } catch (e) {\n console.error(e);\n }\n };\n\n const handleEdit = async (body, period, attachment) => {\n try {\n const changedAnnotation = {\n body,\n active_until: period,\n attachment: {\n file_name: attachment && attachment.attachmentName,\n signed_url: attachment && attachment.attachmentUrl,\n },\n };\n const updatedAnnotation = await patchAnnotation(annotation.id, changedAnnotation);\n dispatch({ type: EDIT_ANNOTATION, annotation: updatedAnnotation, id: annotation.id });\n } catch (e) {\n console.error(e);\n return;\n }\n\n showSuccessNotification('Annotation has been changed');\n setIsEdit(false);\n };\n\n const userId = annotation.relationships.user.data.id;\n const currentUser = included.find(({ type, id }) => type === 'user' && id === userId);\n const userData = currentUser.attributes;\n const { attachment } = annotation.attributes;\n\n return (\n <Paper className={classes.container} elevation={0}>\n <div\n data-testid={`${PAGE_NAME}_annotation_${annotation.attributes.body}`}\n className={styles.cAnnotationContainer}\n >\n <UserAvatar\n user={userData}\n classes={classes}\n isNative={isNative}\n currentUser={currentUser}\n />\n\n <div className={styles.cAnnotationContainerTop}>\n <div className={styles.cAnnotationContainerTopMainInfo}>\n <Typography variant=\"body2\" data-testid={`${PAGE_NAME}_userName`}>\n {`${userData.first_name} ${userData.last_name}`}\n </Typography>\n <Typography\n data-testid={`${PAGE_NAME}_addDate`}\n variant=\"caption\"\n className={classes.createdAt}\n >\n {moment(annotation.attributes.created_at).format(CREATED_AT_FORMAT)}\n </Typography>\n </div>\n <div\n className={classNames(styles.cAnnotationContainerTopMenu, {\n [styles.cAnnotationContainerTopMenuSmall]: isSmallScreen,\n })}\n >\n <MenuButton\n actionsMenuAnchorEl={actionsMenuAnchorEl}\n handleToggleActionsMenu={handleToggleActionsMenu}\n handleEdit={() => setIsEdit(true)}\n handleDelete={() => setDeleteDialogOpen(true)}\n classes={classes}\n />\n </div>\n </div>\n\n <Divider className={classes.headerDividerRoot} />\n\n <div data-testid={`${PAGE_NAME}_message`} className={styles.cAnnotationContainerContent}>\n {isEdit ? (\n <AnnotationInput\n initialText={annotation.attributes.body}\n assetCompanyId={assetCompanyId}\n initialPeriod={annotation.attributes.created_at}\n initialAttachment={attachment}\n onSend={handleEdit}\n onClose={() => setIsEdit(false)}\n closeOnEsc\n />\n ) : (\n <>\n {formatMentionText(\n annotation.attributes.body,\n annotation.relationships.mentioned_users.data,\n isNative,\n null,\n currentUser\n )}\n {attachment && attachment.signed_url && (\n <Attachment\n attachmentUrl={attachment.signed_url}\n fileName={attachment.file_name}\n size=\"small\"\n />\n )}\n </>\n )}\n </div>\n </div>\n <div\n data-testid={`${PAGE_NAME}_comments_${annotation.attributes.body}`}\n className={styles.cAnnotationComments}\n >\n <div className={styles.cAnnotationCommentsInfo}>\n <Typography\n data-testid={`${PAGE_NAME}_commentButton`}\n variant=\"caption\"\n color=\"primary\"\n className={classes.link}\n onClick={() => setCommentInputIsOpen(true)}\n >\n Comment\n </Typography>\n <CommentsInfo\n commentsCount={commentsCount}\n usersWhoCommented={userWhoCommented}\n activeUsersList={activeUsersList}\n currentUser={currentUser}\n small\n />\n </div>\n <AnnotationComments\n annotationId={annotation.id}\n commentInputIsOpen={commentInputIsOpen}\n setCommentInputIsOpen={setCommentInputIsOpen}\n commentsCount={commentsCount}\n initialCommentsCount={initialCommentsCount}\n assetCompanyId={assetCompanyId}\n setCommentsCount={setCommentsCount}\n currentUser={currentUser}\n />\n </div>\n {deleteDialogOpen && (\n <ConfirmationDialog\n open={deleteDialogOpen}\n text=\"Do you really want to delete annotation?\"\n handleClose={() => setDeleteDialogOpen(false)}\n handleOk={handleDelete}\n okText=\"Delete\"\n />\n )}\n </Paper>\n );\n};\n\nUserAvatar.propTypes = {\n user: shape({\n id: number.isRequired,\n first_name: string.isRequired,\n last_name: string.isRequired,\n profile_photo: string.isRequired,\n }).isRequired,\n currentUser: shape({}).isRequired,\n classes: shape({}).isRequired,\n};\n\nMenuButton.propTypes = {\n actionsMenuAnchorEl: oneOf([node, null]).isRequired,\n handleToggleActionsMenu: func.isRequired,\n classes: shape({}).isRequired,\n handleDelete: func.isRequired,\n handleEdit: func.isRequired,\n};\n\nAnnotation.propTypes = {\n included: arrayOf(shape({})).isRequired,\n annotation: shape({\n relationships: shape({\n user: shape({ data: shape({ id: string.isRequired }).isRequired }).isRequired,\n mentioned_users: shape({ data: arrayOf(shape({})).isRequired }).isRequired,\n }).isRequired,\n attributes: shape({ body: string.isRequired, created_at: string.isRequired }),\n }).isRequired,\n classes: shape({}).isRequired,\n showSuccessNotification: func,\n width: string.isRequired,\n assetCompanyId: number.isRequired,\n};\n\nconst DEFAULT_ANNOTATION_SHOW_SUCCESS_NOTIFICATION = () => undefined;\n\nexport default flowRight([withStyles(muiStyles), withWidth()])(Annotation);\n"],"names":["PAGE_NAME","UserAvatar","_ref","user","currentUser","classes","_jsx","className","styles","cAnnotationUserAvatar","children","isNative","Avatar","AvatarComponent","displayName","concat","first_name","last_name","imgSrc","profile_photo","size","avatar","UserCardPopover","MenuButton","_ref2","actionsMenuAnchorEl","handleToggleActionsMenu","handleEdit","handleDelete","_jsxs","_Fragment","IconButton","cAnnotationContainerActionsMenu","undefined","iconButtonRoot","onClick","MoreVertIcon","htmlColor","grey","Menu","id","anchorOrigin","vertical","horizontal","transformOrigin","anchorEl","open","MenuItem","Annotation","_ref3","_ref6","_ref7","included","annotation","assetCompanyId","_ref3$showSuccessNoti","showSuccessNotification","DEFAULT_ANNOTATION_SHOW_SUCCESS_NOTIFICATION","width","useState","_useState2","_slicedToArray","_useState","commentInputIsOpen","setCommentInputIsOpen","_useState4","_useState3","setActionsMenuAnchorEl","_useState6","_useState5","isEdit","setIsEdit","_useState8","_useState7","deleteDialogOpen","setDeleteDialogOpen","isSmallScreen","isWidthUp","initialCommentsCount","attributes","comments_count","_useState10","_useState9","commentsCount","setCommentsCount","dispatch","useAnnotationsDispatch","activeUsersList","relationships","comment_users","data","reduce","users","_ref4","userData","find","push","userWhoCommented","map","_ref5","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","deleteAnnotation","sent","type","DELETE_ANNOTATION","t0","console","error","stop","apply","this","arguments","body","period","attachment","changedAnnotation","updatedAnnotation","_context2","active_until","file_name","attachmentName","signed_url","attachmentUrl","patchAnnotation","EDIT_ANNOTATION","abrupt","_callee2","_x","_x2","_x3","userId","_ref8","Paper","container","elevation","jsxs","cAnnotationContainer","isNativeDetected","cAnnotationContainerTop","cAnnotationContainerTopMainInfo","Typography","variant","createdAt","moment","created_at","format","jsx","classNames","cAnnotationContainerTopMenu","cAnnotationContainerTopMenuSmall","event","currentT","currentTarget","Divider","headerDividerRoot","cAnnotationContainerContent","AnnotationInput","initialText","initialPeriod","initialAttachment","onSend","onClose","closeOnEsc","formatMentionText","mentioned_users","Attachment","fileName","cAnnotationComments","cAnnotationCommentsInfo","color","link","CommentsInfo","usersWhoCommented","small","AnnotationComments","annotationId","ConfirmationDialog","text","handleClose","handleOk","okText","propTypes","shape","number","isRequired","string","oneOf","node","func","arrayOf","Annotation$1","flowRight","withStyles","theme","backgroundColor","marginBottom","marginLeft","margin","palette","cursor","height","padding","withWidth"],"mappings":"mwCA2BMA,EAAY,sBAiBZC,EAAa,SAAHC,GAAA,IAAMC,IAAAA,KAAMC,IAAAA,YAAaC,IAAAA,QAAO,OAC9CC,EAAAA,IAAA,MAAA,CAAKC,UAAWC,EAAOC,sBAAsBC,SAC1CC,EAAAA,iBACCL,EAAAA,IAACM,EAAAC,gBACC,CACAC,YAAW,GAAAC,OAAKZ,EAAKa,uBAAcb,EAAKc,WACxCC,OAAQf,EAAKgB,cACbC,KAAM,GACNb,UAAWF,EAAQgB,SAGrBf,MAACgB,EAAe,CAACnB,KAAMA,EAAMC,YAAaA,EAAYM,SACpDJ,MAACM,kBAAM,CACLE,YAAW,GAAAC,OAAKZ,EAAKa,uBAAcb,EAAKc,WACxCC,OAAQf,EAAKgB,cACbC,KAAM,GACNb,UAAWF,EAAQgB,YAIrB,EAGFE,EAAa,SAAHC,GAAA,IACdC,IAAAA,oBACAC,IAAAA,wBACArB,IAAAA,QACAsB,IAAAA,WACAC,IAAAA,aAAY,OAEZC,EAAAA,KAAAC,EAAAA,SAAA,CAAApB,SAAA,CACEJ,MAACyB,aAAU,CACT,cAAA,GAAAhB,OAAgBf,EAAuB,eACvC,aAAW,UACX,YA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@
1
- "use strict";var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),n=require("moment"),i=require("prop-types"),a=require("@material-ui/core/styles"),l=require("@material-ui/core"),o=require("@material-ui/icons/Send"),r=require("@material-ui/core/colors/grey"),s=require("../../../../constants.js"),c=require("./StyledSelect.js"),u=require("./style.css.js"),d=require("../../../../../UserMention/index.js"),p=require("../../../../../EmojiIconButton.js"),m=require("../../../../../FileUploadIconButton.js"),h=require("../../../../../FailedFileUploading.js"),f=require("../../../../../FilePreview/index.js"),j=require("../../../../../UserMention/utils/index.js"),g=require("../../../../../../effects/useEscPress.js"),x=require("react/jsx-runtime");function A(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var I=A(e),y=A(n),N=A(o),b=A(r),v="AppAnnotationsPo",S=Object.keys(s.ANNOTATION_ACTIVE_PERIODS),T=function(e){var n=e.initialText,i=e.initialPeriod,a=e.onSend,o=e.onClose,r=e.closeOnEsc,A=e.classes,T=e.initialAttachment,q=e.assetCompanyId,C=e.currentUser,E=t.useState(n),_=I.default(E,2),O=_[0],U=_[1],P=t.useState((function(){return T?{attachmentName:T.file_name,attachmentUrl:T.signed_url||T.s3_link}:null})),R=I.default(P,2),B=R[0],k=R[1],D=t.useState(null),F=I.default(D,2),w=F[0],L=F[1],M=t.useState(!1),z=I.default(M,2),H=z[0],V=z[1],W=t.useState(S[0]),K=I.default(W,2),G=K[0],J=K[1];g((function(){r&&o()}));var Q=function(){if(O){var e=function(e,t){if("forever"===e)return null;var n=s.ANNOTATION_ACTIVE_PERIODS[e];return y.default(t).add(n.time.amount,n.time.key).format()}(G,i);a(O,e,B)}};return x.jsxs("div",{className:u.cAnnotationInput,children:[x.jsxs(l.Paper,{className:u.cAnnotationInputContent,children:[x.jsx(l.Input,{"data-testid":"".concat(v,"_annotationsInput"),inputComponent:d,inputProps:{withLightTheme:!1,onChange:function(e){return U(e)},onKeyDown:function(e){"Shift"===e.key&&V(!0),"Enter"!==e.key||H||j.isSuggestionsListOpened()||(e.preventDefault(),Q())},onKeyUp:function(e){"Shift"===e.key&&V(!1)},companyId:q,currentUser:C},placeholder:"Type annotation here",fullWidth:!0,disableUnderline:!0,multiline:!0,rows:"3",className:A.inputRoot,value:O}),x.jsxs("div",{className:u.cAnnotationInputContentActions,children:[x.jsx(l.Tooltip,{title:"Attach File",placement:"bottom",children:x.jsx("div",{className:u.cAnnotationInputContentActionsButton,children:x.jsx(m.default,{"data-testid":"".concat(v,"_attachFileButton"),openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:function(e,t,n){k({attachmentUrl:e,attachmentName:t,attachmentSize:n}),L(null)},onError:function(e){k(null),L(e)},htmlColor:"action"})})}),x.jsx(l.Tooltip,{title:"Add Emoji",placement:"bottom",children:x.jsx("div",{className:u.cAnnotationInputContentActionsButton,children:x.jsx(p,{"data-testid":"".concat(v,"_emojiButton"),htmlColor:b.default[400],handleSelectEmoji:function(e){return U("".concat(O).concat(e.native))}})})})]})]}),w&&x.jsx(h,{className:A.uploadingError,errorMessage:w}),B&&B.attachmentUrl&&x.jsx(f,{fileName:B.attachmentName,fileUrl:B.attachmentUrl,handleFileDelete:function(){k(null),L(null)}}),x.jsxs("div",{className:u.cAnnotationInputActions,children:[x.jsxs(l.FormControl,{className:A.formControl,children:[x.jsx(l.InputLabel,{shrink:!0,id:"periods-label-label",className:A.selectLabel,children:"Active"}),x.jsx(c,{"data-testid":"".concat(v,"_periodDropdown"),labelId:"periods-label-label",id:"periods-label",value:G,disableUnderline:!0,onChange:function(e){return J(e.target.value)},children:S.map((function(e){return x.jsx(l.MenuItem,{"data-testid":"".concat(v,"_period_").concat(s.ANNOTATION_ACTIVE_PERIODS[e].label,"MenuItem"),value:e,children:s.ANNOTATION_ACTIVE_PERIODS[e].label},e)}))})]}),x.jsxs("div",{className:u.cAnnotationInputActionsSend,children:[x.jsxs(l.Typography,{variant:"caption",className:A.sendLabel,children:["Press ",x.jsx(l.Typography,{variant:"caption",color:"primary",component:"span",className:A.labelHighlighter,children:"Enter "}),"to send "]}),x.jsx(l.Tooltip,{title:"Send",placement:"bottom",children:x.jsx("div",{children:x.jsx(l.IconButton,{"data-testid":"".concat(v,"_sendButton"),className:A.sendButton,onClick:Q,disabled:!O,children:x.jsx(N.default,{color:"primary"})})})})]})]})]})};T.propTypes={initialText:i.string,initialPeriod:i.string,initialAttachment:i.shape({file_name:i.string,s3_link:i.string}),onSend:i.func,onClose:i.func,closeOnEsc:i.bool,assetCompanyId:i.number.isRequired,currentUser:i.shape().isRequired,classes:i.shape().isRequired},T.defaultProps={initialText:"",initialPeriod:void 0,initialAttachment:null,onSend:function(){},onClose:function(){},closeOnEsc:!1};var q=a.withStyles((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"},inputRoot:{lineHeight:15},sendLabel:{display:"flex",alignItems:"center",fontWeight:200,color:e.palette.grey[700],marginRight:22,fontSize:10},sendButton:{padding:5},labelHighlighter:{fontWeight:200,fontSize:10},selectLabel:{fontSize:10,lineHeight:"14px",color:e.palette.grey[500]},uploadingError:{paddingTop:"10px"}}}))(T);module.exports=q;
1
+ "use strict";var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react"),n=require("moment"),i=require("prop-types"),a=require("@material-ui/core/styles"),o=require("@material-ui/core"),l=require("@material-ui/icons/Send"),r=require("@material-ui/core/colors/grey"),s=require("../../../../constants.js"),c=require("./StyledSelect.js"),u=require("./style.css.js"),d=require("../../../../../UserMention/index.js"),p=require("../../../../../EmojiIconButton.js"),m=require("../../../../../FileUploadIconButton.js"),h=require("../../../../../FailedFileUploading.js"),f=require("../../../../../FilePreview/index.js"),j=require("../../../../../UserMention/utils/index.js"),g=require("../../../../../../effects/useEscPress.js"),x=require("react/jsx-runtime");function A(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var I=A(e),v=A(n),y=A(l),N=A(r),b="AppAnnotationsPo",S=Object.keys(s.ANNOTATION_ACTIVE_PERIODS),T=function(e){var n=e.initialText,i=void 0===n?"":n,a=e.initialPeriod,l=e.onSend,r=void 0===l?q:l,A=e.onClose,T=void 0===A?C:A,_=e.closeOnEsc,E=void 0!==_&&_,O=e.classes,U=e.initialAttachment,P=void 0===U?null:U,R=e.assetCompanyId,B=e.currentUser,k=t.useState(i),D=I.default(k,2),F=D[0],w=D[1],L=t.useState((function(){return P?{attachmentName:P.file_name,attachmentUrl:P.signed_url||P.s3_link}:null})),M=I.default(L,2),z=M[0],H=M[1],V=t.useState(null),W=I.default(V,2),K=W[0],G=W[1],J=t.useState(!1),Q=I.default(J,2),X=Q[0],Y=Q[1],Z=t.useState(S[0]),$=I.default(Z,2),ee=$[0],te=$[1];g((function(){E&&T()}));var ne=function(){if(F){var e=function(e,t){if("forever"===e)return null;var n=s.ANNOTATION_ACTIVE_PERIODS[e];return v.default(t).add(n.time.amount,n.time.key).format()}(ee,a);r(F,e,z)}};return x.jsxs("div",{className:u.cAnnotationInput,children:[x.jsxs(o.Paper,{className:u.cAnnotationInputContent,children:[x.jsx(o.Input,{"data-testid":"".concat(b,"_annotationsInput"),inputComponent:d,inputProps:{withLightTheme:!1,onChange:function(e){return w(e)},onKeyDown:function(e){"Shift"===e.key&&Y(!0),"Enter"!==e.key||X||j.isSuggestionsListOpened()||(e.preventDefault(),ne())},onKeyUp:function(e){"Shift"===e.key&&Y(!1)},companyId:R,currentUser:B},placeholder:"Type annotation here",fullWidth:!0,disableUnderline:!0,multiline:!0,rows:"3",className:O.inputRoot,value:F}),x.jsxs("div",{className:u.cAnnotationInputContentActions,children:[x.jsx(o.Tooltip,{title:"Attach File",placement:"bottom",children:x.jsx("div",{className:u.cAnnotationInputContentActionsButton,children:x.jsx(m.default,{"data-testid":"".concat(b,"_attachFileButton"),openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:function(e,t,n){H({attachmentUrl:e,attachmentName:t,attachmentSize:n}),G(null)},onError:function(e){H(null),G(e)},htmlColor:"action"})})}),x.jsx(o.Tooltip,{title:"Add Emoji",placement:"bottom",children:x.jsx("div",{className:u.cAnnotationInputContentActionsButton,children:x.jsx(p,{"data-testid":"".concat(b,"_emojiButton"),htmlColor:N.default[400],handleSelectEmoji:function(e){return w("".concat(F).concat(e.native))}})})})]})]}),K&&x.jsx(h,{className:O.uploadingError,errorMessage:K}),z&&z.attachmentUrl&&x.jsx(f,{fileName:z.attachmentName,fileUrl:z.attachmentUrl,handleFileDelete:function(){H(null),G(null)}}),x.jsxs("div",{className:u.cAnnotationInputActions,children:[x.jsxs(o.FormControl,{className:O.formControl,children:[x.jsx(o.InputLabel,{shrink:!0,id:"periods-label-label",className:O.selectLabel,children:"Active"}),x.jsx(c,{"data-testid":"".concat(b,"_periodDropdown"),labelId:"periods-label-label",id:"periods-label",value:ee,disableUnderline:!0,onChange:function(e){return te(e.target.value)},children:S.map((function(e){return x.jsx(o.MenuItem,{"data-testid":"".concat(b,"_period_").concat(s.ANNOTATION_ACTIVE_PERIODS[e].label,"MenuItem"),value:e,children:s.ANNOTATION_ACTIVE_PERIODS[e].label},e)}))})]}),x.jsxs("div",{className:u.cAnnotationInputActionsSend,children:[x.jsxs(o.Typography,{variant:"caption",className:O.sendLabel,children:["Press ",x.jsx(o.Typography,{variant:"caption",color:"primary",component:"span",className:O.labelHighlighter,children:"Enter "}),"to send "]}),x.jsx(o.Tooltip,{title:"Send",placement:"bottom",children:x.jsx("div",{children:x.jsx(o.IconButton,{"data-testid":"".concat(b,"_sendButton"),className:O.sendButton,onClick:ne,disabled:!F,children:x.jsx(y.default,{color:"primary"})})})})]})]})]})};T.propTypes={initialText:i.string,initialPeriod:i.string,initialAttachment:i.shape({file_name:i.string,s3_link:i.string}),onSend:i.func,onClose:i.func,closeOnEsc:i.bool,assetCompanyId:i.number.isRequired,currentUser:i.shape().isRequired,classes:i.shape().isRequired};var q=function(){},C=function(){},_=a.withStyles((function(e){return{inputLabel:{color:e.palette.grey[700],fontWeight:200,width:"100%"},inputRoot:{lineHeight:15},sendLabel:{display:"flex",alignItems:"center",fontWeight:200,color:e.palette.grey[700],marginRight:22,fontSize:10},sendButton:{padding:5},labelHighlighter:{fontWeight:200,fontSize:10},selectLabel:{fontSize:10,lineHeight:"14px",color:e.palette.grey[500]},uploadingError:{paddingTop:"10px"}}}))(T);module.exports=_;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../../src/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js"],"sourcesContent":["import { useState } from 'react';\nimport moment from 'moment';\nimport { string, bool, shape, func, number } from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n Paper,\n Input,\n Tooltip,\n Typography,\n IconButton,\n FormControl,\n InputLabel,\n MenuItem,\n} from '@material-ui/core';\nimport SendIcon from '@material-ui/icons/Send';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { ANNOTATION_ACTIVE_PERIODS } from '../../../../constants';\n\nimport StyledSelect from './StyledSelect';\n\nimport styles from './style.css';\n\nimport UserMention from '~components/UserMention';\nimport EmojiIconButton from '~components/EmojiIconButton';\nimport FileUploadIconButton from '~components/FileUploadIconButton';\nimport FailedFileUploading from '~components/FailedFileUploading';\nimport FilePreview from '~components/FilePreview';\nimport { isSuggestionsListOpened } from '~components/UserMention/utils';\nimport useEscPress from '~/effects/useEscPress';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst ANNOTATION_ACTIVE_PERIODS_KEYS = Object.keys(ANNOTATION_ACTIVE_PERIODS);\nconst ANNOTATION_PLACEHOLDER = 'Type annotation here';\n\nconst muiStyles = theme => ({\n inputLabel: {\n color: theme.palette.grey[700],\n fontWeight: 200,\n width: '100%',\n },\n inputRoot: {\n lineHeight: 15,\n },\n sendLabel: {\n display: 'flex',\n alignItems: 'center',\n fontWeight: 200,\n color: theme.palette.grey[700],\n marginRight: 22,\n fontSize: 10,\n },\n sendButton: {\n padding: 5,\n },\n labelHighlighter: {\n fontWeight: 200,\n fontSize: 10,\n },\n selectLabel: {\n fontSize: 10,\n lineHeight: '14px',\n color: theme.palette.grey[500],\n },\n uploadingError: {\n paddingTop: '10px',\n },\n});\n\nconst getAnnotationActiveUntil = (value, initialPeriod) => {\n if (value === 'forever') return null;\n\n const period = ANNOTATION_ACTIVE_PERIODS[value];\n return moment(initialPeriod).add(period.time.amount, period.time.key).format();\n};\n\nconst AnnotationInput = ({\n initialText,\n initialPeriod,\n onSend,\n onClose,\n closeOnEsc,\n classes,\n initialAttachment,\n assetCompanyId,\n currentUser,\n}) => {\n const [annotationText, setAnnotationText] = useState(initialText);\n const [attachment, setAttachment] = useState(() =>\n initialAttachment\n ? {\n attachmentName: initialAttachment.file_name,\n attachmentUrl: initialAttachment.signed_url || initialAttachment.s3_link,\n }\n : null\n );\n const [uploadError, setUploadError] = useState(null);\n const [isShiftKeyDown, setIsShiftKeyDown] = useState(false);\n const [period, setPeriod] = useState(ANNOTATION_ACTIVE_PERIODS_KEYS[0]);\n\n useEscPress(() => {\n if (closeOnEsc) onClose();\n });\n\n const handleSend = () => {\n if (annotationText) {\n const formattedPeriod = getAnnotationActiveUntil(period, initialPeriod);\n onSend(annotationText, formattedPeriod, attachment);\n }\n };\n\n const handlePeriodChange = e => setPeriod(e.target.value);\n\n const handleKeyDown = e => {\n if (e.key === 'Shift') setIsShiftKeyDown(true);\n\n if (e.key === 'Enter' && !isShiftKeyDown && !isSuggestionsListOpened()) {\n e.preventDefault(); // NOTE: Don't add linebreak to the post\n handleSend();\n }\n };\n\n const handleKeyUp = e => {\n if (e.key === 'Shift') setIsShiftKeyDown(false);\n };\n\n const handleSelectEmoji = emoji => setAnnotationText(`${annotationText}${emoji.native}`);\n\n const handleAnnotationTextChange = text => setAnnotationText(text);\n\n const onFileUploaded = (attachmentUrl, attachmentName, attachmentSize) => {\n setAttachment({ attachmentUrl, attachmentName, attachmentSize });\n setUploadError(null);\n };\n\n const onUploadingError = error => {\n setAttachment(null);\n setUploadError(error);\n };\n\n const onAttachmentDelete = () => {\n setAttachment(null);\n setUploadError(null);\n };\n\n return (\n <div className={styles.cAnnotationInput}>\n <Paper className={styles.cAnnotationInputContent}>\n <Input\n data-testid={`${PAGE_NAME}_annotationsInput`}\n inputComponent={UserMention}\n inputProps={{\n withLightTheme: false,\n onChange: handleAnnotationTextChange,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n companyId: assetCompanyId,\n currentUser,\n }}\n placeholder={ANNOTATION_PLACEHOLDER}\n fullWidth\n disableUnderline\n multiline\n rows=\"3\"\n className={classes.inputRoot}\n value={annotationText}\n />\n <div className={styles.cAnnotationInputContentActions}>\n <Tooltip title=\"Attach File\" placement=\"bottom\">\n <div className={styles.cAnnotationInputContentActionsButton}>\n <FileUploadIconButton\n data-testid={`${PAGE_NAME}_attachFileButton`}\n openPreviewDialogOnUpload={false}\n disableRipple\n onFinish={onFileUploaded}\n onError={onUploadingError}\n htmlColor=\"action\"\n />\n </div>\n </Tooltip>\n <Tooltip title=\"Add Emoji\" placement=\"bottom\">\n <div className={styles.cAnnotationInputContentActionsButton}>\n <EmojiIconButton\n data-testid={`${PAGE_NAME}_emojiButton`}\n htmlColor={grey[400]}\n handleSelectEmoji={handleSelectEmoji}\n />\n </div>\n </Tooltip>\n </div>\n </Paper>\n {uploadError && (\n <FailedFileUploading className={classes.uploadingError} errorMessage={uploadError} />\n )}\n {attachment && attachment.attachmentUrl && (\n <FilePreview\n fileName={attachment.attachmentName}\n fileUrl={attachment.attachmentUrl}\n handleFileDelete={onAttachmentDelete}\n />\n )}\n <div className={styles.cAnnotationInputActions}>\n <FormControl className={classes.formControl}>\n <InputLabel shrink id=\"periods-label-label\" className={classes.selectLabel}>\n Active\n </InputLabel>\n <StyledSelect\n data-testid={`${PAGE_NAME}_periodDropdown`}\n labelId=\"periods-label-label\"\n id=\"periods-label\"\n value={period}\n disableUnderline\n onChange={handlePeriodChange}\n >\n {ANNOTATION_ACTIVE_PERIODS_KEYS.map(key => (\n <MenuItem\n data-testid={`${PAGE_NAME}_period_${ANNOTATION_ACTIVE_PERIODS[key].label}MenuItem`}\n key={key}\n value={key}\n >\n {ANNOTATION_ACTIVE_PERIODS[key].label}\n </MenuItem>\n ))}\n </StyledSelect>\n </FormControl>\n <div className={styles.cAnnotationInputActionsSend}>\n <Typography variant=\"caption\" className={classes.sendLabel}>\n Press&nbsp;\n <Typography\n variant=\"caption\"\n color=\"primary\"\n component=\"span\"\n className={classes.labelHighlighter}\n >\n Enter&nbsp;\n </Typography>\n to send&nbsp;\n </Typography>\n <Tooltip title=\"Send\" placement=\"bottom\">\n <div>\n {/* div to display label since button is disabled */}\n <IconButton\n data-testid={`${PAGE_NAME}_sendButton`}\n className={classes.sendButton}\n onClick={handleSend}\n disabled={!annotationText}\n >\n <SendIcon color=\"primary\" />\n </IconButton>\n </div>\n </Tooltip>\n </div>\n </div>\n </div>\n );\n};\n\nAnnotationInput.propTypes = {\n initialText: string,\n initialPeriod: string,\n initialAttachment: shape({\n file_name: string,\n s3_link: string,\n }),\n onSend: func,\n onClose: func,\n closeOnEsc: bool,\n assetCompanyId: number.isRequired,\n currentUser: shape().isRequired,\n\n classes: shape().isRequired,\n};\n\nAnnotationInput.defaultProps = {\n initialText: '',\n initialPeriod: undefined,\n initialAttachment: null,\n onSend: () => undefined,\n onClose: () => undefined,\n closeOnEsc: false,\n};\n\nexport default withStyles(muiStyles)(AnnotationInput);\n"],"names":["PAGE_NAME","ANNOTATION_ACTIVE_PERIODS_KEYS","Object","keys","ANNOTATION_ACTIVE_PERIODS","AnnotationInput","_ref","initialText","initialPeriod","onSend","onClose","closeOnEsc","classes","initialAttachment","assetCompanyId","currentUser","useState","_useState2","_slicedToArray","_useState","annotationText","setAnnotationText","_useState3","attachmentName","file_name","attachmentUrl","signed_url","s3_link","_useState4","attachment","setAttachment","_useState6","_useState5","uploadError","setUploadError","_useState8","_useState7","isShiftKeyDown","setIsShiftKeyDown","_useState9","_useState10","period","setPeriod","useEscPress","handleSend","formattedPeriod","value","moment","add","time","amount","key","format","getAnnotationActiveUntil","_jsxs","className","styles","cAnnotationInput","children","Paper","cAnnotationInputContent","_jsx","Input","concat","inputComponent","UserMention","inputProps","withLightTheme","onChange","text","onKeyDown","e","isSuggestionsListOpened","preventDefault","onKeyUp","companyId","placeholder","fullWidth","disableUnderline","multiline","rows","inputRoot","jsxs","cAnnotationInputContentActions","Tooltip","title","placement","jsx","cAnnotationInputContentActionsButton","FileUploadIconButton","openPreviewDialogOnUpload","disableRipple","onFinish","attachmentSize","onError","error","htmlColor","EmojiIconButton","grey","handleSelectEmoji","emoji","native","FailedFileUploading","uploadingError","errorMessage","FilePreview","fileName","fileUrl","handleFileDelete","cAnnotationInputActions","FormControl","formControl","InputLabel","shrink","id","selectLabel","StyledSelect","labelId","target","map","MenuItem","label","cAnnotationInputActionsSend","Typography","variant","sendLabel","color","component","labelHighlighter","IconButton","sendButton","onClick","disabled","SendIcon","propTypes","string","shape","func","bool","number","isRequired","defaultProps","undefined","AnnotationInput$1","withStyles","theme","inputLabel","palette","fontWeight","width","lineHeight","display","alignItems","marginRight","fontSize","padding","paddingTop"],"mappings":"o2BA+BMA,EAAY,mBAEZC,EAAiCC,OAAOC,KAAKC,EAAAA,2BA4C7CC,EAAkB,SAUlBC,GAAA,IATJC,IAAAA,YACAC,IAAAA,cACAC,IAAAA,OACAC,IAAAA,QACAC,IAAAA,WACAC,IAAAA,QACAC,IAAAA,kBACAC,IAAAA,eACAC,IAAAA,YAE4CC,EAAAA,EAAQA,SAACT,GAAYU,EAAAC,EAAAA,QAAAC,EAAA,GAA1DC,EAAcH,EAAA,GAAEI,EAAiBJ,EAAA,GACxCK,EAAoCN,EAAAA,UAAS,WAAA,OAC3CH,EACI,CACEU,eAAgBV,EAAkBW,UAClCC,cAAeZ,EAAkBa,YAAcb,EAAkBc,SAEnE,QACLC,EAAAV,EAAAA,QAAAI,EAAA,GAPMO,EAAUD,EAAA,GAAEE,EAAaF,EAAA,GAQMZ,EAAAA,EAAQA,SAAC,MAAKe,EAAAb,EAAAA,QAAAc,EAAA,GAA7CC,EAAWF,EAAA,GAAEG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BAAmB,KACnBJ,OAAQ,WAAe,EACvBC,QAAS,WAAe,EACxBC,YAAY,GAGd,IAAAoI,EAAeC,cAvPG,SAAAC,GAAK,MAAK,CAC1BC,WAAY,CACVpB,MAAOmB,EAAME,QAAQjD,KAAK,KAC1BkD,WAAY,IACZC,MAAO,QAETpE,UAAW,CACTqE,WAAY,IAEdzB,UAAW,CACT0B,QAAS,OACTC,WAAY,SACZJ,WAAY,IACZtB,MAAOmB,EAAME,QAAQjD,KAAK,KAC1BuD,YAAa,GACbC,SAAU,IAEZxB,WAAY,CACVyB,QAAS,GAEX3B,iBAAkB,CAChBoB,WAAY,IACZM,SAAU,IAEZvC,YAAa,CACXuC,SAAU,GACVJ,WAAY,OACZxB,MAAOmB,EAAME,QAAQjD,KAAK,MAE5BK,eAAgB,CACdqD,WAAY,QAEf,GAuNcZ,CAAsB3I"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../src/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js"],"sourcesContent":["import { useState } from 'react';\nimport moment from 'moment';\nimport { string, bool, shape, func, number } from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n Paper,\n Input,\n Tooltip,\n Typography,\n IconButton,\n FormControl,\n InputLabel,\n MenuItem,\n} from '@material-ui/core';\nimport SendIcon from '@material-ui/icons/Send';\nimport grey from '@material-ui/core/colors/grey';\n\nimport { ANNOTATION_ACTIVE_PERIODS } from '../../../../constants';\n\nimport StyledSelect from './StyledSelect';\n\nimport styles from './style.css';\n\nimport UserMention from '~components/UserMention';\nimport EmojiIconButton from '~components/EmojiIconButton';\nimport FileUploadIconButton from '~components/FileUploadIconButton';\nimport FailedFileUploading from '~components/FailedFileUploading';\nimport FilePreview from '~components/FilePreview';\nimport { isSuggestionsListOpened } from '~components/UserMention/utils';\nimport useEscPress from '~/effects/useEscPress';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst ANNOTATION_ACTIVE_PERIODS_KEYS = Object.keys(ANNOTATION_ACTIVE_PERIODS);\nconst ANNOTATION_PLACEHOLDER = 'Type annotation here';\n\nconst muiStyles = theme => ({\n inputLabel: {\n color: theme.palette.grey[700],\n fontWeight: 200,\n width: '100%',\n },\n inputRoot: {\n lineHeight: 15,\n },\n sendLabel: {\n display: 'flex',\n alignItems: 'center',\n fontWeight: 200,\n color: theme.palette.grey[700],\n marginRight: 22,\n fontSize: 10,\n },\n sendButton: {\n padding: 5,\n },\n labelHighlighter: {\n fontWeight: 200,\n fontSize: 10,\n },\n selectLabel: {\n fontSize: 10,\n lineHeight: '14px',\n color: theme.palette.grey[500],\n },\n uploadingError: {\n paddingTop: '10px',\n },\n});\n\nconst getAnnotationActiveUntil = (value, initialPeriod) => {\n if (value === 'forever') return null;\n\n const period = ANNOTATION_ACTIVE_PERIODS[value];\n return moment(initialPeriod).add(period.time.amount, period.time.key).format();\n};\n\nconst AnnotationInput = ({\n initialText = '',\n initialPeriod,\n onSend = DEFAULT_ANNOTATION_INPUT_ON_SEND,\n onClose = DEFAULT_ANNOTATION_INPUT_ON_CLOSE,\n closeOnEsc = false,\n classes,\n initialAttachment = null,\n assetCompanyId,\n currentUser,\n}) => {\n const [annotationText, setAnnotationText] = useState(initialText);\n const [attachment, setAttachment] = useState(() =>\n initialAttachment\n ? {\n attachmentName: initialAttachment.file_name,\n attachmentUrl: initialAttachment.signed_url || initialAttachment.s3_link,\n }\n : null\n );\n const [uploadError, setUploadError] = useState(null);\n const [isShiftKeyDown, setIsShiftKeyDown] = useState(false);\n const [period, setPeriod] = useState(ANNOTATION_ACTIVE_PERIODS_KEYS[0]);\n\n useEscPress(() => {\n if (closeOnEsc) onClose();\n });\n\n const handleSend = () => {\n if (annotationText) {\n const formattedPeriod = getAnnotationActiveUntil(period, initialPeriod);\n onSend(annotationText, formattedPeriod, attachment);\n }\n };\n\n const handlePeriodChange = e => setPeriod(e.target.value);\n\n const handleKeyDown = e => {\n if (e.key === 'Shift') setIsShiftKeyDown(true);\n\n if (e.key === 'Enter' && !isShiftKeyDown && !isSuggestionsListOpened()) {\n e.preventDefault(); // NOTE: Don't add linebreak to the post\n handleSend();\n }\n };\n\n const handleKeyUp = e => {\n if (e.key === 'Shift') setIsShiftKeyDown(false);\n };\n\n const handleSelectEmoji = emoji => setAnnotationText(`${annotationText}${emoji.native}`);\n\n const handleAnnotationTextChange = text => setAnnotationText(text);\n\n const onFileUploaded = (attachmentUrl, attachmentName, attachmentSize) => {\n setAttachment({ attachmentUrl, attachmentName, attachmentSize });\n setUploadError(null);\n };\n\n const onUploadingError = error => {\n setAttachment(null);\n setUploadError(error);\n };\n\n const onAttachmentDelete = () => {\n setAttachment(null);\n setUploadError(null);\n };\n\n return (\n <div className={styles.cAnnotationInput}>\n <Paper className={styles.cAnnotationInputContent}>\n <Input\n data-testid={`${PAGE_NAME}_annotationsInput`}\n inputComponent={UserMention}\n inputProps={{\n withLightTheme: false,\n onChange: handleAnnotationTextChange,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n companyId: assetCompanyId,\n currentUser,\n }}\n placeholder={ANNOTATION_PLACEHOLDER}\n fullWidth\n disableUnderline\n multiline\n rows=\"3\"\n className={classes.inputRoot}\n value={annotationText}\n />\n <div className={styles.cAnnotationInputContentActions}>\n <Tooltip title=\"Attach File\" placement=\"bottom\">\n <div className={styles.cAnnotationInputContentActionsButton}>\n <FileUploadIconButton\n data-testid={`${PAGE_NAME}_attachFileButton`}\n openPreviewDialogOnUpload={false}\n disableRipple\n onFinish={onFileUploaded}\n onError={onUploadingError}\n htmlColor=\"action\"\n />\n </div>\n </Tooltip>\n <Tooltip title=\"Add Emoji\" placement=\"bottom\">\n <div className={styles.cAnnotationInputContentActionsButton}>\n <EmojiIconButton\n data-testid={`${PAGE_NAME}_emojiButton`}\n htmlColor={grey[400]}\n handleSelectEmoji={handleSelectEmoji}\n />\n </div>\n </Tooltip>\n </div>\n </Paper>\n {uploadError && (\n <FailedFileUploading className={classes.uploadingError} errorMessage={uploadError} />\n )}\n {attachment && attachment.attachmentUrl && (\n <FilePreview\n fileName={attachment.attachmentName}\n fileUrl={attachment.attachmentUrl}\n handleFileDelete={onAttachmentDelete}\n />\n )}\n <div className={styles.cAnnotationInputActions}>\n <FormControl className={classes.formControl}>\n <InputLabel shrink id=\"periods-label-label\" className={classes.selectLabel}>\n Active\n </InputLabel>\n <StyledSelect\n data-testid={`${PAGE_NAME}_periodDropdown`}\n labelId=\"periods-label-label\"\n id=\"periods-label\"\n value={period}\n disableUnderline\n onChange={handlePeriodChange}\n >\n {ANNOTATION_ACTIVE_PERIODS_KEYS.map(key => (\n <MenuItem\n data-testid={`${PAGE_NAME}_period_${ANNOTATION_ACTIVE_PERIODS[key].label}MenuItem`}\n key={key}\n value={key}\n >\n {ANNOTATION_ACTIVE_PERIODS[key].label}\n </MenuItem>\n ))}\n </StyledSelect>\n </FormControl>\n <div className={styles.cAnnotationInputActionsSend}>\n <Typography variant=\"caption\" className={classes.sendLabel}>\n Press&nbsp;\n <Typography\n variant=\"caption\"\n color=\"primary\"\n component=\"span\"\n className={classes.labelHighlighter}\n >\n Enter&nbsp;\n </Typography>\n to send&nbsp;\n </Typography>\n <Tooltip title=\"Send\" placement=\"bottom\">\n <div>\n {/* div to display label since button is disabled */}\n <IconButton\n data-testid={`${PAGE_NAME}_sendButton`}\n className={classes.sendButton}\n onClick={handleSend}\n disabled={!annotationText}\n >\n <SendIcon color=\"primary\" />\n </IconButton>\n </div>\n </Tooltip>\n </div>\n </div>\n </div>\n );\n};\n\nAnnotationInput.propTypes = {\n initialText: string,\n initialPeriod: string,\n initialAttachment: shape({\n file_name: string,\n s3_link: string,\n }),\n onSend: func,\n onClose: func,\n closeOnEsc: bool,\n assetCompanyId: number.isRequired,\n currentUser: shape().isRequired,\n\n classes: shape().isRequired,\n};\n\nconst DEFAULT_ANNOTATION_INPUT_ON_SEND = () => undefined;\nconst DEFAULT_ANNOTATION_INPUT_ON_CLOSE = () => undefined;\n\nexport default withStyles(muiStyles)(AnnotationInput);\n"],"names":["PAGE_NAME","ANNOTATION_ACTIVE_PERIODS_KEYS","Object","keys","ANNOTATION_ACTIVE_PERIODS","AnnotationInput","_ref","_ref$initialText","initialText","initialPeriod","_ref$onSend","onSend","DEFAULT_ANNOTATION_INPUT_ON_SEND","_ref$onClose","onClose","DEFAULT_ANNOTATION_INPUT_ON_CLOSE","_ref$closeOnEsc","closeOnEsc","classes","_ref$initialAttachmen","initialAttachment","assetCompanyId","currentUser","useState","_useState2","_slicedToArray","_useState","annotationText","setAnnotationText","_useState3","attachmentName","file_name","attachmentUrl","signed_url","s3_link","_useState4","attachment","setAttachment","_useState6","_useState5","uploadError","setUploadError","_useState8","_useState7","isShiftKeyDown","setIsShiftKeyDown","_useState9","_useState10","period","setPeriod","useEscPress","handleSend","formattedPeriod","value","moment","add","time","amount","key","format","getAnnotationActiveUntil","_jsxs","className","styles","cAnnotationInput","children","Paper","cAnnotationInputContent","_jsx","Input","concat","inputComponent","UserMention","inputProps","withLightTheme","onChange","text","onKeyDown","e","isSuggestionsListOpened","preventDefault","onKeyUp","companyId","placeholder","fullWidth","disableUnderline","multiline","rows","inputRoot","jsxs","cAnnotationInputContentActions","Tooltip","title","placement","jsx","cAnnotationInputContentActionsButton","FileUploadIconButton","openPreviewDialogOnUpload","disableRipple","onFinish","attachmentSize","onError","error","htmlColor","EmojiIconButton","grey","handleSelectEmoji","emoji","native","FailedFileUploading","uploadingError","errorMessage","FilePreview","fileName","fileUrl","handleFileDelete","cAnnotationInputActions","FormControl","formControl","InputLabel","shrink","id","selectLabel","StyledSelect","labelId","target","map","MenuItem","label","cAnnotationInputActionsSend","Typography","variant","sendLabel","color","component","labelHighlighter","IconButton","sendButton","onClick","disabled","SendIcon","propTypes","string","shape","func","bool","number","isRequired","AnnotationInput$1","withStyles","theme","inputLabel","palette","fontWeight","width","lineHeight","display","alignItems","marginRight","fontSize","padding","paddingTop"],"mappings":"o2BA+BMA,EAAY,mBAEZC,EAAiCC,OAAOC,KAAKC,EAAAA,2BA4C7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ator"),n=require("@babel/runtime/helpers/slicedToArray"),a=require("@babel/runtime/regenerator"),s=require("react"),r=require("prop-types"),i=require("classnames"),o=require("@material-ui/core/styles"),u=require("@material-ui/core"),c=require("@material-ui/icons/ChevronLeft"),d=require("../../../../clients/jsonApi/index.js"),l=require("../../AnnotationsContext.js"),p=require("../../constants.js"),h=require("./components/AddAnnotationForm/index.js"),f=require("./components/Annotation/index.js"),m=require("./style.css.js");require("../../../../utils/index.js");var y=require("../../../../utils/mobileDetect.js"),b=require("../../../InfiniteList/index.js"),g=require("../../../../effects/useOutsideClick.js"),q=require("react/jsx-runtime"),x=require("../../../../utils/notificationToasts.js");function A(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var j=A(e),T=A(t),N=A(n),v=A(a),I=A(i),C=A(c),S="AppAnnotationsPo",R=function(e){var t,n=e.appId,a=e.appTitle,r=e.assetId,i=e.assetCompanyId,o=e.appSettings,c=e.currentUser,y=e.onClose,A=e.isNative,R=e.classes,_=e.dashboardType,L=l.useAnnotationsState().annotations,k=l.useAnnotationsDispatch(),w=s.useRef(),O=s.useRef();g(w,y);var P=s.useState(!1),D=N.default(P,2),E=D[0],F=D[1],H=s.useState(!0),U=N.default(H,2),B=U[0],W=U[1],G=s.useState(!0),M=N.default(G,2),z=M[0],J=M[1],K=s.useState(1),Q=N.default(K,2),V=Q[0],X=Q[1];function Y(){return(Y=T.default(v.default.mark((function e(){var t,a,s;return v.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&r){e.next=2;break}return e.abrupt("return");case 2:return W(!0),e.prev=3,a={page:V,per_page:4,sort:"created_at",order:"desc"},_&&(a.dashboard_type=_),e.next=8,d.getAnnotations(n,r,a);case 8:t=e.sent,k({type:1===V?p.SET_ANNOTATIONS:p.APPEND_ANNOTATIONS,annotations:t}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),console.error(e.t0);case 15:s=t&&t.data.length<4,X(V+1),J(!s),W(!1);case 19:case"end":return e.stop()}}),e,null,[[3,12]])})))).apply(this,arguments)}return s.useEffect((function(){F(!0)}),[]),q.jsx(u.RootRef,{rootRef:w,children:q.jsxs(u.Paper,{className:I.default(m.cAnnotationsList,(t={},j.default(t,m.cAnnotationsListOpen,E),j.default(t,m.cAnnotationsListOpenNative,A),t)),children:[q.jsx(b,{infiniteClassName:m.cAnnotationsListContentContainer,headerComponent:q.jsxs(q.Fragment,{children:[q.jsx(u.Typography,{"data-testid":"".concat(S,"_appTitle"),variant:"body1",className:R.title,children:a}),q.jsx("div",{className:m.cAnnotationsListContentTop,children:q.jsxs(u.Typography,{"data-testid":"".concat(S,"_annotationsTitle"),variant:"caption",className:R.secondaryTitle,children:["Annotations (",L.data?L.data.length:0,")"]})}),q.jsx(h,{appId:n,assetId:r,assetCompanyId:i,appSettings:o,currentUser:c,dashboardType:_})]}),useWindow:A,items:L.data||[],showNoItemsFound:!(L.data&&0!==L.data.length||B),noItemsFoundLabel:q.jsx(u.Typography,{variant:"body2","data-testid":"".concat(S,"_noAnnotations"),className:R.noAnnotations,children:"No Annotations yet"}),threshold:50,infiniteContainerHeight:w.current&&O.current?w.current.clientHeight-O.current.clientHeight:null,moreItemsMayExist:z,pathToCreatedAt:["attributes","created_at"],renderItem:function(e){return q.jsx(f,{isNative:A,annotation:e,assetCompanyId:i,included:L.included,currentUser:c,showSuccessNotification:x.showSuccessNotification},e.id)},loadItems:function(){return Y.apply(this,arguments)}}),q.jsx("div",{className:m.cAnnotationsListActions,ref:O,children:q.jsx(u.Tooltip,{title:"Hide",placement:"bottom",children:q.jsx(u.IconButton,{"data-testid":"".concat(S,"_hideButton"),onClick:y,className:R.backIcon,children:q.jsx(C.default,{})})})})]})})};R.propTypes={appId:r.number.isRequired,appTitle:r.string.isRequired,assetId:r.number.isRequired,assetCompanyId:r.number.isRequired,appSettings:r.shape(),classes:r.shape().isRequired,onClose:r.func.isRequired,currentUser:r.shape({}).isRequired,isNative:r.bool,dashboardType:r.string},R.defaultProps={appSettings:{},isNative:y.isNativeDetected,dashboardType:null};var _=o.withStyles((function(e){return{title:{fontWeight:200,marginBottom:20},secondaryTitle:{fontWeight:200,textTransform:"uppercase",color:e.palette.grey[600]},annotateIcon:{padding:0,"&:hover":{backgroundColor:"transparent",boxShadow:"none"}},noAnnotations:{marginTop:16},backIcon:{cursor:"pointer",color:e.palette.grey[600],padding:5}}}))(s.memo(R));module.exports=_;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/slicedToArray"),a=require("@babel/runtime/regenerator"),s=require("react"),r=require("prop-types"),i=require("classnames"),o=require("@material-ui/core/styles"),u=require("@material-ui/core"),c=require("@material-ui/icons/ChevronLeft"),d=require("../../../../clients/jsonApi/index.js"),l=require("../../AnnotationsContext.js"),p=require("../../constants.js"),h=require("./components/AddAnnotationForm/index.js"),m=require("./components/Annotation/index.js"),f=require("./style.css.js");require("../../../../utils/index.js");var y=require("../../../../utils/mobileDetect.js"),b=require("../../../InfiniteList/index.js"),q=require("../../../../effects/useOutsideClick.js"),x=require("react/jsx-runtime"),A=require("../../../../utils/notificationToasts.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var j=g(e),T=g(t),v=g(n),N=g(a),I=g(i),C=g(c),S="AppAnnotationsPo",R=function(e){var t,n=e.appId,a=e.appTitle,r=e.assetId,i=e.assetCompanyId,o=e.appSettings,c=void 0===o?_:o,y=e.currentUser,g=e.onClose,R=e.isNative,k=void 0===R?L:R,w=e.classes,O=e.dashboardType,P=void 0===O?null:O,D=l.useAnnotationsState().annotations,E=l.useAnnotationsDispatch(),F=s.useRef(),H=s.useRef();q(F,g);var U=s.useState(!1),B=v.default(U,2),W=B[0],G=B[1],M=s.useState(!0),z=v.default(M,2),J=z[0],K=z[1],Q=s.useState(!0),V=v.default(Q,2),X=V[0],Y=V[1],Z=s.useState(1),$=v.default(Z,2),ee=$[0],te=$[1];function ne(){return(ne=T.default(N.default.mark((function e(){var t,a,s;return N.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&r){e.next=2;break}return e.abrupt("return");case 2:return K(!0),e.prev=3,a={page:ee,per_page:4,sort:"created_at",order:"desc"},P&&(a.dashboard_type=P),e.next=8,d.getAnnotations(n,r,a);case 8:t=e.sent,E({type:1===ee?p.SET_ANNOTATIONS:p.APPEND_ANNOTATIONS,annotations:t}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),console.error(e.t0);case 15:s=t&&t.data.length<4,te(ee+1),Y(!s),K(!1);case 19:case"end":return e.stop()}}),e,null,[[3,12]])})))).apply(this,arguments)}return s.useEffect((function(){G(!0)}),[]),x.jsx(u.RootRef,{rootRef:F,children:x.jsxs(u.Paper,{className:I.default(f.cAnnotationsList,(t={},j.default(t,f.cAnnotationsListOpen,W),j.default(t,f.cAnnotationsListOpenNative,k),t)),children:[x.jsx(b,{infiniteClassName:f.cAnnotationsListContentContainer,headerComponent:x.jsxs(x.Fragment,{children:[x.jsx(u.Typography,{"data-testid":"".concat(S,"_appTitle"),variant:"body1",className:w.title,children:a}),x.jsx("div",{className:f.cAnnotationsListContentTop,children:x.jsxs(u.Typography,{"data-testid":"".concat(S,"_annotationsTitle"),variant:"caption",className:w.secondaryTitle,children:["Annotations (",D.data?D.data.length:0,")"]})}),x.jsx(h,{appId:n,assetId:r,assetCompanyId:i,appSettings:c,currentUser:y,dashboardType:P})]}),useWindow:k,items:D.data||[],showNoItemsFound:!(D.data&&0!==D.data.length||J),noItemsFoundLabel:x.jsx(u.Typography,{variant:"body2","data-testid":"".concat(S,"_noAnnotations"),className:w.noAnnotations,children:"No Annotations yet"}),threshold:50,infiniteContainerHeight:F.current&&H.current?F.current.clientHeight-H.current.clientHeight:null,moreItemsMayExist:X,pathToCreatedAt:["attributes","created_at"],renderItem:function(e){return x.jsx(m,{isNative:k,annotation:e,assetCompanyId:i,included:D.included,currentUser:y,showSuccessNotification:A.showSuccessNotification},e.id)},loadItems:function(){return ne.apply(this,arguments)}}),x.jsx("div",{className:f.cAnnotationsListActions,ref:H,children:x.jsx(u.Tooltip,{title:"Hide",placement:"bottom",children:x.jsx(u.IconButton,{"data-testid":"".concat(S,"_hideButton"),onClick:g,className:w.backIcon,children:x.jsx(C.default,{})})})})]})})};R.propTypes={appId:r.number.isRequired,appTitle:r.string.isRequired,assetId:r.number.isRequired,assetCompanyId:r.number.isRequired,appSettings:r.shape(),classes:r.shape().isRequired,onClose:r.func.isRequired,currentUser:r.shape({}).isRequired,isNative:r.bool,dashboardType:r.string};var _={},L=y.isNativeDetected,k=o.withStyles((function(e){return{title:{fontWeight:200,marginBottom:20},secondaryTitle:{fontWeight:200,textTransform:"uppercase",color:e.palette.grey[600]},annotateIcon:{padding:0,"&:hover":{backgroundColor:"transparent",boxShadow:"none"}},noAnnotations:{marginTop:16},backIcon:{cursor:"pointer",color:e.palette.grey[600],padding:5}}}))(s.memo(R));module.exports=k;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/components/Annotations/components/AnnotationsList/index.js"],"sourcesContent":["import { memo, useState, useEffect, useRef } from 'react';\nimport { func, bool, shape, number, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Typography, IconButton, Tooltip, RootRef } from '@material-ui/core';\nimport BackIcon from '@material-ui/icons/ChevronLeft';\n\nimport { getAnnotations } from '../../../../clients/jsonApi';\nimport { useAnnotationsState, useAnnotationsDispatch } from '../../AnnotationsContext';\nimport { SET_ANNOTATIONS, APPEND_ANNOTATIONS } from '../../constants';\n\nimport AddAnnotationForm from './components/AddAnnotationForm';\nimport Annotation from './components/Annotation';\n\nimport styles from './style.css';\n\nimport { showSuccessNotification } from '~/utils';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport InfiniteList from '~components/InfiniteList';\nimport useOutsideClick from '~effects/useOutsideClick';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst muiStyles = theme => ({\n title: { fontWeight: 200, marginBottom: 20 },\n secondaryTitle: {\n fontWeight: 200,\n textTransform: 'uppercase',\n color: theme.palette.grey[600],\n },\n annotateIcon: {\n padding: 0,\n '&:hover': {\n backgroundColor: 'transparent',\n boxShadow: 'none',\n },\n },\n noAnnotations: { marginTop: 16 },\n backIcon: { cursor: 'pointer', color: theme.palette.grey[600], padding: 5 },\n});\n\nconst PER_PAGE = 4;\n\nconst AnnotationsList = ({\n appId,\n appTitle,\n assetId,\n assetCompanyId,\n appSettings,\n currentUser,\n onClose,\n isNative,\n classes,\n dashboardType,\n}) => {\n const { annotations } = useAnnotationsState();\n const dispatch = useAnnotationsDispatch();\n\n const rootRef = useRef();\n const footerRef = useRef();\n\n const infiniteContainerHeight = () => {\n if (rootRef.current && footerRef.current)\n return rootRef.current.clientHeight - footerRef.current.clientHeight;\n return null;\n };\n\n useOutsideClick(rootRef, onClose);\n\n const [isOpen, setIsOpen] = useState(false);\n const [isInfiniteLoading, setIsInfiniteLoading] = useState(true);\n const [moreItemsMayExist, setMoreItemsMayExist] = useState(true);\n const [page, setPage] = useState(1);\n\n async function handleFetchAnnotations() {\n if (!(appId && assetId)) return;\n setIsInfiniteLoading(true);\n\n let response;\n try {\n const options = {\n page,\n per_page: PER_PAGE,\n sort: 'created_at',\n order: 'desc',\n };\n if (dashboardType) options.dashboard_type = dashboardType;\n\n response = await getAnnotations(appId, assetId, options);\n dispatch({\n type: page === 1 ? SET_ANNOTATIONS : APPEND_ANNOTATIONS,\n annotations: response,\n });\n } catch (e) {\n console.error(e);\n }\n\n const lessThanPerPage = response && response.data.length < PER_PAGE;\n\n setPage(page + 1);\n setMoreItemsMayExist(!lessThanPerPage);\n setIsInfiniteLoading(false);\n }\n\n useEffect(() => {\n setIsOpen(true); // NOTE: Opens here because of for the sliding effect on open\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <RootRef rootRef={rootRef}>\n <Paper\n className={classNames(styles.cAnnotationsList, {\n [styles.cAnnotationsListOpen]: isOpen,\n [styles.cAnnotationsListOpenNative]: isNative,\n })}\n >\n <InfiniteList\n infiniteClassName={styles.cAnnotationsListContentContainer}\n headerComponent={\n <>\n <Typography\n data-testid={`${PAGE_NAME}_appTitle`}\n variant=\"body1\"\n className={classes.title}\n >\n {appTitle}\n </Typography>\n\n <div className={styles.cAnnotationsListContentTop}>\n <Typography\n data-testid={`${PAGE_NAME}_annotationsTitle`}\n variant=\"caption\"\n className={classes.secondaryTitle}\n >\n Annotations ({annotations.data ? annotations.data.length : 0})\n </Typography>\n </div>\n\n <AddAnnotationForm\n appId={appId}\n assetId={assetId}\n assetCompanyId={assetCompanyId}\n appSettings={appSettings}\n currentUser={currentUser}\n dashboardType={dashboardType}\n />\n </>\n }\n useWindow={isNative}\n items={annotations.data || []}\n showNoItemsFound={\n (!annotations.data || annotations.data.length === 0) && !isInfiniteLoading\n }\n noItemsFoundLabel={\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_noAnnotations`}\n className={classes.noAnnotations}\n >\n No Annotations yet\n </Typography>\n }\n threshold={50}\n infiniteContainerHeight={infiniteContainerHeight()}\n moreItemsMayExist={moreItemsMayExist}\n pathToCreatedAt={['attributes', 'created_at']}\n renderItem={item => (\n <Annotation\n key={item.id}\n isNative={isNative}\n annotation={item}\n assetCompanyId={assetCompanyId}\n included={annotations.included}\n currentUser={currentUser}\n showSuccessNotification={showSuccessNotification}\n />\n )}\n loadItems={handleFetchAnnotations}\n />\n <div className={styles.cAnnotationsListActions} ref={footerRef}>\n <Tooltip title=\"Hide\" placement=\"bottom\">\n <IconButton\n data-testid={`${PAGE_NAME}_hideButton`}\n onClick={onClose}\n className={classes.backIcon}\n >\n <BackIcon />\n </IconButton>\n </Tooltip>\n </div>\n </Paper>\n </RootRef>\n );\n};\n\nAnnotationsList.propTypes = {\n appId: number.isRequired,\n appTitle: string.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape(),\n classes: shape().isRequired,\n onClose: func.isRequired,\n currentUser: shape({}).isRequired,\n isNative: bool,\n dashboardType: string,\n};\n\nAnnotationsList.defaultProps = {\n appSettings: {},\n isNative: isNativeDetected,\n dashboardType: null,\n};\n\nexport default withStyles(muiStyles)(memo(AnnotationsList));\n"],"names":["PAGE_NAME","AnnotationsList","_ref","_classNames","appId","appTitle","assetId","assetCompanyId","appSettings","currentUser","onClose","isNative","classes","dashboardType","annotations","useAnnotationsState","dispatch","useAnnotationsDispatch","rootRef","useRef","footerRef","useOutsideClick","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","_useState4","_useState3","isInfiniteLoading","setIsInfiniteLoading","_useState6","_useState5","moreItemsMayExist","setMoreItemsMayExist","_useState8","_useState7","page","setPage","_handleFetchAnnotations","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","options","lessThanPerPage","wrap","_context","prev","next","abrupt","per_page","sort","order","dashboard_type","getAnnotations","sent","type","SET_ANNOTATIONS","APPEND_ANNOTATIONS","t0","console","error","data","length","stop","apply","this","arguments","useEffect","_jsx","RootRef","children","_jsxs","Paper","className","classNames","styles","cAnnotationsList","cAnnotationsListOpen","cAnnotationsListOpenNative","InfiniteList","infiniteClassName","cAnnotationsListContentContainer","headerComponent","jsxs","_Fragment","Typography","concat","variant","title","jsx","cAnnotationsListContentTop","secondaryTitle","AddAnnotationForm","useWindow","items","showNoItemsFound","noItemsFoundLabel","noAnnotations","threshold","infiniteContainerHeight","current","clientHeight","pathToCreatedAt","renderItem","item","Annotation","annotation","included","showSuccessNotification","id","loadItems","cAnnotationsListActions","ref","Tooltip","placement","IconButton","onClick","backIcon","BackIcon","propTypes","number","isRequired","string","shape","func","bool","defaultProps","isNativeDetected","withStyles","theme","fontWeight","marginBottom","textTransform","color","palette","grey","annotateIcon","padding","backgroundColor","boxShadow","marginTop","cursor","memo"],"mappings":"ogCAqBMA,EAAY,mBAsBZC,EAAkB,SAWlBC,GAAA,IAAAC,EAVJC,IAAAA,MACAC,IAAAA,SACAC,IA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,CAC7B1H,YAAa,CAAE,EACfG,SAAUwH,EAAgBA,iBAC1BtH,cAAe,MAGjB,IAAeuH,EAAAA,EAAAA,YA/LG,SAAAC,GAAK,MAAK,CAC1BzC,MAAO,CAAE0C,WAAY,IAAKC,aAAc,IACxCxC,eAAgB,CACduC,WAAY,IACZE,cAAe,YACfC,MAAOJ,EAAMK,QAAQC,KAAK,MAE5BC,aAAc,CACZC,QAAS,EACT,UAAW,CACTC,gBAAiB,cACjBC,UAAW,SAGf1C,cAAe,CAAE2C,UAAW,IAC5BvB,SAAU,CAAEwB,OAAQ,UAAWR,MAAOJ,EAAMK,QAAQC,KAAK,KAAME,QAAS,GACzE,GA+KcT,CAAsBc,EAAIA,KAACjJ"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/components/Annotations/components/AnnotationsList/index.js"],"sourcesContent":["import { memo, useState, useEffect, useRef } from 'react';\nimport { func, bool, shape, number, string } from 'prop-types';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { Paper, Typography, IconButton, Tooltip, RootRef } from '@material-ui/core';\nimport BackIcon from '@material-ui/icons/ChevronLeft';\n\nimport { getAnnotations } from '../../../../clients/jsonApi';\nimport { useAnnotationsState, useAnnotationsDispatch } from '../../AnnotationsContext';\nimport { SET_ANNOTATIONS, APPEND_ANNOTATIONS } from '../../constants';\n\nimport AddAnnotationForm from './components/AddAnnotationForm';\nimport Annotation from './components/Annotation';\n\nimport styles from './style.css';\n\nimport { showSuccessNotification } from '~/utils';\nimport { isNativeDetected } from '~/utils/mobileDetect';\nimport InfiniteList from '~components/InfiniteList';\nimport useOutsideClick from '~effects/useOutsideClick';\n\nconst PAGE_NAME = 'AppAnnotationsPo';\n\nconst muiStyles = theme => ({\n title: { fontWeight: 200, marginBottom: 20 },\n secondaryTitle: {\n fontWeight: 200,\n textTransform: 'uppercase',\n color: theme.palette.grey[600],\n },\n annotateIcon: {\n padding: 0,\n '&:hover': {\n backgroundColor: 'transparent',\n boxShadow: 'none',\n },\n },\n noAnnotations: { marginTop: 16 },\n backIcon: { cursor: 'pointer', color: theme.palette.grey[600], padding: 5 },\n});\n\nconst PER_PAGE = 4;\n\nconst AnnotationsList = ({\n appId,\n appTitle,\n assetId,\n assetCompanyId,\n appSettings = DEFAULT_ANNOTATIONS_LIST_APP_SETTINGS,\n currentUser,\n onClose,\n isNative = DEFAULT_ANNOTATIONS_LIST_IS_NATIVE,\n classes,\n dashboardType = null,\n}) => {\n const { annotations } = useAnnotationsState();\n const dispatch = useAnnotationsDispatch();\n\n const rootRef = useRef();\n const footerRef = useRef();\n\n const infiniteContainerHeight = () => {\n if (rootRef.current && footerRef.current)\n return rootRef.current.clientHeight - footerRef.current.clientHeight;\n return null;\n };\n\n useOutsideClick(rootRef, onClose);\n\n const [isOpen, setIsOpen] = useState(false);\n const [isInfiniteLoading, setIsInfiniteLoading] = useState(true);\n const [moreItemsMayExist, setMoreItemsMayExist] = useState(true);\n const [page, setPage] = useState(1);\n\n async function handleFetchAnnotations() {\n if (!(appId && assetId)) return;\n setIsInfiniteLoading(true);\n\n let response;\n try {\n const options = {\n page,\n per_page: PER_PAGE,\n sort: 'created_at',\n order: 'desc',\n };\n if (dashboardType) options.dashboard_type = dashboardType;\n\n response = await getAnnotations(appId, assetId, options);\n dispatch({\n type: page === 1 ? SET_ANNOTATIONS : APPEND_ANNOTATIONS,\n annotations: response,\n });\n } catch (e) {\n console.error(e);\n }\n\n const lessThanPerPage = response && response.data.length < PER_PAGE;\n\n setPage(page + 1);\n setMoreItemsMayExist(!lessThanPerPage);\n setIsInfiniteLoading(false);\n }\n\n useEffect(() => {\n setIsOpen(true); // NOTE: Opens here because of for the sliding effect on open\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <RootRef rootRef={rootRef}>\n <Paper\n className={classNames(styles.cAnnotationsList, {\n [styles.cAnnotationsListOpen]: isOpen,\n [styles.cAnnotationsListOpenNative]: isNative,\n })}\n >\n <InfiniteList\n infiniteClassName={styles.cAnnotationsListContentContainer}\n headerComponent={\n <>\n <Typography\n data-testid={`${PAGE_NAME}_appTitle`}\n variant=\"body1\"\n className={classes.title}\n >\n {appTitle}\n </Typography>\n\n <div className={styles.cAnnotationsListContentTop}>\n <Typography\n data-testid={`${PAGE_NAME}_annotationsTitle`}\n variant=\"caption\"\n className={classes.secondaryTitle}\n >\n Annotations ({annotations.data ? annotations.data.length : 0})\n </Typography>\n </div>\n\n <AddAnnotationForm\n appId={appId}\n assetId={assetId}\n assetCompanyId={assetCompanyId}\n appSettings={appSettings}\n currentUser={currentUser}\n dashboardType={dashboardType}\n />\n </>\n }\n useWindow={isNative}\n items={annotations.data || []}\n showNoItemsFound={\n (!annotations.data || annotations.data.length === 0) && !isInfiniteLoading\n }\n noItemsFoundLabel={\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_noAnnotations`}\n className={classes.noAnnotations}\n >\n No Annotations yet\n </Typography>\n }\n threshold={50}\n infiniteContainerHeight={infiniteContainerHeight()}\n moreItemsMayExist={moreItemsMayExist}\n pathToCreatedAt={['attributes', 'created_at']}\n renderItem={item => (\n <Annotation\n key={item.id}\n isNative={isNative}\n annotation={item}\n assetCompanyId={assetCompanyId}\n included={annotations.included}\n currentUser={currentUser}\n showSuccessNotification={showSuccessNotification}\n />\n )}\n loadItems={handleFetchAnnotations}\n />\n <div className={styles.cAnnotationsListActions} ref={footerRef}>\n <Tooltip title=\"Hide\" placement=\"bottom\">\n <IconButton\n data-testid={`${PAGE_NAME}_hideButton`}\n onClick={onClose}\n className={classes.backIcon}\n >\n <BackIcon />\n </IconButton>\n </Tooltip>\n </div>\n </Paper>\n </RootRef>\n );\n};\n\nAnnotationsList.propTypes = {\n appId: number.isRequired,\n appTitle: string.isRequired,\n assetId: number.isRequired,\n assetCompanyId: number.isRequired,\n appSettings: shape(),\n classes: shape().isRequired,\n onClose: func.isRequired,\n currentUser: shape({}).isRequired,\n isNative: bool,\n dashboardType: string,\n};\n\nconst DEFAULT_ANNOTATIONS_LIST_APP_SETTINGS = {};\nconst DEFAULT_ANNOTATIONS_LIST_IS_NATIVE = isNativeDetected;\n\nexport default withStyles(muiStyles)(memo(AnnotationsList));\n"],"names":["PAGE_NAME","AnnotationsList","_ref","_classNames","appId","appTitle","assetId","assetCompanyId","_ref$appSettings","appSettings","DEFAULT_ANNOTATIONS_LIST_APP_SETTINGS","currentUser","onClose","_ref$isNative","isNative","DEFAULT_ANNOTATIONS_LIST_IS_NATIVE","classes","_ref$dashboardType","dashboardType","annotations","useAnnotationsState","dispatch","useAnnotationsDispatch","rootRef","useRef","footerRef","useOutsideClick","useState","_useState2","_slicedToArray","_useState","isOpen","setIsOpen","_useState4","_useState3","isInfiniteLoading","setIsInfiniteLoading","_useState6","_useState5","moreItemsMayExist","setMoreItemsMayExist","_useState8","_useState7","page","setPage","_handleFetchAnnotations","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","options","lessThanPerPage","wrap","_context","prev","next","abrupt","per_page","sort","order","dashboard_type","getAnnotations","sent","type","SET_ANNOTATIONS","APPEND_ANNOTATIONS","t0","console","error","data","length","stop","apply","this","arguments","useEffect","_jsx","RootRef","children","_jsxs","Paper","className","classNames","styles","cAnnotationsList","cAnnotationsListOpen","cAnnotationsListOpenNative","InfiniteList","infiniteClassName","cAnnotationsListContentContainer","headerComponent","jsxs","_Fragment","Typography","concat","variant","title","jsx","cAnnotationsListContentTop","secondaryTitle","AddAnnotationForm","useWindow","items","showNoItemsFound","noItemsFoundLabel","noAnnotations","threshold","infiniteContainerHeight","current","clientHeight","pathToCreatedAt","renderItem","item","Annotation","annotation","included","showSuccessNotification","id","loadItems","cAnnotationsListActions","ref","Tooltip","placement","IconButton","onClick","backIcon","BackIcon","propTypes","number","isRequired","string","shape","func","bool","isNativeDetected","withStyles","theme","fontWeight","marginBottom","textTransform","color","palette","grey","annotateIcon","padding","backgroundColor","boxShadow","marginTop","cursor","memo"],"mappings":"ogCAqBMA,EAAY,mBAsBZC,EAAkB,SAWlBC,G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AGF,WACjBtH,QAASyH,EAAIA,KAACH,WACdvH,YAAayH,EAAAA,MAAM,CAAE,GAAEF,WACvBpH,SAAUwH,EAAIA,KACdpH,cAAeiH,EAAAA,QAGjB,IAAMzH,EAAwC,CAAA,EACxCK,EAAqCwH,EAAAA,iBAE5BC,EAAAA,EAAAA,YA5LG,SAAAC,GAAK,MAAK,CAC1BxC,MAAO,CAAEyC,WAAY,IAAKC,aAAc,IACxCvC,eAAgB,CACdsC,WAAY,IACZE,cAAe,YACfC,MAAOJ,EAAMK,QAAQC,KAAK,MAE5BC,aAAc,CACZC,QAAS,EACT,UAAW,CACTC,gBAAiB,cACjBC,UAAW,SAGfzC,cAAe,CAAE0C,UAAW,IAC5BtB,SAAU,CAAEuB,OAAQ,UAAWR,MAAOJ,EAAMK,QAAQC,KAAK,KAAME,QAAS,GACzE,GA4KcT,CAAsBc,EAAIA,KAACrJ"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/regenerator"),a=require("react"),i=require("prop-types"),s=require("classnames"),n=require("lodash"),o=require("@material-ui/core/styles"),u=require("@material-ui/core/withWidth"),c=require("@material-ui/core/Paper"),d=require("@material-ui/core/Typography"),l=require("@material-ui/icons/Comment"),m=require("@material-ui/icons/Close"),p=require("../../../../clients/jsonApi/index.js"),f=require("./style.css.js"),h=require("../../../UserCardPopover.js"),v=require("../../../Avatar/index.js"),q=require("../../../UserMention/utils/index.js"),x=require("../../../../utils/mobileDetect.js"),b=require("react/jsx-runtime");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var j=y(e),g=y(t),N=y(r),A=y(s),R=y(u),U=y(c),_=y(d),C=y(l),L=y(m),T="lastAnnotation",w=function(e){var t=e.user,r=e.currentUser,a=e.isNative,i=e.className,s=e.size,n=b.jsx(v.AvatarComponent,{displayName:"".concat(t.first_name," ").concat(t.last_name),imgSrc:t.profile_photo,size:s,className:i});return a?n:b.jsx(h,{user:t,currentUser:r,children:n})},I=function(e){var t=e.commentsCount,r=e.commentUsers,a=e.isSmallScreen,i=e.isNative,s=e.currentUser,n=e.classes;return t?b.jsxs("div",{className:f.cTopAnnotationAdditionalReactions,children:[b.jsx(C.default,{className:n.commentIcon}),!a&&b.jsxs(_.default,{variant:"body2","data-testid":"".concat(T,"_comments"),noWrap:!0,className:n.commentText,component:"div",children:["Comments ",t]}),b.jsx("div",{className:f.cTopAnnotationAdditionalReactionsList,children:r.map((function(e,t){var r=e.attributes;return b.jsx(w,{user:r,currentUser:s,isNative:i,className:A.default(n.avatar,g.default({},n.avatarInList,0!==t)),size:25},r.id)}))})]}):null},S=function(e){var t,r=e.isNative,i=e.appId,s=e.annotation,n=e.openAnnotationsList,o=e.currentUser,c=e.updateCurrentDashboardAppLastAnnotation,d=e.width,l=e.classes,m=s.data,h=s.included,v=h.find((function(e){var t=e.id,r=e.type;return t===m.relationships.user.data.id&&"user"===r})),x=a.useMemo((function(){return m.relationships.mentioned_users.data.map((function(e){var t=e.id;return h.find((function(e){return e.id===t}))}))}),[m.relationships.mentioned_users.data,h]),y=a.useMemo((function(){return m.relationships.comment_users.data.map((function(e){var t=e.id;return h.find((function(e){return e.id===t}))}))}),[m.relationships.comment_users.data,h]),g=!u.isWidthUp("sm",d),A=(t=j.default(N.default.mark((function e(t){var r;return N.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),e.prev=1,e.next=4,p.closeLastAnnotation(m.id);case 4:r=e.sent,c(m.id,i,r),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),function(e){return t.apply(this,arguments)});return b.jsxs(U.default,{"data-testid":"".concat(T,"_lastAnnotation"),className:l.container,onClick:n,children:[b.jsxs("div",{className:f.cTopAnnotationMain,children:[b.jsx(w,{user:v.attributes,currentUser:o,isNative:r,className:l.avatar,size:38}),b.jsx(_.default,{variant:"body2","data-testid":"".concat(T,"_message"),noWrap:!0,className:l.body,children:q.formatMentionText(m.attributes.body,x,r,null,o)})]}),b.jsxs("div",{className:f.cTopAnnotationAdditional,children:[b.jsx(I,{commentsCount:m.attributes.comments_count,commentUsers:y,classes:l,isSmallScreen:g,currentUser:o}),b.jsx(L.default,{"data-testid":"".concat(T,"_closeButton"),fontSize:"small",className:l.closeButton,onClick:A})]})]})};S.propTypes={appId:i.number.isRequired,annotation:i.shape({included:i.arrayOf(i.shape({})).isRequired,data:i.shape({relationships:i.shape({user:i.shape({data:i.shape({id:i.string.isRequired}).isRequired}).isRequired,mentioned_users:i.shape({data:i.arrayOf(i.shape()).isRequired}).isRequired}).isRequired,attributes:i.shape({body:i.string.isRequired,created_at:i.string.isRequired})}).isRequired}).isRequired,classes:i.shape({}).isRequired,isNative:i.bool,width:i.string.isRequired,openAnnotationsList:i.func.isRequired,updateCurrentDashboardAppLastAnnotation:i.func,currentUser:i.shape({})},S.defaultProps={isNative:x.isNativeDetected,updateCurrentDashboardAppLastAnnotation:function(){},currentUser:{}};var z=n.flowRight([o.withStyles((function(e){return{container:{height:56,margin:"10px 0",padding:"0 20px",display:"flex",alignItems:"center",justifyContent:"space-between",flex:"auto 1",width:"100%",cursor:"pointer"},body:{margin:"0 16px ",minWidth:100},avatar:{border:"1px solid #909090"},commentIcon:{marginRight:16,color:e.palette.grey[500]},commentText:{marginRight:16,color:e.palette.grey[500]},closeButton:{color:e.palette.grey[500]},avatarInList:{marginLeft:-4}}})),R.default()])(a.memo(S));module.exports=z;
1
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/regenerator"),a=require("react"),i=require("prop-types"),s=require("classnames"),n=require("lodash"),o=require("@material-ui/core/styles"),u=require("@material-ui/core/withWidth"),c=require("@material-ui/core/Paper"),d=require("@material-ui/core/Typography"),l=require("@material-ui/icons/Comment"),m=require("@material-ui/icons/Close"),p=require("../../../../clients/jsonApi/index.js"),f=require("./style.css.js"),h=require("../../../UserCardPopover.js"),v=require("../../../Avatar/index.js"),q=require("../../../UserMention/utils/index.js"),x=require("../../../../utils/mobileDetect.js"),b=require("react/jsx-runtime");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var j=y(e),g=y(t),N=y(r),R=y(s),A=y(u),_=y(c),U=y(d),C=y(l),T=y(m),w="lastAnnotation",L=function(e){var t=e.user,r=e.currentUser,a=e.isNative,i=e.className,s=e.size,n=b.jsx(v.AvatarComponent,{displayName:"".concat(t.first_name," ").concat(t.last_name),imgSrc:t.profile_photo,size:s,className:i});return a?n:b.jsx(h,{user:t,currentUser:r,children:n})},I=function(e){var t=e.commentsCount,r=e.commentUsers,a=e.isSmallScreen,i=e.isNative,s=e.currentUser,n=e.classes;return t?b.jsxs("div",{className:f.cTopAnnotationAdditionalReactions,children:[b.jsx(C.default,{className:n.commentIcon}),!a&&b.jsxs(U.default,{variant:"body2","data-testid":"".concat(w,"_comments"),noWrap:!0,className:n.commentText,component:"div",children:["Comments ",t]}),b.jsx("div",{className:f.cTopAnnotationAdditionalReactionsList,children:r.map((function(e,t){var r=e.attributes;return b.jsx(L,{user:r,currentUser:s,isNative:i,className:R.default(n.avatar,g.default({},n.avatarInList,0!==t)),size:25},r.id)}))})]}):null},S=function(e){var t,r=e.isNative,i=void 0===r?z:r,s=e.appId,n=e.annotation,o=e.openAnnotationsList,c=e.currentUser,d=void 0===c?W:c,l=e.updateCurrentDashboardAppLastAnnotation,m=void 0===l?M:l,h=e.width,v=e.classes,x=n.data,y=n.included,g=y.find((function(e){var t=e.id,r=e.type;return t===x.relationships.user.data.id&&"user"===r})),R=a.useMemo((function(){return x.relationships.mentioned_users.data.map((function(e){var t=e.id;return y.find((function(e){return e.id===t}))}))}),[x.relationships.mentioned_users.data,y]),A=a.useMemo((function(){return x.relationships.comment_users.data.map((function(e){var t=e.id;return y.find((function(e){return e.id===t}))}))}),[x.relationships.comment_users.data,y]),C=!u.isWidthUp("sm",h),S=(t=j.default(N.default.mark((function e(t){var r;return N.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),e.prev=1,e.next=4,p.closeLastAnnotation(x.id);case 4:r=e.sent,m(x.id,s,r),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),function(e){return t.apply(this,arguments)});return b.jsxs(_.default,{"data-testid":"".concat(w,"_lastAnnotation"),className:v.container,onClick:o,children:[b.jsxs("div",{className:f.cTopAnnotationMain,children:[b.jsx(L,{user:g.attributes,currentUser:d,isNative:i,className:v.avatar,size:38}),b.jsx(U.default,{variant:"body2","data-testid":"".concat(w,"_message"),noWrap:!0,className:v.body,children:q.formatMentionText(x.attributes.body,R,i,null,d)})]}),b.jsxs("div",{className:f.cTopAnnotationAdditional,children:[b.jsx(I,{commentsCount:x.attributes.comments_count,commentUsers:A,classes:v,isSmallScreen:C,currentUser:d}),b.jsx(T.default,{"data-testid":"".concat(w,"_closeButton"),fontSize:"small",className:v.closeButton,onClick:S})]})]})};S.propTypes={appId:i.number.isRequired,annotation:i.shape({included:i.arrayOf(i.shape({})).isRequired,data:i.shape({relationships:i.shape({user:i.shape({data:i.shape({id:i.string.isRequired}).isRequired}).isRequired,mentioned_users:i.shape({data:i.arrayOf(i.shape()).isRequired}).isRequired}).isRequired,attributes:i.shape({body:i.string.isRequired,created_at:i.string.isRequired})}).isRequired}).isRequired,classes:i.shape({}).isRequired,isNative:i.bool,width:i.string.isRequired,openAnnotationsList:i.func.isRequired,updateCurrentDashboardAppLastAnnotation:i.func,currentUser:i.shape({})};var z=x.isNativeDetected,M=function(){},W={},k=n.flowRight([o.withStyles((function(e){return{container:{height:56,margin:"10px 0",padding:"0 20px",display:"flex",alignItems:"center",justifyContent:"space-between",flex:"auto 1",width:"100%",cursor:"pointer"},body:{margin:"0 16px ",minWidth:100},avatar:{border:"1px solid #909090"},commentIcon:{marginRight:16,color:e.palette.grey[500]},commentText:{marginRight:16,color:e.palette.grey[500]},closeButton:{color:e.palette.grey[500]},avatarInList:{marginLeft:-4}}})),A.default()])(a.memo(S));module.exports=k;
2
2
  //# sourceMappingURL=index.js.map