@finsemble/finsemble-ui 6.1.4 → 6.3.0-beta.20211008

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 (814) hide show
  1. package/package.json +26 -22
  2. package/react/actions/smartDesktopDesignerActions.d.ts +7 -7
  3. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  4. package/react/actions/toolbarActions.d.ts +2 -3
  5. package/react/actions/toolbarActions.js.map +1 -1
  6. package/react/assets/css/defaultTheme.css +1 -1
  7. package/react/assets/css/notificationsCenter.css +5 -2
  8. package/react/assets/css/userPreferences.css +5 -2
  9. package/react/assets/css/windowTitleBar.css +34 -1
  10. package/react/assets/icons/check-square.svg +6 -0
  11. package/react/assets/icons/lock.svg +6 -0
  12. package/react/components/FinsembleProvider.js +1 -1
  13. package/react/components/FinsembleProvider.js.map +1 -1
  14. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  15. package/react/components/appCatalog/components/AppList.d.ts +7 -1
  16. package/react/components/appCatalog/components/AppList.js +1 -1
  17. package/react/components/appCatalog/components/AppList.js.map +1 -1
  18. package/react/components/appCatalog/components/AppResults.d.ts +10 -8
  19. package/react/components/appCatalog/components/AppResults.js +1 -1
  20. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  21. package/react/components/appCatalog/components/Carousel.js +1 -1
  22. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  23. package/react/components/appCatalog/components/EmptyResults.d.ts +2 -1
  24. package/react/components/appCatalog/components/EmptyResults.js +2 -4
  25. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  26. package/react/components/appCatalog/components/Hero.d.ts +24 -4
  27. package/react/components/appCatalog/components/Hero.js +2 -1
  28. package/react/components/appCatalog/components/Hero.js.map +1 -1
  29. package/react/components/appCatalog/components/Home.d.ts +18 -4
  30. package/react/components/appCatalog/components/Home.js.map +1 -1
  31. package/react/components/appCatalog/components/SearchBar.d.ts +20 -7
  32. package/react/components/appCatalog/components/SearchBar.js +4 -7
  33. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  34. package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -3
  35. package/react/components/appCatalog/components/Showcase/AppDescription.js +4 -6
  36. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  37. package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +5 -4
  38. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  39. package/react/components/appCatalog/components/Showcase/AppShowcase.js +1 -1
  40. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  41. package/react/components/appCatalog/components/Showcase/Header.d.ts +13 -5
  42. package/react/components/appCatalog/components/Showcase/Header.js +2 -2
  43. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  44. package/react/components/appCatalog/components/Showcase/Modal.d.ts +7 -4
  45. package/react/components/appCatalog/components/Showcase/Modal.js +6 -6
  46. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  47. package/react/components/appCatalog/components/Showcase/defaults.d.ts +3 -3
  48. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  49. package/react/components/appCatalog/components/Tag.d.ts +6 -4
  50. package/react/components/appCatalog/components/Tag.js.map +1 -1
  51. package/react/components/appCatalog/components/Toast.d.ts +5 -3
  52. package/react/components/appCatalog/components/Toast.js +5 -4
  53. package/react/components/appCatalog/components/Toast.js.map +1 -1
  54. package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -1
  55. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  56. package/react/components/appCatalog/modules/FDC3.d.ts +12 -11
  57. package/react/components/appCatalog/modules/FDC3.js +20 -18
  58. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  59. package/react/components/appCatalog/stores/appStore.d.ts +9 -2
  60. package/react/components/appCatalog/stores/appStore.js +10 -4
  61. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  62. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  63. package/react/components/common/Button.d.ts +5 -4
  64. package/react/components/common/Button.js +2 -2
  65. package/react/components/common/Button.js.map +1 -1
  66. package/react/components/common/ButtonIcon.js +1 -1
  67. package/react/components/common/ButtonIcon.js.map +1 -1
  68. package/react/components/common/ButtonRow.d.ts +15 -0
  69. package/react/components/common/ButtonRow.js +32 -0
  70. package/react/components/common/ButtonRow.js.map +1 -0
  71. package/react/components/common/Checkbox.d.ts +8 -0
  72. package/react/components/common/Checkbox.js +22 -0
  73. package/react/components/common/Checkbox.js.map +1 -0
  74. package/react/components/common/ColorPicker.js +1 -1
  75. package/react/components/common/ColorPicker.js.map +1 -1
  76. package/react/components/common/DropZone.d.ts +0 -5
  77. package/react/components/common/DropZone.js.map +1 -1
  78. package/react/components/common/DropdownButton.js +1 -1
  79. package/react/components/common/DropdownButton.js.map +1 -1
  80. package/react/components/common/FileInput.d.ts +0 -5
  81. package/react/components/common/FileInput.js +7 -9
  82. package/react/components/common/FileInput.js.map +1 -1
  83. package/react/components/common/FinsembleIcon.d.ts +2 -2
  84. package/react/components/common/FinsembleIcon.js +4 -0
  85. package/react/components/common/FinsembleIcon.js.map +1 -1
  86. package/react/components/common/FinsembleSelect.d.ts +3 -2
  87. package/react/components/common/FinsembleSelect.js +3 -6
  88. package/react/components/common/FinsembleSelect.js.map +1 -1
  89. package/react/components/common/FinsembleToggle.js +2 -2
  90. package/react/components/common/FinsembleToggle.js.map +1 -1
  91. package/react/components/common/FontSizeSelector.js +2 -2
  92. package/react/components/common/FontSizeSelector.js.map +1 -1
  93. package/react/components/common/ImagePreview.js +2 -2
  94. package/react/components/common/ImagePreview.js.map +1 -1
  95. package/react/components/common/Tab.js +2 -1
  96. package/react/components/common/Tab.js.map +1 -1
  97. package/react/components/common/Tooltip.d.ts +4 -3
  98. package/react/components/common/Tooltip.js +3 -3
  99. package/react/components/common/Tooltip.js.map +1 -1
  100. package/react/components/common/css/tooltip.css +10 -0
  101. package/react/components/common/file_helpers.js +3 -2
  102. package/react/components/common/file_helpers.js.map +1 -1
  103. package/react/components/common/helpers.js +20 -10
  104. package/react/components/common/helpers.js.map +1 -1
  105. package/react/components/common/stories/Button.stories.js +1 -1
  106. package/react/components/common/stories/Button.stories.js.map +1 -1
  107. package/react/components/common/stories/ButtonIcon.stories.js +1 -1
  108. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  109. package/react/components/common/stories/ButtonRow.stories.d.ts +14 -0
  110. package/react/components/common/stories/ButtonRow.stories.js +39 -0
  111. package/react/components/common/stories/ButtonRow.stories.js.map +1 -0
  112. package/react/components/common/stories/ButtonTile.stories.js +1 -1
  113. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  114. package/react/components/common/stories/Checkbox.stories.d.ts +13 -0
  115. package/react/components/common/stories/Checkbox.stories.js +29 -0
  116. package/react/components/common/stories/Checkbox.stories.js.map +1 -0
  117. package/react/components/common/stories/ColorPicker.stories.js +1 -1
  118. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  119. package/react/components/common/stories/DropZone.stories.js +1 -1
  120. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  121. package/react/components/common/stories/DropdownButton.stories.d.ts +22 -0
  122. package/react/components/common/stories/DropdownButton.stories.js +29 -0
  123. package/react/components/common/stories/DropdownButton.stories.js.map +1 -0
  124. package/react/components/common/stories/FinsembleIcon.stories.js +2 -0
  125. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  126. package/react/components/common/stories/FinsembleSelect.stories.d.ts +1 -1
  127. package/react/components/common/stories/FinsembleSelect.stories.js +1 -1
  128. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  129. package/react/components/common/stories/FinsembleToggle.stories.js +3 -1
  130. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  131. package/react/components/common/stories/FontSizeSelector.stories.js +1 -1
  132. package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
  133. package/react/components/common/stories/Header.stories.js +1 -1
  134. package/react/components/common/stories/Header.stories.js.map +1 -1
  135. package/react/components/common/stories/Tooltip.stories.d.ts +1 -1
  136. package/react/components/{shared/addProtocolToValidURL.spec.d.ts → common/tests/ButtonRow.spec.d.ts} +0 -0
  137. package/react/components/common/tests/ButtonRow.spec.js +25 -0
  138. package/react/components/common/tests/ButtonRow.spec.js.map +1 -0
  139. package/react/components/common/tests/Checkbox.spec.d.ts +1 -0
  140. package/react/components/common/tests/Checkbox.spec.js +33 -0
  141. package/react/components/common/tests/Checkbox.spec.js.map +1 -0
  142. package/react/components/common/tests/ColorPicker.spec.js +6 -6
  143. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  144. package/react/components/common/tests/DropZone.spec.js +4 -4
  145. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  146. package/react/components/common/tests/FileInput.spec.js +5 -5
  147. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  148. package/react/components/common/tests/FinsembleSelect.spec.js +12 -11
  149. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  150. package/react/components/common/tests/FinsembleToggle.spec.js +8 -2
  151. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  152. package/react/components/common/tests/Header.spec.js +3 -3
  153. package/react/components/common/tests/Header.spec.js.map +1 -1
  154. package/react/components/common/tests/ImagePreview.spec.js +8 -8
  155. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  156. package/react/components/common/tests/Tab.spec.js +3 -3
  157. package/react/components/common/tests/Tab.spec.js.map +1 -1
  158. package/react/components/common/tests/Tooltip.spec.js +5 -5
  159. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  160. package/react/components/favorites/FavoriteMaker.d.ts +0 -5
  161. package/react/components/favorites/FavoriteMaker.js +1 -1
  162. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  163. package/react/components/favorites/FavoritesShell.js +1 -1
  164. package/react/components/favorites/FavoritesShell.js.map +1 -1
  165. package/react/components/favorites/FavoritesShell.spec.js +7 -7
  166. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  167. package/react/components/favorites/FavoritesShell.stories.js +5 -4
  168. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  169. package/react/components/fdc3Resolver/ResolverContainer.js +2 -1
  170. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  171. package/react/components/fdc3Resolver/ResolverDialog.css +1 -0
  172. package/react/components/fdc3Resolver/ResolverDialog.js +15 -16
  173. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  174. package/react/components/fdc3Resolver/ResolverDialog.spec.js +6 -13
  175. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  176. package/react/components/fdc3Resolver/ResolverDialog.stories.js +46 -46
  177. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  178. package/react/components/icon/Icon.js +5 -4
  179. package/react/components/icon/Icon.js.map +1 -1
  180. package/react/components/legacyControls/FinsembleDialogButton.d.ts +1 -1
  181. package/react/components/legacyControls/FinsembleDialogButton.js +4 -3
  182. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  183. package/react/components/legacyControls/FinsembleDialogQuestion.js +2 -1
  184. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  185. package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
  186. package/react/components/legacyControls/FinsembleDialogTextInput.js +8 -5
  187. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  188. package/react/components/legacyControls/FinsembleDnDContext.js +18 -17
  189. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  190. package/react/components/legacyControls/FinsembleDraggable.js +3 -3
  191. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  192. package/react/components/legacyControls/FinsembleHoverDetector.js +2 -1
  193. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  194. package/react/components/legacyControls/FinsembleMenuSection.js +6 -3
  195. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  196. package/react/components/legacyControls/stories/FinsembleDialog.stories.js +1 -1
  197. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  198. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js +1 -1
  199. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  200. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js +1 -1
  201. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  202. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js +1 -1
  203. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  204. package/react/components/legacyControls/tests/FinsembleDialog.spec.js +1 -1
  205. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  206. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +8 -7
  207. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  208. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js +7 -5
  209. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  210. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +13 -12
  211. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  212. package/react/components/linker/LinkerMenu.js +4 -3
  213. package/react/components/linker/LinkerMenu.js.map +1 -1
  214. package/react/components/linker/LinkerMenuDeprecated.js +1 -1
  215. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  216. package/react/components/linker/remoteRedux.d.ts +10 -42
  217. package/react/components/linker/remoteRedux.js.map +1 -1
  218. package/react/components/menu/Menu.d.ts +1 -1
  219. package/react/components/menu/Menu.js +1 -1
  220. package/react/components/menu/Menu.js.map +1 -1
  221. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  222. package/react/components/menu/MenuPortal.js +7 -6
  223. package/react/components/menu/MenuPortal.js.map +1 -1
  224. package/react/components/menu/keyboardNavigation.js +14 -15
  225. package/react/components/menu/keyboardNavigation.js.map +1 -1
  226. package/react/components/notifications/components/NoNotifications.js +2 -4
  227. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  228. package/react/components/notifications/components/drawer/Drawer.js +2 -4
  229. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  230. package/react/components/notifications/components/drawer/DrawerControls.js +2 -4
  231. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  232. package/react/components/notifications/components/drawer/DrawerHeader.js +3 -6
  233. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  234. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +55 -69
  235. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  236. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +14 -15
  237. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  238. package/react/components/notifications/components/shared/CheckButton.d.ts +2 -2
  239. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  240. package/react/components/notifications/components/shared/IconButton.js +3 -5
  241. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  242. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +3 -2
  243. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  244. package/react/components/notifications/components/shared/OverflowMenu.d.ts +2 -1
  245. package/react/components/notifications/components/shared/OverflowMenu.js +6 -5
  246. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  247. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +3 -2
  248. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js +1 -1
  249. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  250. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +3 -2
  251. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  252. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +3 -2
  253. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +2 -4
  254. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  255. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +3 -2
  256. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  257. package/react/components/notifications/components/views/CardView.js +15 -24
  258. package/react/components/notifications/components/views/CardView.js.map +1 -1
  259. package/react/components/notifications/components/views/ListView.d.ts +2 -2
  260. package/react/components/notifications/components/views/ListView.js +10 -10
  261. package/react/components/notifications/components/views/ListView.js.map +1 -1
  262. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +2 -2
  263. package/react/components/notifications/components/views/NotificationDetailsView.js +5 -8
  264. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  265. package/react/components/notifications/constants.d.ts +13 -0
  266. package/react/components/notifications/constants.js.map +1 -1
  267. package/react/components/notifications/types.d.ts +7 -6
  268. package/react/components/notifications/types.js.map +1 -1
  269. package/react/components/notifications/utils.d.ts +6 -4
  270. package/react/components/notifications/utils.js +26 -32
  271. package/react/components/notifications/utils.js.map +1 -1
  272. package/react/components/processMonitor/ProcessMonitor.d.ts +3 -1
  273. package/react/components/processMonitor/ProcessMonitor.js +17 -10
  274. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  275. package/react/components/processMonitor/ProcessMonitorTypes.d.ts +33 -0
  276. package/react/components/processMonitor/ProcessMonitorTypes.js +6 -0
  277. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -0
  278. package/react/components/processMonitor/components/ChildWindow.d.ts +10 -3
  279. package/react/components/processMonitor/components/ChildWindow.js +19 -10
  280. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  281. package/react/components/processMonitor/components/ListHeader.d.ts +17 -4
  282. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  283. package/react/components/processMonitor/components/ProcessStatistics.d.ts +11 -3
  284. package/react/components/processMonitor/components/ProcessStatistics.js +25 -18
  285. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  286. package/react/components/processMonitor/constants.d.ts +11 -16
  287. package/react/components/processMonitor/constants.js +3 -1
  288. package/react/components/processMonitor/constants.js.map +1 -1
  289. package/react/components/processMonitor/helpers.d.ts +25 -5
  290. package/react/components/processMonitor/helpers.js +28 -20
  291. package/react/components/processMonitor/helpers.js.map +1 -1
  292. package/react/components/processMonitor/helpers.spec.d.ts +1 -0
  293. package/react/components/processMonitor/helpers.spec.js +44 -0
  294. package/react/components/processMonitor/helpers.spec.js.map +1 -0
  295. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +30 -15
  296. package/react/components/processMonitor/stores/ProcessMonitorStore.js +101 -86
  297. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  298. package/react/components/quickComponentForm/QuickComponentForm.d.ts +4 -1
  299. package/react/components/quickComponentForm/QuickComponentForm.js +13 -14
  300. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  301. package/react/components/search/Highlight.js +13 -3
  302. package/react/components/search/Highlight.js.map +1 -1
  303. package/react/components/search/Highlight.spec.js +3 -3
  304. package/react/components/search/Highlight.spec.js.map +1 -1
  305. package/react/components/search/Highlight.stories.js +1 -1
  306. package/react/components/search/Highlight.stories.js.map +1 -1
  307. package/react/components/search/Search.js +17 -8
  308. package/react/components/search/Search.js.map +1 -1
  309. package/react/components/search/SearchBestMatch.js +2 -1
  310. package/react/components/search/SearchBestMatch.js.map +1 -1
  311. package/react/components/search/SearchProviderResults.js +4 -5
  312. package/react/components/search/SearchProviderResults.js.map +1 -1
  313. package/react/components/search/SearchResult.js +3 -2
  314. package/react/components/search/SearchResult.js.map +1 -1
  315. package/react/components/search/SearchResults.js +1 -1
  316. package/react/components/search/SearchResults.js.map +1 -1
  317. package/react/components/shared/Button.js +2 -4
  318. package/react/components/shared/Button.js.map +1 -1
  319. package/react/components/shared/DefaultDropdownButton.d.ts +1 -0
  320. package/react/components/shared/DefaultDropdownButton.js +14 -4
  321. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  322. package/react/components/shared/NavigationButton.js +9 -11
  323. package/react/components/shared/NavigationButton.js.map +1 -1
  324. package/react/components/shared/Tag.d.ts +11 -1
  325. package/react/components/shared/Tag.js.map +1 -1
  326. package/react/components/shared/TagsMenu.d.ts +26 -6
  327. package/react/components/shared/TagsMenu.js.map +1 -1
  328. package/react/components/shared/linkerUtil.d.ts +3 -1
  329. package/react/components/shared/linkerUtil.js.map +1 -1
  330. package/react/components/shared/tests/DefaultDropdownButton.spec.d.ts +1 -0
  331. package/react/components/shared/tests/DefaultDropdownButton.spec.js +54 -0
  332. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -0
  333. package/react/components/shared/tests/addProtocolToValidURL.spec.d.ts +1 -0
  334. package/react/components/shared/{addProtocolToValidURL.spec.js → tests/addProtocolToValidURL.spec.js} +1 -1
  335. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -0
  336. package/react/components/singleInputDialog/SingleInputDialog.spec.js +6 -6
  337. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  338. package/react/components/singleInputDialog/SingleInputDialog.stories.js +1 -1
  339. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  340. package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +15 -0
  341. package/react/components/smartDesktopDesigner/AppEditAccess.js +138 -0
  342. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -0
  343. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +9 -3
  344. package/react/components/smartDesktopDesigner/AppEditPage.js +5 -1
  345. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  346. package/react/components/smartDesktopDesigner/Appearance.js +3 -5
  347. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  348. package/react/components/smartDesktopDesigner/Application.d.ts +7 -4
  349. package/react/components/smartDesktopDesigner/Application.js +85 -83
  350. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  351. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +3 -0
  352. package/react/components/smartDesktopDesigner/ApplicationEdit.js +68 -51
  353. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  354. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +4 -2
  355. package/react/components/smartDesktopDesigner/ApplicationList.js +33 -20
  356. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  357. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +7 -1
  358. package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
  359. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  360. package/react/components/smartDesktopDesigner/Applications.d.ts +2 -1
  361. package/react/components/smartDesktopDesigner/Applications.js +73 -62
  362. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  363. package/react/components/smartDesktopDesigner/Authentication.js +2 -8
  364. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  365. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -8
  366. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  367. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  368. package/react/components/smartDesktopDesigner/CurrentView.js +1 -1
  369. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  370. package/react/components/smartDesktopDesigner/Export.js +3 -3
  371. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  372. package/react/components/smartDesktopDesigner/ExportCloud.js +1 -1
  373. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  374. package/react/components/smartDesktopDesigner/ExportDeployInfo.js +1 -1
  375. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  376. package/react/components/smartDesktopDesigner/ExportZip.js +0 -1
  377. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  378. package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -1
  379. package/react/components/smartDesktopDesigner/GettingStarted.js +1 -1
  380. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  381. package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +1 -1
  382. package/react/components/smartDesktopDesigner/ProjectHeader.js +1 -1
  383. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
  384. package/react/components/smartDesktopDesigner/Publish.js +1 -1
  385. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  386. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
  387. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -24
  388. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  389. package/react/components/smartDesktopDesigner/Themes.js +2 -8
  390. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  391. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  392. package/react/components/smartDesktopDesigner/common/getCSSVars.d.ts +1 -1
  393. package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -1
  394. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  395. package/react/components/smartDesktopDesigner/common/views.d.ts +1 -1
  396. package/react/components/smartDesktopDesigner/common/views.js +6 -14
  397. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  398. package/react/components/smartDesktopDesigner/css/applications.css +38 -0
  399. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +20 -2
  400. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  401. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +10 -1
  402. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  403. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +6 -3
  404. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
  405. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +5 -2
  406. package/react/components/smartDesktopDesigner/fixtures/apps.js +15 -15
  407. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  408. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  409. package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +2 -1
  410. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  411. package/react/components/smartDesktopDesigner/fixtures/views.js +4 -4
  412. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  413. package/react/components/smartDesktopDesigner/sdd_helpers.js +2 -1
  414. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  415. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -4
  416. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +22 -2
  417. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  418. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js +7 -7
  419. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  420. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +3 -7
  421. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
  422. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +9 -2
  423. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
  424. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +3 -10
  425. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
  426. package/react/components/smartDesktopDesigner/stories/Applications.stories.js +3 -2
  427. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  428. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +7 -14
  429. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  430. package/react/components/smartDesktopDesigner/stories/Export.stories.js +2 -2
  431. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  432. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +2 -2
  433. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  434. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +5 -11
  435. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  436. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.d.ts +1 -1
  437. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js +1 -1
  438. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  439. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js +1 -1
  440. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  441. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js +2 -4
  442. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  443. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +1 -1
  444. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +1 -1
  445. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
  446. package/react/components/smartDesktopDesigner/stories/Publish.stories.js +13 -28
  447. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  448. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js +1 -1
  449. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  450. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +3 -3
  451. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  452. package/react/components/smartDesktopDesigner/stories/Themes.stories.js +1 -1
  453. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  454. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +33 -32
  455. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  456. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +6 -5
  457. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
  458. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js +11 -11
  459. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
  460. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +9 -7
  461. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
  462. package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
  463. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +118 -41
  464. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  465. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js +6 -18
  466. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  467. package/react/components/smartDesktopDesigner/tests/Export.spec.js +14 -22
  468. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  469. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +2 -6
  470. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  471. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js +2 -2
  472. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  473. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +2 -2
  474. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  475. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +2 -2
  476. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
  477. package/react/components/smartDesktopDesigner/tests/Publish.spec.js +3 -10
  478. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  479. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js +2 -6
  480. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  481. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +3 -3
  482. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  483. package/react/components/smartDesktopDesigner/tests/Themes.spec.js +7 -7
  484. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  485. package/react/components/smartDesktopDesigner/tests/a11y_helper.js +2 -1
  486. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  487. package/react/components/system/System.spec.js +1 -1
  488. package/react/components/system/System.spec.js.map +1 -1
  489. package/react/components/system/SystemTrayComponentShell.js +1 -1
  490. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  491. package/react/components/toolbar/MinimizeAll.spec.js +5 -5
  492. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  493. package/react/components/toolbar/NotificationControl.js +3 -2
  494. package/react/components/toolbar/NotificationControl.js.map +1 -1
  495. package/react/components/toolbar/RevealAll.spec.js +5 -5
  496. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  497. package/react/components/toolbar/ToolbarIcon.js +14 -2
  498. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  499. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +22 -5
  500. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +11 -6
  501. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  502. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js +21 -9
  503. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  504. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +33 -10
  505. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +24 -3
  506. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  507. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +3 -3
  508. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +0 -3
  509. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  510. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +24 -8
  511. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +4 -2
  512. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  513. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +18 -4
  514. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +5 -4
  515. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  516. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.d.ts +14 -6
  517. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js +2 -2
  518. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  519. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +34 -13
  520. package/react/components/toolbar/advancedAppLauncher/components/Content.js +22 -29
  521. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  522. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +15 -5
  523. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -3
  524. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  525. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +38 -21
  526. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +14 -9
  527. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  528. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +18 -3
  529. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +7 -3
  530. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  531. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.d.ts +10 -3
  532. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js +1 -3
  533. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  534. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.d.ts +15 -6
  535. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +11 -6
  536. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  537. package/react/components/toolbar/advancedAppLauncher/components/SortBy.d.ts +11 -4
  538. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js +3 -2
  539. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  540. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +18 -6
  541. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js +2 -2
  542. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  543. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +20 -4
  544. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +2 -4
  545. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  546. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -1
  547. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  548. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +15 -10
  549. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  550. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +5 -2
  551. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js +1 -1
  552. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  553. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +5 -4
  554. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  555. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +7 -6
  556. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -13
  557. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  558. package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +3 -3
  559. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
  560. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  561. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  562. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +25 -3
  563. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +3 -10
  564. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  565. package/react/components/toolbar/appLauncher/components/componentList.d.ts +34 -6
  566. package/react/components/toolbar/appLauncher/components/componentList.js +24 -21
  567. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  568. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +32 -32
  569. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +37 -55
  570. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  571. package/react/components/toolbar/dashbar/Dashbar.js +24 -13
  572. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  573. package/react/components/toolbar/dashbar/DashbarItem.js +1 -1
  574. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  575. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +28 -5
  576. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +17 -23
  577. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  578. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +25 -3
  579. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  580. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +13 -8
  581. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +2 -2
  582. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  583. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +16 -8
  584. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +0 -3
  585. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  586. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +65 -11
  587. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +95 -145
  588. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  589. package/react/components/userPreferences/UserPreferenceTypes.d.ts +5 -0
  590. package/react/components/userPreferences/UserPreferenceTypes.js +2 -0
  591. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -0
  592. package/react/components/userPreferences/UserPreferences.js +8 -23
  593. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  594. package/react/components/userPreferences/UserPreferencesBase.d.ts +3 -1
  595. package/react/components/userPreferences/UserPreferencesBase.js +5 -6
  596. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  597. package/react/components/userPreferences/UserPreferencesWrapper.d.ts +4 -0
  598. package/react/components/userPreferences/UserPreferencesWrapper.js +27 -0
  599. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -0
  600. package/react/components/userPreferences/components/ContentSection.d.ts +18 -3
  601. package/react/components/userPreferences/components/ContentSection.js +6 -3
  602. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  603. package/react/components/userPreferences/components/LeftNav.d.ts +19 -4
  604. package/react/components/userPreferences/components/LeftNav.js +12 -11
  605. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  606. package/react/components/userPreferences/components/content/DashbarEditor.d.ts +20 -5
  607. package/react/components/userPreferences/components/content/DashbarEditor.js +11 -11
  608. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  609. package/react/components/userPreferences/components/content/DashbarEditorItem.d.ts +10 -0
  610. package/react/components/userPreferences/components/content/DashbarEditorItem.js +11 -0
  611. package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -0
  612. package/react/components/userPreferences/components/content/General.d.ts +10 -3
  613. package/react/components/userPreferences/components/content/General.js +2 -2
  614. package/react/components/userPreferences/components/content/General.js.map +1 -1
  615. package/react/components/userPreferences/components/content/Notifications.js +2 -0
  616. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  617. package/react/components/userPreferences/components/content/Workspaces.js +51 -113
  618. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  619. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +56 -61
  620. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  621. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.d.ts +1 -1
  622. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +17 -15
  623. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  624. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.d.ts +3 -1
  625. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +15 -16
  626. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  627. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js +6 -6
  628. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  629. package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +24 -7
  630. package/react/components/userPreferences/components/general/ScheduledRestart.js +71 -23
  631. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  632. package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +8 -0
  633. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +9 -0
  634. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -0
  635. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.d.ts +6 -0
  636. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +11 -0
  637. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -0
  638. package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +45 -0
  639. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +89 -0
  640. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -0
  641. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.d.ts +8 -0
  642. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +21 -0
  643. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -0
  644. package/react/components/userPreferences/index.d.ts +1 -1
  645. package/react/components/userPreferences/index.js +1 -1
  646. package/react/components/userPreferences/index.js.map +1 -1
  647. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -13
  648. package/react/components/userPreferences/stores/UserPreferencesStore.js +13 -25
  649. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  650. package/react/components/userPreferences/stories/DashbarEditor.stories.d.ts +2 -1
  651. package/react/components/userPreferences/stories/DashbarEditor.stories.js +35 -4
  652. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  653. package/react/components/userPreferences/stories/DashbarEditorItem.stories.d.ts +11 -0
  654. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +21 -0
  655. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -0
  656. package/react/components/userPreferences/stories/General.stories.d.ts +9 -0
  657. package/react/components/userPreferences/stories/General.stories.js +16 -0
  658. package/react/components/userPreferences/stories/General.stories.js.map +1 -0
  659. package/react/components/userPreferences/stories/Notifications.stories.d.ts +9 -0
  660. package/react/components/userPreferences/stories/Notifications.stories.js +17 -0
  661. package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -0
  662. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.d.ts +9 -0
  663. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +20 -0
  664. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -0
  665. package/react/components/userPreferences/stories/NotificationsSources.stories.d.ts +12 -0
  666. package/react/components/userPreferences/stories/NotificationsSources.stories.js +28 -0
  667. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -0
  668. package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +8 -0
  669. package/react/components/userPreferences/stories/UserPreferences.stories.js +53 -0
  670. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -0
  671. package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +11 -0
  672. package/react/components/userPreferences/stories/WorkspaceButton.stories.js +20 -0
  673. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -0
  674. package/react/components/userPreferences/stories/WorkspaceComponents.stories.d.ts +13 -0
  675. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js +26 -0
  676. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -0
  677. package/react/components/userPreferences/stories/WorkspaceItem.stories.d.ts +9 -0
  678. package/react/components/userPreferences/stories/WorkspaceItem.stories.js +30 -0
  679. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -0
  680. package/react/components/userPreferences/stories/WorkspaceItemList.stories.d.ts +10 -0
  681. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js +57 -0
  682. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -0
  683. package/react/components/userPreferences/stories/Workspaces.stories.d.ts +9 -0
  684. package/react/components/userPreferences/stories/Workspaces.stories.js +44 -0
  685. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -0
  686. package/react/components/userPreferences/tests/ContentSection.spec.d.ts +1 -0
  687. package/react/components/userPreferences/tests/ContentSection.spec.js +41 -0
  688. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -0
  689. package/react/components/userPreferences/tests/DashbarEditor.spec.d.ts +1 -0
  690. package/react/components/userPreferences/tests/DashbarEditor.spec.js +37 -0
  691. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -0
  692. package/react/components/userPreferences/tests/DashbarEditorItem.spec.d.ts +1 -0
  693. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js +38 -0
  694. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -0
  695. package/react/components/userPreferences/tests/General.spec.d.ts +1 -0
  696. package/react/components/userPreferences/tests/General.spec.js +28 -0
  697. package/react/components/userPreferences/tests/General.spec.js.map +1 -0
  698. package/react/components/userPreferences/tests/LeftNav.spec.d.ts +1 -0
  699. package/react/components/userPreferences/tests/LeftNav.spec.js +12 -0
  700. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -0
  701. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.d.ts +1 -0
  702. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js +14 -0
  703. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -0
  704. package/react/components/userPreferences/tests/Notifications.spec.d.ts +1 -0
  705. package/react/components/userPreferences/tests/Notifications.spec.js +17 -0
  706. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -0
  707. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.d.ts +1 -0
  708. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +39 -0
  709. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -0
  710. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.d.ts +1 -0
  711. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js +22 -0
  712. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -0
  713. package/react/components/userPreferences/tests/ScheduledRestart.spec.d.ts +1 -0
  714. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +70 -0
  715. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -0
  716. package/react/components/userPreferences/tests/WorkspaceButton.spec.d.ts +1 -0
  717. package/react/components/userPreferences/tests/WorkspaceButton.spec.js +38 -0
  718. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -0
  719. package/react/components/userPreferences/tests/WorkspaceComponents.spec.d.ts +1 -0
  720. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +22 -0
  721. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -0
  722. package/react/components/userPreferences/tests/WorkspaceItem.spec.d.ts +1 -0
  723. package/react/components/userPreferences/tests/WorkspaceItem.spec.js +64 -0
  724. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -0
  725. package/react/components/userPreferences/tests/WorkspaceItemList.spec.d.ts +1 -0
  726. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js +45 -0
  727. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -0
  728. package/react/components/utils.js +1 -1
  729. package/react/components/utils.js.map +1 -1
  730. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +58 -31
  731. package/react/components/windowTitleBar/WindowTitleBarShell.js +47 -50
  732. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  733. package/react/components/windowTitleBar/components/center/Tab.d.ts +27 -7
  734. package/react/components/windowTitleBar/components/center/Tab.js +2 -2
  735. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  736. package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
  737. package/react/components/windowTitleBar/components/center/TabList.js +111 -37
  738. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  739. package/react/components/windowTitleBar/components/left/LinkerButton.js +5 -4
  740. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  741. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +1 -21
  742. package/react/components/windowTitleBar/components/left/LinkerGroups.js +6 -8
  743. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  744. package/react/components/windowTitleBar/components/left/ShareButton.d.ts +1 -21
  745. package/react/components/windowTitleBar/components/right/CloseButton.d.ts +12 -25
  746. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  747. package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +17 -26
  748. package/react/components/windowTitleBar/components/right/GroupingButton.js +2 -2
  749. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  750. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +1 -21
  751. package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +12 -25
  752. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  753. package/react/components/windowTitleBar/components/windowTitle.js +11 -6
  754. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  755. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +51 -44
  756. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +63 -56
  757. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  758. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +42 -44
  759. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  760. package/react/components/windowTitleBar/windowTitleBarContext.d.ts +9 -9
  761. package/react/components/windowTitleBar/windowTitleBarContext.js +2 -4
  762. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  763. package/react/components/yesNoDialog/Timer.spec.js +2 -2
  764. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  765. package/react/components/yesNoDialog/Timer.stories.js +1 -1
  766. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  767. package/react/components/yesNoDialog/YesNoDialog.spec.js +5 -5
  768. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  769. package/react/components/yesNoDialog/YesNoDialog.stories.js +1 -1
  770. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  771. package/react/hooks/useFavoritesShell.js.map +1 -1
  772. package/react/hooks/useLinker.js +1 -1
  773. package/react/hooks/useLinker.js.map +1 -1
  774. package/react/hooks/useMenu.js +1 -1
  775. package/react/hooks/useMenu.js.map +1 -1
  776. package/react/hooks/useNotifications.d.ts +10 -6
  777. package/react/hooks/useNotifications.js +53 -47
  778. package/react/hooks/useNotifications.js.map +1 -1
  779. package/react/hooks/usePubSub.js.map +1 -1
  780. package/react/hooks/useSearch.js +1 -1
  781. package/react/hooks/useSearch.js.map +1 -1
  782. package/react/hooks/useToolbar.js +71 -48
  783. package/react/hooks/useToolbar.js.map +1 -1
  784. package/react/hooks/useWorkspace.js +1 -1
  785. package/react/hooks/useWorkspace.js.map +1 -1
  786. package/react/reducers/favoriteReducer.js +1 -1
  787. package/react/reducers/favoriteReducer.js.map +1 -1
  788. package/react/reducers/rootReducer.d.ts +3 -4
  789. package/react/reducers/toolbarReducer.js +1 -1
  790. package/react/reducers/toolbarReducer.js.map +1 -1
  791. package/react/store.d.ts +6 -7
  792. package/react/types/advancedAppLauncherTypes.d.ts +28 -1
  793. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  794. package/react/types/dashbarTypes.d.ts +1 -1
  795. package/react/types/dashbarTypes.js.map +1 -1
  796. package/react/types/favoriteTypes.d.ts +1 -1
  797. package/react/types/favoriteTypes.js.map +1 -1
  798. package/react/types/fdc3.d.ts +28 -20
  799. package/react/types/fdc3.js.map +1 -1
  800. package/react/types/smartDesktopDesignerTypes.d.ts +13 -8
  801. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  802. package/react/types/windowTitleBar.d.ts +46 -0
  803. package/react/types/windowTitleBar.js +2 -0
  804. package/react/types/windowTitleBar.js.map +1 -0
  805. package/react/components/processMonitor/components/ChildWindows.d.ts +0 -4
  806. package/react/components/processMonitor/components/ChildWindows.js +0 -11
  807. package/react/components/processMonitor/components/ChildWindows.js.map +0 -1
  808. package/react/components/shared/addProtocolToValidURL.spec.js.map +0 -1
  809. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
  810. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
  811. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
  812. package/react/components/userPreferences/components/Checkbox.d.ts +0 -4
  813. package/react/components/userPreferences/components/Checkbox.js +0 -27
  814. package/react/components/userPreferences/components/Checkbox.js.map +0 -1
