@corva/ui 3.73.0-7 → 3.74.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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":"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","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","cAnnotationContainer","cAnnotationContainerTop","cAnnotationContainerTopMainInfo","Typography","variant","createdAt","moment","created_at","format","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","cursor","height","padding","withWidth"],"mappings":"yjDA2BA,IAAMA,EAAY,sBAiBZC,EAA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gB,CACdyK,OAAQ,GACRnJ,MAAO,GACPoJ,QAAS,EACTJ,OAAQ,iBAEX,IAuSgDK,KAAlCX,CAAgDlJ"}
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","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","cAnnotationContainer","cAnnotationContainerTop","cAnnotationContainerTopMainInfo","Typography","variant","createdAt","moment","created_at","format","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":"yjDA2BA,IAAMA,EAAY,sBAiBZC,EAAa,SAAHC,GAAA,IAAMC,IAAAA,KAAMC,IAAAA,YAAaC,IAAAA,QAAO,OAC9CC,EAAA,MAAA,CAAKC,UAAWC,EAAOC,sBAAsBC,SAC1CC,EACCL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1,17 @@
1
- declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
1
+ declare const DEFAULT_ANNOTATION_INPUT_ON_SEND: () => undefined;
2
+ declare const DEFAULT_ANNOTATION_INPUT_ON_CLOSE: () => undefined;
3
+ declare const _default: import("react").ComponentType<Pick<import("@material-ui/types").ConsistentWith<{
2
4
  assetCompanyId: any;
3
5
  classes: any;
4
- closeOnEsc: any;
6
+ closeOnEsc?: boolean | undefined;
5
7
  currentUser: any;
6
- initialAttachment: any;
8
+ initialAttachment?: null | undefined;
7
9
  initialPeriod: any;
8
- initialText: any;
9
- onClose: any;
10
- onSend: any;
11
- }, never> & Pick<import("prop-types").InferProps<{
12
- initialText: import("prop-types").Requireable<string>;
13
- initialPeriod: import("prop-types").Requireable<string>;
14
- initialAttachment: import("prop-types").Requireable<import("prop-types").InferProps<{
15
- file_name: import("prop-types").Requireable<string>;
16
- s3_link: import("prop-types").Requireable<string>;
17
- }>>;
18
- onSend: import("prop-types").Requireable<(...args: any[]) => any>;
19
- onClose: import("prop-types").Requireable<(...args: any[]) => any>;
20
- closeOnEsc: import("prop-types").Requireable<boolean>;
21
- assetCompanyId: import("prop-types").Validator<number>;
22
- currentUser: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>>;
23
- classes: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>>;
24
- }>, "closeOnEsc" | "initialAttachment" | "initialPeriod" | "initialText" | "onClose" | "onSend" | import("prop-types").RequiredKeys<{
25
- initialText: import("prop-types").Requireable<string>;
26
- initialPeriod: import("prop-types").Requireable<string>;
27
- initialAttachment: import("prop-types").Requireable<import("prop-types").InferProps<{
28
- file_name: import("prop-types").Requireable<string>;
29
- s3_link: import("prop-types").Requireable<string>;
30
- }>>;
31
- onSend: import("prop-types").Requireable<(...args: any[]) => any>;
32
- onClose: import("prop-types").Requireable<(...args: any[]) => any>;
33
- closeOnEsc: import("prop-types").Requireable<boolean>;
34
- assetCompanyId: import("prop-types").Validator<number>;
35
- currentUser: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>>;
36
- classes: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>>;
37
- }>>, import("prop-types").RequiredKeys<{
38
- initialText: import("prop-types").Requireable<string>;
39
- initialPeriod: import("prop-types").Requireable<string>;
40
- initialAttachment: import("prop-types").Requireable<import("prop-types").InferProps<{
41
- file_name: import("prop-types").Requireable<string>;
42
- s3_link: import("prop-types").Requireable<string>;
43
- }>>;
44
- onSend: import("prop-types").Requireable<(...args: any[]) => any>;
45
- onClose: import("prop-types").Requireable<(...args: any[]) => any>;
46
- closeOnEsc: import("prop-types").Requireable<boolean>;
47
- assetCompanyId: import("prop-types").Validator<number>;
48
- currentUser: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>>;
49
- classes: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>>;
50
- }>> & {
51
- initialText?: string | null | undefined;
52
- initialPeriod?: string | null | undefined;
53
- initialAttachment?: import("prop-types").InferProps<{
54
- file_name: import("prop-types").Requireable<string>;
55
- s3_link: import("prop-types").Requireable<string>;
56
- }> | null | undefined;
57
- onSend?: ((...args: any[]) => any) | null | undefined;
58
- onClose?: ((...args: any[]) => any) | null | undefined;
59
- closeOnEsc?: boolean | null | undefined;
60
- } & {}, "assetCompanyId" | "closeOnEsc" | "currentUser" | "initialAttachment" | "initialPeriod" | "initialText" | "onClose" | "onSend"> & import("@material-ui/styles").StyledComponentProps<"inputLabel" | "inputRoot" | "labelHighlighter" | "selectLabel" | "sendButton" | "sendLabel" | "uploadingError">>;
10
+ initialText?: string | undefined;
11
+ onClose?: typeof DEFAULT_ANNOTATION_INPUT_ON_CLOSE | undefined;
12
+ onSend?: typeof DEFAULT_ANNOTATION_INPUT_ON_SEND | undefined;
13
+ }, {
14
+ classes: import("@material-ui/styles").ClassNameMap<"inputLabel" | "inputRoot" | "labelHighlighter" | "selectLabel" | "sendButton" | "sendLabel" | "uploadingError">;
15
+ }>, "assetCompanyId" | "closeOnEsc" | "currentUser" | "initialAttachment" | "initialPeriod" | "initialText" | "onClose" | "onSend"> & import("@material-ui/styles").StyledComponentProps<"inputLabel" | "inputRoot" | "labelHighlighter" | "selectLabel" | "sendButton" | "sendLabel" | "uploadingError">>;
61
16
  export default _default;
