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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (814) hide show
  1. package/package.json +26 -22
  2. package/react/actions/smartDesktopDesignerActions.d.ts +7 -7
  3. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  4. package/react/actions/toolbarActions.d.ts +2 -3
  5. package/react/actions/toolbarActions.js.map +1 -1
  6. package/react/assets/css/defaultTheme.css +1 -1
  7. package/react/assets/css/notificationsCenter.css +5 -2
  8. package/react/assets/css/userPreferences.css +5 -2
  9. package/react/assets/css/windowTitleBar.css +34 -1
  10. package/react/assets/icons/check-square.svg +6 -0
  11. package/react/assets/icons/lock.svg +6 -0
  12. package/react/components/FinsembleProvider.js +1 -1
  13. package/react/components/FinsembleProvider.js.map +1 -1
  14. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  15. package/react/components/appCatalog/components/AppList.d.ts +7 -1
  16. package/react/components/appCatalog/components/AppList.js +1 -1
  17. package/react/components/appCatalog/components/AppList.js.map +1 -1
  18. package/react/components/appCatalog/components/AppResults.d.ts +10 -8
  19. package/react/components/appCatalog/components/AppResults.js +1 -1
  20. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  21. package/react/components/appCatalog/components/Carousel.js +1 -1
  22. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  23. package/react/components/appCatalog/components/EmptyResults.d.ts +2 -1
  24. package/react/components/appCatalog/components/EmptyResults.js +2 -4
  25. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  26. package/react/components/appCatalog/components/Hero.d.ts +24 -4
  27. package/react/components/appCatalog/components/Hero.js +2 -1
  28. package/react/components/appCatalog/components/Hero.js.map +1 -1
  29. package/react/components/appCatalog/components/Home.d.ts +18 -4
  30. package/react/components/appCatalog/components/Home.js.map +1 -1
  31. package/react/components/appCatalog/components/SearchBar.d.ts +20 -7
  32. package/react/components/appCatalog/components/SearchBar.js +4 -7
  33. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  34. package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -3
  35. package/react/components/appCatalog/components/Showcase/AppDescription.js +4 -6
  36. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  37. package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +5 -4
  38. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  39. package/react/components/appCatalog/components/Showcase/AppShowcase.js +1 -1
  40. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  41. package/react/components/appCatalog/components/Showcase/Header.d.ts +13 -5
  42. package/react/components/appCatalog/components/Showcase/Header.js +2 -2
  43. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  44. package/react/components/appCatalog/components/Showcase/Modal.d.ts +7 -4
  45. package/react/components/appCatalog/components/Showcase/Modal.js +6 -6
  46. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  47. package/react/components/appCatalog/components/Showcase/defaults.d.ts +3 -3
  48. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  49. package/react/components/appCatalog/components/Tag.d.ts +6 -4
  50. package/react/components/appCatalog/components/Tag.js.map +1 -1
  51. package/react/components/appCatalog/components/Toast.d.ts +5 -3
  52. package/react/components/appCatalog/components/Toast.js +5 -4
  53. package/react/components/appCatalog/components/Toast.js.map +1 -1
  54. package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -1
  55. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  56. package/react/components/appCatalog/modules/FDC3.d.ts +12 -11
  57. package/react/components/appCatalog/modules/FDC3.js +20 -18
  58. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  59. package/react/components/appCatalog/stores/appStore.d.ts +9 -2
  60. package/react/components/appCatalog/stores/appStore.js +10 -4
  61. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  62. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  63. package/react/components/common/Button.d.ts +5 -4
  64. package/react/components/common/Button.js +2 -2
  65. package/react/components/common/Button.js.map +1 -1
  66. package/react/components/common/ButtonIcon.js +1 -1
  67. package/react/components/common/ButtonIcon.js.map +1 -1
  68. package/react/components/common/ButtonRow.d.ts +15 -0
  69. package/react/components/common/ButtonRow.js +32 -0
  70. package/react/components/common/ButtonRow.js.map +1 -0
  71. package/react/components/common/Checkbox.d.ts +8 -0
  72. package/react/components/common/Checkbox.js +22 -0
  73. package/react/components/common/Checkbox.js.map +1 -0
  74. package/react/components/common/ColorPicker.js +1 -1
  75. package/react/components/common/ColorPicker.js.map +1 -1
  76. package/react/components/common/DropZone.d.ts +0 -5
  77. package/react/components/common/DropZone.js.map +1 -1
  78. package/react/components/common/DropdownButton.js +1 -1
  79. package/react/components/common/DropdownButton.js.map +1 -1
  80. package/react/components/common/FileInput.d.ts +0 -5
  81. package/react/components/common/FileInput.js +7 -9
  82. package/react/components/common/FileInput.js.map +1 -1
  83. package/react/components/common/FinsembleIcon.d.ts +2 -2
  84. package/react/components/common/FinsembleIcon.js +4 -0
  85. package/react/components/common/FinsembleIcon.js.map +1 -1
  86. package/react/components/common/FinsembleSelect.d.ts +3 -2
  87. package/react/components/common/FinsembleSelect.js +3 -6
  88. package/react/components/common/FinsembleSelect.js.map +1 -1
  89. package/react/components/common/FinsembleToggle.js +2 -2
  90. package/react/components/common/FinsembleToggle.js.map +1 -1
  91. package/react/components/common/FontSizeSelector.js +2 -2
  92. package/react/components/common/FontSizeSelector.js.map +1 -1
  93. package/react/components/common/ImagePreview.js +2 -2
  94. package/react/components/common/ImagePreview.js.map +1 -1
  95. package/react/components/common/Tab.js +2 -1
  96. package/react/components/common/Tab.js.map +1 -1
  97. package/react/components/common/Tooltip.d.ts +4 -3
  98. package/react/components/common/Tooltip.js +3 -3
  99. package/react/components/common/Tooltip.js.map +1 -1
  100. package/react/components/common/css/tooltip.css +10 -0
  101. package/react/components/common/file_helpers.js +3 -2
  102. package/react/components/common/file_helpers.js.map +1 -1
  103. package/react/components/common/helpers.js +20 -10
  104. package/react/components/common/helpers.js.map +1 -1
  105. package/react/components/common/stories/Button.stories.js +1 -1
  106. package/react/components/common/stories/Button.stories.js.map +1 -1
  107. package/react/components/common/stories/ButtonIcon.stories.js +1 -1
  108. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  109. package/react/components/common/stories/ButtonRow.stories.d.ts +14 -0
  110. package/react/components/common/stories/ButtonRow.stories.js +39 -0
  111. package/react/components/common/stories/ButtonRow.stories.js.map +1 -0
  112. package/react/components/common/stories/ButtonTile.stories.js +1 -1
  113. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  114. package/react/components/common/stories/Checkbox.stories.d.ts +13 -0
  115. package/react/components/common/stories/Checkbox.stories.js +29 -0
  116. package/react/components/common/stories/Checkbox.stories.js.map +1 -0
  117. package/react/components/common/stories/ColorPicker.stories.js +1 -1
  118. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  119. package/react/components/common/stories/DropZone.stories.js +1 -1
  120. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  121. package/react/components/common/stories/DropdownButton.stories.d.ts +22 -0
  122. package/react/components/common/stories/DropdownButton.stories.js +29 -0
  123. package/react/components/common/stories/DropdownButton.stories.js.map +1 -0
  124. package/react/components/common/stories/FinsembleIcon.stories.js +2 -0
  125. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  126. package/react/components/common/stories/FinsembleSelect.stories.d.ts +1 -1
  127. package/react/components/common/stories/FinsembleSelect.stories.js +1 -1
  128. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  129. package/react/components/common/stories/FinsembleToggle.stories.js +3 -1
  130. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  131. package/react/components/common/stories/FontSizeSelector.stories.js +1 -1
  132. package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
  133. package/react/components/common/stories/Header.stories.js +1 -1
  134. package/react/components/common/stories/Header.stories.js.map +1 -1
  135. package/react/components/common/stories/Tooltip.stories.d.ts +1 -1
  136. package/react/components/{shared/addProtocolToValidURL.spec.d.ts → common/tests/ButtonRow.spec.d.ts} +0 -0
  137. package/react/components/common/tests/ButtonRow.spec.js +25 -0
  138. package/react/components/common/tests/ButtonRow.spec.js.map +1 -0
  139. package/react/components/common/tests/Checkbox.spec.d.ts +1 -0
  140. package/react/components/common/tests/Checkbox.spec.js +33 -0
  141. package/react/components/common/tests/Checkbox.spec.js.map +1 -0
  142. package/react/components/common/tests/ColorPicker.spec.js +6 -6
  143. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  144. package/react/components/common/tests/DropZone.spec.js +4 -4
  145. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  146. package/react/components/common/tests/FileInput.spec.js +5 -5
  147. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  148. package/react/components/common/tests/FinsembleSelect.spec.js +12 -11
  149. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  150. package/react/components/common/tests/FinsembleToggle.spec.js +8 -2
  151. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  152. package/react/components/common/tests/Header.spec.js +3 -3
  153. package/react/components/common/tests/Header.spec.js.map +1 -1
  154. package/react/components/common/tests/ImagePreview.spec.js +8 -8
  155. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  156. package/react/components/common/tests/Tab.spec.js +3 -3
  157. package/react/components/common/tests/Tab.spec.js.map +1 -1
  158. package/react/components/common/tests/Tooltip.spec.js +5 -5
  159. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  160. package/react/components/favorites/FavoriteMaker.d.ts +0 -5
  161. package/react/components/favorites/FavoriteMaker.js +1 -1
  162. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  163. package/react/components/favorites/FavoritesShell.js +1 -1
  164. package/react/components/favorites/FavoritesShell.js.map +1 -1
  165. package/react/components/favorites/FavoritesShell.spec.js +7 -7
  166. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  167. package/react/components/favorites/FavoritesShell.stories.js +5 -4
  168. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  169. package/react/components/fdc3Resolver/ResolverContainer.js +2 -1
  170. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  171. package/react/components/fdc3Resolver/ResolverDialog.css +1 -0
  172. package/react/components/fdc3Resolver/ResolverDialog.js +15 -16
  173. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  174. package/react/components/fdc3Resolver/ResolverDialog.spec.js +6 -13
  175. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  176. package/react/components/fdc3Resolver/ResolverDialog.stories.js +46 -46
  177. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  178. package/react/components/icon/Icon.js +5 -4
  179. package/react/components/icon/Icon.js.map +1 -1
  180. package/react/components/legacyControls/FinsembleDialogButton.d.ts +1 -1
  181. package/react/components/legacyControls/FinsembleDialogButton.js +4 -3
  182. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  183. package/react/components/legacyControls/FinsembleDialogQuestion.js +2 -1
  184. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  185. package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
  186. package/react/components/legacyControls/FinsembleDialogTextInput.js +8 -5
  187. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  188. package/react/components/legacyControls/FinsembleDnDContext.js +18 -17
  189. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  190. package/react/components/legacyControls/FinsembleDraggable.js +3 -3
  191. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  192. package/react/components/legacyControls/FinsembleHoverDetector.js +2 -1
  193. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  194. package/react/components/legacyControls/FinsembleMenuSection.js +6 -3
  195. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  196. package/react/components/legacyControls/stories/FinsembleDialog.stories.js +1 -1
  197. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  198. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js +1 -1
  199. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  200. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js +1 -1
  201. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  202. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js +1 -1
  203. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  204. package/react/components/legacyControls/tests/FinsembleDialog.spec.js +1 -1
  205. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  206. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +8 -7
  207. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  208. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js +7 -5
  209. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  210. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +13 -12
  211. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  212. package/react/components/linker/LinkerMenu.js +4 -3
  213. package/react/components/linker/LinkerMenu.js.map +1 -1
  214. package/react/components/linker/LinkerMenuDeprecated.js +1 -1
  215. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  216. package/react/components/linker/remoteRedux.d.ts +10 -42
  217. package/react/components/linker/remoteRedux.js.map +1 -1
  218. package/react/components/menu/Menu.d.ts +1 -1
  219. package/react/components/menu/Menu.js +1 -1
  220. package/react/components/menu/Menu.js.map +1 -1
  221. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  222. package/react/components/menu/MenuPortal.js +7 -6
  223. package/react/components/menu/MenuPortal.js.map +1 -1
  224. package/react/components/menu/keyboardNavigation.js +14 -15
  225. package/react/components/menu/keyboardNavigation.js.map +1 -1
  226. package/react/components/notifications/components/NoNotifications.js +2 -4
  227. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  228. package/react/components/notifications/components/drawer/Drawer.js +2 -4
  229. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  230. package/react/components/notifications/components/drawer/DrawerControls.js +2 -4
  231. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  232. package/react/components/notifications/components/drawer/DrawerHeader.js +3 -6
  233. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  234. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +55 -69
  235. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  236. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +14 -15
  237. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  238. package/react/components/notifications/components/shared/CheckButton.d.ts +2 -2
  239. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  240. package/react/components/notifications/components/shared/IconButton.js +3 -5
  241. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  242. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +3 -2
  243. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  244. package/react/components/notifications/components/shared/OverflowMenu.d.ts +2 -1
  245. package/react/components/notifications/components/shared/OverflowMenu.js +6 -5
  246. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  247. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +3 -2
  248. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js +1 -1
  249. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  250. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +3 -2
  251. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  252. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +3 -2
  253. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +2 -4
  254. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  255. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +3 -2
  256. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  257. package/react/components/notifications/components/views/CardView.js +15 -24
  258. package/react/components/notifications/components/views/CardView.js.map +1 -1
  259. package/react/components/notifications/components/views/ListView.d.ts +2 -2
  260. package/react/components/notifications/components/views/ListView.js +10 -10
  261. package/react/components/notifications/components/views/ListView.js.map +1 -1
  262. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +2 -2
  263. package/react/components/notifications/components/views/NotificationDetailsView.js +5 -8
  264. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  265. package/react/components/notifications/constants.d.ts +13 -0
  266. package/react/components/notifications/constants.js.map +1 -1
  267. package/react/components/notifications/types.d.ts +7 -6
  268. package/react/components/notifications/types.js.map +1 -1
  269. package/react/components/notifications/utils.d.ts +6 -4
  270. package/react/components/notifications/utils.js +26 -32
  271. package/react/components/notifications/utils.js.map +1 -1
  272. package/react/components/processMonitor/ProcessMonitor.d.ts +3 -1
  273. package/react/components/processMonitor/ProcessMonitor.js +17 -10
  274. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  275. package/react/components/processMonitor/ProcessMonitorTypes.d.ts +33 -0
  276. package/react/components/processMonitor/ProcessMonitorTypes.js +6 -0
  277. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -0
  278. package/react/components/processMonitor/components/ChildWindow.d.ts +10 -3
  279. package/react/components/processMonitor/components/ChildWindow.js +19 -10
  280. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  281. package/react/components/processMonitor/components/ListHeader.d.ts +17 -4
  282. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  283. package/react/components/processMonitor/components/ProcessStatistics.d.ts +11 -3
  284. package/react/components/processMonitor/components/ProcessStatistics.js +25 -18
  285. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  286. package/react/components/processMonitor/constants.d.ts +11 -16
  287. package/react/components/processMonitor/constants.js +3 -1
  288. package/react/components/processMonitor/constants.js.map +1 -1
  289. package/react/components/processMonitor/helpers.d.ts +25 -5
  290. package/react/components/processMonitor/helpers.js +28 -20
  291. package/react/components/processMonitor/helpers.js.map +1 -1
  292. package/react/components/processMonitor/helpers.spec.d.ts +1 -0
  293. package/react/components/processMonitor/helpers.spec.js +44 -0
  294. package/react/components/processMonitor/helpers.spec.js.map +1 -0
  295. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +30 -15
  296. package/react/components/processMonitor/stores/ProcessMonitorStore.js +101 -86
  297. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  298. package/react/components/quickComponentForm/QuickComponentForm.d.ts +4 -1
  299. package/react/components/quickComponentForm/QuickComponentForm.js +13 -14
  300. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  301. package/react/components/search/Highlight.js +13 -3
  302. package/react/components/search/Highlight.js.map +1 -1
  303. package/react/components/search/Highlight.spec.js +3 -3
  304. package/react/components/search/Highlight.spec.js.map +1 -1
  305. package/react/components/search/Highlight.stories.js +1 -1
  306. package/react/components/search/Highlight.stories.js.map +1 -1
  307. package/react/components/search/Search.js +17 -8
  308. package/react/components/search/Search.js.map +1 -1
  309. package/react/components/search/SearchBestMatch.js +2 -1
  310. package/react/components/search/SearchBestMatch.js.map +1 -1
  311. package/react/components/search/SearchProviderResults.js +4 -5
  312. package/react/components/search/SearchProviderResults.js.map +1 -1
  313. package/react/components/search/SearchResult.js +3 -2
  314. package/react/components/search/SearchResult.js.map +1 -1
  315. package/react/components/search/SearchResults.js +1 -1
  316. package/react/components/search/SearchResults.js.map +1 -1
  317. package/react/components/shared/Button.js +2 -4
  318. package/react/components/shared/Button.js.map +1 -1
  319. package/react/components/shared/DefaultDropdownButton.d.ts +1 -0
  320. package/react/components/shared/DefaultDropdownButton.js +14 -4
  321. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  322. package/react/components/shared/NavigationButton.js +9 -11
  323. package/react/components/shared/NavigationButton.js.map +1 -1
  324. package/react/components/shared/Tag.d.ts +11 -1
  325. package/react/components/shared/Tag.js.map +1 -1
  326. package/react/components/shared/TagsMenu.d.ts +26 -6
  327. package/react/components/shared/TagsMenu.js.map +1 -1
  328. package/react/components/shared/linkerUtil.d.ts +3 -1
  329. package/react/components/shared/linkerUtil.js.map +1 -1
  330. package/react/components/shared/tests/DefaultDropdownButton.spec.d.ts +1 -0
  331. package/react/components/shared/tests/DefaultDropdownButton.spec.js +54 -0
  332. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -0
  333. package/react/components/shared/tests/addProtocolToValidURL.spec.d.ts +1 -0
  334. package/react/components/shared/{addProtocolToValidURL.spec.js → tests/addProtocolToValidURL.spec.js} +1 -1
  335. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -0
  336. package/react/components/singleInputDialog/SingleInputDialog.spec.js +6 -6
  337. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  338. package/react/components/singleInputDialog/SingleInputDialog.stories.js +1 -1
  339. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  340. package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +15 -0
  341. package/react/components/smartDesktopDesigner/AppEditAccess.js +138 -0
  342. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -0
  343. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +9 -3
  344. package/react/components/smartDesktopDesigner/AppEditPage.js +5 -1
  345. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  346. package/react/components/smartDesktopDesigner/Appearance.js +3 -5
  347. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  348. package/react/components/smartDesktopDesigner/Application.d.ts +7 -4
  349. package/react/components/smartDesktopDesigner/Application.js +85 -83
  350. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  351. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +3 -0
  352. package/react/components/smartDesktopDesigner/ApplicationEdit.js +68 -51
  353. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  354. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +4 -2
  355. package/react/components/smartDesktopDesigner/ApplicationList.js +33 -20
  356. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  357. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +7 -1
  358. package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
  359. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  360. package/react/components/smartDesktopDesigner/Applications.d.ts +2 -1
  361. package/react/components/smartDesktopDesigner/Applications.js +73 -62
  362. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  363. package/react/components/smartDesktopDesigner/Authentication.js +2 -8
  364. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  365. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -8
  366. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  367. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  368. package/react/components/smartDesktopDesigner/CurrentView.js +1 -1
  369. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  370. package/react/components/smartDesktopDesigner/Export.js +3 -3
  371. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  372. package/react/components/smartDesktopDesigner/ExportCloud.js +1 -1
  373. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  374. package/react/components/smartDesktopDesigner/ExportDeployInfo.js +1 -1
  375. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  376. package/react/components/smartDesktopDesigner/ExportZip.js +0 -1
  377. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  378. package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -1
  379. package/react/components/smartDesktopDesigner/GettingStarted.js +1 -1
  380. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  381. package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +1 -1
  382. package/react/components/smartDesktopDesigner/ProjectHeader.js +1 -1
  383. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
  384. package/react/components/smartDesktopDesigner/Publish.js +1 -1
  385. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  386. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
  387. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -24
  388. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  389. package/react/components/smartDesktopDesigner/Themes.js +2 -8
  390. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  391. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  392. package/react/components/smartDesktopDesigner/common/getCSSVars.d.ts +1 -1
  393. package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -1
  394. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  395. package/react/components/smartDesktopDesigner/common/views.d.ts +1 -1
  396. package/react/components/smartDesktopDesigner/common/views.js +6 -14
  397. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  398. package/react/components/smartDesktopDesigner/css/applications.css +38 -0
  399. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +20 -2
  400. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  401. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +10 -1
  402. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  403. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +6 -3
  404. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
  405. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +5 -2
  406. package/react/components/smartDesktopDesigner/fixtures/apps.js +15 -15
  407. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  408. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  409. package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +2 -1
  410. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  411. package/react/components/smartDesktopDesigner/fixtures/views.js +4 -4
  412. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  413. package/react/components/smartDesktopDesigner/sdd_helpers.js +2 -1
  414. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  415. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -4
  416. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +22 -2
  417. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  418. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js +7 -7
  419. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  420. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +3 -7
  421. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
  422. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +9 -2
  423. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
  424. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +3 -10
  425. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
  426. package/react/components/smartDesktopDesigner/stories/Applications.stories.js +3 -2
  427. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  428. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +7 -14
  429. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  430. package/react/components/smartDesktopDesigner/stories/Export.stories.js +2 -2
  431. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  432. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +2 -2
  433. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  434. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +5 -11
  435. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  436. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.d.ts +1 -1
  437. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js +1 -1
  438. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  439. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js +1 -1
  440. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  441. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js +2 -4
  442. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  443. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +1 -1
  444. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +1 -1
  445. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
  446. package/react/components/smartDesktopDesigner/stories/Publish.stories.js +13 -28
  447. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  448. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js +1 -1
  449. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  450. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +3 -3
  451. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  452. package/react/components/smartDesktopDesigner/stories/Themes.stories.js +1 -1
  453. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  454. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +33 -32
  455. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  456. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +6 -5
  457. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
  458. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js +11 -11
  459. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
  460. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +9 -7
  461. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
  462. package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
  463. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +118 -41
  464. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  465. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js +6 -18
  466. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  467. package/react/components/smartDesktopDesigner/tests/Export.spec.js +14 -22
  468. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  469. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +2 -6
  470. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  471. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js +2 -2
  472. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  473. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +2 -2
  474. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  475. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +2 -2
  476. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
  477. package/react/components/smartDesktopDesigner/tests/Publish.spec.js +3 -10
  478. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  479. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js +2 -6
  480. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  481. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +3 -3
  482. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  483. package/react/components/smartDesktopDesigner/tests/Themes.spec.js +7 -7
  484. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  485. package/react/components/smartDesktopDesigner/tests/a11y_helper.js +2 -1
  486. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  487. package/react/components/system/System.spec.js +1 -1
  488. package/react/components/system/System.spec.js.map +1 -1
  489. package/react/components/system/SystemTrayComponentShell.js +1 -1
  490. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  491. package/react/components/toolbar/MinimizeAll.spec.js +5 -5
  492. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  493. package/react/components/toolbar/NotificationControl.js +3 -2
  494. package/react/components/toolbar/NotificationControl.js.map +1 -1
  495. package/react/components/toolbar/RevealAll.spec.js +5 -5
  496. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  497. package/react/components/toolbar/ToolbarIcon.js +14 -2
  498. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  499. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +22 -5
  500. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +11 -6
  501. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  502. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js +21 -9
  503. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  504. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +33 -10
  505. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +24 -3
  506. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  507. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +3 -3
  508. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +0 -3
  509. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  510. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +24 -8
  511. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +4 -2
  512. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  513. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +18 -4
  514. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +5 -4
  515. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  516. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.d.ts +14 -6
  517. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js +2 -2
  518. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  519. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +34 -13
  520. package/react/components/toolbar/advancedAppLauncher/components/Content.js +22 -29
  521. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  522. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +15 -5
  523. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -3
  524. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  525. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +38 -21
  526. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +14 -9
  527. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  528. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +18 -3
  529. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +7 -3
  530. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  531. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.d.ts +10 -3
  532. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js +1 -3
  533. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  534. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.d.ts +15 -6
  535. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +11 -6
  536. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  537. package/react/components/toolbar/advancedAppLauncher/components/SortBy.d.ts +11 -4
  538. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js +3 -2
  539. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  540. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +18 -6
  541. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js +2 -2
  542. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  543. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +20 -4
  544. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +2 -4
  545. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  546. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -1
  547. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  548. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +15 -10
  549. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  550. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +5 -2
  551. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js +1 -1
  552. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  553. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +5 -4
  554. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  555. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +7 -6
  556. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -13
  557. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  558. package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +3 -3
  559. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
  560. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  561. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  562. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +25 -3
  563. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +3 -10
  564. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  565. package/react/components/toolbar/appLauncher/components/componentList.d.ts +34 -6
  566. package/react/components/toolbar/appLauncher/components/componentList.js +24 -21
  567. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  568. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +32 -32
  569. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +37 -55
  570. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  571. package/react/components/toolbar/dashbar/Dashbar.js +24 -13
  572. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  573. package/react/components/toolbar/dashbar/DashbarItem.js +1 -1
  574. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  575. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +28 -5
  576. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +17 -23
  577. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  578. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +25 -3
  579. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  580. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +13 -8
  581. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +2 -2
  582. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  583. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +16 -8
  584. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +0 -3
  585. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  586. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +65 -11
  587. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +95 -145
  588. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  589. package/react/components/userPreferences/UserPreferenceTypes.d.ts +5 -0
  590. package/react/components/userPreferences/UserPreferenceTypes.js +2 -0
  591. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -0
  592. package/react/components/userPreferences/UserPreferences.js +8 -23
  593. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  594. package/react/components/userPreferences/UserPreferencesBase.d.ts +3 -1
  595. package/react/components/userPreferences/UserPreferencesBase.js +5 -6
  596. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  597. package/react/components/userPreferences/UserPreferencesWrapper.d.ts +4 -0
  598. package/react/components/userPreferences/UserPreferencesWrapper.js +27 -0
  599. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -0
  600. package/react/components/userPreferences/components/ContentSection.d.ts +18 -3
  601. package/react/components/userPreferences/components/ContentSection.js +6 -3
  602. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  603. package/react/components/userPreferences/components/LeftNav.d.ts +19 -4
  604. package/react/components/userPreferences/components/LeftNav.js +12 -11
  605. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  606. package/react/components/userPreferences/components/content/DashbarEditor.d.ts +20 -5
  607. package/react/components/userPreferences/components/content/DashbarEditor.js +11 -11
  608. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  609. package/react/components/userPreferences/components/content/DashbarEditorItem.d.ts +10 -0
  610. package/react/components/userPreferences/components/content/DashbarEditorItem.js +11 -0
  611. package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -0
  612. package/react/components/userPreferences/components/content/General.d.ts +10 -3
  613. package/react/components/userPreferences/components/content/General.js +2 -2
  614. package/react/components/userPreferences/components/content/General.js.map +1 -1
  615. package/react/components/userPreferences/components/content/Notifications.js +2 -0
  616. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  617. package/react/components/userPreferences/components/content/Workspaces.js +51 -113
  618. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  619. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +56 -61
  620. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  621. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.d.ts +1 -1
  622. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +17 -15
  623. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  624. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.d.ts +3 -1
  625. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +15 -16
  626. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  627. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js +6 -6
  628. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  629. package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +24 -7
  630. package/react/components/userPreferences/components/general/ScheduledRestart.js +71 -23
  631. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  632. package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +8 -0
  633. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +9 -0
  634. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -0
  635. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.d.ts +6 -0
  636. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +11 -0
  637. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -0
  638. package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +45 -0
  639. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +89 -0
  640. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -0
  641. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.d.ts +8 -0
  642. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +21 -0
  643. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -0
  644. package/react/components/userPreferences/index.d.ts +1 -1
  645. package/react/components/userPreferences/index.js +1 -1
  646. package/react/components/userPreferences/index.js.map +1 -1
  647. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -13
  648. package/react/components/userPreferences/stores/UserPreferencesStore.js +13 -25
  649. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  650. package/react/components/userPreferences/stories/DashbarEditor.stories.d.ts +2 -1
  651. package/react/components/userPreferences/stories/DashbarEditor.stories.js +35 -4
  652. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  653. package/react/components/userPreferences/stories/DashbarEditorItem.stories.d.ts +11 -0
  654. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +21 -0
  655. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -0
  656. package/react/components/userPreferences/stories/General.stories.d.ts +9 -0
  657. package/react/components/userPreferences/stories/General.stories.js +16 -0
  658. package/react/components/userPreferences/stories/General.stories.js.map +1 -0
  659. package/react/components/userPreferences/stories/Notifications.stories.d.ts +9 -0
  660. package/react/components/userPreferences/stories/Notifications.stories.js +17 -0
  661. package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -0
  662. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.d.ts +9 -0
  663. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +20 -0
  664. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -0
  665. package/react/components/userPreferences/stories/NotificationsSources.stories.d.ts +12 -0
  666. package/react/components/userPreferences/stories/NotificationsSources.stories.js +28 -0
  667. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -0
  668. package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +8 -0
  669. package/react/components/userPreferences/stories/UserPreferences.stories.js +53 -0
  670. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -0
  671. package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +11 -0
  672. package/react/components/userPreferences/stories/WorkspaceButton.stories.js +20 -0
  673. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -0
  674. package/react/components/userPreferences/stories/WorkspaceComponents.stories.d.ts +13 -0
  675. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js +26 -0
  676. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -0
  677. package/react/components/userPreferences/stories/WorkspaceItem.stories.d.ts +9 -0
  678. package/react/components/userPreferences/stories/WorkspaceItem.stories.js +30 -0
  679. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -0
  680. package/react/components/userPreferences/stories/WorkspaceItemList.stories.d.ts +10 -0
  681. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js +57 -0
  682. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -0
  683. package/react/components/userPreferences/stories/Workspaces.stories.d.ts +9 -0
  684. package/react/components/userPreferences/stories/Workspaces.stories.js +44 -0
  685. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -0
  686. package/react/components/userPreferences/tests/ContentSection.spec.d.ts +1 -0
  687. package/react/components/userPreferences/tests/ContentSection.spec.js +41 -0
  688. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -0
  689. package/react/components/userPreferences/tests/DashbarEditor.spec.d.ts +1 -0
  690. package/react/components/userPreferences/tests/DashbarEditor.spec.js +37 -0
  691. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -0
  692. package/react/components/userPreferences/tests/DashbarEditorItem.spec.d.ts +1 -0
  693. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js +38 -0
  694. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -0
  695. package/react/components/userPreferences/tests/General.spec.d.ts +1 -0
  696. package/react/components/userPreferences/tests/General.spec.js +28 -0
  697. package/react/components/userPreferences/tests/General.spec.js.map +1 -0
  698. package/react/components/userPreferences/tests/LeftNav.spec.d.ts +1 -0
  699. package/react/components/userPreferences/tests/LeftNav.spec.js +12 -0
  700. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -0
  701. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.d.ts +1 -0
  702. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js +14 -0
  703. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -0
  704. package/react/components/userPreferences/tests/Notifications.spec.d.ts +1 -0
  705. package/react/components/userPreferences/tests/Notifications.spec.js +17 -0
  706. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -0
  707. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.d.ts +1 -0
  708. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +39 -0
  709. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -0
  710. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.d.ts +1 -0
  711. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js +22 -0
  712. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -0
  713. package/react/components/userPreferences/tests/ScheduledRestart.spec.d.ts +1 -0
  714. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +70 -0
  715. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -0
  716. package/react/components/userPreferences/tests/WorkspaceButton.spec.d.ts +1 -0
  717. package/react/components/userPreferences/tests/WorkspaceButton.spec.js +38 -0
  718. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -0
  719. package/react/components/userPreferences/tests/WorkspaceComponents.spec.d.ts +1 -0
  720. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +22 -0
  721. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -0
  722. package/react/components/userPreferences/tests/WorkspaceItem.spec.d.ts +1 -0
  723. package/react/components/userPreferences/tests/WorkspaceItem.spec.js +64 -0
  724. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -0
  725. package/react/components/userPreferences/tests/WorkspaceItemList.spec.d.ts +1 -0
  726. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js +45 -0
  727. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -0
  728. package/react/components/utils.js +1 -1
  729. package/react/components/utils.js.map +1 -1
  730. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +58 -31
  731. package/react/components/windowTitleBar/WindowTitleBarShell.js +47 -50
  732. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  733. package/react/components/windowTitleBar/components/center/Tab.d.ts +27 -7
  734. package/react/components/windowTitleBar/components/center/Tab.js +2 -2
  735. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  736. package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
  737. package/react/components/windowTitleBar/components/center/TabList.js +111 -37
  738. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  739. package/react/components/windowTitleBar/components/left/LinkerButton.js +5 -4
  740. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  741. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +1 -21
  742. package/react/components/windowTitleBar/components/left/LinkerGroups.js +6 -8
  743. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  744. package/react/components/windowTitleBar/components/left/ShareButton.d.ts +1 -21
  745. package/react/components/windowTitleBar/components/right/CloseButton.d.ts +12 -25
  746. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  747. package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +17 -26
  748. package/react/components/windowTitleBar/components/right/GroupingButton.js +2 -2
  749. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  750. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +1 -21
  751. package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +12 -25
  752. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  753. package/react/components/windowTitleBar/components/windowTitle.js +11 -6
  754. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  755. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +51 -44
  756. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +63 -56
  757. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  758. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +42 -44
  759. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  760. package/react/components/windowTitleBar/windowTitleBarContext.d.ts +9 -9
  761. package/react/components/windowTitleBar/windowTitleBarContext.js +2 -4
  762. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  763. package/react/components/yesNoDialog/Timer.spec.js +2 -2
  764. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  765. package/react/components/yesNoDialog/Timer.stories.js +1 -1
  766. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  767. package/react/components/yesNoDialog/YesNoDialog.spec.js +5 -5
  768. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  769. package/react/components/yesNoDialog/YesNoDialog.stories.js +1 -1
  770. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  771. package/react/hooks/useFavoritesShell.js.map +1 -1
  772. package/react/hooks/useLinker.js +1 -1
  773. package/react/hooks/useLinker.js.map +1 -1
  774. package/react/hooks/useMenu.js +1 -1
  775. package/react/hooks/useMenu.js.map +1 -1
  776. package/react/hooks/useNotifications.d.ts +10 -6
  777. package/react/hooks/useNotifications.js +53 -47
  778. package/react/hooks/useNotifications.js.map +1 -1
  779. package/react/hooks/usePubSub.js.map +1 -1
  780. package/react/hooks/useSearch.js +1 -1
  781. package/react/hooks/useSearch.js.map +1 -1
  782. package/react/hooks/useToolbar.js +71 -48
  783. package/react/hooks/useToolbar.js.map +1 -1
  784. package/react/hooks/useWorkspace.js +1 -1
  785. package/react/hooks/useWorkspace.js.map +1 -1
  786. package/react/reducers/favoriteReducer.js +1 -1
  787. package/react/reducers/favoriteReducer.js.map +1 -1
  788. package/react/reducers/rootReducer.d.ts +3 -4
  789. package/react/reducers/toolbarReducer.js +1 -1
  790. package/react/reducers/toolbarReducer.js.map +1 -1
  791. package/react/store.d.ts +6 -7
  792. package/react/types/advancedAppLauncherTypes.d.ts +28 -1
  793. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  794. package/react/types/dashbarTypes.d.ts +1 -1
  795. package/react/types/dashbarTypes.js.map +1 -1
  796. package/react/types/favoriteTypes.d.ts +1 -1
  797. package/react/types/favoriteTypes.js.map +1 -1
  798. package/react/types/fdc3.d.ts +28 -20
  799. package/react/types/fdc3.js.map +1 -1
  800. package/react/types/smartDesktopDesignerTypes.d.ts +13 -8
  801. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  802. package/react/types/windowTitleBar.d.ts +46 -0
  803. package/react/types/windowTitleBar.js +2 -0
  804. package/react/types/windowTitleBar.js.map +1 -0
  805. package/react/components/processMonitor/components/ChildWindows.d.ts +0 -4
  806. package/react/components/processMonitor/components/ChildWindows.js +0 -11
  807. package/react/components/processMonitor/components/ChildWindows.js.map +0 -1
  808. package/react/components/shared/addProtocolToValidURL.spec.js.map +0 -1
  809. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
  810. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
  811. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
  812. package/react/components/userPreferences/components/Checkbox.d.ts +0 -4
  813. package/react/components/userPreferences/components/Checkbox.js +0 -27
  814. package/react/components/userPreferences/components/Checkbox.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Workspaces.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/Workspaces.jsx"],"names":[],"mappings":"AAAA,OAAO,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E,CAAC,CACxD,6BAAK,GAAG,EAAE,CAAC,EAAE,SAAS,EAAC,qBAAqB,IAC1C,GAAG,CACC,CACN,CAAC;4BACF,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,MAAM,KAAK,CAAC,IAAI,gBAAgB,CACrE;wBACN,6BAAK,SAAS,EAAC,0BAA0B;4BACxC,6BACC,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,mBAAmB,EAC9B,WAAW,EAAE,IAAI,CAAC,kBAAkB,EACpC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS;gCAE/D,2BAAG,SAAS,EAAC,wCAAwC,GAAK;gCAC1D,0CAAiB,CACZ;4BACN,6BACC,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,mBAAmB,EAC9B,WAAW,EAAE,IAAI,CAAC,kBAAkB,EACpC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS;gCAEhE,2BAAG,SAAS,EAAC,wCAAwC,GAAK;gCAC1D,0CAAiB,CACZ,CACD,CACD,CACD;gBACN,oBAAC,QAAQ,IACR,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EACtC,OAAO,EAAE,IAAI,CAAC,yBAAyB,EACvC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAC1E,KAAK,EAAC,iCAAiC,GACtC,CACG,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport { WorkspaceManagementMenuStore, UserPreferencesStore } from \"../../stores/UserPreferencesStore\";\r\nimport { FinsembleDnDContext } from \"../../../legacyControls/FinsembleDnDContext\";\r\nimport { FinsembleDraggable } from \"../../../legacyControls/FinsembleDraggable\";\r\nimport Checkbox from \"../Checkbox\";\r\nimport async from \"async\";\r\n\r\nclass WorkspaceEditor extends React.Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tvalue: props.value || \"\",\r\n\t\t\tfinished: false,\r\n\t\t};\r\n\t\tthis.onKeyDown = this.onKeyDown.bind(this);\r\n\t\tthis.onChange = this.onChange.bind(this);\r\n\t\tthis.onBlur = this.onBlur.bind(this);\r\n\t\tthis.onFocus = this.onFocus.bind(this);\r\n\t}\r\n\r\n\tonKeyDown(e) {\r\n\t\tif (e.key === \"Escape\") {\r\n\t\t\tthis.setState({ finished: true }, () => {\r\n\t\t\t\tthis.props.cancelHandler();\r\n\t\t\t});\r\n\t\t} else if (e.key === \"Enter\") {\r\n\t\t\tfunction finish(val) {\r\n\t\t\t\tthis.props.saveHandler(val);\r\n\t\t\t}\r\n\t\t\t// binding so we don't lose the event inside of react's crazy callback structure\r\n\t\t\tthis.setState({ finished: true }, finish.bind(this, e.target.value));\r\n\t\t}\r\n\t}\r\n\r\n\tonChange(e) {\r\n\t\tthis.setState({\r\n\t\t\tvalue: e.target.value,\r\n\t\t});\r\n\t}\r\n\r\n\tonFocus(e) {\r\n\t\te.target.select();\r\n\t}\r\n\r\n\tonBlur() {\r\n\t\t// console.log(\"ON BLUR\", performance.now());\r\n\t\tfunction finish(val) {\r\n\t\t\tthis.props.saveHandler(val);\r\n\t\t}\r\n\t\t// binding so we don't lose the event inside of react's crazy callback structure. Finished is set so that the component doesn't call the saveHandler again on unMount\r\n\t\tthis.setState({ finished: true }, finish.bind(this, this.state.value));\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<input\r\n\t\t\t\tonFocus={this.onFocus}\r\n\t\t\t\tonBlur={this.onBlur}\r\n\t\t\t\tautoFocus={true}\r\n\t\t\t\tvalue={this.state.value}\r\n\t\t\t\tclassName=\"workspace-editor\"\r\n\t\t\t\tonChange={this.onChange}\r\n\t\t\t\tonKeyDown={this.onKeyDown}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport default class Workspaces extends React.Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tadding: false,\r\n\t\t\tediting: false,\r\n\t\t\tworkspaceList: [],\r\n\t\t\tfocusedWorkspace: \"\",\r\n\t\t\t// todo, get the workspaceToLoadOnStart from preferences.\r\n\t\t\tworkspaceToLoadOnStart: null,\r\n\t\t\ttemplateName: \"\",\r\n\t\t\tworkspaceBeingEdited: \"\",\r\n\t\t\tfocusedWorkspaceComponentList: [],\r\n\t\t\tinitialAlwaysOnTop: finsembleWindow.windowOptions.alwaysOnTop,\r\n\t\t\talwaysOnTop: finsembleWindow.windowOptions.alwaysOnTop,\r\n\t\t};\r\n\t\tthis.bindCorrectContext();\r\n\t\tthis.addListeners();\r\n\t}\r\n\r\n\tresetState() {\r\n\t\tthis.setState({\r\n\t\t\tadding: false,\r\n\t\t\tediting: false,\r\n\t\t\tfocusedWorkspace: \"\",\r\n\t\t\ttemplateName: \"\",\r\n\t\t\tworkspaceBeingEdited: \"\",\r\n\t\t});\r\n\t}\r\n\r\n\tbindCorrectContext() {\r\n\t\tlet methods = [\r\n\t\t\t\"deleteWorkspace\",\r\n\t\t\t\"addListeners\",\r\n\t\t\t\"setWorkspaceList\",\r\n\t\t\t\"onDragEnd\",\r\n\t\t\t\"startEditingWorkspace\",\r\n\t\t\t\"renameWorkspace\",\r\n\t\t\t\"cancelEdit\",\r\n\t\t\t\"setWorkspaceToLoadOnStart\",\r\n\t\t\t\"setPreferences\",\r\n\t\t\t\"exportWorkspace\",\r\n\t\t\t\"handleButtonClicks\",\r\n\t\t\t\"getFocusedWorkspaceComponentList\",\r\n\t\t\t\"changePreferencesAlwaysOnTop\",\r\n\t\t\t\"openFileDialog\",\r\n\t\t\t\"preferencesFocused\",\r\n\t\t];\r\n\t\tmethods.forEach((method) => {\r\n\t\t\tthis[method] = this[method].bind(this);\r\n\t\t});\r\n\t\twindow.importWorkspace = this.importWorkspace.bind(this);\r\n\t}\r\n\r\n\tsetWorkspaceList(err, data) {\r\n\t\tconsole.log(\"Set workspacelist\", data);\r\n\t\tif (!data) return;\r\n\t\tthis.setState({\r\n\t\t\tworkspaceList: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\taddListeners() {\r\n\t\tUserPreferencesStore.addListener({ field: \"WorkspaceList\" }, this.setWorkspaceList);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the windowOptions.alwaysOnTop to the value supplied. The preferences component should\r\n\t * not be always on top when a file dialog is open.\r\n\t * @param {boolean} alwaysOnTop The value to set finsembleWindow.options.alwaysOnTop\r\n\t */\r\n\tchangePreferencesAlwaysOnTop(alwaysOnTop) {\r\n\t\t// The initialAlwaysOnTop check is to prevent making a component be alwaysOnTop when the\r\n\t\t// client may have set it to alwaysOnTop:false in the config. If that's the case, it should\r\n\t\t// never set its alwaysOnTop to true and should always remain unchanged\r\n\t\tif (this.state.initialAlwaysOnTop && FSBL.System.container === \"Electron\") {\r\n\t\t\tFSBL.Clients.WindowClient.setAlwaysOnTop(alwaysOnTop, () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\talwaysOnTop: alwaysOnTop,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tonDragEnd({ oldIndex, newIndex }) {\r\n\t\tlet workspaces = JSON.parse(JSON.stringify(this.state.workspaceList));\r\n\t\tlet workspaceToMove = JSON.parse(JSON.stringify(workspaces[oldIndex]));\r\n\t\tworkspaces.splice(oldIndex, 1);\r\n\t\tworkspaces.splice(newIndex, 0, workspaceToMove);\r\n\t\tthis.setState({\r\n\t\t\tworkspaceList: workspaces,\r\n\t\t});\r\n\t\tWorkspaceManagementMenuStore.Dispatcher.dispatch({\r\n\t\t\tactionType: \"reorderWorkspace\",\r\n\t\t\tdata: { oldIndex, newIndex },\r\n\t\t});\r\n\t}\r\n\r\n\t// returns all the component types of a template definition to display to user for additional info. If multiple components with same type, then instead of listing each\r\n\t// individually, only one entry will be returned with the count in parentheses.\r\n\tgetComponentTypes(templateObject) {\r\n\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes templateObject\", templateObject);\r\n\t\tvar componentType;\r\n\t\tvar componentMap = {};\r\n\t\tvar annotatedComponentList = [];\r\n\t\tfor (let i = 0; i < templateObject.windows.length; i++) {\r\n\t\t\tlet windowData = templateObject.windowData[i];\r\n\t\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes loop\", windowData);\r\n\t\t\tcomponentType = \"Unknown Component\";\r\n\t\t\tif (windowData) {\r\n\t\t\t\t// current assimilation doesn't fill in windowData, so in this case use \"Unknown Component\" for component type\r\n\t\t\t\tcomponentType = windowData.componentType || windowData.customData.component.type;\r\n\t\t\t} else {\r\n\t\t\t\tcomponentType = \"Unknown Component\";\r\n\t\t\t}\r\n\t\t\tif (!componentMap[componentType]) {\r\n\t\t\t\tcomponentMap[componentType] = 1;\r\n\t\t\t} else {\r\n\t\t\t\tcomponentMap[componentType]++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar componentTypes = Object.keys(componentMap);\r\n\t\tfor (let i = 0; i < componentTypes.length; i++) {\r\n\t\t\tlet annotatedName = componentTypes[i];\r\n\t\t\tlet identicalCount = componentMap[componentTypes[i]];\r\n\t\t\tif (identicalCount > 1) {\r\n\t\t\t\tannotatedName = `${annotatedName} (${identicalCount})`;\r\n\t\t\t}\r\n\t\t\tannotatedComponentList.push(annotatedName);\r\n\t\t}\r\n\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes\", annotatedComponentList);\r\n\t\treturn annotatedComponentList;\r\n\t}\r\n\r\n\tsetFocusedWorkspace(workspace) {\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\tfocusedWorkspace: workspace,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tthis.getFocusedWorkspaceComponentList();\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\tcancelEdit() {\r\n\t\tif (this.state.adding) {\r\n\t\t\tlet { workspaceList } = this.state;\r\n\t\t\tworkspaceList.pop();\r\n\t\t\tthis.setFocusedWorkspace(\"\");\r\n\t\t\tthis.setState({\r\n\t\t\t\tworkspaceList: workspaceList,\r\n\t\t\t});\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\tediting: false,\r\n\t\t\tadding: false,\r\n\t\t\tworkspaceBeingEdited: \"\",\r\n\t\t});\r\n\t}\r\n\r\n\trenameWorkspace(newName) {\r\n\t\tlet oldName = this.state.workspaceBeingEdited;\r\n\t\tif (oldName === \"\") {\r\n\t\t\treturn this.cancelEdit();\r\n\t\t}\r\n\r\n\t\tif (newName === oldName || newName.trim() === \"\") return this.cancelEdit();\r\n\t\tlet updatedWorkspaceList = this.state.workspaceList;\r\n\t\tlet index = updatedWorkspaceList.findIndex((el) => el.name === oldName);\r\n\t\t// Set state locally so that the text doesn't change when the input field unmounts.\r\n\t\tif (index !== -1) {\r\n\t\t\tupdatedWorkspaceList[index].name = newName;\r\n\t\t\tthis.setState({\r\n\t\t\t\tworkspaceList: updatedWorkspaceList,\r\n\t\t\t});\r\n\t\t}\r\n\t\tWorkspaceManagementMenuStore.Dispatcher.dispatch({\r\n\t\t\tactionType: \"renameWorkspace\",\r\n\t\t\tdata: {\r\n\t\t\t\toldName: oldName,\r\n\t\t\t\tnewName: newName,\r\n\t\t\t},\r\n\t\t});\r\n\t\tif (this.state.workspaceToLoadOnStart === oldName) {\r\n\t\t\tthis.setState(\r\n\t\t\t\t{\r\n\t\t\t\t\tfocusedWorkspace: newName,\r\n\t\t\t\t},\r\n\t\t\t\t() => {\r\n\t\t\t\t\tthis.setWorkspaceToLoadOnStart(() => {\r\n\t\t\t\t\t\tthis.cancelEdit();\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\tstartEditingWorkspace(e, workspaceName = this.state.focusedWorkspace) {\r\n\t\t// without preventing this event from reaching the finsemble draggable,\r\n\t\t// the editor will lose focus and you won't be able to rename your workspaces\r\n\t\te.stopPropagation();\r\n\t\tthis.setState({\r\n\t\t\tediting: true,\r\n\t\t\tfocusedWorkspace: workspaceName,\r\n\t\t\tworkspaceBeingEdited: workspaceName,\r\n\t\t});\r\n\t}\r\n\r\n\tstartExportingTemplate() {\r\n\t\tWorkspaceManagementMenuStore.Dispatcher.dispatch({\r\n\t\t\tactionType: \"exportWorkspace\",\r\n\t\t\tdata: {\r\n\t\t\t\tname: this.state.focusedWorkspace,\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tstartImportingTemplate() {\r\n\t\tWorkspaceManagementMenuStore.Dispatcher.dispatch({\r\n\t\t\tactionType: \"importTemplate\",\r\n\t\t\tdata: {\r\n\t\t\t\tname: this.state.templateName,\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteWorkspace(workspaceName = this.state.focusedWorkspace) {\r\n\t\tlet workspaceToRemove = workspaceName;\r\n\t\tthis.resetState();\r\n\r\n\t\tWorkspaceManagementMenuStore.Dispatcher.dispatch({\r\n\t\t\tactionType: \"removeWorkspace\",\r\n\t\t\tdata: {\r\n\t\t\t\tname: workspaceToRemove,\r\n\t\t\t\thideModalOnClose: false,\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tsetPreferences(err, data) {\r\n\t\tif (!data && !data.value) return;\r\n\t\tconsole.log(\"Set preferences\", data.value);\r\n\t\tthis.setState({\r\n\t\t\tworkspaceToLoadOnStart: data.value[\"finsemble.initialWorkspace\"],\r\n\t\t\tfocusedWorkspace: data.value[\"finsemble.initialWorkspace\"],\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tUserPreferencesStore.addListener({ field: \"preferences\" }, this.setPreferences);\r\n\t\tFSBL.Clients.ConfigClient.getPreferences((err, data) => {\r\n\t\t\tthis.setPreferences(err, { value: data });\r\n\t\t});\r\n\t\tUserPreferencesStore.getValue({ field: \"WorkspaceList\" }, (err, data) => {\r\n\t\t\tif (data && data.length) {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tworkspaceList: data,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tUserPreferencesStore.removeListener({ field: \"preferences\" }, this.setPreferences);\r\n\t}\r\n\r\n\tsetWorkspaceToLoadOnStart(cb = Function.prototype) {\r\n\t\tlet self = this;\r\n\t\tif (!this.state.focusedWorkspace) return;\r\n\t\tfunction setPreference() {\r\n\t\t\tFSBL.Clients.ConfigClient.setPreference(\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"finsemble.initialWorkspace\",\r\n\t\t\t\t\tvalue: self.state.workspaceToLoadOnStart,\r\n\t\t\t\t},\r\n\t\t\t\t(err, data) => {\r\n\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (typeof cb === \"function\") {\r\n\t\t\t\t\t\tcb();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t\tif (this.state.focusedWorkspace === this.state.workspaceToLoadOnStart) {\r\n\t\t\tthis.setState({ workspaceToLoadOnStart: null }, setPreference);\r\n\t\t} else {\r\n\t\t\tself.setState(\r\n\t\t\t\t{\r\n\t\t\t\t\tworkspaceToLoadOnStart: self.state.focusedWorkspace,\r\n\t\t\t\t},\r\n\t\t\t\tsetPreference\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\topenFileDialog() {\r\n\t\t// Set alwaysOnTop to false and add an event listener on the window. When focus is regained\r\n\t\t// then reset always on top\r\n\t\tthis.changePreferencesAlwaysOnTop(false);\r\n\t\tfinsembleWindow.addEventListener(\"focused\", this.preferencesFocused);\r\n\t\tlet inputElement = document.getElementById(\"file-input\");\r\n\t\tinputElement.addEventListener(\"change\", this.importWorkspace, false);\r\n\t\tinputElement.click();\r\n\t}\r\n\r\n\t/**\r\n\t * If the event is being listened to, when the preferences component is focused\r\n\t * it will set always on top to true, and remove the event listener\r\n\t *\r\n\t * This is to handle bringing alwaysOnTop back to true when file dialogs are closed\r\n\t * without changes (also handles bringing back to front after exporting)\r\n\t */\r\n\tpreferencesFocused() {\r\n\t\tfinsembleWindow.removeEventListener(\"focused\", this.preferencesFocused);\r\n\t\tthis.changePreferencesAlwaysOnTop(true);\r\n\t}\r\n\r\n\timportWorkspace(evt) {\r\n\t\tlet inputElement = document.getElementById(\"file-input\");\r\n\t\tinputElement.removeEventListener(\"change\", this.importWorkspace);\r\n\t\tvar { files } = evt.target; // FileList object\r\n\r\n\t\tfunction loadFile(file, done) {\r\n\t\t\tlet reader = new FileReader();\r\n\t\t\tlet fileName = evt.target.value;\r\n\t\t\t// When the file info is loaded, we get into here..\r\n\t\t\treader.onload = function (e) {\r\n\t\t\t\tfileName = fileName.split(\"\\\\\");\r\n\t\t\t\tfileName = fileName[fileName.length - 1].replace(\".json\", \"\");\r\n\t\t\t\tlet workspaceTemplateDefinition = JSON.parse(e.target.result);\r\n\t\t\t\tlet templateName = Object.keys(workspaceTemplateDefinition.workspaceTemplates)[0];\r\n\t\t\t\tif (fileName !== templateName) {\r\n\t\t\t\t\t// We want the file name to overwrite the name of the workspace that was saved as the template..\r\n\t\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[fileName] =\r\n\t\t\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[templateName];\r\n\t\t\t\t\tdelete workspaceTemplateDefinition.workspaceTemplates[templateName];\r\n\t\t\t\t}\r\n\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[fileName].name = fileName;\r\n\t\t\t\tFSBL.Clients.WorkspaceClient.addWorkspaceDefinition(\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tworkspaceJSONDefinition: workspaceTemplateDefinition.workspaceTemplates,\r\n\t\t\t\t\t\tforce: false,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t(err) => {\r\n\t\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\t\tFSBL.Clients.Logger.info(\"addWorkspaceTemplateDefinition error\", err);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdone();\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t};\r\n\r\n\t\t\t// Read in the image file as a data URL.\r\n\t\t\treader.readAsText(file);\r\n\t\t}\r\n\r\n\t\tasync.each(files, loadFile, () => {\r\n\t\t\t// Clear out files. so if the user imports the same file back-to-back, the event will fire.\r\n\t\t\tinputElement.value = \"\";\r\n\t\t\tFSBL.Clients.Logger.info(\"Workspaces imported\");\r\n\t\t});\r\n\t}\r\n\r\n\texportWorkspace() {\r\n\t\tif (this.state.focusedWorkspace === \"\") return;\r\n\t\tvar self = this;\r\n\t\tfunction doExport() {\r\n\t\t\tFSBL.Clients.WorkspaceClient.getWorkspaceDefinition(\r\n\t\t\t\t{ workspaceName: self.state.focusedWorkspace },\r\n\t\t\t\t(err, workspaceDefinition) => {\r\n\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\tFSBL.Clients.Logger.error(\"getWorkspaceDefinition error\", err);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// We're saving using a routine initially created for templates. The outcome is the same and it probably should have just been \"Save to file\". This bool is to allow it to save.\r\n\t\t\t\t\t\tFSBL.ConfigUtils.promptAndSaveJSONToLocalFile(self.state.focusedWorkspace, {\r\n\t\t\t\t\t\t\tworkspaceTemplates: workspaceDefinition,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Set alwaysOnTop to false and add an event listener on the window. When focus is regained\r\n\t\t// then reset always on top\r\n\t\tself.changePreferencesAlwaysOnTop(false);\r\n\t\tfinsembleWindow.addEventListener(\"focused\", this.preferencesFocused);\r\n\t\t// If we're autosaving, autosave, then export.\r\n\t\t// @todo, put into store. consider moving autosave into workspaceClient.\r\n\t\tFSBL.Clients.ConfigClient.getValue(\r\n\t\t\t{\r\n\t\t\t\tfield: \"finsemble.preferences.workspaceService.promptUserOnDirtyWorkspace\",\r\n\t\t\t},\r\n\t\t\t(err, data) => {\r\n\t\t\t\t// default to false.\r\n\t\t\t\tlet PROMPT_ON_SAVE = data === null ? false : data;\r\n\t\t\t\tif (!PROMPT_ON_SAVE) {\r\n\t\t\t\t\tlet activeName = FSBL.Clients.WorkspaceClient.activeWorkspace.name;\r\n\t\t\t\t\treturn FSBL.Clients.WorkspaceClient.saveAs(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tname: activeName,\r\n\t\t\t\t\t\t\tforce: true,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t(err, response) => {\r\n\t\t\t\t\t\t\tdoExport();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\tdoExport();\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\thandleButtonClicks(e) {\r\n\t\tif (this.state.adding || this.state.editing) {\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t}\r\n\r\n\tgetFocusedWorkspaceComponentList() {\r\n\t\tlet { workspaceList, focusedWorkspace } = this.state;\r\n\t\tif (focusedWorkspace === \"\") return [];\r\n\t\tlet workspace = workspaceList.filter((wSpace) => wSpace.name === focusedWorkspace)[0];\r\n\r\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceDefinition(\r\n\t\t\t{ workspaceName: focusedWorkspace },\r\n\t\t\t(err, workspaceDefinition) => {\r\n\t\t\t\tlet componentTypes = this.getComponentTypes(workspaceDefinition[focusedWorkspace]);\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tfocusedWorkspaceComponentList: componentTypes,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet deleteButtonClasses = \"individual-workspace-action delete-workspace\",\r\n\t\t\texportButtonClasses = \"action-button workspace-action-button\",\r\n\t\t\trenameButtonClasses = \"individual-workspace-action\",\r\n\t\t\taddButtonClasses = \"positive-action-button action-button workspace-action-button\",\r\n\t\t\timportButtonClasses = \"action-button workspace-action-button\",\r\n\t\t\tallowAdd = true,\r\n\t\t\tallowDelete = true,\r\n\t\t\tallowExport = true,\r\n\t\t\tallowRename = true,\r\n\t\t\tallowImport = true,\r\n\t\t\tdeleteTooltip = \"Delete\";\r\n\r\n\t\tif (this.state.focusedWorkspace === FSBL.Clients.WorkspaceClient.activeWorkspace.name) {\r\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-individual-workspace-action`;\r\n\t\t}\r\n\r\n\t\tif (this.state.focusedWorkspace === \"\") {\r\n\t\t\texportButtonClasses = `${exportButtonClasses} disabled-button`;\r\n\t\t\trenameButtonClasses = `${renameButtonClasses} disabled-individual-workspace-action`;\r\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-individual-workspace-action`;\r\n\t\t\tdeleteTooltip = \"No workspace selected\";\r\n\t\t\tallowRename = false;\r\n\t\t\tallowExport = false;\r\n\t\t\tallowDelete = false;\r\n\t\t}\r\n\r\n\t\tif (this.state.adding || this.state.editing) {\r\n\t\t\trenameButtonClasses = `${renameButtonClasses} disabled-button`;\r\n\t\t\taddButtonClasses = `${addButtonClasses} disabled-button`;\r\n\t\t\texportButtonClasses = `${exportButtonClasses} disabled-button`;\r\n\t\t\timportButtonClasses = `${importButtonClasses} disabled-button`;\r\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-button`;\r\n\t\t\tallowAdd = false;\r\n\t\t\tallowDelete = false;\r\n\t\t\tallowExport = false;\r\n\t\t\tallowRename = false;\r\n\t\t\tallowImport = false;\r\n\t\t}\r\n\r\n\t\tlet addTooltip = \"Add a workspace\",\r\n\t\t\timportTooltip = \"Import workspace from file\",\r\n\t\t\texportTooltip = allowExport ? \"Export selected workspace\" : \"No workspace selected\",\r\n\t\t\trenameTooltip = allowRename ? \"Rename\" : \"Cannot Edit\";\r\n\r\n\t\treturn (\r\n\t\t\t<div>\r\n\t\t\t\t<input style={{ display: \"none\" }} type=\"file\" id=\"file-input\" />\r\n\t\t\t\t<div className=\"complex-menu-content-row\">\r\n\t\t\t\t\t<div className=\"workspace-list-header-row\">\r\n\t\t\t\t\t\t<div className=\"content-section-header workspace-list-header\"></div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"content-section-wrapper\">\r\n\t\t\t\t\t\t<div ref=\"WorkspaceList\" className=\"workspace-list\">\r\n\t\t\t\t\t\t\t<FinsembleDnDContext onDragEnd={this.onDragEnd}>\r\n\t\t\t\t\t\t\t\t{this.state.workspaceList.map((workspace, i) => {\r\n\t\t\t\t\t\t\t\t\tlet baseClass = \"workspace-item\";\r\n\t\t\t\t\t\t\t\t\tlet classNames = baseClass;\r\n\t\t\t\t\t\t\t\t\tif (FSBL.Clients.WorkspaceClient.activeWorkspace.name === workspace.name) {\r\n\t\t\t\t\t\t\t\t\t\tclassNames = `${classNames} active-workspace`;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif (this.state.workspaceToLoadOnStart === workspace.name) {\r\n\t\t\t\t\t\t\t\t\t\tclassNames = `${classNames} auto-start-workspace-item`;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif (this.state.focusedWorkspace === workspace.name) {\r\n\t\t\t\t\t\t\t\t\t\tclassNames = `${classNames} focused-workspace-item`;\r\n\t\t\t\t\t\t\t\t\t\tif (i === 0) {\r\n\t\t\t\t\t\t\t\t\t\t\tclassNames = `${classNames} no-top-border`;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (this.state.editing || this.state.adding) {\r\n\t\t\t\t\t\t\t\t\t\t\tclassNames = `${classNames} workspace-item-editing`;\r\n\t\t\t\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div key={i} className={classNames}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<WorkspaceEditor\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={workspace.name}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsaveHandler={this.state.editing ? this.renameWorkspace : this.addWorkspace}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcancelHandler={this.cancelEdit}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t\t<FinsembleDraggable\r\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => this.setFocusedWorkspace(workspace.name)}\r\n\t\t\t\t\t\t\t\t\t\t\twrapperClass={classNames}\r\n\t\t\t\t\t\t\t\t\t\t\tdraggableId={workspace.name}\r\n\t\t\t\t\t\t\t\t\t\t\tkey={i}\r\n\t\t\t\t\t\t\t\t\t\t\tindex={i}\r\n\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"ff-adp-hamburger\"></div>\r\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"workspace-name\" title={workspace.name}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t{workspace.name}\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"individual-workspace-actions\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{workspace.name !== FSBL.Clients.WorkspaceClient.activeWorkspace.name && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={renameTooltip}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={renameButtonClasses}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowRename\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? (e) => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.startEditingWorkspace(e, workspace.name);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: Function.prototype\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i className=\"ff-adp-edit\"></i>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t\t{workspace.name !== FSBL.Clients.WorkspaceClient.activeWorkspace.name && (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={deleteTooltip}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={deleteButtonClasses}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowDelete\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? () => {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthis.deleteWorkspace(workspace.name);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: Function.prototype\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i className=\"ff-adp-trash-outline\"></i>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</FinsembleDraggable>\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t})}\r\n\t\t\t\t\t\t\t</FinsembleDnDContext>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div className=\"workspace-extras\">\r\n\t\t\t\t\t\t\t<div className=\"workspace-component-list\">\r\n\t\t\t\t\t\t\t\t{this.state.focusedWorkspaceComponentList.length > 0 &&\r\n\t\t\t\t\t\t\t\t\tthis.state.focusedWorkspaceComponentList.map((cmp, i) => (\r\n\t\t\t\t\t\t\t\t\t\t<div key={i} className=\"workspace-component\">\r\n\t\t\t\t\t\t\t\t\t\t\t{cmp}\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t\t{this.state.focusedWorkspaceComponentList.length === 0 && \"No components.\"}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div className=\"workspace-action-buttons\">\r\n\t\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\t\ttitle={importTooltip}\r\n\t\t\t\t\t\t\t\t\tclassName={importButtonClasses}\r\n\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\r\n\t\t\t\t\t\t\t\t\tonClick={allowImport ? this.openFileDialog : Function.prototype}\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<i className=\"workspace-action-button-icon ff-import\"></i>\r\n\t\t\t\t\t\t\t\t\t<div>Import</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\t\ttitle={exportTooltip}\r\n\t\t\t\t\t\t\t\t\tclassName={exportButtonClasses}\r\n\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\r\n\t\t\t\t\t\t\t\t\tonClick={allowExport ? this.exportWorkspace : Function.prototype}\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<i className=\"workspace-action-button-icon ff-export\"></i>\r\n\t\t\t\t\t\t\t\t\t<div>Export</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<Checkbox\r\n\t\t\t\t\t\tdisabled={!this.state.focusedWorkspace}\r\n\t\t\t\t\t\tonClick={this.setWorkspaceToLoadOnStart}\r\n\t\t\t\t\t\tchecked={this.state.focusedWorkspace === this.state.workspaceToLoadOnStart}\r\n\t\t\t\t\t\tlabel=\"Load this workspace on startup.\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
1
+ {"version":3,"file":"Workspaces.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/Workspaces.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,mBAAmB,MAAM,mCAAmC,CAAC;AACpE,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK,CAAC,SAAS;IACtD,YAAY,KAAK;;QAChB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,K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CAAC,CAAC,QAAQ,CAAC,SAAS,EAChE,IAAI,EAAC,QAAQ,GACZ,CACG,CACD,CACD;gBACN,oBAAC,QAAQ,IACR,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EACtC,OAAO,EAAE,IAAI,CAAC,yBAAyB,EACvC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAC1E,KAAK,EAAC,gCAAgC,GACrC,CACG,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\r\nimport { WorkspaceManagementMenuStore } from \"../../stores/UserPreferencesStore\";\r\nimport { Checkbox } from \"../../../common/Checkbox\";\r\nimport async from \"async\";\r\nimport { WorkspaceButton } from \"../workspaces/WorkspaceButton\";\r\nimport WorkspaceComponents from \"../workspaces/WorkspaceComponents\";\r\nimport WorkspaceItemList from \"../workspaces/WorkspaceItemList\";\r\nimport { Util } from \"@finsemble/finsemble-core\";\r\n\r\nexport default class Workspaces extends React.Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tadding: false,\r\n\t\t\tediting: false,\r\n\t\t\tworkspaceList: [],\r\n\t\t\tfocusedWorkspace: \"\",\r\n\t\t\t// todo, get the workspaceToLoadOnStart from preferences.\r\n\t\t\tworkspaceToLoadOnStart: null,\r\n\t\t\ttemplateName: \"\",\r\n\t\t\tworkspaceBeingEdited: \"\",\r\n\t\t\tfocusedWorkspaceComponentList: [],\r\n\t\t\tinitialAlwaysOnTop: finsembleWindow.windowOptions?.alwaysOnTop,\r\n\t\t\talwaysOnTop: finsembleWindow.windowOptions?.alwaysOnTop,\r\n\t\t};\r\n\t\tthis.bindCorrectContext();\r\n\t\tthis.addListeners();\r\n\t}\r\n\r\n\tresetState() {\r\n\t\tthis.setState({\r\n\t\t\tadding: false,\r\n\t\t\tediting: false,\r\n\t\t\tfocusedWorkspace: \"\",\r\n\t\t\ttemplateName: \"\",\r\n\t\t\tworkspaceBeingEdited: \"\",\r\n\t\t});\r\n\t}\r\n\r\n\tbindCorrectContext() {\r\n\t\tlet methods = [\r\n\t\t\t\"deleteWorkspace\",\r\n\t\t\t\"addListeners\",\r\n\t\t\t\"setWorkspaceList\",\r\n\t\t\t\"onDragEnd\",\r\n\t\t\t\"startEditingWorkspace\",\r\n\t\t\t\"renameWorkspace\",\r\n\t\t\t\"cancelEdit\",\r\n\t\t\t\"setWorkspaceToLoadOnStart\",\r\n\t\t\t\"setPreferences\",\r\n\t\t\t\"exportWorkspace\",\r\n\t\t\t\"handleButtonClicks\",\r\n\t\t\t\"getFocusedWorkspaceComponentList\",\r\n\t\t\t\"changePreferencesAlwaysOnTop\",\r\n\t\t\t\"openFileDialog\",\r\n\t\t\t\"preferencesFocused\",\r\n\t\t\t\"setFocusedWorkspace\",\r\n\t\t];\r\n\t\tmethods.forEach((method) => {\r\n\t\t\tthis[method] = this[method].bind(this);\r\n\t\t});\r\n\t\twindow.importWorkspace = this.importWorkspace.bind(this);\r\n\t}\r\n\r\n\tsetWorkspaceList(err, data) {\r\n\t\tconsole.log(\"Set workspacelist\", data);\r\n\t\tif (!data) return;\r\n\t\tthis.setState({\r\n\t\t\tworkspaceList: data.value,\r\n\t\t});\r\n\t}\r\n\r\n\taddListeners() {\r\n\t\tthis.props.addListener({ field: \"WorkspaceList\" }, this.setWorkspaceList);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the windowOptions.alwaysOnTop to the value supplied. The preferences component should\r\n\t * not be always on top when a file dialog is open.\r\n\t * @param {boolean} alwaysOnTop The value to set finsembleWindow.options.alwaysOnTop\r\n\t */\r\n\tchangePreferencesAlwaysOnTop(alwaysOnTop) {\r\n\t\t// The initialAlwaysOnTop check is to prevent making a component be alwaysOnTop when the\r\n\t\t// client may have set it to alwaysOnTop:false in the config. If that's the case, it should\r\n\t\t// never set its alwaysOnTop to true and should always remain unchanged\r\n\t\tif (this.state.initialAlwaysOnTop && FSBL.System.container === \"Electron\") {\r\n\t\t\tFSBL.Clients.WindowClient.setAlwaysOnTop(alwaysOnTop, () => {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\talwaysOnTop: alwaysOnTop,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tonDragEnd({ oldIndex, newIndex }) {\r\n\t\tlet workspaces = JSON.parse(JSON.stringify(this.state.workspaceList));\r\n\t\tlet workspaceToMove = JSON.parse(JSON.stringify(workspaces[oldIndex]));\r\n\t\tworkspaces.splice(oldIndex, 1);\r\n\t\tworkspaces.splice(newIndex, 0, workspaceToMove);\r\n\t\tthis.setState({\r\n\t\t\tworkspaceList: workspaces,\r\n\t\t});\r\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\r\n\t\t\tactionType: \"reorderWorkspace\",\r\n\t\t\tdata: { oldIndex, newIndex },\r\n\t\t});\r\n\t}\r\n\r\n\t// returns all the component types of a template definition to display to user for additional info. If multiple components with same type, then instead of listing each\r\n\t// individually, only one entry will be returned with the count in parentheses.\r\n\tgetComponentTypes(templateObject) {\r\n\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes templateObject\", templateObject);\r\n\t\tvar componentType;\r\n\t\tvar componentMap = {};\r\n\t\tvar annotatedComponentList = [];\r\n\t\tfor (let i = 0; i < templateObject.windows.length; i++) {\r\n\t\t\tlet windowData = templateObject.windowData[i];\r\n\t\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes loop\", windowData);\r\n\t\t\tcomponentType = \"Unknown Component\";\r\n\t\t\tif (windowData) {\r\n\t\t\t\t// current assimilation doesn't fill in windowData, so in this case use \"Unknown Component\" for component type\r\n\t\t\t\tcomponentType = windowData.componentType || windowData.customData.component.type;\r\n\t\t\t} else {\r\n\t\t\t\tcomponentType = \"Unknown Component\";\r\n\t\t\t}\r\n\t\t\tif (!componentMap[componentType]) {\r\n\t\t\t\tcomponentMap[componentType] = 1;\r\n\t\t\t} else {\r\n\t\t\t\tcomponentMap[componentType]++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar componentTypes = Object.keys(componentMap);\r\n\t\tfor (let i = 0; i < componentTypes.length; i++) {\r\n\t\t\tlet annotatedName = componentTypes[i];\r\n\t\t\tlet identicalCount = componentMap[componentTypes[i]];\r\n\t\t\tif (identicalCount > 1) {\r\n\t\t\t\tannotatedName = `${annotatedName} (${identicalCount})`;\r\n\t\t\t}\r\n\t\t\tannotatedComponentList.push(annotatedName);\r\n\t\t}\r\n\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes\", annotatedComponentList);\r\n\t\treturn annotatedComponentList;\r\n\t}\r\n\r\n\tsetFocusedWorkspace(workspace) {\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\tfocusedWorkspace: workspace,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tthis.getFocusedWorkspaceComponentList();\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\tcancelEdit() {\r\n\t\tif (this.state.adding) {\r\n\t\t\tlet { workspaceList } = this.state;\r\n\t\t\tworkspaceList.pop();\r\n\t\t\tthis.setFocusedWorkspace(\"\");\r\n\t\t\tthis.setState({\r\n\t\t\t\tworkspaceList: workspaceList,\r\n\t\t\t});\r\n\t\t}\r\n\t\tthis.setState({\r\n\t\t\tediting: false,\r\n\t\t\tadding: false,\r\n\t\t\tworkspaceBeingEdited: \"\",\r\n\t\t});\r\n\t}\r\n\r\n\trenameWorkspace(newName) {\r\n\t\tlet oldName = this.state.workspaceBeingEdited;\r\n\t\tif (oldName === \"\") {\r\n\t\t\treturn this.cancelEdit();\r\n\t\t}\r\n\r\n\t\tif (newName === oldName || newName.trim() === \"\") return this.cancelEdit();\r\n\r\n\t\tlet newNameCamelCase = Util.camelCase(newName);\r\n\t\tif (this.state.workspaceList.some((workspace) => Util.camelCase(workspace.name) === newNameCamelCase)) {\r\n\t\t\tlet notification = new FSBL.Clients.NotificationClient.Notification();\r\n\t\t\tnotification.source = \"Finsemble\";\r\n\t\t\tnotification.title = \"Workspace renaming\";\r\n\t\t\tnotification.details = `Sorry, unable to rename workspace to \"${newName}\". Please use another name.`;\r\n\t\t\tFSBL.Clients.NotificationClient.notify(notification);\r\n\t\t\treturn this.cancelEdit();\r\n\t\t}\r\n\r\n\t\tlet updatedWorkspaceList = this.state.workspaceList;\r\n\t\tlet index = updatedWorkspaceList.findIndex((el) => el.name === oldName);\r\n\t\t// Set state locally so that the text doesn't change when the input field unmounts.\r\n\t\tif (index !== -1) {\r\n\t\t\tupdatedWorkspaceList[index].name = newName;\r\n\t\t\tthis.setState({\r\n\t\t\t\tworkspaceList: updatedWorkspaceList,\r\n\t\t\t});\r\n\t\t}\r\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\r\n\t\t\tactionType: \"renameWorkspace\",\r\n\t\t\tdata: {\r\n\t\t\t\toldName: oldName,\r\n\t\t\t\tnewName: newName,\r\n\t\t\t},\r\n\t\t});\r\n\t\tif (this.state.workspaceToLoadOnStart === oldName) {\r\n\t\t\tthis.setState(\r\n\t\t\t\t{\r\n\t\t\t\t\tfocusedWorkspace: newName,\r\n\t\t\t\t},\r\n\t\t\t\t() => {\r\n\t\t\t\t\tthis.setWorkspaceToLoadOnStart(() => {\r\n\t\t\t\t\t\tthis.cancelEdit();\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis.cancelEdit();\r\n\t\t}\r\n\t}\r\n\r\n\tstartEditingWorkspace(e, workspaceName = this.state.focusedWorkspace) {\r\n\t\t// without preventing this event from reaching the finsemble draggable,\r\n\t\t// the editor will lose focus and you won't be able to rename your workspaces\r\n\t\te.stopPropagation();\r\n\t\tthis.setState({\r\n\t\t\tediting: true,\r\n\t\t\tfocusedWorkspace: workspaceName,\r\n\t\t\tworkspaceBeingEdited: workspaceName,\r\n\t\t});\r\n\t}\r\n\r\n\tstartExportingTemplate() {\r\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\r\n\t\t\tactionType: \"exportWorkspace\",\r\n\t\t\tdata: {\r\n\t\t\t\tname: this.state.focusedWorkspace,\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tstartImportingTemplate() {\r\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\r\n\t\t\tactionType: \"importTemplate\",\r\n\t\t\tdata: {\r\n\t\t\t\tname: this.state.templateName,\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tdeleteWorkspace(workspaceName = this.state.focusedWorkspace) {\r\n\t\tlet workspaceToRemove = workspaceName; // type: string\r\n\t\tthis.resetState();\r\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\r\n\t\t\tactionType: \"removeWorkspace\",\r\n\t\t\tdata: {\r\n\t\t\t\tname: workspaceToRemove,\r\n\t\t\t\thideModalOnClose: false,\r\n\t\t\t},\r\n\t\t}) ||\r\n\t\t\t(() => {\r\n\t\t\t\tlet workspaceListCopy = [...this.state.workspaceList];\r\n\t\t\t\tworkspaceListCopy = workspaceListCopy.filter((workspace) => workspace.name !== workspaceName);\r\n\t\t\t\tthis.setState({ workspaceList: workspaceListCopy });\r\n\t\t\t})();\r\n\t}\r\n\r\n\tsetPreferences(err, data) {\r\n\t\tif (!data && !data.value) return;\r\n\t\tconsole.log(\"Set preferences\", data.value);\r\n\t\tthis.setState({\r\n\t\t\tworkspaceToLoadOnStart: data.value[\"finsemble.initialWorkspace\"],\r\n\t\t\tfocusedWorkspace: data.value[\"finsemble.initialWorkspace\"],\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tthis.props.addListener({ field: \"preferences\" }, this.setPreferences);\r\n\t\tFSBL.Clients.ConfigClient.getPreferences((err, data) => {\r\n\t\t\tthis.setPreferences(err, { value: data });\r\n\t\t});\r\n\t\tthis.props.getValue({ field: \"WorkspaceList\" }, (err, data) => {\r\n\t\t\tif (data && data.length) {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\tworkspaceList: data,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tcomponentWillUnmount() {\r\n\t\tthis.props.removeListener({ field: \"preferences\" }, this.setPreferences);\r\n\t}\r\n\r\n\tsetWorkspaceToLoadOnStart(cb = Function.prototype) {\r\n\t\tlet self = this;\r\n\t\tif (!this.state.focusedWorkspace) return;\r\n\t\tfunction setPreference() {\r\n\t\t\tFSBL.Clients.ConfigClient.setPreference(\r\n\t\t\t\t{\r\n\t\t\t\t\tfield: \"finsemble.initialWorkspace\",\r\n\t\t\t\t\tvalue: self.state.workspaceToLoadOnStart,\r\n\t\t\t\t},\r\n\t\t\t\t(err, data) => {\r\n\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\tconsole.error(err);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (typeof cb === \"function\") {\r\n\t\t\t\t\t\tcb();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t\tif (this.state.focusedWorkspace === this.state.workspaceToLoadOnStart) {\r\n\t\t\tthis.setState({ workspaceToLoadOnStart: null }, setPreference);\r\n\t\t} else {\r\n\t\t\tself.setState(\r\n\t\t\t\t{\r\n\t\t\t\t\tworkspaceToLoadOnStart: self.state.focusedWorkspace,\r\n\t\t\t\t},\r\n\t\t\t\tsetPreference\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\topenFileDialog() {\r\n\t\t// Set alwaysOnTop to false and add an event listener on the window. When focus is regained\r\n\t\t// then reset always on top\r\n\t\tthis.changePreferencesAlwaysOnTop(false);\r\n\t\tfinsembleWindow.addEventListener(\"focused\", this.preferencesFocused);\r\n\t\tlet inputElement = document.getElementById(\"file-input\");\r\n\t\tinputElement.addEventListener(\"change\", this.importWorkspace, false);\r\n\t\tinputElement.click();\r\n\t}\r\n\r\n\t/**\r\n\t * If the event is being listened to, when the preferences component is focused\r\n\t * it will set always on top to true, and remove the event listener\r\n\t *\r\n\t * This is to handle bringing alwaysOnTop back to true when file dialogs are closed\r\n\t * without changes (also handles bringing back to front after exporting)\r\n\t */\r\n\tpreferencesFocused() {\r\n\t\tfinsembleWindow.removeEventListener(\"focused\", this.preferencesFocused);\r\n\t\tthis.changePreferencesAlwaysOnTop(true);\r\n\t}\r\n\r\n\timportWorkspace(evt) {\r\n\t\tlet inputElement = document.getElementById(\"file-input\");\r\n\t\tinputElement.removeEventListener(\"change\", this.importWorkspace);\r\n\t\tvar { files } = evt.target; // FileList object\r\n\r\n\t\tfunction loadFile(file, done) {\r\n\t\t\tlet reader = new FileReader();\r\n\t\t\tlet fileName = evt.target.value;\r\n\t\t\t// When the file info is loaded, we get into here..\r\n\t\t\treader.onload = function (e) {\r\n\t\t\t\tfileName = fileName.split(\"\\\\\");\r\n\t\t\t\tfileName = fileName[fileName.length - 1].replace(\".json\", \"\");\r\n\t\t\t\tlet workspaceTemplateDefinition = JSON.parse(e.target.result);\r\n\t\t\t\tlet templateName = Object.keys(workspaceTemplateDefinition.workspaceTemplates)[0];\r\n\t\t\t\tif (fileName !== templateName) {\r\n\t\t\t\t\t// We want the file name to overwrite the name of the workspace that was saved as the template..\r\n\t\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[fileName] =\r\n\t\t\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[templateName];\r\n\t\t\t\t\tdelete workspaceTemplateDefinition.workspaceTemplates[templateName];\r\n\t\t\t\t}\r\n\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[fileName].name = fileName;\r\n\t\t\t\tFSBL.Clients.WorkspaceClient.addWorkspaceDefinition(\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tworkspaceJSONDefinition: workspaceTemplateDefinition.workspaceTemplates,\r\n\t\t\t\t\t\tforce: false,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t(err) => {\r\n\t\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\t\tFSBL.Clients.Logger.info(\"addWorkspaceTemplateDefinition error\", err);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdone();\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t};\r\n\r\n\t\t\t// Read in the image file as a data URL.\r\n\t\t\treader.readAsText(file);\r\n\t\t}\r\n\r\n\t\tasync.each(files, loadFile, () => {\r\n\t\t\t// Clear out files. so if the user imports the same file back-to-back, the event will fire.\r\n\t\t\tinputElement.value = \"\";\r\n\t\t\tFSBL.Clients.Logger.info(\"Workspaces imported\");\r\n\t\t});\r\n\t}\r\n\r\n\texportWorkspace() {\r\n\t\tif (this.state.focusedWorkspace === \"\") return;\r\n\t\tvar self = this;\r\n\t\tfunction doExport() {\r\n\t\t\tFSBL.Clients.WorkspaceClient.getWorkspaceDefinition(\r\n\t\t\t\t{ workspaceName: self.state.focusedWorkspace },\r\n\t\t\t\t(err, workspaceDefinition) => {\r\n\t\t\t\t\tif (err) {\r\n\t\t\t\t\t\tFSBL.Clients.Logger.error(\"getWorkspaceDefinition error\", err);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// We're saving using a routine initially created for templates. The outcome is the same and it probably should have just been \"Save to file\". This bool is to allow it to save.\r\n\t\t\t\t\t\tFSBL.ConfigUtils.promptAndSaveJSONToLocalFile(self.state.focusedWorkspace, {\r\n\t\t\t\t\t\t\tworkspaceTemplates: workspaceDefinition,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Set alwaysOnTop to false and add an event listener on the window. When focus is regained\r\n\t\t// then reset always on top\r\n\t\tself.changePreferencesAlwaysOnTop(false);\r\n\t\tfinsembleWindow.addEventListener(\"focused\", this.preferencesFocused);\r\n\t\t// If we're autosaving, autosave, then export.\r\n\t\t// @todo, put into store. consider moving autosave into workspaceClient.\r\n\t\tFSBL.Clients.ConfigClient.getValue(\r\n\t\t\t{\r\n\t\t\t\tfield: \"finsemble.preferences.workspaceService.promptUserOnDirtyWorkspace\",\r\n\t\t\t},\r\n\t\t\t(err, data) => {\r\n\t\t\t\t// default to false.\r\n\t\t\t\tlet PROMPT_ON_SAVE = data === null ? false : data;\r\n\t\t\t\tif (!PROMPT_ON_SAVE) {\r\n\t\t\t\t\tlet activeName = FSBL.Clients.WorkspaceClient.activeWorkspace.name;\r\n\t\t\t\t\treturn FSBL.Clients.WorkspaceClient.saveAs(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tname: activeName,\r\n\t\t\t\t\t\t\tforce: true,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t(err, response) => {\r\n\t\t\t\t\t\t\tdoExport();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\tdoExport();\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\thandleButtonClicks(e) {\r\n\t\tif (this.state.adding || this.state.editing) {\r\n\t\t\te.preventDefault();\r\n\t\t}\r\n\t}\r\n\r\n\tgetFocusedWorkspaceComponentList() {\r\n\t\tlet { workspaceList, focusedWorkspace } = this.state;\r\n\t\tif (focusedWorkspace === \"\") return [];\r\n\t\tlet workspace = workspaceList.filter((wSpace) => wSpace.name === focusedWorkspace)[0];\r\n\r\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceDefinition(\r\n\t\t\t{ workspaceName: focusedWorkspace },\r\n\t\t\t(err, workspaceDefinition) => {\r\n\t\t\t\tlet componentTypes = workspace?.components;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcomponentTypes = this.getComponentTypes(workspaceDefinition[focusedWorkspace]);\r\n\t\t\t\t} catch (err) {\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tfocusedWorkspaceComponentList: componentTypes,\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\r\n\trender() {\r\n\t\tlet deleteButtonClasses = \"individual-workspace-action delete-workspace\",\r\n\t\t\texportButtonClasses = \"action-button workspace-action-button\",\r\n\t\t\trenameButtonClasses = \"individual-workspace-action\",\r\n\t\t\taddButtonClasses = \"positive-action-button action-button workspace-action-button\",\r\n\t\t\timportButtonClasses = \"action-button workspace-action-button\",\r\n\t\t\tallowAdd = true,\r\n\t\t\tallowDelete = true,\r\n\t\t\tallowExport = true,\r\n\t\t\tallowRename = true,\r\n\t\t\tallowImport = true,\r\n\t\t\tdeleteTooltip = \"Delete\";\r\n\r\n\t\tif (this.state.focusedWorkspace === FSBL.Clients.WorkspaceClient.activeWorkspace.name) {\r\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-individual-workspace-action`;\r\n\t\t}\r\n\r\n\t\tif (this.state.focusedWorkspace === \"\") {\r\n\t\t\texportButtonClasses = `${exportButtonClasses} disabled-button`;\r\n\t\t\trenameButtonClasses = `${renameButtonClasses} disabled-individual-workspace-action`;\r\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-individual-workspace-action`;\r\n\t\t\tdeleteTooltip = \"No workspace selected\";\r\n\t\t\tallowRename = false;\r\n\t\t\tallowExport = false;\r\n\t\t\tallowDelete = false;\r\n\t\t}\r\n\r\n\t\tif (this.state.adding || this.state.editing) {\r\n\t\t\trenameButtonClasses = `${renameButtonClasses} disabled-button`;\r\n\t\t\taddButtonClasses = `${addButtonClasses} disabled-button`;\r\n\t\t\texportButtonClasses = `${exportButtonClasses} disabled-button`;\r\n\t\t\timportButtonClasses = `${importButtonClasses} disabled-button`;\r\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-button`;\r\n\t\t\tallowAdd = false;\r\n\t\t\tallowDelete = false;\r\n\t\t\tallowExport = false;\r\n\t\t\tallowRename = false;\r\n\t\t\tallowImport = false;\r\n\t\t}\r\n\r\n\t\tlet addTooltip = \"Add a workspace\",\r\n\t\t\timportTooltip = \"Import workspace from file\",\r\n\t\t\texportTooltip = allowExport ? \"Export selected workspace\" : \"No workspace selected\",\r\n\t\t\trenameTooltip = allowRename ? \"Rename\" : \"Cannot Edit\";\r\n\r\n\t\treturn (\r\n\t\t\t<div style={{ paddingLeft: 10 }}>\r\n\t\t\t\t<input style={{ display: \"none\" }} type=\"file\" id=\"file-input\" />\r\n\t\t\t\t<div className=\"complex-menu-content-row\">\r\n\t\t\t\t\t<div className=\"workspace-list-header-row\">\r\n\t\t\t\t\t\t<div className=\"content-section-header workspace-list-header\"></div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div className=\"content-section-wrapper\">\r\n\t\t\t\t\t\t<WorkspaceItemList\r\n\t\t\t\t\t\t\tonDragEnd={this.onDragEnd}\r\n\t\t\t\t\t\t\tworkspaceList={this.state.workspaceList}\r\n\t\t\t\t\t\t\tallowDelete={allowDelete}\r\n\t\t\t\t\t\t\tdeleteButtonClasses={deleteButtonClasses}\r\n\t\t\t\t\t\t\tdeleteTooltip={deleteTooltip}\r\n\t\t\t\t\t\t\tworkspaceToLoadOnStart={this.state.workspaceToLoadOnStart}\r\n\t\t\t\t\t\t\tfocusedWorkspace={this.state.focusedWorkspace}\r\n\t\t\t\t\t\t\tediting={this.state.editing}\r\n\t\t\t\t\t\t\tadding={this.state.adding}\r\n\t\t\t\t\t\t\trenameWorkspace={this.renameWorkspace}\r\n\t\t\t\t\t\t\taddWorkspace={this.addWorkspace}\r\n\t\t\t\t\t\t\tcancelEdit={this.cancelEdit}\r\n\t\t\t\t\t\t\tsetFocusedWorkspace={this.setFocusedWorkspace}\r\n\t\t\t\t\t\t\trenameTooltip={renameTooltip}\r\n\t\t\t\t\t\t\trenameButtonClasses={renameButtonClasses}\r\n\t\t\t\t\t\t\tallowRename={allowRename}\r\n\t\t\t\t\t\t\thandleButtonClicks={this.handleButtonClicks}\r\n\t\t\t\t\t\t\tstartEditingWorkspace={this.startEditingWorkspace}\r\n\t\t\t\t\t\t\tdeleteWorkspace={this.deleteWorkspace}\r\n\t\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\t<div className=\"workspace-extras\">\r\n\t\t\t\t\t\t\t<WorkspaceComponents focusedWorkspaceComponentList={this.state.focusedWorkspaceComponentList} />\r\n\t\t\t\t\t\t\t<div className=\"workspace-action-buttons\">\r\n\t\t\t\t\t\t\t\t<WorkspaceButton\r\n\t\t\t\t\t\t\t\t\ttitle={importTooltip}\r\n\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\r\n\t\t\t\t\t\t\t\t\tonClick={allowImport ? this.openFileDialog : Function.prototype}\r\n\t\t\t\t\t\t\t\t\ttype=\"import\"\r\n\t\t\t\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\t\t\t<WorkspaceButton\r\n\t\t\t\t\t\t\t\t\ttitle={exportTooltip}\r\n\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\r\n\t\t\t\t\t\t\t\t\tonClick={allowExport ? this.exportWorkspace : Function.prototype}\r\n\t\t\t\t\t\t\t\t\ttype=\"export\"\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<Checkbox\r\n\t\t\t\t\t\tdisabled={!this.state.focusedWorkspace}\r\n\t\t\t\t\t\tonClick={this.setWorkspaceToLoadOnStart}\r\n\t\t\t\t\t\tchecked={this.state.focusedWorkspace === this.state.workspaceToLoadOnStart}\r\n\t\t\t\t\t\tlabel=\"Load this workspace on startup\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n"]}
@@ -1,7 +1,8 @@
1
1
  import React, { useContext, useEffect, useState } from "react";