@@ -8,22 +8,88 @@ let TAB_WIDTH = 300;
8
8
  const ICON_AREA = 16;
9
9
  const CLOSE_BUTTON_MARGIN = 12;
10
10
  const MINIMUM_TAB_SIZE = 100;
11
+ function EditTab(props) {
12
+ const [editingTitle, setEditingTitle] = React.useState(false);
13
+ const [clickTimeout, setClickTimeout] = React.useState(undefined);
14
+ React.useEffect(() => {
15
+ FSBL.Clients.WindowClient.getComponentState({ field: "persistedTitle" }, (err, title) => {
16
+ if (title)
17
+ document.title = title;
18
+ });
19
+ }, []);
20
+ const inputEl = React.useRef(null);
21
+ const updateTabTitle = (e) => {
22
+ const title = e.target.value;
23
+ FSBL.Clients.WindowClient.setComponentState({
24
+ field: "persistedTitle",
25
+ value: title,
26
+ });
27
+ document.title = title;
28
+ setEditingTitle(false);
29
+ };
30
+ const beginEditing = async () => {
31
+ var _a;
32
+ await setEditingTitle(true);
33
+ await ((_a = inputEl === null || inputEl === void 0 ? void 0 : inputEl.current) === null || _a === void 0 ? void 0 : _a.focus());
34
+ if (inputEl === null || inputEl === void 0 ? void 0 : inputEl.current) {
35
+ inputEl.current.value = document.title;
36
+ }
37
+ };
38
+ const clickHandler = () => {
39
+ if (clickTimeout !== null) {
40
+ beginEditing();
41
+ }
42
+ else if (!editingTitle) {
43
+ let timeout = setTimeout(() => {
44
+ clearTimeout(clickTimeout);
45
+ setClickTimeout(undefined);
46
+ }, 500);
47
+ setClickTimeout(timeout);
48
+ if (props.tab && props.setActiveTab)
49
+ props.setActiveTab(props.tab);
50
+ }
51
+ };
52
+ const blurHandler = (e) => {
53
+ updateTabTitle(e);
54
+ setEditingTitle(false);
55
+ };
56
+ const keyDownHandler = (e) => {
57
+ e.key === "Enter" && updateTabTitle(e);
58
+ };
59
+ return (React.createElement("div", { id: "tab-editor", onClick: clickHandler }, editingTitle ? (React.createElement("div", { className: "fsbl-tab fsbl-active-tab", style: { width: props.tabWidth || "auto" } },
60
+ React.createElement("input", { ref: inputEl, onBlur: blurHandler, onKeyDown: keyDownHandler, type: "text", className: "tab__input", maxLength: 32 }))) : (props.children)));
61
+ }
11
62
  export class TabList extends React.Component {
12
63
  constructor(props) {
13
64
  super(props);
14
65
  let initialState = Store.getValues(["activeTab", "tabs"]);
15
66
  let activeIdentifier = finsembleWindow.identifier;
16
- activeIdentifier.title = finsembleWindow.windowOptions.title;
67
+ if (activeIdentifier) {
68
+ activeIdentifier.title = finsembleWindow.windowOptions.title;
69
+ }
17
70
  this.state = {
18
71
  translateX: 0,
19
72
  tabs: initialState.tabs,
20
73
  activeTab: activeIdentifier,
21
- boundingBox: {},
74
+ boundingBox: {
75
+ right: 0,
76
+ left: 0,
77
+ top: 0,
78
+ bottom: 0,
79
+ height: 0,
80
+ width: 0,
81
+ },
22
82
  iAmDragging: false,
23
- hoverState: false,
83
+ hoverState: "false",
24
84
  tabWidth: TAB_WIDTH,
85
+ hoveredTabIndex: 0,
25
86
  };
87
+ this.onWindowResizeThrottled = () => { };
26
88
  this.bindCorrectContext();
89
+ this.mousePositionOnDragEnd = {
90
+ x: 0,
91
+ y: 0,
92
+ };
27
93
  }
28
94
  bindCorrectContext() {
29
95
  this.startDrag = this.startDrag.bind(this);
@@ -33,8 +99,8 @@ export class TabList extends React.Component {
33
99
  this.dragOver = this.dragOver.bind(this);
34
100
  this.dragLeave = this.dragLeave.bind(this);
35
101
  this.onMouseWheel = this.onMouseWheel.bind(this);
36
- renderTitle = renderTitle.bind(this);
37
- renderTabs = renderTabs.bind(this);
102
+ this.renderTitle = this.renderTitle.bind(this);
103
+ this.renderTabs = this.renderTabs.bind(this);
38
104
  this.findTabIndex = this.findTabIndex.bind(this);
39
105
  this.setActiveTab = this.setActiveTab.bind(this);
40
106
  this.onTabAdded = this.onTabAdded.bind(this);
@@ -98,6 +164,8 @@ export class TabList extends React.Component {
98
164
  bottom: boundingBox.bottom + bounds.top,
99
165
  left: boundingBox.left + bounds.left,
100
166
  right: boundingBox.right + bounds.left,
167
+ width: 0,
168
+ height: 0,
101
169
  };
102
170
  if (!FSBL.Clients.WindowClient.isPointInBox(this.mousePositionOnDragEnd, tabRegion)) {
103
171
  setTimeout(() => {
@@ -111,9 +179,8 @@ export class TabList extends React.Component {
111
179
  this.onWindowResize();
112
180
  }
113
181
  else {
114
- setTimeout(() => {
115
- FSBL.Clients.WindowClient.cancelTilingOrTabbing();
116
- }, 50);
182
+ const setTimeoutCb = FSBL.Clients.WindowClient.cancelTilingOrTabbing({ windowIdentifier: this.state.activeTab }, () => { });
183
+ setTimeout(() => setTimeoutCb, 50);
117
184
  }
118
185
  });
119
186
  }
@@ -137,14 +204,17 @@ export class TabList extends React.Component {
137
204
  }
138
205
  }
139
206
  drop(e) {
140
- e.preventDefault();
141
- e.stopPropagation();
207
+ let identifier;
208
+ if (e) {
209
+ e.preventDefault();
210
+ e.stopPropagation();
211
+ identifier = this.extractWindowIdentifier(e);
212
+ }
142
213
  FSBL.Clients.Logger.system.debug("Tab drag drop.");
143
- let identifier = this.extractWindowIdentifier(e);
144
214
  if (!identifier)
145
215
  return;
146
216
  if (this.state.tabs.length === 1 && identifier.windowName === finsembleWindow.name)
147
- return FSBL.Clients.WindowClient.cancelTilingOrTabbing();
217
+ return FSBL.Clients.WindowClient.cancelTilingOrTabbing({ windowIdentifier: this.state.activeTab }, () => { });
148
218
  FSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true, action: "tabbing" }, () => {
149
219
  FSBL.Clients.RouterClient.transmit("tabbingDragEnd", { success: true });
150
220
  if (identifier && identifier.windowName) {
@@ -295,11 +365,15 @@ export class TabList extends React.Component {
295
365
  newIndex = undefined;
296
366
  }
297
367
  let myIdentifier = finsembleWindow.identifier;
298
- myIdentifier.title = finsembleWindow.windowOptions.title;
368
+ if (myIdentifier) {
369
+ myIdentifier.title = finsembleWindow.windowOptions.title;
370
+ }
299
371
  if (this.state.tabs.length === 1 && identifier.windowName == myIdentifier.windowName) {
300
372
  return;
301
373
  }
302
- Actions.reorderTab(identifier, newIndex);
374
+ if (typeof newIndex === "number") {
375
+ Actions.reorderTab(identifier, newIndex);
376
+ }
303
377
  this.setState({
304
378
  hoveredTabIndex: undefined,
305
379
  });
@@ -369,29 +443,29 @@ export class TabList extends React.Component {
369
443
  }
370
444
  return (React.createElement("div", { ref: "Me", onDragLeave: this.dragLeave, className: this.props.className, onWheel: this.onMouseWheel, onScroll: this.onMouseWheel, onDrop: this.drop, onDragOver: this.dragOver },
371
445
  React.createElement("div", { className: "tab-region-wrapper" },
372
- componentToRender === "title" && renderTitle(),
373
- componentToRender === "tabs" && renderTabs())));
446
+ componentToRender === "title" && this.renderTitle(),
447
+ componentToRender === "tabs" && this.renderTabs())));
448
+ }
449
+ renderTitle() {
450
+ return (React.createElement(EditTab, null,
451
+ React.createElement("div", { draggable: "true", onDragStart: (e) => {
452
+ FSBL.Clients.Logger.system.debug("Tab drag start - TITLE");
453
+ let activeIdentifier = finsembleWindow.identifier;
454
+ activeIdentifier.title = finsembleWindow.windowOptions.title;
455
+ this.startDrag(e, activeIdentifier);
456
+ }, onDragEnd: this.stopDrag, "data-hover": this.state.hoverState, className: "fsbl-header-title" },
457
+ React.createElement(FinsembleHoverDetector, { edge: "top", hoverAction: this.hoverAction.bind(this) }),
458
+ React.createElement(Title, { onUpdate: this.props.onTitleUpdated, windowIdentifier: FSBL.Clients.WindowClient.getWindowIdentifier() }))));
459
+ }
460
+ renderTabs() {
461
+ let titleWidth = this.state.tabWidth - ICON_AREA - CLOSE_BUTTON_MARGIN;
462
+ return this.state.tabs.map((tab) => (React.createElement(EditTab, { tabWidth: this.state.tabWidth, key: tab.windowName, tab: tab, setActiveTab: this.setActiveTab },
463
+ React.createElement(Tab, { draggable: "true", key: tab.windowName, className: this.getTabClasses(tab), onDragStart: (e, identifier) => {
464
+ FSBL.Clients.Logger.system.debug("Tab drag - TAB", identifier.windowName);
465
+ this.startDrag(e, identifier);
466
+ }, onDrop: this.drop, onDragEnd: this.stopDrag, onTabClose: () => {
467
+ this.onTabClosed(tab);
468
+ }, onTabDraggedOver: this.onTabDraggedOver, listenForDragOver: this.props.listenForDragOver, tabWidth: this.state.tabWidth, titleWidth: titleWidth, windowIdentifier: tab }))));
374
469
  }