62
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Annotations/components/AnnotationsList/components/AnnotationInput/index.js"],"names":[],"mappings":"AAkRA,QAAA,MAAM,gCAAgC,iBAAkB,CAAC;AACzD,QAAA,MAAM,iCAAiC,iBAAkB,CAAC"}
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/slicedToArray";import{useState as e}from"react";import n from"moment";import{string as i,shape as o,func as a,bool as l,number as r}from"prop-types";import{withStyles as c}from"@material-ui/core/styles";import{Paper as s,Input as m,Tooltip as d,FormControl as p,InputLabel as u,MenuItem as f,Typography as h,IconButton as g}from"@material-ui/core";import v from"@material-ui/icons/Send";import b from"@material-ui/core/colors/grey";import{ANNOTATION_ACTIVE_PERIODS as y}from"../../../../constants.js";import A from"./StyledSelect.js";import N from"./style.css.js";import j from"../../../../../UserMention/index.js";import C from"../../../../../EmojiIconButton.js";import I from"../../../../../FileUploadIconButton.js";import U from"../../../../../FailedFileUploading.js";import S from"../../../../../FilePreview/index.js";import{isSuggestionsListOpened as E}from"../../../../../UserMention/utils/index.js";import _ from"../../../../../../effects/useEscPress.js";import{jsxs as x,jsx as P}from"react/jsx-runtime";var k="AppAnnotationsPo",B=Object.keys(y),F=function(i){var o=i.initialText,a=i.initialPeriod,l=i.onSend,r=i.onClose,c=i.closeOnEsc,F=i.classes,T=i.initialAttachment,w=i.assetCompanyId,R=i.currentUser,L=e(o),D=t(L,2),O=D[0],z=D[1],H=e((function(){return T?{attachmentName:T.file_name,attachmentUrl:T.signed_url||T.s3_link}:null})),M=t(H,2),W=M[0],q=M[1],K=e(null),G=t(K,2),J=G[0],Q=G[1],V=e(!1),X=t(V,2),Y=X[0],Z=X[1],$=e(B[0]),tt=t($,2),et=tt[0],nt=tt[1];_((function(){c&&r()}));var it=function(){if(O){var t=function(t,e){if("forever"===t)return null;var i=y[t];return n(e).add(i.time.amount,i.time.key).format()}(et,a);l(O,t,W)}};return x("div",{className:N.cAnnotationInput,children:[x(s,{className:N.cAnnotationInputContent,children:[P(m,{"data-testid":"".concat(k,"_annotationsInput"),inputComponent:j,inputProps:{withLightTheme:!1,onChange:function(t){return z(t)},onKeyDown:function(t){"Shift"===t.key&&Z(!0),"Enter"!==t.key||Y||E()||(t.preventDefault(),it())},onKeyUp:function(t){"Shift"===t.key&&Z(!1)},companyId:w,currentUser:R},placeholder:"Type annotation here",fullWidth:!0,disableUnderline:!0,multiline:!0,rows:"3",className:F.inputRoot,value:O}),x("div",{className:N.cAnnotationInputContentActions,children:[P(d,{title:"Attach File",placement:"bottom",children:P("div",{className:N.cAnnotationInputContentActionsButton,children:P(I,{"data-testid":"".concat(k,"_attachFileButton"),openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:function(t,e,n){q({attachmentUrl:t,attachmentName:e,attachmentSize:n}),Q(null)},onError:function(t){q(null),Q(t)},htmlColor:"action"})})}),P(d,{title:"Add Emoji",placement:"bottom",children:P("div",{className:N.cAnnotationInputContentActionsButton,children:P(C,{"data-testid":"".concat(k,"_emojiButton"),htmlColor:b[400],handleSelectEmoji:function(t){return z("".concat(O).concat(t.native))}})})})]})]}),J&&P(U,{className:F.uploadingError,errorMessage:J}),W&&W.attachmentUrl&&P(S,{fileName:W.attachmentName,fileUrl:W.attachmentUrl,handleFileDelete:function(){q(null),Q(null)}}),x("div",{className:N.cAnnotationInputActions,children:[x(p,{className:F.formControl,children:[P(u,{shrink:!0,id:"periods-label-label",className:F.selectLabel,children:"Active"}),P(A,{"data-testid":"".concat(k,"_periodDropdown"),labelId:"periods-label-label",id:"periods-label",value:et,disableUnderline:!0,onChange:function(t){return nt(t.target.value)},children:B.map((function(t){return P(f,{"data-testid":"".concat(k,"_period_").concat(y[t].label,"MenuItem"),value:t,children:y[t].label},t)}))})]}),x("div",{className:N.cAnnotationInputActionsSend,children:[x(h,{variant:"caption",className:F.sendLabel,children:["Press ",P(h,{variant:"caption",color:"primary",component:"span",className:F.labelHighlighter,children:"Enter "}),"to send "]}),P(d,{title:"Send",placement:"bottom",children:P("div",{children:P(g,{"data-testid":"".concat(k,"_sendButton"),className:F.sendButton,onClick:it,disabled:!O,children:P(v,{color:"primary"})})})})]})]})]})};F.propTypes={initialText:i,initialPeriod:i,initialAttachment:o({file_name:i,s3_link:i}),onSend:a,onClose:a,closeOnEsc:l,assetCompanyId:r.isRequired,currentUser:o().isRequired,classes:o().isRequired},F.defaultProps={initialText:"",initialPeriod:void 0,initialAttachment:null,onSend:function(){},onClose:function(){},closeOnEsc:!1};var T=c((function(t){return{inputLabel:{color:t.palette.grey[700],fontWeight:200,width:"100%"},inputRoot:{lineHeight:15},sendLabel:{display:"flex",alignItems:"center",fontWeight:200,color:t.palette.grey[700],marginRight:22,fontSize:10},sendButton:{padding:5},labelHighlighter:{fontWeight:200,fontSize:10},selectLabel:{fontSize:10,lineHeight:"14px",color:t.palette.grey[500]},uploadingError:{paddingTop:"10px"}}}))(F);export{T as default};
1
+ import t from"@babel/runtime/helpers/slicedToArray";import{useState as e}from"react";import n from"moment";import{string as i,shape as o,func as a,bool as r,number as l}from"prop-types";import{withStyles as c}from"@material-ui/core/styles";import{Paper as s,Input as m,Tooltip as d,FormControl as p,InputLabel as u,MenuItem as f,Typography as h,IconButton as v}from"@material-ui/core";import g from"@material-ui/icons/Send";import b from"@material-ui/core/colors/grey";import{ANNOTATION_ACTIVE_PERIODS as y}from"../../../../constants.js";import A from"./StyledSelect.js";import N from"./style.css.js";import j from"../../../../../UserMention/index.js";import I from"../../../../../EmojiIconButton.js";import U from"../../../../../FileUploadIconButton.js";import C from"../../../../../FailedFileUploading.js";import S from"../../../../../FilePreview/index.js";import{isSuggestionsListOpened as _}from"../../../../../UserMention/utils/index.js";import E from"../../../../../../effects/useEscPress.js";import{jsxs as x,jsx as k}from"react/jsx-runtime";var B="AppAnnotationsPo",F=Object.keys(y),P=function(i){var o=i.initialText,a=void 0===o?"":o,r=i.initialPeriod,l=i.onSend,c=void 0===l?w:l,P=i.onClose,T=void 0===P?R:P,L=i.closeOnEsc,D=void 0!==L&&L,z=i.classes,H=i.initialAttachment,M=void 0===H?null:H,O=i.assetCompanyId,W=i.currentUser,q=e(a),K=t(q,2),G=K[0],J=K[1],Q=e((function(){return M?{attachmentName:M.file_name,attachmentUrl:M.signed_url||M.s3_link}:null})),V=t(Q,2),X=V[0],Y=V[1],Z=e(null),$=t(Z,2),tt=$[0],et=$[1],nt=e(!1),it=t(nt,2),ot=it[0],at=it[1],rt=e(F[0]),lt=t(rt,2),ct=lt[0],st=lt[1];E((function(){D&&T()}));var mt=function(){if(G){var t=function(t,e){if("forever"===t)return null;var i=y[t];return n(e).add(i.time.amount,i.time.key).format()}(ct,r);c(G,t,X)}};return x("div",{className:N.cAnnotationInput,children:[x(s,{className:N.cAnnotationInputContent,children:[k(m,{"data-testid":"".concat(B,"_annotationsInput"),inputComponent:j,inputProps:{withLightTheme:!1,onChange:function(t){return J(t)},onKeyDown:function(t){"Shift"===t.key&&at(!0),"Enter"!==t.key||ot||_()||(t.preventDefault(),mt())},onKeyUp:function(t){"Shift"===t.key&&at(!1)},companyId:O,currentUser:W},placeholder:"Type annotation here",fullWidth:!0,disableUnderline:!0,multiline:!0,rows:"3",className:z.inputRoot,value:G}),x("div",{className:N.cAnnotationInputContentActions,children:[k(d,{title:"Attach File",placement:"bottom",children:k("div",{className:N.cAnnotationInputContentActionsButton,children:k(U,{"data-testid":"".concat(B,"_attachFileButton"),openPreviewDialogOnUpload:!1,disableRipple:!0,onFinish:function(t,e,n){Y({attachmentUrl:t,attachmentName:e,attachmentSize:n}),et(null)},onError:function(t){Y(null),et(t)},htmlColor:"action"})})}),k(d,{title:"Add Emoji",placement:"bottom",children:k("div",{className:N.cAnnotationInputContentActionsButton,children:k(I,{"data-testid":"".concat(B,"_emojiButton"),htmlColor:b[400],handleSelectEmoji:function(t){return J("".concat(G).concat(t.native))}})})})]})]}),tt&&k(C,{className:z.uploadingError,errorMessage:tt}),X&&X.attachmentUrl&&k(S,{fileName:X.attachmentName,fileUrl:X.attachmentUrl,handleFileDelete:function(){Y(null),et(null)}}),x("div",{className:N.cAnnotationInputActions,children:[x(p,{className:z.formControl,children:[k(u,{shrink:!0,id:"periods-label-label",className:z.selectLabel,children:"Active"}),k(A,{"data-testid":"".concat(B,"_periodDropdown"),labelId:"periods-label-label",id:"periods-label",value:ct,disableUnderline:!0,onChange:function(t){return st(t.target.value)},children:F.map((function(t){return k(f,{"data-testid":"".concat(B,"_period_").concat(y[t].label,"MenuItem"),value:t,children:y[t].label},t)}))})]}),x("div",{className:N.cAnnotationInputActionsSend,children:[x(h,{variant:"caption",className:z.sendLabel,children:["Press ",k(h,{variant:"caption",color:"primary",component:"span",className:z.labelHighlighter,children:"Enter "}),"to send "]}),k(d,{title:"Send",placement:"bottom",children:k("div",{children:k(v,{"data-testid":"".concat(B,"_sendButton"),className:z.sendButton,onClick:mt,disabled:!G,children:k(g,{color:"primary"})})})})]})]})]})};P.propTypes={initialText:i,initialPeriod:i,initialAttachment:o({file_name:i,s3_link:i}),onSend:a,onClose:a,closeOnEsc:r,assetCompanyId:l.isRequired,currentUser:o().isRequired,classes:o().isRequired};var w=function(){},R=function(){},T=c((function(t){return{inputLabel:{color:t.palette.grey[700],fontWeight:200,width:"100%"},inputRoot:{lineHeight:15},sendLabel:{display:"flex",alignItems:"center",fontWeight:200,color:t.palette.grey[700],marginRight:22,fontSize:10},sendButton:{padding:5},labelHighlighter:{fontWeight:200,fontSize:10},selectLabel:{fontSize:10,lineHeight:"14px",color:t.palette.grey[500]},uploadingError:{paddingTop:"10px"}}}))(P);export{T as default};
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","cAnnotationInputContentActions","Tooltip","title","placement","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":"yhCA+BA,IAAMA,EAAY,mBAEZC,EAAiCC,OAAOC,KAAKC,GA4C7CC,EAAkB,SAUlBC,GAAA,IATJC,IAAAA,YACAC,IAAAA,cACAC,IAAAA,OACAC,IAAAA,QACAC,IAAAA,WACAC,IAAAA,QACAC,IAAAA,kBACAC,IAAAA,eACAC,IAAAA,YAE4CC,EAAAA,EAAST,GAAYU,EAAAC,EAAAC,EAAA,GAA1DC,EAAcH,EAAA,GAAEI,EAAiBJ,EAAA,GACxCK,EAAoCN,GAAS,WAAA,OAC3CH,EACI,CACEU,eAAgBV,EAAkBW,UAClCC,cAAeZ,EAAkBa,YAAcb,EAAkBc,SAEnE,QACLC,EAAAV,EAAAI,EAAA,GAPMO,EAAUD,EAAA,GAAEE,EAAaF,EAAA,GAQMZ,EAAAA,EAAS,MAAKe,EAAAb,EAAAc,EAAA,GAA7CC,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GACUf,EAAA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,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,CAAsBzI"}
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","cAnnotationInputContentActions","Tooltip","title","placement","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":"yhCA+BA,IAAMA,EAAY,mBAEZC,EAAiCC,OAAOC,KAAKC,GA4C7CC,EAAkB,SAUlBC,GAAA,IAAAC,EAAAD,EATJE,YAAAA,aAAc,GAAED,EAChBE,IAAAA,cAAaC,EAAAJ,EACbK,OAAAA,aAASC,EAAgCF,EAAAG,EAAAP,EACzCQ,QAAAA,aAAUC,EAAiCF,EAAAG,EAAAV,EAC3CW,WAAAA,cAAkBD,EAClBE,IAAAA,QAAOC,EAAAb,EACPc,kBAAAA,aAAoB,KAAID,EACx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H,WAAY8H,EACZ1H,eAAgB2H,EAAOC,WACvB3H,YAAauH,IAAQI,WAErB/H,QAAS2H,IAAQI,YAGnB,IAAMrI,EAAmC,WAAe,EAClDG,EAAoC,WAAe,EAEzDmI,EAAeC,GAjPG,SAAAC,GAAK,MAAK,CAC1BC,WAAY,CACVlB,MAAOiB,EAAME,QAAQ/C,KAAK,KAC1BgD,WAAY,IACZC,MAAO,QAEThE,UAAW,CACTiE,WAAY,IAEdvB,UAAW,CACTwB,QAAS,OACTC,WAAY,SACZJ,WAAY,IACZpB,MAAOiB,EAAME,QAAQ/C,KAAK,KAC1BqD,YAAa,GACbC,SAAU,IAEZtB,WAAY,CACVuB,QAAS,GAEXzB,iBAAkB,CAChBkB,WAAY,IACZM,SAAU,IAEZrC,YAAa,CACXqC,SAAU,GACVJ,WAAY,OACZtB,MAAOiB,EAAME,QAAQ/C,KAAK,MAE5BK,eAAgB,CACdmD,WAAY,QAEf,GAiNcZ,CAAsB9I"}
@@ -1,15 +1,15 @@
1
- declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
1
+ declare const _default: import("react").ComponentType<Pick<Pick<{
2
2
  appId: any;
3
- appSettings: any;
3
+ appSettings?: {} | undefined;
4
4
  appTitle: any;
5
5
  assetCompanyId: any;
6
6
  assetId: any;
7
7
  classes: any;
8
8
  currentUser: any;
9
- dashboardType: any;
10
- isNative: any;
9
+ dashboardType?: null | undefined;
10
+ isNative?: boolean | undefined;
11
11
  onClose: any;
12
- }, never> & Pick<import("prop-types").InferProps<{
12
+ }, "appSettings" | "dashboardType" | "isNative"> & Pick<import("prop-types").InferProps<{
13
13
  appId: import("prop-types").Validator<number>;
14
14
  appTitle: import("prop-types").Validator<string>;
15
15
  assetId: import("prop-types").Validator<number>;
@@ -20,7 +20,7 @@ declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
20
20
  currentUser: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{}>>>;
21
21
  isNative: import("prop-types").Requireable<boolean>;
22
22
  dashboardType: import("prop-types").Requireable<string>;
23
- }>, "appSettings" | "dashboardType" | "isNative" | import("prop-types").RequiredKeys<{
23
+ }>, import("prop-types").RequiredKeys<{
24
24
  appId: import("prop-types").Validator<number>;
25
25
  appTitle: import("prop-types").Validator<string>;
26
26
  assetId: import("prop-types").Validator<number>;
@@ -31,21 +31,17 @@ declare const _default: import("react").ComponentType<Pick<Pick<Pick<{
31
31
  currentUser: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{}>>>;
32
32
  isNative: import("prop-types").Requireable<boolean>;
33
33
  dashboardType: import("prop-types").Requireable<string>;
34
- }>>, import("prop-types").RequiredKeys<{
35
- appId: import("prop-types").Validator<number>;
36
- appTitle: import("prop-types").Validator<string>;
37
- assetId: import("prop-types").Validator<number>;
38
- assetCompanyId: import("prop-types").Validator<number>;
39
- appSettings: import("prop-types").Requireable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>;
40
- classes: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<import("prop-types").ValidationMap<any>>>>;
41
- onClose: import("prop-types").Validator<(...args: any[]) => any>;
42
- currentUser: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{}>>>;
43
- isNative: import("prop-types").Requireable<boolean>;
44
- dashboardType: import("prop-types").Requireable<string>;
45
- }>> & {
46
- appSettings?: import("prop-types").InferProps<import("prop-types").ValidationMap<any>> | null | undefined;
47
- isNative?: boolean | null | undefined;
48
- dashboardType?: string | null | undefined;
49
- } & {}, "appId" | "appSettings" | "appTitle" | "assetCompanyId" | "assetId" | "currentUser" | "dashboardType" | "isNative" | "onClose"> & import("@material-ui/styles").StyledComponentProps<"annotateIcon" | "backIcon" | "noAnnotations" | "secondaryTitle" | "title">>;
34
+ }>> & Pick<{
35
+ appId: any;
36
+ appSettings?: {} | undefined;
37
+ appTitle: any;
38
+ assetCompanyId: any;
39
+ assetId: any;
40
+ classes: any;
41
+ currentUser: any;
42
+ dashboardType?: null | undefined;
43
+ isNative?: boolean | undefined;
44
+ onClose: any;
45
+ }, never>, "appId" | "appSettings" | "appTitle" | "assetCompanyId" | "assetId" | "currentUser" | "dashboardType" | "isNative" | "onClose"> & import("@material-ui/styles").StyledComponentProps<"annotateIcon" | "backIcon" | "noAnnotations" | "secondaryTitle" | "title">>;
50
46
  export default _default;