2
2
  import { NotificationsPreferencesContext } from "../../../NotificationsPreferencesContext";
3
- import Checkbox from "../../Checkbox";
3
+ import { Checkbox } from "../../../../common/Checkbox";
4
4
  import DefaultDropdownButton from "../../../../shared/DefaultDropdownButton";
5
+ import ButtonRow from "../../../../common/ButtonRow";
5
6
  import { loadSources } from "./notificationViewsUtils";
6
7
  const PREFERENCE_PATH_KEY = "finsemble.servicesConfig.notifications.userPreferences";
7
8
  const NOTIFICATIONS_PREFERENCES_KEYS = {
@@ -11,30 +12,47 @@ const NOTIFICATIONS_PREFERENCES_KEYS = {
11
12
  DEFAULT_SNOOZE_PERIOD_SECONDS: "defaultSnoozePeriodSeconds",
12
13
  NEW_NOTIFICATION_HALO_PERIOD_SECONDS: "newNotificationHaloPeriodSeconds",
13
14
  };
15
+ const setAndTransmitPreferenceChange = (preferenceKey, value) => {
16
+ FSBL.Clients.ConfigClient.setPreference({
17
+ field: `${PREFERENCE_PATH_KEY}.${preferenceKey}`,
18
+ value,
19
+ }, (err) => {
20
+ if (err) {
21
+ FSBL.Clients.Logger.error(`Error setting preference from Notifications Preferences Home Component - preference: ${preferenceKey} - value: ${value} `, err);
22
+ }
23
+ else {
24
+ FSBL.Clients.RouterClient.transmit("FinsembleUserPreferencesChannel", {
25
+ notificationPreferences: {
26
+ [preferenceKey]: value,
27
+ },
28
+ });
29
+ }
30
+ });
31
+ };
14
32
  const informationalToastDuration = [
15
33
  {
16
- optionLabel: "10 Seconds",
34
+ optionLabel: "10 seconds",
17
35
  optionValue: 10,
18
36
  clickHandler: () => {
19
37
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS, 10);
20
38
  },
21
39
  },
22
40
  {
23
- optionLabel: "30 Seconds",
41
+ optionLabel: "30 seconds",
24
42
  optionValue: 30,
25
43
  clickHandler: () => {
26
44
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS, 30);
27
45
  },
28
46
  },
