@finsemble/finsemble-ui 7.0.1 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (788) hide show
  1. package/package.json +13 -11
  2. package/react/actions/favoriteActions.d.ts +1 -0
  3. package/react/actions/favoriteActions.js +1 -0
  4. package/react/actions/favoriteActions.js.map +1 -1
  5. package/react/actions/menuActions.d.ts +1 -0
  6. package/react/actions/menuActions.js +1 -0
  7. package/react/actions/menuActions.js.map +1 -1
  8. package/react/actions/rootActions.d.ts +1 -0
  9. package/react/actions/rootActions.js +1 -0
  10. package/react/actions/rootActions.js.map +1 -1
  11. package/react/actions/searchActions.d.ts +1 -0
  12. package/react/actions/searchActions.js +1 -0
  13. package/react/actions/searchActions.js.map +1 -1
  14. package/react/actions/toolbarActions.d.ts +34 -0
  15. package/react/actions/toolbarActions.js +17 -0
  16. package/react/actions/toolbarActions.js.map +1 -1
  17. package/react/actions/workspaceActions.d.ts +1 -0
  18. package/react/actions/workspaceActions.js +1 -0
  19. package/react/actions/workspaceActions.js.map +1 -1
  20. package/react/assets/css/advancedAppLauncher.css +22 -19
  21. package/react/assets/css/appCatalog.css +67 -72
  22. package/react/assets/css/authentication.css +4 -3
  23. package/react/assets/css/button.css +3 -10
  24. package/react/assets/css/core/formElements.css +1 -1
  25. package/react/assets/css/core/icons.css +3 -2
  26. package/react/assets/css/core/notifications.css +2 -2
  27. package/react/assets/css/core/windowFrame.css +9 -9
  28. package/react/assets/css/dashbar.css +1 -1
  29. package/react/assets/css/defaultTheme.css +9 -53
  30. package/react/assets/css/dialogs.css +13 -11
  31. package/react/assets/css/favorites.css +3 -1
  32. package/react/assets/css/finsemble.css +3 -2
  33. package/react/assets/css/font-finance.css +233 -120
  34. package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +10 -10
  35. package/react/assets/css/linkerWindow.css +2 -2
  36. package/react/assets/css/menus.css +10 -10
  37. package/react/assets/css/notificationsCenter.css +16 -31
  38. package/react/assets/css/processMonitor.css +7 -4
  39. package/react/assets/css/search.css +1 -1
  40. package/react/assets/css/shared/animations.css +10 -4
  41. package/react/assets/css/shared/common.css +2 -2
  42. package/react/assets/css/tags.css +10 -10
  43. package/react/assets/css/toolbar.css +22 -19
  44. package/react/assets/css/userPreferences.css +12 -14
  45. package/react/assets/css/windowTitleBar.css +75 -36
  46. package/react/componentTemplateGenerator.js +3 -2
  47. package/react/componentTemplateGenerator.js.map +1 -1
  48. package/react/components/FinsembleProvider.d.ts +7 -0
  49. package/react/components/FinsembleProvider.js +2 -0
  50. package/react/components/FinsembleProvider.js.map +1 -1
  51. package/react/components/appCatalog/AppCatalog.d.ts +4 -0
  52. package/react/components/appCatalog/AppCatalog.js +4 -0
  53. package/react/components/appCatalog/AppCatalog.js.map +1 -1
  54. package/react/components/appCatalog/AppCatalogComponent.d.ts +58 -0
  55. package/react/components/appCatalog/AppCatalogComponent.js +70 -1
  56. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  57. package/react/components/appCatalog/components/AppCard.d.ts +35 -0
  58. package/react/components/appCatalog/components/AppCard.js +42 -0
  59. package/react/components/appCatalog/components/AppCard.js.map +1 -1
  60. package/react/components/appCatalog/components/AppResults.d.ts +10 -0
  61. package/react/components/appCatalog/components/AppResults.js +24 -0
  62. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  63. package/react/components/appCatalog/components/Carousel.d.ts +26 -0
  64. package/react/components/appCatalog/components/Carousel.js +34 -0
  65. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  66. package/react/components/appCatalog/components/EmptyResults.d.ts +4 -0
  67. package/react/components/appCatalog/components/EmptyResults.js +8 -0
  68. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  69. package/react/components/appCatalog/components/Hero.d.ts +15 -0
  70. package/react/components/appCatalog/components/Hero.js +15 -0
  71. package/react/components/appCatalog/components/Hero.js.map +1 -1
  72. package/react/components/appCatalog/components/Home.d.ts +6 -4
  73. package/react/components/appCatalog/components/Home.js +10 -0
  74. package/react/components/appCatalog/components/Home.js.map +1 -1
  75. package/react/components/appCatalog/components/SearchBar.d.ts +31 -0
  76. package/react/components/appCatalog/components/SearchBar.js +33 -0
  77. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  78. package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -0
  79. package/react/components/appCatalog/components/Showcase/AppDescription.js +9 -0
  80. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  81. package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +7 -0
  82. package/react/components/appCatalog/components/Showcase/AppDevNotes.js +15 -0
  83. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  84. package/react/components/appCatalog/components/Showcase/AppShowcase.d.ts +17 -0
  85. package/react/components/appCatalog/components/Showcase/AppShowcase.js +25 -0
  86. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  87. package/react/components/appCatalog/components/Showcase/Header.d.ts +7 -0
  88. package/react/components/appCatalog/components/Showcase/Header.js +12 -0
  89. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  90. package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +7 -0
  91. package/react/components/appCatalog/components/Showcase/ImageCarousel.js +11 -0
  92. package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
  93. package/react/components/appCatalog/components/Showcase/Modal.d.ts +10 -0
  94. package/react/components/appCatalog/components/Showcase/Modal.js +10 -0
  95. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  96. package/react/components/appCatalog/components/Showcase/ReleaseNotes.d.ts +5 -0
  97. package/react/components/appCatalog/components/Showcase/ReleaseNotes.js +9 -0
  98. package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
  99. package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +6 -0
  100. package/react/components/appCatalog/components/Showcase/SupportNotes.js +11 -0
  101. package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
  102. package/react/components/appCatalog/components/Showcase/VersionNotes.d.ts +5 -0
  103. package/react/components/appCatalog/components/Showcase/VersionNotes.js +9 -0
  104. package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
  105. package/react/components/appCatalog/components/Tag.d.ts +6 -0
  106. package/react/components/appCatalog/components/Tag.js +10 -0
  107. package/react/components/appCatalog/components/Tag.js.map +1 -1
  108. package/react/components/appCatalog/components/Toast.d.ts +5 -0
  109. package/react/components/appCatalog/components/Toast.js +9 -0
  110. package/react/components/appCatalog/components/Toast.js.map +1 -1
  111. package/react/components/appCatalog/components/helpers.js +1 -0
  112. package/react/components/appCatalog/components/helpers.js.map +1 -1
  113. package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -0
  114. package/react/components/appCatalog/modules/AppDirectory.js +5 -0
  115. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  116. package/react/components/appCatalog/modules/FDC3.d.ts +37 -0
  117. package/react/components/appCatalog/modules/FDC3.js +40 -0
  118. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  119. package/react/components/appCatalog/stores/appStore.js +1 -0
  120. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  121. package/react/components/appCatalog/stores/storeActions.d.ts +91 -0
  122. package/react/components/appCatalog/stores/storeActions.js +116 -1
  123. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  124. package/react/components/common/Checkbox.d.ts +1 -0
  125. package/react/components/common/Checkbox.js +2 -2
  126. package/react/components/common/Checkbox.js.map +1 -1
  127. package/react/components/common/ColorPicker.d.ts +5 -0
  128. package/react/components/common/ColorPicker.js +40 -0
  129. package/react/components/common/ColorPicker.js.map +1 -1
  130. package/react/components/common/DropZone.d.ts +11 -0
  131. package/react/components/common/DropZone.js +21 -1
  132. package/react/components/common/DropZone.js.map +1 -1
  133. package/react/components/common/DropdownButton.d.ts +4 -0
  134. package/react/components/common/DropdownButton.js +4 -0
  135. package/react/components/common/DropdownButton.js.map +1 -1
  136. package/react/components/common/ErrorBoundary.d.ts +18 -0
  137. package/react/components/common/ErrorBoundary.js +21 -0
  138. package/react/components/common/ErrorBoundary.js.map +1 -1
  139. package/react/components/common/FileInput.d.ts +8 -1
  140. package/react/components/common/FileInput.js +19 -4
  141. package/react/components/common/FileInput.js.map +1 -1
  142. package/react/components/common/FinsembleIcon.d.ts +10 -0
  143. package/react/components/common/FinsembleIcon.js +51 -2
  144. package/react/components/common/FinsembleIcon.js.map +1 -1
  145. package/react/components/common/FinsembleSelect.js +5 -1
  146. package/react/components/common/FinsembleSelect.js.map +1 -1
  147. package/react/components/common/FinsembleToggleButtonBar.js +1 -1
  148. package/react/components/common/FinsembleToggleButtonBar.js.map +1 -1
  149. package/react/components/common/InputTable.d.ts +7 -0
  150. package/react/components/common/InputTable.js +7 -0
  151. package/react/components/common/InputTable.js.map +1 -1
  152. package/react/components/common/Tab.js +3 -0
  153. package/react/components/common/Tab.js.map +1 -1
  154. package/react/components/common/TimeSelect.js +24 -0
  155. package/react/components/common/TimeSelect.js.map +1 -1
  156. package/react/components/common/Tooltip.js +2 -0
  157. package/react/components/common/Tooltip.js.map +1 -1
  158. package/react/components/common/css/accordion.css +9 -6
  159. package/react/components/common/css/application-edit-page.css +39 -44
  160. package/react/components/common/css/button.css +10 -5
  161. package/react/components/common/css/color-picker.css +3 -3
  162. package/react/components/common/css/drop-zone.css +2 -6
  163. package/react/components/common/css/file-input.css +5 -5
  164. package/react/components/common/css/header.css +3 -2
  165. package/react/components/common/css/icon.css +1 -1
  166. package/react/components/common/css/loading-spinner.css +7 -12
  167. package/react/components/common/css/selector.css +4 -4
  168. package/react/components/common/css/styles.css +22 -16
  169. package/react/components/common/css/tab.css +8 -8
  170. package/react/components/common/css/time-select.css +1 -0
  171. package/react/components/common/css/toggle.css +4 -4
  172. package/react/components/common/css/tooltip.css +2 -3
  173. package/react/components/common/file_helpers.js +2 -0
  174. package/react/components/common/file_helpers.js.map +1 -1
  175. package/react/components/common/helpers.js +1 -0
  176. package/react/components/common/helpers.js.map +1 -1
  177. package/react/components/common/stories/ColorPicker.stories.js +3 -0
  178. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  179. package/react/components/common/stories/FileInput.stories.d.ts +3 -1
  180. package/react/components/common/stories/FileInput.stories.js +12 -0
  181. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  182. package/react/components/common/tests/Accordion.spec.js +6 -0
  183. package/react/components/common/tests/Accordion.spec.js.map +1 -1
  184. package/react/components/common/tests/Checkbox.spec.js +1 -0
  185. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  186. package/react/components/common/tests/ColorPicker.spec.js +6 -0
  187. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  188. package/react/components/common/tests/DropZone.spec.js +1 -0
  189. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  190. package/react/components/common/tests/FileInput.spec.js +22 -0
  191. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  192. package/react/components/common/tests/FinsembleSelect.spec.js +1 -0
  193. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  194. package/react/components/common/tests/FinsembleToggle.spec.js +1 -0
  195. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  196. package/react/components/common/tests/FinsembleToggleButtonBar.spec.js +1 -0
  197. package/react/components/common/tests/FinsembleToggleButtonBar.spec.js.map +1 -1
  198. package/react/components/common/tests/TimeSelect.spec.js +4 -0
  199. package/react/components/common/tests/TimeSelect.spec.js.map +1 -1
  200. package/react/components/common/tests/Tooltip.spec.js +16 -0
  201. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  202. package/react/components/favorites/FavoriteMaker.d.ts +8 -0
  203. package/react/components/favorites/FavoriteMaker.js +9 -0
  204. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  205. package/react/components/favorites/FavoritesShell.d.ts +4 -0
  206. package/react/components/favorites/FavoritesShell.js +13 -1
  207. package/react/components/favorites/FavoritesShell.js.map +1 -1
  208. package/react/components/favorites/FavoritesShell.spec.js +3 -0
  209. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  210. package/react/components/fdc3Resolver/ResolverContainer.js +8 -0
  211. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  212. package/react/components/fdc3Resolver/ResolverDialog.css +16 -3
  213. package/react/components/fdc3Resolver/ResolverDialog.js +7 -2
  214. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  215. package/react/components/fdc3Resolver/ResolverDialog.spec.js +3 -2
  216. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  217. package/react/components/fdc3Resolver/ResolverDialog.stories.js +2 -0
  218. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  219. package/react/components/icon/Icon.d.ts +13 -0
  220. package/react/components/icon/Icon.js +34 -0
  221. package/react/components/icon/Icon.js.map +1 -1
  222. package/react/components/legacyControls/FinsembleDialog.d.ts +4 -0
  223. package/react/components/legacyControls/FinsembleDialog.js +15 -0
  224. package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
  225. package/react/components/legacyControls/FinsembleDialogButton.d.ts +3 -0
  226. package/react/components/legacyControls/FinsembleDialogButton.js +6 -1
  227. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  228. package/react/components/legacyControls/FinsembleDialogQuestion.d.ts +7 -0
  229. package/react/components/legacyControls/FinsembleDialogQuestion.js +7 -0
  230. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  231. package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +3 -0
  232. package/react/components/legacyControls/FinsembleDialogTextInput.js +14 -0
  233. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  234. package/react/components/legacyControls/FinsembleDnDContext.d.ts +19 -0
  235. package/react/components/legacyControls/FinsembleDnDContext.js +126 -1
  236. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  237. package/react/components/legacyControls/FinsembleDraggable.d.ts +3 -0
  238. package/react/components/legacyControls/FinsembleDraggable.js +3 -0
  239. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  240. package/react/components/legacyControls/FinsembleHoverDetector.d.ts +15 -0
  241. package/react/components/legacyControls/FinsembleHoverDetector.js +26 -1
  242. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  243. package/react/components/legacyControls/FinsembleMenuSection.d.ts +4 -0
  244. package/react/components/legacyControls/FinsembleMenuSection.js +38 -0
  245. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  246. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +1 -0
  247. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  248. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +1 -0
  249. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  250. package/react/components/linker/LinkerMenu.d.ts +3 -0
  251. package/react/components/linker/LinkerMenu.js +21 -0
  252. package/react/components/linker/LinkerMenu.js.map +1 -1
  253. package/react/components/linker/LinkerMenuDeprecated.d.ts +3 -0
  254. package/react/components/linker/LinkerMenuDeprecated.js +9 -0
  255. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  256. package/react/components/menu/Menu.d.ts +15 -0
  257. package/react/components/menu/Menu.js +15 -0
  258. package/react/components/menu/Menu.js.map +1 -1
  259. package/react/components/menu/MenuAutoResizer.d.ts +7 -0
  260. package/react/components/menu/MenuAutoResizer.js +27 -0
  261. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  262. package/react/components/menu/MenuContent.d.ts +4 -0
  263. package/react/components/menu/MenuContent.js +4 -0
  264. package/react/components/menu/MenuContent.js.map +1 -1
  265. package/react/components/menu/MenuHotKey.d.ts +14 -0
  266. package/react/components/menu/MenuHotKey.js +15 -0
  267. package/react/components/menu/MenuHotKey.js.map +1 -1
  268. package/react/components/menu/MenuItem.d.ts +8 -0
  269. package/react/components/menu/MenuItem.js +13 -2
  270. package/react/components/menu/MenuItem.js.map +1 -1
  271. package/react/components/menu/MenuPortal.js +112 -2
  272. package/react/components/menu/MenuPortal.js.map +1 -1
  273. package/react/components/menu/MenuShell.d.ts +16 -0
  274. package/react/components/menu/MenuShell.js +26 -0
  275. package/react/components/menu/MenuShell.js.map +1 -1
  276. package/react/components/menu/MenuToggle.d.ts +3 -0
  277. package/react/components/menu/MenuToggle.js +3 -0
  278. package/react/components/menu/MenuToggle.js.map +1 -1
  279. package/react/components/menu/keyboardNavigation.d.ts +12 -0
  280. package/react/components/menu/keyboardNavigation.js +55 -0
  281. package/react/components/menu/keyboardNavigation.js.map +1 -1
  282. package/react/components/menu/menuContext.d.ts +6 -0
  283. package/react/components/menu/menuContext.js +6 -0
  284. package/react/components/menu/menuContext.js.map +1 -1
  285. package/react/components/menu/menuHelpers.d.ts +22 -0
  286. package/react/components/menu/menuHelpers.js +58 -1
  287. package/react/components/menu/menuHelpers.js.map +1 -1
  288. package/react/components/notifications/components/drawer/DrawerControls.js +8 -0
  289. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  290. package/react/components/notifications/components/drawer/DrawerHeader.js +5 -0
  291. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  292. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +18 -0
  293. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  294. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +3 -0
  295. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  296. package/react/components/notifications/components/shared/CheckButton.js +1 -1
  297. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  298. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +9 -0
  299. package/react/components/notifications/components/shared/NotificationCardShell.js +13 -6
  300. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  301. package/react/components/notifications/components/shared/OverflowMenu.d.ts +4 -0
  302. package/react/components/notifications/components/shared/OverflowMenu.js +16 -2
  303. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  304. package/react/components/notifications/components/views/CardView.js +3 -0
  305. package/react/components/notifications/components/views/CardView.js.map +1 -1
  306. package/react/components/notifications/components/views/ListView.js +8 -0
  307. package/react/components/notifications/components/views/ListView.js.map +1 -1
  308. package/react/components/notifications/notificationsContext.d.ts +4 -0
  309. package/react/components/notifications/notificationsContext.js +4 -0
  310. package/react/components/notifications/notificationsContext.js.map +1 -1
  311. package/react/components/notifications/types.d.ts +3 -0
  312. package/react/components/notifications/utils.d.ts +4 -0
  313. package/react/components/notifications/utils.js +4 -0
  314. package/react/components/notifications/utils.js.map +1 -1
  315. package/react/components/processMonitor/ProcessMonitor.d.ts +3 -0
  316. package/react/components/processMonitor/ProcessMonitor.js +17 -2
  317. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  318. package/react/components/processMonitor/components/ChildWindow.d.ts +3 -0
  319. package/react/components/processMonitor/components/ChildWindow.js +5 -0
  320. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  321. package/react/components/processMonitor/components/ListHeader.d.ts +5 -0
  322. package/react/components/processMonitor/components/ListHeader.js +7 -0
  323. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  324. package/react/components/processMonitor/components/ProcessStatistics.js +12 -1
  325. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  326. package/react/components/processMonitor/constants.js +6 -0
  327. package/react/components/processMonitor/constants.js.map +1 -1
  328. package/react/components/processMonitor/helpers.d.ts +13 -0
  329. package/react/components/processMonitor/helpers.js +23 -3
  330. package/react/components/processMonitor/helpers.js.map +1 -1
  331. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +39 -0
  332. package/react/components/processMonitor/stores/ProcessMonitorStore.js +50 -0
  333. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  334. package/react/components/quickComponentForm/QuickComponentForm.d.ts +3 -0
  335. package/react/components/quickComponentForm/QuickComponentForm.js +20 -0
  336. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  337. package/react/components/quickComponentForm/quickComponent.css +1 -1
  338. package/react/components/sdd/AddApp.d.ts +4 -2
  339. package/react/components/sdd/AddApp.js +57 -49
  340. package/react/components/sdd/AddApp.js.map +1 -1
  341. package/react/components/sdd/AppEditAccess.js +8 -0
  342. package/react/components/sdd/AppEditAccess.js.map +1 -1
  343. package/react/components/sdd/AppEditPage.d.ts +2 -1
  344. package/react/components/sdd/AppEditPage.js +148 -361
  345. package/react/components/sdd/AppEditPage.js.map +1 -1
  346. package/react/components/sdd/Appearance.css +1 -1
  347. package/react/components/sdd/Appearance.js +3 -0
  348. package/react/components/sdd/Appearance.js.map +1 -1
  349. package/react/components/sdd/Application.js +39 -7
  350. package/react/components/sdd/Application.js.map +1 -1
  351. package/react/components/sdd/Applications.js +89 -13
  352. package/react/components/sdd/Applications.js.map +1 -1
  353. package/react/components/sdd/AssetsPage.css +3 -3
  354. package/react/components/sdd/EditPreload.js +10 -0
  355. package/react/components/sdd/EditPreload.js.map +1 -1
  356. package/react/components/sdd/ExportCloud.js +4 -0
  357. package/react/components/sdd/ExportCloud.js.map +1 -1
  358. package/react/components/sdd/Publish.js +2 -0
  359. package/react/components/sdd/Publish.js.map +1 -1
  360. package/react/components/sdd/PublishProgress.js +11 -1
  361. package/react/components/sdd/PublishProgress.js.map +1 -1
  362. package/react/components/sdd/SmartDesktopDesigner.js +17 -0
  363. package/react/components/sdd/SmartDesktopDesigner.js.map +1 -1
  364. package/react/components/sdd/ThemePage.css +6 -23
  365. package/react/components/sdd/ThemePage.js +1 -1
  366. package/react/components/sdd/ThemePage.js.map +1 -1
  367. package/react/components/sdd/Themes.js +2 -0
  368. package/react/components/sdd/Themes.js.map +1 -1
  369. package/react/components/sdd/Toolbar.js +7 -0
  370. package/react/components/sdd/Toolbar.js.map +1 -1
  371. package/react/components/sdd/appEditPage/Behavior.d.ts +34 -0
  372. package/react/components/sdd/appEditPage/Behavior.js +134 -0
  373. package/react/components/sdd/appEditPage/Behavior.js.map +1 -0
  374. package/react/components/sdd/appEditPage/Component.d.ts +22 -0
  375. package/react/components/sdd/appEditPage/Component.js +76 -0
  376. package/react/components/sdd/appEditPage/Component.js.map +1 -0
  377. package/react/components/sdd/appEditPage/DebugToolkit.d.ts +9 -0
  378. package/react/components/sdd/appEditPage/DebugToolkit.js +20 -0
  379. package/react/components/sdd/appEditPage/DebugToolkit.js.map +1 -0
  380. package/react/components/sdd/appEditPage/Interop.d.ts +10 -0
  381. package/react/components/sdd/appEditPage/Interop.js +40 -0
  382. package/react/components/sdd/appEditPage/Interop.js.map +1 -0
  383. package/react/components/sdd/appEditPage/Position.d.ts +18 -0
  384. package/react/components/sdd/appEditPage/Position.js +72 -0
  385. package/react/components/sdd/appEditPage/Position.js.map +1 -0
  386. package/react/components/sdd/appEditPage/Preloads.d.ts +9 -0
  387. package/react/components/sdd/appEditPage/Preloads.js +16 -0
  388. package/react/components/sdd/appEditPage/Preloads.js.map +1 -0
  389. package/react/components/sdd/appEditPage/SelectConnect.d.ts +15 -0
  390. package/react/components/sdd/appEditPage/SelectConnect.js +28 -0
  391. package/react/components/sdd/appEditPage/SelectConnect.js.map +1 -0
  392. package/react/components/sdd/appEditPage/Workspace.d.ts +12 -0
  393. package/react/components/sdd/appEditPage/Workspace.js +30 -0
  394. package/react/components/sdd/appEditPage/Workspace.js.map +1 -0
  395. package/react/components/sdd/common/getCSSVars.js +7 -2
  396. package/react/components/sdd/common/getCSSVars.js.map +1 -1
  397. package/react/components/sdd/common/setPreloadDefaults.js +4 -0
  398. package/react/components/sdd/common/setPreloadDefaults.js.map +1 -1
  399. package/react/components/sdd/css/addApp.css +18 -5
  400. package/react/components/sdd/css/appearance.css +6 -0
  401. package/react/components/sdd/css/applications.css +27 -14
  402. package/react/components/sdd/css/authentication.css +7 -6
  403. package/react/components/sdd/css/buttons.css +1 -1
  404. package/react/components/sdd/css/export.css +5 -3
  405. package/react/components/sdd/css/getting-started.css +2 -2
  406. package/react/components/sdd/css/nav.css +8 -11
  407. package/react/components/sdd/css/project-header.css +5 -7
  408. package/react/components/sdd/css/styles.css +29 -23
  409. package/react/components/sdd/css/views.css +4 -3
  410. package/react/components/sdd/fixtures/apps.js +12 -0
  411. package/react/components/sdd/fixtures/apps.js.map +1 -1
  412. package/react/components/sdd/fixtures/configTemplate.js +1 -0
  413. package/react/components/sdd/fixtures/configTemplate.js.map +1 -1
  414. package/react/components/sdd/fixtures/publishProgress.js +40 -0
  415. package/react/components/sdd/fixtures/publishProgress.js.map +1 -1
  416. package/react/components/sdd/sdd_helpers.d.ts +6 -0
  417. package/react/components/sdd/sdd_helpers.js +6 -0
  418. package/react/components/sdd/sdd_helpers.js.map +1 -1
  419. package/react/components/sdd/smartDesktopClient.d.ts +303 -0
  420. package/react/components/sdd/smartDesktopClient.js +334 -1
  421. package/react/components/sdd/smartDesktopClient.js.map +1 -1
  422. package/react/components/sdd/smartDesktopClient.spec.js +5 -2
  423. package/react/components/sdd/smartDesktopClient.spec.js.map +1 -1
  424. package/react/components/sdd/stories/AddApp.stories.d.ts +2 -1
  425. package/react/components/sdd/stories/AddApp.stories.js +8 -0
  426. package/react/components/sdd/stories/AddApp.stories.js.map +1 -1
  427. package/react/components/sdd/stories/AppEditPage.stories.d.ts +3 -1
  428. package/react/components/sdd/stories/AppEditPage.stories.js +3 -0
  429. package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -1
  430. package/react/components/sdd/stories/Appearance.stories.js +1 -0
  431. package/react/components/sdd/stories/Appearance.stories.js.map +1 -1
  432. package/react/components/sdd/tests/AddApp.spec.js +40 -3
  433. package/react/components/sdd/tests/AddApp.spec.js.map +1 -1
  434. package/react/components/sdd/tests/AppEditPage.spec.js +16 -0
  435. package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -1
  436. package/react/components/sdd/tests/Application.spec.js +33 -438
  437. package/react/components/sdd/tests/Application.spec.js.map +1 -1
  438. package/react/components/sdd/tests/Applications.spec.d.ts +1 -1
  439. package/react/components/sdd/tests/Applications.spec.js +29 -5
  440. package/react/components/sdd/tests/Applications.spec.js.map +1 -1
  441. package/react/components/sdd/tests/Authentication.spec.js +7 -0
  442. package/react/components/sdd/tests/Authentication.spec.js.map +1 -1
  443. package/react/components/sdd/tests/ContentHeader.spec.js +2 -0
  444. package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -1
  445. package/react/components/sdd/tests/EditPreload.spec.js +13 -0
  446. package/react/components/sdd/tests/EditPreload.spec.js.map +1 -1
  447. package/react/components/sdd/tests/Export.spec.js +2 -1
  448. package/react/components/sdd/tests/Export.spec.js.map +1 -1
  449. package/react/components/sdd/tests/ItemList.spec.js +4 -0
  450. package/react/components/sdd/tests/ItemList.spec.js.map +1 -1
  451. package/react/components/sdd/tests/OptionalSettingsView.spec.js +29 -0
  452. package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -1
  453. package/react/components/sdd/tests/ProjectErrors.spec.js +2 -0
  454. package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -1
  455. package/react/components/sdd/tests/Themes.spec.js +1 -1
  456. package/react/components/sdd/tests/Themes.spec.js.map +1 -1
  457. package/react/components/sdd/tests/Toolbar.spec.js +53 -0
  458. package/react/components/sdd/tests/Toolbar.spec.js.map +1 -1
  459. package/react/components/sdd/tests/a11y_helper.js +8 -0
  460. package/react/components/sdd/tests/a11y_helper.js.map +1 -1
  461. package/react/components/search/Highlight.d.ts +6 -0
  462. package/react/components/search/Highlight.js +19 -0
  463. package/react/components/search/Highlight.js.map +1 -1
  464. package/react/components/search/SearchBestMatch.d.ts +4 -0
  465. package/react/components/search/SearchBestMatch.js +11 -0
  466. package/react/components/search/SearchBestMatch.js.map +1 -1
  467. package/react/components/search/SearchInput.d.ts +5 -0
  468. package/react/components/search/SearchInput.js +6 -0
  469. package/react/components/search/SearchInput.js.map +1 -1
  470. package/react/components/search/SearchProviderResults.js +2 -0
  471. package/react/components/search/SearchProviderResults.js.map +1 -1
  472. package/react/components/search/SearchResult.js +6 -0
  473. package/react/components/search/SearchResult.js.map +1 -1
  474. package/react/components/search/SearchResult.spec.js +7 -0
  475. package/react/components/search/SearchResult.spec.js.map +1 -1
  476. package/react/components/search/SearchResult.stories.js +4 -0
  477. package/react/components/search/SearchResult.stories.js.map +1 -1
  478. package/react/components/search/SearchResults.js +5 -1
  479. package/react/components/search/SearchResults.js.map +1 -1
  480. package/react/components/search/SearchResults.spec.js +7 -0
  481. package/react/components/search/SearchResults.spec.js.map +1 -1
  482. package/react/components/shared/Animate.d.ts +5 -0
  483. package/react/components/shared/Animate.js +12 -1
  484. package/react/components/shared/Animate.js.map +1 -1
  485. package/react/components/shared/DefaultDropdownButton.js +9 -0
  486. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  487. package/react/components/shared/Tag.d.ts +0 -4
  488. package/react/components/shared/Tag.js +4 -0
  489. package/react/components/shared/Tag.js.map +1 -1
  490. package/react/components/shared/TagsMenu.d.ts +6 -0
  491. package/react/components/shared/TagsMenu.js +7 -0
  492. package/react/components/shared/TagsMenu.js.map +1 -1
  493. package/react/components/shared/addProtocolToValidURL.d.ts +6 -0
  494. package/react/components/shared/addProtocolToValidURL.js +6 -0
  495. package/react/components/shared/addProtocolToValidURL.js.map +1 -1
  496. package/react/components/shared/openQuitConfirmationDialog.d.ts +1 -1
  497. package/react/components/shared/openQuitConfirmationDialog.js +4 -4
  498. package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
  499. package/react/components/shared/tests/addProtocolToValidURL.spec.js +1 -0
  500. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
  501. package/react/components/shared/validateURL.d.ts +18 -0
  502. package/react/components/shared/validateURL.js +24 -5
  503. package/react/components/shared/validateURL.js.map +1 -1
  504. package/react/components/singleInputDialog/SingleInputDialog.css +1 -1
  505. package/react/components/singleInputDialog/SingleInputDialog.d.ts +3 -0
  506. package/react/components/singleInputDialog/SingleInputDialog.js +44 -0
  507. package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
  508. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +6 -0
  509. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  510. package/react/components/system/System.d.ts +22 -0
  511. package/react/components/system/System.js +23 -1
  512. package/react/components/system/System.js.map +1 -1
  513. package/react/components/system/System.stories.js +1 -0
  514. package/react/components/system/System.stories.js.map +1 -1
  515. package/react/components/system/SystemTrayComponentShell.d.ts +6 -0
  516. package/react/components/system/SystemTrayComponentShell.js +9 -0
  517. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  518. package/react/components/toolbar/AutoArrange.d.ts +5 -0
  519. package/react/components/toolbar/AutoArrange.js +8 -1
  520. package/react/components/toolbar/AutoArrange.js.map +1 -1
  521. package/react/components/toolbar/AutoArrange.spec.js +1 -0
  522. package/react/components/toolbar/AutoArrange.spec.js.map +1 -1
  523. package/react/components/toolbar/AutoArrange.stories.js +1 -0
  524. package/react/components/toolbar/AutoArrange.stories.js.map +1 -1
  525. package/react/components/toolbar/DragHandle.d.ts +4 -0
  526. package/react/components/toolbar/DragHandle.js +11 -0
  527. package/react/components/toolbar/DragHandle.js.map +1 -1
  528. package/react/components/toolbar/DragHandle.spec.js +1 -0
  529. package/react/components/toolbar/DragHandle.spec.js.map +1 -1
  530. package/react/components/toolbar/DragHandle.stories.js +1 -0
  531. package/react/components/toolbar/DragHandle.stories.js.map +1 -1
  532. package/react/components/toolbar/MinimizeAll.d.ts +4 -0
  533. package/react/components/toolbar/MinimizeAll.js +7 -1
  534. package/react/components/toolbar/MinimizeAll.js.map +1 -1
  535. package/react/components/toolbar/MinimizeAll.spec.js +1 -0
  536. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  537. package/react/components/toolbar/MinimizeAll.stories.js +1 -0
  538. package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
  539. package/react/components/toolbar/NotificationControl.d.ts +5 -0
  540. package/react/components/toolbar/NotificationControl.js +8 -1
  541. package/react/components/toolbar/NotificationControl.js.map +1 -1
  542. package/react/components/toolbar/RevealAll.d.ts +4 -0
  543. package/react/components/toolbar/RevealAll.js +7 -1
  544. package/react/components/toolbar/RevealAll.js.map +1 -1
  545. package/react/components/toolbar/RevealAll.spec.js +1 -0
  546. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  547. package/react/components/toolbar/RevealAll.stories.js +1 -0
  548. package/react/components/toolbar/RevealAll.stories.js.map +1 -1
  549. package/react/components/toolbar/SddButton.d.ts +4 -0
  550. package/react/components/toolbar/SddButton.js +4 -0
  551. package/react/components/toolbar/SddButton.js.map +1 -1
  552. package/react/components/toolbar/ToolbarIcon.d.ts +4 -0
  553. package/react/components/toolbar/ToolbarIcon.js +4 -0
  554. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  555. package/react/components/toolbar/ToolbarSection.d.ts +7 -0
  556. package/react/components/toolbar/ToolbarSection.js +19 -1
  557. package/react/components/toolbar/ToolbarSection.js.map +1 -1
  558. package/react/components/toolbar/ToolbarShell.d.ts +5 -0
  559. package/react/components/toolbar/ToolbarShell.js +7 -0
  560. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  561. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +16 -0
  562. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +20 -0
  563. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  564. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +52 -0
  565. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +58 -0
  566. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  567. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +5 -0
  568. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +5 -0
  569. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  570. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +27 -0
  571. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +49 -0
  572. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  573. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +13 -0
  574. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +14 -0
  575. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  576. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +5 -0
  577. package/react/components/toolbar/advancedAppLauncher/components/Content.js +19 -0
  578. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  579. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +4 -0
  580. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -0
  581. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  582. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +16 -0
  583. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +39 -0
  584. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  585. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +4 -0
  586. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +9 -0
  587. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  588. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +3 -0
  589. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  590. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +6 -0
  591. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +7 -0
  592. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  593. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.d.ts +5 -0
  594. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js +5 -0
  595. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
  596. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -0
  597. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js +5 -0
  598. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  599. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +37 -0
  600. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js +40 -0
  601. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  602. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.d.ts +3 -0
  603. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +82 -0
  604. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  605. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +10 -0
  606. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -0
  607. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  608. package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +18 -0
  609. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +20 -0
  610. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  611. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +9 -0
  612. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +12 -0
  613. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  614. package/react/components/toolbar/appLauncher/appLauncher.css +1 -1
  615. package/react/components/toolbar/appLauncher/components/componentList.d.ts +3 -0
  616. package/react/components/toolbar/appLauncher/components/componentList.js +17 -3
  617. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  618. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +6 -0
  619. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +26 -0
  620. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  621. package/react/components/toolbar/dashbar/Dashbar.js +70 -3
  622. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  623. package/react/components/toolbar/dashbar/DashbarItem.js +5 -0
  624. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  625. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +7 -0
  626. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +7 -0
  627. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  628. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +16 -0
  629. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js +20 -0
  630. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  631. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +26 -0
  632. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +29 -0
  633. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  634. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +5 -0
  635. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +6 -0
  636. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  637. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +76 -0
  638. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +140 -1
  639. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  640. package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +8 -18
  641. package/react/components/userPreferences/NotificationsPreferencesContext.d.ts +4 -0
  642. package/react/components/userPreferences/NotificationsPreferencesContext.js +4 -0
  643. package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
  644. package/react/components/userPreferences/UserPreferenceTypes.d.ts +3 -0
  645. package/react/components/userPreferences/UserPreferences.d.ts +8 -0
  646. package/react/components/userPreferences/UserPreferences.js +8 -0
  647. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  648. package/react/components/userPreferences/UserPreferencesBase.js +4 -0
  649. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  650. package/react/components/userPreferences/components/ContentSection.d.ts +5 -0
  651. package/react/components/userPreferences/components/LeftNav.d.ts +4 -0
  652. package/react/components/userPreferences/components/content/DashbarEditor.js +3 -0
  653. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  654. package/react/components/userPreferences/components/content/Notifications.js +3 -0
  655. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  656. package/react/components/userPreferences/components/content/Workspaces.d.ts +12 -0
  657. package/react/components/userPreferences/components/content/Workspaces.js +36 -3
  658. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  659. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +3 -0
  660. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  661. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +3 -0
  662. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  663. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +3 -0
  664. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  665. package/react/components/userPreferences/components/general/ScheduledClose.js +11 -0
  666. package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -1
  667. package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +1 -1
  668. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +20 -10
  669. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
  670. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +17 -0
  671. package/react/components/userPreferences/stores/UserPreferencesStore.js +27 -0
  672. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  673. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +1 -0
  674. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
  675. package/react/components/userPreferences/tests/Workspace.spec.js +20 -0
  676. package/react/components/userPreferences/tests/Workspace.spec.js.map +1 -1
  677. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +111 -0
  678. package/react/components/windowTitleBar/WindowTitleBarShell.js +218 -47
  679. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  680. package/react/components/windowTitleBar/components/center/Tab.d.ts +3 -0
  681. package/react/components/windowTitleBar/components/center/Tab.js +3 -0
  682. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  683. package/react/components/windowTitleBar/components/center/TabList.d.ts +90 -0
  684. package/react/components/windowTitleBar/components/center/TabList.js +170 -4
  685. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  686. package/react/components/windowTitleBar/components/left/LinkerButton.d.ts +9 -1
  687. package/react/components/windowTitleBar/components/left/LinkerButton.js +25 -9
  688. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  689. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +47 -0
  690. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js +76 -1
  691. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
  692. package/react/components/windowTitleBar/components/left/LinkerGroups.d.ts +4 -0
  693. package/react/components/windowTitleBar/components/left/LinkerGroups.js +5 -0
  694. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  695. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.d.ts +18 -0
  696. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js +49 -0
  697. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
  698. package/react/components/windowTitleBar/components/left/ShareButton.d.ts +17 -0
  699. package/react/components/windowTitleBar/components/left/ShareButton.js +39 -0
  700. package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
  701. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js +4 -0
  702. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
  703. package/react/components/windowTitleBar/components/right/CloseButton.d.ts +27 -0
  704. package/react/components/windowTitleBar/components/right/CloseButton.js +27 -0
  705. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  706. package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +37 -0
  707. package/react/components/windowTitleBar/components/right/GroupingButton.js +40 -0
  708. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  709. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +46 -0
  710. package/react/components/windowTitleBar/components/right/MaximizeButton.js +54 -0
  711. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  712. package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +26 -0
  713. package/react/components/windowTitleBar/components/right/MinimizeButton.js +26 -0
  714. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  715. package/react/components/windowTitleBar/components/windowTitle.d.ts +40 -0
  716. package/react/components/windowTitleBar/components/windowTitle.js +172 -10
  717. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  718. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +5 -0
  719. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +72 -1
  720. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  721. package/react/components/yesNoDialog/YesNoDialog.css +1 -1
  722. package/react/components/yesNoDialog/YesNoDialog.d.ts +3 -0
  723. package/react/components/yesNoDialog/YesNoDialog.js +63 -0
  724. package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
  725. package/react/components/yesNoDialog/YesNoDialog.spec.js +4 -0
  726. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  727. package/react/components/yesNoDialog/timer.js +2 -0
  728. package/react/components/yesNoDialog/timer.js.map +1 -1
  729. package/react/enzymeSetup.js +5 -0
  730. package/react/enzymeSetup.js.map +1 -1
  731. package/react/hooks/useDashbar.js +10 -0
  732. package/react/hooks/useDashbar.js.map +1 -1
  733. package/react/hooks/useDeepEffect.d.ts +4 -0
  734. package/react/hooks/useDeepEffect.js +21 -0
  735. package/react/hooks/useDeepEffect.js.map +1 -1
  736. package/react/hooks/useFavorites.d.ts +15 -0
  737. package/react/hooks/useFavorites.js +3 -0
  738. package/react/hooks/useFavorites.js.map +1 -1
  739. package/react/hooks/useFavoritesShell.d.ts +4 -0
  740. package/react/hooks/useFavoritesShell.js +23 -0
  741. package/react/hooks/useFavoritesShell.js.map +1 -1
  742. package/react/hooks/useHotkey.d.ts +6 -0
  743. package/react/hooks/useHotkey.js +9 -0
  744. package/react/hooks/useHotkey.js.map +1 -1
  745. package/react/hooks/useLinker.js +14 -0
  746. package/react/hooks/useLinker.js.map +1 -1
  747. package/react/hooks/useMenu.d.ts +29 -0
  748. package/react/hooks/useMenu.js +12 -1
  749. package/react/hooks/useMenu.js.map +1 -1
  750. package/react/hooks/useNotifications.d.ts +44 -0
  751. package/react/hooks/useNotifications.js +100 -4
  752. package/react/hooks/useNotifications.js.map +1 -1
  753. package/react/hooks/useOutsideClickDetector.d.ts +3 -0
  754. package/react/hooks/useOutsideClickDetector.js +3 -0
  755. package/react/hooks/useOutsideClickDetector.js.map +1 -1
  756. package/react/hooks/usePubSub.d.ts +17 -0
  757. package/react/hooks/usePubSub.js +18 -0
  758. package/react/hooks/usePubSub.js.map +1 -1
  759. package/react/hooks/useSearch.d.ts +5 -0
  760. package/react/hooks/useSearch.js +30 -0
  761. package/react/hooks/useSearch.js.map +1 -1
  762. package/react/hooks/useToolbar.js +52 -0
  763. package/react/hooks/useToolbar.js.map +1 -1
  764. package/react/reducers/favoriteReducer.d.ts +3 -0
  765. package/react/reducers/linkerReducer.d.ts +3 -0
  766. package/react/reducers/linkerReducer.js +4 -0
  767. package/react/reducers/linkerReducer.js.map +1 -1
  768. package/react/reducers/menuReducer.d.ts +28 -0
  769. package/react/reducers/menuReducer.js +34 -0
  770. package/react/reducers/menuReducer.js.map +1 -1
  771. package/react/reducers/rootReducer.js +3 -0
  772. package/react/reducers/rootReducer.js.map +1 -1
  773. package/react/reducers/searchReducer.d.ts +7 -0
  774. package/react/reducers/searchReducer.js +6 -0
  775. package/react/reducers/searchReducer.js.map +1 -1
  776. package/react/reducers/workspaceReducer.js +1 -0
  777. package/react/reducers/workspaceReducer.js.map +1 -1
  778. package/react/store.d.ts +4 -0
  779. package/react/store.js +11 -0
  780. package/react/store.js.map +1 -1
  781. package/react/tsconfig.tsbuildinfo +1 -1
  782. package/react/types/fdc3.d.ts +2 -0
  783. package/react/types/linkerTypes.d.ts +13 -0
  784. package/react/types/linkerTypes.js +1 -0
  785. package/react/types/linkerTypes.js.map +1 -1
  786. package/react/types/smartDesktopDesignerTypes.d.ts +5 -0
  787. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  788. package/react/types/workspaceTypes.d.ts +8 -0
