@finsemble/finsemble-ui 6.1.1 → 6.1.5

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 (504) hide show
  1. package/README.md +28 -28
  2. package/package.json +1 -1
  3. package/react/actions/favoriteActions.js.map +1 -1
  4. package/react/actions/linkerActions.js.map +1 -1
  5. package/react/actions/menuActions.js.map +1 -1
  6. package/react/actions/rootActions.js.map +1 -1
  7. package/react/actions/searchActions.js.map +1 -1
  8. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  9. package/react/actions/toolbarActions.js.map +1 -1
  10. package/react/actions/workspaceActions.js.map +1 -1
  11. package/react/assets/css/advancedAppLauncher.css +636 -636
  12. package/react/assets/css/appCatalog.css +1069 -1069
  13. package/react/assets/css/authentication.css +78 -78
  14. package/react/assets/css/button.css +219 -219
  15. package/react/assets/css/core/formElements.css +23 -23
  16. package/react/assets/css/core/icons.css +69 -69
  17. package/react/assets/css/core/notifications.css +75 -75
  18. package/react/assets/css/core/windowFrame.css +36 -36
  19. package/react/assets/css/dashbar.css +78 -78
  20. package/react/assets/css/defaultTheme.css +356 -356
  21. package/react/assets/css/dialogs.css +158 -158
  22. package/react/assets/css/favorites.css +101 -101
  23. package/react/assets/css/finsemble.css +38 -38
  24. package/react/assets/css/focus.css +4 -4
  25. package/react/assets/css/font-finance.css +385 -385
  26. package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
  27. package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
  28. package/react/assets/css/fonts/font-finance.svg +124 -124
  29. package/react/assets/css/fonts/icons-reference.html +1174 -1174
  30. package/react/assets/css/linkerWindow.css +124 -124
  31. package/react/assets/css/menus.css +195 -195
  32. package/react/assets/css/notificationsCenter.css +594 -594
  33. package/react/assets/css/processMonitor.css +213 -213
  34. package/react/assets/css/search.css +128 -128
  35. package/react/assets/css/shared/animations.css +99 -99
  36. package/react/assets/css/tags.css +136 -136
  37. package/react/assets/css/toolbar.css +413 -413
  38. package/react/assets/css/userPreferences.css +565 -565
  39. package/react/assets/css/windowTitleBar.css +619 -619
  40. package/react/assets/icons/check.svg +3 -3
  41. package/react/assets/icons/chevron-left.svg +3 -3
  42. package/react/assets/icons/chevron-right.svg +3 -3
  43. package/react/assets/icons/copy.svg +10 -10
  44. package/react/assets/icons/exclamation-circle.svg +4 -4
  45. package/react/assets/icons/external-link.svg +12 -12
  46. package/react/assets/icons/flag.svg +10 -10
  47. package/react/assets/icons/folder.svg +3 -3
  48. package/react/assets/icons/font.svg +3 -3
  49. package/react/assets/icons/globe.svg +3 -3
  50. package/react/assets/icons/hdd.svg +9 -9
  51. package/react/assets/icons/key.svg +10 -10
  52. package/react/assets/icons/life-ring.svg +3 -3
  53. package/react/assets/icons/magic.svg +15 -15
  54. package/react/assets/icons/moon.svg +10 -10
  55. package/react/assets/icons/paint-roller.svg +3 -3
  56. package/react/assets/icons/pencil.svg +10 -10
  57. package/react/assets/icons/plus.svg +3 -3
  58. package/react/assets/icons/question-circle.svg +5 -5
  59. package/react/assets/icons/search.svg +3 -3
  60. package/react/assets/icons/sun.svg +9 -9
  61. package/react/assets/icons/times.svg +3 -3
  62. package/react/assets/icons/toggle-off.svg +6 -6
  63. package/react/assets/icons/toggle-on.svg +6 -6
  64. package/react/assets/icons/tools.svg +3 -3
  65. package/react/assets/icons/trash.svg +12 -12
  66. package/react/assets/icons/upload.svg +10 -10
  67. package/react/assets/icons/window.svg +3 -3
  68. package/react/componentTemplateGenerator.js +85 -85
  69. package/react/componentTemplateGenerator.js.map +1 -1
  70. package/react/components/FinsembleProvider.js.map +1 -1
  71. package/react/components/appCatalog/AppCatalog.js.map +1 -1
  72. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  73. package/react/components/appCatalog/components/AppCard.js.map +1 -1
  74. package/react/components/appCatalog/components/AppList.js.map +1 -1
  75. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  76. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  77. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  78. package/react/components/appCatalog/components/Hero.js.map +1 -1
  79. package/react/components/appCatalog/components/Home.js.map +1 -1
  80. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  81. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  82. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  83. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  84. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  85. package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
  86. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  87. package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
  88. package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
  89. package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
  90. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  91. package/react/components/appCatalog/components/Tag.js.map +1 -1
  92. package/react/components/appCatalog/components/Toast.js.map +1 -1
  93. package/react/components/appCatalog/components/helpers.js.map +1 -1
  94. package/react/components/appCatalog/index.js.map +1 -1
  95. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  96. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  97. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  98. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  99. package/react/components/common/Button.js.map +1 -1
  100. package/react/components/common/ButtonIcon.js.map +1 -1
  101. package/react/components/common/ButtonTile.js.map +1 -1
  102. package/react/components/common/ColorPicker.js.map +1 -1
  103. package/react/components/common/DropZone.js.map +1 -1
  104. package/react/components/common/DropdownButton.js.map +1 -1
  105. package/react/components/common/FileInput.js.map +1 -1
  106. package/react/components/common/FinsembleIcon.js.map +1 -1
  107. package/react/components/common/FinsembleSelect.js.map +1 -1
  108. package/react/components/common/FinsembleToggle.js.map +1 -1
  109. package/react/components/common/FontSizeSelector.js.map +1 -1
  110. package/react/components/common/Header.js.map +1 -1
  111. package/react/components/common/ImagePreview.js.map +1 -1
  112. package/react/components/common/LoadingSpinner.js.map +1 -1
  113. package/react/components/common/Tab.js.map +1 -1
  114. package/react/components/common/Tooltip.js.map +1 -1
  115. package/react/components/common/css/application-edit-page.css +117 -117
  116. package/react/components/common/css/application-list.css +47 -47
  117. package/react/components/common/css/button.css +164 -164
  118. package/react/components/common/css/color-picker.css +52 -52
  119. package/react/components/common/css/drop-zone.css +17 -17
  120. package/react/components/common/css/file-input.css +49 -49
  121. package/react/components/common/css/header.css +43 -43
  122. package/react/components/common/css/icon.css +13 -13
  123. package/react/components/common/css/image-preview.css +57 -57
  124. package/react/components/common/css/loading-spinner.css +39 -39
  125. package/react/components/common/css/selector.css +51 -51
  126. package/react/components/common/css/styles.css +128 -128
  127. package/react/components/common/css/tab.css +56 -56
  128. package/react/components/common/css/toggle.css +32 -32
  129. package/react/components/common/css/tooltip.css +68 -68
  130. package/react/components/common/file_helpers.js.map +1 -1
  131. package/react/components/common/fixtures/FinsembleIcon.css +4 -4
  132. package/react/components/common/helpers.js.map +1 -1
  133. package/react/components/common/stories/Button.stories.js.map +1 -1
  134. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  135. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  136. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  137. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  138. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  139. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  140. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  141. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  142. package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
  143. package/react/components/common/stories/Header.stories.js.map +1 -1
  144. package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
  145. package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
  146. package/react/components/common/stories/Tab.stories.js.map +1 -1
  147. package/react/components/common/stories/Tooltip.stories.js.map +1 -1
  148. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  149. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  150. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  151. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  152. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  153. package/react/components/common/tests/Header.spec.js.map +1 -1
  154. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  155. package/react/components/common/tests/Tab.spec.js.map +1 -1
  156. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  157. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  158. package/react/components/favorites/FavoritesShell.js.map +1 -1
  159. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  160. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  161. package/react/components/favorites/index.js.map +1 -1
  162. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  163. package/react/components/fdc3Resolver/ResolverDialog.css +125 -125
  164. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  165. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  166. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  167. package/react/components/icon/Icon.js.map +1 -1
  168. package/react/components/icon/index.js.map +1 -1
  169. package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
  170. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  171. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  172. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  173. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  174. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  175. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  176. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  177. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  178. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  179. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  180. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  181. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  182. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  183. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  184. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  185. package/react/components/linker/LinkerMenu.js.map +1 -1
  186. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  187. package/react/components/linker/index.js.map +1 -1
  188. package/react/components/linker/remoteRedux.js.map +1 -1
  189. package/react/components/menu/Menu.js.map +1 -1
  190. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  191. package/react/components/menu/MenuContent.js.map +1 -1
  192. package/react/components/menu/MenuHotKey.js.map +1 -1
  193. package/react/components/menu/MenuItem.js.map +1 -1
  194. package/react/components/menu/MenuPortal.js.map +1 -1
  195. package/react/components/menu/MenuShell.js.map +1 -1
  196. package/react/components/menu/MenuToggle.js.map +1 -1
  197. package/react/components/menu/index.js.map +1 -1
  198. package/react/components/menu/keyboardNavigation.js.map +1 -1
  199. package/react/components/menu/menuContext.js.map +1 -1
  200. package/react/components/menu/menuHelpers.js.map +1 -1
  201. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  202. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  203. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  204. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  205. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  206. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  207. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  208. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  209. package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
  210. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  211. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  212. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  213. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
  214. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  215. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  216. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
  217. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  218. package/react/components/notifications/components/views/CardView.js.map +1 -1
  219. package/react/components/notifications/components/views/ListView.js +1 -1
  220. package/react/components/notifications/components/views/ListView.js.map +1 -1
  221. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  222. package/react/components/notifications/constants.js.map +1 -1
  223. package/react/components/notifications/icons/Card.js.map +1 -1
  224. package/react/components/notifications/icons/Chevron.js.map +1 -1
  225. package/react/components/notifications/icons/CloseIcon.js.map +1 -1
  226. package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
  227. package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
  228. package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
  229. package/react/components/notifications/index.js.map +1 -1
  230. package/react/components/notifications/notificationsContext.js.map +1 -1
  231. package/react/components/notifications/types.js.map +1 -1
  232. package/react/components/notifications/utils.js.map +1 -1
  233. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  234. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  235. package/react/components/processMonitor/components/ChildWindows.js.map +1 -1
  236. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  237. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  238. package/react/components/processMonitor/constants.js.map +1 -1
  239. package/react/components/processMonitor/helpers.js.map +1 -1
  240. package/react/components/processMonitor/index.js.map +1 -1
  241. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  242. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  243. package/react/components/quickComponentForm/index.js.map +1 -1
  244. package/react/components/quickComponentForm/quickComponent.css +3 -3
  245. package/react/components/search/Highlight.js.map +1 -1
  246. package/react/components/search/Highlight.spec.js.map +1 -1
  247. package/react/components/search/Highlight.stories.js.map +1 -1
  248. package/react/components/search/Search.js.map +1 -1
  249. package/react/components/search/SearchBestMatch.js.map +1 -1
  250. package/react/components/search/SearchInput.js.map +1 -1
  251. package/react/components/search/SearchProviderResults.js.map +1 -1
  252. package/react/components/search/SearchResult.js.map +1 -1
  253. package/react/components/search/SearchResults.js.map +1 -1
  254. package/react/components/search/index.js.map +1 -1
  255. package/react/components/shared/Animate.js.map +1 -1
  256. package/react/components/shared/BellIcon.js.map +1 -1
  257. package/react/components/shared/BellIconCrossed.js.map +1 -1
  258. package/react/components/shared/Button.js.map +1 -1
  259. package/react/components/shared/ConditionalWrapper.js.map +1 -1
  260. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  261. package/react/components/shared/NavigationButton.js.map +1 -1
  262. package/react/components/shared/Tag.js.map +1 -1
  263. package/react/components/shared/TagsMenu.js.map +1 -1
  264. package/react/components/shared/addProtocolToValidURL.js.map +1 -1
  265. package/react/components/shared/addProtocolToValidURL.spec.js.map +1 -1
  266. package/react/components/shared/linkerUtil.js.map +1 -1
  267. package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
  268. package/react/components/shared/validateURL.js.map +1 -1
  269. package/react/components/shared/validateURL.spec.js.map +1 -1
  270. package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
  271. package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
  272. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  273. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  274. package/react/components/singleInputDialog/index.js.map +1 -1
  275. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  276. package/react/components/smartDesktopDesigner/Appearance.css +94 -94
  277. package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
  278. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  279. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  280. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  281. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  282. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  283. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  284. package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
  285. package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
  286. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  287. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  288. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  289. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  290. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  291. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  292. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  293. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  294. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  295. package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
  296. package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
  297. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
  298. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  299. package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
  300. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  301. package/react/components/smartDesktopDesigner/ThemePage.css +110 -110
  302. package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
  303. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  304. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  305. package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
  306. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  307. package/react/components/smartDesktopDesigner/common/views.js +2 -2
  308. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  309. package/react/components/smartDesktopDesigner/css/appearance.css +10 -10
  310. package/react/components/smartDesktopDesigner/css/applications.css +89 -89
  311. package/react/components/smartDesktopDesigner/css/authentication.css +125 -125
  312. package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
  313. package/react/components/smartDesktopDesigner/css/export.css +163 -163
  314. package/react/components/smartDesktopDesigner/css/getting-started.css +6 -6
  315. package/react/components/smartDesktopDesigner/css/nav.css +93 -93
  316. package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
  317. package/react/components/smartDesktopDesigner/css/project-header.css +121 -121
  318. package/react/components/smartDesktopDesigner/css/styles.css +179 -179
  319. package/react/components/smartDesktopDesigner/css/views.css +16 -16
  320. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  321. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  322. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
  323. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  324. package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
  325. package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
  326. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  327. package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
  328. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  329. package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
  330. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  331. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  332. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  333. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  334. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
  335. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
  336. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
  337. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  338. package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
  339. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  340. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  341. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  342. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  343. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  344. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  345. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  346. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
  347. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  348. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  349. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  350. package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
  351. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  352. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  353. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
  354. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
  355. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
  356. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  357. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  358. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  359. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  360. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  361. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  362. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
  363. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  364. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  365. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  366. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  367. package/react/components/smartDesktopDesigner/tests/a11y_helper.js +3 -3
  368. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  369. package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
  370. package/react/components/system/System.js.map +1 -1
  371. package/react/components/system/System.spec.js.map +1 -1
  372. package/react/components/system/System.stories.js.map +1 -1
  373. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  374. package/react/components/system/index.js.map +1 -1
  375. package/react/components/toolbar/AutoArrange.js.map +1 -1
  376. package/react/components/toolbar/DragHandle.js.map +1 -1
  377. package/react/components/toolbar/MinimizeAll.js.map +1 -1
  378. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  379. package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
  380. package/react/components/toolbar/NotificationControl.js.map +1 -1
  381. package/react/components/toolbar/RevealAll.js.map +1 -1
  382. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  383. package/react/components/toolbar/RevealAll.stories.js.map +1 -1
  384. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  385. package/react/components/toolbar/ToolbarSection.js.map +1 -1
  386. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  387. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  388. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  389. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  390. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  391. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  392. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  393. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  394. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  395. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  396. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  397. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +1 -1
  398. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  399. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  400. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  401. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  402. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  403. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  404. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
  405. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  406. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  407. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  408. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  409. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  410. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  411. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  412. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  413. package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
  414. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  415. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  416. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  417. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  418. package/react/components/toolbar/index.js.map +1 -1
  419. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  420. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  421. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  422. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  423. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  424. package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +94 -94
  425. package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
  426. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  427. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  428. package/react/components/userPreferences/components/Checkbox.js.map +1 -1
  429. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  430. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  431. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  432. package/react/components/userPreferences/components/content/General.js.map +1 -1
  433. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  434. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  435. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  436. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  437. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  438. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  439. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  440. package/react/components/userPreferences/index.js.map +1 -1
  441. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  442. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  443. package/react/components/utils.js.map +1 -1
  444. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  445. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  446. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  447. package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
  448. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  449. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
  450. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  451. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
  452. package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
  453. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
  454. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  455. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  456. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  457. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  458. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  459. package/react/components/windowTitleBar/index.js.map +1 -1
  460. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  461. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  462. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  463. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  464. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  465. package/react/components/yesNoDialog/YesNoDialog.css +3 -3
  466. package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
  467. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  468. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  469. package/react/components/yesNoDialog/index.js.map +1 -1
  470. package/react/components/yesNoDialog/timer.js.map +1 -1
  471. package/react/enzymeSetup.js.map +1 -1
  472. package/react/hooks/index.js.map +1 -1
  473. package/react/hooks/useAuth.js.map +1 -1
  474. package/react/hooks/useDeepEffect.js.map +1 -1
  475. package/react/hooks/useFavorites.js.map +1 -1
  476. package/react/hooks/useFavoritesShell.js.map +1 -1
  477. package/react/hooks/useHotkey.js.map +1 -1
  478. package/react/hooks/useLinker.js.map +1 -1
  479. package/react/hooks/useMenu.js.map +1 -1
  480. package/react/hooks/useNotifications.js.map +1 -1
  481. package/react/hooks/useOutsideClickDetector.js.map +1 -1
  482. package/react/hooks/usePubSub.js.map +1 -1
  483. package/react/hooks/useSearch.js.map +1 -1
  484. package/react/hooks/useToolbar.js.map +1 -1
  485. package/react/hooks/useWorkspace.js.map +1 -1
  486. package/react/reducers/favoriteReducer.js.map +1 -1
  487. package/react/reducers/linkerReducer.js.map +1 -1
  488. package/react/reducers/menuReducer.js.map +1 -1
  489. package/react/reducers/rootReducer.js.map +1 -1
  490. package/react/reducers/searchReducer.js.map +1 -1
  491. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  492. package/react/reducers/toolbarReducer.js.map +1 -1
  493. package/react/reducers/workspaceReducer.js.map +1 -1
  494. package/react/store.js.map +1 -1
  495. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  496. package/react/types/dashbarTypes.js.map +1 -1
  497. package/react/types/favoriteTypes.js.map +1 -1
  498. package/react/types/fdc3.js.map +1 -1
  499. package/react/types/hotkeyTypes.js.map +1 -1
  500. package/react/types/iconTypes.js.map +1 -1
  501. package/react/types/linkerTypes.js.map +1 -1
  502. package/react/types/searchTypes.js.map +1 -1
  503. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  504. package/react/types/workspaceTypes.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleDraggable.js","sourceRoot":"","sources":["../../../src/components/legacyControls/FinsembleDraggable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,MAAM,mBAAmB,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AASrC,MAAM,YAAY,GAAG,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAqB,EAAE,EAAE,CAAC,CACxG,6BACC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,CAAC,EACX,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAC,CAAsC,EAAE,EAAE;QACrD,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;YACvC,OAAO,EAAE,CAAC;SACV;QACD,IAAI,SAAS,EAAE;YACd,SAAS,CAAC,CAAC,CAAC,CAAC;SACb;IACF,CAAC,IAEA,QAAQ,CACJ,CACN,CAAC,CAAC;AAKH,MAAM,CAAC,MAAM,kBAAkB,GAA4C,CAAC,KAAK,EAAE,EAAE;IACpF,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,YAAY,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IAC7E,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,mBAAmB,CAAC;IACrD,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC;IAErC,OAAO,CACN,oBAAC,YAAY,IACZ,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,KAAK,CAAC,SAAS,IAEzB,KAAK,CAAC,QAAQ,CACD,CACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { SortableElement } from \"react-sortable-hoc\";\r\nimport * as React from \"react\";\r\n\r\ntype DraggableProps = {\r\n\tdraggableId: string;\r\n\tisDragDisabled?: boolean;\r\n\tindex: number;\r\n\tonClick?: () => void;\r\n\tonKeydown?: (e: React.KeyboardEvent<HTMLDivElement>) => void;\r\n\twrapperClass?: string;\r\n};\r\n\r\nconst defaultClickHandler = () => {};\r\n\r\ntype SortableItemProps = {\r\n\tonClick: any;\r\n\tclassName: any;\r\n\tchildren: any;\r\n\tonKeydown?: (e: React.KeyboardEvent<HTMLDivElement>) => void;\r\n};\r\n\r\nconst SortableItem = SortableElement(({ onClick, className, children, onKeydown }: SortableItemProps) => (\r\n\t<div\r\n\t\tonClick={onClick}\r\n\t\tclassName={className}\r\n\t\ttabIndex={0}\r\n\t\trole=\"button\"\r\n\t\tonKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\r\n\t\t\tif ([\"Enter\", \"Space\"].includes(e.key)) {\r\n\t\t\t\tonClick();\r\n\t\t\t}\r\n\t\t\tif (onKeydown) {\r\n\t\t\t\tonKeydown(e);\r\n\t\t\t}\r\n\t\t}}\r\n\t>\r\n\t\t{children}\r\n\t</div>\r\n));\r\n\r\n/**\r\n * A FinsembleDraggable is a helper that makes its children draggable\r\n */\r\nexport const FinsembleDraggable: React.FunctionComponent<DraggableProps> = (props) => {\r\n\tconst draggableId = props.draggableId ?? `Id-Unset-${Math.random() * 23214}`;\r\n\tconst isDragDisabled = props.isDragDisabled ?? false;\r\n\tconst onClick = props.onClick ?? defaultClickHandler;\r\n\tconst className = props.wrapperClass;\r\n\r\n\treturn (\r\n\t\t<SortableItem\r\n\t\t\tkey={draggableId}\r\n\t\t\tindex={props.index}\r\n\t\t\tonClick={onClick}\r\n\t\t\tclassName={className}\r\n\t\t\tonKeydown={props.onKeydown}\r\n\t\t>\r\n\t\t\t{props.children}\r\n\t\t</SortableItem>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleDraggable.js","sourceRoot":"","sources":["../../../src/components/legacyControls/FinsembleDraggable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,MAAM,mBAAmB,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AASrC,MAAM,YAAY,GAAG,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAqB,EAAE,EAAE,CAAC,CACxG,6BACC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,CAAC,EACX,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAC,CAAsC,EAAE,EAAE;QACrD,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;YACvC,OAAO,EAAE,CAAC;SACV;QACD,IAAI,SAAS,EAAE;YACd,SAAS,CAAC,CAAC,CAAC,CAAC;SACb;IACF,CAAC,IAEA,QAAQ,CACJ,CACN,CAAC,CAAC;AAKH,MAAM,CAAC,MAAM,kBAAkB,GAA4C,CAAC,KAAK,EAAE,EAAE;IACpF,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,YAAY,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IAC7E,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,mBAAmB,CAAC;IACrD,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC;IAErC,OAAO,CACN,oBAAC,YAAY,IACZ,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,KAAK,CAAC,SAAS,IAEzB,KAAK,CAAC,QAAQ,CACD,CACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { SortableElement } from \"react-sortable-hoc\";\nimport * as React from \"react\";\n\ntype DraggableProps = {\n\tdraggableId: string;\n\tisDragDisabled?: boolean;\n\tindex: number;\n\tonClick?: () => void;\n\tonKeydown?: (e: React.KeyboardEvent<HTMLDivElement>) => void;\n\twrapperClass?: string;\n};\n\nconst defaultClickHandler = () => {};\n\ntype SortableItemProps = {\n\tonClick: any;\n\tclassName: any;\n\tchildren: any;\n\tonKeydown?: (e: React.KeyboardEvent<HTMLDivElement>) => void;\n};\n\nconst SortableItem = SortableElement(({ onClick, className, children, onKeydown }: SortableItemProps) => (\n\t<div\n\t\tonClick={onClick}\n\t\tclassName={className}\n\t\ttabIndex={0}\n\t\trole=\"button\"\n\t\tonKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\n\t\t\tif ([\"Enter\", \"Space\"].includes(e.key)) {\n\t\t\t\tonClick();\n\t\t\t}\n\t\t\tif (onKeydown) {\n\t\t\t\tonKeydown(e);\n\t\t\t}\n\t\t}}\n\t>\n\t\t{children}\n\t</div>\n));\n\n/**\n * A FinsembleDraggable is a helper that makes its children draggable\n */\nexport const FinsembleDraggable: React.FunctionComponent<DraggableProps> = (props) => {\n\tconst draggableId = props.draggableId ?? `Id-Unset-${Math.random() * 23214}`;\n\tconst isDragDisabled = props.isDragDisabled ?? false;\n\tconst onClick = props.onClick ?? defaultClickHandler;\n\tconst className = props.wrapperClass;\n\n\treturn (\n\t\t<SortableItem\n\t\t\tkey={draggableId}\n\t\t\tindex={props.index}\n\t\t\tonClick={onClick}\n\t\t\tclassName={className}\n\t\t\tonKeydown={props.onKeydown}\n\t\t>\n\t\t\t{props.children}\n\t\t</SortableItem>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleHoverDetector.js","sourceRoot":"","sources":["../../../src/components/legacyControls/FinsembleHoverDetector.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,CAAC,MAAM,sBAAsB,GAAyD,CAAC,KAAK,EAAE,EAAE;IAMrG,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC,CAAC;IAOF,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC,CAAC;IAEF,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;IAC5B,IAAI,GAAG,GAAG,CAAC,EACV,MAAM,GAAG,CAAC,EACV,IAAI,GAAG,CAAC,EACR,KAAK,GAAG,CAAC,CAAC;IAEX,IAAI,IAAI,KAAK,EAAE,EAAE;QAChB,GAAG,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAAE,GAAG,GAAG,CAAC,CAAC;QAC5C,IAAI,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAAE,MAAM,GAAG,CAAC,CAAC;QAClD,IAAI,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAAE,IAAI,GAAG,CAAC,CAAC;QAC9C,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAAE,KAAK,GAAG,CAAC,CAAC;KAChD;IAED,OAAO,CACN,6BACC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE;YACN,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,KAAK;YACZ,GAAG,EAAE,GAAG;YACR,MAAM,EAAE,MAAM;SACd,GACK,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport * as React from \"react\";\r\n\r\ntype FinsembleHoverDetectorProps = {\r\n\thoverAction: (hovering: string) => void;\r\n\tedge: string;\r\n};\r\n/**\r\n * This detects mouseover and mouseout and reacts by setting the hover attribute of the parent. We use this because the :hover pseudo-class doesn't detect\r\n * when the mouse leaves if it is on the edge of a finsemble window. This class requires the property \"hoverAction\" which should point back to a function\r\n * in the parent class to call to toggle the hover state. Also requires the property \"edge\" which can be \"right\",\"left\",\"top\",\"bottom\" or a combination (separated by whitespace).\r\n * The hover detector will set its positioning within the parent element depending on which edges are enabled. If edge is not specified, then 5 pixels will be left on every edge.\r\n *\r\n * The parent element must have position: relative or position: absolute!\r\n *\r\n * @since version 3.1.1 FinsembleHoverDetector is now in the finsemble-react-controls repo\r\n * @since version 3.1.1 FinsembleHoverDetector now uses dynamic styles. The fsbl-hover-detector-* css classes are deprecated.\r\n */\r\nexport const FinsembleHoverDetector: React.FunctionComponent<FinsembleHoverDetectorProps> = (props) => {\r\n\t/**\r\n\t * When the mouse enters the hoverDetector, we fire off the action that's passed in from the parent.\r\n\t *\r\n\t * @memberof FinsembleHoverDetector\r\n\t */\r\n\tconst onMouseEnter = () => {\r\n\t\tprops.hoverAction(\"true\");\r\n\t};\r\n\r\n\t/**\r\n\t * When the mouse enters the hoverDetector, we fire off the action that's passed in from the parent.\r\n\t *\r\n\t * @memberof FinsembleHoverDetector\r\n\t */\r\n\tconst onMouseLeave = () => {\r\n\t\tprops.hoverAction(\"false\");\r\n\t};\r\n\r\n\tlet edge = props.edge ?? \"\";\r\n\tlet top = 5,\r\n\t\tbottom = 5,\r\n\t\tleft = 5,\r\n\t\tright = 5;\r\n\r\n\tif (edge !== \"\") {\r\n\t\ttop = bottom = left = right = 0;\r\n\t\tconst splitEdge = edge.split(/[ ,]+/); // split by whitespace or commas\r\n\t\tif (splitEdge.indexOf(\"top\") != -1) top = 5;\r\n\t\tif (splitEdge.indexOf(\"bottom\") != -1) bottom = 5;\r\n\t\tif (splitEdge.indexOf(\"left\") != -1) left = 5;\r\n\t\tif (splitEdge.indexOf(\"right\") != -1) right = 5;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tonMouseEnter={onMouseEnter}\r\n\t\t\tonMouseLeave={onMouseLeave}\r\n\t\t\tstyle={{\r\n\t\t\t\tposition: \"absolute\",\r\n\t\t\t\tleft: left,\r\n\t\t\t\tright: right,\r\n\t\t\t\ttop: top,\r\n\t\t\t\tbottom: bottom,\r\n\t\t\t}}\r\n\t\t></div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleHoverDetector.js","sourceRoot":"","sources":["../../../src/components/legacyControls/FinsembleHoverDetector.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,CAAC,MAAM,sBAAsB,GAAyD,CAAC,KAAK,EAAE,EAAE;IAMrG,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC,CAAC;IAOF,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC,CAAC;IAEF,IAAI,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;IAC5B,IAAI,GAAG,GAAG,CAAC,EACV,MAAM,GAAG,CAAC,EACV,IAAI,GAAG,CAAC,EACR,KAAK,GAAG,CAAC,CAAC;IAEX,IAAI,IAAI,KAAK,EAAE,EAAE;QAChB,GAAG,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAAE,GAAG,GAAG,CAAC,CAAC;QAC5C,IAAI,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAAE,MAAM,GAAG,CAAC,CAAC;QAClD,IAAI,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAAE,IAAI,GAAG,CAAC,CAAC;QAC9C,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAAE,KAAK,GAAG,CAAC,CAAC;KAChD;IAED,OAAO,CACN,6BACC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE;YACN,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,KAAK;YACZ,GAAG,EAAE,GAAG;YACR,MAAM,EAAE,MAAM;SACd,GACK,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport * as React from \"react\";\n\ntype FinsembleHoverDetectorProps = {\n\thoverAction: (hovering: string) => void;\n\tedge: string;\n};\n/**\n * This detects mouseover and mouseout and reacts by setting the hover attribute of the parent. We use this because the :hover pseudo-class doesn't detect\n * when the mouse leaves if it is on the edge of a finsemble window. This class requires the property \"hoverAction\" which should point back to a function\n * in the parent class to call to toggle the hover state. Also requires the property \"edge\" which can be \"right\",\"left\",\"top\",\"bottom\" or a combination (separated by whitespace).\n * The hover detector will set its positioning within the parent element depending on which edges are enabled. If edge is not specified, then 5 pixels will be left on every edge.\n *\n * The parent element must have position: relative or position: absolute!\n *\n * @since version 3.1.1 FinsembleHoverDetector is now in the finsemble-react-controls repo\n * @since version 3.1.1 FinsembleHoverDetector now uses dynamic styles. The fsbl-hover-detector-* css classes are deprecated.\n */\nexport const FinsembleHoverDetector: React.FunctionComponent<FinsembleHoverDetectorProps> = (props) => {\n\t/**\n\t * When the mouse enters the hoverDetector, we fire off the action that's passed in from the parent.\n\t *\n\t * @memberof FinsembleHoverDetector\n\t */\n\tconst onMouseEnter = () => {\n\t\tprops.hoverAction(\"true\");\n\t};\n\n\t/**\n\t * When the mouse enters the hoverDetector, we fire off the action that's passed in from the parent.\n\t *\n\t * @memberof FinsembleHoverDetector\n\t */\n\tconst onMouseLeave = () => {\n\t\tprops.hoverAction(\"false\");\n\t};\n\n\tlet edge = props.edge ?? \"\";\n\tlet top = 5,\n\t\tbottom = 5,\n\t\tleft = 5,\n\t\tright = 5;\n\n\tif (edge !== \"\") {\n\t\ttop = bottom = left = right = 0;\n\t\tconst splitEdge = edge.split(/[ ,]+/); // split by whitespace or commas\n\t\tif (splitEdge.indexOf(\"top\") != -1) top = 5;\n\t\tif (splitEdge.indexOf(\"bottom\") != -1) bottom = 5;\n\t\tif (splitEdge.indexOf(\"left\") != -1) left = 5;\n\t\tif (splitEdge.indexOf(\"right\") != -1) right = 5;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tonMouseEnter={onMouseEnter}\n\t\t\tonMouseLeave={onMouseLeave}\n\t\t\tstyle={{\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tleft: left,\n\t\t\t\tright: right,\n\t\t\t\ttop: top,\n\t\t\t\tbottom: bottom,\n\t\t\t}}\n\t\t></div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleMenuSection.js","sourceRoot":"","sources":["../../../src/components/legacyControls/FinsembleMenuSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,O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AK,CAAC,SAAS,CAAC,GAAG,EAAE;QACpB,kBAAkB,EAAE,CAAC;IACtB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAKb,kBAAkB,EAAE,CAAC;IAKrB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;QACzB,IAAI,OAAO,GAAG,KAAK,CAAC,SAAS,IAAI,kBAAkB,CAAC;QACpD,IAAI,OAAO,KAAK,kBAAkB,EAAE;YACnC,OAAO,GAAG,GAAG,OAAO,IAAI,kBAAkB,EAAE,CAAC;SAC7C;QACD,IAAI,KAAK,CAAC,UAAU,EAAE;YACrB,OAAO,GAAG,GAAG,OAAO,0BAA0B,CAAC;SAC/C;QACD,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,IACtC,KAAK,CAAC,QAAQ,CACV,CACN,CAAC;KACF;SAAM;QAKN,OAAO,CACN,oBAAC,mBAAmB,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,IAC7C,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAU,EAAE,CAAC,EAAE,EAAE;YACrD,IAAI,cAAc,GAAG,KAAK,CAAC;YAC3B,IAAI,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,KAAK,WAAW,EAAE;gBACxD,CAAC,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;aACnC;YACD,OAAO,CACN,oBAAC,kBAAkB,IAAC,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,IACjF,KAAK,CACc,CACrB,CAAC;QACH,CAAC,CAAC,CACmB,CACtB,CAAC;KACF;AACF,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { FinsembleDraggable } from \"./FinsembleDraggable\";\r\nimport { FinsembleDnDContext } from \"./FinsembleDnDContext\";\r\nconst SECTION_BASE_CLASS = \"menu-section\";\r\nfunction uuidv4() {\r\n\treturn \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, (c) => {\r\n\t\tvar r = (Math.random() * 16) | 0,\r\n\t\t\tv = c === \"x\" ? r : (r & 0x3) | 0x8;\r\n\t\treturn v.toString(16);\r\n\t});\r\n}\r\n\r\ntype FinsembleMenuSectionProps = {\r\n\tscrollable?: boolean;\r\n\tisArrangeable?: boolean;\r\n\tonDragEnd: () => void;\r\n\tclassName?: string;\r\n};\r\n\r\n/**\r\n * The finsembleMenuSection is essentially a little wrapper around a part of a finsemble menu.\r\n * It forces scrolling even when content exceeds the height of a section. It also applies some styling.\r\n */\r\nexport const FinsembleMenuSection: React.FunctionComponent<FinsembleMenuSectionProps> = (props) => {\r\n\tconst [bounds, setBounds] = React.useState({ height: 0 });\r\n\tconst sectionHeight: string | number = \"100%\";\r\n\tconst wrapperRef: React.Ref<HTMLDivElement> = React.useRef(null);\r\n\r\n\t/**\r\n\t * Figures out how large the section can be.\r\n\t */\r\n\tconst calculateSectionHeight = () => {\r\n\t\tlet returnHeight: string | number = sectionHeight;\r\n\t\t// If the section can scroll and there's content to measure, measure it. Otherwise\r\n\t\t// the returnHeight will be 100%.\r\n\t\tif (props.scrollable && wrapperRef?.current?.children) {\r\n\t\t\tconst windowFillHeight = (window as any).portalHeight - wrapperRef.current.offsetTop;\r\n\t\t\t// The maximum height is essentially the amount of real estate from the top of the element to the bottom of the window.\r\n\t\t\tconst calculatedHeight = (Array.from(wrapperRef.current.children) as HTMLElement[])\r\n\t\t\t\t.filter((el) => el)\r\n\t\t\t\t.map((el) => el.offsetHeight)\r\n\t\t\t\t.reduce((accumulator, currentValue) => accumulator + currentValue, 0);\r\n\r\n\t\t\tif (calculatedHeight > windowFillHeight) {\r\n\t\t\t\treturn windowFillHeight;\r\n\t\t\t}\r\n\t\t\t// If we ended up calculating how tall this section should be, we return it.\r\n\t\t\treturnHeight = calculatedHeight;\r\n\t\t}\r\n\t\treturn returnHeight;\r\n\t};\r\n\r\n\t/**\r\n\t * Actually sets the style attribute with the calculated height from above.\r\n\t */\r\n\tconst applySectionHeight = () => {\r\n\t\tif (wrapperRef && wrapperRef.current) {\r\n\t\t\tvar height = calculateSectionHeight();\r\n\t\t\tif (typeof height === \"number\") height = `${height}px`;\r\n\t\t\t// height will either be a number or '100%'.\r\n\t\t\twrapperRef.current.setAttribute(\"style\", `height:${height}`);\r\n\t\t}\r\n\t};\r\n\t/**\r\n\t * Updates the internal state so that our calculations can use the bounds of the window later.\r\n\t */\r\n\tconst onBoundsChanged = async () => {\r\n\t\tconst { bounds: updatedBounds } = await finsembleWindow.getBounds();\r\n\t\tsetBounds(updatedBounds);\r\n\t};\r\n\r\n\t/**\r\n\t * Focuses the window when it's shown.\r\n\t */\r\n\tconst onWindowShown = () => {\r\n\t\tfinsembleWindow.focus();\r\n\t};\r\n\r\n\t/**\r\n\t * On mount (ish) add some listeners. When we unmount (ish), remove those listeners.\r\n\t * Only do this once.\r\n\t */\r\n\tReact.useEffect(() => {\r\n\t\twindow.addEventListener(\"resize\", onBoundsChanged);\r\n\t\tfinsembleWindow.addEventListener(\"shown\", onWindowShown);\r\n\t\treturn () => {\r\n\t\t\twindow.removeEventListener(\"resize\", onBoundsChanged);\r\n\t\t\tfinsembleWindow.removeEventListener(\"shown\", onWindowShown);\r\n\t\t};\r\n\t}, []);\r\n\r\n\t/**\r\n\t * When the window's bounds change, recalculate the section height.\r\n\t */\r\n\tReact.useEffect(() => {\r\n\t\tapplySectionHeight();\r\n\t}, [bounds]);\r\n\r\n\t/**\r\n\t * Sets the initial section height.\r\n\t */\r\n\tapplySectionHeight();\r\n\r\n\t/**\r\n\t * If the section isn't arrangeable, just decorate with classes and render the children.\r\n\t */\r\n\tif (!props.isArrangeable) {\r\n\t\tlet classes = props.className ?? SECTION_BASE_CLASS;\r\n\t\tif (classes !== SECTION_BASE_CLASS) {\r\n\t\t\tclasses = `${classes} ${SECTION_BASE_CLASS}`;\r\n\t\t}\r\n\t\tif (props.scrollable) {\r\n\t\t\tclasses = `${classes} menu-section-scrollable`;\r\n\t\t}\r\n\t\treturn (\r\n\t\t\t<div ref={wrapperRef} className={classes}>\r\n\t\t\t\t{props.children}\r\n\t\t\t</div>\r\n\t\t);\r\n\t} else {\r\n\t\t/**\r\n\t\t * If a menu section allows for reordering, we have to wrap it in all of the DnD components.\r\n\t\t * The inner function is wrapping each child in a Draggable element.\r\n\t\t */\r\n\t\treturn (\r\n\t\t\t<FinsembleDnDContext onDragEnd={props.onDragEnd}>\r\n\t\t\t\t{React.Children.map(props.children, (child: any, i) => {\r\n\t\t\t\t\tlet isDragDisabled = false;\r\n\t\t\t\t\tif (typeof child?.props?.isDragDisabled !== \"undefined\") {\r\n\t\t\t\t\t\t({ isDragDisabled } = child.props);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<FinsembleDraggable isDragDisabled={isDragDisabled} draggableId={uuidv4()} index={i}>\r\n\t\t\t\t\t\t\t{child}\r\n\t\t\t\t\t\t</FinsembleDraggable>\r\n\t\t\t\t\t);\r\n\t\t\t\t})}\r\n\t\t\t</FinsembleDnDContext>\r\n\t\t);\r\n\t}\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleMenuSection.js","sourceRoot":"","sources":["../../../src/components/legacyControls/FinsembleMenuSection.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAC1C,SAAS,MAAM;IACd,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;QACpE,IAAI,CAAC,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GAAG,KAAK,CAAC,SAAS,IAAI,kBAAkB,CAAC;QACpD,IAAI,OAAO,KAAK,kBAAkB,EAAE;YACnC,OAAO,GAAG,GAAG,OAAO,IAAI,kBAAkB,EAAE,CAAC;SAC7C;QACD,IAAI,KAAK,CAAC,UAAU,EAAE;YACrB,OAAO,GAAG,GAAG,OAAO,0BAA0B,CAAC;SAC/C;QACD,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,IACtC,KAAK,CAAC,QAAQ,CACV,CACN,CAAC;KACF;SAAM;QAKN,OAAO,CACN,oBAAC,mBAAmB,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,IAC7C,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAU,EAAE,CAAC,EAAE,EAAE;YACrD,IAAI,cAAc,GAAG,KAAK,CAAC;YAC3B,IAAI,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,KAAK,WAAW,EAAE;gBACxD,CAAC,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;aACnC;YACD,OAAO,CACN,oBAAC,kBAAkB,IAAC,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,IACjF,KAAK,CACc,CACrB,CAAC;QACH,CAAC,CAAC,CACmB,CACtB,CAAC;KACF;AACF,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport * as React from \"react\";\nimport { FinsembleDraggable } from \"./FinsembleDraggable\";\nimport { FinsembleDnDContext } from \"./FinsembleDnDContext\";\nconst SECTION_BASE_CLASS = \"menu-section\";\nfunction uuidv4() {\n\treturn \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, (c) => {\n\t\tvar r = (Math.random() * 16) | 0,\n\t\t\tv = c === \"x\" ? r : (r & 0x3) | 0x8;\n\t\treturn v.toString(16);\n\t});\n}\n\ntype FinsembleMenuSectionProps = {\n\tscrollable?: boolean;\n\tisArrangeable?: boolean;\n\tonDragEnd: () => void;\n\tclassName?: string;\n};\n\n/**\n * The finsembleMenuSection is essentially a little wrapper around a part of a finsemble menu.\n * It forces scrolling even when content exceeds the height of a section. It also applies some styling.\n */\nexport const FinsembleMenuSection: React.FunctionComponent<FinsembleMenuSectionProps> = (props) => {\n\tconst [bounds, setBounds] = React.useState({ height: 0 });\n\tconst sectionHeight: string | number = \"100%\";\n\tconst wrapperRef: React.Ref<HTMLDivElement> = React.useRef(null);\n\n\t/**\n\t * Figures out how large the section can be.\n\t */\n\tconst calculateSectionHeight = () => {\n\t\tlet returnHeight: string | number = sectionHeight;\n\t\t// If the section can scroll and there's content to measure, measure it. Otherwise\n\t\t// the returnHeight will be 100%.\n\t\tif (props.scrollable && wrapperRef?.current?.children) {\n\t\t\tconst windowFillHeight = (window as any).portalHeight - wrapperRef.current.offsetTop;\n\t\t\t// The maximum height is essentially the amount of real estate from the top of the element to the bottom of the window.\n\t\t\tconst calculatedHeight = (Array.from(wrapperRef.current.children) as HTMLElement[])\n\t\t\t\t.filter((el) => el)\n\t\t\t\t.map((el) => el.offsetHeight)\n\t\t\t\t.reduce((accumulator, currentValue) => accumulator + currentValue, 0);\n\n\t\t\tif (calculatedHeight > windowFillHeight) {\n\t\t\t\treturn windowFillHeight;\n\t\t\t}\n\t\t\t// If we ended up calculating how tall this section should be, we return it.\n\t\t\treturnHeight = calculatedHeight;\n\t\t}\n\t\treturn returnHeight;\n\t};\n\n\t/**\n\t * Actually sets the style attribute with the calculated height from above.\n\t */\n\tconst applySectionHeight = () => {\n\t\tif (wrapperRef && wrapperRef.current) {\n\t\t\tvar height = calculateSectionHeight();\n\t\t\tif (typeof height === \"number\") height = `${height}px`;\n\t\t\t// height will either be a number or '100%'.\n\t\t\twrapperRef.current.setAttribute(\"style\", `height:${height}`);\n\t\t}\n\t};\n\t/**\n\t * Updates the internal state so that our calculations can use the bounds of the window later.\n\t */\n\tconst onBoundsChanged = async () => {\n\t\tconst { bounds: updatedBounds } = await finsembleWindow.getBounds();\n\t\tsetBounds(updatedBounds);\n\t};\n\n\t/**\n\t * Focuses the window when it's shown.\n\t */\n\tconst onWindowShown = () => {\n\t\tfinsembleWindow.focus();\n\t};\n\n\t/**\n\t * On mount (ish) add some listeners. When we unmount (ish), remove those listeners.\n\t * Only do this once.\n\t */\n\tReact.useEffect(() => {\n\t\twindow.addEventListener(\"resize\", onBoundsChanged);\n\t\tfinsembleWindow.addEventListener(\"shown\", onWindowShown);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"resize\", onBoundsChanged);\n\t\t\tfinsembleWindow.removeEventListener(\"shown\", onWindowShown);\n\t\t};\n\t}, []);\n\n\t/**\n\t * When the window's bounds change, recalculate the section height.\n\t */\n\tReact.useEffect(() => {\n\t\tapplySectionHeight();\n\t}, [bounds]);\n\n\t/**\n\t * Sets the initial section height.\n\t */\n\tapplySectionHeight();\n\n\t/**\n\t * If the section isn't arrangeable, just decorate with classes and render the children.\n\t */\n\tif (!props.isArrangeable) {\n\t\tlet classes = props.className ?? SECTION_BASE_CLASS;\n\t\tif (classes !== SECTION_BASE_CLASS) {\n\t\t\tclasses = `${classes} ${SECTION_BASE_CLASS}`;\n\t\t}\n\t\tif (props.scrollable) {\n\t\t\tclasses = `${classes} menu-section-scrollable`;\n\t\t}\n\t\treturn (\n\t\t\t<div ref={wrapperRef} className={classes}>\n\t\t\t\t{props.children}\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\t/**\n\t\t * If a menu section allows for reordering, we have to wrap it in all of the DnD components.\n\t\t * The inner function is wrapping each child in a Draggable element.\n\t\t */\n\t\treturn (\n\t\t\t<FinsembleDnDContext onDragEnd={props.onDragEnd}>\n\t\t\t\t{React.Children.map(props.children, (child: any, i) => {\n\t\t\t\t\tlet isDragDisabled = false;\n\t\t\t\t\tif (typeof child?.props?.isDragDisabled !== \"undefined\") {\n\t\t\t\t\t\t({ isDragDisabled } = child.props);\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<FinsembleDraggable isDragDisabled={isDragDisabled} draggableId={uuidv4()} index={i}>\n\t\t\t\t\t\t\t{child}\n\t\t\t\t\t\t</FinsembleDraggable>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</FinsembleDnDContext>\n\t\t);\n\t}\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleDialog.stories.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/stories/FinsembleDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,iCAAiC,CAAC;AAEzC,eAAe;IACd,KAAK,EAAE,iCAAiC;IACxC,SAAS,EAAE,eAAe;CAC1B,CAAC;AAEF,MAAM,QAAQ,GAAgC,CAAC,IAA0B,EAAE,EAAE;IAC5E,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,OAAO,oBAAC,eAAe,OAAK,IAAI,GAAI,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACzC,QAAQ,EAAE,gBAAgB;CAC1B,CAAC","sourcesContent":["import React from \"react\";\r\nimport { FinsembleDialog, FinsembleDialogProps } from \"../FinsembleDialog\";\r\nimport { initFSBL } from \"../../common/helpers\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport { action } from \"@storybook/addon-actions\";\r\nimport \"../../../assets/css/dialogs.css\";\r\n\r\nexport default {\r\n\ttitle: \"FinsembleDialog/FinsembleDialog\",\r\n\tcomponent: FinsembleDialog,\r\n};\r\n\r\nconst Template: Story<FinsembleDialogProps> = (args: FinsembleDialogProps) => {\r\n\tinitFSBL(window);\r\n\r\n\treturn <FinsembleDialog {...args} />;\r\n};\r\n\r\nexport const Basic = Template.bind({});\r\nBasic.args = {\r\n\tisModal: false,\r\n\tclassName: \"Test\",\r\n\tonShowRequested: action(\"Show requested\"),\r\n\tchildren: \"This is a test\",\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleDialog.stories.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/stories/FinsembleDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAwB,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,iCAAiC,CAAC;AAEzC,eAAe;IACd,KAAK,EAAE,iCAAiC;IACxC,SAAS,EAAE,eAAe;CAC1B,CAAC;AAEF,MAAM,QAAQ,GAAgC,CAAC,IAA0B,EAAE,EAAE;IAC5E,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,OAAO,oBAAC,eAAe,OAAK,IAAI,GAAI,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,MAAM,CAAC,gBAAgB,CAAC;IACzC,QAAQ,EAAE,gBAAgB;CAC1B,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleDialog, FinsembleDialogProps } from \"../FinsembleDialog\";\nimport { initFSBL } from \"../../common/helpers\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport { action } from \"@storybook/addon-actions\";\nimport \"../../../assets/css/dialogs.css\";\n\nexport default {\n\ttitle: \"FinsembleDialog/FinsembleDialog\",\n\tcomponent: FinsembleDialog,\n};\n\nconst Template: Story<FinsembleDialogProps> = (args: FinsembleDialogProps) => {\n\tinitFSBL(window);\n\n\treturn <FinsembleDialog {...args} />;\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\tisModal: false,\n\tclassName: \"Test\",\n\tonShowRequested: action(\"Show requested\"),\n\tchildren: \"This is a test\",\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleDialogButton.stories.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/stories/FinsembleDialogButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAA8B,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,iCAAiC,CAAC;AAEzC,eAAe;IACd,KAAK,EAAE,sCAAsC;IAC7C,SAAS,EAAE,qBAAqB;CAChC,CAAC;AAOF,MAAM,QAAQ,GAA4C,CAAC,IAAsC,EAAE,EAAE,CAAC,CACrG,oBAAC,qBAAqB,OAAK,IAAI,GAAI,CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC;CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;IACjB,IAAI,EAAE,IAAI;CACV,CAAC;AACF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,MAAM;CAChB,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IAClB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,yBAAyB;IACpC,QAAQ,EAAE,MAAM;CAChB,CAAC;AACF,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/C,aAAa,CAAC,IAAI,GAAG;IACpB,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,MAAM;CAChB,CAAC","sourcesContent":["import React from \"react\";\r\nimport { FinsembleDialogButton, FinsembleDialogButtonProps } from \"../FinsembleDialogButton\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport { action } from \"@storybook/addon-actions\";\r\nimport \"../../../assets/css/dialogs.css\";\r\n\r\nexport default {\r\n\ttitle: \"FinsembleDialog/FinsemleDialogButton\",\r\n\tcomponent: FinsembleDialogButton,\r\n};\r\n\r\nexport type tmp = {\r\n\tchildren: any;\r\n\tonClick?: () => void;\r\n};\r\n\r\nconst Template: Story<FinsembleDialogButtonProps & tmp> = (args: FinsembleDialogButtonProps & tmp) => (\r\n\t<FinsembleDialogButton {...args} />\r\n);\r\n\r\nexport const Basic = Template.bind({});\r\nBasic.args = {\r\n\tshow: true,\r\n\tchildren: \"Test\",\r\n\tonClick: action(\"onClick\"),\r\n};\r\nexport const NoChildren = Template.bind({});\r\nNoChildren.args = {\r\n\tshow: true,\r\n};\r\nexport const NoShow = Template.bind({});\r\nNoShow.args = {\r\n\tshow: false,\r\n\tchildren: \"Test\",\r\n};\r\nexport const CustomClass = Template.bind({});\r\nCustomClass.args = {\r\n\tshow: true,\r\n\tclassName: \"fsbl-button-affirmative\",\r\n\tchildren: \"Test\",\r\n};\r\nexport const AltButtonSize = Template.bind({});\r\nAltButtonSize.args = {\r\n\tshow: true,\r\n\tbuttonSize: \"lg\",\r\n\tchildren: \"Test\",\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleDialogButton.stories.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/stories/FinsembleDialogButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAA8B,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,iCAAiC,CAAC;AAEzC,eAAe;IACd,KAAK,EAAE,sCAAsC;IAC7C,SAAS,EAAE,qBAAqB;CAChC,CAAC;AAOF,MAAM,QAAQ,GAA4C,CAAC,IAAsC,EAAE,EAAE,CAAC,CACrG,oBAAC,qBAAqB,OAAK,IAAI,GAAI,CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC;CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;IACjB,IAAI,EAAE,IAAI;CACV,CAAC;AACF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,MAAM;CAChB,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IAClB,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,yBAAyB;IACpC,QAAQ,EAAE,MAAM;CAChB,CAAC;AACF,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/C,aAAa,CAAC,IAAI,GAAG;IACpB,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,MAAM;CAChB,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleDialogButton, FinsembleDialogButtonProps } from \"../FinsembleDialogButton\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport { action } from \"@storybook/addon-actions\";\nimport \"../../../assets/css/dialogs.css\";\n\nexport default {\n\ttitle: \"FinsembleDialog/FinsemleDialogButton\",\n\tcomponent: FinsembleDialogButton,\n};\n\nexport type tmp = {\n\tchildren: any;\n\tonClick?: () => void;\n};\n\nconst Template: Story<FinsembleDialogButtonProps & tmp> = (args: FinsembleDialogButtonProps & tmp) => (\n\t<FinsembleDialogButton {...args} />\n);\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\tshow: true,\n\tchildren: \"Test\",\n\tonClick: action(\"onClick\"),\n};\nexport const NoChildren = Template.bind({});\nNoChildren.args = {\n\tshow: true,\n};\nexport const NoShow = Template.bind({});\nNoShow.args = {\n\tshow: false,\n\tchildren: \"Test\",\n};\nexport const CustomClass = Template.bind({});\nCustomClass.args = {\n\tshow: true,\n\tclassName: \"fsbl-button-affirmative\",\n\tchildren: \"Test\",\n};\nexport const AltButtonSize = Template.bind({});\nAltButtonSize.args = {\n\tshow: true,\n\tbuttonSize: \"lg\",\n\tchildren: \"Test\",\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleDialogQuestion.stories.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/stories/FinsembleDialogQuestion.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAgC,MAAM,4BAA4B,CAAC;AAEnG,OAAO,iCAAiC,CAAC;AAEzC,eAAe;IACd,KAAK,EAAE,yCAAyC;IAChD,SAAS,EAAE,uBAAuB;CAClC,CAAC;AAOF,MAAM,QAAQ,GAA8C,CAAC,IAAwC,EAAE,EAAE,CAAC,CACzG,oBAAC,uBAAuB,OAAK,IAAI,GAAI,CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,cAAc;IACxB,QAAQ,EAAE,IAAI;CACd,CAAC","sourcesContent":["import React from \"react\";\r\nimport { FinsembleDialogQuestion, FinsembleDialogQuestionProps } from \"../FinsembleDialogQuestion\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport \"../../../assets/css/dialogs.css\";\r\n\r\nexport default {\r\n\ttitle: \"FinsembleDialog/FinsembleDialogQuestion\",\r\n\tcomponent: FinsembleDialogQuestion,\r\n};\r\n\r\nexport type tmp = {\r\n\tchildren: any;\r\n\tonClick?: () => void;\r\n};\r\n\r\nconst Template: Story<FinsembleDialogQuestionProps & tmp> = (args: FinsembleDialogQuestionProps & tmp) => (\r\n\t<FinsembleDialogQuestion {...args} />\r\n);\r\n\r\nexport const Basic = Template.bind({});\r\nBasic.args = {\r\n\tclassName: \"test\",\r\n\tquestion: \"Hello World?\",\r\n\tchildren: \"42\",\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleDialogQuestion.stories.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/stories/FinsembleDialogQuestion.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAgC,MAAM,4BAA4B,CAAC;AAEnG,OAAO,iCAAiC,CAAC;AAEzC,eAAe;IACd,KAAK,EAAE,yCAAyC;IAChD,SAAS,EAAE,uBAAuB;CAClC,CAAC;AAOF,MAAM,QAAQ,GAA8C,CAAC,IAAwC,EAAE,EAAE,CAAC,CACzG,oBAAC,uBAAuB,OAAK,IAAI,GAAI,CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,cAAc;IACxB,QAAQ,EAAE,IAAI;CACd,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleDialogQuestion, FinsembleDialogQuestionProps } from \"../FinsembleDialogQuestion\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport \"../../../assets/css/dialogs.css\";\n\nexport default {\n\ttitle: \"FinsembleDialog/FinsembleDialogQuestion\",\n\tcomponent: FinsembleDialogQuestion,\n};\n\nexport type tmp = {\n\tchildren: any;\n\tonClick?: () => void;\n};\n\nconst Template: Story<FinsembleDialogQuestionProps & tmp> = (args: FinsembleDialogQuestionProps & tmp) => (\n\t<FinsembleDialogQuestion {...args} />\n);\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\tclassName: \"test\",\n\tquestion: \"Hello World?\",\n\tchildren: \"42\",\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleDialogTextInput.stories.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/stories/FinsembleDialogTextInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAiC,MAAM,6BAA6B,CAAC;AAEtG,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,iCAAiC,CAAC;AAEzC,eAAe;IACd,KAAK,EAAE,0CAA0C;IACjD,SAAS,EAAE,wBAAwB;CACnC,CAA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AC,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG;IACtB,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC/B,KAAK,EAAE,YAAY;CACnB,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IAClB,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC/B,YAAY,EAAE,UAAU;CACxB,CAAC","sourcesContent":["import React from \"react\";\r\nimport { FinsembleDialogTextInput, FinsembleDialogTextInputProps } from \"../FinsembleDialogTextInput\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport { action } from \"@storybook/addon-actions\";\r\nimport \"../../../assets/css/dialogs.css\";\r\n\r\nexport default {\r\n\ttitle: \"FinsembleDialog/FinsembleDialogTextInput\",\r\n\tcomponent: FinsembleDialogTextInput,\r\n};\r\n\r\nconst Template: Story<FinsembleDialogTextInputProps> = (args: FinsembleDialogTextInputProps) => (\r\n\t<FinsembleDialogTextInput {...args} />\r\n);\r\n\r\nexport const Basic = Template.bind({});\r\nBasic.args = {\r\n\tautoFocus: false,\r\n\tonInputChange: action(\"change\"),\r\n};\r\n\r\nexport const AutoFocus = Template.bind({});\r\nAutoFocus.args = {\r\n\tautoFocus: true,\r\n\tonInputChange: action(\"change\"),\r\n};\r\nexport const MaxLength = Template.bind({});\r\nMaxLength.args = {\r\n\tautoFocus: false,\r\n\tonInputChange: action(\"change\"),\r\n\tmaxLength: 5,\r\n\tinputLabel: \"No more than 5 letters\",\r\n};\r\nexport const Placeholder = Template.bind({});\r\nPlaceholder.args = {\r\n\tautoFocus: false,\r\n\tonInputChange: action(\"change\"),\r\n\tplaceholder: \"Say something\",\r\n};\r\nexport const WithLabel = Template.bind({});\r\nWithLabel.args = {\r\n\tautoFocus: false,\r\n\tonInputChange: action(\"change\"),\r\n\tinputLabel: \"First Name:\",\r\n};\r\nexport const WithPresetValue = Template.bind({});\r\nWithPresetValue.args = {\r\n\tautoFocus: false,\r\n\tonInputChange: action(\"change\"),\r\n\tvalue: \"John Smith\",\r\n};\r\nexport const NumbersOnly = Template.bind({});\r\nNumbersOnly.args = {\r\n\tautoFocus: false,\r\n\tonInputChange: action(\"change\"),\r\n\tinputPattern: \"^[0-9]*$\",\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleDialogTextInput.stories.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/stories/FinsembleDialogTextInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAiC,MAAM,6BAA6B,CAAC;AAEtG,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,iCAAiC,CAAC;AAEzC,eAAe;IACd,KAAK,EAAE,0CAA0C;IACjD,SAAS,EAAE,wBAAwB;CACnC,CAAC;AAEF,MAAM,QAAQ,GAAyC,CAAC,IAAmC,EAAE,EAAE,CAAC,CAC/F,oBAAC,wBAAwB,OAAK,IAAI,GAAI,CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC;CAC/B,CAAC;AACF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC/B,SAAS,EAAE,CAAC;IACZ,UAAU,EAAE,wBAAwB;CACpC,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IAClB,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC/B,WAAW,EAAE,eAAe;CAC5B,CAAC;AACF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IAChB,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC/B,UAAU,EAAE,aAAa;CACzB,CAAC;AACF,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG;IACtB,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC/B,KAAK,EAAE,YAAY;CACnB,CAAC;AACF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IAClB,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC/B,YAAY,EAAE,UAAU;CACxB,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleDialogTextInput, FinsembleDialogTextInputProps } from \"../FinsembleDialogTextInput\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport { action } from \"@storybook/addon-actions\";\nimport \"../../../assets/css/dialogs.css\";\n\nexport default {\n\ttitle: \"FinsembleDialog/FinsembleDialogTextInput\",\n\tcomponent: FinsembleDialogTextInput,\n};\n\nconst Template: Story<FinsembleDialogTextInputProps> = (args: FinsembleDialogTextInputProps) => (\n\t<FinsembleDialogTextInput {...args} />\n);\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\tautoFocus: false,\n\tonInputChange: action(\"change\"),\n};\n\nexport const AutoFocus = Template.bind({});\nAutoFocus.args = {\n\tautoFocus: true,\n\tonInputChange: action(\"change\"),\n};\nexport const MaxLength = Template.bind({});\nMaxLength.args = {\n\tautoFocus: false,\n\tonInputChange: action(\"change\"),\n\tmaxLength: 5,\n\tinputLabel: \"No more than 5 letters\",\n};\nexport const Placeholder = Template.bind({});\nPlaceholder.args = {\n\tautoFocus: false,\n\tonInputChange: action(\"change\"),\n\tplaceholder: \"Say something\",\n};\nexport const WithLabel = Template.bind({});\nWithLabel.args = {\n\tautoFocus: false,\n\tonInputChange: action(\"change\"),\n\tinputLabel: \"First Name:\",\n};\nexport const WithPresetValue = Template.bind({});\nWithPresetValue.args = {\n\tautoFocus: false,\n\tonInputChange: action(\"change\"),\n\tvalue: \"John Smith\",\n};\nexport const NumbersOnly = Template.bind({});\nNumbersOnly.args = {\n\tautoFocus: false,\n\tonInputChange: action(\"change\"),\n\tinputPattern: \"^[0-9]*$\",\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleDialog.spec.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/tests/FinsembleDialog.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAG3D,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,OAAM,KAAK,CAAC,IAA6B,GAAI,CAAC,CAAC;QAC3E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { mount } from \"enzyme\";\r\nimport { describe, it } from \"mocha\";\r\nimport { expect } from \"chai\";\r\nimport { Basic } from \"../stories/FinsembleDialog.stories\";\r\nimport { FinsembleDialogProps } from \"../FinsembleDialog\";\r\n\r\ndescribe(\"<FinsembleDialog/>\", () => {\r\n\tit(\"should display text\", () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogProps)} />);\r\n\t\texpect(wrapper.find(\"div\").text()).to.equal(\"This is a test\");\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"FinsembleDialog.spec.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/tests/FinsembleDialog.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAG3D,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,OAAM,KAAK,CAAC,IAA6B,GAAI,CAAC,CAAC;QAC3E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { Basic } from \"../stories/FinsembleDialog.stories\";\nimport { FinsembleDialogProps } from \"../FinsembleDialog\";\n\ndescribe(\"<FinsembleDialog/>\", () => {\n\tit(\"should display text\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogProps)} />);\n\t\texpect(wrapper.find(\"div\").text()).to.equal(\"This is a test\");\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleDialogButton.spec.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/tests/FinsembleDialogButton.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAO,MAAM,0CAA0C,CAAC;AAItH,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAEjC,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,OAAM,KAAK,CAAC,IAAyC,GAAI,CAAC,CAAC;QACvF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAA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OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACvD,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAkC,EAAE,SAAS,CAAC,CAAC;QACjF,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,OAAM,KAAK,CAAC,IAAyC,GAAI,CAAC,CAAC;QACvF,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { mount } from \"enzyme\";\r\nimport { describe, it } from \"mocha\";\r\nimport { expect } from \"chai\";\r\nimport sinon from \"sinon\";\r\nimport { Basic, NoChildren, NoShow, CustomClass, AltButtonSize, tmp } from \"../stories/FinsembleDialogButton.stories\";\r\nimport { FinsembleDialogButtonProps } from \"../FinsembleDialogButton\";\r\n\r\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\r\nimport addons, { mockChannel } from \"@storybook/addons\";\r\naddons.setChannel(mockChannel());\r\n\r\ndescribe(\"<FinsembleDialogButton/>\", () => {\r\n\tit(\"should display text\", () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogButtonProps & tmp)} />);\r\n\t\texpect(wrapper.find(\"div\").text()).to.equal(\"Test\");\r\n\t});\r\n\r\n\tit(\"should not be visible if show is false\", () => {\r\n\t\tconst wrapper = mount(<NoShow {...(NoShow.args as FinsembleDialogButtonProps & tmp)} />);\r\n\t\texpect(wrapper.find(\"div\").exists()).to.be.false;\r\n\t});\r\n\r\n\tit(\"should not display text if none is provided\", () => {\r\n\t\tconst wrapper = mount(<NoChildren {...(NoChildren.args as FinsembleDialogButtonProps & tmp)} />);\r\n\t\texpect(wrapper.find(\"div\").text()).to.be.empty;\r\n\t});\r\n\r\n\tit(\"should include custom class if provided\", () => {\r\n\t\tconst wrapper = mount(<CustomClass {...(CustomClass.args as FinsembleDialogButtonProps & tmp)} />);\r\n\t\texpect(wrapper.find(\"div\").prop(\"className\")).to.contain(CustomClass.args?.className);\r\n\t});\r\n\r\n\tit(\"should include alternative button size if provided\", () => {\r\n\t\tconst wrapper = mount(<AltButtonSize {...(AltButtonSize.args as FinsembleDialogButtonProps & tmp)} />);\r\n\t\texpect(wrapper.find(\"div\").prop(\"className\")).to.contain(\"fsbl-button-lg\");\r\n\t});\r\n\r\n\tit(\"should call button click action if available\", () => {\r\n\t\tconst buttonSpy = sinon.spy(Basic.args as FinsembleDialogButtonProps, \"onClick\");\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogButtonProps & tmp)} />);\r\n\t\twrapper.find(\"div\").simulate(\"click\");\r\n\t\texpect(buttonSpy.calledOnce).to.be.true;\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"FinsembleDialogButton.spec.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/tests/FinsembleDialogButton.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAO,MAAM,0CAA0C,CAAC;AAItH,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC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AE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC7D,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,aAAa,OAAM,aAAa,CAAC,IAAyC,GAAI,CAAC,CAAC;QACvG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACvD,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAkC,EAAE,SAAS,CAAC,CAAC;QACjF,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,OAAM,KAAK,CAAC,IAAyC,GAAI,CAAC,CAAC;QACvF,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { Basic, NoChildren, NoShow, CustomClass, AltButtonSize, tmp } from \"../stories/FinsembleDialogButton.stories\";\nimport { FinsembleDialogButtonProps } from \"../FinsembleDialogButton\";\n\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<FinsembleDialogButton/>\", () => {\n\tit(\"should display text\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogButtonProps & tmp)} />);\n\t\texpect(wrapper.find(\"div\").text()).to.equal(\"Test\");\n\t});\n\n\tit(\"should not be visible if show is false\", () => {\n\t\tconst wrapper = mount(<NoShow {...(NoShow.args as FinsembleDialogButtonProps & tmp)} />);\n\t\texpect(wrapper.find(\"div\").exists()).to.be.false;\n\t});\n\n\tit(\"should not display text if none is provided\", () => {\n\t\tconst wrapper = mount(<NoChildren {...(NoChildren.args as FinsembleDialogButtonProps & tmp)} />);\n\t\texpect(wrapper.find(\"div\").text()).to.be.empty;\n\t});\n\n\tit(\"should include custom class if provided\", () => {\n\t\tconst wrapper = mount(<CustomClass {...(CustomClass.args as FinsembleDialogButtonProps & tmp)} />);\n\t\texpect(wrapper.find(\"div\").prop(\"className\")).to.contain(CustomClass.args?.className);\n\t});\n\n\tit(\"should include alternative button size if provided\", () => {\n\t\tconst wrapper = mount(<AltButtonSize {...(AltButtonSize.args as FinsembleDialogButtonProps & tmp)} />);\n\t\texpect(wrapper.find(\"div\").prop(\"className\")).to.contain(\"fsbl-button-lg\");\n\t});\n\n\tit(\"should call button click action if available\", () => {\n\t\tconst buttonSpy = sinon.spy(Basic.args as FinsembleDialogButtonProps, \"onClick\");\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogButtonProps & tmp)} />);\n\t\twrapper.find(\"div\").simulate(\"click\");\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleDialogQuestion.spec.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/tests/FinsembleDialogQuestion.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAO,MAAM,4CAA4C,CAAC;AAGxE,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,OAAM,KAAK,CAAC,IAA2C,GAAI,CAAC,CAAC;QACzF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACzF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC1F,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAClD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,OAAM,KAAK,CAAC,IAA2C,GAAI,CAAC,CAAC;QACzF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACjF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { mount } from \"enzyme\";\r\nimport { describe, it } from \"mocha\";\r\nimport { expect } from \"chai\";\r\nimport { Basic, tmp } from \"../stories/FinsembleDialogQuestion.stories\";\r\nimport { FinsembleDialogQuestionProps } from \"../FinsembleDialogQuestion\";\r\n\r\ndescribe(\"<FinsembleDialogQuestion/>\", () => {\r\n\tit(\"should display text\", () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogQuestionProps & tmp)} />);\r\n\t\texpect(wrapper.find(\"div\").text(), \"Includes question\").to.contain(Basic.args?.question);\r\n\t\texpect(wrapper.find(\"div\").text(), \"Includes children\").to.contain(Basic.args?.children);\r\n\t});\r\n\r\n\tit(\"should include custom class if provided\", () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogQuestionProps & tmp)} />);\r\n\t\texpect(wrapper.find(\"div\").prop(\"className\")).to.contain(Basic.args?.className);\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"FinsembleDialogQuestion.spec.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/tests/FinsembleDialogQuestion.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAO,MAAM,4CAA4C,CAAC;AAGxE,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,OAAM,KAAK,CAAC,IAA2C,GAAI,CAAC,CAAC;QACzF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACzF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC1F,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAClD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,OAAM,KAAK,CAAC,IAA2C,GAAI,CAAC,CAAC;QACzF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACjF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { Basic, tmp } from \"../stories/FinsembleDialogQuestion.stories\";\nimport { FinsembleDialogQuestionProps } from \"../FinsembleDialogQuestion\";\n\ndescribe(\"<FinsembleDialogQuestion/>\", () => {\n\tit(\"should display text\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogQuestionProps & tmp)} />);\n\t\texpect(wrapper.find(\"div\").text(), \"Includes question\").to.contain(Basic.args?.question);\n\t\texpect(wrapper.find(\"div\").text(), \"Includes children\").to.contain(Basic.args?.children);\n\t});\n\n\tit(\"should include custom class if provided\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogQuestionProps & tmp)} />);\n\t\texpect(wrapper.find(\"div\").prop(\"className\")).to.contain(Basic.args?.className);\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleDialogTextInput.spec.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/tests/FinsembleDialogTextInput.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACN,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAA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AE;gBACP,KAAK,EAAE,SAAS;aAChB;SACD,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QACzC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IACzD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QACrE,MAAM,UAAU,GAAG,OAAO,CAAC;QAC3B,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,IAAqC,EAAE,eAAe,CAAC,CAAC;QAChG,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,WAAW,OAAM,WAAW,CAAC,IAAsC,GAAI,CAAC,CAAC;QAChG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACxC,MAAM,EAAE;gBACP,KAAK,EAAE,UAAU;aACjB;SACD,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACxC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { mount } from \"enzyme\";\r\nimport { describe, it } from \"mocha\";\r\nimport { expect } from \"chai\";\r\nimport sinon from \"sinon\";\r\nimport {\r\n\tBasic,\r\n\tAutoFocus,\r\n\tMaxLength,\r\n\tPlaceholder,\r\n\tWithLabel,\r\n\tWithPresetValue,\r\n\tNumbersOnly,\r\n} from \"../stories/FinsembleDialogTextInput.stories\";\r\nimport { FinsembleDialogTextInputProps } from \"../FinsembleDialogTextInput\";\r\nimport { accessibilityAssessor } from \"../../smartDesktopDesigner/tests/a11y_helper\";\r\n\r\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\r\nimport addons, { mockChannel } from \"@storybook/addons\";\r\naddons.setChannel(mockChannel());\r\n\r\ndescribe(\"<FinsembleDialogTextInput/>\", () => {\r\n\tafterEach(() => {\r\n\t\tsinon.restore();\r\n\t});\r\n\r\n\tit(\"should pass accessibility tests\", async () => {\r\n\t\tconst wrapper = mount(<WithLabel {...(WithLabel.args as FinsembleDialogTextInputProps)} />);\r\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\r\n\t});\r\n\tit(\"should auto focus when autofocus=true\", () => {\r\n\t\tconst wrapper = mount(<AutoFocus {...(AutoFocus.args as FinsembleDialogTextInputProps)} />);\r\n\t\texpect(wrapper.find(\"input\").prop(\"autoFocus\")).to.be.true;\r\n\t});\r\n\tit(\"should not auto focus when autofocus=false\", () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogTextInputProps)} />);\r\n\t\texpect(wrapper.find(\"input\").prop(\"autoFocus\")).to.be.false;\r\n\t});\r\n\tit(\"should call input callback function\", () => {\r\n\t\tconst buttonSpy = sinon.spy(Basic.args as FinsembleDialogTextInputProps, \"onInputChange\");\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogTextInputProps)} />);\r\n\t\twrapper.find(\"input\").simulate(\"change\", {\r\n\t\t\ttarget: {\r\n\t\t\t\tvalue: \"Text\",\r\n\t\t\t},\r\n\t\t});\r\n\t\texpect(buttonSpy.calledOnce).to.be.true;\r\n\t});\r\n\tit(\"should include label when provided\", () => {\r\n\t\tconst wrapper = mount(<WithLabel {...(WithLabel.args as FinsembleDialogTextInputProps)} />);\r\n\t\texpect(wrapper.find(\"label\").text()).to.not.be.empty;\r\n\t});\r\n\tit(\"should not include label when not provided\", () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogTextInputProps)} />);\r\n\t\texpect(wrapper.find(\"label\").text()).to.be.empty;\r\n\t});\r\n\tit(\"should include placeholder, which is not treated as value\", () => {\r\n\t\tconst wrapper = mount(<Placeholder {...(Placeholder.args as FinsembleDialogTextInputProps)} />);\r\n\t\texpect(wrapper.find(\"input\").prop(\"placeholder\"), \"Has a placeholder property\").to.equal(\r\n\t\t\tPlaceholder.args?.placeholder\r\n\t\t);\r\n\t\texpect(wrapper.find(\"input\").prop(\"value\"), \"Has not set the value property\").to.be.empty;\r\n\t});\r\n\tit(\"should not allow input of greater than maxLength\", () => {\r\n\t\tconst wrapper = mount(<MaxLength {...(MaxLength.args as FinsembleDialogTextInputProps)} />);\r\n\t\texpect(wrapper.find(\"input\").prop(\"maxLength\")).to.equal(5);\r\n\t});\r\n\tit(\"should handle presetValue\", () => {\r\n\t\tconst wrapper = mount(<WithPresetValue {...(WithPresetValue.args as FinsembleDialogTextInputProps)} />);\r\n\t\texpect(wrapper.find(\"input\").prop(\"value\"), \"Has not set the value property\").to.be.not.undefined;\r\n\t});\r\n\tit(\"should not display letter inputs when only numbers are allowed\", () => {\r\n\t\tconst buttonSpy = sinon.spy(NumbersOnly.args as FinsembleDialogTextInputProps, \"onInputChange\");\r\n\t\tconst wrapper = mount(<NumbersOnly {...(NumbersOnly.args as FinsembleDialogTextInputProps)} />);\r\n\t\twrapper.find(\"input\").simulate(\"change\", {\r\n\t\t\ttarget: {\r\n\t\t\t\tvalue: \"123Text\",\r\n\t\t\t},\r\n\t\t});\r\n\t\texpect(buttonSpy.calledOnce).to.be.false;\r\n\t\texpect(wrapper.find(\"input\").prop(\"value\")).to.be.empty;\r\n\t});\r\n\tit(\"should display number inputs when only numbers are allowed\", () => {\r\n\t\tconst inputValue = \"12345\";\r\n\t\tconst buttonSpy = sinon.spy(NumbersOnly.args as FinsembleDialogTextInputProps, \"onInputChange\");\r\n\t\tconst wrapper = mount(<NumbersOnly {...(NumbersOnly.args as FinsembleDialogTextInputProps)} />);\r\n\t\twrapper.find(\"input\").simulate(\"change\", {\r\n\t\t\ttarget: {\r\n\t\t\t\tvalue: inputValue,\r\n\t\t\t},\r\n\t\t});\r\n\t\texpect(buttonSpy.calledOnce).to.be.true;\r\n\t\texpect(wrapper.find(\"input\").prop(\"value\")).to.equal(inputValue);\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"FinsembleDialogTextInput.spec.js","sourceRoot":"","sources":["../../../../src/components/legacyControls/tests/FinsembleDialogTextInput.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACN,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,eAAe,EACf,WAAW,GACX,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAGrF,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAEjC,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC5C,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,OAAM,SAAS,CAAC,IAAsC,GAAI,CAAC,CAAC;QAC5F,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,C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C,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACxC,MAAM,EAAE;gBACP,KAAK,EAAE,UAAU;aACjB;SACD,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACxC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport {\n\tBasic,\n\tAutoFocus,\n\tMaxLength,\n\tPlaceholder,\n\tWithLabel,\n\tWithPresetValue,\n\tNumbersOnly,\n} from \"../stories/FinsembleDialogTextInput.stories\";\nimport { FinsembleDialogTextInputProps } from \"../FinsembleDialogTextInput\";\nimport { accessibilityAssessor } from \"../../smartDesktopDesigner/tests/a11y_helper\";\n\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<FinsembleDialogTextInput/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"should pass accessibility tests\", async () => {\n\t\tconst wrapper = mount(<WithLabel {...(WithLabel.args as FinsembleDialogTextInputProps)} />);\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\tit(\"should auto focus when autofocus=true\", () => {\n\t\tconst wrapper = mount(<AutoFocus {...(AutoFocus.args as FinsembleDialogTextInputProps)} />);\n\t\texpect(wrapper.find(\"input\").prop(\"autoFocus\")).to.be.true;\n\t});\n\tit(\"should not auto focus when autofocus=false\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogTextInputProps)} />);\n\t\texpect(wrapper.find(\"input\").prop(\"autoFocus\")).to.be.false;\n\t});\n\tit(\"should call input callback function\", () => {\n\t\tconst buttonSpy = sinon.spy(Basic.args as FinsembleDialogTextInputProps, \"onInputChange\");\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogTextInputProps)} />);\n\t\twrapper.find(\"input\").simulate(\"change\", {\n\t\t\ttarget: {\n\t\t\t\tvalue: \"Text\",\n\t\t\t},\n\t\t});\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\tit(\"should include label when provided\", () => {\n\t\tconst wrapper = mount(<WithLabel {...(WithLabel.args as FinsembleDialogTextInputProps)} />);\n\t\texpect(wrapper.find(\"label\").text()).to.not.be.empty;\n\t});\n\tit(\"should not include label when not provided\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as FinsembleDialogTextInputProps)} />);\n\t\texpect(wrapper.find(\"label\").text()).to.be.empty;\n\t});\n\tit(\"should include placeholder, which is not treated as value\", () => {\n\t\tconst wrapper = mount(<Placeholder {...(Placeholder.args as FinsembleDialogTextInputProps)} />);\n\t\texpect(wrapper.find(\"input\").prop(\"placeholder\"), \"Has a placeholder property\").to.equal(\n\t\t\tPlaceholder.args?.placeholder\n\t\t);\n\t\texpect(wrapper.find(\"input\").prop(\"value\"), \"Has not set the value property\").to.be.empty;\n\t});\n\tit(\"should not allow input of greater than maxLength\", () => {\n\t\tconst wrapper = mount(<MaxLength {...(MaxLength.args as FinsembleDialogTextInputProps)} />);\n\t\texpect(wrapper.find(\"input\").prop(\"maxLength\")).to.equal(5);\n\t});\n\tit(\"should handle presetValue\", () => {\n\t\tconst wrapper = mount(<WithPresetValue {...(WithPresetValue.args as FinsembleDialogTextInputProps)} />);\n\t\texpect(wrapper.find(\"input\").prop(\"value\"), \"Has not set the value property\").to.be.not.undefined;\n\t});\n\tit(\"should not display letter inputs when only numbers are allowed\", () => {\n\t\tconst buttonSpy = sinon.spy(NumbersOnly.args as FinsembleDialogTextInputProps, \"onInputChange\");\n\t\tconst wrapper = mount(<NumbersOnly {...(NumbersOnly.args as FinsembleDialogTextInputProps)} />);\n\t\twrapper.find(\"input\").simulate(\"change\", {\n\t\t\ttarget: {\n\t\t\t\tvalue: \"123Text\",\n\t\t\t},\n\t\t});\n\t\texpect(buttonSpy.calledOnce).to.be.false;\n\t\texpect(wrapper.find(\"input\").prop(\"value\")).to.be.empty;\n\t});\n\tit(\"should display number inputs when only numbers are allowed\", () => {\n\t\tconst inputValue = \"12345\";\n\t\tconst buttonSpy = sinon.spy(NumbersOnly.args as FinsembleDialogTextInputProps, \"onInputChange\");\n\t\tconst wrapper = mount(<NumbersOnly {...(NumbersOnly.args as FinsembleDialogTextInputProps)} />);\n\t\twrapper.find(\"input\").simulate(\"change\", {\n\t\t\ttarget: {\n\t\t\t\tvalue: inputValue,\n\t\t\t},\n\t\t});\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t\texpect(wrapper.find(\"input\").prop(\"value\")).to.equal(inputValue);\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LinkerMenu.js","sourceRoot":"","sources":["../../../src/components/linker/LinkerMenu.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAe,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAKlF,MAAM,aAAa,GAA4B,GAAG,EAAE;IACnD,MAAM,KAAK,GAAgB,WAAW,CAAC,CAAC,YAAiB,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC;IA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E,yCAAyC;aAChD,CAAC,CAAC;YACH,IAAI,IAAI,EAAE;gBACT,cAAc,CAAC,yBAAyB,CAAC,CAAC;aAC1C;iBAAM;gBACN,cAAc,CAAC,eAAe,CAAC,CAAC;aAChC;QACF,CAAC,CAAC,EAAE,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN;QACE,WAAW,KAAK,eAAe,IAAI,CACnC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK;YACrB,oBAAC,aAAa,OAAG,CACP,CACX;QACA,WAAW,KAAK,yBAAyB,IAAI,oBAAC,uBAAuB,OAAG,CACvE,CACH,CAAC;AACH,CAAC,CAAC;AAKF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CAC/B,oBAAC,iBAAiB;IACjB,oBAAC,WAAW,OAAG,CACI,CACpB,CAAC","sourcesContent":["/*!\r\n * Copyright 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React, { useEffect, useState, useRef } from \"react\";\r\nimport { FinsembleProvider } from \"../FinsembleProvider\";\r\nimport { useDispatch, useSelector, Provider } from \"react-redux\";\r\nimport { LinkerStore, actions, store } from \"./remoteRedux\";\r\nimport \"../../assets/css/linkerWindow.css\";\r\nimport { LinkerElement as LinkerElementDeprecated } from \"./LinkerMenuDeprecated\";\r\n\r\ntype Channel = LinkerStore[\"allChannels\"][0];\r\ntype JoinedChannels = string[];\r\n\r\nconst LinkerElement: React.FunctionComponent = () => {\r\n\tconst state: LinkerStore = useSelector((currentState: any) => currentState);\r\n\tconst dispatch = useDispatch();\r\n\tconst { activeWindowName } = state;\r\n\tconst joinedChannels: JoinedChannels = state?.clients?.[activeWindowName ?? \"\"]?.joinedChannels ?? [];\r\n\tconst allChannels: Channel[] = state?.allChannels ?? [];\r\n\t// Track which menu item has focus for keyboard users\r\n\tconst [focusedMenuIndex, setFocusedMenuIndex] = useState(0);\r\n\tconst containerElement = useRef<HTMLDivElement>(null);\r\n\r\n\tconst hideWindow = () => {\r\n\t\t// Must blur or you end up having to click twice to show the window.\r\n\t\t// If you just hide, the first time the user clicks\r\n\t\t// on the linker button, the blur will trigger, which will hide the window.\r\n\t\tfinsembleWindow.blur();\r\n\t\tfinsembleWindow.hide();\r\n\t\tsetFocusedMenuIndex(0);\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\t// Move focus to container element, so that keystrokes can be captured for keyboard users (accessibility)\r\n\t\tcontainerElement.current && containerElement.current.focus();\r\n\r\n\t\t// Without these events, the linker menu is opened but doesn't focus, so the blur event never fires, and the menu is left\r\n\t\t// orphaned and sad.\r\n\r\n\t\tconst focusWindow = () => {\r\n\t\t\tfinsembleWindow.focus();\r\n\t\t};\r\n\r\n\t\tFSBL.Clients.Logger.system.log(\"Linker component is mounted. Initializing.\");\r\n\t\tfinsembleWindow.addEventListener(\"blurred\", hideWindow);\r\n\t\tfinsembleWindow.addEventListener(\"shown\", focusWindow);\r\n\r\n\t\treturn () => {\r\n\t\t\tFSBL.Clients.Logger.system.log(\"Linker component is unmounted. Cleaning up the event listeners.\");\r\n\t\t\tfinsembleWindow.removeEventListener(\"blurred\", hideWindow);\r\n\t\t\tfinsembleWindow.removeEventListener(\"shown\", focusWindow);\r\n\t\t};\r\n\t}, []);\r\n\r\n\tconst toggleChannel = (name: string) => {\r\n\t\t// TODO, import action creators from finsemble-core rather than building these by hand\r\n\t\tif (activeWindowName) {\r\n\t\t\tif (joinedChannels.includes(name)) {\r\n\t\t\t\tdispatch(\r\n\t\t\t\t\tactions.unlinkChannels({\r\n\t\t\t\t\t\ttype: \"linker/unlinkChannels\",\r\n\t\t\t\t\t\tpayload: {\r\n\t\t\t\t\t\t\tchannels: [name],\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\t\twindowName: activeWindowName,\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} else {\r\n\t\t\t\tdispatch(\r\n\t\t\t\t\tactions.linkChannels({\r\n\t\t\t\t\t\ttype: \"linker/linkChannels\",\r\n\t\t\t\t\t\tpayload: {\r\n\t\t\t\t\t\t\tchannels: [name],\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tmeta: {\r\n\t\t\t\t\t\t\twindowName: activeWindowName,\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\t\thideWindow();\r\n\t};\r\n\r\n\tconst channelElements =\r\n\t\tactiveWindowName &&\r\n\t\tallChannels.map(({ name, cssClassName }, index: number) => {\r\n\t\t\tconst active = joinedChannels.includes(name);\r\n\r\n\t\t\treturn (\r\n\t\t\t\t<div\r\n\t\t\t\t\tkey={name}\r\n\t\t\t\t\tclassName={`channel-wrapper ${cssClassName} ${focusedMenuIndex === index ? \"focused\" : \"\"}`}\r\n\t\t\t\t\tonClick={() => toggleChannel(name)}\r\n\t\t\t\t>\r\n\t\t\t\t\t<div className=\"channel-label\">{name}</div>\r\n\t\t\t\t\t<div className=\"linker-glyph\">{active ? <i className=\"active-linker-group ff-check-mark\"></i> : null}</div>\r\n\t\t\t\t</div>\r\n\t\t\t);\r\n\t\t});\r\n\r\n\tconst manageKeyboardNavigation = (evt: React.KeyboardEvent<HTMLDivElement>) => {\r\n\t\tconst lastChannelIndex = allChannels.length - 1;\r\n\t\tif (evt.key === \"ArrowDown\") {\r\n\t\t\tsetFocusedMenuIndex(focusedMenuIndex >= lastChannelIndex ? 0 : focusedMenuIndex + 1);\r\n\t\t} else if (evt.key === \"ArrowUp\") {\r\n\t\t\tsetFocusedMenuIndex(focusedMenuIndex <= 0 ? lastChannelIndex : focusedMenuIndex - 1);\r\n\t\t} else if (evt.key === \"Enter\") {\r\n\t\t\ttoggleChannel(allChannels[focusedMenuIndex].name);\r\n\t\t} else if (evt.key === \"Escape\") {\r\n\t\t\thideWindow();\r\n\t\t}\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName=\"linkerContainer\"\r\n\t\t\ttabIndex={0}\r\n\t\t\trole=\"menu\"\r\n\t\t\tonKeyDown={manageKeyboardNavigation}\r\n\t\t\tref={containerElement}\r\n\t\t>\r\n\t\t\t{channelElements}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\n/**\r\n * Picks whether to display the current or deprecated LinkerElement.\r\n * If config `finsemble.servicesConfig.linker.enabled` is set to true then the deprecated version will be used.\r\n *\r\n * This code should be removed once the linkerClient is removed from Finsemble.\r\n */\r\nconst WhichLinker = () => {\r\n\tconst [whichLinker, setWhichLinker] = React.useState(\"\");\r\n\r\n\tuseEffect(() => {\r\n\t\t(async () => {\r\n\t\t\tconst { err, data } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\t\tfield: \"finsemble.servicesConfig.linker.enabled\",\r\n\t\t\t});\r\n\t\t\tif (data) {\r\n\t\t\t\tsetWhichLinker(\"LinkerElementDeprecated\");\r\n\t\t\t} else {\r\n\t\t\t\tsetWhichLinker(\"LinkerElement\");\r\n\t\t\t}\r\n\t\t})();\r\n\t}, []);\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{whichLinker === \"LinkerElement\" && (\r\n\t\t\t\t<Provider store={store}>\r\n\t\t\t\t\t<LinkerElement />\r\n\t\t\t\t</Provider>\r\n\t\t\t)}\r\n\t\t\t{whichLinker === \"LinkerElementDeprecated\" && <LinkerElementDeprecated />}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\n/**\r\n * The Linker icon on the window titlebar that launches the linker menu.\r\n */\r\nexport const LinkerMenu = () => (\r\n\t<FinsembleProvider>\r\n\t\t<WhichLinker />\r\n\t</FinsembleProvider>\r\n);\r\n"]}
1
+ {"version":3,"file":"LinkerMenu.js","sourceRoot":"","sources":["../../../src/components/linker/LinkerMenu.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3D,OA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AAS,EAAE,wBAAwB,EACnC,GAAG,EAAE,gBAAgB,IAEpB,eAAe,CACX,CACN,CAAC;AACH,CAAC,CAAC;AAQF,MAAM,WAAW,GAAG,GAAG,EAAE;IACxB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACd,CAAC,KAAK,IAAI,EAAE;YACX,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC;gBAC9D,KAAK,EAAE,yCAAyC;aAChD,CAAC,CAAC;YACH,IAAI,IAAI,EAAE;gBACT,cAAc,CAAC,yBAAyB,CAAC,CAAC;aAC1C;iBAAM;gBACN,cAAc,CAAC,eAAe,CAAC,CAAC;aAChC;QACF,CAAC,CAAC,EAAE,CAAC;IACN,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN;QACE,WAAW,KAAK,eAAe,IAAI,CACnC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK;YACrB,oBAAC,aAAa,OAAG,CACP,CACX;QACA,WAAW,KAAK,yBAAyB,IAAI,oBAAC,uBAAuB,OAAG,CACvE,CACH,CAAC;AACH,CAAC,CAAC;AAKF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CAC/B,oBAAC,iBAAiB;IACjB,oBAAC,WAAW,OAAG,CACI,CACpB,CAAC","sourcesContent":["/*!\n * Copyright 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React, { useEffect, useState, useRef } from \"react\";\nimport { FinsembleProvider } from \"../FinsembleProvider\";\nimport { useDispatch, useSelector, Provider } from \"react-redux\";\nimport { LinkerStore, actions, store } from \"./remoteRedux\";\nimport \"../../assets/css/linkerWindow.css\";\nimport { LinkerElement as LinkerElementDeprecated } from \"./LinkerMenuDeprecated\";\n\ntype Channel = LinkerStore[\"allChannels\"][0];\ntype JoinedChannels = string[];\n\nconst LinkerElement: React.FunctionComponent = () => {\n\tconst state: LinkerStore = useSelector((currentState: any) => currentState);\n\tconst dispatch = useDispatch();\n\tconst { activeWindowName } = state;\n\tconst joinedChannels: JoinedChannels = state?.clients?.[activeWindowName ?? \"\"]?.joinedChannels ?? [];\n\tconst allChannels: Channel[] = state?.allChannels ?? [];\n\t// Track which menu item has focus for keyboard users\n\tconst [focusedMenuIndex, setFocusedMenuIndex] = useState(0);\n\tconst containerElement = useRef<HTMLDivElement>(null);\n\n\tconst hideWindow = () => {\n\t\t// Must blur or you end up having to click twice to show the window.\n\t\t// If you just hide, the first time the user clicks\n\t\t// on the linker button, the blur will trigger, which will hide the window.\n\t\tfinsembleWindow.blur();\n\t\tfinsembleWindow.hide();\n\t\tsetFocusedMenuIndex(0);\n\t};\n\n\tuseEffect(() => {\n\t\t// Move focus to container element, so that keystrokes can be captured for keyboard users (accessibility)\n\t\tcontainerElement.current && containerElement.current.focus();\n\n\t\t// Without these events, the linker menu is opened but doesn't focus, so the blur event never fires, and the menu is left\n\t\t// orphaned and sad.\n\n\t\tconst focusWindow = () => {\n\t\t\tfinsembleWindow.focus();\n\t\t};\n\n\t\tFSBL.Clients.Logger.system.log(\"Linker component is mounted. Initializing.\");\n\t\tfinsembleWindow.addEventListener(\"blurred\", hideWindow);\n\t\tfinsembleWindow.addEventListener(\"shown\", focusWindow);\n\n\t\treturn () => {\n\t\t\tFSBL.Clients.Logger.system.log(\"Linker component is unmounted. Cleaning up the event listeners.\");\n\t\t\tfinsembleWindow.removeEventListener(\"blurred\", hideWindow);\n\t\t\tfinsembleWindow.removeEventListener(\"shown\", focusWindow);\n\t\t};\n\t}, []);\n\n\tconst toggleChannel = (name: string) => {\n\t\t// TODO, import action creators from finsemble-core rather than building these by hand\n\t\tif (activeWindowName) {\n\t\t\tif (joinedChannels.includes(name)) {\n\t\t\t\tdispatch(\n\t\t\t\t\tactions.unlinkChannels({\n\t\t\t\t\t\ttype: \"linker/unlinkChannels\",\n\t\t\t\t\t\tpayload: {\n\t\t\t\t\t\t\tchannels: [name],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\twindowName: activeWindowName,\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tdispatch(\n\t\t\t\t\tactions.linkChannels({\n\t\t\t\t\t\ttype: \"linker/linkChannels\",\n\t\t\t\t\t\tpayload: {\n\t\t\t\t\t\t\tchannels: [name],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\twindowName: activeWindowName,\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\thideWindow();\n\t};\n\n\tconst channelElements =\n\t\tactiveWindowName &&\n\t\tallChannels.map(({ name, cssClassName }, index: number) => {\n\t\t\tconst active = joinedChannels.includes(name);\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tkey={name}\n\t\t\t\t\tclassName={`channel-wrapper ${cssClassName} ${focusedMenuIndex === index ? \"focused\" : \"\"}`}\n\t\t\t\t\tonClick={() => toggleChannel(name)}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"channel-label\">{name}</div>\n\t\t\t\t\t<div className=\"linker-glyph\">{active ? <i className=\"active-linker-group ff-check-mark\"></i> : null}</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t});\n\n\tconst manageKeyboardNavigation = (evt: React.KeyboardEvent<HTMLDivElement>) => {\n\t\tconst lastChannelIndex = allChannels.length - 1;\n\t\tif (evt.key === \"ArrowDown\") {\n\t\t\tsetFocusedMenuIndex(focusedMenuIndex >= lastChannelIndex ? 0 : focusedMenuIndex + 1);\n\t\t} else if (evt.key === \"ArrowUp\") {\n\t\t\tsetFocusedMenuIndex(focusedMenuIndex <= 0 ? lastChannelIndex : focusedMenuIndex - 1);\n\t\t} else if (evt.key === \"Enter\") {\n\t\t\ttoggleChannel(allChannels[focusedMenuIndex].name);\n\t\t} else if (evt.key === \"Escape\") {\n\t\t\thideWindow();\n\t\t}\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"linkerContainer\"\n\t\t\ttabIndex={0}\n\t\t\trole=\"menu\"\n\t\t\tonKeyDown={manageKeyboardNavigation}\n\t\t\tref={containerElement}\n\t\t>\n\t\t\t{channelElements}\n\t\t</div>\n\t);\n};\n\n/**\n * Picks whether to display the current or deprecated LinkerElement.\n * If config `finsemble.servicesConfig.linker.enabled` is set to true then the deprecated version will be used.\n *\n * This code should be removed once the linkerClient is removed from Finsemble.\n */\nconst WhichLinker = () => {\n\tconst [whichLinker, setWhichLinker] = React.useState(\"\");\n\n\tuseEffect(() => {\n\t\t(async () => {\n\t\t\tconst { err, data } = await FSBL.Clients.ConfigClient.getValue({\n\t\t\t\tfield: \"finsemble.servicesConfig.linker.enabled\",\n\t\t\t});\n\t\t\tif (data) {\n\t\t\t\tsetWhichLinker(\"LinkerElementDeprecated\");\n\t\t\t} else {\n\t\t\t\tsetWhichLinker(\"LinkerElement\");\n\t\t\t}\n\t\t})();\n\t}, []);\n\n\treturn (\n\t\t<>\n\t\t\t{whichLinker === \"LinkerElement\" && (\n\t\t\t\t<Provider store={store}>\n\t\t\t\t\t<LinkerElement />\n\t\t\t\t</Provider>\n\t\t\t)}\n\t\t\t{whichLinker === \"LinkerElementDeprecated\" && <LinkerElementDeprecated />}\n\t\t</>\n\t);\n};\n\n/**\n * The Linker icon on the window titlebar that launches the linker menu.\n */\nexport const LinkerMenu = () => (\n\t<FinsembleProvider>\n\t\t<WhichLinker />\n\t</FinsembleProvider>\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LinkerMenuDeprecated.js","sourceRoot":"","sources":["../../../src/components/linker/LinkerMenuDeprecated.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAA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SAAS,EAAC,mCAAmC,GAAK,CAAC,CAAC,CAAC,IAAI,CACjE,CACD,CACN,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,6BAAK,SAAS,EAAC,iBAAiB,IAAE,eAAe,CAAO,CAAC;AACjE,CAAC,CAAC;AAKF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CAC/B,oBAAC,iBAAiB;IACjB,oBAAC,aAAa,OAAG,CACE,CACpB,CAAC","sourcesContent":["/*!\r\n * Copyright 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n *\r\n * This is a deprecated version of LinkerMenu which uses the linkerClient. It is not compatible with FDC3 interop.\r\n */\r\nimport * as React from \"react\";\r\n\r\nimport { Channel } from \"../../types/linkerTypes\";\r\nimport { useLinker } from \"../../hooks/useLinker\";\r\nimport { FinsembleProvider } from \"../FinsembleProvider\";\r\nimport \"../../assets/css/linkerWindow.css\";\r\n\r\nconst MAXIMUM_CHANNEL_SELECTIONS = 20;\r\nconst HIT_MAXIMUM_CHANNEL_SELECTIONS_ERROR_MESSAGE = `Attempted to render more channels than allowed. UI may look bad displaying more than ${MAXIMUM_CHANNEL_SELECTIONS} channels`;\r\n\r\nexport const LinkerElement = () => {\r\n\tFSBL.Clients.Logger.deprecated(\r\n\t\t\"This is a deprecated version of LinkerMenu which uses the linkerClient. It will be removed in a future Finsemble version. It is not compatible with FDC3 interop.\"\r\n\t);\r\n\tconst { state, toggleChannel } = useLinker();\r\n\r\n\tconst allChannels = Object.values(state.channels) as Channel[];\r\n\tconst channelElements = allChannels.map(({ color, border, name, active, id }, index) => {\r\n\t\tif (index > MAXIMUM_CHANNEL_SELECTIONS - 1) {\r\n\t\t\tFSBL.Clients.Logger.error(HIT_MAXIMUM_CHANNEL_SELECTIONS_ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst groupClass = `linkerGroup ${color}`;\r\n\t\tconst style = {\r\n\t\t\tbackgroundColor: color,\r\n\t\t\tborder: `1px solid ${border ?? color}`,\r\n\t\t};\r\n\t\treturn (\r\n\t\t\t<div key={id} className=\"channel-wrapper\" onClick={() => toggleChannel(id)}>\r\n\t\t\t\t{state.isAccessibleLinker ? <div className=\"channel-label\">{name}</div> : null}\r\n\t\t\t\t<div className={groupClass} style={style}>\r\n\t\t\t\t\t{active ? <i className=\"active-linker-group ff-check-mark\"></i> : null}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t);\r\n\t});\r\n\r\n\treturn <div className=\"linkerContainer\">{channelElements}</div>;\r\n};\r\n\r\n/**\r\n * The Linker icon on the window titlebar that launches the linker menu.\r\n */\r\nexport const LinkerMenu = () => (\r\n\t<FinsembleProvider>\r\n\t\t<LinkerElement />\r\n\t</FinsembleProvider>\r\n);\r\n"]}
1
+ {"version":3,"file":"LinkerMenuDeprecated.js","sourceRoot":"","sources":["../../../src/components/linker/LinkerMenuDeprecated.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,mCAAmC,CAAC;AAE3C,MAAM,0BAA0B,GAAG,EAAE,CAAC;AACtC,MAAM,4CAA4C,GAAG,wFAAwF,0BAA0B,WAAW,CAAC;AAEnL,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IACjC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAC7B,oKAAoK,CACpK,CAAC;IACF,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,CAAC;IAE7C,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAc,CAAC;IAC/D,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;QACtF,IAAI,KAAK,GAAG,0BAA0B,GAAG,CAAC,EAAE;YAC3C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;YACxE,OAAO;SACP;QACD,MAAM,UAAU,GAAG,eAAe,KAAK,EAAE,CAAC;QAC1C,MAAM,KAAK,GAAG;YACb,eAAe,EAAE,KAAK;YACtB,MAAM,EAAE,aAAa,MAAM,IAAI,KAAK,EAAE;SACtC,CAAC;QACF,OAAO,CACN,6BAAK,GAAG,EAAE,EAAE,EAAE,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;YACxE,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,eAAe,IAAE,IAAI,CAAO,CAAC,CAAC,CAAC,IAAI;YAC9E,6BAAK,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,IACtC,MAAM,CAAC,CAAC,CAAC,2BAAG,SAAS,EAAC,mCAAmC,GAAK,CAAC,CAAC,CAAC,IAAI,CACjE,CACD,CACN,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,6BAAK,SAAS,EAAC,iBAAiB,IAAE,eAAe,CAAO,CAAC;AACjE,CAAC,CAAC;AAKF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CAC/B,oBAAC,iBAAiB;IACjB,oBAAC,aAAa,OAAG,CACE,CACpB,CAAC","sourcesContent":["/*!\n * Copyright 2020 by ChartIQ, Inc.\n * All rights reserved.\n *\n * This is a deprecated version of LinkerMenu which uses the linkerClient. It is not compatible with FDC3 interop.\n */\nimport * as React from \"react\";\n\nimport { Channel } from \"../../types/linkerTypes\";\nimport { useLinker } from \"../../hooks/useLinker\";\nimport { FinsembleProvider } from \"../FinsembleProvider\";\nimport \"../../assets/css/linkerWindow.css\";\n\nconst MAXIMUM_CHANNEL_SELECTIONS = 20;\nconst HIT_MAXIMUM_CHANNEL_SELECTIONS_ERROR_MESSAGE = `Attempted to render more channels than allowed. UI may look bad displaying more than ${MAXIMUM_CHANNEL_SELECTIONS} channels`;\n\nexport const LinkerElement = () => {\n\tFSBL.Clients.Logger.deprecated(\n\t\t\"This is a deprecated version of LinkerMenu which uses the linkerClient. It will be removed in a future Finsemble version. It is not compatible with FDC3 interop.\"\n\t);\n\tconst { state, toggleChannel } = useLinker();\n\n\tconst allChannels = Object.values(state.channels) as Channel[];\n\tconst channelElements = allChannels.map(({ color, border, name, active, id }, index) => {\n\t\tif (index > MAXIMUM_CHANNEL_SELECTIONS - 1) {\n\t\t\tFSBL.Clients.Logger.error(HIT_MAXIMUM_CHANNEL_SELECTIONS_ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\tconst groupClass = `linkerGroup ${color}`;\n\t\tconst style = {\n\t\t\tbackgroundColor: color,\n\t\t\tborder: `1px solid ${border ?? color}`,\n\t\t};\n\t\treturn (\n\t\t\t<div key={id} className=\"channel-wrapper\" onClick={() => toggleChannel(id)}>\n\t\t\t\t{state.isAccessibleLinker ? <div className=\"channel-label\">{name}</div> : null}\n\t\t\t\t<div className={groupClass} style={style}>\n\t\t\t\t\t{active ? <i className=\"active-linker-group ff-check-mark\"></i> : null}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t});\n\n\treturn <div className=\"linkerContainer\">{channelElements}</div>;\n};\n\n/**\n * The Linker icon on the window titlebar that launches the linker menu.\n */\nexport const LinkerMenu = () => (\n\t<FinsembleProvider>\n\t\t<LinkerElement />\n\t</FinsembleProvider>\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/linker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { LinkerMenu } from \"./LinkerMenu\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/linker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { LinkerMenu } from \"./LinkerMenu\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"remoteRedux.js","sourceRoot":"","sources":["../../../src/components/linker/remoteRedux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;AAE7B,MAAM,YAAY,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC;AAkB3C,MAAM,UAAU,GAAgB;IAC/B,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC;IACnC,cAAc,EAAE,UAAU;IAC1B,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE;QACV,WAAW,CAAC,yBAAyB,CAAC,EAAE,MAAM,EAAE,sCAAsC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;KAC1G;CACD,CAAC,CAAC;AA6BH,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,eAAe,EAAE,YAAY,CAA+B,wBAAwB,CAAC;IACrF,YAAY,EAAE,YAAY,CAAsB,qBAAqB,CAAC;IACtE,cAAc,EAAE,YAAY,CAAwB,uBAAuB,CAAC;CAC5E,CAAC","sourcesContent":["import { configureStore, createAction } from \"@reduxjs/toolkit\";\r\n\r\n// @todo, import this so that we get enumerated types!\r\nconst { remoteRedux } = FSBL;\r\n\r\nconst dummyReducer = (state: any) => state;\r\n\r\n//, @todo import all this from finsemble-core\r\nexport type LinkerStore = {\r\n\tclients: {\r\n\t\t[windowName: string]: {\r\n\t\t\tjoinedChannels: string[];\r\n\t\t};\r\n\t};\r\n\tallChannels: {\r\n\t\tname: string;\r\n\t\tcolor: string;\r\n\t\tcssClassName: string;\r\n\t\tlabel: string;\r\n\t}[];\r\n\tactiveWindowName?: string;\r\n};\r\n\r\nconst emptyStore: LinkerStore = {\r\n\tclients: {},\r\n\tallChannels: [],\r\n};\r\n\r\nexport const store = configureStore({\r\n\tpreloadedState: emptyStore,\r\n\treducer: dummyReducer,\r\n\tenhancers: [\r\n\t\tremoteRedux.remoteReduxClientEnhancer({ server: \"@@finsemble/remoteRedux/InteropStore\", slice: \"linker\" }),\r\n\t],\r\n});\r\n\r\nexport type InteropLinkChannels = {\r\n\ttype: \"linker/linkChannels\";\r\n\tpayload: {\r\n\t\tchannels: string[];\r\n\t};\r\n\tmeta: {\r\n\t\twindowName: string;\r\n\t};\r\n};\r\n\r\nexport type InteropUnlinkChannels = {\r\n\ttype: \"linker/unlinkChannels\";\r\n\tpayload: {\r\n\t\tchannels?: string[];\r\n\t};\r\n\tmeta: {\r\n\t\twindowName: string;\r\n\t};\r\n};\r\n\r\nexport type InteropLinkerSetActiveWindow = {\r\n\ttype: \"linker/setActiveWindow\";\r\n\tpayload: {\r\n\t\twindowName: string | undefined;\r\n\t};\r\n};\r\n\r\nexport const actions = {\r\n\tsetActiveWindow: createAction<InteropLinkerSetActiveWindow>(\"linker/setActiveWindow\"),\r\n\tlinkChannels: createAction<InteropLinkChannels>(\"linker/linkChannels\"),\r\n\tunlinkChannels: createAction<InteropUnlinkChannels>(\"linker/unlinkChannels\"),\r\n};\r\n// end, @todo\r\n"]}
1
+ {"version":3,"file":"remoteRedux.js","sourceRoot":"","sources":["../../../src/components/linker/remoteRedux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;AAE7B,MAAM,YAAY,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC;AAkB3C,MAAM,UAAU,GAAgB;IAC/B,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC;IACnC,cAAc,EAAE,UAAU;IAC1B,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE;QACV,WAAW,CAAC,yBAAyB,CAAC,EAAE,MAAM,EAAE,sCAAsC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;KAC1G;CACD,CAAC,CAAC;AA6BH,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,eAAe,EAAE,YAAY,CAA+B,wBAAwB,CAAC;IACrF,YAAY,EAAE,YAAY,CAAsB,qBAAqB,CAAC;IACtE,cAAc,EAAE,YAAY,CAAwB,uBAAuB,CAAC;CAC5E,CAAC","sourcesContent":["import { configureStore, createAction } from \"@reduxjs/toolkit\";\n\n// @todo, import this so that we get enumerated types!\nconst { remoteRedux } = FSBL;\n\nconst dummyReducer = (state: any) => state;\n\n//, @todo import all this from finsemble-core\nexport type LinkerStore = {\n\tclients: {\n\t\t[windowName: string]: {\n\t\t\tjoinedChannels: string[];\n\t\t};\n\t};\n\tallChannels: {\n\t\tname: string;\n\t\tcolor: string;\n\t\tcssClassName: string;\n\t\tlabel: string;\n\t}[];\n\tactiveWindowName?: string;\n};\n\nconst emptyStore: LinkerStore = {\n\tclients: {},\n\tallChannels: [],\n};\n\nexport const store = configureStore({\n\tpreloadedState: emptyStore,\n\treducer: dummyReducer,\n\tenhancers: [\n\t\tremoteRedux.remoteReduxClientEnhancer({ server: \"@@finsemble/remoteRedux/InteropStore\", slice: \"linker\" }),\n\t],\n});\n\nexport type InteropLinkChannels = {\n\ttype: \"linker/linkChannels\";\n\tpayload: {\n\t\tchannels: string[];\n\t};\n\tmeta: {\n\t\twindowName: string;\n\t};\n};\n\nexport type InteropUnlinkChannels = {\n\ttype: \"linker/unlinkChannels\";\n\tpayload: {\n\t\tchannels?: string[];\n\t};\n\tmeta: {\n\t\twindowName: string;\n\t};\n};\n\nexport type InteropLinkerSetActiveWindow = {\n\ttype: \"linker/setActiveWindow\";\n\tpayload: {\n\t\twindowName: string | undefined;\n\t};\n};\n\nexport const actions = {\n\tsetActiveWindow: createAction<InteropLinkerSetActiveWindow>(\"linker/setActiveWindow\"),\n\tlinkChannels: createAction<InteropLinkChannels>(\"linker/linkChannels\"),\n\tunlinkChannels: createAction<InteropUnlinkChannels>(\"linker/unlinkChannels\"),\n};\n// end, @todo\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AA4B5C,MAAM,CAAC,MAAM,IAAI,GAAuC,CAAC,KAAK,EAAE,EAAE;IACjE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAElC,OAAO,CACN,oBAAC,SAAS,OAAK,KAAK;QACnB,oBAAC,UAAU,QAAE,KAAK,CAAc;QAChC,oBAAC,WAAW,QAAE,QAAQ,CAAe,CAC1B,CACZ,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { MenuShell } from \"./MenuShell\";\r\nimport { MenuToggle } from \"./MenuToggle\";\r\nimport { MenuContent } from \"./MenuContent\";\r\n\r\nexport type MenuProps = {\r\n\tclassName?: string;\r\n\tcloseHotkey?: Array<string>;\r\n\theight?: number;\r\n\tid?: string;\r\n\tmaxHeight?: number;\r\n\topenHotkey?: Array<string>;\r\n\twidth?: number;\r\n\ttitle?: React.ReactNode;\r\n};\r\n\r\n/**\r\n * A convenience component that fully encapsulates a menu by constructing a <MenuShell> and its contents.\r\n * All of the props are passed to MenuShell.\r\n *\r\n * @param {string} [className] - Custom body class for the menu contents. These classes will be set on the <body> tag for the Menu's drop down window.\r\n * @param {array} [closeHotkey=[\"escape\"] ] - A hotkey combination to close the menu. Defaults to [\"escape\"].\r\n * @param {number} [height] - Custom height for the menu. If not set then the height will be automatically calculated based on the content height and available monitor space.\r\n * @param {string} [id] - Unique ID for the menu. Defaults to a random string.\r\n * @param {number} [maxHeight=Infinity] - Maximum height of the menu.\r\n * @param {array} [openHotkey] - A hotkey combination to open the menu.\r\n * @param {number} [width=180] - Custom width for the menu.\r\n * @param {title} [string] - Name that appears in the menu's <MenuToggle> button.\r\n *\r\n */\r\n\r\nexport const Menu: React.FunctionComponent<MenuProps> = (props) => {\r\n\tconst { children, title } = props;\r\n\r\n\treturn (\r\n\t\t<MenuShell {...props}>\r\n\t\t\t<MenuToggle>{title}</MenuToggle>\r\n\t\t\t<MenuContent>{children}</MenuContent>\r\n\t\t</MenuShell>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AA4B5C,MAAM,CAAC,MAAM,IAAI,GAAuC,CAAC,KAAK,EAAE,EAAE;IACjE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAElC,OAAO,CACN,oBAAC,SAAS,OAAK,KAAK;QACnB,oBAAC,UAAU,QAAE,KAAK,CAAc;QAChC,oBAAC,WAAW,QAAE,QAAQ,CAAe,CAC1B,CACZ,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { MenuShell } from \"./MenuShell\";\nimport { MenuToggle } from \"./MenuToggle\";\nimport { MenuContent } from \"./MenuContent\";\n\nexport type MenuProps = {\n\tclassName?: string;\n\tcloseHotkey?: Array<string>;\n\theight?: number;\n\tid?: string;\n\tmaxHeight?: number;\n\topenHotkey?: Array<string>;\n\twidth?: number;\n\ttitle?: React.ReactNode;\n};\n\n/**\n * A convenience component that fully encapsulates a menu by constructing a <MenuShell> and its contents.\n * All of the props are passed to MenuShell.\n *\n * @param {string} [className] - Custom body class for the menu contents. These classes will be set on the <body> tag for the Menu's drop down window.\n * @param {array} [closeHotkey=[\"escape\"] ] - A hotkey combination to close the menu. Defaults to [\"escape\"].\n * @param {number} [height] - Custom height for the menu. If not set then the height will be automatically calculated based on the content height and available monitor space.\n * @param {string} [id] - Unique ID for the menu. Defaults to a random string.\n * @param {number} [maxHeight=Infinity] - Maximum height of the menu.\n * @param {array} [openHotkey] - A hotkey combination to open the menu.\n * @param {number} [width=180] - Custom width for the menu.\n * @param {title} [string] - Name that appears in the menu's <MenuToggle> button.\n *\n */\n\nexport const Menu: React.FunctionComponent<MenuProps> = (props) => {\n\tconst { children, title } = props;\n\n\treturn (\n\t\t<MenuShell {...props}>\n\t\t\t<MenuToggle>{title}</MenuToggle>\n\t\t\t<MenuContent>{children}</MenuContent>\n\t\t</MenuShell>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuAutoResizer.js","sourceRoot":"","sources":["../../../src/components/menu/MenuAutoResizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAQpD,MAAM,OAAO,eAAe;IAW3B,YAAY,WAAmB,EAAE,MAAc,EAAE,KAAa,EAAE,YAAoB,QAAQ;QAC3F,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAQrE,IAAI,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\n// Typescript ambient module loaded automagically from typeroots from core/types/index.d.ts\r\nimport { SpawnParams } from \"services/window/Launcher/launcher\";\r\n\r\n/**\r\n * To make sure that MenuPortal.tsx remain small\r\n * I have isolated the auto resize logic in this class.\r\n */\r\nexport class MenuAutoResizer {\r\n\tprivate width: number;\r\n\r\n\tprivate maxHeight: number;\r\n\r\n\tprivate childWindow: Window;\r\n\r\n\tprivate menuId: string;\r\n\r\n\tprivate observer: MutationObserver;\r\n\r\n\tconstructor(childWindow: Window, menuId: string, width: number, maxHeight: number = Infinity) {\r\n\t\tthis.width = width;\r\n\t\tthis.maxHeight = maxHeight;\r\n\t\tthis.childWindow = childWindow;\r\n\t\tthis.menuId = menuId;\r\n\t\tthis.updateWindowDimensions = this.updateWindowDimensions.bind(this);\r\n\t\t/* The external window does not have a URL and so its origin\r\n\t\twill not match the toolbar's origin, in that case\r\n\t\twe won't have onload, DOMContentLoaded or any other events.\r\n\t\tThat makes it hard to know when the content are loaded, we cant\r\n\t\teven inject custom JS as it will be already late.\r\n\t\tThe only way to know about a DOM change was MutationObserver!\r\n\t\t*/\r\n\t\tthis.observer = new MutationObserver(this.updateWindowDimensions);\r\n\t\t/* Now we watch for any DOM changes in the childWindow\r\n\t\tKnowing the height of the window contents is crucial for\r\n\t\tmaking decision about its position (below/above the toolbar).\r\n\t\t*/\r\n\t\tthis.observer.observe(this.childWindow.document, {\r\n\t\t\tchildList: true,\r\n\t\t\tcharacterData: false,\r\n\t\t\tsubtree: true,\r\n\t\t});\r\n\r\n\t\t// Initialize the window to the correct height\r\n\t\tsetTimeout(this.updateWindowDimensions, 0);\r\n\t}\r\n\r\n\tdisconnect() {\r\n\t\tthis.observer.disconnect();\r\n\t}\r\n\r\n\t/**\r\n\t * Callback for MutationObserver\r\n\t */\r\n\tprivate async updateWindowDimensions() {\r\n\t\t// If the original menu button has been removed then bypass updating the window dimensions.\r\n\t\t// Probably the menu itself is in the process of being removed but the mutation observer has\r\n\t\t// not yet disconnected\r\n\t\tif (!document.querySelector(`#${this.menuId}-menu-toggle`)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst { left, top, height } = await calculateDimensions(this.childWindow, this.menuId, 0, this.maxHeight);\r\n\r\n\t\tconst params: SpawnParams = {\r\n\t\t\tmonitor: \"mine\",\r\n\t\t\tposition: \"monitor\",\r\n\t\t\tleft: left,\r\n\t\t\ttop: top,\r\n\t\t\twidth: this.width,\r\n\t\t\theight: height,\r\n\t\t\tsetBoundsOnly: true,\r\n\t\t\tforceOntoMonitor: \"monitorRect\",\r\n\t\t};\r\n\r\n\t\t/**\r\n\t\t * See comment in MenuPortal.tsx on why we use showWindow() here instead of childWindow.moveTo()\r\n\t\t */\r\n\t\t//this.childWindow.moveTo(left, top);\r\n\t\t//this.childWindow.resizeTo(this.width, height);\r\n\t\tFSBL.Clients.LauncherClient.showWindow({ windowName: this.childWindow.window.name }, params);\r\n\t\tthis.childWindow.document.body.setAttribute(\"resizing\", \"false\");\r\n\t}\r\n}\r\n"]}
1
+ {"version":3,"file":"MenuAutoResizer.js","sourceRoot":"","sources":["../../../src/components/menu/MenuAutoResizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAQpD,MAAM,OAAO,eAAe;IAW3B,YAAY,WAAmB,EAAE,MAAc,EAAE,KAAa,EAAE,YAAoB,QAAQ;QAC3F,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAQrE,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;QAKlE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;YAChD,SAAS,EAAE,IAAI;YACf,aAAa,EAAE,KAAK;YACpB,OAAO,EAAE,IAAI;SACb,CAAC,CAAC;QAGH,UAAU,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU;QACT,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IAC5B,CAAC;IAKO,KAAK,CAAC,sBAAsB;QAInC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,MAAM,cAAc,CAAC,EAAE;YAC3D,OAAO;SACP;QACD,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,mBAAmB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAE1G,MAAM,MAAM,GAAgB;YAC3B,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE,IAAI;YACV,GAAG,EAAE,GAAG;YACR,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,MAAM;YACd,aAAa,EAAE,IAAI;YACnB,gBAAgB,EAAE,aAAa;SAC/B,CAAC;QAOF,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;QAC7F,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACD","sourcesContent":["import { calculateDimensions } from \"./menuHelpers\";\n// Typescript ambient module loaded automagically from typeroots from core/types/index.d.ts\nimport { SpawnParams } from \"services/window/Launcher/launcher\";\n\n/**\n * To make sure that MenuPortal.tsx remain small\n * I have isolated the auto resize logic in this class.\n */\nexport class MenuAutoResizer {\n\tprivate width: number;\n\n\tprivate maxHeight: number;\n\n\tprivate childWindow: Window;\n\n\tprivate menuId: string;\n\n\tprivate observer: MutationObserver;\n\n\tconstructor(childWindow: Window, menuId: string, width: number, maxHeight: number = Infinity) {\n\t\tthis.width = width;\n\t\tthis.maxHeight = maxHeight;\n\t\tthis.childWindow = childWindow;\n\t\tthis.menuId = menuId;\n\t\tthis.updateWindowDimensions = this.updateWindowDimensions.bind(this);\n\t\t/* The external window does not have a URL and so its origin\n\t\twill not match the toolbar's origin, in that case\n\t\twe won't have onload, DOMContentLoaded or any other events.\n\t\tThat makes it hard to know when the content are loaded, we cant\n\t\teven inject custom JS as it will be already late.\n\t\tThe only way to know about a DOM change was MutationObserver!\n\t\t*/\n\t\tthis.observer = new MutationObserver(this.updateWindowDimensions);\n\t\t/* Now we watch for any DOM changes in the childWindow\n\t\tKnowing the height of the window contents is crucial for\n\t\tmaking decision about its position (below/above the toolbar).\n\t\t*/\n\t\tthis.observer.observe(this.childWindow.document, {\n\t\t\tchildList: true,\n\t\t\tcharacterData: false,\n\t\t\tsubtree: true,\n\t\t});\n\n\t\t// Initialize the window to the correct height\n\t\tsetTimeout(this.updateWindowDimensions, 0);\n\t}\n\n\tdisconnect() {\n\t\tthis.observer.disconnect();\n\t}\n\n\t/**\n\t * Callback for MutationObserver\n\t */\n\tprivate async updateWindowDimensions() {\n\t\t// If the original menu button has been removed then bypass updating the window dimensions.\n\t\t// Probably the menu itself is in the process of being removed but the mutation observer has\n\t\t// not yet disconnected\n\t\tif (!document.querySelector(`#${this.menuId}-menu-toggle`)) {\n\t\t\treturn;\n\t\t}\n\t\tconst { left, top, height } = await calculateDimensions(this.childWindow, this.menuId, 0, this.maxHeight);\n\n\t\tconst params: SpawnParams = {\n\t\t\tmonitor: \"mine\",\n\t\t\tposition: \"monitor\",\n\t\t\tleft: left,\n\t\t\ttop: top,\n\t\t\twidth: this.width,\n\t\t\theight: height,\n\t\t\tsetBoundsOnly: true,\n\t\t\tforceOntoMonitor: \"monitorRect\",\n\t\t};\n\n\t\t/**\n\t\t * See comment in MenuPortal.tsx on why we use showWindow() here instead of childWindow.moveTo()\n\t\t */\n\t\t//this.childWindow.moveTo(left, top);\n\t\t//this.childWindow.resizeTo(this.width, height);\n\t\tFSBL.Clients.LauncherClient.showWindow({ windowName: this.childWindow.window.name }, params);\n\t\tthis.childWindow.document.body.setAttribute(\"resizing\", \"false\");\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuContent.js","sourceRoot":"","sources":["../../../src/components/menu/MenuContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAM9C,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5B,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,CAAC;IAEnC,MAAM,WAAW,GAAG,CACnB,oBAAC,UAAU,IAAC,IAAI,EAAE,YAAY,EAAE;QAC/B,6BAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAC,mBAAmB,EAAC,KAAK,EAAE,KAAK,IAC7D,QAAQ,CACJ,CACM,CACb,CAAC;IACF,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { MenuContext } from \"./menuContext\";\r\nimport { MenuPortal } from \"./MenuPortal\";\r\nimport { useMenu } from \"../../hooks/useMenu\";\r\n\r\n/**\r\n * Holds all the menu contents\r\n * @param {string} style - The custom CSS style for the menu. This is necessary because the DOM's style will be lost when this is sent through a React portal.\r\n */\r\nexport const MenuContent: React.FunctionComponent<{\r\n\tstyle?: React.CSSProperties;\r\n}> = ({ children, style }) => {\r\n\tconst { thisMenuId } = React.useContext(MenuContext);\r\n\tconst { isMenuActive } = useMenu();\r\n\r\n\tconst menuContent = (\r\n\t\t<MenuPortal show={isMenuActive()}>\r\n\t\t\t<div id={thisMenuId} className=\"menu menu-primary\" style={style}>\r\n\t\t\t\t{children}\r\n\t\t\t</div>\r\n\t\t</MenuPortal>\r\n\t);\r\n\treturn menuContent;\r\n};\r\n"]}
1
+ {"version":3,"file":"MenuContent.js","sourceRoot":"","sources":["../../../src/components/menu/MenuContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAM9C,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5B,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IACrD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,CAAC;IAEnC,MAAM,WAAW,GAAG,CACnB,oBAAC,UAAU,IAAC,IAAI,EAAE,YAAY,EAAE;QAC/B,6BAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAC,mBAAmB,EAAC,KAAK,EAAE,KAAK,IAC7D,QAAQ,CACJ,CACM,CACb,CAAC;IACF,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { MenuContext } from \"./menuContext\";\nimport { MenuPortal } from \"./MenuPortal\";\nimport { useMenu } from \"../../hooks/useMenu\";\n\n/**\n * Holds all the menu contents\n * @param {string} style - The custom CSS style for the menu. This is necessary because the DOM's style will be lost when this is sent through a React portal.\n */\nexport const MenuContent: React.FunctionComponent<{\n\tstyle?: React.CSSProperties;\n}> = ({ children, style }) => {\n\tconst { thisMenuId } = React.useContext(MenuContext);\n\tconst { isMenuActive } = useMenu();\n\n\tconst menuContent = (\n\t\t<MenuPortal show={isMenuActive()}>\n\t\t\t<div id={thisMenuId} className=\"menu menu-primary\" style={style}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</MenuPortal>\n\t);\n\treturn menuContent;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuHotKey.js","sourceRoot":"","sources":["../../../src/components/menu/MenuHotKey.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAgBlD,MAAM,CAAC,MAAM,UAAU,GAGlB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAQ,EAAE;IAC9B,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,CAAC;IACxD,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE1B,SAAS,wBAAwB;QAChC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,KAAK,IAAI,EAAE,EAAE,wBAAwB,EAAE,SAAS,CAAC,CAAC;QAG/F,eAAe,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,GAAQ,EAAE,EAAE;YAC/C,IAAI,GAAG,EAAE;gBACR,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAC;aACjE;YAED,eAAe,CAAC,KAAK,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,YAAY,EAAE,EAAE;QAC/D,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,IAAI,EAAE,EAAE,wBAAwB,CAAC,CAAC;KACjF;IAED,OAAO,IAAI,CAAC;AACb,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { useMenu } from \"../../hooks/useMenu\";\r\nimport { useHotkey } from \"../../hooks/useHotkey\";\r\n\r\n/**\r\n * A component that registers a custom hotkeys pattern for opening and closing the menu.\r\n * This component is used privately by <MenuShell>\r\n *\r\n * Note that a design decision was made to keep registry of \"close\" hotkeys simple.\r\n * We *could* have written extra logic so that the close hotkey is only registered\r\n * when the window is open but that seems unnecessary. Instead, every menu is always\r\n * registered with its hotkey. The net effect is that every menu will dispatch a CLOSE_MENU\r\n * action when \"escape\" is called. This creates a lot of dispatches but results in no operations\r\n * since all the other menus will already be closed. This was preferable over the potential\r\n * complication of logic that registers/unregisters a close hotkey with every menu open/close.\r\n * @param {string[]} [open] - An array of key names for opening the menu.\r\n * @param {string[]} [close=\"escape\" ] - An array of key names for closing the menu. Defaults to `[\"escape\"]` unless overridden with `null`.\r\n */\r\nexport const MenuHotKey: React.FunctionComponent<{\r\n\topen?: string[];\r\n\tclose?: string[];\r\n}> = ({ open, close }): null => {\r\n\tconst { openMenu, closeMenu, isMenuActive } = useMenu();\r\n\tuseHotkey(open, openMenu);\r\n\r\n\tfunction removeHotKeyAndCloseMenu() {\r\n\t\tFSBL.Clients.HotkeyClient.removeGlobalHotkey(close || [], removeHotKeyAndCloseMenu, closeMenu);\r\n\r\n\t\t// Once menu closes, return focus to the component that launched the menu\r\n\t\tfinsembleWindow.bringToFront(null, (err: any) => {\r\n\t\t\tif (err) {\r\n\t\t\t\tFSBL.Clients.Logger.error(\"failed to bringToFront, error:\", err);\r\n\t\t\t}\r\n\r\n\t\t\tfinsembleWindow.focus();\r\n\t\t});\r\n\t}\r\n\r\n\tif (Array.isArray(close) && close.length > 0 && isMenuActive()) {\r\n\t\tFSBL.Clients.HotkeyClient.addGlobalHotkey(close || [], removeHotKeyAndCloseMenu);\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n"]}
1
+ {"version":3,"file":"MenuHotKey.js","sourceRoot":"","sources":["../../../src/components/menu/MenuHotKey.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAgBlD,MAAM,CAAC,MAAM,UAAU,GAGlB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAQ,EAAE;IAC9B,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,CAAC;IACxD,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE1B,SAAS,wBAAwB;QAChC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,KAAK,IAAI,EAAE,EAAE,wBAAwB,EAAE,SAAS,CAAC,CAAC;QAG/F,eAAe,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,GAAQ,EAAE,EAAE;YAC/C,IAAI,GAAG,EAAE;gBACR,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,EAAE,GAAG,CAAC,CAAC;aACjE;YAED,eAAe,CAAC,KAAK,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,YAAY,EAAE,EAAE;QAC/D,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,IAAI,EAAE,EAAE,wBAAwB,CAAC,CAAC;KACjF;IAED,OAAO,IAAI,CAAC;AACb,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { useMenu } from \"../../hooks/useMenu\";\nimport { useHotkey } from \"../../hooks/useHotkey\";\n\n/**\n * A component that registers a custom hotkeys pattern for opening and closing the menu.\n * This component is used privately by <MenuShell>\n *\n * Note that a design decision was made to keep registry of \"close\" hotkeys simple.\n * We *could* have written extra logic so that the close hotkey is only registered\n * when the window is open but that seems unnecessary. Instead, every menu is always\n * registered with its hotkey. The net effect is that every menu will dispatch a CLOSE_MENU\n * action when \"escape\" is called. This creates a lot of dispatches but results in no operations\n * since all the other menus will already be closed. This was preferable over the potential\n * complication of logic that registers/unregisters a close hotkey with every menu open/close.\n * @param {string[]} [open] - An array of key names for opening the menu.\n * @param {string[]} [close=\"escape\" ] - An array of key names for closing the menu. Defaults to `[\"escape\"]` unless overridden with `null`.\n */\nexport const MenuHotKey: React.FunctionComponent<{\n\topen?: string[];\n\tclose?: string[];\n}> = ({ open, close }): null => {\n\tconst { openMenu, closeMenu, isMenuActive } = useMenu();\n\tuseHotkey(open, openMenu);\n\n\tfunction removeHotKeyAndCloseMenu() {\n\t\tFSBL.Clients.HotkeyClient.removeGlobalHotkey(close || [], removeHotKeyAndCloseMenu, closeMenu);\n\n\t\t// Once menu closes, return focus to the component that launched the menu\n\t\tfinsembleWindow.bringToFront(null, (err: any) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Clients.Logger.error(\"failed to bringToFront, error:\", err);\n\t\t\t}\n\n\t\t\tfinsembleWindow.focus();\n\t\t});\n\t}\n\n\tif (Array.isArray(close) && close.length > 0 && isMenuActive()) {\n\t\tFSBL.Clients.HotkeyClient.addGlobalHotkey(close || [], removeHotKeyAndCloseMenu);\n\t}\n\n\treturn null;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../../src/components/menu/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAS9C,MAAM,CAAC,MAAM,QAAQ,GAMhB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,GAAG,WAAW,EAAE,SAAS,EAAE,EAAO,EAAE;IACvF,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC;IAIhC,MAAM,eAAe,GAAG,GAAG,EAAE;QAE5B,OAAO,IAAI,OAAO,EAAE,CAAC;QAGrB,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;IACzB,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,IACrF,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { useMenu } from \"../../hooks/useMenu\";\r\n\r\n/**\r\n * Individual menu item.\r\n * @param {function} [onClick] - Custom onClick handler function for when the menu item is clicked.\r\n * @param {string} [className] - Custom css class name for the menu item. Defaults to \"menu-item\".\r\n * @param {string} [style] - Custom css styles for the menu item. This is necessary because the DOM's styles will be lost when this component is sent through a React portal.\r\n * @param {boolean} [noClose=false] - If set to true, prevents the menu from closing when an item is clicked on.\r\n */\r\nexport const MenuItem: React.FunctionComponent<{\r\n\tonClick?: () => void;\r\n\tonKeyDown?: () => void;\r\n\tclassName?: string;\r\n\tstyle?: object;\r\n\tnoClose?: boolean;\r\n}> = ({ children, onClick, style, noClose, className = \"menu-item\", onKeyDown }): any => {\r\n\tconst { closeMenu } = useMenu();\r\n\r\n\t// Combines the passed onClick handler with our\r\n\t// default onClick handler (which closes the menu)\r\n\tconst combinedOnClick = () => {\r\n\t\t// Call the developer's custom onClick handler\r\n\t\tonClick && onClick();\r\n\r\n\t\t// Do not close menu when noClose attributes exist\r\n\t\t!noClose && closeMenu();\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div className={className} onClick={combinedOnClick} style={style} onKeyDown={onKeyDown}>\r\n\t\t\t{children}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../../src/components/menu/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAS9C,MAAM,CAAC,MAAM,QAAQ,GAMhB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,GAAG,WAAW,EAAE,SAAS,EAAE,EAAO,EAAE;IACvF,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC;IAIhC,MAAM,eAAe,GAAG,GAAG,EAAE;QAE5B,OAAO,IAAI,OAAO,EAAE,CAAC;QAGrB,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;IACzB,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,IACrF,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { useMenu } from \"../../hooks/useMenu\";\n\n/**\n * Individual menu item.\n * @param {function} [onClick] - Custom onClick handler function for when the menu item is clicked.\n * @param {string} [className] - Custom css class name for the menu item. Defaults to \"menu-item\".\n * @param {string} [style] - Custom css styles for the menu item. This is necessary because the DOM's styles will be lost when this component is sent through a React portal.\n * @param {boolean} [noClose=false] - If set to true, prevents the menu from closing when an item is clicked on.\n */\nexport const MenuItem: React.FunctionComponent<{\n\tonClick?: () => void;\n\tonKeyDown?: () => void;\n\tclassName?: string;\n\tstyle?: object;\n\tnoClose?: boolean;\n}> = ({ children, onClick, style, noClose, className = \"menu-item\", onKeyDown }): any => {\n\tconst { closeMenu } = useMenu();\n\n\t// Combines the passed onClick handler with our\n\t// default onClick handler (which closes the menu)\n\tconst combinedOnClick = () => {\n\t\t// Call the developer's custom onClick handler\n\t\tonClick && onClick();\n\n\t\t// Do not close menu when noClose attributes exist\n\t\t!noClose && closeMenu();\n\t};\n\n\treturn (\n\t\t<div className={className} onClick={combinedOnClick} style={style} onKeyDown={onKeyDown}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuPortal.js","sourceRoot":"","sources":["../../../src/components/menu/MenuPortal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,MAAM,CAAC,MAAM,UAAU,GAElB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3B,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAE5F,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;IAE/B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAAe,CAAC;IACtD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACpE,MAAM,eAAe,GAAG,CAAC,UAAU,CAAC;IAOpC,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,EAAE;QACvC,IAAI,WAAW;YAAE,OAAO,IAAI,kBAAkB,CAAC,WAAW,EAAE,YAAY,CAA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CAAC,CAAC;YAEF,IAAI,SAAS;gBAAE,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,EAAE,IAAI,CAAC,CAAC;QAC9E,CAAC,CAAC;QAEF,QAAQ,EAAE,CAAC;QAEX,OAAO,GAAG,EAAE;YAGX,MAAM,GAAG,GAAG,WAAW,IAAI,eAAe,EAAE,WAAW,CAAC;YACxD,MAAM,WAAW,GAAG,kBAAkB,IAAK,GAAW,EAAE,kBAAkB,CAAC;YAE3E,IAAI,WAAW;gBAAE,WAAW,CAAC,MAAM,EAAE,CAAC;YAEtC,IAAI,eAAe,EAAE;gBACpB,eAAe,CAAC,UAAU,EAAE,CAAC;aAC7B;YACD,IAAI,GAAG,EAAE;gBACR,GAAG,CAAC,KAAK,EAAE,CAAC;gBACZ,cAAc,CAAC,IAAI,CAAC,CAAC;aACrB;QACF,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAMxE,OAAO,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { MenuContext } from \"./menuContext\";\r\nimport { calculateDimensions, injectCSS } from \"./menuHelpers\";\r\nimport { KeyboardNavigation } from \"./keyboardNavigation\";\r\nimport { MenuAutoResizer } from \"./MenuAutoResizer\";\r\nimport { useState, useEffect, useContext, useMemo } from \"react\";\r\nimport { useMenu } from \"../../hooks/useMenu\";\r\n// Typescript ambient module loaded auto-magically from typeroots from core/types/index.d.ts\r\nimport { SpawnParams } from \"services/window/Launcher/launcher\";\r\n\r\nexport const MenuPortal: React.FunctionComponent<{\r\n\tshow: boolean;\r\n}> = ({ show, children }) => {\r\n\tconst { thisMenuId, menuWidth, menuHeight, className, maxHeight } = useContext(MenuContext);\r\n\r\n\tconst { blurMenu } = useMenu();\r\n\t// Container div for React portal\r\n\tconst [element, setElement] = useState<HTMLElement>();\r\n\tconst [childWindow, setChildWindow] = useState<Window | null>(null);\r\n\tconst isAutoResizable = !menuHeight;\r\n\r\n\t/**\r\n\t * KeyboardNavigation registers global hotkeys for navigating through a menu with cursor keys.\r\n\t * Those hotkeys are registered/unregistered based on visibility of the child window.\r\n\t * The KeyboardNavigation class is a singleton and so is memoized. It is created when the child window is available.\r\n\t */\r\n\tconst keyboardNavigation = useMemo(() => {\r\n\t\tif (childWindow) return new KeyboardNavigation(childWindow, \".menu-item\");\r\n\t\telse return null;\r\n\t}, [childWindow]);\r\n\r\n\t/**\r\n\t * Show and hide window. This effect will run whenever the `show` prop changes,\r\n\t * generally initiated by a click to <MenuToggle>.\r\n\t */\r\n\tuseEffect(() => {\r\n\t\t// If child window isn't yet initialized then no-op\r\n\t\tif (!childWindow) return;\r\n\r\n\t\t/**\r\n\t\t * Sets visibility of the window.\r\n\t\t * When being made visible, the window size and location is recalculated and updated.\r\n\t\t */\r\n\t\tconst runWindowEffects = async () => {\r\n\t\t\tconst finWindow = (childWindow as any).fin.desktop.Window.getCurrent();\r\n\t\t\tif (show) {\r\n\t\t\t\tconst { left, top, height } = await calculateDimensions(childWindow, thisMenuId, menuHeight, maxHeight);\r\n\r\n\t\t\t\tconst params: SpawnParams = {\r\n\t\t\t\t\tposition: \"absolute\",\r\n\t\t\t\t\tleft: left,\r\n\t\t\t\t\ttop: top,\r\n\t\t\t\t\theight: height,\r\n\t\t\t\t\tforceOntoMonitor: \"monitorRect\",\r\n\t\t\t\t};\r\n\r\n\t\t\t\tconst { name } = childWindow.window;\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Use Finsemble to show the window. We might be tempted simply to use childWindow.moveTo() or childWindow.resizeTo()\r\n\t\t\t\t * but those commands limit the child window to a single monitor. We want to position the window relative to the\r\n\t\t\t\t * monitor on which the toolbar currently resides. showWindow() is monitor aware, so by using monitor=\"mine\" we can\r\n\t\t\t\t * ensure that the menu will always open on the same monitor as the toolbar. Since our toolbar has built in logic\r\n\t\t\t\t * to avoid straddling, we can be sure that the menu will never have to guess whether it exists on the left or right\r\n\t\t\t\t * side of the toolbar. Finally, showWindow() forces windows to open entirely on a monitor, so it will slide the\r\n\t\t\t\t * menu to the left or right as necessary to prevent it from straddling.\r\n\t\t\t\t */\r\n\t\t\t\tFSBL.Clients.LauncherClient.showWindow({ windowName: name }, params);\r\n\t\t\t\tfinWindow.focus();\r\n\r\n\t\t\t\tFSBL.FinsembleWindow.getInstance({ name: name }, (e: any, fsblWindow: any) => {\r\n\t\t\t\t\tfsblWindow.setAlwaysOnTop({ alwaysOnTop: true });\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (keyboardNavigation) {\r\n\t\t\t\t\t(childWindow as any).keyboardNavigation = keyboardNavigation;\r\n\t\t\t\t\tkeyboardNavigation.attach();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst { name } = childWindow.window;\r\n\t\t\t\tFSBL.FinsembleWindow.getInstance({ name: name }, (e: any, fsblWindow: any) => {\r\n\t\t\t\t\tfsblWindow.setAlwaysOnTop({ alwaysOnTop: false });\r\n\t\t\t\t});\r\n\r\n\t\t\t\tfinWindow.hide();\r\n\t\t\t\tif (keyboardNavigation) keyboardNavigation.detach();\r\n\t\t\t}\r\n\t\t};\r\n\t\trunWindowEffects();\r\n\t}, [show]);\r\n\r\n\t/**\r\n\t * Initialize the window. This should only run once.\r\n\t */\r\n\tuseEffect(() => {\r\n\t\tlet menuAutoResizer: any = null;\r\n\t\t/**\r\n\t\t * This function creates the external window\r\n\t\t * appends portal container to childWindow's body\r\n\t\t * and enables keyboard navigation.\r\n\t\t *\r\n\t\t */\r\n\t\tconst initMenu = async () => {\r\n\t\t\t/**\r\n\t\t\t * Initial size and location of the menu is irrelevant because it is hidden.\r\n\t\t\t * The menu will be resized and positioned correctly when it is shown.\r\n\t\t\t */\r\n\t\t\tconst features = `height=1,width=${menuWidth},left=0,top=0,opacity=1`;\r\n\r\n\t\t\t/**\r\n\t\t\t * Opens the window which will contain the menu contents. This looks like a browser window open\r\n\t\t\t * but actually opens an Electron window which FEA intercepts. FEA uses the `childWindowOptions`\r\n\t\t\t * json configuration to determine how to display the window. `childWindowOptions.show` should\r\n\t\t\t * be set to `false` otherwise a white window will flash prior to the menu being rendered.\r\n\t\t\t *\r\n\t\t\t *\r\n\t\t\t * The \"/component/toolbar/menu.html\" is just an empty page. It's necessary to reference a real page\r\n\t\t\t * rather than about:blank in order that the \"origin\" is correct for the page. Many CSS ui-assets such\r\n\t\t\t * as fonts and images are set with relative paths that require a correct origin.\r\n\t\t\t *\r\n\t\t\t * Note, we append the menu ID for automated testing. This allows Selenium to\r\n\t\t\t * uniquely identify each menu.\r\n\t\t\t */\r\n\t\t\tlet newWindow = window.open(`./menu.html#${thisMenuId}`, undefined, features);\r\n\t\t\tsetChildWindow(newWindow);\r\n\r\n\t\t\tconst insertWindowContent = () => {\r\n\t\t\t\tif (!newWindow) return;\r\n\r\n\t\t\t\t// Set the child window's <html> tag to class \"menu-portal\" for scrollbar styling\r\n\t\t\t\tnewWindow.document.documentElement.className = \"menu-portal\";\r\n\t\t\t\tisAutoResizable && newWindow.document.body.setAttribute(\"resizing\", \"true\");\r\n\r\n\t\t\t\t// Create the element which will hold our react elements and then append it into the child window's body.\r\n\t\t\t\tconst containerDiv: HTMLElement = document.createElement(\"div\");\r\n\t\t\t\tnewWindow.document.body.appendChild(containerDiv);\r\n\r\n\t\t\t\t// The className that was passed to MenuShell is added to the child window's <body>\r\n\t\t\t\tclassName && className.split(\" \").forEach((name: string) => newWindow!.document.body.classList.add(name));\r\n\t\t\t\t// This will update local state which will cause this React Functional Component\r\n\t\t\t\t// to return a react portal. See comments at the end of this file.\r\n\t\t\t\tsetElement(containerDiv);\r\n\t\t\t\t// Inject css into the child window's <head>\r\n\t\t\t\tinjectCSS(newWindow);\r\n\t\t\t\t// Attach MenuAutoResizer only if the menu doesn't have a fixed height\r\n\t\t\t\tisAutoResizable && (menuAutoResizer = new MenuAutoResizer(newWindow, thisMenuId, menuWidth, maxHeight));\r\n\r\n\t\t\t\t// THE FOLLOWING IS LIKELY DEPRECATED BUT KEEPING JUST IN CASE\r\n\t\t\t\t// Place height on the portal.\r\n\t\t\t\t// inside of the portal, window.outerHeight === 39 (toolbar height).\r\n\t\t\t\t// Knowing the height of the window is important because some menus use that\r\n\t\t\t\t// information to force overflow on certain sections of the menu.\r\n\t\t\t\t(newWindow as any).portalHeight = menuHeight;\r\n\r\n\t\t\t\t/* Close window when a user clicks away.\r\n\t\t\t\tAre you wondering why not just close the window without calling\r\n\t\t\t\ttoggle? because we want to update the state in the store first\r\n\t\t\t\twhich will cause openMenuId to no longer match the shell id\r\n\t\t\t\tand eventually destroy this component which will cause the window\r\n\t\t\t\tto close (see cleanup function).\r\n\t\t\t\t*/\r\n\t\t\t\tnewWindow.addEventListener(\"blur\", blurMenu);\r\n\r\n\t\t\t\t// We need to proxy/fake some events for the following reason:\r\n\t\t\t\t// If you do document.addEventListener inside a component\r\n\t\t\t\t// that is rendered inside react portal, `document` will refer\r\n\t\t\t\t// to toolbar's document instead of the childWindow's document\r\n\t\t\t\t// and for that reason, clicking inside portal will not fire\r\n\t\t\t\t// the window's click event. It will do so when you click\r\n\t\t\t\t// anywhere in the toolbar.\r\n\t\t\t\t[\"mouseDown\", \"click\", \"mouseUp\"].forEach((eventName) => {\r\n\t\t\t\t\tnewWindow?.document.addEventListener(eventName, (event) => {\r\n\t\t\t\t\t\tdocument.dispatchEvent(\r\n\t\t\t\t\t\t\tnew CustomEvent(`portal:${eventName}`, {\r\n\t\t\t\t\t\t\t\tdetail: {\r\n\t\t\t\t\t\t\t\t\t// Devs may need access to the x and y of the cursor\r\n\t\t\t\t\t\t\t\t\tmouseEvent: new MouseEvent(eventName, event),\r\n\t\t\t\t\t\t\t\t\t// And possibly the target element\r\n\t\t\t\t\t\t\t\t\ttarget: event.target,\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Proxies keyboard events from the portal up into the parent window.\r\n\t\t\t\t * instead of e.key, you'll need to access e.detail.key.\r\n\t\t\t\t */\r\n\t\t\t\t[\"keyup\", \"keydown\", \"keypress\"].forEach((eventName) => {\r\n\t\t\t\t\tnewWindow?.document.addEventListener(eventName, (event) => {\r\n\t\t\t\t\t\tdocument.dispatchEvent(\r\n\t\t\t\t\t\t\tnew CustomEvent(`portal:${eventName}`, {\r\n\t\t\t\t\t\t\t\tdetail: new KeyboardEvent(event.type, event),\r\n\t\t\t\t\t\t\t})\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\r\n\t\t\tif (newWindow) newWindow.addEventListener(\"load\", insertWindowContent, true);\r\n\t\t};\r\n\r\n\t\tinitMenu();\r\n\r\n\t\treturn () => {\r\n\t\t\t// @todo imesner 20210406 childwindow and keyboardNavigation were both null but hadn't closed the window or released global hotkeys\r\n\t\t\t// This file is a mess and needs significant refactoring to ensure the cleanup occurs and to have less event-hell\r\n\t\t\tconst win = childWindow || menuAutoResizer?.childWindow;\r\n\t\t\tconst keyboardNav = keyboardNavigation || (win as any)?.keyboardNavigation;\r\n\r\n\t\t\tif (keyboardNav) keyboardNav.detach();\r\n\r\n\t\t\tif (menuAutoResizer) {\r\n\t\t\t\tmenuAutoResizer.disconnect();\r\n\t\t\t}\r\n\t\t\tif (win) {\r\n\t\t\t\twin.close();\r\n\t\t\t\tsetChildWindow(null);\r\n\t\t\t}\r\n\t\t};\r\n\t}, [blurMenu, className, menuWidth, menuHeight, maxHeight, thisMenuId]);\r\n\r\n\t// We should only return a react portal when window is ready\r\n\t// and container div appended to its body\r\n\t// See Dan abramov comment about this at:\r\n\t// https://github.com/facebook/react/issues/12355#issuecomment-410996235\r\n\treturn element ? ReactDOM.createPortal(children, element) : null;\r\n};\r\n"]}
1
+ {"version":3,"file":"MenuPortal.js","sourceRoot":"","sources":["../../../src/components/menu/MenuPortal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,MAAM,CAAC,MAAM,UAAU,GAElB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3B,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAE5F,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;IAE/B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,EAAe,CAAC;IACtD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACpE,MAAM,eAAe,GAAG,CAAC,UAAU,CAAC;IAOpC,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,EAAE;QACvC,IAAI,WAAW;YAAE,OAAO,IAAI,kBAAkB,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;;YACrE,OAAO,IAAI,CAAC;IAClB,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAMlB,SAAS,CAAC,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,CAAC;QAC9E,CAAC,CAAC;QAEF,QAAQ,EAAE,CAAC;QAEX,OAAO,GAAG,EAAE;YAGX,MAAM,GAAG,GAAG,WAAW,IAAI,eAAe,EAAE,WAAW,CAAC;YACxD,MAAM,WAAW,GAAG,kBAAkB,IAAK,GAAW,EAAE,kBAAkB,CAAC;YAE3E,IAAI,WAAW;gBAAE,WAAW,CAAC,MAAM,EAAE,CAAC;YAEtC,IAAI,eAAe,EAAE;gBACpB,eAAe,CAAC,UAAU,EAAE,CAAC;aAC7B;YACD,IAAI,GAAG,EAAE;gBACR,GAAG,CAAC,KAAK,EAAE,CAAC;gBACZ,cAAc,CAAC,IAAI,CAAC,CAAC;aACrB;QACF,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAMxE,OAAO,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { MenuContext } from \"./menuContext\";\nimport { calculateDimensions, injectCSS } from \"./menuHelpers\";\nimport { KeyboardNavigation } from \"./keyboardNavigation\";\nimport { MenuAutoResizer } from \"./MenuAutoResizer\";\nimport { useState, useEffect, useContext, useMemo } from \"react\";\nimport { useMenu } from \"../../hooks/useMenu\";\n// Typescript ambient module loaded auto-magically from typeroots from core/types/index.d.ts\nimport { SpawnParams } from \"services/window/Launcher/launcher\";\n\nexport const MenuPortal: React.FunctionComponent<{\n\tshow: boolean;\n}> = ({ show, children }) => {\n\tconst { thisMenuId, menuWidth, menuHeight, className, maxHeight } = useContext(MenuContext);\n\n\tconst { blurMenu } = useMenu();\n\t// Container div for React portal\n\tconst [element, setElement] = useState<HTMLElement>();\n\tconst [childWindow, setChildWindow] = useState<Window | null>(null);\n\tconst isAutoResizable = !menuHeight;\n\n\t/**\n\t * KeyboardNavigation registers global hotkeys for navigating through a menu with cursor keys.\n\t * Those hotkeys are registered/unregistered based on visibility of the child window.\n\t * The KeyboardNavigation class is a singleton and so is memoized. It is created when the child window is available.\n\t */\n\tconst keyboardNavigation = useMemo(() => {\n\t\tif (childWindow) return new KeyboardNavigation(childWindow, \".menu-item\");\n\t\telse return null;\n\t}, [childWindow]);\n\n\t/**\n\t * Show and hide window. This effect will run whenever the `show` prop changes,\n\t * generally initiated by a click to <MenuToggle>.\n\t */\n\tuseEffect(() => {\n\t\t// If child window isn't yet initialized then no-op\n\t\tif (!childWindow) return;\n\n\t\t/**\n\t\t * Sets visibility of the window.\n\t\t * When being made visible, the window size and location is recalculated and updated.\n\t\t */\n\t\tconst runWindowEffects = async () => {\n\t\t\tconst finWindow = (childWindow as any).fin.desktop.Window.getCurrent();\n\t\t\tif (show) {\n\t\t\t\tconst { left, top, height } = await calculateDimensions(childWindow, thisMenuId, menuHeight, maxHeight);\n\n\t\t\t\tconst params: SpawnParams = {\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\tleft: left,\n\t\t\t\t\ttop: top,\n\t\t\t\t\theight: height,\n\t\t\t\t\tforceOntoMonitor: \"monitorRect\",\n\t\t\t\t};\n\n\t\t\t\tconst { name } = childWindow.window;\n\n\t\t\t\t/**\n\t\t\t\t * Use Finsemble to show the window. We might be tempted simply to use childWindow.moveTo() or childWindow.resizeTo()\n\t\t\t\t * but those commands limit the child window to a single monitor. We want to position the window relative to the\n\t\t\t\t * monitor on which the toolbar currently resides. showWindow() is monitor aware, so by using monitor=\"mine\" we can\n\t\t\t\t * ensure that the menu will always open on the same monitor as the toolbar. Since our toolbar has built in logic\n\t\t\t\t * to avoid straddling, we can be sure that the menu will never have to guess whether it exists on the left or right\n\t\t\t\t * side of the toolbar. Finally, showWindow() forces windows to open entirely on a monitor, so it will slide the\n\t\t\t\t * menu to the left or right as necessary to prevent it from straddling.\n\t\t\t\t */\n\t\t\t\tFSBL.Clients.LauncherClient.showWindow({ windowName: name }, params);\n\t\t\t\tfinWindow.focus();\n\n\t\t\t\tFSBL.FinsembleWindow.getInstance({ name: name }, (e: any, fsblWindow: any) => {\n\t\t\t\t\tfsblWindow.setAlwaysOnTop({ alwaysOnTop: true });\n\t\t\t\t});\n\n\t\t\t\tif (keyboardNavigation) {\n\t\t\t\t\t(childWindow as any).keyboardNavigation = keyboardNavigation;\n\t\t\t\t\tkeyboardNavigation.attach();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst { name } = childWindow.window;\n\t\t\t\tFSBL.FinsembleWindow.getInstance({ name: name }, (e: any, fsblWindow: any) => {\n\t\t\t\t\tfsblWindow.setAlwaysOnTop({ alwaysOnTop: false });\n\t\t\t\t});\n\n\t\t\t\tfinWindow.hide();\n\t\t\t\tif (keyboardNavigation) keyboardNavigation.detach();\n\t\t\t}\n\t\t};\n\t\trunWindowEffects();\n\t}, [show]);\n\n\t/**\n\t * Initialize the window. This should only run once.\n\t */\n\tuseEffect(() => {\n\t\tlet menuAutoResizer: any = null;\n\t\t/**\n\t\t * This function creates the external window\n\t\t * appends portal container to childWindow's body\n\t\t * and enables keyboard navigation.\n\t\t *\n\t\t */\n\t\tconst initMenu = async () => {\n\t\t\t/**\n\t\t\t * Initial size and location of the menu is irrelevant because it is hidden.\n\t\t\t * The menu will be resized and positioned correctly when it is shown.\n\t\t\t */\n\t\t\tconst features = `height=1,width=${menuWidth},left=0,top=0,opacity=1`;\n\n\t\t\t/**\n\t\t\t * Opens the window which will contain the menu contents. This looks like a browser window open\n\t\t\t * but actually opens an Electron window which FEA intercepts. FEA uses the `childWindowOptions`\n\t\t\t * json configuration to determine how to display the window. `childWindowOptions.show` should\n\t\t\t * be set to `false` otherwise a white window will flash prior to the menu being rendered.\n\t\t\t *\n\t\t\t *\n\t\t\t * The \"/component/toolbar/menu.html\" is just an empty page. It's necessary to reference a real page\n\t\t\t * rather than about:blank in order that the \"origin\" is correct for the page. Many CSS ui-assets such\n\t\t\t * as fonts and images are set with relative paths that require a correct origin.\n\t\t\t *\n\t\t\t * Note, we append the menu ID for automated testing. This allows Selenium to\n\t\t\t * uniquely identify each menu.\n\t\t\t */\n\t\t\tlet newWindow = window.open(`./menu.html#${thisMenuId}`, undefined, features);\n\t\t\tsetChildWindow(newWindow);\n\n\t\t\tconst insertWindowContent = () => {\n\t\t\t\tif (!newWindow) return;\n\n\t\t\t\t// Set the child window's <html> tag to class \"menu-portal\" for scrollbar styling\n\t\t\t\tnewWindow.document.documentElement.className = \"menu-portal\";\n\t\t\t\tisAutoResizable && newWindow.document.body.setAttribute(\"resizing\", \"true\");\n\n\t\t\t\t// Create the element which will hold our react elements and then append it into the child window's body.\n\t\t\t\tconst containerDiv: HTMLElement = document.createElement(\"div\");\n\t\t\t\tnewWindow.document.body.appendChild(containerDiv);\n\n\t\t\t\t// The className that was passed to MenuShell is added to the child window's <body>\n\t\t\t\tclassName && className.split(\" \").forEach((name: string) => newWindow!.document.body.classList.add(name));\n\t\t\t\t// This will update local state which will cause this React Functional Component\n\t\t\t\t// to return a react portal. See comments at the end of this file.\n\t\t\t\tsetElement(containerDiv);\n\t\t\t\t// Inject css into the child window's <head>\n\t\t\t\tinjectCSS(newWindow);\n\t\t\t\t// Attach MenuAutoResizer only if the menu doesn't have a fixed height\n\t\t\t\tisAutoResizable && (menuAutoResizer = new MenuAutoResizer(newWindow, thisMenuId, menuWidth, maxHeight));\n\n\t\t\t\t// THE FOLLOWING IS LIKELY DEPRECATED BUT KEEPING JUST IN CASE\n\t\t\t\t// Place height on the portal.\n\t\t\t\t// inside of the portal, window.outerHeight === 39 (toolbar height).\n\t\t\t\t// Knowing the height of the window is important because some menus use that\n\t\t\t\t// information to force overflow on certain sections of the menu.\n\t\t\t\t(newWindow as any).portalHeight = menuHeight;\n\n\t\t\t\t/* Close window when a user clicks away.\n\t\t\t\tAre you wondering why not just close the window without calling\n\t\t\t\ttoggle? because we want to update the state in the store first\n\t\t\t\twhich will cause openMenuId to no longer match the shell id\n\t\t\t\tand eventually destroy this component which will cause the window\n\t\t\t\tto close (see cleanup function).\n\t\t\t\t*/\n\t\t\t\tnewWindow.addEventListener(\"blur\", blurMenu);\n\n\t\t\t\t// We need to proxy/fake some events for the following reason:\n\t\t\t\t// If you do document.addEventListener inside a component\n\t\t\t\t// that is rendered inside react portal, `document` will refer\n\t\t\t\t// to toolbar's document instead of the childWindow's document\n\t\t\t\t// and for that reason, clicking inside portal will not fire\n\t\t\t\t// the window's click event. It will do so when you click\n\t\t\t\t// anywhere in the toolbar.\n\t\t\t\t[\"mouseDown\", \"click\", \"mouseUp\"].forEach((eventName) => {\n\t\t\t\t\tnewWindow?.document.addEventListener(eventName, (event) => {\n\t\t\t\t\t\tdocument.dispatchEvent(\n\t\t\t\t\t\t\tnew CustomEvent(`portal:${eventName}`, {\n\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\t// Devs may need access to the x and y of the cursor\n\t\t\t\t\t\t\t\t\tmouseEvent: new MouseEvent(eventName, event),\n\t\t\t\t\t\t\t\t\t// And possibly the target element\n\t\t\t\t\t\t\t\t\ttarget: event.target,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t/**\n\t\t\t\t * Proxies keyboard events from the portal up into the parent window.\n\t\t\t\t * instead of e.key, you'll need to access e.detail.key.\n\t\t\t\t */\n\t\t\t\t[\"keyup\", \"keydown\", \"keypress\"].forEach((eventName) => {\n\t\t\t\t\tnewWindow?.document.addEventListener(eventName, (event) => {\n\t\t\t\t\t\tdocument.dispatchEvent(\n\t\t\t\t\t\t\tnew CustomEvent(`portal:${eventName}`, {\n\t\t\t\t\t\t\t\tdetail: new KeyboardEvent(event.type, event),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tif (newWindow) newWindow.addEventListener(\"load\", insertWindowContent, true);\n\t\t};\n\n\t\tinitMenu();\n\n\t\treturn () => {\n\t\t\t// @todo imesner 20210406 childwindow and keyboardNavigation were both null but hadn't closed the window or released global hotkeys\n\t\t\t// This file is a mess and needs significant refactoring to ensure the cleanup occurs and to have less event-hell\n\t\t\tconst win = childWindow || menuAutoResizer?.childWindow;\n\t\t\tconst keyboardNav = keyboardNavigation || (win as any)?.keyboardNavigation;\n\n\t\t\tif (keyboardNav) keyboardNav.detach();\n\n\t\t\tif (menuAutoResizer) {\n\t\t\t\tmenuAutoResizer.disconnect();\n\t\t\t}\n\t\t\tif (win) {\n\t\t\t\twin.close();\n\t\t\t\tsetChildWindow(null);\n\t\t\t}\n\t\t};\n\t}, [blurMenu, className, menuWidth, menuHeight, maxHeight, thisMenuId]);\n\n\t// We should only return a react portal when window is ready\n\t// and container div appended to its body\n\t// See Dan abramov comment about this at:\n\t// https://github.com/facebook/react/issues/12355#issuecomment-410996235\n\treturn element ? ReactDOM.createPortal(children, element) : null;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuShell.js","sourceRoot":"","sources":["../../../src/components/menu/MenuShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,GAAW,GAAG,CAAC;AA4B/B,MAAM,CAAC,MAAM,SAAS,GAAwC,CAAC,EAC9D,QAAQ,EACR,EAAE,EACF,KAAK,GAAG,UAAU,EAClB,MAAM,EACN,SAAS,EACT,SAAS,GAAG,QAAQ,EACpB,UAAU,EACV,WAAW,GAAG,CAAC,QAAQ,CAAC,GACxB,EAAE,EAAE;IAWJ,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,OAAO;YACN,UAAU,EAAE,EAAE,IAAI,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;YAC1E,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,KAAK;YAChB,UAAU,EAAE,MAAM;SAClB,CAAC;IACH,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9C,OAAO,CACN,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY;QACxC,oBAAC,UAAU,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,GAAI;QACnD,QAAQ,CACa,CACvB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { MenuContext } from \"./menuContext\";\r\nimport \"../../assets/css/menus.css\";\r\nimport { useMemo } from \"react\";\r\nimport { MenuHotKey } from \"./MenuHotKey\";\r\n\r\nconst MENU_WIDTH: number = 180;\r\n\r\ntype ShellProps = {\r\n\tclassName?: string;\r\n\tcloseHotkey?: Array<string>;\r\n\theight?: number;\r\n\tid?: string;\r\n\tmaxHeight?: number;\r\n\topenHotkey?: Array<string>;\r\n\twidth?: number;\r\n};\r\n\r\n/**\r\n * The higher level menu component that manages the menu state, renders different parts of the menu, and facilitates\r\n * communication between them.\r\n *\r\n * If window.FSBL.debug==true then windows won't automatically close on blur. This is useful for debugging events that occur in the windows.\r\n *\r\n * @param {string} [className] - Custom body class for the menu contents. These classes will be set on the <body> tag for the Menu's drop down window.\r\n * @param {array} [closeHotkey=[\"escape\"] ] - A hotkey combination to close the menu. Defaults to [\"escape\"].\r\n * @param {number} [height] - Custom height for the menu. If not set then the height will be automatically calculated based on the content height and available monitor space.\r\n * @param {string} [id] - Unique ID for the menu. Defaults to a random string.\r\n * @param {number} [maxHeight=Infinity] - Maximum height of the menu.\r\n * @param {array} [openHotkey] - A hotkey combination to open the menu.\r\n * @param {number} [width=180] - Custom width for the menu.\r\n *\r\n */\r\n\r\nexport const MenuShell: React.FunctionComponent<ShellProps> = ({\r\n\tchildren,\r\n\tid,\r\n\twidth = MENU_WIDTH,\r\n\theight,\r\n\tclassName,\r\n\tmaxHeight = Infinity,\r\n\topenHotkey,\r\n\tcloseHotkey = [\"escape\"],\r\n}) => {\r\n\t/**\r\n\t * Every menu has its own context which contains information that child components need to use.\r\n\t * Here, we initialize that context. We do this with useMemo() for efficiency. Without useMemo,\r\n\t * our context value *object* would be recreated with every render cycle, and would thus trigger\r\n\t * every object that depended on context to re-render. Instead, useMenu creates a stable object\r\n\t * that only updates when one of *its* dependencies updates. So in essence, so long as MenuShell's\r\n\t * props are stable, context and all child props will also be stable.\r\n\t *\r\n\t * If id is passed in as a prop then we'll use that to initialize thisMenuId. Otherwise we'll set it to a random string.\r\n\t */\r\n\tconst contextValue = useMemo(() => {\r\n\t\treturn {\r\n\t\t\tthisMenuId: id || `MENU_${((Math.random() * 0xffffff) << 0).toString(16)}`,\r\n\t\t\tclassName: className,\r\n\t\t\tmaxHeight: maxHeight,\r\n\t\t\tmenuWidth: width,\r\n\t\t\tmenuHeight: height,\r\n\t\t};\r\n\t}, [id, className, maxHeight, width, height]);\r\n\r\n\treturn (\r\n\t\t<MenuContext.Provider value={contextValue}>\r\n\t\t\t<MenuHotKey open={openHotkey} close={closeHotkey} />\r\n\t\t\t{children}\r\n\t\t</MenuContext.Provider>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"MenuShell.js","sourceRoot":"","sources":["../../../src/components/menu/MenuShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,GAAW,GAAG,CAAC;AA4B/B,MAAM,CAAC,MAAM,SAAS,GAAwC,CAAC,EAC9D,QAAQ,EACR,EAAE,EACF,KAAK,GAAG,UAAU,EAClB,MAAM,EACN,SAAS,EACT,SAAS,GAAG,QAAQ,EACpB,UAAU,EACV,WAAW,GAAG,CAAC,QAAQ,CAAC,GACxB,EAAE,EAAE;IAWJ,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,OAAO;YACN,UAAU,EAAE,EAAE,IAAI,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;YAC1E,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,KAAK;YAChB,UAAU,EAAE,MAAM;SAClB,CAAC;IACH,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9C,OAAO,CACN,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY;QACxC,oBAAC,UAAU,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,GAAI;QACnD,QAAQ,CACa,CACvB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { MenuContext } from \"./menuContext\";\nimport \"../../assets/css/menus.css\";\nimport { useMemo } from \"react\";\nimport { MenuHotKey } from \"./MenuHotKey\";\n\nconst MENU_WIDTH: number = 180;\n\ntype ShellProps = {\n\tclassName?: string;\n\tcloseHotkey?: Array<string>;\n\theight?: number;\n\tid?: string;\n\tmaxHeight?: number;\n\topenHotkey?: Array<string>;\n\twidth?: number;\n};\n\n/**\n * The higher level menu component that manages the menu state, renders different parts of the menu, and facilitates\n * communication between them.\n *\n * If window.FSBL.debug==true then windows won't automatically close on blur. This is useful for debugging events that occur in the windows.\n *\n * @param {string} [className] - Custom body class for the menu contents. These classes will be set on the <body> tag for the Menu's drop down window.\n * @param {array} [closeHotkey=[\"escape\"] ] - A hotkey combination to close the menu. Defaults to [\"escape\"].\n * @param {number} [height] - Custom height for the menu. If not set then the height will be automatically calculated based on the content height and available monitor space.\n * @param {string} [id] - Unique ID for the menu. Defaults to a random string.\n * @param {number} [maxHeight=Infinity] - Maximum height of the menu.\n * @param {array} [openHotkey] - A hotkey combination to open the menu.\n * @param {number} [width=180] - Custom width for the menu.\n *\n */\n\nexport const MenuShell: React.FunctionComponent<ShellProps> = ({\n\tchildren,\n\tid,\n\twidth = MENU_WIDTH,\n\theight,\n\tclassName,\n\tmaxHeight = Infinity,\n\topenHotkey,\n\tcloseHotkey = [\"escape\"],\n}) => {\n\t/**\n\t * Every menu has its own context which contains information that child components need to use.\n\t * Here, we initialize that context. We do this with useMemo() for efficiency. Without useMemo,\n\t * our context value *object* would be recreated with every render cycle, and would thus trigger\n\t * every object that depended on context to re-render. Instead, useMenu creates a stable object\n\t * that only updates when one of *its* dependencies updates. So in essence, so long as MenuShell's\n\t * props are stable, context and all child props will also be stable.\n\t *\n\t * If id is passed in as a prop then we'll use that to initialize thisMenuId. Otherwise we'll set it to a random string.\n\t */\n\tconst contextValue = useMemo(() => {\n\t\treturn {\n\t\t\tthisMenuId: id || `MENU_${((Math.random() * 0xffffff) << 0).toString(16)}`,\n\t\t\tclassName: className,\n\t\t\tmaxHeight: maxHeight,\n\t\t\tmenuWidth: width,\n\t\t\tmenuHeight: height,\n\t\t};\n\t}, [id, className, maxHeight, width, height]);\n\n\treturn (\n\t\t<MenuContext.Provider value={contextValue}>\n\t\t\t<MenuHotKey open={openHotkey} close={closeHotkey} />\n\t\t\t{children}\n\t\t</MenuContext.Provider>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuToggle.js","sourceRoot":"","sources":["../../../src/components/menu/MenuToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAK9C,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,CAAC;IAC/C,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAErD,MAAM,eAAe,GAAW,YAAY,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAEpE,OAAO,CACN,6BACC,EAAE,EAAE,GAAG,UAAU,cAAc,EAC/B,SAAS,EAAE,4BAA4B,eAAe,EAAE,EACxD,WAAW,EAAE,UAAU,EACvB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,CAAsC,EAAE,EAAE;YACrD,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;gBACvC,UAAU,EAAE,CAAC;aACb;QACF,CAAC;QAEA,QAAQ;QACT,2BAAG,SAAS,EAAC,+CAA+C,GAAK,CAC5D,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { MenuContext } from \"./menuContext\";\r\nimport { useMenu } from \"../../hooks/useMenu\";\r\n\r\n/**\r\n * A menu button that opens and closes the menu.\r\n */\r\nexport const MenuToggle: React.FunctionComponent = ({ children }) => {\r\n\tconst { toggleMenu, isMenuActive } = useMenu();\r\n\tconst { thisMenuId } = React.useContext(MenuContext);\r\n\r\n\tconst menuActiveClass: string = isMenuActive() ? \"menu-active\" : \"\";\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tid={`${thisMenuId}-menu-toggle`}\r\n\t\t\tclassName={`finsemble-toolbar-button ${menuActiveClass}`}\r\n\t\t\tonMouseDown={toggleMenu}\r\n\t\t\trole=\"button\"\r\n\t\t\ttabIndex={0}\r\n\t\t\tonKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\r\n\t\t\t\tif ([\"Enter\", \"Space\"].includes(e.key)) {\r\n\t\t\t\t\ttoggleMenu();\r\n\t\t\t\t}\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t\t<i className=\"finsemble-toolbar-button-icon ff-chevron-down\"></i>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"MenuToggle.js","sourceRoot":"","sources":["../../../src/components/menu/MenuToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAK9C,MAAM,CAAC,MAAM,UAAU,GAA4B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,CAAC;IAC/C,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAErD,MAAM,eAAe,GAAW,YAAY,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAEpE,OAAO,CACN,6BACC,EAAE,EAAE,GAAG,UAAU,cAAc,EAC/B,SAAS,EAAE,4BAA4B,eAAe,EAAE,EACxD,WAAW,EAAE,UAAU,EACvB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,CAAsC,EAAE,EAAE;YACrD,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;gBACvC,UAAU,EAAE,CAAC;aACb;QACF,CAAC;QAEA,QAAQ;QACT,2BAAG,SAAS,EAAC,+CAA+C,GAAK,CAC5D,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { MenuContext } from \"./menuContext\";\nimport { useMenu } from \"../../hooks/useMenu\";\n\n/**\n * A menu button that opens and closes the menu.\n */\nexport const MenuToggle: React.FunctionComponent = ({ children }) => {\n\tconst { toggleMenu, isMenuActive } = useMenu();\n\tconst { thisMenuId } = React.useContext(MenuContext);\n\n\tconst menuActiveClass: string = isMenuActive() ? \"menu-active\" : \"\";\n\n\treturn (\n\t\t<div\n\t\t\tid={`${thisMenuId}-menu-toggle`}\n\t\t\tclassName={`finsemble-toolbar-button ${menuActiveClass}`}\n\t\t\tonMouseDown={toggleMenu}\n\t\t\trole=\"button\"\n\t\t\ttabIndex={0}\n\t\t\tonKeyDown={(e: React.KeyboardEvent<HTMLDivElement>) => {\n\t\t\t\tif ([\"Enter\", \"Space\"].includes(e.key)) {\n\t\t\t\t\ttoggleMenu();\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t\t<i className=\"finsemble-toolbar-button-icon ff-chevron-down\"></i>\n\t\t</div>\n\t);\n};\n"]}