29
47
  {
30
- optionLabel: "45 Seconds",
48
+ optionLabel: "45 seconds",
31
49
  optionValue: 45,
32
50
  clickHandler: () => {
33
51
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS, 45);
34
52
  },
35
53
  },
36
54
  {
37
- optionLabel: "60 Seconds",
55
+ optionLabel: "60 seconds",
38
56
  optionValue: 60,
39
57
  clickHandler: () => {
40
58
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS, 60);
@@ -43,28 +61,28 @@ const informationalToastDuration = [
43
61
  ];
44
62
  const snoozeDuration = [
45
63
  {
46
- optionLabel: "5 Minutes",
64
+ optionLabel: "5 minutes",
47
65
  optionValue: 300,
48
66
  clickHandler: () => {
49
67
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 300);
50
68
  },
51
69
  },
52
70
  {
53
- optionLabel: "10 Minutes",
71
+ optionLabel: "10 minutes",
54
72
  optionValue: 600,
55
73
  clickHandler: () => {
56
74
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 600);
57
75
  },
58
76
  },
59
77
  {
60
- optionLabel: "20 Minutes",
78
+ optionLabel: "20 minutes",
61
79
  optionValue: 1200,
62
80
  clickHandler: () => {
63
81
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 1200);
64
82
  },