@@ -11,6 +11,7 @@ const Actions = {
11
11
  async.parallel([
12
12
  Actions.initializeComponentList,
13
13
  Actions.getUserDefinedComponentList,
14
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
14
15
  setupHotkeys,
15
16
  ], (err) => {
16
17
  if (err) {
@@ -25,6 +26,7 @@ const Actions = {
25
26
  if (typeof err === "string") {
26
27
  throw new Error(err);
27
28
  }
29
+ // Each AppLauncher
28
30
  FSBL.Clients.Logger.system.debug("getComponentList from LauncherClient", response);
29
31
  Actions.filterComponents(response);
30
32
  if (cb) {
@@ -35,16 +37,19 @@ const Actions = {
35
37
  initializeComponentList(cb) {
36
38
  const self = Actions;
37
39
  let firstTime = true;
40
+ // When an app launcher button is clicked, it sends over the types of components that the app launcher can spawn. We assign that data to an object in the windowClient, and then use that to render the app launcher.
38
41
  FSBL.Clients.RouterClient.subscribe(COMPONENT_UPDATE_CHANNEL, (_err, response) => {
39
42
  if (!FSBL.Clients.WindowClient.options.customData.spawnData) {
40
43
  FSBL.Clients.WindowClient.options.customData.spawnData = {};
41
44
  }
42
45
  Object.assign(FSBL.Clients.WindowClient.options.customData.spawnData, response.data);
43
46
  if (firstTime) {
47
+ // only update component list the first time to eliminate re-rendering the menu
44
48
  Actions.getComponentList(cb);
45
49
  firstTime = false;
46
50
  }
47
51
  });
52
+ // Whenever we add or remove a component, this event is fired. We get a list of all components, then filter it out to include only the ones that this particular launcher is capable of spawning.
48
53
  FSBL.Clients.RouterClient.subscribe("Launcher.update", (err, response) => {
49
54
  FSBL.Clients.Logger.system.debug("list updated", err, response);
50
55
  if (err) {
@@ -53,9 +58,11 @@ const Actions = {
53
58
  self.filterComponents(response.data.componentList);
54
59
  });
55
60
  },
61
+ // get quick components that the user created from storage.
56
62
  getUserDefinedComponentList(cb) {
57
63
  return cb();
58
64
  },
65
+ // saves quick components
59
66
  saveCustomComponents() {
60
67
  const UDCs = {};
61
68
  const components = Object.keys(Actions.componentList);
@@ -71,6 +78,12 @@ const Actions = {
71
78
  value: UDCs,
72
79
  });
73
80
  },
81
+ /**
82
+ * Produce a filtered component list based on the settings for this menu (either "mode" or "list").
83
+ *
84
+ * Components will only be added to the returned list if they match the specified mode or
85
+ * are found in the specified list
86
+ */
74
87
  processSettings(settings, components) {
75
88
  let componentList = {};
76
89
  const keys = Object.keys(components);
@@ -82,6 +95,7 @@ const Actions = {
82
95
  const mode = ((_a = config === null || config === void 0 ? void 0 : config.component) === null || _a === void 0 ? void 0 : _a.mode) || [""];
83
96
  const coponentMode = Array.isArray(mode) ? mode : [mode];
84
97
  const commonModes = coponentMode.filter((n) => settingsMode.indexOf(n) !== -1);
98
+ // If the current mode isn't in the list of modes for the component then don't include it in our list
85
99
  if (commonModes.length) {
86
100
  componentList[componentType] = components[componentType];
87
101
  }
@@ -95,6 +109,10 @@ const Actions = {
95
109
  }
96
110
  return componentList;
97
111
  },
112
+ // This filters components based on the mode and list settings in customData
113
+ // Available settings are list - where you list specific individual component Types, mode - which piggybacks on config.mode and lists all components where the mode matches
114
+ // If neither mode not list are set, all components are shown
115
+ // Custom Components are always shown
98
116
  filterComponents(components = {}) {
99
117
  var _a;
100
118
  const settings = (_a = FSBL.Clients.WindowClient.getSpawnData()) !== null && _a !== void 0 ? _a : {};
@@ -106,6 +124,8 @@ const Actions = {
106
124
  });
107
125
  this.saveCustomComponents();
108
126
  },
127
+ // Handler for when the user wants to remove a quick component.
128
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
109
129
  handleRemoveCustomComponent(componentName, cb = (wasDeconsted) => { }) {
110
130
  const self = this;
111
131
  FSBL.Clients.DialogManager.open("yesNo", {
@@ -114,6 +134,8 @@ const Actions = {
114
134
  affirmativeResponseLabel: "Delete",
115
135
  showNegativeButton: false,
116
136
  }, (err, response) => {
137
+ // If the user chooses "affirmative" then delete the component.
138
+ // We should never get an error, but if we do then go ahead and delete the component too.
117
139
  if (err || response.choice === "affirmative") {
118
140
  cb(true);
119
141
  self.removeCustomComponent(componentName);
@@ -123,6 +145,7 @@ const Actions = {
123
145
  }
124
146
  });
125
147
  },
148
+ // Remove the component, notify others.
126
149
  removeCustomComponent(componentName) {
127
150
  FSBL.Clients.LauncherClient.removeUserDefinedComponent({
128
151
  name: componentName,
@@ -133,10 +156,13 @@ const Actions = {
133
156
  Actions.getComponentList();
134
157
  });
135
158
  },
159
+ // Hide the window.
136
160
  hideWindow() {
137
161
  finsembleWindow.hide();
138
162
  },
163
+ // Spawn a component.
139
164
  launchComponent(config, params, cb) {
165
+ // Actions.hideWindow();
140
166
  const defaultParams = {
141
167
  addToWorkspace: true,
142
168
  monitor: "mine",
@@ -1 +1 @@
1
- {"version":3,"file":"appLauncherStore.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/appLauncher/stores/appLauncherStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,IAAI,gBAAwC,CAAC;AAC7C,IAAI,wBAAgC,CAAC;AAKrC,MAAM,OAAO,GAAG;IACf,aAAa,EAAE,EAAmB;IAClC,UAAU,EAAE,UAA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M,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,IAAI,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { SpawnResponse } from \"@finsemble/finsemble-api/types/clients/launcherClient\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nimport async from \"async\";\nimport { WindowIdentifier } from \"@finsemble/finsemble-api\";\nlet appLauncherStore: StoreModel | undefined;\nlet COMPONENT_UPDATE_CHANNEL: string;\ntype VoidCallback = () => void;\ntype ComponentDescriptor = Record<string, any>;\ntype ComponentList = Record<string, ComponentDescriptor>;\n\nconst Actions = {\n\tcomponentList: {} as ComponentList,\n\tinitialize: function (cb: VoidCallback) {\n\t\tasync.parallel(\n\t\t\t[\n\t\t\t\tActions.initializeComponentList,\n\t\t\t\tActions.getUserDefinedComponentList,\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\t\t\tsetupHotkeys,\n\t\t\t],\n\t\t\t(err) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t}\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"Actions.initialize done\");\n\t\t\t\tcb();\n\t\t\t}\n\t\t);\n\t},\n\tgetComponentList(cb?: VoidCallback) {\n\t\tFSBL.Clients.LauncherClient.getComponentList((err: StandardError, response) => {\n\t\t\tif (typeof err === \"string\") {\n\t\t\t\tthrow new Error(err);\n\t\t\t}\n\t\t\t// Each AppLauncher\n\t\t\tFSBL.Clients.Logger.system.debug(\"getComponentList from LauncherClient\", response);\n\t\t\tActions.filterComponents(response);\n\t\t\tif (cb) {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\t},\n\tinitializeComponentList(cb: VoidCallback) {\n\t\tconst self = Actions;\n\t\tlet firstTime = true;\n\n\t\t// When an app launcher button is clicked, it sends over the types of components that the app launcher can spawn. We assign that data to an object in the windowClient, and then use that to render the app launcher.\n\t\tFSBL.Clients.RouterClient.subscribe(COMPONENT_UPDATE_CHANNEL, (_err, response) => {\n\t\t\tif (!FSBL.Clients.WindowClient.options.customData.spawnData) {\n\t\t\t\tFSBL.Clients.WindowClient.options.customData.spawnData = {};\n\t\t\t}\n\t\t\tObject.assign(FSBL.Clients.WindowClient.options.customData.spawnData, response.data);\n\t\t\tif (firstTime) {\n\t\t\t\t// only update component list the first time to eliminate re-rendering the menu\n\t\t\t\tActions.getComponentList(cb);\n\t\t\t\tfirstTime = false;\n\t\t\t}\n\t\t});\n\n\t\t// Whenever we add or remove a component, this event is fired. We get a list of all components, then filter it out to include only the ones that this particular launcher is capable of spawning.\n\t\tFSBL.Clients.RouterClient.subscribe(\"Launcher.update\", (err, response) => {\n\t\t\tFSBL.Clients.Logger.system.debug(\"list updated\", err, response);\n\t\t\tif (err) {\n\t\t\t\treturn console.error(err);\n\t\t\t}\n\t\t\tself.filterComponents(response.data.componentList);\n\t\t});\n\t},\n\t// get quick components that the user created from storage.\n\tgetUserDefinedComponentList(cb: VoidCallback) {\n\t\treturn cb();\n\t},\n\t// saves quick components\n\tsaveCustomComponents() {\n\t\tconst UDCs: { [key: string]: any } = {};\n\t\tconst components = Object.keys(Actions.componentList);\n\t\tfor (let i = 0; i < components.length; i++) {\n\t\t\tconst config = Actions.componentList[components[i]];\n\t\t\tif (config.component && config.component.isUserDefined) {\n\t\t\t\tUDCs[config.component.type] = config;\n\t\t\t}\n\t\t}\n\t\tFSBL.Clients.StorageClient.save({\n\t\t\ttopic: \"finsemble\",\n\t\t\tkey: \"userDefinedComponents\",\n\t\t\tvalue: UDCs,\n\t\t});\n\t},\n\t/**\n\t * Produce a filtered component list based on the settings for this menu (either \"mode\" or \"list\").\n\t *\n\t * Components will only be added to the returned list if they match the specified mode or\n\t * are found in the specified list\n\t */\n\tprocessSettings(settings: any, components: ComponentList): ComponentList {\n\t\tlet componentList: ComponentList = {};\n\t\tconst keys = Object.keys(components);\n\t\tif (settings.mode) {\n\t\t\tconst settingsMode = Array.isArray(settings.mode) ? settings.mode : [settings.mode];\n\n\t\t\tkeys.forEach((componentType) => {\n\t\t\t\tconst config = components[componentType];\n\t\t\t\tconst mode = config?.component?.mode || [\"\"];\n\t\t\t\tconst coponentMode = Array.isArray(mode) ? mode : [mode];\n\n\t\t\t\tconst commonModes = coponentMode.filter((n: ComponentDescriptor) => settingsMode.indexOf(n) !== -1);\n\n\t\t\t\t// If the current mode isn't in the list of modes for the component then don't include it in our list\n\t\t\t\tif (commonModes.length) {\n\t\t\t\t\tcomponentList[componentType] = components[componentType];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (settings.list) {\n\t\t\tconst commonItems = settings.list.filter((n: any) => keys.indexOf(n) !== -1);\n\n\t\t\tfor (let i = 0; i < commonItems.length; i++) {\n\t\t\t\tcomponentList[commonItems[i]] = components[commonItems[i]];\n\t\t\t}\n\t\t}\n\t\treturn componentList;\n\t},\n\t// This filters components based on the mode and list settings in customData\n\t// Available settings are list - where you list specific individual component Types, mode - which piggybacks on config.mode and lists all components where the mode matches\n\t// If neither mode not list are set, all components are shown\n\t// Custom Components are always shown\n\tfilterComponents(components: ComponentList = {}) {\n\t\tconst settings = FSBL.Clients.WindowClient.getSpawnData() ?? {};\n\t\tthis.componentList = settings.mode || settings.list ? this.processSettings(settings, components) : components;\n\n\t\tFSBL.Clients.Logger.system.debug(\n\t\t\t\"appLauncher filterComponents\",\n\t\t\tthis.componentList,\n\t\t\t\"settings\",\n\t\t\tsettings,\n\t\t\t\"customData\",\n\t\t\tFSBL.Clients.WindowClient.options.customData\n\t\t);\n\t\tappLauncherStore?.setValue({\n\t\t\tfield: \"componentList\",\n\t\t\tvalue: this.componentList,\n\t\t});\n\t\tthis.saveCustomComponents();\n\t},\n\t// Handler for when the user wants to remove a quick component.\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\thandleRemoveCustomComponent(componentName: string, cb = (wasDeconsted: boolean) => {}) {\n\t\tconst self = this;\n\t\tFSBL.Clients.DialogManager.open(\n\t\t\t\"yesNo\",\n\t\t\t{\n\t\t\t\ttitle: \"Delete this App?\",\n\t\t\t\tquestion: `Are you sure you would like to delete \"${componentName}\"?`,\n\t\t\t\taffirmativeResponseLabel: \"Delete\",\n\t\t\t\tshowNegativeButton: false,\n\t\t\t},\n\t\t\t(err, response) => {\n\t\t\t\t// If the user chooses \"affirmative\" then delete the component.\n\t\t\t\t// We should never get an error, but if we do then go ahead and delete the component too.\n\t\t\t\tif (err || response.choice === \"affirmative\") {\n\t\t\t\t\tcb(true);\n\t\t\t\t\tself.removeCustomComponent(componentName);\n\t\t\t\t} else {\n\t\t\t\t\tcb(false);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\t// Remove the component, notify others.\n\tremoveCustomComponent(componentName: string) {\n\t\tFSBL.Clients.LauncherClient.removeUserDefinedComponent(\n\t\t\t{\n\t\t\t\tname: componentName,\n\t\t\t},\n\t\t\t(err) => {\n\t\t\t\tif (err) {\n\t\t\t\t\treturn console.error(err);\n\t\t\t\t}\n\t\t\t\tActions.getComponentList();\n\t\t\t}\n\t\t);\n\t},\n\t// Hide the window.\n\thideWindow() {\n\t\tfinsembleWindow.hide();\n\t},\n\t// Spawn a component.\n\tlaunchComponent(config: any, params: any, cb?: (win?: WindowIdentifier) => void) {\n\t\t// Actions.hideWindow();\n\t\tconst defaultParams = {\n\t\t\taddToWorkspace: true,\n\t\t\tmonitor: \"mine\",\n\t\t\toptions: { customData: {} },\n\t\t};\n\t\tparams = Object.assign(defaultParams, params);\n\t\tif (!params.options.customData) {\n\t\t\tparams.options.customData = {};\n\t\t}\n\t\tif (!params.options.customData.component) {\n\t\t\tparams.options.customData.component = {};\n\t\t}\n\t\tif (config.component.windowGroup) {\n\t\t\tparams.groupName = config.component.windowGroup;\n\t\t}\n\t\tFSBL.Clients.LauncherClient.spawn(\n\t\t\tconfig.component.type,\n\t\t\tparams,\n\t\t\t(_err: StandardError, windowInfo?: SpawnResponse) => {\n\t\t\t\tif (cb) {\n\t\t\t\t\tcb(windowInfo?.windowIdentifier);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n};\n\nfunction createLocalStore(done: VoidCallback) {\n\tconst defaultData = {\n\t\tcomponentList: {},\n\t\tmonitorDimensions: {},\n\t};\n\n\tFSBL.Clients.DistributedStoreClient.createStore(\n\t\t{ store: \"Finsemble-AppLauncher-Local-Store\", values: defaultData },\n\t\t(_err, store) => {\n\t\t\tappLauncherStore = store;\n\t\t\tdone();\n\t\t}\n\t);\n}\n\nfunction getWindowGroupStore(done: VoidCallback) {\n\tFSBL.Clients.DistributedStoreClient.createStore({ global: true, store: \"Finsemble-WindowGroups\" }, () => {\n\t\tdone();\n\t});\n}\n\nfunction initialize(cb: (store?: StoreModel) => void) {\n\tCOMPONENT_UPDATE_CHANNEL = `${finsembleWindow.name}.ComponentsToRender`;\n\tFSBL.Clients.RouterClient.addPubSubResponder(COMPONENT_UPDATE_CHANNEL, {});\n\tasync.parallel([createLocalStore, getWindowGroupStore, Actions.initialize], (err) => {\n\t\tif (err) {\n\t\t\tconsole.error(err);\n\t\t}\n\t\tFSBL.Clients.Logger.system.debug(\"appLauncherstore init done\");\n\t\tcb(appLauncherStore);\n\t});\n}\n\nconst keys: { [key: string]: any } = {};\nfunction setupHotkeys(cb: VoidCallback) {\n\tFSBL.Clients.RouterClient.subscribe(\"humanInterface.keydown\", (_err, response) => {\n\t\tif (!keys[response.data.key]) {\n\t\t\tkeys[response.data.key] = {};\n\t\t}\n\t\tkeys[response.data.key] = true;\n\t\tif (keys[160] && keys[162] && keys[68] && Actions.componentList[\"Advanced Chart\"]) {\n\t\t\tFSBL.Clients.LauncherClient.spawn(\"Advanced Chart\", { addToWorkspace: true, monitor: \"mine\" });\n\t\t}\n\t});\n\tFSBL.Clients.RouterClient.subscribe(\"humanInterface.keyup\", (_err, response) => {\n\t\tif (!keys[response.data.key]) {\n\t\t\tkeys[response.data.key] = {};\n\t\t}\n\t\tkeys[response.data.key] = false;\n\t});\n\n\treturn cb();\n}\n\nconst getStore = () => appLauncherStore;\n\nclass StoreManager {\n\tinitialized: boolean;\n\n\tinitializing: boolean;\n\n\tcallbacks: Function[];\n\n\tstore: StoreModel | undefined | null;\n\n\tconstructor() {\n\t\tthis.initialized = false;\n\t\tthis.initializing = false;\n\t\tthis.callbacks = [];\n\t\tthis.store = null;\n\t}\n\n\tinitialize() {\n\t\tif (this.initializing) return;\n\t\tthis.initializing = true;\n\t\tinitialize((store?: StoreModel) => {\n\t\t\tthis.initialized = true;\n\t\t\tthis.store = store;\n\t\t\tthis.callbacks.forEach((cb) => cb(store));\n\t\t});\n\t}\n\n\taddInitializedListener(cb: (store: StoreModel) => void) {\n\t\tif (this.initialized && this.store) return cb(this.store);\n\t\tthis.callbacks.push(cb);\n\t}\n\n\tremoveInitializedListener(cb: Function) {\n\t\tthis.callbacks = this.callbacks.filter((entry) => entry !== cb);\n\t}\n}\nconst storeManager = new StoreManager();\n\nexport { storeManager, initialize, appLauncherStore as Store, Actions, getStore };\n"]}
1
+ {"version":3,"file":"appLauncherStore.js","sourceRoot":"","sources":["../../../../../src/components/toolbar/appLauncher/stores/appLauncherStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,IAAI,gBAAwC,CAAC;AAC7C,IAAI,wBAAgC,CAAC;AAKrC,MAAM,OAAO,GAAG;IACf,aAAa,EAAE,EAAmB;IAClC,UAAU,EAAE,UAAU,EAAgB;QACrC,KAAK,CAAC,QAAQ,CACb;YACC,OAAO,CAAC,uBAAuB;YAC/B,OAAO,CAAC,2BAA2B;YACnC,mEAAmE;YACnE,YAAY;SACZ,EACD,CAAC,GAAG,EAAE,EAAE;YACP,IAAI,GAAG,EAAE;gBACR,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC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AAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;CACD;AACD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,IAAI,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { SpawnResponse } from \"@finsemble/finsemble-api/types/clients/launcherClient\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nimport async from \"async\";\nimport { WindowIdentifier } from \"@finsemble/finsemble-api\";\nlet appLauncherStore: StoreModel | undefined;\nlet COMPONENT_UPDATE_CHANNEL: string;\ntype VoidCallback = () => void;\ntype ComponentDescriptor = Record<string, any>;\ntype ComponentList = Record<string, ComponentDescriptor>;\n\nconst Actions = {\n\tcomponentList: {} as ComponentList,\n\tinitialize: function (cb: VoidCallback) {\n\t\tasync.parallel(\n\t\t\t[\n\t\t\t\tActions.initializeComponentList,\n\t\t\t\tActions.getUserDefinedComponentList,\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\t\t\tsetupHotkeys,\n\t\t\t],\n\t\t\t(err) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t}\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"Actions.initialize done\");\n\t\t\t\tcb();\n\t\t\t}\n\t\t);\n\t},\n\tgetComponentList(cb?: VoidCallback) {\n\t\tFSBL.Clients.LauncherClient.getComponentList((err: StandardError, response) => {\n\t\t\tif (typeof err === \"string\") {\n\t\t\t\tthrow new Error(err);\n\t\t\t}\n\t\t\t// Each AppLauncher\n\t\t\tFSBL.Clients.Logger.system.debug(\"getComponentList from LauncherClient\", response);\n\t\t\tActions.filterComponents(response);\n\t\t\tif (cb) {\n\t\t\t\tcb();\n\t\t\t}\n\t\t});\n\t},\n\tinitializeComponentList(cb: VoidCallback) {\n\t\tconst self = Actions;\n\t\tlet firstTime = true;\n\n\t\t// When an app launcher button is clicked, it sends over the types of components that the app launcher can spawn. We assign that data to an object in the windowClient, and then use that to render the app launcher.\n\t\tFSBL.Clients.RouterClient.subscribe(COMPONENT_UPDATE_CHANNEL, (_err, response) => {\n\t\t\tif (!FSBL.Clients.WindowClient.options.customData.spawnData) {\n\t\t\t\tFSBL.Clients.WindowClient.options.customData.spawnData = {};\n\t\t\t}\n\t\t\tObject.assign(FSBL.Clients.WindowClient.options.customData.spawnData, response.data);\n\t\t\tif (firstTime) {\n\t\t\t\t// only update component list the first time to eliminate re-rendering the menu\n\t\t\t\tActions.getComponentList(cb);\n\t\t\t\tfirstTime = false;\n\t\t\t}\n\t\t});\n\n\t\t// Whenever we add or remove a component, this event is fired. We get a list of all components, then filter it out to include only the ones that this particular launcher is capable of spawning.\n\t\tFSBL.Clients.RouterClient.subscribe(\"Launcher.update\", (err, response) => {\n\t\t\tFSBL.Clients.Logger.system.debug(\"list updated\", err, response);\n\t\t\tif (err) {\n\t\t\t\treturn console.error(err);\n\t\t\t}\n\t\t\tself.filterComponents(response.data.componentList);\n\t\t});\n\t},\n\t// get quick components that the user created from storage.\n\tgetUserDefinedComponentList(cb: VoidCallback) {\n\t\treturn cb();\n\t},\n\t// saves quick components\n\tsaveCustomComponents() {\n\t\tconst UDCs: { [key: string]: any } = {};\n\t\tconst components = Object.keys(Actions.componentList);\n\t\tfor (let i = 0; i < components.length; i++) {\n\t\t\tconst config = Actions.componentList[components[i]];\n\t\t\tif (config.component && config.component.isUserDefined) {\n\t\t\t\tUDCs[config.component.type] = config;\n\t\t\t}\n\t\t}\n\t\tFSBL.Clients.StorageClient.save({\n\t\t\ttopic: \"finsemble\",\n\t\t\tkey: \"userDefinedComponents\",\n\t\t\tvalue: UDCs,\n\t\t});\n\t},\n\t/**\n\t * Produce a filtered component list based on the settings for this menu (either \"mode\" or \"list\").\n\t *\n\t * Components will only be added to the returned list if they match the specified mode or\n\t * are found in the specified list\n\t */\n\tprocessSettings(settings: any, components: ComponentList): ComponentList {\n\t\tlet componentList: ComponentList = {};\n\t\tconst keys = Object.keys(components);\n\t\tif (settings.mode) {\n\t\t\tconst settingsMode = Array.isArray(settings.mode) ? settings.mode : [settings.mode];\n\n\t\t\tkeys.forEach((componentType) => {\n\t\t\t\tconst config = components[componentType];\n\t\t\t\tconst mode = config?.component?.mode || [\"\"];\n\t\t\t\tconst coponentMode = Array.isArray(mode) ? mode : [mode];\n\n\t\t\t\tconst commonModes = coponentMode.filter((n: ComponentDescriptor) => settingsMode.indexOf(n) !== -1);\n\n\t\t\t\t// If the current mode isn't in the list of modes for the component then don't include it in our list\n\t\t\t\tif (commonModes.length) {\n\t\t\t\t\tcomponentList[componentType] = components[componentType];\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tif (settings.list) {\n\t\t\tconst commonItems = settings.list.filter((n: any) => keys.indexOf(n) !== -1);\n\n\t\t\tfor (let i = 0; i < commonItems.length; i++) {\n\t\t\t\tcomponentList[commonItems[i]] = components[commonItems[i]];\n\t\t\t}\n\t\t}\n\t\treturn componentList;\n\t},\n\t// This filters components based on the mode and list settings in customData\n\t// Available settings are list - where you list specific individual component Types, mode - which piggybacks on config.mode and lists all components where the mode matches\n\t// If neither mode not list are set, all components are shown\n\t// Custom Components are always shown\n\tfilterComponents(components: ComponentList = {}) {\n\t\tconst settings = FSBL.Clients.WindowClient.getSpawnData() ?? {};\n\t\tthis.componentList = settings.mode || settings.list ? this.processSettings(settings, components) : components;\n\n\t\tFSBL.Clients.Logger.system.debug(\n\t\t\t\"appLauncher filterComponents\",\n\t\t\tthis.componentList,\n\t\t\t\"settings\",\n\t\t\tsettings,\n\t\t\t\"customData\",\n\t\t\tFSBL.Clients.WindowClient.options.customData\n\t\t);\n\t\tappLauncherStore?.setValue({\n\t\t\tfield: \"componentList\",\n\t\t\tvalue: this.componentList,\n\t\t});\n\t\tthis.saveCustomComponents();\n\t},\n\t// Handler for when the user wants to remove a quick component.\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\thandleRemoveCustomComponent(componentName: string, cb = (wasDeconsted: boolean) => {}) {\n\t\tconst self = this;\n\t\tFSBL.Clients.DialogManager.open(\n\t\t\t\"yesNo\",\n\t\t\t{\n\t\t\t\ttitle: \"Delete this App?\",\n\t\t\t\tquestion: `Are you sure you would like to delete \"${componentName}\"?`,\n\t\t\t\taffirmativeResponseLabel: \"Delete\",\n\t\t\t\tshowNegativeButton: false,\n\t\t\t},\n\t\t\t(err, response) => {\n\t\t\t\t// If the user chooses \"affirmative\" then delete the component.\n\t\t\t\t// We should never get an error, but if we do then go ahead and delete the component too.\n\t\t\t\tif (err || response.choice === \"affirmative\") {\n\t\t\t\t\tcb(true);\n\t\t\t\t\tself.removeCustomComponent(componentName);\n\t\t\t\t} else {\n\t\t\t\t\tcb(false);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\t// Remove the component, notify others.\n\tremoveCustomComponent(componentName: string) {\n\t\tFSBL.Clients.LauncherClient.removeUserDefinedComponent(\n\t\t\t{\n\t\t\t\tname: componentName,\n\t\t\t},\n\t\t\t(err) => {\n\t\t\t\tif (err) {\n\t\t\t\t\treturn console.error(err);\n\t\t\t\t}\n\t\t\t\tActions.getComponentList();\n\t\t\t}\n\t\t);\n\t},\n\t// Hide the window.\n\thideWindow() {\n\t\tfinsembleWindow.hide();\n\t},\n\t// Spawn a component.\n\tlaunchComponent(config: any, params: any, cb?: (win?: WindowIdentifier) => void) {\n\t\t// Actions.hideWindow();\n\t\tconst defaultParams = {\n\t\t\taddToWorkspace: true,\n\t\t\tmonitor: \"mine\",\n\t\t\toptions: { customData: {} },\n\t\t};\n\t\tparams = Object.assign(defaultParams, params);\n\t\tif (!params.options.customData) {\n\t\t\tparams.options.customData = {};\n\t\t}\n\t\tif (!params.options.customData.component) {\n\t\t\tparams.options.customData.component = {};\n\t\t}\n\t\tif (config.component.windowGroup) {\n\t\t\tparams.groupName = config.component.windowGroup;\n\t\t}\n\t\tFSBL.Clients.LauncherClient.spawn(\n\t\t\tconfig.component.type,\n\t\t\tparams,\n\t\t\t(_err: StandardError, windowInfo?: SpawnResponse) => {\n\t\t\t\tif (cb) {\n\t\t\t\t\tcb(windowInfo?.windowIdentifier);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n};\n\nfunction createLocalStore(done: VoidCallback) {\n\tconst defaultData = {\n\t\tcomponentList: {},\n\t\tmonitorDimensions: {},\n\t};\n\n\tFSBL.Clients.DistributedStoreClient.createStore(\n\t\t{ store: \"Finsemble-AppLauncher-Local-Store\", values: defaultData },\n\t\t(_err, store) => {\n\t\t\tappLauncherStore = store;\n\t\t\tdone();\n\t\t}\n\t);\n}\n\nfunction getWindowGroupStore(done: VoidCallback) {\n\tFSBL.Clients.DistributedStoreClient.createStore({ global: true, store: \"Finsemble-WindowGroups\" }, () => {\n\t\tdone();\n\t});\n}\n\nfunction initialize(cb: (store?: StoreModel) => void) {\n\tCOMPONENT_UPDATE_CHANNEL = `${finsembleWindow.name}.ComponentsToRender`;\n\tFSBL.Clients.RouterClient.addPubSubResponder(COMPONENT_UPDATE_CHANNEL, {});\n\tasync.parallel([createLocalStore, getWindowGroupStore, Actions.initialize], (err) => {\n\t\tif (err) {\n\t\t\tconsole.error(err);\n\t\t}\n\t\tFSBL.Clients.Logger.system.debug(\"appLauncherstore init done\");\n\t\tcb(appLauncherStore);\n\t});\n}\n\nconst keys: { [key: string]: any } = {};\nfunction setupHotkeys(cb: VoidCallback) {\n\tFSBL.Clients.RouterClient.subscribe(\"humanInterface.keydown\", (_err, response) => {\n\t\tif (!keys[response.data.key]) {\n\t\t\tkeys[response.data.key] = {};\n\t\t}\n\t\tkeys[response.data.key] = true;\n\t\tif (keys[160] && keys[162] && keys[68] && Actions.componentList[\"Advanced Chart\"]) {\n\t\t\tFSBL.Clients.LauncherClient.spawn(\"Advanced Chart\", { addToWorkspace: true, monitor: \"mine\" });\n\t\t}\n\t});\n\tFSBL.Clients.RouterClient.subscribe(\"humanInterface.keyup\", (_err, response) => {\n\t\tif (!keys[response.data.key]) {\n\t\t\tkeys[response.data.key] = {};\n\t\t}\n\t\tkeys[response.data.key] = false;\n\t});\n\n\treturn cb();\n}\n\nconst getStore = () => appLauncherStore;\n\nclass StoreManager {\n\tinitialized: boolean;\n\n\tinitializing: boolean;\n\n\tcallbacks: Function[];\n\n\tstore: StoreModel | undefined | null;\n\n\tconstructor() {\n\t\tthis.initialized = false;\n\t\tthis.initializing = false;\n\t\tthis.callbacks = [];\n\t\tthis.store = null;\n\t}\n\n\tinitialize() {\n\t\tif (this.initializing) return;\n\t\tthis.initializing = true;\n\t\tinitialize((store?: StoreModel) => {\n\t\t\tthis.initialized = true;\n\t\t\tthis.store = store;\n\t\t\tthis.callbacks.forEach((cb) => cb(store));\n\t\t});\n\t}\n\n\taddInitializedListener(cb: (store: StoreModel) => void) {\n\t\tif (this.initialized && this.store) return cb(this.store);\n\t\tthis.callbacks.push(cb);\n\t}\n\n\tremoveInitializedListener(cb: Function) {\n\t\tthis.callbacks = this.callbacks.filter((entry) => entry !== cb);\n\t}\n}\nconst storeManager = new StoreManager();\n\nexport { storeManager, initialize, appLauncherStore as Store, Actions, getStore };\n"]}
@@ -16,9 +16,9 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
16
16
  const [totalWidgetsWidth, setTotalWidgetsWidth] = useState(0);
17
17
  const [isUpdatingState, setIsUpdatingState] = useState(false);
18
18
  const [secondUpdateRequired, setSecondUpdateRequired] = useState(false);
19
- let movingIndex = null;
20
- let titleGrabPosition = null;
21
- let offsetX = null;
19
+ let movingIndex = null; // The dashbarItem index being dragged, null if none
20
+ let titleGrabPosition = null; // The mouse of event when a widget title is dragged
21
+ let offsetX = null; // The original grab location of a given view titlebar
22
22
  const WIDGET_COUNT = Object.keys(widgets).length;
23
23
  const SCROLL_BUTTON_DEFAULT_WIDTH = 30;
24
24
  const defaultWidgetTitleGenerator = (widget, titleRef) => {
@@ -31,17 +31,25 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
31
31
  React.createElement("span", { dangerouslySetInnerHTML: { __html: widget.title } })));
32
32
  };
33
33
  const titleGenerator = widgetTitleGenerator !== null && widgetTitleGenerator !== void 0 ? widgetTitleGenerator : defaultWidgetTitleGenerator;
34
+ /**
35
+ *
36
+ * @param {object} params
37
+ * @param {number} oldIndex The index of the item being moved
38
+ * @param {number} newIndex The index to move the item to
39
+ */
34
40
  const reorderItems = ({ oldIndex, newIndex }) => {
35
41
  movingIndex = null;
36
42
  titleGrabPosition = null;
37
43
  offsetX = null;
38
44
  setReorganized(true);
45
+ // Update the redux store
39
46
  reorderDashbarItems({ oldIndex, newIndex });
40
47
  };
41
48
  const launchDashbar = () => {
42
49
  launchPreferences("Dashbar");
43
50
  };
44
51
  const { dashbar } = FSBL.Clients.WindowClient.getSpawnData();
52
+ // Dashbar is disabled (no config in toolbar) or dashbar height is not specified
45
53
  if (!dashbar || !dashbar.height) {
46
54
  return null;
47
55
  }
@@ -59,6 +67,8 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
59
67
  };
60
68
  const [leftButtonTooltip, setLeftButtonTooltip] = useState("");
61
69
  const [rightButtonTooltip, setRightButtonTooltip] = useState("");
70
+ // For calculation widgets position that function uses the HTML elements.
71
+ // If something will be changed in HTML hierarchy for widgets, that function should be refactored.
62
72
  const setWidgetsPositions = async () => {
63
73
  var _a;
64
74
  const { data: bounds } = await finsembleWindow.getBounds();
@@ -67,6 +77,7 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
67
77
  let toolbarWidth = (_a = bounds === null || bounds === void 0 ? void 0 : bounds.width) !== null && _a !== void 0 ? _a : 0;
68
78
  let SCROLL_BUTTON_WIDTH = SCROLL_BUTTON_DEFAULT_WIDTH;
69
79
  if (scrollButtonsEnabled) {
80
+ // Get actual width in case of client styling
70
81
  SCROLL_BUTTON_WIDTH = document.querySelectorAll("#dashbar-container > .chevron-container")[0]
71
82
  .offsetWidth;
72
83
  toolbarWidth = toolbarWidth - 2 * SCROLL_BUTTON_WIDTH;
@@ -80,10 +91,12 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
80
91
  let leftItemsCount = 0;
81
92
  let rightItemsCount = 0;
82
93
  for (const dashbarItem of elements) {
94
+ // rect.width already contains the divider width
83
95
  const rect = dashbarItem.getBoundingClientRect();
84
96
  const dashbarItemFrame = dashbarItem.firstChild;
85
97
  const widgetId = dashbarItemFrame.id;
86
98
  const widget = widgets[widgetId];
99
+ // Happens when widgets were removed, but dom-elements still exists. So just ignore.
87
100
  if (!widget)
88
101
  continue;
89
102
  if (rect.left < SCROLL_BUTTON_WIDTH && scrollButtonsEnabled) {
@@ -98,6 +111,7 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
98
111
  }
99
112
  let offsetRight = rect.left + rect.width - widgetDividerWidth - leftButtonSize - toolbarWidth;
100
113
  if (offsetRight > 0) {
114
+ // hide title for invisible items
101
115
  dashbarItemFrame.firstChild.style.visibility = "hidden";
102
116
  widget.bounds.width = 0;
103
117
  rightItemsCount++;
@@ -144,6 +158,9 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
144
158
  };
145
159
  const removeWidgets = async () => {
146
160
  const _widgets = clone(widgets);
161
+ // Widgets is an object, with each key being a reference to an item in dashbarItems
162
+ // but dashbarItems is an array of objects. Its necessary to loop through them to determine
163
+ // the differences to figure out which items were removed.
147
164
  const toRemove = [];
148
165
  Object.keys(_widgets).forEach((widgetId) => {
149
166
  let found = false;
@@ -159,10 +176,13 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
159
176
  }
160
177
  });
161
178
  let tempNewHorizontalBounds = 0;
179
+ // toRemove is an array of widgetIds which were no longer found in dashbarItems
180
+ // As items are removed, the remaining items have to be shuffled to fill the space
162
181
  for (const id of toRemove) {
163
182
  if (_widgets.hasOwnProperty(id)) {
164
183
  await _widgets[id].view.remove(() => {
165
184
  delete _widgets[id];
185
+ // Shuffle remaining views to fill any gaps that were left
166
186
  Object.values(_widgets).forEach((widget) => {
167
187
  widget.bounds = {
168
188
  width: widget.bounds.width,
@@ -184,6 +204,10 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
184
204
  };
185
205
  const reorganizeWidgets = () => {
186
206
  const _widgets = clone(widgets);
207
+ // Each view needs to be resituated to fill any holes
208
+ // left by views that have been removed. Use a tempBounds
209
+ // int to keep track of new widths and set the overall width
210
+ // once everything is re-seated
187
211
  let tempBounds = 0;
188
212
  dashbarItems.forEach((item) => {
189
213
  const widget = _widgets[item.id];
@@ -205,16 +229,19 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
205
229
  const updateItems = () => {
206
230
  const doUpdate = async () => {
207
231
  if (dashbarItems.length > WIDGET_COUNT) {
232
+ //Items have been added
208
233
  await addWidgets();
209
234
  setTotalWidgetsWidth(getTotalWidth());
210
235
  }
211
236
  else if (dashbarItems.length < WIDGET_COUNT) {
237
+ //Items have been removed
212
238
  await removeWidgets();
213
239
  setTotalWidgetsWidth(getTotalWidth());
214
240
  }
215
241
  else if (wasReorganized) {
216
242
  if (movingIndex)
217
243
  return;
244
+ // Length is the same, order has changed
218
245
  reorganizeWidgets();
219
246
  }
220
247
  await setWidgetsPositions();
@@ -228,15 +255,34 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
228
255
  setSecondUpdateRequired(true);
229
256
  }
230
257
  };
258
+ /**
259
+ * When the distributed store's 'dashbaritems' is updated it will cause this hook to
260
+ * execute. The local representation of widgets will be mutated, then a call to
261
+ * setWidgets will re-render the component
262
+ */
231
263
  useEffect(() => {
232
264
  updateItems();
233
265
  }, [dashbarItems]);
266
+ /**
267
+ * DashbarItems can be changed very quickly before all widgets will be initialized.
268
+ * Double-calling updateItems() fixes a bug.
269
+ */
234
270
  useEffect(() => {
235
271
  if (secondUpdateRequired && !isUpdatingState) {
236
272
  updateItems();
237
273
  setSecondUpdateRequired(false);
238
274
  }
239
275
  }, [isUpdatingState, secondUpdateRequired]);
276
+ /**
277
+ * Sets the title height as determined by the DashbarItem
278
+ * component, since the CSS can be changed by the user
279
+ * the component will render the title and pass back
280
+ * computed height of that title, then the Dashbar will
281
+ * make room for item
282
+ *
283
+ * @param {number} titleHeight The height of the span containing the title
284
+ * @param {string} id The key'ed id of the view
285
+ */
240
286
  const setTitleHeight = (titleHeight, id) => {
241
287
  const _widgets = widgets;
242
288
  const widget = _widgets[id];
@@ -254,6 +300,11 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
254
300
  widget.view.setBounds(newBounds);
255
301
  widget.bounds = newBounds;
256
302
  };
303
+ /**
304
+ * When a view starts moving, bring it to the front
305
+ *
306
+ * @param {MouseEvent} event The event passed by react-sortable-hoc
307
+ */
257
308
  const startMove = (node, event) => {
258
309
  movingIndex = node.index;
259
310
  if (offsetX === null && titleGrabPosition !== null) {
@@ -262,6 +313,11 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
262
313
  const widget = Object.values(widgets)[node.index];
263
314
  widget.view.bringToFront();
264
315
  };
316
+ /**
317
+ * Event triggered by view movement
318
+ *
319
+ * @param {MouseEvent} event
320
+ */
265
321
  const moveItem = (event) => {
266
322
  if (movingIndex !== null) {
267
323
  const movingWidget = Object.values(widgets)[movingIndex];
@@ -271,6 +327,7 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
271
327
  width: movingWidget.bounds.width,
272
328
  left: event.clientX - (offsetX || 0),
273
329
  });
330
+ // Some completely not react very hacky stuff to make browserviews move in conjunction with the titles
274
331
  const elements = document.getElementsByClassName("dashbar-item-frame");
275
332
  for (const element of elements) {
276
333
  const rect = element.getBoundingClientRect();
@@ -285,6 +342,16 @@ export const Dashbar = ({ className, children, widgetTitleGenerator }) => {
285
342
  const setGrabLocation = (location) => {
286
343
  titleGrabPosition = location;
287
344
  };
345
+ /**
346
+ * Every time a widget is added or removed, modify the key on the FinsembleDnDContext element forcing a rerender.
347
+ *
348
+ * This is a workaround for certain cases where removing a dashbar item would align the panels incorrectly in
349
+ * FinsembleDnDContext. The scrolling works by the FinsembleDnDContext setting scrollLeft value. All calculations
350
+ * in FinsembleDnDContext are correct but due to a browser bug, when removing component under certain conditions,
351
+ * it somehow sets false maximum value for this scrollLeft value. Any value higher than the maximum is capped
352
+ * causing it to half scroll an element.
353
+ *
354
+ */
288
355
  const elementKey = Object.entries(widgets)
289
356
  .map((entry) => entry[0])
290
357
  .sort()
@@ -1 +1 @@
1
- {"version":3,"file":"Dashbar.js","sourceRoot":"","sources":["../../../../src/components/toolbar/dashbar/Dashbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,KAAK,MAAM,kBAAkB,CAAC;AAErC,OAAO,iCAAiC,CAAC;AAMzC,IAAI,eAAuB,CAAC;AAC5B,IAAI,kBAA0B,CAAC;AAE/B,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,oBAAoB,EAAe,EAAE,EAAE;IACrF,MAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,GAAG,UAAU,EAAE,CAAC;IAC3D,MAAM,EAAE,iBAAiB,EAAE,GAAG,UAAU,EAAE,CAAC;IAE3C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,CAAC,CA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C,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1C,oBAAC,WAAW,IACX,GAAG,EAAE,CAAC,EACN,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAC3B,KAAK,EAAE,CAAC,EACR,oBAAoB,EAAE,cAAc,EACpC,MAAM,EAAE,MAAqB,EAC7B,aAAa,EAAE,OAAO,CAAC,MAAM,EAC7B,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,GAC/B,CACF,CAAC,CACmB,CACtB;QACA,YAAY,KAAK,CAAC,IAAI,CACtB,6BAAK,SAAS,EAAC,yBAAyB,EAAC,OAAO,EAAE,aAAa;YAC9D;gBACC,2BAAG,SAAS,EAAC,SAAS,GAAK,CACrB,CACF,CACN;QACA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { DashbarItem } from \"./DashbarItem\";\nimport { Dashbar as DashbarType, DashbarItem as DashbarItemType, DashbarView } from \"../../../types/dashbarTypes\";\nimport { useDashbar } from \"../../../hooks/useDashbar\";\nimport { useToolbar } from \"../../../hooks/useToolbar\";\nimport { FinsembleDnDContext, AllowableDnDAxis } from \"../../legacyControls/FinsembleDnDContext\";\nimport clone from \"lodash/cloneDeep\";\n\nimport \"../../../assets/css/dashbar.css\";\n\ntype DashbarViews = {\n\t[key: string]: DashbarView;\n} & {};\n\nlet cachedWidgetTop: number;\nlet cachedWidgetHeight: number;\n\nexport const Dashbar = ({ className, children, widgetTitleGenerator }: DashbarType) => {\n\tconst { dashbarItems, reorderDashbarItems } = useDashbar();\n\tconst { launchPreferences } = useToolbar();\n\n\tconst [widgets, setWidgets] = useState({});\n\tconst [horizontalBounds, setHorizontalBounds] = useState(0);\n\tconst [wasReorganized, setReorganized] = useState(false);\n\tconst [totalWidgetsWidth, setTotalWidgetsWidth] = useState(0);\n\tconst [isUpdatingState, setIsUpdatingState] = useState(false);\n\tconst [secondUpdateRequired, setSecondUpdateRequired] = useState(false);\n\n\tlet movingIndex: number | null = null; // The dashbarItem index being dragged, null if none\n\tlet titleGrabPosition: number | null = null; // The mouse of event when a widget title is dragged\n\tlet offsetX: number | null = null; // The original grab location of a given view titlebar\n\n\tconst WIDGET_COUNT: number = Object.keys(widgets).length;\n\tconst SCROLL_BUTTON_DEFAULT_WIDTH = 30;\n\n\tconst defaultWidgetTitleGenerator = (widget: DashbarView, titleRef: React.MutableRefObject<null>) => {\n\t\tconst handleWidgetTitleClick = () => {\n\t\t\tif (widget.raiseIntentOptions) {\n\t\t\t\tfdc3.raiseIntent(\n\t\t\t\t\twidget.raiseIntentOptions.intent,\n\t\t\t\t\twidget.raiseIntentOptions.context,\n\t\t\t\t\twidget.raiseIntentOptions.targetApp\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<div ref={titleRef} onClick={() => handleWidgetTitleClick()}>\n\t\t\t\t<span dangerouslySetInnerHTML={{ __html: widget.title }}></span>\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst titleGenerator = widgetTitleGenerator ?? defaultWidgetTitleGenerator;\n\n\t/**\n\t *\n\t * @param {object} params\n\t * @param {number} oldIndex The index of the item being moved\n\t * @param {number} newIndex The index to move the item to\n\t */\n\tconst reorderItems = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\n\t\tmovingIndex = null;\n\t\ttitleGrabPosition = null;\n\t\toffsetX = null;\n\t\tsetReorganized(true);\n\t\t// Update the redux store\n\t\treorderDashbarItems({ oldIndex, newIndex });\n\t};\n\n\tconst launchDashbar = () => {\n\t\tlaunchPreferences(\"Dashbar\");\n\t};\n\n\tconst { dashbar } = FSBL.Clients.WindowClient.getSpawnData();\n\n\t// Dashbar is disabled (no config in toolbar) or dashbar height is not specified\n\tif (!dashbar || !dashbar.height) {\n\t\treturn null;\n\t}\n\tconst toolbarHeight = finsembleWindow.windowOptions.height;\n\tconst dashbarHeight = `${dashbar.height}px`;\n\tconst verticalBounds = toolbarHeight - dashbar.height;\n\tconst widgetDividerWidth = dashbar.widgetDividerWidth || 0;\n\n\tconst wrapperClasses = `finsemble-dashbar ${className || \"\"}`.trim();\n\n\tconst getTotalWidth = () => {\n\t\tlet totalWidth = 0;\n\t\tdashbarItems.forEach((item: DashbarItemType) => {\n\t\t\ttotalWidth = totalWidth + item.width;\n\t\t});\n\t\treturn totalWidth;\n\t};\n\n\tconst [leftButtonTooltip, setLeftButtonTooltip] = useState(\"\");\n\tconst [rightButtonTooltip, setRightButtonTooltip] = useState(\"\");\n\n\t// For calculation widgets position that function uses the HTML elements.\n\t// If something will be changed in HTML hierarchy for widgets, that function should be refactored.\n\tconst setWidgetsPositions = async () => {\n\t\tconst { data: bounds } = await finsembleWindow.getBounds();\n\t\tconst scrollButtonsEnabled = document.querySelectorAll(\"#dashbar-container > .chevron-container\").length > 0;\n\t\tconst elements = document.getElementsByClassName(\"finsemble-dashbar-item\");\n\t\tlet toolbarWidth = bounds?.width ?? 0;\n\t\tlet SCROLL_BUTTON_WIDTH = SCROLL_BUTTON_DEFAULT_WIDTH;\n\t\tif (scrollButtonsEnabled) {\n\t\t\t// Get actual width in case of client styling\n\t\t\tSCROLL_BUTTON_WIDTH = (document.querySelectorAll(\"#dashbar-container > .chevron-container\")[0] as HTMLElement)\n\t\t\t\t.offsetWidth;\n\t\t\ttoolbarWidth = toolbarWidth - 2 * SCROLL_BUTTON_WIDTH;\n\t\t}\n\n\t\tlet tempLeft = 0;\n\t\tlet leftButtonSize = 0;\n\t\tif (scrollButtonsEnabled) {\n\t\t\ttempLeft = SCROLL_BUTTON_WIDTH;\n\t\t\tleftButtonSize = SCROLL_BUTTON_WIDTH;\n\t\t}\n\n\t\tlet leftItemsCount = 0;\n\t\tlet rightItemsCount = 0;\n\n\t\tfor (const dashbarItem of elements) {\n\t\t\t// rect.width already contains the divider width\n\t\t\tconst rect = dashbarItem.getBoundingClientRect();\n\t\t\tconst dashbarItemFrame = dashbarItem.firstChild as Element;\n\t\t\tconst widgetId = dashbarItemFrame.id;\n\t\t\tconst widget = (widgets as DashbarViews)[widgetId];\n\t\t\t// Happens when widgets were removed, but dom-elements still exists. So just ignore.\n\t\t\tif (!widget) continue;\n\n\t\t\tif (rect.left < SCROLL_BUTTON_WIDTH && scrollButtonsEnabled) {\n\t\t\t\twidget.bounds.width = 0;\n\t\t\t\twidget.bounds.left = tempLeft;\n\t\t\t\tleftItemsCount++;\n\t\t\t} else {\n\t\t\t\twidget.bounds.width = rect.width - widgetDividerWidth;\n\t\t\t\twidget.bounds.left = tempLeft;\n\t\t\t\ttempLeft = tempLeft + rect.width;\n\t\t\t}\n\n\t\t\tlet offsetRight = rect.left + rect.width - widgetDividerWidth - leftButtonSize - toolbarWidth;\n\t\t\tif (offsetRight > 0) {\n\t\t\t\t// hide title for invisible items\n\t\t\t\t(dashbarItemFrame.firstChild as HTMLElement).style.visibility = \"hidden\";\n\t\t\t\twidget.bounds.width = 0;\n\t\t\t\trightItemsCount++;\n\t\t\t} else {\n\t\t\t\t(dashbarItemFrame.firstChild as HTMLElement).style.visibility = \"visible\";\n\t\t\t}\n\t\t\twidget.view.setBounds(widget.bounds);\n\t\t}\n\n\t\tsetLeftButtonTooltip(`${leftItemsCount} more`);\n\t\tsetRightButtonTooltip(`${rightItemsCount} more`);\n\t};\n\n\tconst addWidgets = async () => {\n\t\tconst _widgets: DashbarViews = clone(widgets);\n\t\tlet tempHorizontalBounds = horizontalBounds;\n\n\t\tfor (const item of dashbarItems) {\n\t\t\tconst widgetBounds = {\n\t\t\t\ttop: verticalBounds,\n\t\t\t\tleft: tempHorizontalBounds,\n\t\t\t\twidth: item.width - widgetDividerWidth,\n\t\t\t\theight: item.height || dashbar.height,\n\t\t\t};\n\n\t\t\tif (!_widgets.hasOwnProperty(item.id)) {\n\t\t\t\tconst webContentsName = `(Dashbar) ${item.id}`;\n\t\t\t\tconst res: any = await finsembleWindow.addBrowserView({\n\t\t\t\t\turl: item.url,\n\t\t\t\t\twebContentsName,\n\t\t\t\t\tbounds: widgetBounds,\n\t\t\t\t\tallowAutoResize: false,\n\t\t\t\t});\n\n\t\t\t\t_widgets[item.id] = {\n\t\t\t\t\turl: item.url,\n\t\t\t\t\ttitle: item.title,\n\t\t\t\t\tbounds: widgetBounds,\n\t\t\t\t\tview: res,\n\t\t\t\t\twidth: item.width,\n\t\t\t\t\traiseIntentOptions: item.raiseIntentOptions,\n\t\t\t\t};\n\n\t\t\t\ttempHorizontalBounds = tempHorizontalBounds + item.width;\n\t\t\t}\n\t\t}\n\t\tsetWidgets(_widgets);\n\t\tsetHorizontalBounds(tempHorizontalBounds);\n\t};\n\n\tconst removeWidgets = async () => {\n\t\tconst _widgets: DashbarViews = clone(widgets);\n\t\t// Widgets is an object, with each key being a reference to an item in dashbarItems\n\t\t// but dashbarItems is an array of objects. Its necessary to loop through them to determine\n\t\t// the differences to figure out which items were removed.\n\t\tconst toRemove: string[] = [];\n\t\tObject.keys(_widgets).forEach((widgetId) => {\n\t\t\tlet found = false;\n\t\t\tfor (let i = 0; i < dashbarItems.length; i++) {\n\t\t\t\tconst dashItem = dashbarItems[i];\n\t\t\t\tif (dashItem.id === widgetId) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\ttoRemove.push(widgetId);\n\t\t\t}\n\t\t});\n\n\t\tlet tempNewHorizontalBounds = 0;\n\t\t// toRemove is an array of widgetIds which were no longer found in dashbarItems\n\t\t// As items are removed, the remaining items have to be shuffled to fill the space\n\t\tfor (const id of toRemove) {\n\t\t\tif (_widgets.hasOwnProperty(id)) {\n\t\t\t\tawait _widgets[id].view.remove(() => {\n\t\t\t\t\tdelete _widgets[id];\n\t\t\t\t\t// Shuffle remaining views to fill any gaps that were left\n\t\t\t\t\tObject.values(_widgets).forEach((widget) => {\n\t\t\t\t\t\twidget.bounds = {\n\t\t\t\t\t\t\twidth: widget.bounds.width,\n\t\t\t\t\t\t\theight: widget.bounds.height,\n\t\t\t\t\t\t\tleft: tempNewHorizontalBounds,\n\t\t\t\t\t\t\ttop: widget.bounds.top,\n\t\t\t\t\t\t};\n\t\t\t\t\t\twidget.view.setBounds(widget.bounds);\n\t\t\t\t\t\ttempNewHorizontalBounds = tempNewHorizontalBounds + widget.bounds.width;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tFSBL.Clients.Logger.system.error(`Error removing widget: ${id} from dashbar`);\n\t\t\t}\n\t\t}\n\t\tsetWidgets(_widgets);\n\t\tsetHorizontalBounds(tempNewHorizontalBounds);\n\t};\n\n\tconst reorganizeWidgets = () => {\n\t\tconst _widgets: DashbarViews = clone(widgets);\n\t\t// Each view needs to be resituated to fill any holes\n\t\t// left by views that have been removed. Use a tempBounds\n\t\t// int to keep track of new widths and set the overall width\n\t\t// once everything is re-seated\n\t\tlet tempBounds = 0;\n\t\tdashbarItems.forEach((item) => {\n\t\t\tconst widget = _widgets[item.id];\n\n\t\t\twidget.bounds = {\n\t\t\t\theight: cachedWidgetHeight || widget.bounds.height,\n\t\t\t\twidth: widget.bounds.width,\n\t\t\t\ttop: cachedWidgetTop || verticalBounds,\n\t\t\t\tleft: tempBounds,\n\t\t\t};\n\n\t\t\twidget.view.setBounds(widget.bounds);\n\n\t\t\tdelete _widgets[item.id];\n\t\t\t_widgets[item.id] = widget;\n\n\t\t\ttempBounds = tempBounds + item.width;\n\t\t});\n\n\t\tsetReorganized(false);\n\t\tsetWidgets(_widgets);\n\t\tsetHorizontalBounds(tempBounds);\n\t};\n\n\tconst updateItems = () => {\n\t\tconst doUpdate = async () => {\n\t\t\tif (dashbarItems.length > WIDGET_COUNT) {\n\t\t\t\t//Items have been added\n\t\t\t\tawait addWidgets();\n\t\t\t\tsetTotalWidgetsWidth(getTotalWidth());\n\t\t\t} else if (dashbarItems.length < WIDGET_COUNT) {\n\t\t\t\t//Items have been removed\n\t\t\t\tawait removeWidgets();\n\t\t\t\tsetTotalWidgetsWidth(getTotalWidth());\n\t\t\t} else if (wasReorganized) {\n\t\t\t\tif (movingIndex) return;\n\t\t\t\t// Length is the same, order has changed\n\t\t\t\treorganizeWidgets();\n\t\t\t}\n\n\t\t\tawait setWidgetsPositions();\n\t\t\tsetIsUpdatingState(false);\n\t\t};\n\n\t\tif (isUpdatingState === false) {\n\t\t\tsetIsUpdatingState(true);\n\t\t\tdoUpdate();\n\t\t} else if (!secondUpdateRequired) {\n\t\t\tsetSecondUpdateRequired(true);\n\t\t}\n\t};\n\n\t/**\n\t * When the distributed store's 'dashbaritems' is updated it will cause this hook to\n\t * execute. The local representation of widgets will be mutated, then a call to\n\t * setWidgets will re-render the component\n\t */\n\tuseEffect(() => {\n\t\tupdateItems();\n\t}, [dashbarItems]);\n\n\t/**\n\t * DashbarItems can be changed very quickly before all widgets will be initialized.\n\t * Double-calling updateItems() fixes a bug.\n\t */\n\tuseEffect(() => {\n\t\tif (secondUpdateRequired && !isUpdatingState) {\n\t\t\tupdateItems();\n\t\t\tsetSecondUpdateRequired(false);\n\t\t}\n\t}, [isUpdatingState, secondUpdateRequired]);\n\n\t/**\n\t * Sets the title height as determined by the DashbarItem\n\t * component, since the CSS can be changed by the user\n\t * the component will render the title and pass back\n\t * computed height of that title, then the Dashbar will\n\t * make room for item\n\t *\n\t * @param {number} titleHeight The height of the span containing the title\n\t * @param {string} id The key'ed id of the view\n\t */\n\tconst setTitleHeight = (titleHeight: number, id: string) => {\n\t\tconst _widgets: DashbarViews = widgets;\n\t\tconst widget = _widgets[id];\n\t\tif (cachedWidgetTop) {\n\t\t\ttitleHeight = 0;\n\t\t}\n\n\t\tconst newBounds = {\n\t\t\ttop: cachedWidgetTop || widget.bounds.top + titleHeight,\n\t\t\tleft: widget.bounds.left,\n\t\t\theight: cachedWidgetHeight || widget.bounds.height - titleHeight,\n\t\t\twidth: widget.bounds.width,\n\t\t};\n\t\tcachedWidgetTop = newBounds.top;\n\t\tcachedWidgetHeight = newBounds.height;\n\n\t\twidget.view.setBounds(newBounds);\n\t\twidget.bounds = newBounds;\n\t};\n\n\t/**\n\t * When a view starts moving, bring it to the front\n\t *\n\t * @param {MouseEvent} event The event passed by react-sortable-hoc\n\t */\n\tconst startMove = (node: any, event: any) => {\n\t\tmovingIndex = node.index;\n\t\tif (offsetX === null && titleGrabPosition !== null) {\n\t\t\toffsetX = event.clientX - titleGrabPosition;\n\t\t}\n\t\tconst widget = Object.values(widgets)[node.index] as DashbarView;\n\t\twidget.view.bringToFront();\n\t};\n\n\t/**\n\t * Event triggered by view movement\n\t *\n\t * @param {MouseEvent} event\n\t */\n\tconst moveItem = (event: any) => {\n\t\tif (movingIndex !== null) {\n\t\t\tconst movingWidget = Object.values(widgets)[movingIndex] as DashbarView;\n\n\t\t\tmovingWidget.view.setBounds({\n\t\t\t\ttop: movingWidget.bounds.top,\n\t\t\t\theight: movingWidget.bounds.height,\n\t\t\t\twidth: movingWidget.bounds.width,\n\t\t\t\tleft: event.clientX - (offsetX || 0),\n\t\t\t});\n\n\t\t\t// Some completely not react very hacky stuff to make browserviews move in conjunction with the titles\n\t\t\tconst elements = document.getElementsByClassName(\"dashbar-item-frame\");\n\t\t\tfor (const element of elements) {\n\t\t\t\tconst rect = element.getBoundingClientRect();\n\t\t\t\tconst widget = (widgets as any)[element.id];\n\t\t\t\tif (widget !== movingWidget && widget.bounds.left !== rect.left) {\n\t\t\t\t\twidget.bounds.left = rect.left;\n\t\t\t\t\twidget.view.setBounds(widget.bounds);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setGrabLocation = (location: number) => {\n\t\ttitleGrabPosition = location;\n\t};\n\n\t/**\n\t * Every time a widget is added or removed, modify the key on the FinsembleDnDContext element forcing a rerender.\n\t *\n\t * This is a workaround for certain cases where removing a dashbar item would align the panels incorrectly in\n\t * FinsembleDnDContext. The scrolling works by the FinsembleDnDContext setting scrollLeft value. All calculations\n\t * in FinsembleDnDContext are correct but due to a browser bug, when removing component under certain conditions,\n\t * it somehow sets false maximum value for this scrollLeft value. Any value higher than the maximum is capped\n\t * causing it to half scroll an element.\n\t *\n\t */\n\tconst elementKey = Object.entries(widgets)\n\t\t.map((entry) => entry[0])\n\t\t.sort()\n\t\t.join(\"-\");\n\n\treturn (\n\t\t<div className={wrapperClasses} style={{ height: dashbarHeight }}>\n\t\t\t{WIDGET_COUNT > 0 && (\n\t\t\t\t<FinsembleDnDContext\n\t\t\t\t\tkey={elementKey}\n\t\t\t\t\tonDragEnd={reorderItems}\n\t\t\t\t\tonDragStart={startMove}\n\t\t\t\t\tonDragMove={moveItem}\n\t\t\t\t\tonLayoutUpdate={setWidgetsPositions}\n\t\t\t\t\tclassName=\"finsemble-dashbar-section rearrange-region\"\n\t\t\t\t\tid=\"dashbar-container\"\n\t\t\t\t\taxis={AllowableDnDAxis.x}\n\t\t\t\t\tlockAxis={AllowableDnDAxis.x}\n\t\t\t\t\tallowHorizontalScroll={true}\n\t\t\t\t\tshowScrollButtonsTooltip={true}\n\t\t\t\t\tleftButtonTooltip={leftButtonTooltip}\n\t\t\t\t\trightButtonTooltip={rightButtonTooltip}\n\t\t\t\t\tmetadata={{ dashbar }}\n\t\t\t\t>\n\t\t\t\t\t{Object.values(widgets).map((widget, i) => (\n\t\t\t\t\t\t<DashbarItem\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tid={Object.keys(widgets)[i]}\n\t\t\t\t\t\t\tindex={i}\n\t\t\t\t\t\t\twidgetTitleGenerator={titleGenerator}\n\t\t\t\t\t\t\twidget={widget as DashbarView}\n\t\t\t\t\t\t\tdashbarHeight={dashbar.height}\n\t\t\t\t\t\t\twidgetDividerWidth={widgetDividerWidth}\n\t\t\t\t\t\t\tsetTitleHeight={setTitleHeight}\n\t\t\t\t\t\t\tsetGrabLocation={setGrabLocation}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</FinsembleDnDContext>\n\t\t\t)}\n\t\t\t{WIDGET_COUNT === 0 && (\n\t\t\t\t<div className=\"add-dashbar-item-button\" onClick={launchDashbar}>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<i className=\"ff-plus\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"]}
1
+ {"version":3,"file":"Dashbar.js","sourceRoot":"","sources":["../../../../src/components/toolbar/dashbar/Dashbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,KAAK,MAAM,kBAAkB,CAAC;AAErC,OAAO,iCAAiC,CAAC;AAMzC,IAAI,eAAuB,CAAC;AAC5B,IAAI,kBAA0B,CAAC;AAE/B,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,oBAAoB,EAAe,EAAE,EAAE;IACrF,MAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,GAAG,UAAU,EAAE,CAAC;IAC3D,MAAM,EAAE,iBAAiB,EAAE,GAAG,UAAU,EAAE,CAAC;IAE3C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,cAAc,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzD,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAA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,SAAS,EAAC,4CAA4C,EACtD,EAAE,EAAC,mBAAmB,EACtB,IAAI,EAAE,gBAAgB,CAAC,CAAC,EACxB,QAAQ,EAAE,gBAAgB,CAAC,CAAC,EAC5B,qBAAqB,EAAE,IAAI,EAC3B,wBAAwB,EAAE,IAAI,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAEpB,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1C,oBAAC,WAAW,IACX,GAAG,EAAE,CAAC,EACN,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAC3B,KAAK,EAAE,CAAC,EACR,oBAAoB,EAAE,cAAc,EACpC,MAAM,EAAE,MAAqB,EAC7B,aAAa,EAAE,OAAO,CAAC,MAAM,EAC7B,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,GAC/B,CACF,CAAC,CACmB,CACtB;QACA,YAAY,KAAK,CAAC,IAAI,CACtB,6BAAK,SAAS,EAAC,yBAAyB,EAAC,OAAO,EAAE,aAAa;YAC9D;gBACC,2BAAG,SAAS,EAAC,SAAS,GAAK,CACrB,CACF,CACN;QACA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { DashbarItem } from \"./DashbarItem\";\nimport { Dashbar as DashbarType, DashbarItem as DashbarItemType, DashbarView } from \"../../../types/dashbarTypes\";\nimport { useDashbar } from \"../../../hooks/useDashbar\";\nimport { useToolbar } from \"../../../hooks/useToolbar\";\nimport { FinsembleDnDContext, AllowableDnDAxis } from \"../../legacyControls/FinsembleDnDContext\";\nimport clone from \"lodash/cloneDeep\";\n\nimport \"../../../assets/css/dashbar.css\";\n\ntype DashbarViews = {\n\t[key: string]: DashbarView;\n} & {};\n\nlet cachedWidgetTop: number;\nlet cachedWidgetHeight: number;\n\nexport const Dashbar = ({ className, children, widgetTitleGenerator }: DashbarType) => {\n\tconst { dashbarItems, reorderDashbarItems } = useDashbar();\n\tconst { launchPreferences } = useToolbar();\n\n\tconst [widgets, setWidgets] = useState({});\n\tconst [horizontalBounds, setHorizontalBounds] = useState(0);\n\tconst [wasReorganized, setReorganized] = useState(false);\n\tconst [totalWidgetsWidth, setTotalWidgetsWidth] = useState(0);\n\tconst [isUpdatingState, setIsUpdatingState] = useState(false);\n\tconst [secondUpdateRequired, setSecondUpdateRequired] = useState(false);\n\n\tlet movingIndex: number | null = null; // The dashbarItem index being dragged, null if none\n\tlet titleGrabPosition: number | null = null; // The mouse of event when a widget title is dragged\n\tlet offsetX: number | null = null; // The original grab location of a given view titlebar\n\n\tconst WIDGET_COUNT: number = Object.keys(widgets).length;\n\tconst SCROLL_BUTTON_DEFAULT_WIDTH = 30;\n\n\tconst defaultWidgetTitleGenerator = (widget: DashbarView, titleRef: React.MutableRefObject<null>) => {\n\t\tconst handleWidgetTitleClick = () => {\n\t\t\tif (widget.raiseIntentOptions) {\n\t\t\t\tfdc3.raiseIntent(\n\t\t\t\t\twidget.raiseIntentOptions.intent,\n\t\t\t\t\twidget.raiseIntentOptions.context,\n\t\t\t\t\twidget.raiseIntentOptions.targetApp\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<div ref={titleRef} onClick={() => handleWidgetTitleClick()}>\n\t\t\t\t<span dangerouslySetInnerHTML={{ __html: widget.title }}></span>\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst titleGenerator = widgetTitleGenerator ?? defaultWidgetTitleGenerator;\n\n\t/**\n\t *\n\t * @param {object} params\n\t * @param {number} oldIndex The index of the item being moved\n\t * @param {number} newIndex The index to move the item to\n\t */\n\tconst reorderItems = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\n\t\tmovingIndex = null;\n\t\ttitleGrabPosition = null;\n\t\toffsetX = null;\n\t\tsetReorganized(true);\n\t\t// Update the redux store\n\t\treorderDashbarItems({ oldIndex, newIndex });\n\t};\n\n\tconst launchDashbar = () => {\n\t\tlaunchPreferences(\"Dashbar\");\n\t};\n\n\tconst { dashbar } = FSBL.Clients.WindowClient.getSpawnData();\n\n\t// Dashbar is disabled (no config in toolbar) or dashbar height is not specified\n\tif (!dashbar || !dashbar.height) {\n\t\treturn null;\n\t}\n\tconst toolbarHeight = finsembleWindow.windowOptions.height;\n\tconst dashbarHeight = `${dashbar.height}px`;\n\tconst verticalBounds = toolbarHeight - dashbar.height;\n\tconst widgetDividerWidth = dashbar.widgetDividerWidth || 0;\n\n\tconst wrapperClasses = `finsemble-dashbar ${className || \"\"}`.trim();\n\n\tconst getTotalWidth = () => {\n\t\tlet totalWidth = 0;\n\t\tdashbarItems.forEach((item: DashbarItemType) => {\n\t\t\ttotalWidth = totalWidth + item.width;\n\t\t});\n\t\treturn totalWidth;\n\t};\n\n\tconst [leftButtonTooltip, setLeftButtonTooltip] = useState(\"\");\n\tconst [rightButtonTooltip, setRightButtonTooltip] = useState(\"\");\n\n\t// For calculation widgets position that function uses the HTML elements.\n\t// If something will be changed in HTML hierarchy for widgets, that function should be refactored.\n\tconst setWidgetsPositions = async () => {\n\t\tconst { data: bounds } = await finsembleWindow.getBounds();\n\t\tconst scrollButtonsEnabled = document.querySelectorAll(\"#dashbar-container > .chevron-container\").length > 0;\n\t\tconst elements = document.getElementsByClassName(\"finsemble-dashbar-item\");\n\t\tlet toolbarWidth = bounds?.width ?? 0;\n\t\tlet SCROLL_BUTTON_WIDTH = SCROLL_BUTTON_DEFAULT_WIDTH;\n\t\tif (scrollButtonsEnabled) {\n\t\t\t// Get actual width in case of client styling\n\t\t\tSCROLL_BUTTON_WIDTH = (document.querySelectorAll(\"#dashbar-container > .chevron-container\")[0] as HTMLElement)\n\t\t\t\t.offsetWidth;\n\t\t\ttoolbarWidth = toolbarWidth - 2 * SCROLL_BUTTON_WIDTH;\n\t\t}\n\n\t\tlet tempLeft = 0;\n\t\tlet leftButtonSize = 0;\n\t\tif (scrollButtonsEnabled) {\n\t\t\ttempLeft = SCROLL_BUTTON_WIDTH;\n\t\t\tleftButtonSize = SCROLL_BUTTON_WIDTH;\n\t\t}\n\n\t\tlet leftItemsCount = 0;\n\t\tlet rightItemsCount = 0;\n\n\t\tfor (const dashbarItem of elements) {\n\t\t\t// rect.width already contains the divider width\n\t\t\tconst rect = dashbarItem.getBoundingClientRect();\n\t\t\tconst dashbarItemFrame = dashbarItem.firstChild as Element;\n\t\t\tconst widgetId = dashbarItemFrame.id;\n\t\t\tconst widget = (widgets as DashbarViews)[widgetId];\n\t\t\t// Happens when widgets were removed, but dom-elements still exists. So just ignore.\n\t\t\tif (!widget) continue;\n\n\t\t\tif (rect.left < SCROLL_BUTTON_WIDTH && scrollButtonsEnabled) {\n\t\t\t\twidget.bounds.width = 0;\n\t\t\t\twidget.bounds.left = tempLeft;\n\t\t\t\tleftItemsCount++;\n\t\t\t} else {\n\t\t\t\twidget.bounds.width = rect.width - widgetDividerWidth;\n\t\t\t\twidget.bounds.left = tempLeft;\n\t\t\t\ttempLeft = tempLeft + rect.width;\n\t\t\t}\n\n\t\t\tlet offsetRight = rect.left + rect.width - widgetDividerWidth - leftButtonSize - toolbarWidth;\n\t\t\tif (offsetRight > 0) {\n\t\t\t\t// hide title for invisible items\n\t\t\t\t(dashbarItemFrame.firstChild as HTMLElement).style.visibility = \"hidden\";\n\t\t\t\twidget.bounds.width = 0;\n\t\t\t\trightItemsCount++;\n\t\t\t} else {\n\t\t\t\t(dashbarItemFrame.firstChild as HTMLElement).style.visibility = \"visible\";\n\t\t\t}\n\t\t\twidget.view.setBounds(widget.bounds);\n\t\t}\n\n\t\tsetLeftButtonTooltip(`${leftItemsCount} more`);\n\t\tsetRightButtonTooltip(`${rightItemsCount} more`);\n\t};\n\n\tconst addWidgets = async () => {\n\t\tconst _widgets: DashbarViews = clone(widgets);\n\t\tlet tempHorizontalBounds = horizontalBounds;\n\n\t\tfor (const item of dashbarItems) {\n\t\t\tconst widgetBounds = {\n\t\t\t\ttop: verticalBounds,\n\t\t\t\tleft: tempHorizontalBounds,\n\t\t\t\twidth: item.width - widgetDividerWidth,\n\t\t\t\theight: item.height || dashbar.height,\n\t\t\t};\n\n\t\t\tif (!_widgets.hasOwnProperty(item.id)) {\n\t\t\t\tconst webContentsName = `(Dashbar) ${item.id}`;\n\t\t\t\tconst res: any = await finsembleWindow.addBrowserView({\n\t\t\t\t\turl: item.url,\n\t\t\t\t\twebContentsName,\n\t\t\t\t\tbounds: widgetBounds,\n\t\t\t\t\tallowAutoResize: false,\n\t\t\t\t});\n\n\t\t\t\t_widgets[item.id] = {\n\t\t\t\t\turl: item.url,\n\t\t\t\t\ttitle: item.title,\n\t\t\t\t\tbounds: widgetBounds,\n\t\t\t\t\tview: res,\n\t\t\t\t\twidth: item.width,\n\t\t\t\t\traiseIntentOptions: item.raiseIntentOptions,\n\t\t\t\t};\n\n\t\t\t\ttempHorizontalBounds = tempHorizontalBounds + item.width;\n\t\t\t}\n\t\t}\n\t\tsetWidgets(_widgets);\n\t\tsetHorizontalBounds(tempHorizontalBounds);\n\t};\n\n\tconst removeWidgets = async () => {\n\t\tconst _widgets: DashbarViews = clone(widgets);\n\t\t// Widgets is an object, with each key being a reference to an item in dashbarItems\n\t\t// but dashbarItems is an array of objects. Its necessary to loop through them to determine\n\t\t// the differences to figure out which items were removed.\n\t\tconst toRemove: string[] = [];\n\t\tObject.keys(_widgets).forEach((widgetId) => {\n\t\t\tlet found = false;\n\t\t\tfor (let i = 0; i < dashbarItems.length; i++) {\n\t\t\t\tconst dashItem = dashbarItems[i];\n\t\t\t\tif (dashItem.id === widgetId) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\ttoRemove.push(widgetId);\n\t\t\t}\n\t\t});\n\n\t\tlet tempNewHorizontalBounds = 0;\n\t\t// toRemove is an array of widgetIds which were no longer found in dashbarItems\n\t\t// As items are removed, the remaining items have to be shuffled to fill the space\n\t\tfor (const id of toRemove) {\n\t\t\tif (_widgets.hasOwnProperty(id)) {\n\t\t\t\tawait _widgets[id].view.remove(() => {\n\t\t\t\t\tdelete _widgets[id];\n\t\t\t\t\t// Shuffle remaining views to fill any gaps that were left\n\t\t\t\t\tObject.values(_widgets).forEach((widget) => {\n\t\t\t\t\t\twidget.bounds = {\n\t\t\t\t\t\t\twidth: widget.bounds.width,\n\t\t\t\t\t\t\theight: widget.bounds.height,\n\t\t\t\t\t\t\tleft: tempNewHorizontalBounds,\n\t\t\t\t\t\t\ttop: widget.bounds.top,\n\t\t\t\t\t\t};\n\t\t\t\t\t\twidget.view.setBounds(widget.bounds);\n\t\t\t\t\t\ttempNewHorizontalBounds = tempNewHorizontalBounds + widget.bounds.width;\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tFSBL.Clients.Logger.system.error(`Error removing widget: ${id} from dashbar`);\n\t\t\t}\n\t\t}\n\t\tsetWidgets(_widgets);\n\t\tsetHorizontalBounds(tempNewHorizontalBounds);\n\t};\n\n\tconst reorganizeWidgets = () => {\n\t\tconst _widgets: DashbarViews = clone(widgets);\n\t\t// Each view needs to be resituated to fill any holes\n\t\t// left by views that have been removed. Use a tempBounds\n\t\t// int to keep track of new widths and set the overall width\n\t\t// once everything is re-seated\n\t\tlet tempBounds = 0;\n\t\tdashbarItems.forEach((item) => {\n\t\t\tconst widget = _widgets[item.id];\n\n\t\t\twidget.bounds = {\n\t\t\t\theight: cachedWidgetHeight || widget.bounds.height,\n\t\t\t\twidth: widget.bounds.width,\n\t\t\t\ttop: cachedWidgetTop || verticalBounds,\n\t\t\t\tleft: tempBounds,\n\t\t\t};\n\n\t\t\twidget.view.setBounds(widget.bounds);\n\n\t\t\tdelete _widgets[item.id];\n\t\t\t_widgets[item.id] = widget;\n\n\t\t\ttempBounds = tempBounds + item.width;\n\t\t});\n\n\t\tsetReorganized(false);\n\t\tsetWidgets(_widgets);\n\t\tsetHorizontalBounds(tempBounds);\n\t};\n\n\tconst updateItems = () => {\n\t\tconst doUpdate = async () => {\n\t\t\tif (dashbarItems.length > WIDGET_COUNT) {\n\t\t\t\t//Items have been added\n\t\t\t\tawait addWidgets();\n\t\t\t\tsetTotalWidgetsWidth(getTotalWidth());\n\t\t\t} else if (dashbarItems.length < WIDGET_COUNT) {\n\t\t\t\t//Items have been removed\n\t\t\t\tawait removeWidgets();\n\t\t\t\tsetTotalWidgetsWidth(getTotalWidth());\n\t\t\t} else if (wasReorganized) {\n\t\t\t\tif (movingIndex) return;\n\t\t\t\t// Length is the same, order has changed\n\t\t\t\treorganizeWidgets();\n\t\t\t}\n\n\t\t\tawait setWidgetsPositions();\n\t\t\tsetIsUpdatingState(false);\n\t\t};\n\n\t\tif (isUpdatingState === false) {\n\t\t\tsetIsUpdatingState(true);\n\t\t\tdoUpdate();\n\t\t} else if (!secondUpdateRequired) {\n\t\t\tsetSecondUpdateRequired(true);\n\t\t}\n\t};\n\n\t/**\n\t * When the distributed store's 'dashbaritems' is updated it will cause this hook to\n\t * execute. The local representation of widgets will be mutated, then a call to\n\t * setWidgets will re-render the component\n\t */\n\tuseEffect(() => {\n\t\tupdateItems();\n\t}, [dashbarItems]);\n\n\t/**\n\t * DashbarItems can be changed very quickly before all widgets will be initialized.\n\t * Double-calling updateItems() fixes a bug.\n\t */\n\tuseEffect(() => {\n\t\tif (secondUpdateRequired && !isUpdatingState) {\n\t\t\tupdateItems();\n\t\t\tsetSecondUpdateRequired(false);\n\t\t}\n\t}, [isUpdatingState, secondUpdateRequired]);\n\n\t/**\n\t * Sets the title height as determined by the DashbarItem\n\t * component, since the CSS can be changed by the user\n\t * the component will render the title and pass back\n\t * computed height of that title, then the Dashbar will\n\t * make room for item\n\t *\n\t * @param {number} titleHeight The height of the span containing the title\n\t * @param {string} id The key'ed id of the view\n\t */\n\tconst setTitleHeight = (titleHeight: number, id: string) => {\n\t\tconst _widgets: DashbarViews = widgets;\n\t\tconst widget = _widgets[id];\n\t\tif (cachedWidgetTop) {\n\t\t\ttitleHeight = 0;\n\t\t}\n\n\t\tconst newBounds = {\n\t\t\ttop: cachedWidgetTop || widget.bounds.top + titleHeight,\n\t\t\tleft: widget.bounds.left,\n\t\t\theight: cachedWidgetHeight || widget.bounds.height - titleHeight,\n\t\t\twidth: widget.bounds.width,\n\t\t};\n\t\tcachedWidgetTop = newBounds.top;\n\t\tcachedWidgetHeight = newBounds.height;\n\n\t\twidget.view.setBounds(newBounds);\n\t\twidget.bounds = newBounds;\n\t};\n\n\t/**\n\t * When a view starts moving, bring it to the front\n\t *\n\t * @param {MouseEvent} event The event passed by react-sortable-hoc\n\t */\n\tconst startMove = (node: any, event: any) => {\n\t\tmovingIndex = node.index;\n\t\tif (offsetX === null && titleGrabPosition !== null) {\n\t\t\toffsetX = event.clientX - titleGrabPosition;\n\t\t}\n\t\tconst widget = Object.values(widgets)[node.index] as DashbarView;\n\t\twidget.view.bringToFront();\n\t};\n\n\t/**\n\t * Event triggered by view movement\n\t *\n\t * @param {MouseEvent} event\n\t */\n\tconst moveItem = (event: any) => {\n\t\tif (movingIndex !== null) {\n\t\t\tconst movingWidget = Object.values(widgets)[movingIndex] as DashbarView;\n\n\t\t\tmovingWidget.view.setBounds({\n\t\t\t\ttop: movingWidget.bounds.top,\n\t\t\t\theight: movingWidget.bounds.height,\n\t\t\t\twidth: movingWidget.bounds.width,\n\t\t\t\tleft: event.clientX - (offsetX || 0),\n\t\t\t});\n\n\t\t\t// Some completely not react very hacky stuff to make browserviews move in conjunction with the titles\n\t\t\tconst elements = document.getElementsByClassName(\"dashbar-item-frame\");\n\t\t\tfor (const element of elements) {\n\t\t\t\tconst rect = element.getBoundingClientRect();\n\t\t\t\tconst widget = (widgets as any)[element.id];\n\t\t\t\tif (widget !== movingWidget && widget.bounds.left !== rect.left) {\n\t\t\t\t\twidget.bounds.left = rect.left;\n\t\t\t\t\twidget.view.setBounds(widget.bounds);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setGrabLocation = (location: number) => {\n\t\ttitleGrabPosition = location;\n\t};\n\n\t/**\n\t * Every time a widget is added or removed, modify the key on the FinsembleDnDContext element forcing a rerender.\n\t *\n\t * This is a workaround for certain cases where removing a dashbar item would align the panels incorrectly in\n\t * FinsembleDnDContext. The scrolling works by the FinsembleDnDContext setting scrollLeft value. All calculations\n\t * in FinsembleDnDContext are correct but due to a browser bug, when removing component under certain conditions,\n\t * it somehow sets false maximum value for this scrollLeft value. Any value higher than the maximum is capped\n\t * causing it to half scroll an element.\n\t *\n\t */\n\tconst elementKey = Object.entries(widgets)\n\t\t.map((entry) => entry[0])\n\t\t.sort()\n\t\t.join(\"-\");\n\n\treturn (\n\t\t<div className={wrapperClasses} style={{ height: dashbarHeight }}>\n\t\t\t{WIDGET_COUNT > 0 && (\n\t\t\t\t<FinsembleDnDContext\n\t\t\t\t\tkey={elementKey}\n\t\t\t\t\tonDragEnd={reorderItems}\n\t\t\t\t\tonDragStart={startMove}\n\t\t\t\t\tonDragMove={moveItem}\n\t\t\t\t\tonLayoutUpdate={setWidgetsPositions}\n\t\t\t\t\tclassName=\"finsemble-dashbar-section rearrange-region\"\n\t\t\t\t\tid=\"dashbar-container\"\n\t\t\t\t\taxis={AllowableDnDAxis.x}\n\t\t\t\t\tlockAxis={AllowableDnDAxis.x}\n\t\t\t\t\tallowHorizontalScroll={true}\n\t\t\t\t\tshowScrollButtonsTooltip={true}\n\t\t\t\t\tleftButtonTooltip={leftButtonTooltip}\n\t\t\t\t\trightButtonTooltip={rightButtonTooltip}\n\t\t\t\t\tmetadata={{ dashbar }}\n\t\t\t\t>\n\t\t\t\t\t{Object.values(widgets).map((widget, i) => (\n\t\t\t\t\t\t<DashbarItem\n\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\tid={Object.keys(widgets)[i]}\n\t\t\t\t\t\t\tindex={i}\n\t\t\t\t\t\t\twidgetTitleGenerator={titleGenerator}\n\t\t\t\t\t\t\twidget={widget as DashbarView}\n\t\t\t\t\t\t\tdashbarHeight={dashbar.height}\n\t\t\t\t\t\t\twidgetDividerWidth={widgetDividerWidth}\n\t\t\t\t\t\t\tsetTitleHeight={setTitleHeight}\n\t\t\t\t\t\t\tsetGrabLocation={setGrabLocation}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</FinsembleDnDContext>\n\t\t\t)}\n\t\t\t{WIDGET_COUNT === 0 && (\n\t\t\t\t<div className=\"add-dashbar-item-button\" onClick={launchDashbar}>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<i className=\"ff-plus\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"]}
@@ -12,6 +12,11 @@ export const DashbarItem = ({ id = `finsemble-draggable-${Date.now()}-${Math.ran
12
12
  setTitleHeight(titleHeight, id);
13
13
  }
14
14
  });
15
+ /**
16
+ * Sets the location the titlebar of a view is clicked on when a user grabs a dashbar item
17
+ *
18
+ * @param event
19
+ */
15
20
  const _setGrabLocation = () => {
16
21
  if (divRef === null || divRef === void 0 ? void 0 : divRef.current) {
17
22
  const rect = divRef.current.getBoundingClientRect();
@@ -1 +1 @@
1
- {"version":3,"file":"DashbarItem.js","sourceRoot":"","sources":["../../../../src/components/toolbar/dashbar/DashbarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAG7E,OAAO,iCAAiC,CAAC;AAezC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC3B,EAAE,GAAG,uBAAuB,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MA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E,YAAY;QACrF,6BAAK,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAC,oBAAoB,EAAC,KAAK,EAAE,SAAS;YACvG,iCAAM,KAAK,CAAO;YAClB,6BAAK,SAAS,EAAC,aAAa,GAAO,CAC9B,CACc,CACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { useRef, useLayoutEffect } from \"react\";\nimport { FinsembleDraggable } from \"../../legacyControls/FinsembleDraggable\";\nimport { DashbarView } from \"../../../types/dashbarTypes\";\n\nimport \"../../../assets/css/dashbar.css\";\n\ntype DashbarItemProps = {\n\tid?: string;\n\tindex: number;\n\tclassName?: string;\n\theight?: number;\n\twidget: DashbarView;\n\tdashbarHeight?: number;\n\twidgetDividerWidth?: number;\n\tsetTitleHeight: Function;\n\tsetGrabLocation: Function;\n\twidgetTitleGenerator: Function;\n};\n\nexport const DashbarItem = ({\n\tid = `finsemble-draggable-${Date.now()}-${Math.random()}`,\n\tindex,\n\tclassName,\n\twidget,\n\theight,\n\tdashbarHeight,\n\twidgetDividerWidth,\n\tsetTitleHeight,\n\tsetGrabLocation,\n\twidgetTitleGenerator,\n}: DashbarItemProps) => {\n\tconst titleRef = useRef<HTMLDivElement>(null);\n\tconst divRef = useRef<HTMLDivElement>(null);\n\n\tuseLayoutEffect(() => {\n\t\tif (titleRef?.current && dashbarHeight) {\n\t\t\tconst { offsetHeight } = titleRef.current;\n\n\t\t\tconst titleHeight = height ? height + offsetHeight : offsetHeight;\n\t\t\tsetTitleHeight(titleHeight, id);\n\t\t}\n\t});\n\n\t/**\n\t * Sets the location the titlebar of a view is clicked on when a user grabs a dashbar item\n\t *\n\t * @param event\n\t */\n\tconst _setGrabLocation = () => {\n\t\tif (divRef?.current) {\n\t\t\tconst rect = (divRef.current as HTMLElement).getBoundingClientRect();\n\t\t\tsetGrabLocation(rect.left);\n\t\t}\n\t};\n\n\tconst wrapperClass = `finsemble-dashbar-item ${className || \"\"}`;\n\tconst itemStyle = {\n\t\tdisplay: \"flex\",\n\t\twidth: widget.width,\n\t\tborderRight: `${widgetDividerWidth}px solid var(--dashbar-divider-color)`,\n\t};\n\n\tconst title = widgetTitleGenerator(widget, titleRef);\n\n\treturn (\n\t\t<FinsembleDraggable draggableId={id} index={index} key={id} wrapperClass={wrapperClass}>\n\t\t\t<div ref={divRef} id={id} onMouseDown={_setGrabLocation} className=\"dashbar-item-frame\" style={itemStyle}>\n\t\t\t\t<div>{title}</div>\n\t\t\t\t<div className=\"empty-space\"></div>\n\t\t\t</div>\n\t\t</FinsembleDraggable>\n\t);\n};\n"]}
1
+ {"version":3,"file":"DashbarItem.js","sourceRoot":"","sources":["../../../../src/components/toolbar/dashbar/DashbarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAG7E,OAAO,iCAAiC,CAAC;AAezC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC3B,EAAE,GAAG,uBAAuB,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,EAAE,EACzD,KAAK,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,oBAAoB,GACF,EAAE,EAAE;IACtB,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE5C,eAAe,CAAC,GAAG,EAAE;QACpB,IAAI,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,KAAI,aAAa,EAAE;YACvC,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC;YAE1C,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC;YAClE,cAAc,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;SAChC;IACF,CAAC,CAAC,CAAC;IAEH;;;;OAIG;IACH,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC7B,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,EAAE;YACpB,MAAM,IAAI,GAAI,MAAM,CAAC,OAAuB,CAAC,qBAAqB,EAAE,CAAC;YACrE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3B;IACF,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,0BAA0B,SAAS,IAAI,EAAE,EAAE,CAAC;IACjE,MAAM,SAAS,GAAG;QACjB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,WAAW,EAAE,GAAG,kBAAkB,uCAAuC;KACzE,CAAC;IAEF,MAAM,KAAK,GAAG,oBAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAErD,OAAO,CACN,oBAAC,kBAAkB,IAAC,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,YAAY,EAAE,YAAY;QACrF,6BAAK,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAC,oBAAoB,EAAC,KAAK,EAAE,SAAS;YACvG,iCAAM,KAAK,CAAO;YAClB,6BAAK,SAAS,EAAC,aAAa,GAAO,CAC9B,CACc,CACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { useRef, useLayoutEffect } from \"react\";\nimport { FinsembleDraggable } from \"../../legacyControls/FinsembleDraggable\";\nimport { DashbarView } from \"../../../types/dashbarTypes\";\n\nimport \"../../../assets/css/dashbar.css\";\n\ntype DashbarItemProps = {\n\tid?: string;\n\tindex: number;\n\tclassName?: string;\n\theight?: number;\n\twidget: DashbarView;\n\tdashbarHeight?: number;\n\twidgetDividerWidth?: number;\n\tsetTitleHeight: Function;\n\tsetGrabLocation: Function;\n\twidgetTitleGenerator: Function;\n};\n\nexport const DashbarItem = ({\n\tid = `finsemble-draggable-${Date.now()}-${Math.random()}`,\n\tindex,\n\tclassName,\n\twidget,\n\theight,\n\tdashbarHeight,\n\twidgetDividerWidth,\n\tsetTitleHeight,\n\tsetGrabLocation,\n\twidgetTitleGenerator,\n}: DashbarItemProps) => {\n\tconst titleRef = useRef<HTMLDivElement>(null);\n\tconst divRef = useRef<HTMLDivElement>(null);\n\n\tuseLayoutEffect(() => {\n\t\tif (titleRef?.current && dashbarHeight) {\n\t\t\tconst { offsetHeight } = titleRef.current;\n\n\t\t\tconst titleHeight = height ? height + offsetHeight : offsetHeight;\n\t\t\tsetTitleHeight(titleHeight, id);\n\t\t}\n\t});\n\n\t/**\n\t * Sets the location the titlebar of a view is clicked on when a user grabs a dashbar item\n\t *\n\t * @param event\n\t */\n\tconst _setGrabLocation = () => {\n\t\tif (divRef?.current) {\n\t\t\tconst rect = (divRef.current as HTMLElement).getBoundingClientRect();\n\t\t\tsetGrabLocation(rect.left);\n\t\t}\n\t};\n\n\tconst wrapperClass = `finsemble-dashbar-item ${className || \"\"}`;\n\tconst itemStyle = {\n\t\tdisplay: \"flex\",\n\t\twidth: widget.width,\n\t\tborderRight: `${widgetDividerWidth}px solid var(--dashbar-divider-color)`,\n\t};\n\n\tconst title = widgetTitleGenerator(widget, titleRef);\n\n\treturn (\n\t\t<FinsembleDraggable draggableId={id} index={index} key={id} wrapperClass={wrapperClass}>\n\t\t\t<div ref={divRef} id={id} onMouseDown={_setGrabLocation} className=\"dashbar-item-frame\" style={itemStyle}>\n\t\t\t\t<div>{title}</div>\n\t\t\t\t<div className=\"empty-space\"></div>\n\t\t\t</div>\n\t\t</FinsembleDraggable>\n\t);\n};\n"]}
@@ -1,3 +1,7 @@
1
+ /*!
2
+ * Copyright 2017 by ChartIQ, Inc.
3
+ * All rights reserved.
4
+ */
1
5
  import React from "react";
2
6
  import { Workspace as WorkspaceType } from "@finsemble/finsemble-api/types/services/workspace/types";
3
7
  import "./workspaceManagementMenu.css";
@@ -18,6 +22,9 @@ interface IState {
18
22
  initialized: boolean;
19
23
  isSwitchingWorkspaces: boolean;
20
24
  }
25
+ /**
26
+ * A button that opens the workspace management menu when clicked.
27
+ */
21
28
  export declare class WorkspaceManagementMenu extends React.Component<IProps, IState> {
22
29
  store: StoreModel | null;
23
30
  constructor(props: IProps);
@@ -1,3 +1,7 @@
1
+ /*!
2
+ * Copyright 2017 by ChartIQ, Inc.
3
+ * All rights reserved.
4
+ */
1
5
  import React from "react";
2
6
  import { Actions as WorkspaceManagementMenuActions } from "./stores/workspaceManagementMenuStore";
3
7
  import WorkspaceActions from "./components/WorkspaceActions";
@@ -5,6 +9,9 @@ import WorkspaceList from "./components/WorkspaceList";
5
9
  import { Menu } from "../../menu/Menu";
6
10
  import { storeManager } from "./stores/workspaceManagementMenuStore";
7
11
  import "./workspaceManagementMenu.css";
12
+ /**
13
+ * A button that opens the workspace management menu when clicked.
14
+ */
8
15
  export class WorkspaceManagementMenu extends React.Component {
9
16
  constructor(props) {
10
17
  super(props);