375
470
  }
376
- function renderTitle() {
377
- return (React.createElement("div", { draggable: "true", onDragStart: (e) => {
378
- FSBL.Clients.Logger.system.debug("Tab drag start - TITLE");
379
- let activeIdentifier = finsembleWindow.identifier;
380
- activeIdentifier.title = finsembleWindow.windowOptions.title;
381
- this.startDrag(e, activeIdentifier);
382
- }, onDragEnd: this.stopDrag, "data-hover": this.state.hoverState, className: "fsbl-header-title" },
383
- React.createElement(FinsembleHoverDetector, { edge: "top", hoverAction: this.hoverAction.bind(this) }),
384
- React.createElement(Title, { onUpdate: this.props.onTitleUpdated, windowIdentifier: FSBL.Clients.WindowClient.getWindowIdentifier() })));
385
- }
386
- function renderTabs() {
387
- let titleWidth = this.state.tabWidth - ICON_AREA - CLOSE_BUTTON_MARGIN;
388
- return this.state.tabs.map((tab) => (React.createElement(Tab, { onClick: () => {
389
- this.setActiveTab(tab);
390
- }, draggable: "true", key: tab.windowName, className: this.getTabClasses(tab), onDragStart: (e, identifier) => {
391
- FSBL.Clients.Logger.system.debug("Tab drag - TAB", identifier.windowName);
392
- this.startDrag(e, identifier);
393
- }, onDrop: this.drop, onDragEnd: this.stopDrag, onTabClose: () => {
394
- this.onTabClosed(tab);
395
- }, onTabDraggedOver: this.onTabDraggedOver, listenForDragOver: this.props.listenForDragOver, tabWidth: this.state.tabWidth, titleWidth: titleWidth, windowIdentifier: tab })));
396
- }
397
471
  //# sourceMappingURL=TabList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabList.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/center/TabList.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,SAAS,MAAM,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AAG,EAAE,EAAE,CAAC,CACnC,oBAAC,GAAG,IACH,OAAO,EAAE,GAAG,EAAE;YACb,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD,SAAS,EAAC,MAAM,EAChB,GAAG,EAAE,GAAG,CAAC,UAAU,EACnB,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAClC,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE;YAC9B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;YAC1E,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QAC/B,CAAC,EACD,MAAM,EAAE,IAAI,CAAC,IAAI,EACjB,SAAS,EAAE,IAAI,CAAC,QAAQ,EACxB,UAAU,EAAE,GAAG,EAAE;YAChB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC,EACD,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAC/C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC7B,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,GAAG,GACpB,CACF,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport Tab from \"./Tab\";\r\nimport { FinsembleHoverDetector } from \"../../../legacyControls/FinsembleHoverDetector\";\r\nimport { Store, Actions } from \"../../stores/windowTitleBarStore\";\r\nimport { Title } from \"../windowTitle\";\r\nimport _throttle from \"lodash/throttle\";\r\n\r\nlet TAB_WIDTH = 300;\r\n// Next two items are for calculating how large the title should be within a tab.\r\nconst ICON_AREA = 16;\r\nconst CLOSE_BUTTON_MARGIN = 12;\r\nconst MINIMUM_TAB_SIZE = 100;\r\n\r\nexport class TabList extends React.Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tlet initialState = Store.getValues([\"activeTab\", \"tabs\"]);\r\n\t\tlet activeIdentifier = finsembleWindow.identifier;\r\n\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\tthis.state = {\r\n\t\t\ttranslateX: 0,\r\n\t\t\ttabs: initialState.tabs,\r\n\t\t\tactiveTab: activeIdentifier,\r\n\t\t\tboundingBox: {},\r\n\t\t\tiAmDragging: false,\r\n\t\t\thoverState: false,\r\n\t\t\ttabWidth: TAB_WIDTH,\r\n\t\t};\r\n\t\tthis.bindCorrectContext();\r\n\t}\r\n\r\n\t/**\r\n\t * Make sure that _this_ is correct inside of our event handlers.\r\n\t */\r\n\tbindCorrectContext() {\r\n\t\tthis.startDrag = this.startDrag.bind(this);\r\n\t\tthis.stopDrag = this.stopDrag.bind(this);\r\n\t\tthis.cancelTabbing = this.cancelTabbing.bind(this);\r\n\t\tthis.drop = this.drop.bind(this);\r\n\t\tthis.dragOver = this.dragOver.bind(this);\r\n\t\tthis.dragLeave = this.dragLeave.bind(this);\r\n\t\tthis.onMouseWheel = this.onMouseWheel.bind(this);\r\n\t\trenderTitle = renderTitle.bind(this);\r\n\t\trenderTabs = renderTabs.bind(this);\r\n\t\tthis.findTabIndex = this.findTabIndex.bind(this);\r\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\r\n\t\tthis.onTabAdded = this.onTabAdded.bind(this);\r\n\t\tthis.onTabClosed = this.onTabClosed.bind(this);\r\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\r\n\t\tthis.onStoreChanged = this.onStoreChanged.bind(this);\r\n\t\t// this.onActiveTabChanged = this.onActiveTabChanged.bind(this);\r\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\r\n\t\tthis.onTabDraggedOver = this.onTabDraggedOver.bind(this);\r\n\t\tthis.isTabRegionOverflowing = this.isTabRegionOverflowing.bind(this);\r\n\t\tthis.onWindowResize = this.onWindowResize.bind(this);\r\n\t\tthis.onWindowResizeThrottled = _throttle(this.onWindowResize, 100);\r\n\t\tthis.getTabWidth = this.getTabWidth.bind(this);\r\n\t\tthis.setTabListTranslateX = this.setTabListTranslateX.bind(this);\r\n\t\tthis.onTabListTranslateChanged = this.onTabListTranslateChanged.bind(this);\r\n\t}\r\n\r\n\tgetTabWidth(params = {}) {\r\n\t\tlet { boundingBox, tabList } = params;\r\n\t\tif (typeof tabList === \"undefined\") {\r\n\t\t\ttabList = this.state.tabs;\r\n\t\t}\r\n\t\tif (typeof boundingBox === \"undefined\") {\r\n\t\t\tboundingBox = this.refs.Me.getBoundingClientRect();\r\n\t\t}\r\n\t\tif (typeof boundingBox.right === \"undefined\") {\r\n\t\t\treturn TAB_WIDTH;\r\n\t\t}\r\n\t\tlet containerWidth = boundingBox.right - boundingBox.left;\r\n\t\tlet newTabWidth = containerWidth / tabList.length;\r\n\r\n\t\treturn newTabWidth < MINIMUM_TAB_SIZE ? MINIMUM_TAB_SIZE : newTabWidth;\r\n\t}\r\n\r\n\t/**\r\n\t * Resize handler. Calculates the space that the center-region is taking up. May be used to scale tabs proportionally.\r\n\t */\r\n\tonWindowResize() {\r\n\t\tlet bounds = this.refs.Me.getBoundingClientRect();\r\n\t\tthis.setState({\r\n\t\t\tboundingBox: bounds,\r\n\t\t\ttabWidth: this.getTabWidth(),\r\n\t\t});\r\n\t}\r\n\r\n\tfindTabIndex(tab) {\r\n\t\treturn this.state.tabs.findIndex((el) => tab.windowName === el.windowName && tab.uuid === el.uuid);\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * Function that's called when this component fires the onDragStart event, this will start the tiling or tabbing process\r\n\t *\r\n\t * @param e The SyntheticEvent created by React when the startdrag event is called\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tstartDrag(e, windowIdentifier) {\r\n\t\tthis.setState({\r\n\t\t\tiAmDragging: true,\r\n\t\t});\r\n\t\te.dataTransfer.setData(\"application/fsbl-tab-data\", JSON.stringify(windowIdentifier));\r\n\t\tFSBL.Clients.WindowClient.startTilingOrTabbing({\r\n\t\t\twindowIdentifier: windowIdentifier,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the react component detects a drop (or stop drag, which is equivalent)\r\n\t *\r\n\t * @param e The SyntheticEvent created by React when the stopdrag event is called\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tstopDrag(e) {\r\n\t\t// We don't want onDropHandler() in windowTitleBarComponent.jsx\r\n\t\t// to handle this drop event, so we call event.stopPropagation().\r\n\t\te.stopPropagation();\r\n\t\tFSBL.Clients.Logger.system.debug(\"Tab stopDrag.\");\r\n\t\tthis.mousePositionOnDragEnd = {\r\n\t\t\tx: e.nativeEvent.screenX,\r\n\t\t\ty: e.nativeEvent.screenY,\r\n\t\t};\r\n\r\n\t\tconst { boundingBox } = this.state;\r\n\t\tFSBL.Clients.WindowClient.getBounds((err, bounds) => {\r\n\t\t\t// We ONLY want to know if we're in the tab region!\r\n\t\t\tconst tabRegion = {\r\n\t\t\t\ttop: boundingBox.top + bounds.top,\r\n\t\t\t\tbottom: boundingBox.bottom + bounds.top,\r\n\t\t\t\tleft: boundingBox.left + bounds.left,\r\n\t\t\t\tright: boundingBox.right + bounds.left,\r\n\t\t\t};\r\n\t\t\tif (!FSBL.Clients.WindowClient.isPointInBox(this.mousePositionOnDragEnd, tabRegion)) {\r\n\t\t\t\t// allow for a 50ms delay so this message goes after a drop message from a target window if tabbing\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({\r\n\t\t\t\t\t\tmousePosition: this.mousePositionOnDragEnd,\r\n\t\t\t\t\t});\r\n\t\t\t\t}, 50);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tiAmDragging: false,\r\n\t\t\t\t});\r\n\t\t\t\tthis.onWindowResize();\r\n\t\t\t} else {\r\n\t\t\t\t// sometimes a tab gets dropped in a bad spot where no action gets taken and we get stuck in tiling mode\r\n\t\t\t\t// to make sure nothing bad happens, call cancel after a similar 50ms delay\r\n\t\t\t\t// If some action was taken, this will be ignored by Finsemble\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tFSBL.Clients.WindowClient.cancelTilingOrTabbing();\r\n\t\t\t\t}, 50);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Helper function that will pull data from a drop event, parse it, and return it.\r\n\t * @param {event} e\r\n\t */\r\n\textractWindowIdentifier(e) {\r\n\t\ttry {\r\n\t\t\tlet identifier = JSON.parse(e.dataTransfer.getData(\"application/fsbl-tab-data\"));\r\n\t\t\t// If the \"identifier\" is formed properly, it'll have this properly. Otherwise, it's something else (e.g., share data, image, etc).\r\n\t\t\tif (typeof identifier.windowName !== \"undefined\") {\r\n\t\t\t\treturn identifier;\r\n\t\t\t} else if (identifier.waitForIdentifier) {\r\n\t\t\t\treturn identifier;\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Malformed drop object detected in windowTitleBar. Check tab dropping code. Expected windowIdentifier, got \",\r\n\t\t\t\t\tidentifier\r\n\t\t\t\t);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t} catch (e2) {\r\n\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\"Error in 'extractWindowIdentifier'. Check TabRegion.jsx. Either there was no data in the event, or it was a circular object that caused JSON.parse to fail. Javascript Error:\",\r\n\t\t\t\te2\r\n\t\t\t);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Called when a drop event occurs on the tab region. We (hope) that this came from a tab. Could be a share icon, an image, something else - that's why we check to see if the identifier exists before doing anything.\r\n\t * @param {event} e\r\n\t */\r\n\tdrop(e) {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t\tFSBL.Clients.Logger.system.debug(\"Tab drag drop.\");\r\n\t\tlet identifier = this.extractWindowIdentifier(e);\r\n\t\tif (!identifier) return; // the dropped item is not a tab\r\n\t\tif (this.state.tabs.length === 1 && identifier.windowName === finsembleWindow.name)\r\n\t\t\treturn FSBL.Clients.WindowClient.cancelTilingOrTabbing();\r\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true, action: \"tabbing\" }, () => {\r\n\t\t\tFSBL.Clients.RouterClient.transmit(\"tabbingDragEnd\", { success: true });\r\n\t\t\tif (identifier && identifier.windowName) {\r\n\t\t\t\t// Calls a method defined inside of windowTitleBar.jsx.\r\n\t\t\t\tthis.onTabAdded(identifier, this.state.hoveredTabIndex);\r\n\t\t\t} else if (identifier && identifier.waitForIdentifier) {\r\n\t\t\t\tlet subscribeId;\r\n\t\t\t\tlet tabIdentifierSubscriber = (err, response) => {\r\n\t\t\t\t\tif (!response.data.windowName) return;\r\n\t\t\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscribeId);\r\n\t\t\t\t\tthis.onTabAdded(response.data, this.state.hoveredTabIndex);\r\n\t\t\t\t};\r\n\t\t\t\tsubscribeId = FSBL.Clients.RouterClient.subscribe(`Finsemble.${identifier.guid}`, tabIdentifierSubscriber);\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Unexpected drop event on window title bar. Check the 'drop' method on TabRegion.jsx.\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tisTabRegionOverflowing() {\r\n\t\tlet lastTab = {\r\n\t\t\tright: this.state.tabs.length * this.state.tabWidth,\r\n\t\t};\r\n\t\treturn lastTab.right + this.state.translateX > this.state.boundingBox.right - this.state.boundingBox.left;\r\n\t}\r\n\r\n\t/**\r\n\t * Event handler for when a user wheels inside of the tab region. We translate the deltaY that the event provides into horizontal movement. The translateX value that we return will be used in the render method below.\r\n\t * @param {event} e\r\n\t */\r\n\tonMouseWheel(e) {\r\n\t\te.preventDefault();\r\n\t\tlet numTabs = this.state.tabs.length;\r\n\t\tlet translateX = 0;\r\n\t\t// If there's more than one tab, do some calculations, otherwise we aren't going to scroll this region, no matter how much the user wants us to.\r\n\t\tif (numTabs > 1) {\r\n\t\t\tlet currentX = this.refs.Me.scrollLeft;\r\n\t\t\tlet { boundingBox } = this.state;\r\n\t\t\t// Figure out position of first tab and last tab.\r\n\t\t\tlet firstTab = {\r\n\t\t\t\tleft: 0 + boundingBox.left,\r\n\t\t\t};\r\n\t\t\tlet lastTab = {\r\n\t\t\t\tright: numTabs * this.state.tabWidth,\r\n\t\t\t};\r\n\t\t\tlet deltaX = this.state.tabWidth / 3;\r\n\t\t\tif (e.nativeEvent.deltaY < 0) {\r\n\t\t\t\tdeltaX = 0 - deltaX;\r\n\t\t\t}\r\n\t\t\t// Mouses with high sensitivity will cause massive scroll amounts. We don't want to scroll more than one tab's width in a single mouse wheel, otherwise you risk missing a tab.\r\n\t\t\tif (Math.abs(deltaX) > this.state.tabWidth) {\r\n\t\t\t\tlet isNegative = false;\r\n\t\t\t\tif (deltaX < 0) {\r\n\t\t\t\t\tisNegative = true;\r\n\t\t\t\t}\r\n\t\t\t\tdeltaX = isNegative ? 0 - this.state.tabWidth : this.state.tabWidth;\r\n\t\t\t}\r\n\r\n\t\t\t// when we set scrollLeft on the element, this event fires. But there's no actual event. so stop.\r\n\t\t\tif (!e.nativeEvent.deltaY) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tlet originalDeltaY = e.nativeEvent.deltaY;\r\n\t\t\tlet deltaY = originalDeltaY;\r\n\t\t\tif (Math.abs(originalDeltaY) > this.state.tabWidth / 3) {\r\n\t\t\t\tdeltaY = this.state.tabWidth / 3;\r\n\t\t\t\tif (originalDeltaY < 0) {\r\n\t\t\t\t\tdeltaY = 0 - deltaY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttranslateX = deltaY + currentX;\r\n\t\t\tlet maxRight = boundingBox.right - this.state.tabWidth;\r\n\t\t\tlet newRightForLastTab = lastTab.right + translateX;\r\n\t\t\tlet newLeftForFirstTab = firstTab.left + translateX;\r\n\t\t\t// Do not let the left of the first tab move to the right of the left edge of the bounding box.\r\n\t\t\tif (newLeftForFirstTab < 0) {\r\n\t\t\t\treturn this.scrollToFirstTab();\r\n\t\t\t} else if (e.nativeEvent.deltaY < 0 && newRightForLastTab <= boundingBox.right) {\r\n\t\t\t\t// ONLY IF the user is scrolling from right-to-left (deltaY will be negative). IF they try to do that, do not allow the right edge of the last tab to detach.\r\n\t\t\t\treturn this.scrollToLastTab();\r\n\t\t\t}\r\n\t\t\t// Else, the translation is okay. We're in the middle of our list and the first and last tabs aren't being rendered improperly.\r\n\t\t\ttranslateX < 0 ? (translateX = 0) : translateX;\r\n\t\t\tthis.setState({ translateX });\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to our active tab.\r\n\t */\r\n\tscrollToActiveTab() {\r\n\t\tthis.scrollToTab(this.state.activeTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to the first tab in our list of tabs.\r\n\t */\r\n\tscrollToFirstTab() {\r\n\t\tlet firstTab = this.state.tabs[0];\r\n\t\tthis.scrollToTab(firstTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to the last tab in our list of tabs\r\n\t */\r\n\tscrollToLastTab() {\r\n\t\tlet lastTab = this.state.tabs[this.state.tabs.length - 1];\r\n\t\tthis.scrollToTab(lastTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Function that will horizontally scroll the tab region so that the right edge of the tab lines up with the right edge of the tab region.\r\n\t * @param {} tab\r\n\t */\r\n\tscrollToTab(tab) {\r\n\t\t// 'BoundingBox' is just the boundingClientRect of the tab region. It is, in essence, the center part of the windowTitleBar.\r\n\t\tlet { boundingBox } = this.state;\r\n\r\n\t\tlet tabIndex = this.state.tabs.findIndex((el) => el.windowName === tab.windowName && el.uuid === tab.uuid);\r\n\t\tif (tabIndex > -1) {\r\n\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\r\n\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\r\n\t\t\tlet translateX = rightEdgeOfTab;\r\n\t\t\t// Our translation is this: Take the right edge of the bounding box, and subtract the left edge. This gives us the 0 point for the box. Then, we subtract the right edge of the tab. The result is a number that we use to shift the entire element and align the right edge of the tab with the right edge of the bounding box. We also account for the 30 px region on the right.\r\n\r\n\t\t\t// If there's no overflow, we don't scroll.\r\n\t\t\tif (rightEdgeOfTab < boundingBox.right) {\r\n\t\t\t\ttranslateX = 0;\r\n\t\t\t} else {\r\n\t\t\t\t// Other tabs are less simple.\r\n\t\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\r\n\t\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\r\n\t\t\t\t// Our translation is this: Take the right edge of the bounding box, and subtract the left edge. This gives us the 0 point for the box. Then, we subtract the right edge of the tab. The result is a number that we use to shift the entire element and align the right edge of the tab with the right edge of the bounding box.\r\n\t\t\t\ttranslateX = boundingBox.right - boundingBox.left - rightEdgeOfTab;\r\n\t\t\t\t// If there's no overflow, we don't scroll.\r\n\t\t\t\tif (rightEdgeOfTab < boundingBox.right) {\r\n\t\t\t\t\ttranslateX = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.setTabListTranslateX(translateX);\r\n\t\t}\r\n\t}\r\n\r\n\tsetTabListTranslateX(translateX) {\r\n\t\tActions.setTabListScrollPosition(translateX);\r\n\t}\r\n\r\n\t/**\r\n\t * Someone is dragging _something_ over the tab region. We respond by rendering the ghost tab.\r\n\t * @param {event} e\r\n\t */\r\n\tdragOver(e) {\r\n\t\te.preventDefault();\r\n\t}\r\n\r\n\t/**\r\n\t * Triggered when the user moves their mouse out of the tabRegion after a dragOver event happens. When they leave, we hide our placeholder tab.\r\n\t * @param {event} e\r\n\t */\r\n\tdragLeave(e) {\r\n\t\tlet boundingRect = this.state.boundingBox;\r\n\t\tif (!FSBL.Clients.WindowClient.isPointInBox({ x: e.screenX, y: e.screenY }, boundingRect)) {\r\n\t\t\tthis.setState({\r\n\t\t\t\thoveredTabIndex: undefined,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set to a timeout. An event is sent to the RouterClient which will be handled by the drop handler on the window.\r\n\t * In the event that a drop handler never fires to stop tiling or tabbing, this will take care of it.\r\n\t *\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tcancelTabbing() {\r\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true });\r\n\t\tthis.onWindowResize();\r\n\t}\r\n\r\n\t/**\r\n\t * Basically exists just to keep the render method clean. Gives conditional classes to the active tab.\r\n\t * @param {tab} tab\r\n\t */\r\n\tgetTabClasses(tab) {\r\n\t\tlet classes = \"fsbl-tab\";\r\n\t\tlet tabIndex = this.findTabIndex(tab);\r\n\t\tif (tabIndex === this.state.hoveredTabIndex) classes = `${classes} ghost-tab`;\r\n\t\tif (this.state.activeTab && tab.windowName === this.state.activeTab.windowName) {\r\n\t\t\tclasses = `${classes} fsbl-active-tab`;\r\n\t\t}\r\n\t\treturn classes;\r\n\t}\r\n\r\n\tonTabDraggedOver(e, tabDraggedOver) {\r\n\t\te.preventDefault();\r\n\t\t// Find index of tab.\r\n\t\tlet tabIndex = this.findTabIndex(tabDraggedOver);\r\n\t\tthis.setState({\r\n\t\t\thoveredTabIndex: tabIndex,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * OnClick handler for the close button on individual tabs.\r\n\t * @PLACEHOLDER will interact with tabbing API\r\n\t * @param {*} tab\r\n\t */\r\n\tonTabClosed(identifier) {\r\n\t\tActions.closeTab(identifier);\r\n\t}\r\n\r\n\t/**\r\n\t * drop handler for the tab region.\r\n\t * @param {*} tab\r\n\t */\r\n\tonTabAdded(identifier, newIndex) {\r\n\t\tif (newIndex === -1) {\r\n\t\t\tnewIndex = undefined;\r\n\t\t}\r\n\r\n\t\tlet myIdentifier = finsembleWindow.identifier;\r\n\t\tmyIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\tif (this.state.tabs.length === 1 && identifier.windowName == myIdentifier.windowName) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tActions.reorderTab(identifier, newIndex);\r\n\t\tthis.setState({\r\n\t\t\thoveredTabIndex: undefined,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * OnClick handler for individual tabs.\r\n\t * @PLACEHOLDER will interact with tabbing API\r\n\t * @param {*} tab\r\n\t */\r\n\tsetActiveTab(tab) {\r\n\t\tActions.setActiveTab(tab);\r\n\t}\r\n\r\n\tonStoreChanged(prop, value) {\r\n\t\tthis.setState({\r\n\t\t\t[prop]: value,\r\n\t\t});\r\n\t}\r\n\r\n\tonTabsChanged(err, response) {\r\n\t\tlet { value } = response;\r\n\t\tthis.setState({\r\n\t\t\ttabs: value,\r\n\t\t\ttabWidth: this.getTabWidth({ tabList: value }),\r\n\t\t});\r\n\t}\r\n\r\n\tonTabListTranslateChanged(err, response) {\r\n\t\tlet { value } = response;\r\n\t\tthis.setState({\r\n\t\t\ttranslateX: value,\r\n\t\t});\r\n\t}\r\n\r\n\tUNSAFE_componentWillMount() {\r\n\t\t// Store.addListener({ field: \"activeTab\" }, this.onActiveTabChanged);\r\n\t\tStore.addListener({ field: \"tabs\" }, this.onTabsChanged);\r\n\t\tStore.addListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\twindow.addEventListener(\"resize\", this.onWindowResizeThrottled);\r\n\t\tlet boundingBox = this.refs.Me.getBoundingClientRect();\r\n\t\tthis.setState({\r\n\t\t\tboundingBox: boundingBox,\r\n\t\t\ttabWidth: this.getTabWidth({ boundingBox }),\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\t// Store.removeListener({ field: \"activeTab\" }, this.onActiveTabChanged);\r\n\t\tStore.removeListener({ field: \"tabs\" }, this.onTabsChanged);\r\n\t\tStore.removeListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\r\n\t\twindow.removeEventListener(\"resize\", this.onWindowResizeThrottled);\r\n\t}\r\n\r\n\thoverAction(newHoverState) {\r\n\t\tthis.setState({ hoverState: newHoverState });\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet { translateX } = this.state;\r\n\t\ttranslateX = Math.abs(translateX);\r\n\t\t// If we have just 1 tab, we render the title. Unless someone is dragging a tab around - in that case, we will render the tab view, even though we only have 1.\r\n\r\n\t\tlet componentToRender = \"title\";\r\n\t\tif (this.state.tabs.length === 1) {\r\n\t\t\tif (this.props.listenForDragOver && !this.state.iAmDragging) {\r\n\t\t\t\tcomponentToRender = \"tabs\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.state.tabs.length > 1) {\r\n\t\t\tcomponentToRender = \"tabs\";\r\n\t\t}\r\n\t\t// Cleanup in case we were translated before closing the second to last tab. This left-aligns the title.\r\n\t\tif (componentToRender === \"title\") {\r\n\t\t\ttranslateX = 0;\r\n\t\t}\r\n\r\n\t\tif (this.refs.Me) {\r\n\t\t\tthis.refs.Me.scrollLeft = translateX;\r\n\t\t}\r\n\r\n\t\tlet moveAreaClasses = \"fsbl-tab-region-drag-area\";\r\n\t\tif (this.isTabRegionOverflowing()) {\r\n\t\t\tmoveAreaClasses = `${moveAreaClasses} gradient`;\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<div\r\n\t\t\t\tref=\"Me\"\r\n\t\t\t\tonDragLeave={this.dragLeave}\r\n\t\t\t\tclassName={this.props.className}\r\n\t\t\t\tonWheel={this.onMouseWheel}\r\n\t\t\t\tonScroll={this.onMouseWheel}\r\n\t\t\t\tonDrop={this.drop}\r\n\t\t\t\tonDragOver={this.dragOver}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"tab-region-wrapper\">\r\n\t\t\t\t\t{componentToRender === \"title\" && renderTitle()}\r\n\t\t\t\t\t{componentToRender === \"tabs\" && renderTabs()}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n\r\n/**\r\n * Function to render the title. Helps keep the render code clean.\r\n */\r\nfunction renderTitle() {\r\n\treturn (\r\n\t\t<div\r\n\t\t\tdraggable=\"true\"\r\n\t\t\tonDragStart={(e) => {\r\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag start - TITLE\");\r\n\t\t\t\tlet activeIdentifier = finsembleWindow.identifier;\r\n\t\t\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\t\t\tthis.startDrag(e, activeIdentifier);\r\n\t\t\t}}\r\n\t\t\tonDragEnd={this.stopDrag}\r\n\t\t\tdata-hover={this.state.hoverState}\r\n\t\t\tclassName={\"fsbl-header-title\"}\r\n\t\t>\r\n\t\t\t<FinsembleHoverDetector edge=\"top\" hoverAction={this.hoverAction.bind(this)} />\r\n\t\t\t<Title\r\n\t\t\t\tonUpdate={this.props.onTitleUpdated}\r\n\t\t\t\twindowIdentifier={FSBL.Clients.WindowClient.getWindowIdentifier()}\r\n\t\t\t></Title>\r\n\t\t</div>\r\n\t);\r\n}\r\n\r\n/**\r\n * Renders the array of tabs.\r\n * @param {*} props\r\n */\r\nfunction renderTabs() {\r\n\tlet titleWidth = this.state.tabWidth - ICON_AREA - CLOSE_BUTTON_MARGIN;\r\n\treturn this.state.tabs.map((tab) => (\r\n\t\t<Tab\r\n\t\t\tonClick={() => {\r\n\t\t\t\tthis.setActiveTab(tab);\r\n\t\t\t}}\r\n\t\t\tdraggable=\"true\"\r\n\t\t\tkey={tab.windowName} // this is a unique identifier for React so it knows when to update the DOM\r\n\t\t\tclassName={this.getTabClasses(tab)}\r\n\t\t\tonDragStart={(e, identifier) => {\r\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag - TAB\", identifier.windowName);\r\n\t\t\t\tthis.startDrag(e, identifier);\r\n\t\t\t}}\r\n\t\t\tonDrop={this.drop}\r\n\t\t\tonDragEnd={this.stopDrag}\r\n\t\t\tonTabClose={() => {\r\n\t\t\t\tthis.onTabClosed(tab);\r\n\t\t\t}}\r\n\t\t\tonTabDraggedOver={this.onTabDraggedOver}\r\n\t\t\tlistenForDragOver={this.props.listenForDragOver}\r\n\t\t\ttabWidth={this.state.tabWidth}\r\n\t\t\ttitleWidth={titleWidth}\r\n\t\t\twindowIdentifier={tab}\r\n\t\t/>\r\n\t));\r\n}\r\n"]}