65
83
  },
66
84
  {
67
- optionLabel: "30 Minutes",
85
+ optionLabel: "30 minutes",
68
86
  optionValue: 1800,
69
87
  clickHandler: () => {
70
88
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 1800);
@@ -73,51 +91,34 @@ const snoozeDuration = [
73
91
  ];
74
92
  const newNotificationsHalo = [
75
93
  {
76
- optionLabel: "30 Seconds",
94
+ optionLabel: "30 seconds",
77
95
  optionValue: 30,
78
96
  clickHandler: () => {
79
97
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 30);
80
98
  },
81
99
  },
82
100
  {
83
- optionLabel: "1 Minute",
101
+ optionLabel: "1 minute",
84
102
  optionValue: 60,
85
103
  clickHandler: () => {
86
104
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 60);
87
105
  },
88
106
  },
89
107
  {
90
- optionLabel: "3 Minutes",
108
+ optionLabel: "3 minutes",
91
109
  optionValue: 180,
92
110
  clickHandler: () => {
93
111
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 180);
94
112
  },
95
113
  },
96
114
  {
97
- optionLabel: "5 Minutes",
115
+ optionLabel: "5 minutes",
98
116
  optionValue: 600,
99
117
  clickHandler: () => {
100
118
  setAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 600);
101
119
  },