51
47
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/regenerator";import{memo as r,useRef as a,useState as i,useEffect as s}from"react";import{number as c,string as p,shape as d,func as m,bool as l}from"prop-types";import u from"classnames";import{withStyles as f}from"@material-ui/core/styles";import{RootRef as h,Paper as y,Typography as b,Tooltip as g,IconButton as A}from"@material-ui/core";import v from"@material-ui/icons/ChevronLeft";import{getAnnotations as I}from"../../../../clients/jsonApi/index.js";import{useAnnotationsState as C,useAnnotationsDispatch as T}from"../../AnnotationsContext.js";import{SET_ANNOTATIONS as N,APPEND_ANNOTATIONS as x}from"../../constants.js";import j from"./components/AddAnnotationForm/index.js";import L from"./components/Annotation/index.js";import k from"./style.css.js";import"../../../../utils/index.js";import{isNativeDetected as R}from"../../../../utils/mobileDetect.js";import _ from"../../../InfiniteList/index.js";import q from"../../../../effects/useOutsideClick.js";import{jsx as w,jsxs as S,Fragment as H}from"react/jsx-runtime";import{showSuccessNotification as U}from"../../../../utils/notificationToasts.js";var F="AppAnnotationsPo",O=function(r){var c,p=r.appId,d=r.appTitle,m=r.assetId,l=r.assetCompanyId,f=r.appSettings,R=r.currentUser,O=r.onClose,P=r.isNative,W=r.classes,B=r.dashboardType,D=C().annotations,E=T(),G=a(),M=a();q(G,O);var z=i(!1),J=n(z,2),K=J[0],Q=J[1],V=i(!0),X=n(V,2),Y=X[0],Z=X[1],$=i(!0),tt=n($,2),et=tt[0],nt=tt[1],ot=i(1),rt=n(ot,2),at=rt[0],it=rt[1];function st(){return(st=e(o.mark((function t(){var e,n,r;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(p&&m){t.next=2;break}return t.abrupt("return");case 2:return Z(!0),t.prev=3,n={page:at,per_page:4,sort:"created_at",order:"desc"},B&&(n.dashboard_type=B),t.next=8,I(p,m,n);case 8:e=t.sent,E({type:1===at?N:x,annotations:e}),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(3),console.error(t.t0);case 15:r=e&&e.data.length<4,it(at+1),nt(!r),Z(!1);case 19:case"end":return t.stop()}}),t,null,[[3,12]])})))).apply(this,arguments)}return s((function(){Q(!0)}),[]),w(h,{rootRef:G,children:S(y,{className:u(k.cAnnotationsList,(c={},t(c,k.cAnnotationsListOpen,K),t(c,k.cAnnotationsListOpenNative,P),c)),children:[w(_,{infiniteClassName:k.cAnnotationsListContentContainer,headerComponent:S(H,{children:[w(b,{"data-testid":"".concat(F,"_appTitle"),variant:"body1",className:W.title,children:d}),w("div",{className:k.cAnnotationsListContentTop,children:S(b,{"data-testid":"".concat(F,"_annotationsTitle"),variant:"caption",className:W.secondaryTitle,children:["Annotations (",D.data?D.data.length:0,")"]})}),w(j,{appId:p,assetId:m,assetCompanyId:l,appSettings:f,currentUser:R,dashboardType:B})]}),useWindow:P,items:D.data||[],showNoItemsFound:!(D.data&&0!==D.data.length||Y),noItemsFoundLabel:w(b,{variant:"body2","data-testid":"".concat(F,"_noAnnotations"),className:W.noAnnotations,children:"No Annotations yet"}),threshold:50,infiniteContainerHeight:G.current&&M.current?G.current.clientHeight-M.current.clientHeight:null,moreItemsMayExist:et,pathToCreatedAt:["attributes","created_at"],renderItem:function(t){return w(L,{isNative:P,annotation:t,assetCompanyId:l,included:D.included,currentUser:R,showSuccessNotification:U},t.id)},loadItems:function(){return st.apply(this,arguments)}}),w("div",{className:k.cAnnotationsListActions,ref:M,children:w(g,{title:"Hide",placement:"bottom",children:w(A,{"data-testid":"".concat(F,"_hideButton"),onClick:O,className:W.backIcon,children:w(v,{})})})})]})})};O.propTypes={appId:c.isRequired,appTitle:p.isRequired,assetId:c.isRequired,assetCompanyId:c.isRequired,appSettings:d(),classes:d().isRequired,onClose:m.isRequired,currentUser:d({}).isRequired,isNative:l,dashboardType:p},O.defaultProps={appSettings:{},isNative:R,dashboardType:null};var P=f((function(t){return{title:{fontWeight:200,marginBottom:20},secondaryTitle:{fontWeight:200,textTransform:"uppercase",color:t.palette.grey[600]},annotateIcon:{padding:0,"&:hover":{backgroundColor:"transparent",boxShadow:"none"}},noAnnotations:{marginTop:16},backIcon:{cursor:"pointer",color:t.palette.grey[600],padding:5}}}))(r(O));export{P as default};
1
+ import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/regenerator";import{memo as r,useRef as a,useState as i,useEffect as s}from"react";import{number as c,string as d,shape as p,func as m,bool as l}from"prop-types";import u from"classnames";import{withStyles as f}from"@material-ui/core/styles";import{RootRef as h,Paper as y,Typography as b,Tooltip as v,IconButton as g}from"@material-ui/core";import A from"@material-ui/icons/ChevronLeft";import{getAnnotations as I}from"../../../../clients/jsonApi/index.js";import{useAnnotationsState as C,useAnnotationsDispatch as T}from"../../AnnotationsContext.js";import{SET_ANNOTATIONS as x,APPEND_ANNOTATIONS as N}from"../../constants.js";import j from"./components/AddAnnotationForm/index.js";import L from"./components/Annotation/index.js";import k from"./style.css.js";import"../../../../utils/index.js";import{isNativeDetected as R}from"../../../../utils/mobileDetect.js";import _ from"../../../InfiniteList/index.js";import q from"../../../../effects/useOutsideClick.js";import{jsx as w,jsxs as S,Fragment as H}from"react/jsx-runtime";import{showSuccessNotification as U}from"../../../../utils/notificationToasts.js";var F="AppAnnotationsPo",O=function(r){var c,d=r.appId,p=r.appTitle,m=r.assetId,l=r.assetCompanyId,f=r.appSettings,R=void 0===f?W:f,O=r.currentUser,P=r.onClose,D=r.isNative,E=void 0===D?B:D,G=r.classes,M=r.dashboardType,z=void 0===M?null:M,J=C().annotations,K=T(),Q=a(),V=a();q(Q,P);var X=i(!1),Y=n(X,2),Z=Y[0],$=Y[1],tt=i(!0),et=n(tt,2),nt=et[0],ot=et[1],rt=i(!0),at=n(rt,2),it=at[0],st=at[1],ct=i(1),dt=n(ct,2),pt=dt[0],mt=dt[1];function lt(){return(lt=e(o.mark((function t(){var e,n,r;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d&&m){t.next=2;break}return t.abrupt("return");case 2:return ot(!0),t.prev=3,n={page:pt,per_page:4,sort:"created_at",order:"desc"},z&&(n.dashboard_type=z),t.next=8,I(d,m,n);case 8:e=t.sent,K({type:1===pt?x:N,annotations:e}),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(3),console.error(t.t0);case 15:r=e&&e.data.length<4,mt(pt+1),st(!r),ot(!1);case 19:case"end":return t.stop()}}),t,null,[[3,12]])})))).apply(this,arguments)}return s((function(){$(!0)}),[]),w(h,{rootRef:Q,children:S(y,{className:u(k.cAnnotationsList,(c={},t(c,k.cAnnotationsListOpen,Z),t(c,k.cAnnotationsListOpenNative,E),c)),children:[w(_,{infiniteClassName:k.cAnnotationsListContentContainer,headerComponent:S(H,{children:[w(b,{"data-testid":"".concat(F,"_appTitle"),variant:"body1",className:G.title,children:p}),w("div",{className:k.cAnnotationsListContentTop,children:S(b,{"data-testid":"".concat(F,"_annotationsTitle"),variant:"caption",className:G.secondaryTitle,children:["Annotations (",J.data?J.data.length:0,")"]})}),w(j,{appId:d,assetId:m,assetCompanyId:l,appSettings:R,currentUser:O,dashboardType:z})]}),useWindow:E,items:J.data||[],showNoItemsFound:!(J.data&&0!==J.data.length||nt),noItemsFoundLabel:w(b,{variant:"body2","data-testid":"".concat(F,"_noAnnotations"),className:G.noAnnotations,children:"No Annotations yet"}),threshold:50,infiniteContainerHeight:Q.current&&V.current?Q.current.clientHeight-V.current.clientHeight:null,moreItemsMayExist:it,pathToCreatedAt:["attributes","created_at"],renderItem:function(t){return w(L,{isNative:E,annotation:t,assetCompanyId:l,included:J.included,currentUser:O,showSuccessNotification:U},t.id)},loadItems:function(){return lt.apply(this,arguments)}}),w("div",{className:k.cAnnotationsListActions,ref:V,children:w(v,{title:"Hide",placement:"bottom",children:w(g,{"data-testid":"".concat(F,"_hideButton"),onClick:P,className:G.backIcon,children:w(A,{})})})})]})})};O.propTypes={appId:c.isRequired,appTitle:d.isRequired,assetId:c.isRequired,assetCompanyId:c.isRequired,appSettings:p(),classes:p().isRequired,onClose:m.isRequired,currentUser:p({}).isRequired,isNative:l,dashboardType:d};var W={},B=R,P=f((function(t){return{title:{fontWeight:200,marginBottom:20},secondaryTitle:{fontWeight:200,textTransform:"uppercase",color:t.palette.grey[600]},annotateIcon:{padding:0,"&:hover":{backgroundColor:"transparent",boxShadow:"none"}},noAnnotations:{marginTop:16},backIcon:{cursor:"pointer",color:t.palette.grey[600],padding:5}}}))(r(O));export{P as default};
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","_Fragment","Typography","concat","variant","title","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":"qxCAqBA,IAAMA,EAAY,mBAsBZC,EAAkB,SAWlBC,GAAA,IAAAC,EAVJC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,eACAC,IAAAA,Y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,IAC5BvB,SAAU,CAAEwB,OAAQ,UAAWR,MAAOJ,EAAMK,QAAQC,KAAK,KAAME,QAAS,GACzE,GA+KcT,CAAsBc,EAAK/I"}
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","_Fragment","Typography","concat","variant","title","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":"qxCAqBA,IAAMA,EAAY,mBAsBZC,EAAkB,SAWlBC,GAAA,IAAAC,EAVJC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,QACAC,IAAAA,eAAcC,EAAAN,EACdO,YAAAA,aAAcC,EAAqCF,EACnDG,IAAAA,YACAC,IAAAA,QAAOC,EAAAX,EACPY,SAAAA,aAAWC,EAAkCF,EAC7CG,IAAAA,QAAOC,EAAAf,EACPgB,cAAAA,aAAgB,KAAID,EAEZE,EAAgBC,IAAhBD,YACFE,EAAWC,IAEXC,EAAUC,IACVC,EAAYD,IAQlBE,EAAgBH,EAASX,GAEzB,IAA4Be,E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,GAAI,OACdlC,EAACmC,EAAU,CAETlG,SAAUA,EACVmG,WAAYF,EACZxG,eAAgBA,EAChB2G,SAAU/F,EAAY+F,SACtBvG,YAAaA,EACbwG,wBAAyBA,GANpBJ,EAAKK,GAQZ,EACFC,UAzG4B,WAEC,OAAAxE,GAAA4B,MAAAC,KAAAC,UAAA,IAyG/BE,EAAA,MAAA,CAAKK,UAAWE,EAAOkC,wBAAyBC,IAAK9F,EAAUsD,SAC7DF,EAAC2C,EAAO,CAACxB,MAAM,OAAOyB,UAAU,SAAQ1C,SACtCF,EAAC6C,EAAU,CACT,cAAA,GAAA5B,OAAgB9F,EAAuB,eACvC2H,QAAS/G,EACTsE,UAAWlE,EAAQ4G,SAAS7C,SAE5BF,EAACgD,EAAQ,cAOvB,EAEA5H,EAAgB6H,UAAY,CAC1B1H,MAAO2H,EAAOC,WACd3H,SAAU4H,EAAOD,WACjB1H,QAASyH,EAAOC,WAChBzH,eAAgBwH,EAAOC,WACvBvH,YAAayH,IACblH,QAASkH,IAAQF,WACjBpH,QAASuH,EAAKH,WACdrH,YAAauH,EAAM,CAAE,GAAEF,WACvBlH,SAAUsH,EACVlH,cAAe+G,GAGjB,IAAMvH,EAAwC,CAAA,EACxCK,EAAqCsH,EAE5BC,EAAAA,GA5LG,SAAAC,GAAK,MAAK,CAC1BvC,MAAO,CAAEwC,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,EAAKnJ"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/regenerator";import{memo as i,useMemo as a}from"react";import{number as n,shape as s,arrayOf as o,string as c,bool as m,func as u}from"prop-types";import d from"classnames";import{flowRight as l}from"lodash";import{withStyles as p}from"@material-ui/core/styles";import f,{isWidthUp as h}from"@material-ui/core/withWidth";import v from"@material-ui/core/Paper";import b from"@material-ui/core/Typography";import y from"@material-ui/icons/Comment";import N from"@material-ui/icons/Close";import{closeLastAnnotation as A}from"../../../../clients/jsonApi/index.js";import R from"./style.css.js";import g from"../../../UserCardPopover.js";import{AvatarComponent as x}from"../../../Avatar/index.js";import{formatMentionText as q}from"../../../UserMention/utils/index.js";import{isNativeDetected as _}from"../../../../utils/mobileDetect.js";import{jsxs as U,jsx as C}from"react/jsx-runtime";var j="lastAnnotation",L=function(e){var t=e.user,r=e.currentUser,i=e.isNative,a=e.className,n=e.size,s=C(x,{displayName:"".concat(t.first_name," ").concat(t.last_name),imgSrc:t.profile_photo,size:n,className:a});return i?s:C(g,{user:t,currentUser:r,children:s})},T=function(e){var r=e.commentsCount,i=e.commentUsers,a=e.isSmallScreen,n=e.isNative,s=e.currentUser,o=e.classes;return r?U("div",{className:R.cTopAnnotationAdditionalReactions,children:[C(y,{className:o.commentIcon}),!a&&U(b,{variant:"body2","data-testid":"".concat(j,"_comments"),noWrap:!0,className:o.commentText,component:"div",children:["Comments ",r]}),C("div",{className:R.cTopAnnotationAdditionalReactionsList,children:i.map((function(e,r){var i=e.attributes;return C(L,{user:i,currentUser:s,isNative:n,className:d(o.avatar,t({},o.avatarInList,0!==r)),size:25},i.id)}))})]}):null},w=function(t){var i,n=t.isNative,s=t.appId,o=t.annotation,c=t.openAnnotationsList,m=t.currentUser,u=t.updateCurrentDashboardAppLastAnnotation,d=t.width,l=t.classes,p=o.data,f=o.included,y=f.find((function(e){var t=e.id,r=e.type;return t===p.relationships.user.data.id&&"user"===r})),g=a((function(){return p.relationships.mentioned_users.data.map((function(e){var t=e.id;return f.find((function(e){return e.id===t}))}))}),[p.relationships.mentioned_users.data,f]),x=a((function(){return p.relationships.comment_users.data.map((function(e){var t=e.id;return f.find((function(e){return e.id===t}))}))}),[p.relationships.comment_users.data,f]),_=!h("sm",d),w=(i=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),e.prev=1,e.next=4,A(p.id);case 4:i=e.sent,u(p.id,s,i),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 i.apply(this,arguments)});return U(v,{"data-testid":"".concat(j,"_lastAnnotation"),className:l.container,onClick:c,children:[U("div",{className:R.cTopAnnotationMain,children:[C(L,{user:y.attributes,currentUser:m,isNative:n,className:l.avatar,size:38}),C(b,{variant:"body2","data-testid":"".concat(j,"_message"),noWrap:!0,className:l.body,children:q(p.attributes.body,g,n,null,m)})]}),U("div",{className:R.cTopAnnotationAdditional,children:[C(T,{commentsCount:p.attributes.comments_count,commentUsers:x,classes:l,isSmallScreen:_,currentUser:m}),C(N,{"data-testid":"".concat(j,"_closeButton"),fontSize:"small",className:l.closeButton,onClick:w})]})]})};w.propTypes={appId:n.isRequired,annotation:s({included:o(s({})).isRequired,data:s({relationships:s({user:s({data:s({id:c.isRequired}).isRequired}).isRequired,mentioned_users:s({data:o(s()).isRequired}).isRequired}).isRequired,attributes:s({body:c.isRequired,created_at:c.isRequired})}).isRequired}).isRequired,classes:s({}).isRequired,isNative:m,width:c.isRequired,openAnnotationsList:u.isRequired,updateCurrentDashboardAppLastAnnotation:u,currentUser:s({})},w.defaultProps={isNative:_,updateCurrentDashboardAppLastAnnotation:function(){},currentUser:{}};var I=l([p((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}}})),f()])(i(w));export{I as default};
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/regenerator";import{memo as i,useMemo as n}from"react";import{number as a,shape as o,arrayOf as s,string as c,bool as m,func as d}from"prop-types";import u from"classnames";import{flowRight as l}from"lodash";import{withStyles as p}from"@material-ui/core/styles";import f,{isWidthUp as v}from"@material-ui/core/withWidth";import h from"@material-ui/core/Paper";import b from"@material-ui/core/Typography";import y from"@material-ui/icons/Comment";import N from"@material-ui/icons/Close";import{closeLastAnnotation as R}from"../../../../clients/jsonApi/index.js";import g from"./style.css.js";import A from"../../../UserCardPopover.js";import{AvatarComponent as x}from"../../../Avatar/index.js";import{formatMentionText as q}from"../../../UserMention/utils/index.js";import{isNativeDetected as _}from"../../../../utils/mobileDetect.js";import{jsxs as U,jsx as C}from"react/jsx-runtime";var j="lastAnnotation",T=function(e){var t=e.user,r=e.currentUser,i=e.isNative,n=e.className,a=e.size,o=C(x,{displayName:"".concat(t.first_name," ").concat(t.last_name),imgSrc:t.profile_photo,size:a,className:n});return i?o:C(A,{user:t,currentUser:r,children:o})},L=function(e){var r=e.commentsCount,i=e.commentUsers,n=e.isSmallScreen,a=e.isNative,o=e.currentUser,s=e.classes;return r?U("div",{className:g.cTopAnnotationAdditionalReactions,children:[C(y,{className:s.commentIcon}),!n&&U(b,{variant:"body2","data-testid":"".concat(j,"_comments"),noWrap:!0,className:s.commentText,component:"div",children:["Comments ",r]}),C("div",{className:g.cTopAnnotationAdditionalReactionsList,children:i.map((function(e,r){var i=e.attributes;return C(T,{user:i,currentUser:o,isNative:a,className:u(s.avatar,t({},s.avatarInList,0!==r)),size:25},i.id)}))})]}):null},w=function(t){var i,a=t.isNative,o=void 0===a?I:a,s=t.appId,c=t.annotation,m=t.openAnnotationsList,d=t.currentUser,u=void 0===d?z:d,l=t.updateCurrentDashboardAppLastAnnotation,p=void 0===l?S:l,f=t.width,y=t.classes,A=c.data,x=c.included,_=x.find((function(e){var t=e.id,r=e.type;return t===A.relationships.user.data.id&&"user"===r})),w=n((function(){return A.relationships.mentioned_users.data.map((function(e){var t=e.id;return x.find((function(e){return e.id===t}))}))}),[A.relationships.mentioned_users.data,x]),k=n((function(){return A.relationships.comment_users.data.map((function(e){var t=e.id;return x.find((function(e){return e.id===t}))}))}),[A.relationships.comment_users.data,x]),P=!v("sm",f),W=(i=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),e.prev=1,e.next=4,R(A.id);case 4:i=e.sent,p(A.id,s,i),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 i.apply(this,arguments)});return U(h,{"data-testid":"".concat(j,"_lastAnnotation"),className:y.container,onClick:m,children:[U("div",{className:g.cTopAnnotationMain,children:[C(T,{user:_.attributes,currentUser:u,isNative:o,className:y.avatar,size:38}),C(b,{variant:"body2","data-testid":"".concat(j,"_message"),noWrap:!0,className:y.body,children:q(A.attributes.body,w,o,null,u)})]}),U("div",{className:g.cTopAnnotationAdditional,children:[C(L,{commentsCount:A.attributes.comments_count,commentUsers:k,classes:y,isSmallScreen:P,currentUser:u}),C(N,{"data-testid":"".concat(j,"_closeButton"),fontSize:"small",className:y.closeButton,onClick:W})]})]})};w.propTypes={appId:a.isRequired,annotation:o({included:s(o({})).isRequired,data:o({relationships:o({user:o({data:o({id:c.isRequired}).isRequired}).isRequired,mentioned_users:o({data:s(o()).isRequired}).isRequired}).isRequired,attributes:o({body:c.isRequired,created_at:c.isRequired})}).isRequired}).isRequired,classes:o({}).isRequired,isNative:m,width:c.isRequired,openAnnotationsList:d.isRequired,updateCurrentDashboardAppLastAnnotation:d,currentUser:o({})};var I=_,S=function(){},z={},k=l([p((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}}})),f()])(i(w));export{k as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/Annotations/components/LastAnnotation/index.js"],"sourcesContent":["import { memo, useMemo } from 'react';\nimport { shape, string, bool, arrayOf, func, number } from 'prop-types';\nimport classNames from 'classnames';\nimport { flowRight } from 'lodash';\nimport { withStyles } from '@material-ui/core/styles';\nimport withWidth, { isWidthUp } from '@material-ui/core/withWidth';\nimport Paper from '@material-ui/core/Paper';\nimport Typography from '@material-ui/core/Typography';\nimport CommentIcon from '@material-ui/icons/Comment';\nimport CloseButton from '@material-ui/icons/Close';\n\nimport { closeLastAnnotation } from '../../../../clients/jsonApi';\n\nimport styles from './style.css';\n\nimport UserCardPopover from '~/components/UserCardPopover';\nimport Avatar from '~/components/Avatar';\nimport { formatMentionText } from '~/components/UserMention/utils';\nimport { isNativeDetected } from '~/utils/mobileDetect';\n\nconst PAGE_NAME = 'lastAnnotation';\n\nconst muiStyles = theme => ({\n container: {\n height: 56,\n margin: '10px 0',\n padding: '0 20px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flex: 'auto 1',\n width: '100%',\n cursor: 'pointer',\n },\n body: { margin: '0 16px ', minWidth: 100 },\n avatar: { border: '1px solid #909090' },\n commentIcon: { marginRight: 16, color: theme.palette.grey[500] },\n commentText: { marginRight: 16, color: theme.palette.grey[500] },\n closeButton: { color: theme.palette.grey[500] },\n avatarInList: { marginLeft: -4 },\n});\n\n/* eslint-disable react/prop-types */\nconst CreatorAvatar = ({ user, currentUser, isNative, className, size }) => {\n const children = (\n <Avatar\n displayName={`${user.first_name} ${user.last_name}`}\n imgSrc={user.profile_photo}\n size={size}\n className={className}\n />\n );\n\n if (isNative) return children;\n return (\n <UserCardPopover user={user} currentUser={currentUser}>\n {children}\n </UserCardPopover>\n );\n};\n\nconst Reactions = ({\n commentsCount,\n commentUsers,\n isSmallScreen,\n isNative,\n currentUser,\n classes,\n}) => {\n if (!commentsCount) return null;\n\n return (\n <div className={styles.cTopAnnotationAdditionalReactions}>\n <CommentIcon className={classes.commentIcon} />\n {!isSmallScreen && (\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_comments`}\n noWrap\n className={classes.commentText}\n component=\"div\"\n >\n Comments {commentsCount}\n </Typography>\n )}\n\n <div className={styles.cTopAnnotationAdditionalReactionsList}>\n {commentUsers.map(({ attributes }, index) => (\n <CreatorAvatar\n key={attributes.id}\n user={attributes}\n currentUser={currentUser}\n isNative={isNative}\n className={classNames(classes.avatar, { [classes.avatarInList]: index !== 0 })}\n size={25}\n />\n ))}\n </div>\n </div>\n );\n};\n/* eslint-enable */\n\nconst LastAnnotation = ({\n isNative,\n appId,\n annotation,\n openAnnotationsList,\n currentUser,\n updateCurrentDashboardAppLastAnnotation: updateLastAnnotation,\n width,\n classes,\n}) => {\n const { data, included } = annotation;\n const creator = included.find(\n ({ id, type }) => id === data.relationships.user.data.id && type === 'user'\n );\n\n const mentionedUsers = useMemo(\n () =>\n data.relationships.mentioned_users.data.map(({ id: mentionedUserId }) =>\n included.find(({ id }) => id === mentionedUserId)\n ),\n [data.relationships.mentioned_users.data, included]\n );\n\n const commentUsers = useMemo(\n () =>\n data.relationships.comment_users.data.map(({ id: commentUserId }) =>\n included.find(({ id }) => id === commentUserId)\n ),\n [data.relationships.comment_users.data, included]\n );\n\n const isSmallScreen = !isWidthUp('sm', width);\n\n const handleCloseClick = async e => {\n e.stopPropagation();\n\n try {\n const response = await closeLastAnnotation(data.id);\n updateLastAnnotation(data.id, appId, response);\n } catch (error) {\n console.error(error);\n }\n };\n\n return (\n <Paper\n data-testid={`${PAGE_NAME}_lastAnnotation`}\n className={classes.container}\n onClick={openAnnotationsList}\n >\n <div className={styles.cTopAnnotationMain}>\n <CreatorAvatar\n user={creator.attributes}\n currentUser={currentUser}\n isNative={isNative}\n className={classes.avatar}\n size={38}\n />\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_message`}\n noWrap\n className={classes.body}\n >\n {formatMentionText(data.attributes.body, mentionedUsers, isNative, null, currentUser)}\n </Typography>\n </div>\n <div className={styles.cTopAnnotationAdditional}>\n <Reactions\n commentsCount={data.attributes.comments_count}\n commentUsers={commentUsers}\n classes={classes}\n isSmallScreen={isSmallScreen}\n currentUser={currentUser}\n />\n <CloseButton\n data-testid={`${PAGE_NAME}_closeButton`}\n fontSize=\"small\"\n className={classes.closeButton}\n onClick={handleCloseClick}\n />\n </div>\n </Paper>\n );\n};\n\nLastAnnotation.propTypes = {\n appId: number.isRequired,\n annotation: shape({\n included: arrayOf(shape({})).isRequired,\n data: 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 }).isRequired,\n classes: shape({}).isRequired,\n isNative: bool,\n width: string.isRequired,\n openAnnotationsList: func.isRequired,\n updateCurrentDashboardAppLastAnnotation: func,\n currentUser: shape({}),\n};\n\nLastAnnotation.defaultProps = {\n isNative: isNativeDetected,\n updateCurrentDashboardAppLastAnnotation: () => undefined,\n currentUser: {},\n};\n\nexport default flowRight([withStyles(muiStyles), withWidth()])(memo(LastAnnotation));\n"],"names":["PAGE_NAME","CreatorAvatar","_ref","user","currentUser","isNative","className","size","children","_jsx","Avatar","displayName","concat","first_name","last_name","imgSrc","profile_photo","UserCardPopover","Reactions","_ref2","commentsCount","commentUsers","isSmallScreen","classes","_jsxs","styles","cTopAnnotationAdditionalReactions","CommentIcon","commentIcon","Typography","variant","noWrap","commentText","component","cTopAnnotationAdditionalReactionsList","map","index","attributes","classNames","avatar","_defineProperty","avatarInList","id","LastAnnotation","_ref4","_ref10","appId","annotation","openAnnotationsList","updateLastAnnotation","updateCurrentDashboardAppLastAnnotation","width","data","included","creator","find","_ref5","type","relationships","mentionedUsers","useMemo","mentioned_users","_ref6","mentionedUserId","_ref7","comment_users","_ref8","commentUserId","_ref9","isWidthUp","handleCloseClick","_asyncToGenerator","_regeneratorRuntime","mark","e","response","wrap","_context","prev","next","stopPropagation","closeLastAnnotation","sent","t0","console","error","stop","_callee","_x","apply","this","arguments","Paper","container","onClick","cTopAnnotationMain","body","formatMentionText","cTopAnnotationAdditional","comments_count","CloseButton","fontSize","closeButton","propTypes","number","isRequired","shape","arrayOf","string","created_at","bool","func","defaultProps","isNativeDetected","LastAnnotation$1","flowRight","withStyles","theme","height","margin","padding","display","alignItems","justifyContent","flex","cursor","minWidth","border","marginRight","color","palette","grey","marginLeft","withWidth","memo"],"mappings":"6/BAoBA,IAAMA,EAAY,iBAuBZC,EAAgB,SAAsDC,GAAA,IAAnDC,IAAAA,KAAMC,IAAAA,YAAaC,IAAAA,SAAUC,IAAAA,UAAWC,IAAAA,KACzDC,EACJC,EAACC,EAAM,CACLC,YAAW,GAAAC,OAAKT,EAAKU,uBAAcV,EAAKW,WACxCC,OAAQZ,EAAKa,cACbT,KAAMA,EACND,UAAWA,IAIf,OAAID,EAAiBG,EAEnBC,EAACQ,EAAe,CAACd,KAAMA,EAAMC,YAAaA,EAAYI,SACnDA,GAGP,EAEMU,EAAY,SAOZC,GAAA,IANJC,IAAAA,cACAC,IAAAA,aACAC,IAAAA,cACAjB,IAAAA,SACAD,IAAAA,YACAmB,IAAAA,QAEA,OAAKH,EAGHI,EAAA,MAAA,CAAKlB,UAAWmB,EAAOC,kCAAkClB,SAAA,CACvDC,EAACkB,EAAW,CAACrB,UAAWiB,EAAQK,eAC9BN,GACAE,EAACK,EAAU,CACTC,QAAQ,QACR,cAAA,GAAAlB,OAAgBZ,EAAqB,aACrC+B,QAA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,QAASxB,SAKnB,EAEA3B,EAAe4D,UAAY,CACzBzD,MAAO0D,EAAOC,WACd1D,WAAY2D,EAAM,CAChBrD,SAAUsD,EAAQD,EAAM,CAAE,IAAGD,WAC7BrD,KAAMsD,EAAM,CACVhD,cAAegD,EAAM,CACnBvG,KAAMuG,EAAM,CAAEtD,KAAMsD,EAAM,CAAEhE,GAAIkE,EAAOH,aAAcA,aAAcA,WACnE5C,gBAAiB6C,EAAM,CAAEtD,KAAMuD,EAAQD,KAASD,aAAcA,aAC7DA,WACHpE,WAAYqE,EAAM,CAAEV,KAAMY,EAAOH,WAAYI,WAAYD,EAAOH,eAC/DA,aACFA,WACHlF,QAASmF,EAAM,CAAE,GAAED,WACnBpG,SAAUyG,EACV3D,MAAOyD,EAAOH,WACdzD,oBAAqB+D,EAAKN,WAC1BvD,wCAAyC6D,EACzC3G,YAAasG,EAAM,KAGrB/D,EAAeqE,aAAe,CAC5B3G,SAAU4G,EACV/D,wCAAyC,WAAe,EACxD9C,YAAa,CAAC,GAGhB,IAAA8G,EAAeC,EAAU,CAACC,GAjMR,SAAAC,GAAK,MAAK,CAC1BxB,UAAW,CACTyB,OAAQ,GACRC,OAAQ,SACRC,QAAS,SACTC,QAAS,OACTC,WAAY,SACZC,eAAgB,gBAChBC,KAAM,SACNzE,MAAO,OACP0E,OAAQ,WAEV7B,KAAM,CAAEuB,OAAQ,UAAWO,SAAU,KACrCvF,OAAQ,CAAEwF,OAAQ,qBAClBnG,YAAa,CAAEoG,YAAa,GAAIC,MAAOZ,EAAMa,QAAQC,KAAK,MAC1DnG,YAAa,CAAEgG,YAAa,GAAIC,MAAOZ,EAAMa,QAAQC,KAAK,MAC1D7B,YAAa,CAAE2B,MAAOZ,EAAMa,QAAQC,KAAK,MACzC1F,aAAc,CAAE2F,YAAa,GAC9B,IA+KgDC,KAAlClB,CAAgDmB,EAAK3F"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/Annotations/components/LastAnnotation/index.js"],"sourcesContent":["import { memo, useMemo } from 'react';\nimport { shape, string, bool, arrayOf, func, number } from 'prop-types';\nimport classNames from 'classnames';\nimport { flowRight } from 'lodash';\nimport { withStyles } from '@material-ui/core/styles';\nimport withWidth, { isWidthUp } from '@material-ui/core/withWidth';\nimport Paper from '@material-ui/core/Paper';\nimport Typography from '@material-ui/core/Typography';\nimport CommentIcon from '@material-ui/icons/Comment';\nimport CloseButton from '@material-ui/icons/Close';\n\nimport { closeLastAnnotation } from '../../../../clients/jsonApi';\n\nimport styles from './style.css';\n\nimport UserCardPopover from '~/components/UserCardPopover';\nimport Avatar from '~/components/Avatar';\nimport { formatMentionText } from '~/components/UserMention/utils';\nimport { isNativeDetected } from '~/utils/mobileDetect';\n\nconst PAGE_NAME = 'lastAnnotation';\n\nconst muiStyles = theme => ({\n container: {\n height: 56,\n margin: '10px 0',\n padding: '0 20px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flex: 'auto 1',\n width: '100%',\n cursor: 'pointer',\n },\n body: { margin: '0 16px ', minWidth: 100 },\n avatar: { border: '1px solid #909090' },\n commentIcon: { marginRight: 16, color: theme.palette.grey[500] },\n commentText: { marginRight: 16, color: theme.palette.grey[500] },\n closeButton: { color: theme.palette.grey[500] },\n avatarInList: { marginLeft: -4 },\n});\n\n/* eslint-disable react/prop-types */\nconst CreatorAvatar = ({ user, currentUser, isNative, className, size }) => {\n const children = (\n <Avatar\n displayName={`${user.first_name} ${user.last_name}`}\n imgSrc={user.profile_photo}\n size={size}\n className={className}\n />\n );\n\n if (isNative) return children;\n return (\n <UserCardPopover user={user} currentUser={currentUser}>\n {children}\n </UserCardPopover>\n );\n};\n\nconst Reactions = ({\n commentsCount,\n commentUsers,\n isSmallScreen,\n isNative,\n currentUser,\n classes,\n}) => {\n if (!commentsCount) return null;\n\n return (\n <div className={styles.cTopAnnotationAdditionalReactions}>\n <CommentIcon className={classes.commentIcon} />\n {!isSmallScreen && (\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_comments`}\n noWrap\n className={classes.commentText}\n component=\"div\"\n >\n Comments {commentsCount}\n </Typography>\n )}\n\n <div className={styles.cTopAnnotationAdditionalReactionsList}>\n {commentUsers.map(({ attributes }, index) => (\n <CreatorAvatar\n key={attributes.id}\n user={attributes}\n currentUser={currentUser}\n isNative={isNative}\n className={classNames(classes.avatar, { [classes.avatarInList]: index !== 0 })}\n size={25}\n />\n ))}\n </div>\n </div>\n );\n};\n/* eslint-enable */\n\nconst LastAnnotation = ({\n isNative = DEFAULT_LAST_ANNOTATION_IS_NATIVE,\n appId,\n annotation,\n openAnnotationsList,\n currentUser = DEFAULT_LAST_ANNOTATION_CURRENT_USER,\n updateCurrentDashboardAppLastAnnotation:\n updateLastAnnotation = DEFAULT_LAST_ANNOTATION_UPDATE_CURRENT_DASHBOARD_APP_LAST_ANNOTATION,\n width,\n classes,\n}) => {\n const { data, included } = annotation;\n const creator = included.find(\n ({ id, type }) => id === data.relationships.user.data.id && type === 'user'\n );\n\n const mentionedUsers = useMemo(\n () =>\n data.relationships.mentioned_users.data.map(({ id: mentionedUserId }) =>\n included.find(({ id }) => id === mentionedUserId)\n ),\n [data.relationships.mentioned_users.data, included]\n );\n\n const commentUsers = useMemo(\n () =>\n data.relationships.comment_users.data.map(({ id: commentUserId }) =>\n included.find(({ id }) => id === commentUserId)\n ),\n [data.relationships.comment_users.data, included]\n );\n\n const isSmallScreen = !isWidthUp('sm', width);\n\n const handleCloseClick = async e => {\n e.stopPropagation();\n\n try {\n const response = await closeLastAnnotation(data.id);\n updateLastAnnotation(data.id, appId, response);\n } catch (error) {\n console.error(error);\n }\n };\n\n return (\n <Paper\n data-testid={`${PAGE_NAME}_lastAnnotation`}\n className={classes.container}\n onClick={openAnnotationsList}\n >\n <div className={styles.cTopAnnotationMain}>\n <CreatorAvatar\n user={creator.attributes}\n currentUser={currentUser}\n isNative={isNative}\n className={classes.avatar}\n size={38}\n />\n <Typography\n variant=\"body2\"\n data-testid={`${PAGE_NAME}_message`}\n noWrap\n className={classes.body}\n >\n {formatMentionText(data.attributes.body, mentionedUsers, isNative, null, currentUser)}\n </Typography>\n </div>\n <div className={styles.cTopAnnotationAdditional}>\n <Reactions\n commentsCount={data.attributes.comments_count}\n commentUsers={commentUsers}\n classes={classes}\n isSmallScreen={isSmallScreen}\n currentUser={currentUser}\n />\n <CloseButton\n data-testid={`${PAGE_NAME}_closeButton`}\n fontSize=\"small\"\n className={classes.closeButton}\n onClick={handleCloseClick}\n />\n </div>\n </Paper>\n );\n};\n\nLastAnnotation.propTypes = {\n appId: number.isRequired,\n annotation: shape({\n included: arrayOf(shape({})).isRequired,\n data: 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 }).isRequired,\n classes: shape({}).isRequired,\n isNative: bool,\n width: string.isRequired,\n openAnnotationsList: func.isRequired,\n updateCurrentDashboardAppLastAnnotation: func,\n currentUser: shape({}),\n};\n\nconst DEFAULT_LAST_ANNOTATION_IS_NATIVE = isNativeDetected;\nconst DEFAULT_LAST_ANNOTATION_UPDATE_CURRENT_DASHBOARD_APP_LAST_ANNOTATION = () => undefined;\nconst DEFAULT_LAST_ANNOTATION_CURRENT_USER = {};\n\nexport default flowRight([withStyles(muiStyles), withWidth()])(memo(LastAnnotation));\n"],"names":["PAGE_NAME","CreatorAvatar","_ref","user","currentUser","isNative","className","size","children","_jsx","Avatar","displayName","concat","first_name","last_name","imgSrc","profile_photo","UserCardPopover","Reactions","_ref2","commentsCount","commentUsers","isSmallScreen","classes","_jsxs","styles","cTopAnnotationAdditionalReactions","CommentIcon","commentIcon","Typography","variant","noWrap","commentText","component","cTopAnnotationAdditionalReactionsList","map","index","attributes","classNames","avatar","_defineProperty","avatarInList","id","LastAnnotation","_ref4","_ref10","_ref4$isNative","DEFAULT_LAST_ANNOTATION_IS_NATIVE","appId","annotation","openAnnotationsList","_ref4$currentUser","DEFAULT_LAST_ANNOTATION_CURRENT_USER","_ref4$updateCurrentDa","updateCurrentDashboardAppLastAnnotation","updateLastAnnotation","DEFAULT_LAST_ANNOTATION_UPDATE_CURRENT_DASHBOARD_APP_LAST_ANNOTATION","width","data","included","creator","find","_ref5","type","relationships","mentionedUsers","useMemo","mentioned_users","_ref6","mentionedUserId","_ref7","comment_users","_ref8","commentUserId","_ref9","isWidthUp","handleCloseClick","_asyncToGenerator","_regeneratorRuntime","mark","e","response","wrap","_context","prev","next","stopPropagation","closeLastAnnotation","sent","t0","console","error","stop","_callee","_x","apply","this","arguments","Paper","container","onClick","cTopAnnotationMain","body","formatMentionText","cTopAnnotationAdditional","comments_count","CloseButton","fontSize","closeButton","propTypes","number","isRequired","shape","arrayOf","string","created_at","bool","func","isNativeDetected","LastAnnotation$1","flowRight","withStyles","theme","height","margin","padding","display","alignItems","justifyContent","flex","cursor","minWidth","border","marginRight","color","palette","grey","marginLeft","withWidth","memo"],"mappings":"6/BAoBA,IAAMA,EAAY,iBAuBZC,EAAgB,SAAsDC,GAAA,IAAnDC,IAAAA,KAAMC,IAAAA,YAAaC,IAAAA,SAAUC,IAAAA,UAAWC,IAAAA,KACzDC,EACJC,EAACC,EAAM,CACLC,YAAW,GAAAC,OAAKT,EAAKU,uBAAcV,EAAKW,WACxCC,OAAQZ,EAAKa,cACbT,KAAMA,EACND,UAAWA,IAIf,OAAID,EAAiBG,EAEnBC,EAACQ,EAAe,CAACd,KAAMA,EAAMC,YAAaA,EAAYI,SACnDA,GAGP,EAEMU,EAAY,SAOZC,GAAA,IANJC,IAAAA,cACAC,IAAAA,aACAC,IAAAA,cACAjB,IAAAA,SACAD,IAAAA,YACAmB,IAAAA,QAEA,OAAKH,EAGHI,EAAA,MAAA,CAAKlB,UAAWmB,EAAOC,kCAAkClB,SAAA,CACvDC,EAACkB,EAAW,CAACrB,UAAWiB,EAAQK,eAC9BN,GACAE,EAACK,EAAU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