1
+ {"version":3,"file":"TabList.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/center/TabList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,SAAS,MAAM,iBAAiB,CAAC;AAYxC,IAAI,SAAS,GAAG,GAAG,CAAC;AAEpB,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAM7B,SAAS,OAAO,CAAC,KAAmB;IACnC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAA6B,SAAS,CAAC,CAAC;IAE9F,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QAEpB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,CAAC,GAAkB,EAAE,KAAa,EAAE,EAAE;YAC9G,IAAI,KAAK;gBAAE,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;QACnC,CAA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finsemble/finsemble-core/types/types\";\r\nimport Tab from \"./Tab\";\r\nimport { FinsembleHoverDetector } from \"../../../legacyControls/FinsembleHoverDetector\";\r\nimport { Store, Actions } from \"../../stores/windowTitleBarStore\";\r\nimport { Title } from \"../windowTitle\";\r\nimport _throttle from \"lodash/throttle\";\r\n\r\nimport {\r\n\tEditTabProps,\r\n\tTabListProps,\r\n\tTabListState,\r\n\tGetTabWidthParams,\r\n\tTabProperties,\r\n\tValueOf,\r\n} from \"../../../../types/windowTitleBar\";\r\nimport { WindowIdentifier } from \"@finsemble/finsemble-core\";\r\n\r\nlet TAB_WIDTH = 300;\r\n// Next two items are for calculating how large the title should be within a tab.\r\nconst ICON_AREA = 16;\r\nconst CLOSE_BUTTON_MARGIN = 12;\r\nconst MINIMUM_TAB_SIZE = 100;\r\n\r\n/**\r\n * The wrapper component for tab renaming\r\n * @param {*} props\r\n */\r\nfunction EditTab(props: EditTabProps) {\r\n\tconst [editingTitle, setEditingTitle] = React.useState(false);\r\n\tconst [clickTimeout, setClickTimeout] = React.useState<NodeJS.Timeout | undefined>(undefined);\r\n\r\n\tReact.useEffect(() => {\r\n\t\t//Update document title cause after restart it has a default value which doesn't equal to persisted title.\r\n\t\tFSBL.Clients.WindowClient.getComponentState({ field: \"persistedTitle\" }, (err: StandardError, title: string) => {\r\n\t\t\tif (title) document.title = title;\r\n\t\t});\r\n\t}, []);\r\n\r\n\tconst inputEl = React.useRef<HTMLInputElement>(null);\r\n\tconst updateTabTitle = (e: React.KeyboardEvent<HTMLInputElement> | React.FocusEvent<HTMLInputElement>) => {\r\n\t\tconst title = (e.target as HTMLInputElement).value;\r\n\t\tFSBL.Clients.WindowClient.setComponentState({\r\n\t\t\tfield: \"persistedTitle\",\r\n\t\t\tvalue: title,\r\n\t\t});\r\n\t\tdocument.title = title;\r\n\t\tsetEditingTitle(false);\r\n\t};\r\n\r\n\tconst beginEditing = async () => {\r\n\t\tawait setEditingTitle(true);\r\n\t\tawait inputEl?.current?.focus();\r\n\t\tif (inputEl?.current) {\r\n\t\t\tinputEl.current.value = document.title;\r\n\t\t}\r\n\t};\r\n\r\n\tconst clickHandler = () => {\r\n\t\tif (clickTimeout !== null) {\r\n\t\t\t// double click\r\n\t\t\tbeginEditing();\r\n\t\t} else if (!editingTitle) {\r\n\t\t\t// single click\r\n\t\t\tlet timeout = setTimeout(() => {\r\n\t\t\t\tclearTimeout(clickTimeout);\r\n\t\t\t\tsetClickTimeout(undefined);\r\n\t\t\t}, 500);\r\n\t\t\tsetClickTimeout(timeout);\r\n\t\t\tif (props.tab && props.setActiveTab) props.setActiveTab(props.tab);\r\n\t\t}\r\n\t};\r\n\r\n\tconst blurHandler = (e: React.FocusEvent<HTMLInputElement>) => {\r\n\t\tupdateTabTitle(e);\r\n\t\tsetEditingTitle(false);\r\n\t};\r\n\r\n\tconst keyDownHandler = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n\t\te.key === \"Enter\" && updateTabTitle(e);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tid=\"tab-editor\"\r\n\t\t\t//We can't use Click and Dblclick events together cause for one dblclick fires two click events which close title editor.\r\n\t\t\t//Workaround with setTimeout should resolve this behaviour.\r\n\t\t\tonClick={clickHandler}\r\n\t\t>\r\n\t\t\t{editingTitle ? (\r\n\t\t\t\t<div className=\"fsbl-tab fsbl-active-tab\" style={{ width: props.tabWidth || \"auto\" }}>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tref={inputEl}\r\n\t\t\t\t\t\tonBlur={blurHandler}\r\n\t\t\t\t\t\tonKeyDown={keyDownHandler}\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tclassName=\"tab__input\"\r\n\t\t\t\t\t\tmaxLength={32}\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t) : (\r\n\t\t\t\tprops.children\r\n\t\t\t)}\r\n\t\t</div>\r\n\t);\r\n}\r\n\r\nexport class TabList extends React.Component<TabListProps, TabListState> {\r\n\tmousePositionOnDragEnd: { x: number; y: number };\r\n\r\n\tonWindowResizeThrottled: (this: Window, ev: UIEvent) => any;\r\n\r\n\tconstructor(props: TabListProps) {\r\n\t\tsuper(props);\r\n\t\tlet initialState = Store.getValues([\"activeTab\", \"tabs\"]);\r\n\t\tlet activeIdentifier = finsembleWindow.identifier as typeof finsembleWindow.identifier & { title: string };\r\n\r\n\t\tif (activeIdentifier) {\r\n\t\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\t}\r\n\t\tthis.state = {\r\n\t\t\ttranslateX: 0,\r\n\t\t\ttabs: initialState.tabs,\r\n\t\t\tactiveTab: activeIdentifier as TabProperties,\r\n\t\t\tboundingBox: {\r\n\t\t\t\tright: 0,\r\n\t\t\t\tleft: 0,\r\n\t\t\t\ttop: 0,\r\n\t\t\t\tbottom: 0,\r\n\t\t\t\theight: 0,\r\n\t\t\t\twidth: 0,\r\n\t\t\t},\r\n\t\t\tiAmDragging: false,\r\n\t\t\thoverState: \"false\",\r\n\t\t\ttabWidth: TAB_WIDTH,\r\n\t\t\thoveredTabIndex: 0,\r\n\t\t};\r\n\t\tthis.onWindowResizeThrottled = () => {};\r\n\t\tthis.bindCorrectContext();\r\n\t\tthis.mousePositionOnDragEnd = {\r\n\t\t\tx: 0,\r\n\t\t\ty: 0,\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Make sure that _this_ is correct inside of our event handlers.\r\n\t */\r\n\tbindCorrectContext() {\r\n\t\tthis.startDrag = this.startDrag.bind(this);\r\n\t\tthis.stopDrag = this.stopDrag.bind(this);\r\n\t\tthis.cancelTabbing = this.cancelTabbing.bind(this);\r\n\t\tthis.drop = this.drop.bind(this);\r\n\t\tthis.dragOver = this.dragOver.bind(this);\r\n\t\tthis.dragLeave = this.dragLeave.bind(this);\r\n\t\tthis.onMouseWheel = this.onMouseWheel.bind(this);\r\n\t\tthis.renderTitle = this.renderTitle.bind(this);\r\n\t\tthis.renderTabs = this.renderTabs.bind(this);\r\n\t\tthis.findTabIndex = this.findTabIndex.bind(this);\r\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\r\n\t\tthis.onTabAdded = this.onTabAdded.bind(this);\r\n\t\tthis.onTabClosed = this.onTabClosed.bind(this);\r\n\t\tthis.setActiveTab = this.setActiveTab.bind(this);\r\n\t\tthis.onStoreChanged = this.onStoreChanged.bind(this);\r\n\t\t// this.onActiveTabChanged = this.onActiveTabChanged.bind(this);\r\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\r\n\t\tthis.onTabDraggedOver = this.onTabDraggedOver.bind(this);\r\n\t\tthis.isTabRegionOverflowing = this.isTabRegionOverflowing.bind(this);\r\n\t\tthis.onWindowResize = this.onWindowResize.bind(this);\r\n\t\tthis.onWindowResizeThrottled = _throttle(this.onWindowResize, 100);\r\n\t\tthis.getTabWidth = this.getTabWidth.bind(this);\r\n\t\tthis.setTabListTranslateX = this.setTabListTranslateX.bind(this);\r\n\t\tthis.onTabListTranslateChanged = this.onTabListTranslateChanged.bind(this);\r\n\t}\r\n\r\n\tgetTabWidth(params: GetTabWidthParams = {}) {\r\n\t\tlet { boundingBox, tabList } = params;\r\n\t\tif (typeof tabList === \"undefined\") {\r\n\t\t\ttabList = this.state.tabs;\r\n\t\t}\r\n\t\tif (typeof boundingBox === \"undefined\") {\r\n\t\t\tboundingBox = (this.refs.Me as HTMLElement).getBoundingClientRect();\r\n\t\t}\r\n\t\tif (typeof boundingBox.right === \"undefined\") {\r\n\t\t\treturn TAB_WIDTH;\r\n\t\t}\r\n\t\tlet containerWidth = boundingBox.right - boundingBox.left;\r\n\t\tlet newTabWidth = containerWidth / tabList.length;\r\n\r\n\t\treturn newTabWidth < MINIMUM_TAB_SIZE ? MINIMUM_TAB_SIZE : newTabWidth;\r\n\t}\r\n\r\n\t/**\r\n\t * Resize handler. Calculates the space that the center-region is taking up. May be used to scale tabs proportionally.\r\n\t */\r\n\tonWindowResize() {\r\n\t\tlet bounds = (this.refs.Me as HTMLElement).getBoundingClientRect();\r\n\t\tthis.setState({\r\n\t\t\tboundingBox: bounds,\r\n\t\t\ttabWidth: this.getTabWidth(),\r\n\t\t});\r\n\t}\r\n\r\n\tfindTabIndex(tab: TabProperties) {\r\n\t\treturn this.state.tabs.findIndex((el) => tab.windowName === el.windowName && tab.uuid === el.uuid);\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t * Function that's called when this component fires the onDragStart event, this will start the tiling or tabbing process\r\n\t *\r\n\t * @param e The SyntheticEvent created by React when the startdrag event is called\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tstartDrag(e: React.DragEvent<HTMLDivElement>, windowIdentifier: WindowIdentifier) {\r\n\t\tthis.setState({\r\n\t\t\tiAmDragging: true,\r\n\t\t});\r\n\t\te.dataTransfer.setData(\"application/fsbl-tab-data\", JSON.stringify(windowIdentifier));\r\n\t\tFSBL.Clients.WindowClient.startTilingOrTabbing({\r\n\t\t\twindowIdentifier: windowIdentifier,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the react component detects a drop (or stop drag, which is equivalent)\r\n\t *\r\n\t * @param e The SyntheticEvent created by React when the stopdrag event is called\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tstopDrag(e: React.DragEvent<HTMLDivElement>) {\r\n\t\t// We don't want onDropHandler() in windowTitleBarComponent.jsx\r\n\t\t// to handle this drop event, so we call event.stopPropagation().\r\n\t\te.stopPropagation();\r\n\t\tFSBL.Clients.Logger.system.debug(\"Tab stopDrag.\");\r\n\t\tthis.mousePositionOnDragEnd = {\r\n\t\t\tx: e.nativeEvent.screenX,\r\n\t\t\ty: e.nativeEvent.screenY,\r\n\t\t};\r\n\r\n\t\tconst { boundingBox } = this.state;\r\n\t\tFSBL.Clients.WindowClient.getBounds((err: StandardError, bounds: { top: number; left: number }) => {\r\n\t\t\t// We ONLY want to know if we're in the tab region!\r\n\t\t\tconst tabRegion = {\r\n\t\t\t\ttop: boundingBox.top + bounds.top,\r\n\t\t\t\tbottom: boundingBox.bottom + bounds.top,\r\n\t\t\t\tleft: boundingBox.left + bounds.left,\r\n\t\t\t\tright: boundingBox.right + bounds.left,\r\n\t\t\t\twidth: 0,\r\n\t\t\t\theight: 0,\r\n\t\t\t};\r\n\t\t\tif (!FSBL.Clients.WindowClient.isPointInBox(this.mousePositionOnDragEnd, tabRegion)) {\r\n\t\t\t\t// allow for a 50ms delay so this message goes after a drop message from a target window if tabbing\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({\r\n\t\t\t\t\t\tmousePosition: this.mousePositionOnDragEnd,\r\n\t\t\t\t\t});\r\n\t\t\t\t}, 50);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tiAmDragging: false,\r\n\t\t\t\t});\r\n\t\t\t\tthis.onWindowResize();\r\n\t\t\t} else {\r\n\t\t\t\t// sometimes a tab gets dropped in a bad spot where no action gets taken and we get stuck in tiling mode\r\n\t\t\t\t// to make sure nothing bad happens, call cancel after a similar 50ms delay\r\n\t\t\t\t// If some action was taken, this will be ignored by Finsemble\r\n\r\n\t\t\t\tconst setTimeoutCb = FSBL.Clients.WindowClient.cancelTilingOrTabbing(\r\n\t\t\t\t\t{ windowIdentifier: this.state.activeTab },\r\n\t\t\t\t\t() => {}\r\n\t\t\t\t);\r\n\t\t\t\tsetTimeout(() => setTimeoutCb, 50);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Helper function that will pull data from a drop event, parse it, and return it.\r\n\t * @param {event} e\r\n\t */\r\n\textractWindowIdentifier(e: React.DragEvent<HTMLElement>) {\r\n\t\ttry {\r\n\t\t\tlet identifier = JSON.parse(e.dataTransfer.getData(\"application/fsbl-tab-data\"));\r\n\t\t\t// If the \"identifier\" is formed properly, it'll have this properly. Otherwise, it's something else (e.g., share data, image, etc).\r\n\t\t\tif (typeof identifier.windowName !== \"undefined\") {\r\n\t\t\t\treturn identifier;\r\n\t\t\t} else if (identifier.waitForIdentifier) {\r\n\t\t\t\treturn identifier;\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Malformed drop object detected in windowTitleBar. Check tab dropping code. Expected windowIdentifier, got \",\r\n\t\t\t\t\tidentifier\r\n\t\t\t\t);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t} catch (e2) {\r\n\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\"Error in 'extractWindowIdentifier'. Check TabRegion.jsx. Either there was no data in the event, or it was a circular object that caused JSON.parse to fail. Javascript Error:\",\r\n\t\t\t\te2\r\n\t\t\t);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Called when a drop event occurs on the tab region. We (hope) that this came from a tab. Could be a share icon, an image, something else - that's why we check to see if the identifier exists before doing anything.\r\n\t * @param {event} e\r\n\t */\r\n\tdrop(e?: React.DragEvent<HTMLElement>) {\r\n\t\tlet identifier: any;\r\n\t\tif (e) {\r\n\t\t\te.preventDefault();\r\n\t\t\te.stopPropagation();\r\n\t\t\tidentifier = this.extractWindowIdentifier(e);\r\n\t\t}\r\n\t\tFSBL.Clients.Logger.system.debug(\"Tab drag drop.\");\r\n\t\tif (!identifier) return; // the dropped item is not a tab\r\n\t\tif (this.state.tabs.length === 1 && identifier.windowName === finsembleWindow.name)\r\n\t\t\treturn FSBL.Clients.WindowClient.cancelTilingOrTabbing({ windowIdentifier: this.state.activeTab }, () => {});\r\n\r\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true, action: \"tabbing\" }, () => {\r\n\t\t\tFSBL.Clients.RouterClient.transmit(\"tabbingDragEnd\", { success: true });\r\n\t\t\tif (identifier && identifier.windowName) {\r\n\t\t\t\t// Calls a method defined inside of windowTitleBar.jsx.\r\n\t\t\t\tthis.onTabAdded(identifier, this.state.hoveredTabIndex);\r\n\t\t\t} else if (identifier && identifier.waitForIdentifier) {\r\n\t\t\t\tlet subscribeId: { subscribeID: string; topic: string };\r\n\t\t\t\tlet tabIdentifierSubscriber = (err: StandardError, response: { data: TabProperties }) => {\r\n\t\t\t\t\tif (!response.data.windowName) return;\r\n\t\t\t\t\tFSBL.Clients.RouterClient.unsubscribe(subscribeId);\r\n\t\t\t\t\tthis.onTabAdded(response.data, this.state.hoveredTabIndex);\r\n\t\t\t\t};\r\n\t\t\t\tsubscribeId = FSBL.Clients.RouterClient.subscribe(`Finsemble.${identifier.guid}`, tabIdentifierSubscriber);\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t\"Unexpected drop event on window title bar. Check the 'drop' method on TabRegion.jsx.\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tisTabRegionOverflowing() {\r\n\t\tlet lastTab = {\r\n\t\t\tright: this.state.tabs.length * this.state.tabWidth,\r\n\t\t};\r\n\t\treturn lastTab.right + this.state.translateX > this.state.boundingBox.right - this.state.boundingBox.left;\r\n\t}\r\n\r\n\t/**\r\n\t * Event handler for when a user wheels inside of the tab region. We translate the deltaY that the event provides into horizontal movement. The translateX value that we return will be used in the render method below.\r\n\t * @param {event} e\r\n\t * @todo This should probably be refactored into separate handlers for scroll and mousewheel to account for the differences in event properties. For now, we will intersection the types and ts ignore errors from callers\r\n\t */\r\n\tonMouseWheel(e: React.WheelEvent & React.UIEvent) {\r\n\t\te.preventDefault();\r\n\t\tlet numTabs = this.state.tabs.length;\r\n\t\tlet translateX = 0;\r\n\t\t// If there's more than one tab, do some calculations, otherwise we aren't going to scroll this region, no matter how much the user wants us to.\r\n\t\tif (numTabs > 1) {\r\n\t\t\tlet currentX = (this.refs.Me as HTMLElement).scrollLeft;\r\n\t\t\tlet { boundingBox } = this.state;\r\n\t\t\t// Figure out position of first tab and last tab.\r\n\t\t\tlet firstTab = {\r\n\t\t\t\tleft: 0 + boundingBox.left,\r\n\t\t\t};\r\n\t\t\tlet lastTab = {\r\n\t\t\t\tright: numTabs * this.state.tabWidth,\r\n\t\t\t};\r\n\t\t\tlet deltaX = this.state.tabWidth / 3;\r\n\t\t\t// @ts-ignore\r\n\t\t\tif (e.nativeEvent.deltaY < 0) {\r\n\t\t\t\tdeltaX = 0 - deltaX;\r\n\t\t\t}\r\n\t\t\t// Mouses with high sensitivity will cause massive scroll amounts. We don't want to scroll more than one tab's width in a single mouse wheel, otherwise you risk missing a tab.\r\n\t\t\tif (Math.abs(deltaX) > this.state.tabWidth) {\r\n\t\t\t\tlet isNegative = false;\r\n\t\t\t\tif (deltaX < 0) {\r\n\t\t\t\t\tisNegative = true;\r\n\t\t\t\t}\r\n\t\t\t\tdeltaX = isNegative ? 0 - this.state.tabWidth : this.state.tabWidth;\r\n\t\t\t}\r\n\r\n\t\t\t// when we set scrollLeft on the element, this event fires. But there's no actual event. so stop.\r\n\t\t\tif (!e.nativeEvent.deltaY) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tlet originalDeltaY = e.nativeEvent.deltaY;\r\n\t\t\tlet deltaY = originalDeltaY;\r\n\t\t\tif (Math.abs(originalDeltaY) > this.state.tabWidth / 3) {\r\n\t\t\t\tdeltaY = this.state.tabWidth / 3;\r\n\t\t\t\tif (originalDeltaY < 0) {\r\n\t\t\t\t\tdeltaY = 0 - deltaY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttranslateX = deltaY + currentX;\r\n\t\t\tlet maxRight = boundingBox.right - this.state.tabWidth;\r\n\t\t\tlet newRightForLastTab = lastTab.right + translateX;\r\n\t\t\tlet newLeftForFirstTab = firstTab.left + translateX;\r\n\t\t\t// Do not let the left of the first tab move to the right of the left edge of the bounding box.\r\n\t\t\tif (newLeftForFirstTab < 0) {\r\n\t\t\t\treturn this.scrollToFirstTab();\r\n\t\t\t} else if (e.nativeEvent.deltaY < 0 && newRightForLastTab <= boundingBox.right) {\r\n\t\t\t\t// ONLY IF the user is scrolling from right-to-left (deltaY will be negative). IF they try to do that, do not allow the right edge of the last tab to detach.\r\n\t\t\t\treturn this.scrollToLastTab();\r\n\t\t\t}\r\n\t\t\t// Else, the translation is okay. We're in the middle of our list and the first and last tabs aren't being rendered improperly.\r\n\t\t\ttranslateX < 0 ? (translateX = 0) : translateX;\r\n\t\t\tthis.setState({ translateX });\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to our active tab.\r\n\t */\r\n\tscrollToActiveTab() {\r\n\t\tthis.scrollToTab(this.state.activeTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to the first tab in our list of tabs.\r\n\t */\r\n\tscrollToFirstTab() {\r\n\t\tlet firstTab = this.state.tabs[0];\r\n\t\tthis.scrollToTab(firstTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Scrolls to the last tab in our list of tabs\r\n\t */\r\n\tscrollToLastTab() {\r\n\t\tlet lastTab = this.state.tabs[this.state.tabs.length - 1];\r\n\t\tthis.scrollToTab(lastTab);\r\n\t}\r\n\r\n\t/**\r\n\t * Function that will horizontally scroll the tab region so that the right edge of the tab lines up with the right edge of the tab region.\r\n\t * @param {} tab\r\n\t */\r\n\tscrollToTab(tab: TabProperties) {\r\n\t\t// 'BoundingBox' is just the boundingClientRect of the tab region. It is, in essence, the center part of the windowTitleBar.\r\n\t\tlet { boundingBox } = this.state;\r\n\r\n\t\tlet tabIndex = this.state.tabs.findIndex((el) => el.windowName === tab.windowName && el.uuid === tab.uuid);\r\n\t\tif (tabIndex > -1) {\r\n\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\r\n\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\r\n\t\t\tlet translateX = rightEdgeOfTab;\r\n\t\t\t// Our translation is this: Take the right edge of the bounding box, and subtract the left edge. This gives us the 0 point for the box. Then, we subtract the right edge of the tab. The result is a number that we use to shift the entire element and align the right edge of the tab with the right edge of the bounding box. We also account for the 30 px region on the right.\r\n\r\n\t\t\t// If there's no overflow, we don't scroll.\r\n\t\t\tif (rightEdgeOfTab < boundingBox.right) {\r\n\t\t\t\ttranslateX = 0;\r\n\t\t\t} else {\r\n\t\t\t\t// Other tabs are less simple.\r\n\t\t\t\tlet leftEdgeOfTab = tabIndex * this.state.tabWidth;\r\n\t\t\t\tlet rightEdgeOfTab = leftEdgeOfTab + this.state.tabWidth;\r\n\t\t\t\t// Our translation is this: Take the right edge of the bounding box, and subtract the left edge. This gives us the 0 point for the box. Then, we subtract the right edge of the tab. The result is a number that we use to shift the entire element and align the right edge of the tab with the right edge of the bounding box.\r\n\t\t\t\ttranslateX = boundingBox.right - boundingBox.left - rightEdgeOfTab;\r\n\t\t\t\t// If there's no overflow, we don't scroll.\r\n\t\t\t\tif (rightEdgeOfTab < boundingBox.right) {\r\n\t\t\t\t\ttranslateX = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.setTabListTranslateX(translateX);\r\n\t\t}\r\n\t}\r\n\r\n\tsetTabListTranslateX(translateX: number) {\r\n\t\tActions.setTabListScrollPosition(translateX);\r\n\t}\r\n\r\n\t/**\r\n\t * Someone is dragging _something_ over the tab region. We respond by rendering the ghost tab.\r\n\t * @param {event} e\r\n\t */\r\n\tdragOver(e: React.DragEvent) {\r\n\t\te.preventDefault();\r\n\t}\r\n\r\n\t/**\r\n\t * Triggered when the user moves their mouse out of the tabRegion after a dragOver event happens. When they leave, we hide our placeholder tab.\r\n\t * @param {event} e\r\n\t */\r\n\tdragLeave(e: React.DragEvent<HTMLDivElement>) {\r\n\t\tlet boundingRect = this.state.boundingBox;\r\n\t\tif (!FSBL.Clients.WindowClient.isPointInBox({ x: e.screenX, y: e.screenY }, boundingRect)) {\r\n\t\t\tthis.setState({\r\n\t\t\t\thoveredTabIndex: undefined,\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set to a timeout. An event is sent to the RouterClient which will be handled by the drop handler on the window.\r\n\t * In the event that a drop handler never fires to stop tiling or tabbing, this will take care of it.\r\n\t *\r\n\t * @memberof windowTitleBar\r\n\t */\r\n\tcancelTabbing() {\r\n\t\tFSBL.Clients.WindowClient.stopTilingOrTabbing({ allowDropOnSelf: true });\r\n\t\tthis.onWindowResize();\r\n\t}\r\n\r\n\t/**\r\n\t * Basically exists just to keep the render method clean. Gives conditional classes to the active tab.\r\n\t * @param {tab} tab\r\n\t */\r\n\tgetTabClasses(tab: TabProperties) {\r\n\t\tlet classes = \"fsbl-tab\";\r\n\t\tlet tabIndex = this.findTabIndex(tab);\r\n\t\tif (tabIndex === this.state.hoveredTabIndex) classes = `${classes} ghost-tab`;\r\n\t\tif (this.state.activeTab && tab.windowName === this.state.activeTab.windowName) {\r\n\t\t\tclasses = `${classes} fsbl-active-tab`;\r\n\t\t}\r\n\t\treturn classes;\r\n\t}\r\n\r\n\tonTabDraggedOver(e: React.DragEvent<HTMLElement>, tabDraggedOver: TabProperties) {\r\n\t\te.preventDefault();\r\n\t\t// Find index of tab.\r\n\t\tlet tabIndex = this.findTabIndex(tabDraggedOver);\r\n\t\tthis.setState({\r\n\t\t\thoveredTabIndex: tabIndex,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * OnClick handler for the close button on individual tabs.\r\n\t * @PLACEHOLDER will interact with tabbing API\r\n\t * @param {*} tab\r\n\t */\r\n\tonTabClosed(identifier: TabProperties) {\r\n\t\tActions.closeTab(identifier);\r\n\t}\r\n\r\n\t/**\r\n\t * drop handler for the tab region.\r\n\t * @param {*} tab\r\n\t */\r\n\tonTabAdded(identifier: TabProperties, newIndex: number | undefined) {\r\n\t\tif (newIndex === -1) {\r\n\t\t\tnewIndex = undefined;\r\n\t\t}\r\n\r\n\t\tlet myIdentifier = finsembleWindow.identifier as typeof finsembleWindow.identifier & { title: string };\r\n\t\tif (myIdentifier) {\r\n\t\t\tmyIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\t}\r\n\t\tif (this.state.tabs.length === 1 && identifier.windowName == myIdentifier.windowName) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (typeof newIndex === \"number\") {\r\n\t\t\tActions.reorderTab(identifier, newIndex);\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\thoveredTabIndex: undefined,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * OnClick handler for individual tabs.\r\n\t * @PLACEHOLDER will interact with tabbing API\r\n\t * @param {*} tab\r\n\t */\r\n\tsetActiveTab(tab: TabProperties) {\r\n\t\tActions.setActiveTab(tab);\r\n\t}\r\n\r\n\tonStoreChanged(prop: keyof TabListState, value: ValueOf<TabListState>) {\r\n\t\t// @ts-ignore + TODO: rewrite this area to more explicitly set state by name, as TS expects primitive types for the current key+values being set\r\n\t\tthis.setState({\r\n\t\t\t[prop]: value,\r\n\t\t});\r\n\t}\r\n\r\n\tonTabsChanged(err: StandardError, response: { value: TabProperties[] }) {\r\n\t\tlet { value } = response;\r\n\t\tthis.setState({\r\n\t\t\ttabs: value,\r\n\t\t\ttabWidth: this.getTabWidth({ tabList: value }),\r\n\t\t});\r\n\t}\r\n\r\n\tonTabListTranslateChanged(err: StandardError, response: { value: number }) {\r\n\t\tlet { value } = response;\r\n\t\tthis.setState({\r\n\t\t\ttranslateX: value,\r\n\t\t});\r\n\t}\r\n\r\n\tUNSAFE_componentWillMount() {\r\n\t\t// Store.addListener({ field: \"activeTab\" }, this.onActiveTabChanged);\r\n\t\tStore.addListener({ field: \"tabs\" }, this.onTabsChanged);\r\n\t\tStore.addListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\twindow.addEventListener(\"resize\", this.onWindowResizeThrottled);\r\n\t\tlet boundingBox = (this.refs.Me as HTMLElement).getBoundingClientRect();\r\n\t\tthis.setState({\r\n\t\t\tboundingBox: boundingBox,\r\n\t\t\ttabWidth: this.getTabWidth({ boundingBox }),\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\t// Store.removeListener({ field: \"activeTab\" }, this.onActiveTabChanged);\r\n\t\tStore.removeListener({ field: \"tabs\" }, this.onTabsChanged);\r\n\t\tStore.removeListener({ field: \"tabListTranslateX\" }, this.onTabListTranslateChanged);\r\n\t\twindow.removeEventListener(\"resize\", this.onWindowResizeThrottled);\r\n\t}\r\n\r\n\thoverAction(newHoverState: string) {\r\n\t\tthis.setState({ hoverState: newHoverState });\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet { translateX } = this.state;\r\n\t\ttranslateX = Math.abs(translateX);\r\n\t\t// If we have just 1 tab, we render the title. Unless someone is dragging a tab around - in that case, we will render the tab view, even though we only have 1.\r\n\r\n\t\tlet componentToRender = \"title\";\r\n\t\tif (this.state.tabs.length === 1) {\r\n\t\t\tif (this.props.listenForDragOver && !this.state.iAmDragging) {\r\n\t\t\t\tcomponentToRender = \"tabs\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.state.tabs.length > 1) {\r\n\t\t\tcomponentToRender = \"tabs\";\r\n\t\t}\r\n\t\t// Cleanup in case we were translated before closing the second to last tab. This left-aligns the title.\r\n\t\tif (componentToRender === \"title\") {\r\n\t\t\ttranslateX = 0;\r\n\t\t}\r\n\r\n\t\tif (this.refs.Me) {\r\n\t\t\t(this.refs.Me as HTMLElement).scrollLeft = translateX;\r\n\t\t}\r\n\r\n\t\tlet moveAreaClasses = \"fsbl-tab-region-drag-area\";\r\n\t\tif (this.isTabRegionOverflowing()) {\r\n\t\t\tmoveAreaClasses = `${moveAreaClasses} gradient`;\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<div\r\n\t\t\t\tref=\"Me\"\r\n\t\t\t\tonDragLeave={this.dragLeave}\r\n\t\t\t\tclassName={this.props.className}\r\n\t\t\t\tonWheel={this.onMouseWheel}\r\n\t\t\t\t// @ts-ignore\r\n\t\t\t\tonScroll={this.onMouseWheel}\r\n\t\t\t\tonDrop={this.drop}\r\n\t\t\t\tonDragOver={this.dragOver}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"tab-region-wrapper\">\r\n\t\t\t\t\t{componentToRender === \"title\" && this.renderTitle()}\r\n\t\t\t\t\t{componentToRender === \"tabs\" && this.renderTabs()}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Function to render the title. Helps keep the render code clean.\r\n\t */\r\n\trenderTitle() {\r\n\t\treturn (\r\n\t\t\t<EditTab>\r\n\t\t\t\t<div\r\n\t\t\t\t\tdraggable=\"true\"\r\n\t\t\t\t\tonDragStart={(e) => {\r\n\t\t\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag start - TITLE\");\r\n\t\t\t\t\t\tlet activeIdentifier = finsembleWindow.identifier as typeof finsembleWindow.identifier & { title: string };\r\n\t\t\t\t\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\t\t\t\t\tthis.startDrag(e, activeIdentifier);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tonDragEnd={this.stopDrag}\r\n\t\t\t\t\tdata-hover={this.state.hoverState}\r\n\t\t\t\t\tclassName={\"fsbl-header-title\"}\r\n\t\t\t\t>\r\n\t\t\t\t\t<FinsembleHoverDetector edge=\"top\" hoverAction={this.hoverAction.bind(this)} />\r\n\t\t\t\t\t<Title\r\n\t\t\t\t\t\tonUpdate={this.props.onTitleUpdated}\r\n\t\t\t\t\t\twindowIdentifier={FSBL.Clients.WindowClient.getWindowIdentifier()}\r\n\t\t\t\t\t></Title>\r\n\t\t\t\t</div>\r\n\t\t\t</EditTab>\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Renders the array of tabs.\r\n\t * @param {*} props\r\n\t */\r\n\trenderTabs() {\r\n\t\tlet titleWidth = this.state.tabWidth - ICON_AREA - CLOSE_BUTTON_MARGIN;\r\n\r\n\t\treturn this.state.tabs.map((tab) => (\r\n\t\t\t<EditTab tabWidth={this.state.tabWidth} key={tab.windowName} tab={tab} setActiveTab={this.setActiveTab}>\r\n\t\t\t\t<Tab\r\n\t\t\t\t\tdraggable=\"true\"\r\n\t\t\t\t\tkey={tab.windowName} // this is a unique identifier for React so it knows when to update the DOM\r\n\t\t\t\t\tclassName={this.getTabClasses(tab)}\r\n\t\t\t\t\tonDragStart={(e, identifier) => {\r\n\t\t\t\t\t\tFSBL.Clients.Logger.system.debug(\"Tab drag - TAB\", identifier.windowName);\r\n\t\t\t\t\t\tthis.startDrag(e, identifier);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tonDrop={this.drop}\r\n\t\t\t\t\tonDragEnd={this.stopDrag}\r\n\t\t\t\t\tonTabClose={() => {\r\n\t\t\t\t\t\tthis.onTabClosed(tab);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tonTabDraggedOver={this.onTabDraggedOver}\r\n\t\t\t\t\tlistenForDragOver={this.props.listenForDragOver}\r\n\t\t\t\t\ttabWidth={this.state.tabWidth}\r\n\t\t\t\t\ttitleWidth={titleWidth}\r\n\t\t\t\t\twindowIdentifier={tab}\r\n\t\t\t\t/>\r\n\t\t\t</EditTab>\r\n\t\t));\r\n\t}\r\n}\r\n"]}
@@ -19,6 +19,7 @@ const LinkerButtonRedux = () => {
19
19
  const state = useSelector((currentState) => currentState);
20
20
  const buttonRef = useRef(null);
21
21
  const showLinkerWindow = () => {
22
+ var _a, _b, _c;
22
23
  dispatch(actions.setActiveWindow({
23
24
  type: "linker/setActiveWindow",
24
25
  payload: {
@@ -28,11 +29,11 @@ const LinkerButtonRedux = () => {
28
29
  const linkerButton = buttonRef.current;
29
30
  if (linkerButton) {
30
31
  const linkerButtonDiv = linkerButton;
31
- const linkerParent = (linkerButtonDiv.offsetParent ?? linkerButtonDiv.parentElement);
32
+ const linkerParent = ((_a = linkerButtonDiv.offsetParent) !== null && _a !== void 0 ? _a : linkerButtonDiv.parentElement);
32
33
  const params = {
33
34
  position: "relative",
34
- left: linkerParent?.offsetLeft ?? 0,
35
- top: linkerParent?.offsetHeight ?? 0,
35
+ left: (_b = linkerParent === null || linkerParent === void 0 ? void 0 : linkerParent.offsetLeft) !== null && _b !== void 0 ? _b : 0,
36
+ top: (_c = linkerParent === null || linkerParent === void 0 ? void 0 : linkerParent.offsetHeight) !== null && _c !== void 0 ? _c : 0,
36
37
  forceOntoMonitor: true,
37
38
  spawnIfNotFound: false,
38
39
  };
@@ -53,7 +54,7 @@ const WhichLinker = () => {
53
54
  const [whichLinker, setWhichLinker] = React.useState("");
54
55
  useEffect(() => {
55
56
  (async () => {
56
- const { err, data } = await FSBL.Clients.ConfigClient.getValue({
57
+ const { data } = await FSBL.Clients.ConfigClient.getValue({
57
58
  field: "finsemble.servicesConfig.linker.enabled",
58
59
  });
59
60
  if (data) {
@@ -1 +1 @@
1
- {"version":3,"file":"LinkerButton.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,OAAO,EAAe,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElF,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAC9B,6BACC,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,EAClC,UAAU,EAAC,8BAA8B;IAEzC,4CAAqB;IACrB;QACC,8BACC,EAAE,EAAC,WAAW,EACd,CAAC,EAAC,yMAAyM,GAC1M;QACF,gCAAQ,EAAE,EAAC,WAAW,EAAC,CAAC,EAAC,QAAQ,EAAC,CAAC,EAAC,OAAO,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,E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AAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN;QACE,WAAW,KAAK,eAAe,IAAI,CACnC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK;YACrB,oBAAC,iBAAiB,OAAG,CACX,CACX;QACA,WAAW,KAAK,yBAAyB,IAAI,oBAAC,sBAAsB,OAAG,CACtE,CACH,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAA4B,GAAG,EAAE,CAAC,oBAAC,WAAW,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React, { useRef, useEffect } from \"react\";\r\nimport { SpawnParams } from \"services/window/Launcher/launcher\";\r\nimport { LinkerGroups } from \"./LinkerGroups\";\r\nimport { useDispatch, useSelector, Provider } from \"react-redux\";\r\nimport { actions, LinkerStore, store } from \"../../../linker/remoteRedux\";\r\nimport { LinkerButton as LinkerButtonDeprecated } from \"./LinkerButtonDeprecated\";\r\n\r\nconst LinkerButtonIcon = () => (\r\n\t<svg\r\n\t\twidth=\"15px\"\r\n\t\theight=\"15px\"\r\n\t\tviewBox=\"2 1 13 13\"\r\n\t\txmlns=\"http://www.w3.org/2000/svg\"\r\n\t\txmlnsXlink=\"http://www.w3.org/1999/xlink\"\r\n\t>\r\n\t\t<title>Linker</title>\r\n\t\t<defs>\r\n\t\t\t<path\r\n\t\t\t\tid=\"prefix__b\"\r\n\t\t\t\td=\"M17.925 15.425h-1v-2.5a2.5 2.5 0 0 0-5 0v2.5h-1v-2.5a3.5 3.5 0 1 1 7 0v2.5zm0 2v2.5a3.5 3.5 0 1 1-7 0v-2.5h1v2.5a2.5 2.5 0 0 0 5 0v-2.5h1zm-3.5-4a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0v-5a.5.5 0 0 1 .5-.5z\"\r\n\t\t\t/>\r\n\t\t\t<filter id=\"prefix__a\" x=\"-28.6%\" y=\"-7.1%\" width=\"157.1%\" height=\"128.6%\">\r\n\t\t\t\t<feOffset dy=\"1\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\" />\r\n\t\t\t\t<feGaussianBlur in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\" stdDeviation=\".5\" />\r\n\t\t\t\t<feColorMatrix in=\"shadowBlurOuter1\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0\" />\r\n\t\t\t</filter>\r\n\t\t</defs>\r\n\t\t<g transform=\"rotate(45 22.289 4.682)\" fillRule=\"nonzero\" fill=\"none\">\r\n\t\t\t<use filter=\"url(#prefix__a)\" xlinkHref=\"#prefix__b\" />\r\n\t\t\t<use xlinkHref=\"#prefix__b\" />\r\n\t\t</g>\r\n\t</svg>\r\n);\r\n\r\nconst LinkerButtonRedux: React.FunctionComponent = () => {\r\n\tconst dispatch = useDispatch();\r\n\tconst state: LinkerStore = useSelector((currentState: any) => currentState);\r\n\tconst buttonRef = useRef(null);\r\n\r\n\tconst showLinkerWindow = () => {\r\n\t\t//TODO, import this action creator from finsemble-core\r\n\t\tdispatch(\r\n\t\t\tactions.setActiveWindow({\r\n\t\t\t\ttype: \"linker/setActiveWindow\",\r\n\t\t\t\tpayload: {\r\n\t\t\t\t\twindowName: finsembleWindow.name,\r\n\t\t\t\t},\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\t// The offset parent is needed so that the menu isn't shown relative to the icon.\r\n\t\t// The HTMLElement.offsetParent read-only property returns a reference to the object which is the closest (nearest in the containment hierarchy) positioned containing element.\r\n\t\t// Necessary to cast because refs are type \"Element\" (which could be an SVGElement...)\r\n\r\n\t\tconst linkerButton = buttonRef.current;\r\n\t\tif (linkerButton) {\r\n\t\t\tconst linkerButtonDiv = linkerButton as HTMLElement;\r\n\t\t\tconst linkerParent = (linkerButtonDiv.offsetParent ?? linkerButtonDiv.parentElement) as HTMLElement;\r\n\r\n\t\t\tconst params: SpawnParams = {\r\n\t\t\t\tposition: \"relative\",\r\n\t\t\t\tleft: linkerParent?.offsetLeft ?? 0,\r\n\t\t\t\ttop: linkerParent?.offsetHeight ?? 0,\r\n\t\t\t\tforceOntoMonitor: true,\r\n\t\t\t\tspawnIfNotFound: false,\r\n\t\t\t};\r\n\t\t\tconst wi = {\r\n\t\t\t\tcomponentType: \"linkerWindow\",\r\n\t\t\t};\r\n\t\t\tFSBL.Clients.LauncherClient.toggleWindowOnClick(linkerButtonDiv, wi, params);\r\n\t\t}\r\n\t};\r\n\r\n\t// If this window is in the list of linker clients then display this button\r\n\t// @ts-ignore: finsembleWindow.name is possibly undefined\r\n\tconst displayMe = state.clients[finsembleWindow.name] !== undefined;\r\n\r\n\t// Add keyboard shortcut to launch the Linker Menu\r\n\t// Using `addBrowserHotkey` so that the linker menu is only launched when the user is focused on the titlebar\r\n\t// If we had used `addGlobalHotkey`, it would cause a lot of intermittent errors (linker menu would think it\r\n\t// was launched from the Notifications Center component for some reason, and would display incorrect channel\r\n\t// information, or float the linker menu in the wrong location. Lots of flakiness.)\r\n\tFSBL.Clients.HotkeyClient.addBrowserHotkey([\"CommandOrControl\", \"l\"], showLinkerWindow);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{displayMe && (\r\n\t\t\t\t<div ref={buttonRef} title=\"Link Data\" className=\"linkerSection\">\r\n\t\t\t\t\t<div className=\"fsbl-icon fsbl-linker\" onClick={showLinkerWindow}>\r\n\t\t\t\t\t\t<LinkerButtonIcon />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<LinkerGroups />\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\n/**\r\n * Picks whether to display the current or deprecated LinkerElement.\r\n * If config `finsemble.servicesConfig.linker.enabled` is set to true then the deprecated version will be used.\r\n *\r\n * This code should be removed once the linkerClient is removed from Finsemble.\r\n */\r\nconst WhichLinker = () => {\r\n\tconst [whichLinker, setWhichLinker] = React.useState(\"\");\r\n\r\n\tuseEffect(() => {\r\n\t\t(async () => {\r\n\t\t\tconst { err, data } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\t\tfield: \"finsemble.servicesConfig.linker.enabled\",\r\n\t\t\t});\r\n\t\t\tif (data) {\r\n\t\t\t\tsetWhichLinker(\"LinkerElementDeprecated\");\r\n\t\t\t} else {\r\n\t\t\t\tsetWhichLinker(\"LinkerElement\");\r\n\t\t\t}\r\n\t\t})();\r\n\t}, []);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{whichLinker === \"LinkerElement\" && (\r\n\t\t\t\t<Provider store={store}>\r\n\t\t\t\t\t<LinkerButtonRedux />\r\n\t\t\t\t</Provider>\r\n\t\t\t)}\r\n\t\t\t{whichLinker === \"LinkerElementDeprecated\" && <LinkerButtonDeprecated />}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nexport const LinkerButton: React.FunctionComponent = () => <WhichLinker />;\r\n"]}
1
+ {"version":3,"file":"LinkerButton.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,OAAO,EAAe,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAKlF,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAC9B,6BACC,KAAK,EAAC,MAAM,EACZ,MAAM,EAAC,MAAM,EACb,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,EAClC,UAAU,EAAC,8BAA8B;IAEzC,4CAAqB;IACrB;QACC,8BACC,EAAE,EAAC,WAAW,EACd,CAAC,EAAC,yMAAyM,GAC1M;QACF,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C;aAChD,CAAC,CAAC;YACH,IAAI,IAAI,EAAE;gBACT,cAAc,CAAC,yBAAyB,CAAC,CAAC;aAC1C;iBAAM;gBACN,cAAc,CAAC,eAAe,CAAC,CAAC;aAChC;QACF,CAAC,CAAC,EAAE,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN;QACE,WAAW,KAAK,eAAe,IAAI,CACnC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK;YACrB,oBAAC,iBAAiB,OAAG,CACX,CACX;QACA,WAAW,KAAK,yBAAyB,IAAI,oBAAC,sBAAsB,OAAG,CACtE,CACH,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAA4B,GAAG,EAAE,CAAC,oBAAC,WAAW,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React, { useRef, useEffect } from \"react\";\r\nimport { LinkerGroups } from \"./LinkerGroups\";\r\nimport { useDispatch, useSelector, Provider } from \"react-redux\";\r\nimport { actions, LinkerStore, store } from \"../../../linker/remoteRedux\";\r\nimport { LinkerButton as LinkerButtonDeprecated } from \"./LinkerButtonDeprecated\";\r\nimport { services } from \"@finsemble/finsemble-core\";\r\n\r\ntype SpawnParams = services.window.types.SpawnParams;\r\n\r\nconst LinkerButtonIcon = () => (\r\n\t<svg\r\n\t\twidth=\"15px\"\r\n\t\theight=\"15px\"\r\n\t\tviewBox=\"2 1 13 13\"\r\n\t\txmlns=\"http://www.w3.org/2000/svg\"\r\n\t\txmlnsXlink=\"http://www.w3.org/1999/xlink\"\r\n\t>\r\n\t\t<title>Linker</title>\r\n\t\t<defs>\r\n\t\t\t<path\r\n\t\t\t\tid=\"prefix__b\"\r\n\t\t\t\td=\"M17.925 15.425h-1v-2.5a2.5 2.5 0 0 0-5 0v2.5h-1v-2.5a3.5 3.5 0 1 1 7 0v2.5zm0 2v2.5a3.5 3.5 0 1 1-7 0v-2.5h1v2.5a2.5 2.5 0 0 0 5 0v-2.5h1zm-3.5-4a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-1 0v-5a.5.5 0 0 1 .5-.5z\"\r\n\t\t\t/>\r\n\t\t\t<filter id=\"prefix__a\" x=\"-28.6%\" y=\"-7.1%\" width=\"157.1%\" height=\"128.6%\">\r\n\t\t\t\t<feOffset dy=\"1\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\" />\r\n\t\t\t\t<feGaussianBlur in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\" stdDeviation=\".5\" />\r\n\t\t\t\t<feColorMatrix in=\"shadowBlurOuter1\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0\" />\r\n\t\t\t</filter>\r\n\t\t</defs>\r\n\t\t<g transform=\"rotate(45 22.289 4.682)\" fillRule=\"nonzero\" fill=\"none\">\r\n\t\t\t<use filter=\"url(#prefix__a)\" xlinkHref=\"#prefix__b\" />\r\n\t\t\t<use xlinkHref=\"#prefix__b\" />\r\n\t\t</g>\r\n\t</svg>\r\n);\r\n\r\nconst LinkerButtonRedux: React.FunctionComponent = () => {\r\n\tconst dispatch = useDispatch();\r\n\tconst state: LinkerStore = useSelector((currentState: any) => currentState);\r\n\tconst buttonRef = useRef(null);\r\n\r\n\tconst showLinkerWindow = () => {\r\n\t\t//TODO, import this action creator from finsemble-core\r\n\t\tdispatch(\r\n\t\t\tactions.setActiveWindow({\r\n\t\t\t\ttype: \"linker/setActiveWindow\",\r\n\t\t\t\tpayload: {\r\n\t\t\t\t\twindowName: finsembleWindow.name,\r\n\t\t\t\t},\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\t// The offset parent is needed so that the menu isn't shown relative to the icon.\r\n\t\t// The HTMLElement.offsetParent read-only property returns a reference to the object which is the closest (nearest in the containment hierarchy) positioned containing element.\r\n\t\t// Necessary to cast because refs are type \"Element\" (which could be an SVGElement...)\r\n\r\n\t\tconst linkerButton = buttonRef.current;\r\n\t\tif (linkerButton) {\r\n\t\t\tconst linkerButtonDiv = linkerButton as HTMLElement;\r\n\t\t\tconst linkerParent = (linkerButtonDiv.offsetParent ?? linkerButtonDiv.parentElement) as HTMLElement;\r\n\r\n\t\t\tconst params: SpawnParams = {\r\n\t\t\t\tposition: \"relative\",\r\n\t\t\t\tleft: linkerParent?.offsetLeft ?? 0,\r\n\t\t\t\ttop: linkerParent?.offsetHeight ?? 0,\r\n\t\t\t\tforceOntoMonitor: true,\r\n\t\t\t\tspawnIfNotFound: false,\r\n\t\t\t};\r\n\t\t\tconst wi = {\r\n\t\t\t\tcomponentType: \"linkerWindow\",\r\n\t\t\t};\r\n\t\t\tFSBL.Clients.LauncherClient.toggleWindowOnClick(linkerButtonDiv, wi, params);\r\n\t\t}\r\n\t};\r\n\r\n\t// If this window is in the list of linker clients then display this button\r\n\t// @ts-ignore: finsembleWindow.name is possibly undefined\r\n\tconst displayMe = state.clients[finsembleWindow.name] !== undefined;\r\n\r\n\t// Add keyboard shortcut to launch the Linker Menu\r\n\t// Using `addBrowserHotkey` so that the linker menu is only launched when the user is focused on the titlebar\r\n\t// If we had used `addGlobalHotkey`, it would cause a lot of intermittent errors (linker menu would think it\r\n\t// was launched from the Notifications Center component for some reason, and would display incorrect channel\r\n\t// information, or float the linker menu in the wrong location. Lots of flakiness.)\r\n\tFSBL.Clients.HotkeyClient.addBrowserHotkey([\"CommandOrControl\", \"l\"], showLinkerWindow);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{displayMe && (\r\n\t\t\t\t<div ref={buttonRef} title=\"Link Data\" className=\"linkerSection\">\r\n\t\t\t\t\t<div className=\"fsbl-icon fsbl-linker\" onClick={showLinkerWindow}>\r\n\t\t\t\t\t\t<LinkerButtonIcon />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<LinkerGroups />\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\n/**\r\n * Picks whether to display the current or deprecated LinkerElement.\r\n * If config `finsemble.servicesConfig.linker.enabled` is set to true then the deprecated version will be used.\r\n *\r\n * This code should be removed once the linkerClient is removed from Finsemble.\r\n */\r\nconst WhichLinker = () => {\r\n\tconst [whichLinker, setWhichLinker] = React.useState(\"\");\r\n\r\n\tuseEffect(() => {\r\n\t\t(async () => {\r\n\t\t\tconst { data } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\t\tfield: \"finsemble.servicesConfig.linker.enabled\",\r\n\t\t\t});\r\n\t\t\tif (data) {\r\n\t\t\t\tsetWhichLinker(\"LinkerElementDeprecated\");\r\n\t\t\t} else {\r\n\t\t\t\tsetWhichLinker(\"LinkerElement\");\r\n\t\t\t}\r\n\t\t})();\r\n\t}, []);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{whichLinker === \"LinkerElement\" && (\r\n\t\t\t\t<Provider store={store}>\r\n\t\t\t\t\t<LinkerButtonRedux />\r\n\t\t\t\t</Provider>\r\n\t\t\t)}\r\n\t\t\t{whichLinker === \"LinkerElementDeprecated\" && <LinkerButtonDeprecated />}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nexport const LinkerButton: React.FunctionComponent = () => <WhichLinker />;\r\n"]}
@@ -1,25 +1,5 @@
1
1
  export class LinkerButton extends React.Component<any, any, any> {
2
- static contextType: React.Context<{
3
- useDOMBasedMovement: boolean;
4
- showLinkerButton: boolean;
5
- showShareButton: boolean;
6
- showTabRegion: boolean;
7
- showDockingButton: boolean;
8
- showAlwaysOnTopButton: boolean;
9
- showMinimizeButton: boolean;
10
- showMaximizeButton: boolean;
11
- showCloseButton: boolean;
12
- setTabRef: any;
13
- onTabDropped: any;
14
- thisWindowTitle: string;
15
- boundingBox: any;
16
- listenForDragOver: any;
17
- tabs: any;
18
- onTitleUpdated: any;
19
- setToolbarRight: any;
20
- showTabs: boolean;
21
- alwaysOnTop: boolean;
22
- }>;
2
+ static contextType: React.Context<import("../../windowTitleBarContext").WindowTitleBarContextType>;
23
3
  constructor(props: any);
24
4
  bindCorrectContext(): void;
25
5
  onChannelsChange(err: any, response: any): void;
@@ -1,17 +1,15 @@
1
1
  import * as React from "react";
2
2
  import { useSelector } from "react-redux";
3
3
  const LinkerGroupsRedux = () => {
4
+ var _a, _b, _c, _d;
4
5
  const state = useSelector((currentState) => currentState);
5
- const joinedChannels = state?.clients?.[finsembleWindow.name]?.joinedChannels ?? [];
6
- const allChannels = state?.allChannels ?? [];
7
- const onMouseUp = (e, channelName) => {
8
- };
6
+ const joinedChannels = (_c = (_b = (_a = state === null || state === void 0 ? void 0 : state.clients) === null || _a === void 0 ? void 0 : _a[finsembleWindow.name]) === null || _b === void 0 ? void 0 : _b.joinedChannels) !== null && _c !== void 0 ? _c : [];
7
+ const allChannels = (_d = state === null || state === void 0 ? void 0 : state.allChannels) !== null && _d !== void 0 ? _d : [];
9
8
  return (React.createElement("div", { className: "linker-groups" }, allChannels.map((channel) => {
9
+ var _a;
10
10
  const active = joinedChannels.includes(channel.name);
11
- const label = channel.label ?? "X";
12
- return (active && (React.createElement("div", { key: channel.name, className: `linker-group linker-group-accessible linker-${channel.label} ${channel.cssClassName}`, title: `Channel ${label}`, onMouseUp: function (e) {
13
- onMouseUp(e, channel.name);
14
- } }, label)));
11
+ const label = (_a = channel.label) !== null && _a !== void 0 ? _a : "X";
12
+ return (active && (React.createElement("div", { key: channel.name, className: `linker-group linker-group-accessible linker-${channel.label} ${channel.cssClassName}`, title: `Channel ${label}` }, label)));
15
13
  })));
16
14
  };
17
15
  export const LinkerGroups = () => React.createElement(LinkerGroupsRedux, null);
@@ -1 +1 @@
1
- {"version":3,"file":"LinkerGroups.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerGroups.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAe,WAAW,EAAY,MAAM,aAAa,CAAC;AAMjE,MAAM,iBAAiB,GAA4B,GAAG,EAAE;IACvD,MAAM,KAAK,GAAgB,WAAW,CAAC,CAAC,YAAiB,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;IAE5E,MAAM,cAAc,GAAmB,KAAK,EAAE,OAAO,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,cAAc,IAAI,EAAE,CAAC;IACpG,MAAM,WAAW,GAAc,KAAK,EAAE,WAAW,IAAI,EAAE,CAAC;IAExD,MAAM,SAAS,GAAG,CAAC,CAAM,EAAE,WAAmB,EAAE,EAAE;IAMlD,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,eAAe,IAC5B,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAC5B,MAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAErD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,GAAG,CAAC;QACnC,OAAO,CACN,MAAM,IAAI,CACT,6BACC,GAAG,EAAE,OAAO,CAAC,IAAI,EACjB,SAAS,EAAE,+CAA+C,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,YAAY,EAAE,EACjG,KAAK,EAAE,WAAW,KAAK,EAAE,EACzB,SAAS,EAAE,UAAU,CAAC;gBACrB,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC,IAEA,KAAK,CACD,CACN,CACD,CAAC;IACH,CAAC,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAA4B,GAAG,EAAE,CAAC,oBAAC,iBAAiB,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport * as React from \"react\";\r\nimport { useDispatch, useSelector, Provider } from \"react-redux\";\r\nimport { LinkerStore, store } from \"../../../linker/remoteRedux\";\r\n\r\ntype Channel = LinkerStore[\"allChannels\"][0];\r\ntype JoinedChannels = string[];\r\n\r\nconst LinkerGroupsRedux: React.FunctionComponent = () => {\r\n\tconst state: LinkerStore = useSelector((currentState: any) => currentState);\r\n\t// @ts-ignore: possible error: finsembleWindow.name is possibly undefined\r\n\tconst joinedChannels: JoinedChannels = state?.clients?.[finsembleWindow.name]?.joinedChannels ?? [];\r\n\tconst allChannels: Channel[] = state?.allChannels ?? [];\r\n\r\n\tconst onMouseUp = (e: any, channelName: string) => {\r\n\t\t//TODO, make this an action in InteropService/linker\r\n\t\t/*FSBL.Clients.LinkerClient.bringAllToFront({\r\n\t\t\tchannel: channelName,\r\n\t\t\trestoreWindows: true,\r\n\t\t});*/\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className=\"linker-groups\">\r\n\t\t\t{allChannels.map((channel) => {\r\n\t\t\t\tconst active = joinedChannels.includes(channel.name);\r\n\t\t\t\t// linker-${channel.label} is deprecated in favor of cssClassName\r\n\t\t\t\tconst label = channel.label ?? \"X\";\r\n\t\t\t\treturn (\r\n\t\t\t\t\tactive && (\r\n\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\tkey={channel.name}\r\n\t\t\t\t\t\t\tclassName={`linker-group linker-group-accessible linker-${channel.label} ${channel.cssClassName}`}\r\n\t\t\t\t\t\t\ttitle={`Channel ${label}`}\r\n\t\t\t\t\t\t\tonMouseUp={function (e) {\r\n\t\t\t\t\t\t\t\tonMouseUp(e, channel.name);\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{label}\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t})}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport const LinkerGroups: React.FunctionComponent = () => <LinkerGroupsRedux />;\r\n"]}
1
+ {"version":3,"file":"LinkerGroups.js","sourceRoot":"","sources":["../../../../../src/components/windowTitleBar/components/left/LinkerGroups.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,MAAM,iBAAiB,GAA4B,GAAG,EAAE;;IACvD,MAAM,KAAK,GAAgB,WAAW,CAAC,CAAC,YAAiB,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;IAE5E,MAAM,cAAc,GAAmB,MAAA,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,0CAAG,eAAe,CAAC,IAAI,CAAC,0CAAE,cAAc,mCAAI,EAAE,CAAC;IACpG,MAAM,WAAW,GAAc,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,mCAAI,EAAE,CAAC;IAExD,OAAO,CACN,6BAAK,SAAS,EAAC,eAAe,IAC5B,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;;QAC5B,MAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAErD,MAAM,KAAK,GAAG,MAAA,OAAO,CAAC,KAAK,mCAAI,GAAG,CAAC;QACnC,OAAO,CACN,MAAM,IAAI,CACT,6BACC,GAAG,EAAE,OAAO,CAAC,IAAI,EACjB,SAAS,EAAE,+CAA+C,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,YAAY,EAAE,EACjG,KAAK,EAAE,WAAW,KAAK,EAAE,IAExB,KAAK,CACD,CACN,CACD,CAAC;IACH,CAAC,CAAC,CACG,CACN,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAA4B,GAAG,EAAE,CAAC,oBAAC,iBAAiB,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport * as React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { LinkerStore } from \"../../../linker/remoteRedux\";\r\n\r\ntype Channel = LinkerStore[\"allChannels\"][0];\r\ntype JoinedChannels = string[];\r\n\r\nconst LinkerGroupsRedux: React.FunctionComponent = () => {\r\n\tconst state: LinkerStore = useSelector((currentState: any) => currentState);\r\n\t// @ts-ignore: possible error: finsembleWindow.name is possibly undefined\r\n\tconst joinedChannels: JoinedChannels = state?.clients?.[finsembleWindow.name]?.joinedChannels ?? [];\r\n\tconst allChannels: Channel[] = state?.allChannels ?? [];\r\n\r\n\treturn (\r\n\t\t<div className=\"linker-groups\">\r\n\t\t\t{allChannels.map((channel) => {\r\n\t\t\t\tconst active = joinedChannels.includes(channel.name);\r\n\t\t\t\t// linker-${channel.label} is deprecated in favor of cssClassName\r\n\t\t\t\tconst label = channel.label ?? \"X\";\r\n\t\t\t\treturn (\r\n\t\t\t\t\tactive && (\r\n\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\tkey={channel.name}\r\n\t\t\t\t\t\t\tclassName={`linker-group linker-group-accessible linker-${channel.label} ${channel.cssClassName}`}\r\n\t\t\t\t\t\t\ttitle={`Channel ${label}`}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{label}\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t})}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport const LinkerGroups: React.FunctionComponent = () => <LinkerGroupsRedux />;\r\n"]}
@@ -1,25 +1,5 @@
1
1
  export class ShareButton extends React.Component<any, any, any> {
2
- static contextType: React.Context<{
3
- useDOMBasedMovement: boolean;
4
- showLinkerButton: boolean;
5
- showShareButton: boolean;
6
- showTabRegion: boolean;
7
- showDockingButton: boolean;
8
- showAlwaysOnTopButton: boolean;
9
- showMinimizeButton: boolean;
10
- showMaximizeButton: boolean;
11
- showCloseButton: boolean;
12
- setTabRef: any;
13
- onTabDropped: any;
14
- thisWindowTitle: string;
15
- boundingBox: any;
16
- listenForDragOver: any;
17
- tabs: any;
18
- onTitleUpdated: any;
19
- setToolbarRight: any;
20
- showTabs: boolean;
21
- alwaysOnTop: boolean;
22
- }>;
2
+ static contextType: React.Context<import("../../windowTitleBarContext").WindowTitleBarContextType>;
23
3
  constructor(props: any);
24
4
  bindCorrectContext(): void;
25
5
  hoverAction(newHoverState: any): void;