102
120
  },
103
121
  ];
104
- const setAndTransmitPreferenceChange = (preferenceKey, value) => {
105
- FSBL.Clients.ConfigClient.setPreference({
106
- field: `${PREFERENCE_PATH_KEY}.${preferenceKey}`,
107
- value,
108
- }, (err) => {
109
- if (err) {
110
- FSBL.Clients.Logger.error(`Error setting preference from Notifications Preferences Home Component - preference: ${preferenceKey} - value: ${value} `, err);
111
- }
112
- else {
113
- FSBL.Clients.RouterClient.transmit("FinsembleUserPreferencesChannel", {
114
- notificationPreferences: {
115
- [preferenceKey]: value,
116
- },
117
- });
118
- }
119
- });
120
- };
121
122
  const NotificationsMainPreferences = () => {
122
123
  const notificationsPreferencesContext = useContext(NotificationsPreferencesContext);
123
124
  const { notificationSources, setNotificationSources, setSelectedNotificationSource, setCurrentNotificationsPreferencesView, } = notificationsPreferencesContext;
@@ -148,9 +149,12 @@ const NotificationsMainPreferences = () => {
148
149
  FSBL.Clients.RouterClient.removeListener("FinsembleNotificationsPreferencesChannel", listenForRefreshEvent);
149
150
  };
150
151
  }, []);
151
- useEffect(() => {
152
- loadSources(setNotificationSources, setReloadSources);
153
- }, [notificationSources.length == 0, reloadSources]);
152
+ {
153
+ notificationSources &&
154
+ useEffect(() => {
155
+ loadSources(setNotificationSources, setReloadSources);
156
+ }, [notificationSources.length == 0, reloadSources]);
157
+ }
154
158
  useEffect(() => {
155
159
  function navigateToSourceDetail(err, response) {
156
160
  const { data } = response;
@@ -166,50 +170,41 @@ const NotificationsMainPreferences = () => {
166
170
  };
167
171
  }, [notificationSources]);
168
172
  const toggleNotificationDot = () => {
169
- setNotificationPreferences((prevState) => ({
170
- ...prevState,
171
- disableDotOnToolbarIcon: !notificationPreferences.disableDotOnToolbarIcon,
172
- }));
173
+ setNotificationPreferences((prevState) => {
174
+ return Object.assign(Object.assign({}, prevState), { disableDotOnToolbarIcon: !notificationPreferences.disableDotOnToolbarIcon });
175
+ });
173
176
  setAndTransmitPreferenceChange("disableDotOnToolbarIcon", !notificationPreferences.disableDotOnToolbarIcon);
174
177
  };
175
178
  const toggleActionableNotificationToast = () => {
176
- setNotificationPreferences((prevState) => ({
177
- ...prevState,
178
- toastTimeoutOnActionableNotifications: !notificationPreferences.toastTimeoutOnActionableNotifications,
179
- }));
179
+ setNotificationPreferences((prevState) => {
180
+ return Object.assign(Object.assign({}, prevState), { toastTimeoutOnActionableNotifications: !notificationPreferences.toastTimeoutOnActionableNotifications });
181
+ });
180
182
  setAndTransmitPreferenceChange("toastTimeoutOnActionableNotifications", !notificationPreferences.toastTimeoutOnActionableNotifications);
181
183
  };
182
184
  const toggleNotificationDotForMutedNotifications = () => {
183
- setNotificationPreferences((prevState) => ({
184
- ...prevState,
185
- showDotOnToolbarIconForMutedNotifications: !notificationPreferences.showDotOnToolbarIconForMutedNotifications,
186
- }));
185
+ setNotificationPreferences((prevState) => {
186
+ return Object.assign(Object.assign({}, prevState), { showDotOnToolbarIconForMutedNotifications: !notificationPreferences.showDotOnToolbarIconForMutedNotifications });
187
+ });
187
188
  setAndTransmitPreferenceChange("showDotOnToolbarIconForMutedNotifications", !notificationPreferences.showDotOnToolbarIconForMutedNotifications);
188
189
  };
189
190
  return (React.createElement(React.Fragment, null,
190
191
  React.createElement("div", { className: "row-section" },
191
- React.createElement("div", { className: "row-btn", role: "button", tabIndex: 0, onClick: () => setCurrentNotificationsPreferencesView("Sources"), onKeyDown: (e) => {
192
- if (e.key === "Enter" || e.key === " ") {
193
- setCurrentNotificationsPreferencesView("Sources");
194
- }
195
- } },
196
- React.createElement("span", { className: "row__lbl" }, "Notification Sources"),
197
- React.createElement("i", { className: "ff-caret-up rotate-90" }))),
192
+ React.createElement(ButtonRow, { label: "Notification sources", onClick: () => setCurrentNotificationsPreferencesView("Sources"), iconClass: "ff-caret-up rotate-90" })),
198
193
  React.createElement("div", { className: "row-section" },
199
- React.createElement(Checkbox, { onClick: toggleNotificationDot, checked: !notificationPreferences.disableDotOnToolbarIcon, label: "Show Notification Dot for new notifications" })),
194
+ React.createElement(Checkbox, { onClick: toggleNotificationDot, checked: !notificationPreferences.disableDotOnToolbarIcon, label: "Show notification dot for new notifications" })),
200
195
  React.createElement("div", { className: "row-section" },
201
- React.createElement(Checkbox, { disabled: notificationPreferences.disableDotOnToolbarIcon, onClick: toggleNotificationDotForMutedNotifications, checked: notificationPreferences.showDotOnToolbarIconForMutedNotifications, label: "Show Notification Dot for notifications marked as \u201CDon\u2019t Show\u201D" })),
196
+ React.createElement(Checkbox, { disabled: notificationPreferences.disableDotOnToolbarIcon, onClick: toggleNotificationDotForMutedNotifications, checked: notificationPreferences.showDotOnToolbarIconForMutedNotifications, label: "Show notification dot for notifications marked as \u201CDon\u2019t show\u201D" })),
202
197
  React.createElement("div", { className: "row-section" },
203
- React.createElement(Checkbox, { onClick: toggleActionableNotificationToast, checked: notificationPreferences.toastTimeoutOnActionableNotifications, label: "Enable Toast Timeouts on Actionable Notifications" })),
198
+ React.createElement(Checkbox, { onClick: toggleActionableNotificationToast, checked: notificationPreferences.toastTimeoutOnActionableNotifications, label: "Enable toast timeouts on actionable notifications" })),
204
199
  React.createElement("div", { className: "row-section" },
205
- React.createElement("span", { className: "row__lbl" }, "Toast Timeout Duration"),
206
- React.createElement(DefaultDropdownButton, { allowEmpty: false, classNames: "push-right", caretLocation: "right", defaultSelection: informationalToastDuration.find((element) => element.optionValue === notificationPreferences.informationalNotificationToastPeriodSeconds), buttonOptions: informationalToastDuration })),
200
+ React.createElement("span", { className: "row__lbl" }, "Toast times out after"),
201
+ React.createElement(DefaultDropdownButton, { allowEmpty: false, caretLocation: "right", defaultSelection: informationalToastDuration.find((element) => element.optionValue === notificationPreferences.informationalNotificationToastPeriodSeconds), buttonOptions: informationalToastDuration })),
207
202
  React.createElement("div", { className: "row-section" },
208
- React.createElement("span", { className: "row__lbl" }, "Snooze Duration"),
209
- React.createElement(DefaultDropdownButton, { allowEmpty: false, classNames: "push-right", caretLocation: "right", defaultSelection: snoozeDuration.find((element) => element.optionValue === notificationPreferences.defaultSnoozePeriodSeconds), buttonOptions: snoozeDuration })),
203
+ React.createElement("span", { className: "row__lbl" }, "Snooze for"),
204
+ React.createElement(DefaultDropdownButton, { allowEmpty: false, caretLocation: "right", defaultSelection: snoozeDuration.find((element) => element.optionValue === notificationPreferences.defaultSnoozePeriodSeconds), buttonOptions: snoozeDuration })),
210
205
  React.createElement("div", { className: "row-section" },
211
- React.createElement("span", { className: "row__lbl" }, "New Notification Halo Duration"),
212
- React.createElement(DefaultDropdownButton, { allowEmpty: false, classNames: "push-right", caretLocation: "right", defaultSelection: newNotificationsHalo.find((element) => element.optionValue === notificationPreferences.newNotificationHaloPeriodSeconds), buttonOptions: newNotificationsHalo }))));
206
+ React.createElement("span", { className: "row__lbl" }, "Turn off the new notification halo after"),
207
+ React.createElement(DefaultDropdownButton, { allowEmpty: false, caretLocation: "right", defaultSelection: newNotificationsHalo.find((element) => element.optionValue === notificationPreferences.newNotificationHaloPeriodSeconds), buttonOptions: newNotificationsHalo }))));
213
208
  };
214
209
  export default NotificationsMainPreferences;
215
210
  //# sourceMappingURL=NotificationsPreferencesHome.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsPreferencesHome.js","sourceRoot":"","sources":["../../../../../../src/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAG3F,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,qBAEN,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,mBAAmB,GAAG,wDAAwD,CAAC;AACrF,MAAM,8BAA8B,GAAG;IACtC,2BAA2B,EAAE,yBAAyB;IACtD,4CAA4C,EAAE,2CAA2C;IACzF,+CAA+C,EAAE,6CAA6C;IAC9F,6BAA6B,EAAE,4BAA4B;IAC3D,oCAAoC,EAAE,kCAAkC;CACxE,CAAC;AAEF,MAAM,0BAA0B,GAAkD;IACjF;QACC,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,GAAG,EAAE;YAClB,8BAA8B,CAC7B,8BAA8B,CAAC,+CAA+C,EAC9E,EAAE,CACF,CAAC;QACH,CAAC;KACD;IACD;QACC,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,GAAG,EAAE;YAClB,8BAA8B,CAC7B,8BAA8B,CAAC,+CAA+C,EAC9E,EAAE,CACF,CAAC;QACH,CAAC;KACD;IACD;QACC,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,GAAG,EAAE;YAClB,8BAA8B,CAC7B,8BAA8B,CAAC,+CAA+C,EAC9E,EAAE,CACF,CAAC;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;YACxD,oBAAC,qBAAqB,IACrB,UAAU,EAAE,KAAK,EACjB,UAAU,EAAE,YAAY,EACxB,aAAa,EAAC,OAAO,EACrB,gBAAgB,EAAE,0BAA0B,CAAC,IAAI,CAChD,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,KAAK,uBAAuB,CAAC,2CAA2C,CACxG,EACD,aAAa,EAAE,0BAA0B,GACxC,CACG;QACN,6BAAK,SAAS,EAAC,aAAa;YAC3B,8BAAM,SAAS,EAAC,UAAU,sBAAuB;YACjD,oBAAC,qBAAqB,IACrB,UAAU,EAAE,KAAK,EACjB,UAAU,EAAE,YAAY,EACxB,aAAa,EAAC,OAAO,EACrB,gBAAgB,EAAE,cAAc,CAAC,IAAI,CACpC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,KAAK,uBAAuB,CAAC,0BAA0B,CACvF,EACD,aAAa,EAAE,cAAc,GAC5B,CACG;QACN,6BAAK,SAAS,EAAC,aAAa;YAC3B,8BAAM,SAAS,EAAC,UAAU,qCAAsC;YAChE,oBAAC,qBAAqB,IACrB,UAAU,EAAE,KAAK,EACjB,UAAU,EAAE,YAAY,EACxB,aAAa,EAAC,OAAO,EACrB,gBAAgB,EAAE,oBAAoB,CAAC,IAAI,CAC1C,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,KAAK,uBAAuB,CAAC,gCAAgC,CAC7F,EACD,aAAa,EAAE,oBAAoB,GAClC,CACG,CACJ,CACH,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import React, { useContext, useEffect, useState } from \"react\";\r\n\r\n// Context\r\nimport { NotificationsPreferencesContext } from \"../../../NotificationsPreferencesContext\";\r\n\r\n// Components\r\nimport Checkbox from \"../../Checkbox\";\r\nimport DefaultDropdownButton, {\r\n\tIFinsembleDefaultDropdownButtonOptionsProps,\r\n} from \"../../../../shared/DefaultDropdownButton\";\r\n\r\n// Utils\r\nimport { loadSources } from \"./notificationViewsUtils\";\r\n\r\nconst PREFERENCE_PATH_KEY = \"finsemble.servicesConfig.notifications.userPreferences\";\r\nconst NOTIFICATIONS_PREFERENCES_KEYS = {\r\n\tDISABLE_DOT_ON_TOOLBAR_ICON: \"disableDotOnToolbarIcon\",\r\n\tSHOW_DOT_ON_TOOLBAR_ICON_MUTED_NOTIFICATIONS: \"showDotOnToolbarIconForMutedNotifications\",\r\n\tINFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS: \"informationalNotificationToastPeriodSeconds\",\r\n\tDEFAULT_SNOOZE_PERIOD_SECONDS: \"defaultSnoozePeriodSeconds\",\r\n\tNEW_NOTIFICATION_HALO_PERIOD_SECONDS: \"newNotificationHaloPeriodSeconds\",\r\n};\r\n\r\nconst informationalToastDuration: IFinsembleDefaultDropdownButtonOptionsProps[] = [\r\n\t{\r\n\t\toptionLabel: \"10 Seconds\",\r\n\t\toptionValue: 10,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\tNOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS,\r\n\t\t\t\t10\r\n\t\t\t);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"30 Seconds\",\r\n\t\toptionValue: 30,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\tNOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS,\r\n\t\t\t\t30\r\n\t\t\t);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"45 Seconds\",\r\n\t\toptionValue: 45,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\tNOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS,\r\n\t\t\t\t45\r\n\t\t\t);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"60 Seconds\",\r\n\t\toptionValue: 60,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\tNOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS,\r\n\t\t\t\t60\r\n\t\t\t);\r\n\t\t},\r\n\t},\r\n];\r\n\r\nconst snoozeDuration: IFinsembleDefaultDropdownButtonOptionsProps[] = [\r\n\t{\r\n\t\toptionLabel: \"5 Minutes\",\r\n\t\toptionValue: 300,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 300);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"10 Minutes\",\r\n\t\toptionValue: 600,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 600);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"20 Minutes\",\r\n\t\toptionValue: 1200,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 1200);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"30 Minutes\",\r\n\t\toptionValue: 1800,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 1800);\r\n\t\t},\r\n\t},\r\n];\r\n\r\nconst newNotificationsHalo: IFinsembleDefaultDropdownButtonOptionsProps[] = [\r\n\t{\r\n\t\toptionLabel: \"30 Seconds\",\r\n\t\toptionValue: 30,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 30);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"1 Minute\",\r\n\t\toptionValue: 60,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 60);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"3 Minutes\",\r\n\t\toptionValue: 180,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 180);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"5 Minutes\",\r\n\t\toptionValue: 600,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 600);\r\n\t\t},\r\n\t},\r\n];\r\n\r\nconst setAndTransmitPreferenceChange = (preferenceKey: string, value: any) => {\r\n\tFSBL.Clients.ConfigClient.setPreference(\r\n\t\t{\r\n\t\t\tfield: `${PREFERENCE_PATH_KEY}.${preferenceKey}`,\r\n\t\t\tvalue,\r\n\t\t},\r\n\t\t(err) => {\r\n\t\t\tif (err) {\r\n\t\t\t\tFSBL.Clients.Logger.error(\r\n\t\t\t\t\t`Error setting preference from Notifications Preferences Home Component - preference: ${preferenceKey} - value: ${value} `,\r\n\t\t\t\t\terr\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\r\n\t\t\t\t\tnotificationPreferences: {\r\n\t\t\t\t\t\t[preferenceKey]: value,\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n};\r\n\r\nconst NotificationsMainPreferences: React.FunctionComponent = () => {\r\n\tconst notificationsPreferencesContext = useContext(NotificationsPreferencesContext);\r\n\tconst {\r\n\t\tnotificationSources,\r\n\t\tsetNotificationSources,\r\n\t\tsetSelectedNotificationSource,\r\n\t\tsetCurrentNotificationsPreferencesView,\r\n\t} = notificationsPreferencesContext;\r\n\r\n\tconst [reloadSources, setReloadSources] = useState(false);\r\n\r\n\tconst [notificationPreferences, setNotificationPreferences] = useState<any>({});\r\n\r\n\tuseEffect(() => {\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetNotificationPreferences(preferences);\r\n\t\t});\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction listenForRefreshEvent(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleNotificationsPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (data === \"notificationReceived\") {\r\n\t\t\t\t\tsetReloadSources(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsPreferencesChannel\", listenForRefreshEvent);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsPreferencesChannel\", listenForRefreshEvent);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tloadSources(setNotificationSources, setReloadSources);\r\n\t}, [notificationSources.length == 0, reloadSources]);\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction navigateToSourceDetail(err: any, response: any) {\r\n\t\t\tconst { data } = response;\r\n\t\t\tif (data.notification) {\r\n\t\t\t\tconst selectedSource = notificationSources.find((source) => source.source === data.notification.source) || null;\r\n\t\t\t\tsetSelectedNotificationSource(selectedSource);\r\n\t\t\t\tsetCurrentNotificationsPreferencesView(\"Details\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsNavigationChannel\", navigateToSourceDetail);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsNavigationChannel\", navigateToSourceDetail);\r\n\t\t};\r\n\t}, [notificationSources]);\r\n\r\n\tconst toggleNotificationDot = () => {\r\n\t\tsetNotificationPreferences((prevState: any) => ({\r\n\t\t\t...prevState,\r\n\t\t\tdisableDotOnToolbarIcon: !notificationPreferences.disableDotOnToolbarIcon,\r\n\t\t}));\r\n\t\tsetAndTransmitPreferenceChange(\"disableDotOnToolbarIcon\", !notificationPreferences.disableDotOnToolbarIcon);\r\n\t};\r\n\r\n\tconst toggleActionableNotificationToast = () => {\r\n\t\tsetNotificationPreferences((prevState: any) => ({\r\n\t\t\t...prevState,\r\n\t\t\ttoastTimeoutOnActionableNotifications: !notificationPreferences.toastTimeoutOnActionableNotifications,\r\n\t\t}));\r\n\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\"toastTimeoutOnActionableNotifications\",\r\n\t\t\t!notificationPreferences.toastTimeoutOnActionableNotifications\r\n\t\t);\r\n\t};\r\n\r\n\tconst toggleNotificationDotForMutedNotifications = () => {\r\n\t\tsetNotificationPreferences((prevState: any) => ({\r\n\t\t\t...prevState,\r\n\t\t\tshowDotOnToolbarIconForMutedNotifications: !notificationPreferences.showDotOnToolbarIconForMutedNotifications,\r\n\t\t}));\r\n\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\"showDotOnToolbarIconForMutedNotifications\",\r\n\t\t\t!notificationPreferences.showDotOnToolbarIconForMutedNotifications\r\n\t\t);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclassName=\"row-btn\"\r\n\t\t\t\t\trole=\"button\"\r\n\t\t\t\t\ttabIndex={0}\r\n\t\t\t\t\tonClick={() => setCurrentNotificationsPreferencesView(\"Sources\")}\r\n\t\t\t\t\tonKeyDown={(e) => {\r\n\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\r\n\t\t\t\t\t\t\tsetCurrentNotificationsPreferencesView(\"Sources\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t<span className=\"row__lbl\">Notification Sources</span>\r\n\t\t\t\t\t<i className=\"ff-caret-up rotate-90\" />\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<Checkbox\r\n\t\t\t\t\tonClick={toggleNotificationDot}\r\n\t\t\t\t\tchecked={!notificationPreferences.disableDotOnToolbarIcon}\r\n\t\t\t\t\tlabel=\"Show Notification Dot for new notifications\"\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<Checkbox\r\n\t\t\t\t\tdisabled={notificationPreferences.disableDotOnToolbarIcon}\r\n\t\t\t\t\tonClick={toggleNotificationDotForMutedNotifications}\r\n\t\t\t\t\tchecked={notificationPreferences.showDotOnToolbarIconForMutedNotifications}\r\n\t\t\t\t\tlabel=\"Show Notification Dot for notifications marked as “Don’t Show”\"\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<Checkbox\r\n\t\t\t\t\tonClick={toggleActionableNotificationToast}\r\n\t\t\t\t\tchecked={notificationPreferences.toastTimeoutOnActionableNotifications}\r\n\t\t\t\t\tlabel=\"Enable Toast Timeouts on Actionable Notifications\"\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<span className=\"row__lbl\">Toast Timeout Duration</span>\r\n\t\t\t\t<DefaultDropdownButton\r\n\t\t\t\t\tallowEmpty={false}\r\n\t\t\t\t\tclassNames={\"push-right\"}\r\n\t\t\t\t\tcaretLocation=\"right\"\r\n\t\t\t\t\tdefaultSelection={informationalToastDuration.find(\r\n\t\t\t\t\t\t(element) => element.optionValue === notificationPreferences.informationalNotificationToastPeriodSeconds\r\n\t\t\t\t\t)}\r\n\t\t\t\t\tbuttonOptions={informationalToastDuration}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<span className=\"row__lbl\">Snooze Duration</span>\r\n\t\t\t\t<DefaultDropdownButton\r\n\t\t\t\t\tallowEmpty={false}\r\n\t\t\t\t\tclassNames={\"push-right\"}\r\n\t\t\t\t\tcaretLocation=\"right\"\r\n\t\t\t\t\tdefaultSelection={snoozeDuration.find(\r\n\t\t\t\t\t\t(element) => element.optionValue === notificationPreferences.defaultSnoozePeriodSeconds\r\n\t\t\t\t\t)}\r\n\t\t\t\t\tbuttonOptions={snoozeDuration}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<span className=\"row__lbl\">New Notification Halo Duration</span>\r\n\t\t\t\t<DefaultDropdownButton\r\n\t\t\t\t\tallowEmpty={false}\r\n\t\t\t\t\tclassNames={\"push-right\"}\r\n\t\t\t\t\tcaretLocation=\"right\"\r\n\t\t\t\t\tdefaultSelection={newNotificationsHalo.find(\r\n\t\t\t\t\t\t(element) => element.optionValue === notificationPreferences.newNotificationHaloPeriodSeconds\r\n\t\t\t\t\t)}\r\n\t\t\t\t\tbuttonOptions={newNotificationsHalo}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nexport default NotificationsMainPreferences;\r\n"]}
1
+ {"version":3,"file":"NotificationsPreferencesHome.js","sourceRoot":"","sources":["../../../../../../src/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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AAK,uBAAuB,CAAC,0BAA0B,CACvF,EACD,aAAa,EAAE,cAAc,GAC5B,CACG;QACN,6BAAK,SAAS,EAAC,aAAa;YAC3B,8BAAM,SAAS,EAAC,UAAU,+CAAgD;YAC1E,oBAAC,qBAAqB,IACrB,UAAU,EAAE,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,gBAAgB,EAAE,oBAAoB,CAAC,IAAI,CAC1C,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,KAAK,uBAAuB,CAAC,gCAAgC,CAC7F,EACD,aAAa,EAAE,oBAAoB,GAClC,CACG,CACJ,CACH,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import React, { useContext, useEffect, useState } from \"react\";\r\n\r\n// Context\r\nimport { NotificationsPreferencesContext } from \"../../../NotificationsPreferencesContext\";\r\n\r\n// Components\r\nimport { Checkbox } from \"../../../../common/Checkbox\";\r\nimport DefaultDropdownButton, {\r\n\tIFinsembleDefaultDropdownButtonOptionsProps,\r\n} from \"../../../../shared/DefaultDropdownButton\";\r\nimport ButtonRow from \"../../../../common/ButtonRow\";\r\n\r\n// Utils\r\nimport { loadSources } from \"./notificationViewsUtils\";\r\n\r\nconst PREFERENCE_PATH_KEY = \"finsemble.servicesConfig.notifications.userPreferences\";\r\nconst NOTIFICATIONS_PREFERENCES_KEYS = {\r\n\tDISABLE_DOT_ON_TOOLBAR_ICON: \"disableDotOnToolbarIcon\",\r\n\tSHOW_DOT_ON_TOOLBAR_ICON_MUTED_NOTIFICATIONS: \"showDotOnToolbarIconForMutedNotifications\",\r\n\tINFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS: \"informationalNotificationToastPeriodSeconds\",\r\n\tDEFAULT_SNOOZE_PERIOD_SECONDS: \"defaultSnoozePeriodSeconds\",\r\n\tNEW_NOTIFICATION_HALO_PERIOD_SECONDS: \"newNotificationHaloPeriodSeconds\",\r\n};\r\n\r\nconst setAndTransmitPreferenceChange = (preferenceKey: string, value: any) => {\r\n\tFSBL.Clients.ConfigClient.setPreference(\r\n\t\t{\r\n\t\t\tfield: `${PREFERENCE_PATH_KEY}.${preferenceKey}`,\r\n\t\t\tvalue,\r\n\t\t},\r\n\t\t(err) => {\r\n\t\t\tif (err) {\r\n\t\t\t\tFSBL.Clients.Logger.error(\r\n\t\t\t\t\t`Error setting preference from Notifications Preferences Home Component - preference: ${preferenceKey} - value: ${value} `,\r\n\t\t\t\t\terr\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\r\n\t\t\t\t\tnotificationPreferences: {\r\n\t\t\t\t\t\t[preferenceKey]: value,\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n};\r\n\r\nconst informationalToastDuration: IFinsembleDefaultDropdownButtonOptionsProps[] = [\r\n\t{\r\n\t\toptionLabel: \"10 seconds\",\r\n\t\toptionValue: 10,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\tNOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS,\r\n\t\t\t\t10\r\n\t\t\t);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"30 seconds\",\r\n\t\toptionValue: 30,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\tNOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS,\r\n\t\t\t\t30\r\n\t\t\t);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"45 seconds\",\r\n\t\toptionValue: 45,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\tNOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS,\r\n\t\t\t\t45\r\n\t\t\t);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"60 seconds\",\r\n\t\toptionValue: 60,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\tNOTIFICATIONS_PREFERENCES_KEYS.INFORMATIONAL_NOTIFICATION_TOAST_PERIOD_SECONDS,\r\n\t\t\t\t60\r\n\t\t\t);\r\n\t\t},\r\n\t},\r\n];\r\n\r\nconst snoozeDuration: IFinsembleDefaultDropdownButtonOptionsProps[] = [\r\n\t{\r\n\t\toptionLabel: \"5 minutes\",\r\n\t\toptionValue: 300,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 300);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"10 minutes\",\r\n\t\toptionValue: 600,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 600);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"20 minutes\",\r\n\t\toptionValue: 1200,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 1200);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"30 minutes\",\r\n\t\toptionValue: 1800,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.DEFAULT_SNOOZE_PERIOD_SECONDS, 1800);\r\n\t\t},\r\n\t},\r\n];\r\n\r\nconst newNotificationsHalo: IFinsembleDefaultDropdownButtonOptionsProps[] = [\r\n\t{\r\n\t\toptionLabel: \"30 seconds\",\r\n\t\toptionValue: 30,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 30);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"1 minute\",\r\n\t\toptionValue: 60,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 60);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"3 minutes\",\r\n\t\toptionValue: 180,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 180);\r\n\t\t},\r\n\t},\r\n\t{\r\n\t\toptionLabel: \"5 minutes\",\r\n\t\toptionValue: 600,\r\n\t\tclickHandler: () => {\r\n\t\t\tsetAndTransmitPreferenceChange(NOTIFICATIONS_PREFERENCES_KEYS.NEW_NOTIFICATION_HALO_PERIOD_SECONDS, 600);\r\n\t\t},\r\n\t},\r\n];\r\n\r\nconst NotificationsMainPreferences: React.FunctionComponent = () => {\r\n\tconst notificationsPreferencesContext = useContext(NotificationsPreferencesContext);\r\n\tconst {\r\n\t\tnotificationSources,\r\n\t\tsetNotificationSources,\r\n\t\tsetSelectedNotificationSource,\r\n\t\tsetCurrentNotificationsPreferencesView,\r\n\t} = notificationsPreferencesContext;\r\n\r\n\tconst [reloadSources, setReloadSources] = useState(false);\r\n\r\n\tconst [notificationPreferences, setNotificationPreferences] = useState<any>({});\r\n\r\n\tuseEffect(() => {\r\n\t\tasync function getNotificationsPreferences() {\r\n\t\t\treturn await FSBL.Clients.NotificationClient.getPreferences();\r\n\t\t}\r\n\r\n\t\tgetNotificationsPreferences().then((preferences: any) => {\r\n\t\t\tsetNotificationPreferences(preferences);\r\n\t\t});\r\n\t}, []);\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction listenForRefreshEvent(error: any, response: any) {\r\n\t\t\tif (error) {\r\n\t\t\t\tconsole.error(\"FinsembleNotificationsPreferencesChannel: \", error);\r\n\t\t\t} else {\r\n\t\t\t\tconst { data } = response;\r\n\t\t\t\tif (data === \"notificationReceived\") {\r\n\t\t\t\t\tsetReloadSources(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsPreferencesChannel\", listenForRefreshEvent);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsPreferencesChannel\", listenForRefreshEvent);\r\n\t\t};\r\n\t}, []);\r\n\t{\r\n\t\tnotificationSources &&\r\n\t\t\tuseEffect(() => {\r\n\t\t\t\tloadSources(setNotificationSources, setReloadSources);\r\n\t\t\t}, [notificationSources.length == 0, reloadSources]);\r\n\t}\r\n\r\n\tuseEffect(() => {\r\n\t\tfunction navigateToSourceDetail(err: any, response: any) {\r\n\t\t\tconst { data } = response;\r\n\t\t\tif (data.notification) {\r\n\t\t\t\tconst selectedSource = notificationSources.find((source) => source.source === data.notification.source) || null;\r\n\t\t\t\tsetSelectedNotificationSource(selectedSource);\r\n\t\t\t\tsetCurrentNotificationsPreferencesView(\"Details\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tFSBL.Clients.RouterClient.addListener(\"FinsembleNotificationsNavigationChannel\", navigateToSourceDetail);\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"FinsembleNotificationsNavigationChannel\", navigateToSourceDetail);\r\n\t\t};\r\n\t}, [notificationSources]);\r\n\r\n\tconst toggleNotificationDot = () => {\r\n\t\tsetNotificationPreferences((prevState: any) => {\r\n\t\t\treturn {\r\n\t\t\t\t...prevState,\r\n\t\t\t\tdisableDotOnToolbarIcon: !notificationPreferences.disableDotOnToolbarIcon,\r\n\t\t\t};\r\n\t\t});\r\n\t\tsetAndTransmitPreferenceChange(\"disableDotOnToolbarIcon\", !notificationPreferences.disableDotOnToolbarIcon);\r\n\t};\r\n\r\n\tconst toggleActionableNotificationToast = () => {\r\n\t\tsetNotificationPreferences((prevState: any) => {\r\n\t\t\treturn {\r\n\t\t\t\t...prevState,\r\n\t\t\t\ttoastTimeoutOnActionableNotifications: !notificationPreferences.toastTimeoutOnActionableNotifications,\r\n\t\t\t};\r\n\t\t});\r\n\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\"toastTimeoutOnActionableNotifications\",\r\n\t\t\t!notificationPreferences.toastTimeoutOnActionableNotifications\r\n\t\t);\r\n\t};\r\n\r\n\tconst toggleNotificationDotForMutedNotifications = () => {\r\n\t\tsetNotificationPreferences((prevState: any) => {\r\n\t\t\treturn {\r\n\t\t\t\t...prevState,\r\n\t\t\t\tshowDotOnToolbarIconForMutedNotifications: !notificationPreferences.showDotOnToolbarIconForMutedNotifications,\r\n\t\t\t};\r\n\t\t});\r\n\t\tsetAndTransmitPreferenceChange(\r\n\t\t\t\"showDotOnToolbarIconForMutedNotifications\",\r\n\t\t\t!notificationPreferences.showDotOnToolbarIconForMutedNotifications\r\n\t\t);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<ButtonRow\r\n\t\t\t\t\tlabel=\"Notification sources\"\r\n\t\t\t\t\tonClick={() => setCurrentNotificationsPreferencesView(\"Sources\")}\r\n\t\t\t\t\ticonClass=\"ff-caret-up rotate-90\"\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<Checkbox\r\n\t\t\t\t\tonClick={toggleNotificationDot}\r\n\t\t\t\t\tchecked={!notificationPreferences.disableDotOnToolbarIcon}\r\n\t\t\t\t\tlabel=\"Show notification dot for new notifications\"\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<Checkbox\r\n\t\t\t\t\tdisabled={notificationPreferences.disableDotOnToolbarIcon}\r\n\t\t\t\t\tonClick={toggleNotificationDotForMutedNotifications}\r\n\t\t\t\t\tchecked={notificationPreferences.showDotOnToolbarIconForMutedNotifications}\r\n\t\t\t\t\tlabel=\"Show notification dot for notifications marked as “Don’t show”\"\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<Checkbox\r\n\t\t\t\t\tonClick={toggleActionableNotificationToast}\r\n\t\t\t\t\tchecked={notificationPreferences.toastTimeoutOnActionableNotifications}\r\n\t\t\t\t\tlabel=\"Enable toast timeouts on actionable notifications\"\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<span className=\"row__lbl\">Toast times out after</span>\r\n\t\t\t\t<DefaultDropdownButton\r\n\t\t\t\t\tallowEmpty={false}\r\n\t\t\t\t\tcaretLocation=\"right\"\r\n\t\t\t\t\tdefaultSelection={informationalToastDuration.find(\r\n\t\t\t\t\t\t(element) => element.optionValue === notificationPreferences.informationalNotificationToastPeriodSeconds\r\n\t\t\t\t\t)}\r\n\t\t\t\t\tbuttonOptions={informationalToastDuration}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<span className=\"row__lbl\">Snooze for</span>\r\n\t\t\t\t<DefaultDropdownButton\r\n\t\t\t\t\tallowEmpty={false}\r\n\t\t\t\t\tcaretLocation=\"right\"\r\n\t\t\t\t\tdefaultSelection={snoozeDuration.find(\r\n\t\t\t\t\t\t(element) => element.optionValue === notificationPreferences.defaultSnoozePeriodSeconds\r\n\t\t\t\t\t)}\r\n\t\t\t\t\tbuttonOptions={snoozeDuration}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t\t<div className=\"row-section\">\r\n\t\t\t\t<span className=\"row__lbl\">Turn off the new notification halo after</span>\r\n\t\t\t\t<DefaultDropdownButton\r\n\t\t\t\t\tallowEmpty={false}\r\n\t\t\t\t\tcaretLocation=\"right\"\r\n\t\t\t\t\tdefaultSelection={newNotificationsHalo.find(\r\n\t\t\t\t\t\t(element) => element.optionValue === notificationPreferences.newNotificationHaloPeriodSeconds\r\n\t\t\t\t\t)}\r\n\t\t\t\t\tbuttonOptions={newNotificationsHalo}\r\n\t\t\t\t/>\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nexport default NotificationsMainPreferences;\r\n"]}
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare const NotificationsSourceTypes: () => JSX.Element;
2
+ declare const NotificationsSourceTypes: (context?: any) => JSX.Element;
3
3
  export default NotificationsSourceTypes;
@@ -2,13 +2,12 @@ import React, { useContext, useEffect, useState } from "react";
2
2
  import { NotificationsPreferencesContext } from "../../../NotificationsPreferencesContext";
3
3
  import BellIcon from "../../../../shared/BellIcon";
4
4
  import BellIconCrossed from "../../../../shared/BellIconCrossed";
5
- import Button from "../../../../shared/Button";
6
- import NavigationButton from "../../../../shared/NavigationButton";
7
- const renderTypes = (muteFilters, sourceTypes, setTypesMutedState) => sourceTypes.map((type, index) => {
5
+ import { Button } from "../../../../common/Button";
6
+ const renderTypes = (muteFilters, sourceTypes, setTypesMutedState) => sourceTypes.map((sourceType, index) => {
8
7
  const toggleMute = (type) => {
9
8
  const newState = [...sourceTypes].map((typeToUpdate) => {
10
9
  if (typeToUpdate.name === type) {
11
- const muteFilter = muteFilters.find((muteFilter) => muteFilter.type === typeToUpdate.name);
10
+ const muteFilter = muteFilters.find((muteFilterItem) => muteFilterItem.type === typeToUpdate.name);
12
11
  if (!muteFilter) {
13
12
  console.error(`Unable to find mute filter ${typeToUpdate.muted} for source`);
14
13
  }
@@ -33,18 +32,18 @@ const renderTypes = (muteFilters, sourceTypes, setTypesMutedState) => sourceType
33
32
  });
34
33
  setTypesMutedState(newState);
35
34
  };
36
- return (React.createElement("div", { key: `${type.name}__${index}`, className: "row-section" },
35
+ return (React.createElement("div", { key: `${sourceType.name}__${index}`, className: "row-section" },
37
36
  React.createElement("div", { className: "row" },
38
- React.createElement("div", { className: "row__lbl" }, type.name),
39
- React.createElement("div", { className: "row_right__icon", onClick: () => toggleMute(type.name) }, type.muted ? React.createElement(BellIconCrossed, null) : React.createElement(BellIcon, null)))));
37
+ React.createElement("div", { className: "row__lbl" }, sourceType.name),
38
+ React.createElement("div", { className: "row_right__icon", onClick: () => toggleMute(sourceType.name) }, sourceType.muted ? React.createElement(BellIconCrossed, null) : React.createElement(BellIcon, null)))));
40
39
  });
41
- const NotificationsSourceTypes = () => {
40
+ const NotificationsSourceTypes = (context) => {
42
41
  const notificationsPreferencesContext = useContext(NotificationsPreferencesContext);
43
42
  const currentNotificationSource = notificationsPreferencesContext.selectedNotificationSource;
44
- const sourceTypes = currentNotificationSource?.types.filter((type) => type.name !== "default") || [];
43
+ const sourceTypes = (currentNotificationSource === null || currentNotificationSource === void 0 ? void 0 : currentNotificationSource.types.filter((type) => type.name !== "default")) || [];
45
44
  const muteFilters = sourceTypes.map((sourceType) => {
46
45
  const muteFilter = { type: sourceType.name };
47
- if (currentNotificationSource?.source) {
46
+ if (currentNotificationSource === null || currentNotificationSource === void 0 ? void 0 : currentNotificationSource.source) {
48
47
  muteFilter.source = currentNotificationSource.source;
49
48
  }
50
49
  return muteFilter;
@@ -72,7 +71,7 @@ const NotificationsSourceTypes = () => {
72
71
  }
73
72
  newTypesMutedState.forEach((element) => {
74
73
  FSBL.Clients.RouterClient.transmit("FinsembleNotificationsMuteStateChannel", {
75
- source: currentNotificationSource?.source,
74
+ source: currentNotificationSource === null || currentNotificationSource === void 0 ? void 0 : currentNotificationSource.source,
76
75
  type: element.name,
77
76
  isMuted: !allMuted,
78
77
  });
@@ -120,10 +119,13 @@ const NotificationsSourceTypes = () => {
120
119
  }, []);
121
120
  return (React.createElement("div", { className: "notification-sources__container" },
122
121
  React.createElement("div", { className: "notification-sources__header" },
123
- React.createElement(NavigationButton, { clickHandler: () => goBack(), buttonLabel: "Back", caretLocation: "left", direction: "left" }),
124
- React.createElement("span", { className: "heading-larger" }, currentNotificationSource?.source),
125
- muteFilters.length > 0 ? (React.createElement(Button, { classNames: "accent-negative", buttonLabel: allMuted ? "Show All" : "Don't Show All", clickHandler: toggleMuteAll })) : null),
126
- React.createElement("div", { className: "notification-sources__types" }, typesMutedState && typesMutedState.length > 0 ? (renderTypes(muteFilters, typesMutedState, setTypesMutedState)) : (React.createElement("div", { className: "row-section" }, "No source types configured")))));
122
+ React.createElement("div", { style: { paddingRight: 8, marginLeft: -3 } },
123
+ React.createElement(Button, { onClick: () => goBack(), fashion: "primary", iconBefore: "chevron-left", text: "Back" })),
124
+ React.createElement("span", { className: "heading-larger" }, JSON.stringify(notificationsPreferencesContext) === "{}" && context
125
+ ? context.context.source
126
+ : currentNotificationSource === null || currentNotificationSource === void 0 ? void 0 : currentNotificationSource.source),
127
+ muteFilters.length > 0 ? (React.createElement(Button, { fashion: "primary", className: "accent-negative", text: allMuted ? "Show All" : "Don't Show All", onClick: toggleMuteAll, fixedSize: 110 })) : null),
128
+ React.createElement("div", { className: "notification-sources__types" }, typesMutedState && typesMutedState.length > 0 ? (renderTypes(muteFilters, typesMutedState, setTypesMutedState)) : (React.createElement("div", { id: "no-source-types", className: "row-section" }, "No source types configured")))));
127
129
  };
128
130
  export default NotificationsSourceTypes;
129
131
  //# sourceMappingURL=NotificationsSourceTypes.js.map