@finsemble/finsemble-ui 6.4.0-beta.1 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (755) hide show
  1. package/README.md +28 -28
  2. package/package.json +20 -19
  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.d.ts +6 -2
  9. package/react/actions/smartDesktopDesignerActions.js +2 -0
  10. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  11. package/react/actions/toolbarActions.js.map +1 -1
  12. package/react/actions/workspaceActions.js.map +1 -1
  13. package/react/assets/css/advancedAppLauncher.css +636 -636
  14. package/react/assets/css/appCatalog.css +1069 -1069
  15. package/react/assets/css/authentication.css +78 -78
  16. package/react/assets/css/button.css +220 -220
  17. package/react/assets/css/core/formElements.css +23 -23
  18. package/react/assets/css/core/icons.css +69 -69
  19. package/react/assets/css/core/notifications.css +75 -75
  20. package/react/assets/css/core/windowFrame.css +36 -36
  21. package/react/assets/css/dashbar.css +78 -78
  22. package/react/assets/css/defaultTheme.css +356 -356
  23. package/react/assets/css/dialogs.css +158 -158
  24. package/react/assets/css/favorites.css +101 -101
  25. package/react/assets/css/finsemble.css +38 -38
  26. package/react/assets/css/focus.css +4 -4
  27. package/react/assets/css/font-finance.css +385 -385
  28. package/react/assets/css/fonts/Open_Sans/LICENSE.txt +202 -202
  29. package/react/assets/css/fonts/Open_Sans/OpenSans-Definition.css +118 -118
  30. package/react/assets/css/fonts/font-finance.svg +124 -124
  31. package/react/assets/css/fonts/icons-reference.html +1174 -1174
  32. package/react/assets/css/linkerWindow.css +124 -124
  33. package/react/assets/css/menus.css +195 -195
  34. package/react/assets/css/notificationsCenter.css +597 -597
  35. package/react/assets/css/processMonitor.css +213 -213
  36. package/react/assets/css/search.css +128 -128
  37. package/react/assets/css/shared/animations.css +99 -99
  38. package/react/assets/css/tags.css +136 -136
  39. package/react/assets/css/toolbar.css +413 -413
  40. package/react/assets/css/userPreferences.css +538 -538
  41. package/react/assets/css/windowTitleBar.css +653 -652
  42. package/react/assets/icons/always-on-top.svg +20 -0
  43. package/react/assets/icons/caret.svg +7 -7
  44. package/react/assets/icons/check-square.svg +5 -5
  45. package/react/assets/icons/check.svg +3 -3
  46. package/react/assets/icons/chevron-left.svg +3 -3
  47. package/react/assets/icons/chevron-right.svg +3 -3
  48. package/react/assets/icons/close.svg +11 -0
  49. package/react/assets/icons/code-block.svg +15 -0
  50. package/react/assets/icons/copy.svg +10 -10
  51. package/react/assets/icons/documentation.svg +20 -0
  52. package/react/assets/icons/exclamation-circle.svg +4 -4
  53. package/react/assets/icons/external-link.svg +12 -12
  54. package/react/assets/icons/flag.svg +10 -10
  55. package/react/assets/icons/folder.svg +3 -3
  56. package/react/assets/icons/font.svg +3 -3
  57. package/react/assets/icons/globe.svg +3 -3
  58. package/react/assets/icons/hdd.svg +9 -9
  59. package/react/assets/icons/key.svg +10 -10
  60. package/react/assets/icons/life-ring.svg +3 -3
  61. package/react/assets/icons/linker.svg +18 -0
  62. package/react/assets/icons/lock.svg +5 -5
  63. package/react/assets/icons/magic.svg +15 -15
  64. package/react/assets/icons/maximize.svg +16 -0
  65. package/react/assets/icons/minimize.svg +15 -0
  66. package/react/assets/icons/moon.svg +10 -10
  67. package/react/assets/icons/paint-roller.svg +3 -3
  68. package/react/assets/icons/pencil.svg +10 -10
  69. package/react/assets/icons/plus.svg +3 -3
  70. package/react/assets/icons/question-circle.svg +5 -5
  71. package/react/assets/icons/search.svg +3 -3
  72. package/react/assets/icons/sun.svg +9 -9
  73. package/react/assets/icons/times.svg +3 -3
  74. package/react/assets/icons/toggle-off.svg +6 -6
  75. package/react/assets/icons/toggle-on.svg +6 -6
  76. package/react/assets/icons/toolbar.svg +12 -12
  77. package/react/assets/icons/tools.svg +3 -3
  78. package/react/assets/icons/trash.svg +12 -12
  79. package/react/assets/icons/upload.svg +10 -10
  80. package/react/assets/icons/window.svg +3 -3
  81. package/react/assets/img/finsemble-display.png +0 -0
  82. package/react/componentTemplateGenerator.js +85 -85
  83. package/react/componentTemplateGenerator.js.map +1 -1
  84. package/react/components/FinsembleProvider.js.map +1 -1
  85. package/react/components/appCatalog/AppCatalog.js.map +1 -1
  86. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  87. package/react/components/appCatalog/components/AppCard.js.map +1 -1
  88. package/react/components/appCatalog/components/AppList.js.map +1 -1
  89. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  90. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  91. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  92. package/react/components/appCatalog/components/Hero.js.map +1 -1
  93. package/react/components/appCatalog/components/Home.js.map +1 -1
  94. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  95. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  96. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  97. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  98. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  99. package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
  100. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  101. package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
  102. package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
  103. package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
  104. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  105. package/react/components/appCatalog/components/Tag.js.map +1 -1
  106. package/react/components/appCatalog/components/Toast.js.map +1 -1
  107. package/react/components/appCatalog/components/helpers.js.map +1 -1
  108. package/react/components/appCatalog/index.js.map +1 -1
  109. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  110. package/react/components/appCatalog/modules/FDC3.d.ts +1 -1
  111. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  112. package/react/components/appCatalog/stores/appStore.d.ts +2 -2
  113. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  114. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  115. package/react/components/common/Accordion.js +1 -1
  116. package/react/components/common/Accordion.js.map +1 -1
  117. package/react/components/common/Button.js.map +1 -1
  118. package/react/components/common/ButtonIcon.js.map +1 -1
  119. package/react/components/common/ButtonRow.js.map +1 -1
  120. package/react/components/common/ButtonTile.js.map +1 -1
  121. package/react/components/common/Checkbox.js +1 -1
  122. package/react/components/common/Checkbox.js.map +1 -1
  123. package/react/components/common/ColorPicker.js.map +1 -1
  124. package/react/components/common/DropZone.js +3 -1
  125. package/react/components/common/DropZone.js.map +1 -1
  126. package/react/components/common/DropdownButton.js.map +1 -1
  127. package/react/components/common/FileInput.d.ts +2 -1
  128. package/react/components/common/FileInput.js +9 -4
  129. package/react/components/common/FileInput.js.map +1 -1
  130. package/react/components/common/FinsembleIcon.d.ts +1 -1
  131. package/react/components/common/FinsembleIcon.js +15 -1
  132. package/react/components/common/FinsembleIcon.js.map +1 -1
  133. package/react/components/common/FinsembleSelect.js +1 -1
  134. package/react/components/common/FinsembleSelect.js.map +1 -1
  135. package/react/components/common/FinsembleToggle.js.map +1 -1
  136. package/react/components/common/Header.js +3 -1
  137. package/react/components/common/Header.js.map +1 -1
  138. package/react/components/common/ImagePreview.js.map +1 -1
  139. package/react/components/common/InputTable.js.map +1 -1
  140. package/react/components/common/LoadingSpinner.js.map +1 -1
  141. package/react/components/common/Tab.js.map +1 -1
  142. package/react/components/common/Tooltip.js +3 -1
  143. package/react/components/common/Tooltip.js.map +1 -1
  144. package/react/components/common/css/accordion.css +99 -89
  145. package/react/components/common/css/application-edit-page.css +324 -223
  146. package/react/components/common/css/application-list.css +53 -47
  147. package/react/components/common/css/button.css +166 -166
  148. package/react/components/common/css/checkbox.css +30 -31
  149. package/react/components/common/css/color-picker.css +52 -52
  150. package/react/components/common/css/drop-zone.css +17 -17
  151. package/react/components/common/css/file-input.css +65 -49
  152. package/react/components/common/css/header.css +30 -32
  153. package/react/components/common/css/icon.css +13 -13
  154. package/react/components/common/css/image-preview.css +57 -57
  155. package/react/components/common/css/loading-spinner.css +39 -39
  156. package/react/components/common/css/preload-edit-page.css +37 -0
  157. package/react/components/common/css/selector.css +51 -51
  158. package/react/components/common/css/styles.css +127 -128
  159. package/react/components/common/css/tab.css +56 -56
  160. package/react/components/common/css/toggle.css +32 -32
  161. package/react/components/common/css/tooltip.css +78 -78
  162. package/react/components/common/file_helpers.js.map +1 -1
  163. package/react/components/common/fixtures/FinsembleIcon.css +4 -4
  164. package/react/components/common/helpers.js.map +1 -1
  165. package/react/components/common/stories/Accordion.stories.js.map +1 -1
  166. package/react/components/common/stories/Button.stories.js.map +1 -1
  167. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  168. package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
  169. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  170. package/react/components/common/stories/Checkbox.stories.js.map +1 -1
  171. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  172. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  173. package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
  174. package/react/components/common/stories/FileInput.stories.d.ts +2 -1
  175. package/react/components/common/stories/FileInput.stories.js +6 -0
  176. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  177. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  178. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  179. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  180. package/react/components/common/stories/Header.stories.js.map +1 -1
  181. package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
  182. package/react/components/common/stories/InputTable.stories.js.map +1 -1
  183. package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
  184. package/react/components/common/stories/Tab.stories.js.map +1 -1
  185. package/react/components/common/stories/Tooltip.stories.js.map +1 -1
  186. package/react/components/common/tests/Accordion.spec.js.map +1 -1
  187. package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
  188. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  189. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  190. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  191. package/react/components/common/tests/FileInput.spec.js +20 -5
  192. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  193. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  194. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  195. package/react/components/common/tests/Header.spec.js +6 -2
  196. package/react/components/common/tests/Header.spec.js.map +1 -1
  197. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  198. package/react/components/common/tests/InputTable.spec.js.map +1 -1
  199. package/react/components/common/tests/Tab.spec.js.map +1 -1
  200. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  201. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  202. package/react/components/favorites/FavoritesShell.js.map +1 -1
  203. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  204. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  205. package/react/components/favorites/index.js.map +1 -1
  206. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  207. package/react/components/fdc3Resolver/ResolverDialog.css +126 -126
  208. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  209. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  210. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  211. package/react/components/icon/Icon.js.map +1 -1
  212. package/react/components/icon/index.js.map +1 -1
  213. package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
  214. package/react/components/legacyControls/FinsembleDialogButton.js +1 -1
  215. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  216. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  217. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  218. package/react/components/legacyControls/FinsembleDnDContext.d.ts +2 -1
  219. package/react/components/legacyControls/FinsembleDnDContext.js +8 -6
  220. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  221. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  222. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  223. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  224. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  225. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  226. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  227. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  228. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  229. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  230. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  231. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  232. package/react/components/linker/LinkerMenu.js.map +1 -1
  233. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  234. package/react/components/linker/index.js.map +1 -1
  235. package/react/components/linker/remoteRedux.d.ts +1 -1
  236. package/react/components/linker/remoteRedux.js.map +1 -1
  237. package/react/components/menu/Menu.d.ts +1 -0
  238. package/react/components/menu/Menu.js.map +1 -1
  239. package/react/components/menu/MenuAutoResizer.d.ts +2 -1
  240. package/react/components/menu/MenuAutoResizer.js +3 -2
  241. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  242. package/react/components/menu/MenuContent.js.map +1 -1
  243. package/react/components/menu/MenuHotKey.js.map +1 -1
  244. package/react/components/menu/MenuItem.js.map +1 -1
  245. package/react/components/menu/MenuPortal.js +118 -92
  246. package/react/components/menu/MenuPortal.js.map +1 -1
  247. package/react/components/menu/MenuShell.d.ts +1 -0
  248. package/react/components/menu/MenuShell.js +3 -2
  249. package/react/components/menu/MenuShell.js.map +1 -1
  250. package/react/components/menu/MenuToggle.js.map +1 -1
  251. package/react/components/menu/index.js.map +1 -1
  252. package/react/components/menu/keyboardNavigation.js.map +1 -1
  253. package/react/components/menu/menuContext.d.ts +1 -0
  254. package/react/components/menu/menuContext.js.map +1 -1
  255. package/react/components/menu/menuHelpers.d.ts +1 -1
  256. package/react/components/menu/menuHelpers.js +2 -2
  257. package/react/components/menu/menuHelpers.js.map +1 -1
  258. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  259. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  260. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  261. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  262. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  263. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +20 -27
  264. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  265. package/react/components/notifications/components/shared/CheckButton.d.ts +1 -1
  266. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  267. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  268. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
  269. package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
  270. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  271. package/react/components/notifications/components/shared/OverflowMenu.d.ts +1 -1
  272. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  273. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +1 -1
  274. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  275. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
  276. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +1 -1
  277. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  278. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
  279. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  280. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
  281. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +1 -1
  282. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  283. package/react/components/notifications/components/views/CardView.js.map +1 -1
  284. package/react/components/notifications/components/views/ListView.d.ts +1 -1
  285. package/react/components/notifications/components/views/ListView.js +1 -1
  286. package/react/components/notifications/components/views/ListView.js.map +1 -1
  287. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +1 -1
  288. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  289. package/react/components/notifications/constants.js.map +1 -1
  290. package/react/components/notifications/icons/Card.js.map +1 -1
  291. package/react/components/notifications/icons/Chevron.js.map +1 -1
  292. package/react/components/notifications/icons/CloseIcon.js.map +1 -1
  293. package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
  294. package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
  295. package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
  296. package/react/components/notifications/index.js.map +1 -1
  297. package/react/components/notifications/notificationsContext.js.map +1 -1
  298. package/react/components/notifications/types.d.ts +1 -1
  299. package/react/components/notifications/types.js.map +1 -1
  300. package/react/components/notifications/utils.d.ts +1 -1
  301. package/react/components/notifications/utils.js.map +1 -1
  302. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  303. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
  304. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  305. package/react/components/processMonitor/components/ListHeader.d.ts +1 -1
  306. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  307. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  308. package/react/components/processMonitor/constants.js.map +1 -1
  309. package/react/components/processMonitor/helpers.js.map +1 -1
  310. package/react/components/processMonitor/helpers.spec.js.map +1 -1
  311. package/react/components/processMonitor/index.js.map +1 -1
  312. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +4 -3
  313. package/react/components/processMonitor/stores/ProcessMonitorStore.js +51 -50
  314. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  315. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  316. package/react/components/quickComponentForm/index.js.map +1 -1
  317. package/react/components/quickComponentForm/quickComponent.css +3 -3
  318. package/react/components/search/Highlight.js.map +1 -1
  319. package/react/components/search/Highlight.spec.js.map +1 -1
  320. package/react/components/search/Highlight.stories.js.map +1 -1
  321. package/react/components/search/Search.js.map +1 -1
  322. package/react/components/search/SearchBestMatch.js.map +1 -1
  323. package/react/components/search/SearchInput.js.map +1 -1
  324. package/react/components/search/SearchProviderResults.js.map +1 -1
  325. package/react/components/search/SearchResult.js +4 -3
  326. package/react/components/search/SearchResult.js.map +1 -1
  327. package/react/components/search/SearchResults.js.map +1 -1
  328. package/react/components/search/index.js.map +1 -1
  329. package/react/components/shared/Animate.js.map +1 -1
  330. package/react/components/shared/BellIcon.js.map +1 -1
  331. package/react/components/shared/BellIconCrossed.js.map +1 -1
  332. package/react/components/shared/Button.js.map +1 -1
  333. package/react/components/shared/ConditionalWrapper.js.map +1 -1
  334. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  335. package/react/components/shared/NavigationButton.js.map +1 -1
  336. package/react/components/shared/Tag.js.map +1 -1
  337. package/react/components/shared/TagsMenu.js.map +1 -1
  338. package/react/components/shared/addProtocolToValidURL.js.map +1 -1
  339. package/react/components/shared/linkerUtil.js.map +1 -1
  340. package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
  341. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  342. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
  343. package/react/components/shared/validateURL.js.map +1 -1
  344. package/react/components/shared/validateURL.spec.js.map +1 -1
  345. package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
  346. package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
  347. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  348. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  349. package/react/components/singleInputDialog/index.js.map +1 -1
  350. package/react/components/smartDesktopDesigner/AddApp.d.ts +2 -2
  351. package/react/components/smartDesktopDesigner/AddApp.js +28 -17
  352. package/react/components/smartDesktopDesigner/AddApp.js.map +1 -1
  353. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
  354. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +2 -2
  355. package/react/components/smartDesktopDesigner/AppEditPage.js +311 -242
  356. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  357. package/react/components/smartDesktopDesigner/Appearance.css +35 -28
  358. package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
  359. package/react/components/smartDesktopDesigner/Appearance.js +1 -1
  360. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  361. package/react/components/smartDesktopDesigner/Application.d.ts +10 -3
  362. package/react/components/smartDesktopDesigner/Application.js +37 -44
  363. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  364. package/react/components/smartDesktopDesigner/Applications.d.ts +2 -0
  365. package/react/components/smartDesktopDesigner/Applications.js +29 -20
  366. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  367. package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
  368. package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
  369. package/react/components/smartDesktopDesigner/Authentication.js +2 -9
  370. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  371. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -1
  372. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  373. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  374. package/react/components/smartDesktopDesigner/ContentHeader.d.ts +5 -0
  375. package/react/components/smartDesktopDesigner/ContentHeader.js +10 -0
  376. package/react/components/smartDesktopDesigner/ContentHeader.js.map +1 -0
  377. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  378. package/react/components/smartDesktopDesigner/EditPreload.d.ts +14 -0
  379. package/react/components/smartDesktopDesigner/EditPreload.js +169 -0
  380. package/react/components/smartDesktopDesigner/EditPreload.js.map +1 -0
  381. package/react/components/smartDesktopDesigner/Export.js +5 -5
  382. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  383. package/react/components/smartDesktopDesigner/ExportCloud.d.ts +3 -1
  384. package/react/components/smartDesktopDesigner/ExportCloud.js +4 -4
  385. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  386. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  387. package/react/components/smartDesktopDesigner/ExportZip.d.ts +3 -1
  388. package/react/components/smartDesktopDesigner/ExportZip.js +8 -3
  389. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  390. package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -0
  391. package/react/components/smartDesktopDesigner/GettingStarted.js +11 -22
  392. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  393. package/react/components/smartDesktopDesigner/ItemList.d.ts +17 -0
  394. package/react/components/smartDesktopDesigner/ItemList.js +58 -0
  395. package/react/components/smartDesktopDesigner/ItemList.js.map +1 -0
  396. package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
  397. package/react/components/smartDesktopDesigner/OptionalSettingsView.d.ts +11 -0
  398. package/react/components/smartDesktopDesigner/OptionalSettingsView.js +71 -0
  399. package/react/components/smartDesktopDesigner/OptionalSettingsView.js.map +1 -0
  400. package/react/components/smartDesktopDesigner/Preloads.d.ts +8 -0
  401. package/react/components/smartDesktopDesigner/Preloads.js +26 -0
  402. package/react/components/smartDesktopDesigner/Preloads.js.map +1 -0
  403. package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
  404. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  405. package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
  406. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +1 -1
  407. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +34 -3
  408. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  409. package/react/components/smartDesktopDesigner/ThemePage.css +109 -109
  410. package/react/components/smartDesktopDesigner/ThemePage.js +0 -7
  411. package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
  412. package/react/components/smartDesktopDesigner/Themes.js +0 -2
  413. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  414. package/react/components/smartDesktopDesigner/Toolbar.js +16 -18
  415. package/react/components/smartDesktopDesigner/Toolbar.js.map +1 -1
  416. package/react/components/smartDesktopDesigner/View.js +1 -1
  417. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  418. package/react/components/smartDesktopDesigner/common/fsbl_functions.d.ts +1 -1
  419. package/react/components/smartDesktopDesigner/common/fsbl_functions.js +2 -2
  420. package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
  421. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  422. package/react/components/smartDesktopDesigner/common/views.js +27 -3
  423. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  424. package/react/components/smartDesktopDesigner/css/appearance.css +21 -18
  425. package/react/components/smartDesktopDesigner/css/applications.css +167 -167
  426. package/react/components/smartDesktopDesigner/css/authentication.css +119 -130
  427. package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
  428. package/react/components/smartDesktopDesigner/css/export.css +176 -167
  429. package/react/components/smartDesktopDesigner/css/getting-started.css +28 -8
  430. package/react/components/smartDesktopDesigner/css/nav.css +120 -109
  431. package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
  432. package/react/components/smartDesktopDesigner/css/project-header.css +124 -121
  433. package/react/components/smartDesktopDesigner/css/styles.css +178 -179
  434. package/react/components/smartDesktopDesigner/css/views.css +23 -17
  435. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +1 -1
  436. package/react/components/smartDesktopDesigner/fixtures/apps.js +23 -1
  437. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  438. package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
  439. package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
  440. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  441. package/react/components/smartDesktopDesigner/fixtures/preloads.d.ts +22 -0
  442. package/react/components/smartDesktopDesigner/fixtures/preloads.js +40 -0
  443. package/react/components/smartDesktopDesigner/fixtures/preloads.js.map +1 -0
  444. package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
  445. package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +1 -1
  446. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  447. package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
  448. package/react/components/smartDesktopDesigner/fixtures/views.js +14 -6
  449. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  450. package/react/components/smartDesktopDesigner/sdd_helpers.js +1 -1
  451. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  452. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +2 -1
  453. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +2 -0
  454. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  455. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  456. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  457. package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
  458. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  459. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.d.ts +10 -0
  460. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js +13 -0
  461. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +1 -0
  462. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.d.ts +11 -0
  463. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js +35 -0
  464. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js.map +1 -0
  465. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  466. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.d.ts +1 -1
  467. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +1 -1
  468. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  469. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.d.ts +1 -1
  470. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +1 -1
  471. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  472. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  473. package/react/components/smartDesktopDesigner/stories/ItemList.stories.d.ts +16 -0
  474. package/react/components/smartDesktopDesigner/stories/{ApplicationList.stories.js → ItemList.stories.js} +30 -23
  475. package/react/components/smartDesktopDesigner/stories/ItemList.stories.js.map +1 -0
  476. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  477. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.d.ts +11 -0
  478. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js +28 -0
  479. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js.map +1 -0
  480. package/react/components/smartDesktopDesigner/stories/Preloads.stories.d.ts +11 -0
  481. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js +31 -0
  482. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js.map +1 -0
  483. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  484. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  485. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  486. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +7 -1
  487. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  488. package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
  489. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  490. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +1 -1
  491. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +1100 -311
  492. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  493. package/react/components/smartDesktopDesigner/tests/{ApplicationList.spec.d.ts → Application.spec.d.ts} +0 -0
  494. package/react/components/smartDesktopDesigner/tests/Application.spec.js +1496 -0
  495. package/react/components/smartDesktopDesigner/tests/Application.spec.js.map +1 -0
  496. package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
  497. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +94 -7
  498. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  499. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  500. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.d.ts +1 -0
  501. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js +31 -0
  502. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +1 -0
  503. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.d.ts +1 -0
  504. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js +61 -0
  505. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js.map +1 -0
  506. package/react/components/smartDesktopDesigner/tests/Export.spec.js +95 -0
  507. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  508. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +7 -0
  509. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  510. package/react/components/smartDesktopDesigner/tests/ItemList.spec.d.ts +1 -0
  511. package/react/components/smartDesktopDesigner/tests/{ApplicationList.spec.js → ItemList.spec.js} +8 -8
  512. package/react/components/smartDesktopDesigner/tests/ItemList.spec.js.map +1 -0
  513. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  514. package/react/components/smartDesktopDesigner/tests/Preloads.spec.d.ts +1 -0
  515. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js +47 -0
  516. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js.map +1 -0
  517. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +1 -1
  518. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  519. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  520. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  521. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +7 -30
  522. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  523. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  524. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.d.ts +1 -1
  525. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js +5 -6
  526. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +1 -1
  527. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  528. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js +1 -0
  529. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +1 -1
  530. package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
  531. package/react/components/system/System.js.map +1 -1
  532. package/react/components/system/System.spec.js.map +1 -1
  533. package/react/components/system/System.stories.js.map +1 -1
  534. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  535. package/react/components/system/index.js.map +1 -1
  536. package/react/components/toolbar/AutoArrange.js.map +1 -1
  537. package/react/components/toolbar/DragHandle.js.map +1 -1
  538. package/react/components/toolbar/DragHandle.spec.d.ts +1 -0
  539. package/react/components/toolbar/DragHandle.spec.js +31 -0
  540. package/react/components/toolbar/DragHandle.spec.js.map +1 -0
  541. package/react/components/toolbar/DragHandle.stories.d.ts +13 -0
  542. package/react/components/toolbar/DragHandle.stories.js +39 -0
  543. package/react/components/toolbar/DragHandle.stories.js.map +1 -0
  544. package/react/components/toolbar/MinimizeAll.js.map +1 -1
  545. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  546. package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
  547. package/react/components/toolbar/NotificationControl.js.map +1 -1
  548. package/react/components/toolbar/RevealAll.js.map +1 -1
  549. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  550. package/react/components/toolbar/RevealAll.stories.js.map +1 -1
  551. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  552. package/react/components/toolbar/ToolbarSection.js.map +1 -1
  553. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  554. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +1 -1
  555. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  556. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  557. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  558. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  559. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  560. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  561. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  562. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +1 -1
  563. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  564. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  565. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +1 -1
  566. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +47 -45
  567. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  568. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  569. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  570. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  571. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  572. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +1 -1
  573. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  574. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  575. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
  576. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  577. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  578. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +2 -2
  579. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  580. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  581. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  582. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  583. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  584. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +1 -0
  585. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  586. package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
  587. package/react/components/toolbar/appLauncher/components/componentList.d.ts +2 -2
  588. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  589. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +3 -2
  590. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +17 -34
  591. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  592. package/react/components/toolbar/dashbar/Dashbar.js +9 -12
  593. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  594. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  595. package/react/components/toolbar/index.js.map +1 -1
  596. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +2 -2
  597. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  598. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
  599. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  600. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  601. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
  602. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  603. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +4 -4
  604. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +1 -1
  605. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  606. package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +90 -90
  607. package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
  608. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
  609. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  610. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  611. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
  612. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  613. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  614. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  615. package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -1
  616. package/react/components/userPreferences/components/content/General.js.map +1 -1
  617. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  618. package/react/components/userPreferences/components/content/Workspaces.d.ts +1 -1
  619. package/react/components/userPreferences/components/content/Workspaces.js +1 -1
  620. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  621. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  622. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  623. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  624. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  625. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  626. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
  627. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
  628. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
  629. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
  630. package/react/components/userPreferences/index.js.map +1 -1
  631. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +1 -1
  632. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  633. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  634. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
  635. package/react/components/userPreferences/stories/General.stories.js.map +1 -1
  636. package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -1
  637. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
  638. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
  639. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
  640. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
  641. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -1
  642. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
  643. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
  644. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
  645. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
  646. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
  647. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
  648. package/react/components/userPreferences/tests/General.spec.js.map +1 -1
  649. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
  650. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
  651. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
  652. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
  653. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
  654. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +1 -1
  655. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
  656. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
  657. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
  658. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
  659. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
  660. package/react/components/utils.js.map +1 -1
  661. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +4 -2
  662. package/react/components/windowTitleBar/WindowTitleBarShell.js +60 -59
  663. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  664. package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -1
  665. package/react/components/windowTitleBar/components/center/Tab.js +2 -2
  666. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  667. package/react/components/windowTitleBar/components/center/TabList.d.ts +2 -3
  668. package/react/components/windowTitleBar/components/center/TabList.js +19 -82
  669. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  670. package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
  671. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  672. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
  673. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  674. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
  675. package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
  676. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
  677. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  678. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  679. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +7 -0
  680. package/react/components/windowTitleBar/components/right/MaximizeButton.js +8 -2
  681. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  682. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  683. package/react/components/windowTitleBar/components/windowTitle.d.ts +9 -6
  684. package/react/components/windowTitleBar/components/windowTitle.js +154 -45
  685. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  686. package/react/components/windowTitleBar/index.js.map +1 -1
  687. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +3 -3
  688. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +213 -217
  689. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  690. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  691. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  692. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  693. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  694. package/react/components/yesNoDialog/YesNoDialog.css +3 -3
  695. package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
  696. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  697. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  698. package/react/components/yesNoDialog/index.js.map +1 -1
  699. package/react/components/yesNoDialog/timer.js.map +1 -1
  700. package/react/enzymeSetup.js.map +1 -1
  701. package/react/hooks/index.js.map +1 -1
  702. package/react/hooks/useAuth.js.map +1 -1
  703. package/react/hooks/useDashbar.js.map +1 -1
  704. package/react/hooks/useDeepEffect.js.map +1 -1
  705. package/react/hooks/useFavorites.js.map +1 -1
  706. package/react/hooks/useFavoritesShell.js.map +1 -1
  707. package/react/hooks/useHotkey.js.map +1 -1
  708. package/react/hooks/useLinker.js.map +1 -1
  709. package/react/hooks/useMenu.js.map +1 -1
  710. package/react/hooks/useNotifications.d.ts +1 -1
  711. package/react/hooks/useNotifications.js.map +1 -1
  712. package/react/hooks/useOutsideClickDetector.js.map +1 -1
  713. package/react/hooks/usePubSub.js.map +1 -1
  714. package/react/hooks/useSearch.js.map +1 -1
  715. package/react/hooks/useToolbar.js.map +1 -1
  716. package/react/hooks/useWorkspace.js.map +1 -1
  717. package/react/reducers/favoriteReducer.js.map +1 -1
  718. package/react/reducers/linkerReducer.js.map +1 -1
  719. package/react/reducers/menuReducer.js.map +1 -1
  720. package/react/reducers/rootReducer.d.ts +11 -3
  721. package/react/reducers/rootReducer.js.map +1 -1
  722. package/react/reducers/searchReducer.js.map +1 -1
  723. package/react/reducers/smartDesktopDesignerReducer.js +8 -0
  724. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  725. package/react/reducers/toolbarReducer.js.map +1 -1
  726. package/react/reducers/workspaceReducer.js.map +1 -1
  727. package/react/store.d.ts +22 -6
  728. package/react/store.js.map +1 -1
  729. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  730. package/react/types/dashbarTypes.js.map +1 -1
  731. package/react/types/favoriteTypes.js.map +1 -1
  732. package/react/types/fdc3.d.ts +2 -2
  733. package/react/types/fdc3.js.map +1 -1
  734. package/react/types/hotkeyTypes.js.map +1 -1
  735. package/react/types/iconTypes.js.map +1 -1
  736. package/react/types/linkerTypes.js.map +1 -1
  737. package/react/types/searchTypes.d.ts +1 -8
  738. package/react/types/searchTypes.js.map +1 -1
  739. package/react/types/smartDesktopDesignerTypes.d.ts +8 -2
  740. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  741. package/react/types/windowTitleBar.d.ts +4 -2
  742. package/react/types/windowTitleBar.js.map +1 -1
  743. package/react/types/workspaceTypes.js.map +1 -1
  744. package/react/components/common/FontSizeSelector.d.ts +0 -7
  745. package/react/components/common/FontSizeSelector.js +0 -42
  746. package/react/components/common/FontSizeSelector.js.map +0 -1
  747. package/react/components/common/stories/FontSizeSelector.stories.d.ts +0 -12
  748. package/react/components/common/stories/FontSizeSelector.stories.js +0 -24
  749. package/react/components/common/stories/FontSizeSelector.stories.js.map +0 -1
  750. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +0 -15
  751. package/react/components/smartDesktopDesigner/ApplicationList.js +0 -56
  752. package/react/components/smartDesktopDesigner/ApplicationList.js.map +0 -1
  753. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +0 -15
  754. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +0 -1
  755. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"windowTitleBarStore.js","sourceRoot":"","sources":["../../../../src/components/windowTitleBar/stores/windowTitleBarStore.ts"],"names":[],"mappings":"AAIA,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AAKxE,MAAM,uBAAuB,GAAG,CAAC,eAAgC,EAAE,EAAE;IACpE,MAAM,MAAM,GAAG,eAAe,CAAC,YAAY,CAAC;IAC5C,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;AACpD,CAAC,CAAC;AAQF,MAAM,gBAAgB,GAAG,CAAC,MAAoB,EAAE,EAAoB,EAAE,EAAE;IACvE,IAAI,CAAC,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AAe,EAAE,CAAC;IAEZ,CAAC;IAEhB,UAAU;QACT,IAAI,IAAI,CAAC,YAAY;YAAE,OAAO;QAC9B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,UAAU,CAAC,CAAC,KAAiB,EAAE,EAAE;YAChC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,sBAAsB,CAAC,EAAY;QAClC,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IAED,yBAAyB,CAAC,EAAY;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;CACD;AACD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,mBAAmB,IAAI,KAAK,EAAE,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport windowTitleBarStoreDefaults from \"./windowTitleBarStoreDefaults\";\r\nimport { StandardCallback } from \"@finsemble/finsemble-core/types/types\";\r\nimport { FinsembleWindow, WindowIdentifier } from \"@finsemble/finsemble-core\";\r\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\r\n\r\nconst getWindowNameForDocking = (finsembleWindow: FinsembleWindow) => {\r\n\tconst parent = finsembleWindow.parentWindow;\r\n\treturn parent ? parent.name : finsembleWindow.name;\r\n};\r\n\r\ntype ParentParams = {\r\n\twindowIdentifiers: WindowIdentifier[];\r\n\tvisibleWindowIdentifier: WindowIdentifier;\r\n\tcreate: boolean;\r\n};\r\n\r\nconst getStackedWindow = (params: ParentParams, cb: StandardCallback) => {\r\n\tif (!finsembleWindow.parentWindow && params.create) {\r\n\t\tconst onParentSet = (evt: any) => {\r\n\t\t\tconst { parentName } = evt.data;\r\n\t\t\tfinsembleWindow.setParent({ windowName: parentName }, (err2, windowWrapper) => {\r\n\t\t\t\tcb?.(err2, windowWrapper);\r\n\t\t\t});\r\n\t\t\tfinsembleWindow.removeListener(\"parent-set\", onParentSet);\r\n\t\t};\r\n\t\tfinsembleWindow.addListener(\"parent-set\", onParentSet);\r\n\t\tFSBL.Clients.LauncherClient.spawn(\r\n\t\t\t\"StackedWindow\",\r\n\t\t\t{\r\n\t\t\t\twindowType: \"StackedWindow\",\r\n\t\t\t\tdata: { windowIdentifiers: params.windowIdentifiers },\r\n\t\t\t\toptions: { newStack: true },\r\n\t\t\t},\r\n\t\t\t(err) => {\r\n\t\t\t\tif (!err) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tcb?.(err, null);\r\n\t\t\t}\r\n\t\t);\r\n\t} else {\r\n\t\tfinsembleWindow.getParent(cb);\r\n\t}\r\n};\r\n\r\nlet windowTitleBarStore: StoreModel;\r\n\r\ntype ConstantsType = {\r\n\tPARENT_WRAPPER_UPDATES: string;\r\n\tCHILD_WINDOW_FIELD: string;\r\n\tVISIBLE_WINDOW_FIELD: string;\r\n\tTAB_SCROLL_POSITION_CHANGED: string;\r\n};\r\n\r\ntype ActionsType = {\r\n\tparentWrapperStore: any;\r\n\tparentSubscriptions: any[];\r\n\tparentWrapper: FinsembleWindow | null;\r\n\r\n\tinitialize: () => void;\r\n\tgetMyDockingGroups: (groupData: any) => any[];\r\n\tonTabListScrollPositionChanged: StandardCallback;\r\n\tsetTabListScrollPosition: (translateX: number) => void;\r\n\tremoteStateUpdate: (command: string, state: any) => void;\r\n\tclickMinimize: () => void;\r\n\tclickClose: () => void;\r\n\ttoggleGroup: () => void;\r\n\tclickMaximize: () => void;\r\n\tgetTabs: () => WindowIdentifier[];\r\n\t_setTabs: (tabs: WindowIdentifier[] | null) => any;\r\n\taddTabLocally: (windowIdentifier: WindowIdentifier, i: number) => void;\r\n\tremoveTabsLocally: () => void;\r\n\tremoveTabLocally: (windowIdentifier: WindowIdentifier) => void;\r\n\treorderTabLocally: (tab: WindowIdentifier, newIndex: number) => undefined | any;\r\n\taddTab: (windowIdentifier: WindowIdentifier, i: number) => any;\r\n\tremoveTab: (windowIdentifier: WindowIdentifier, i: number) => any;\r\n\tcloseTab: (windowIdentifier: WindowIdentifier) => void;\r\n\treorderTab: (tab: WindowIdentifier, newIndex: number) => any;\r\n\tfindTab: (tab: WindowIdentifier) => { tab: WindowIdentifier; currentIndex: number };\r\n\tsetActiveTab: (windowIdentifier: WindowIdentifier) => Promise<any>;\r\n\tonTabListChanged: StandardCallback;\r\n\tstopListeningOnParentWrapper: (cb: Function) => void;\r\n\tlistenOnParentWrapper: () => void;\r\n\tsetupStore: (cb?: Function) => void;\r\n\tgetInitialTabList: (cb: StandardCallback) => void;\r\n\tcreateParentWrapper: (params: ParentParams, cb?: Function) => void;\r\n};\r\n\r\n// these are constants that are set inside of setupStore. so they're declared as vars and not constants.\r\nlet constants: ConstantsType;\r\nconst Actions: ActionsType = {\r\n\tparentWrapperStore: null,\r\n\tinitialize: function () {\r\n\t\t// This ensures that our config is correct, even if the developer missed some entries\r\n\t\tlet { options } = FSBL.Clients.WindowClient;\r\n\t\tlet windowTitleBarConfig = options.customData.foreign.components[\"Window Manager\"];\r\n\t\tlet { FSBLHeader } = windowTitleBarConfig;\r\n\t\tlet self = this;\r\n\r\n\t\t// Display name is first up for display. If it doesn't exist, we look for a default title (or one that's already set on init). If no title, we display the window's name (e.g., '5434-Welcome Component-2321').\r\n\t\tconst displayName = options.customData?.component?.displayName;\r\n\r\n\t\t/**\r\n\t\t * The windowTitleBar (header) is dumb. It just reflects the state of the component window. The headerCommandChannel allows the WindowClient to take control of the state of the header. All of the details of listening to window events are handled inside the WindowClient\r\n\t\t */\r\n\t\tFSBL.Clients.WindowClient.headerCommandChannel((command, state) => {\r\n\t\t\tthis.remoteStateUpdate(command, state);\r\n\t\t});\r\n\r\n\t\t/**\r\n\t\t * \"FSBLHeader\" can be true, false or an object. If false then we'll never even be here. If true, then maximize, minimize and close buttons will display. If an object, then the developer can override whether buttons are shown with \"hideMaximize\", \"hideMinimize\" and \"hideClose\"\r\n\t\t */\r\n\t\tif (FSBLHeader) {\r\n\t\t\tconst max = !!FSBLHeader.hideMaximize;\r\n\r\n\t\t\twindowTitleBarStore.setValues([\r\n\t\t\t\t{ field: \"Maximize.hide\", value: max },\r\n\t\t\t\t{ field: \"Minimize.hide\", value: !!FSBLHeader.hideMinimize },\r\n\t\t\t\t{ field: \"Close.hide\", value: !!FSBLHeader.hideClose },\r\n\t\t\t\t{ field: \"AlwaysOnTop.show\", value: !!FSBLHeader.alwaysOnTop },\r\n\t\t\t]);\r\n\r\n\t\t\t// By default, we hack the window's scroll bar so that it displays underneath the header. html.overflow: hidden body.overflow:auto\r\n\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\tfield: \"hackScrollbar\",\r\n\t\t\t\tvalue: windowTitleBarConfig.hackScrollbar !== false,\r\n\t\t\t});\r\n\r\n\t\t\tconst title = FSBL.Clients.WindowClient.title || windowTitleBarConfig.title || displayName;\r\n\r\n\t\t\tif (title) {\r\n\t\t\t\tdocument.title = title;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Handles whether to show the linker button.\r\n\t\t */\r\n\t\tif (windowTitleBarConfig.showLinker) {\r\n\t\t\t// Get state (channel membership) from the linkerClient. Then set the value in the header so that the title bar accurately reflects the state.\r\n\t\t\tconst cb: StandardCallback = (err, response) => {\r\n\t\t\t\tif (response.channels) {\r\n\t\t\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\t\t\tfield: \"Linker.channels\",\r\n\t\t\t\t\t\tvalue: response.channels,\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\t\tfield: \"Linker.showLinkerButton\",\r\n\t\t\t\t\tvalue: true,\r\n\t\t\t\t});\r\n\t\t\t};\r\n\t\t\tcb(null, FSBL.Clients.LinkerClient.getState());\r\n\t\t\t/* [Terry] no longer necessary?\r\n\t\t\tFSBL.Clients.LinkerClient.getLinkedChannels({\r\n\t\t\t\twindowName: options.name,\r\n\t\t\t\tuuid: options.uuid,\r\n\t\t\t\tcomponentType: options.customData.component.type\r\n\t\t\t}, cb);\r\n\t\t\t*/\r\n\t\t\tFSBL.Clients.LinkerClient.onStateChange(cb);\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Listen for updates from the dragAndDropClient.\r\n\t\t */\r\n\t\tFSBL.Clients.RouterClient.subscribe(\r\n\t\t\t`${FSBL.Clients.WindowClient.options.name}Finsemble.Sharer`,\r\n\t\t\t(err, response) => {\r\n\t\t\t\tif (err) {\r\n\t\t\t\t\treturn console.error(err);\r\n\t\t\t\t}\r\n\t\t\t\twindowTitleBarStore.setValues([\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"Sharer.emitterEnabled\",\r\n\t\t\t\t\t\tvalue: response.data.emitterEnabled,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfield: \"Sharer.receiverEnabled\",\r\n\t\t\t\t\t\tvalue: response.data.receiverEnabled,\r\n\t\t\t\t\t},\r\n\t\t\t\t]);\r\n\t\t\t}\r\n\t\t);\r\n\r\n\t\t/**\r\n\t\t * When a group update is publish, we sift through the data to see if this window is snapped or grouped with other windows. Then we publish that info, and the GroupingButton renders the correct icon.\r\n\t\t * @param {*} err\r\n\t\t * @param {*} response\r\n\t\t */\r\n\t\tconst onDockingGroupUpdate: StandardCallback = function (err, response) {\r\n\t\t\tif (err || !response.data || !response.data.groupData) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tFSBL.Clients.Logger.system.debug(\"On docking group update\", response.data.groupData);\r\n\t\t\tlet groupNames = Object.keys(response.data.groupData);\r\n\t\t\tlet movableGroups = groupNames\r\n\t\t\t\t.filter((groupName) => response.data.groupData[groupName].isMovable)\r\n\t\t\t\t.map((groupName) => response.data.groupData[groupName]);\r\n\t\t\t// This is all movable and snapped groups. It's used later to figure out the icon to display.\r\n\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\tfield: \"Main.allDockingGroups\",\r\n\t\t\t\tvalue: response.data.groupData,\r\n\t\t\t});\r\n\r\n\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\tfield: \"Main.allMovableDockingGroups\",\r\n\t\t\t\tvalue: movableGroups,\r\n\t\t\t});\r\n\t\t\tlet myGroups = self.getMyDockingGroups(response.data.groupData);\r\n\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\tfield: \"Main.dockingGroups\",\r\n\t\t\t\tvalue: myGroups,\r\n\t\t\t});\r\n\t\t\t/**\r\n\t\t\t * Goes through groups and sees if this window is grouped, snapped, or freely hanging out there.\r\n\t\t\t */\r\n\t\t\tlet isSnapped = false;\r\n\t\t\tlet isInMovableGroup = false;\r\n\t\t\tlet isTopRight = false;\r\n\t\t\tlet windowName = getWindowNameForDocking(finsembleWindow);\r\n\t\t\tfor (let i = 0; i < myGroups.length; i++) {\r\n\t\t\t\tlet myGroup = myGroups[i];\r\n\t\t\t\tif (myGroup.isMovable) {\r\n\t\t\t\t\tisInMovableGroup = true;\r\n\t\t\t\t\tif (windowName == myGroup.topRightWindow) {\r\n\t\t\t\t\t\tisTopRight = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tisSnapped = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlet icon: string | false = false;\r\n\r\n\t\t\tif (isSnapped) {\r\n\t\t\t\ticon = \"joiner\";\r\n\t\t\t}\r\n\t\t\tif (isInMovableGroup) {\r\n\t\t\t\ticon = \"ejector\";\r\n\t\t\t}\r\n\r\n\t\t\twindowTitleBarStore.setValues([\r\n\t\t\t\t{ field: \"isSnapped\", value: isSnapped },\r\n\t\t\t\t{ field: \"isGrouped\", value: isInMovableGroup },\r\n\t\t\t\t{ field: \"isTopRight\", value: isTopRight },\r\n\t\t\t\t{ field: \"Main.dockingIcon\", value: icon },\r\n\t\t\t]);\r\n\t\t};\r\n\r\n\t\tFSBL.Clients.RouterClient.subscribe(\"Finsemble.WorkspaceService.groupUpdate\", onDockingGroupUpdate);\r\n\r\n\t\t// default title.\r\n\t\twindowTitleBarStore.setValue({\r\n\t\t\tfield: \"Main.windowTitle\",\r\n\t\t\tvalue: FSBL.Clients.WindowClient.getWindowTitle(),\r\n\t\t});\r\n\r\n\t\tconst getValuesCallback: StandardCallback = (err, values) => {\r\n\t\t\tconst finsembleConfig = values.finsemble;\r\n\r\n\t\t\t// Check FEA config for DOM based movement configuration\r\n\t\t\tconst { useDOMBasedMovement } = values[\"finsemble-electron-adapter\"];\r\n\r\n\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\tfield: \"Main.useDOMBasedMovement\",\r\n\t\t\t\tvalue: typeof useDOMBasedMovement === \"undefined\" ? true : useDOMBasedMovement,\r\n\t\t\t});\r\n\r\n\t\t\tlet globalWindowManagerConfig = finsembleConfig[\"Window Manager\"] || {\r\n\t\t\t\talwaysOnTopIcon: false,\r\n\t\t\t\tshowTabs: false,\r\n\t\t\t}; // Override defaults if finsemble.Window Manager exists.\r\n\r\n\t\t\t// Look to see if docking is enabled. Cascade through backward compatibility with old \"betaFeatures\" and then a default if no config is found at all.\r\n\r\n\t\t\tif (!finsembleConfig.servicesConfig) finsembleConfig.servicesConfig = {};\r\n\t\t\tlet dockingConfig = finsembleConfig.servicesConfig.docking || finsembleConfig.docking;\r\n\t\t\tif (!dockingConfig && finsembleConfig.betaFeatures) dockingConfig = finsembleConfig.betaFeatures.docking;\r\n\t\t\tif (!dockingConfig) dockingConfig = { enabled: true };\r\n\t\t\tif (!dockingConfig.tabbing) dockingConfig.tabbing = {};\r\n\r\n\t\t\twindowTitleBarStore.setValues([{ field: \"Main.dockingEnabled\", value: dockingConfig.enabled }]);\r\n\r\n\t\t\t// Whether the alwaysOnTop pin shows or not depends first on the global setting (finsemble[\"Window Manager\"].alwaysOnTop) and then\r\n\t\t\t// on the specific setting for this component (foreign.components[\"Widow Manager\"].alwaysOnTop)\r\n\t\t\tlet { alwaysOnTopIcon } = globalWindowManagerConfig;\r\n\t\t\tif (windowTitleBarConfig.alwaysOnTopIcon === false || windowTitleBarConfig.alwaysOnTopIcon === true)\r\n\t\t\t\t({ alwaysOnTopIcon } = windowTitleBarConfig);\r\n\r\n\t\t\twindowTitleBarStore.setValues([{ field: \"AlwaysOnTop.show\", value: alwaysOnTopIcon }]);\r\n\r\n\t\t\t// If tabbing is turned off, ignore global/local 'windowManager' config about whether to allow tabbing.\r\n\t\t\tif (dockingConfig.tabbing.enabled === false) {\r\n\t\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\t\tfield: \"showTabs\",\r\n\t\t\t\t\tvalue: dockingConfig.tabbing.enabled,\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\t\tfield: \"allowTabEditing\",\r\n\t\t\t\t\tvalue: dockingConfig.tabbing.allowEditing !== undefined ? dockingConfig.tabbing.allowEditing : true,\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// If tabbing is enabled system-wide, look to the global config for its value. Then look to the local component's config.\r\n\r\n\t\t\t\t// This is the global window manager config.\r\n\t\t\t\tif (typeof windowTitleBarConfig.showTabs !== \"boolean\") {\r\n\t\t\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\t\t\tfield: \"showTabs\",\r\n\t\t\t\t\t\tvalue: globalWindowManagerConfig.showTabs,\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t// This is the component's config.\r\n\t\t\t\tif (windowTitleBarConfig.showTabs || windowTitleBarConfig.showTabs === false) {\r\n\t\t\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\t\t\tfield: \"showTabs\",\r\n\t\t\t\t\t\tvalue: windowTitleBarConfig.showTabs,\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Once the above has been checked the individual component config is checked for customData.foreign.services[windowService || dockingService][!ignoreTilingAndTabbingRequests || allowTabbing]\r\n\t\t\t\tlet showTabs = true;\r\n\t\t\t\tconst getOptionsCallback: StandardCallback = (_, opts) => {\r\n\t\t\t\t\tif (opts.customData && opts.customData.foreign && opts.customData.foreign.services) {\r\n\t\t\t\t\t\tif (opts.customData.foreign.services.windowService) {\r\n\t\t\t\t\t\t\tif (opts.customData.foreign.services.windowService.allowTabbing !== undefined) {\r\n\t\t\t\t\t\t\t\tshowTabs = opts.customData.foreign.services.windowService.allowTabbing;\r\n\t\t\t\t\t\t\t} else if (opts.customData.foreign.services.windowService.ignoreTilingAndTabbingRequests != undefined) {\r\n\t\t\t\t\t\t\t\tshowTabs = !opts.customData.foreign.services.windowService.ignoreTilingAndTabbingRequests;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (opts.customData.foreign.services.dockingService) {\r\n\t\t\t\t\t\t\tif (opts.customData.foreign.services.dockingService.allowTabbing !== undefined) {\r\n\t\t\t\t\t\t\t\tshowTabs = opts.customData.foreign.services.dockingService.allowTabbing;\r\n\t\t\t\t\t\t\t} else if (opts.customData.foreign.services.dockingService.ignoreTilingAndTabbingRequests != undefined) {\r\n\t\t\t\t\t\t\t\tshowTabs = !opts.customData.foreign.services.dockingService.ignoreTilingAndTabbingRequests;\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\r\n\t\t\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\t\t\tfield: \"showTabs\",\r\n\t\t\t\t\t\tvalue: showTabs,\r\n\t\t\t\t\t});\r\n\t\t\t\t};\r\n\t\t\t\tfinsembleWindow.getOptions(getOptionsCallback);\r\n\t\t\t}\r\n\t\t};\r\n\t\tFSBL.Clients.ConfigClient.getValues(\r\n\t\t\t[{ field: \"finsemble\" }, { field: \"finsemble-electron-adapter\" }],\r\n\t\t\tgetValuesCallback\r\n\t\t);\r\n\r\n\t\tActions.getInitialTabList((err, values) => {\r\n\t\t\tconst onParentSet = () => {\r\n\t\t\t\tActions.parentWrapper = null;\r\n\t\t\t\tActions.getInitialTabList(() => {\r\n\t\t\t\t\tFSBL.Clients.Logger.system.debug(\"docking group update after initial tab list\");\r\n\t\t\t\t\tonDockingGroupUpdate(null, {\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tgroupData: windowTitleBarStore.getValue({\r\n\t\t\t\t\t\t\t\tfield: \"Main.allDockingGroups\",\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\t\t\tconst onParentCleared = () => {\r\n\t\t\t\tActions.parentWrapper = null;\r\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"ClearParent, setting tabs to null\");\r\n\t\t\t\tActions.stopListeningOnParentWrapper(() => {\r\n\t\t\t\t\tActions.parentWrapperStore = null;\r\n\t\t\t\t\tActions._setTabs(null);\r\n\t\t\t\t\tonDockingGroupUpdate(null, {\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tgroupData: windowTitleBarStore.getValue({\r\n\t\t\t\t\t\t\t\tfield: \"Main.allDockingGroups\",\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\tfinsembleWindow?.addListener(\"setParent\", onParentSet);\r\n\t\t\tfinsembleWindow?.addListener(\"clearParent\", onParentCleared);\r\n\t\t\tif (err) {\r\n\t\t\t\treturn FSBL.Clients.Logger.system.error(\"Error in getInitialTabList.\", err);\r\n\t\t\t}\r\n\r\n\t\t\tif (values) Actions._setTabs(values);\r\n\t\t});\r\n\t},\r\n\t/**\r\n\t * Helper function to sift through all of the data coming from the windowService. Outputs an array of groups that the window belongs to.\r\n\t */\r\n\tgetMyDockingGroups: function (groupData) {\r\n\t\tlet myGroups = [];\r\n\t\tlet windowName = getWindowNameForDocking(finsembleWindow);\r\n\t\tif (finsembleWindow?.parentWindow) {\r\n\t\t\twindowName = finsembleWindow?.parentWindow.name;\r\n\t\t}\r\n\t\tFSBL.Clients.Logger.system.debug(\"Getting docking groups for \", windowName, groupData);\r\n\t\tif (groupData) {\r\n\t\t\tfor (let groupName in groupData) {\r\n\t\t\t\tgroupData[groupName].groupName = groupName;\r\n\t\t\t\tif (groupData[groupName].windowNames.includes(windowName)) {\r\n\t\t\t\t\tmyGroups.push(groupData[groupName]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn myGroups;\r\n\t},\r\n\tonTabListScrollPositionChanged: function (err, response) {\r\n\t\twindowTitleBarStore.setValue({\r\n\t\t\tfield: \"tabListTranslateX\",\r\n\t\t\tvalue: response.data.translateX,\r\n\t\t});\r\n\t},\r\n\tsetTabListScrollPosition: function (translateX) {\r\n\t\tFSBL.Clients.RouterClient.transmit(constants.TAB_SCROLL_POSITION_CHANGED, {\r\n\t\t\ttranslateX,\r\n\t\t});\r\n\t},\r\n\t/**\r\n\t * Handles messages coming from the windowClient.\r\n\t */\r\n\tremoteStateUpdate: function (command, state) {\r\n\t\tconst key = Object.keys(state)[0];\r\n\t\tconst field = `${command}.${key}`;\r\n\t\twindowTitleBarStore.setValue({ field: field, value: state[key] });\r\n\t},\r\n\t/**\r\n\t * Minimizes the window.\r\n\t */\r\n\tclickMinimize: function () {\r\n\t\tfinsembleWindow.minimize(() => {});\r\n\t},\r\n\t/**\r\n\t * Closes the window, allows for cleanup. Removes the window from workspace; this function is only invoked when the user clicks the close button.\r\n\t */\r\n\tclickClose: function () {\r\n\t\tFSBL.Clients.WindowClient.close({\r\n\t\t\tcloseWindow: true,\r\n\t\t\tremoveFromWorkspace: true, // this will cause the entire stack to close. Using this instead of a new parameter to ensure backwards compatibility\r\n\t\t\tuserInitiated: true,\r\n\t\t});\r\n\t},\r\n\t/**\r\n\t * Toggles group membership. If two windows are snapped, and this button is clicked, they become part of the same group that can be moved around together.\r\n\t */\r\n\ttoggleGroup: function () {\r\n\t\tconst groups = windowTitleBarStore.getValue({ field: \"Main.dockingGroups\" });\r\n\t\tconst isInMovableGroup = groups.some((group: any) => group.isMovable);\r\n\t\tif (isInMovableGroup) {\r\n\t\t\tfinsembleWindow.ejectFromGroup();\r\n\t\t} else {\r\n\t\t\tfinsembleWindow.formGroup();\r\n\t\t}\r\n\t},\r\n\t/**\r\n\t * Maximizes the window.\r\n\t */\r\n\tclickMaximize: function () {\r\n\t\tif (finsembleWindow.windowOptions.windowState !== finsembleWindow.WINDOWSTATE.MAXIMIZED)\r\n\t\t\treturn finsembleWindow.maximize(() => {\r\n\t\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\t\tfield: \"Maximize.maximized\",\r\n\t\t\t\t\tvalue: true,\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\treturn finsembleWindow.restore(() => {\r\n\t\t\twindowTitleBarStore.setValue({\r\n\t\t\t\tfield: \"Maximize.maximized\",\r\n\t\t\t\tvalue: false,\r\n\t\t\t});\r\n\t\t});\r\n\t},\r\n\r\n\tgetTabs() {\r\n\t\treturn windowTitleBarStore.getValue({ field: \"tabs\" }) as WindowIdentifier[];\r\n\t},\r\n\t_setTabs(tabs) {\r\n\t\tFSBL.Clients.Logger.system.debug(\"Set tabs\", tabs);\r\n\t\tlet activeIdentifier: any = finsembleWindow.identifier;\r\n\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\treturn windowTitleBarStore.setValue({\r\n\t\t\tfield: \"tabs\",\r\n\t\t\tvalue: tabs || [activeIdentifier],\r\n\t\t});\r\n\t},\r\n\taddTabLocally: function (windowIdentifier, i) {\r\n\t\tlet tabs = Actions.getTabs();\r\n\t\tif (typeof i === \"undefined\") {\r\n\t\t\ti = tabs.length + 1;\r\n\t\t}\r\n\t\ttabs.splice(i, 0, windowIdentifier);\r\n\t\tActions._setTabs(tabs);\r\n\t},\r\n\tremoveTabsLocally: function () {\r\n\t\tActions._setTabs(null);\r\n\t},\r\n\tremoveTabLocally: function (windowIdentifier) {\r\n\t\tlet tabs = Actions.getTabs();\r\n\t\tlet i = tabs.findIndex((el) => el.windowName === windowIdentifier.windowName && el.uuid === windowIdentifier.uuid);\r\n\t\ttabs.splice(i, 1);\r\n\t\tActions._setTabs(tabs);\r\n\t},\r\n\treorderTabLocally: function (tab, newIndex) {\r\n\t\tlet tabs = Actions.getTabs();\r\n\t\tlet { currentIndex } = Actions.findTab(tab);\r\n\t\tif (currentIndex === newIndex) return;\r\n\t\tif (currentIndex === -1) {\r\n\t\t\treturn Actions.addTabLocally(tab, newIndex);\r\n\t\t}\r\n\t\ttabs.splice(currentIndex, 1);\r\n\t\ttabs.splice(newIndex, 0, tab);\r\n\r\n\t\tActions._setTabs(tabs);\r\n\t},\r\n\taddTab: function (windowIdentifier, i) {\r\n\t\tlet tabs = Actions.getTabs();\r\n\t\ttabs.push(windowIdentifier);\r\n\t\t// quick UI update\r\n\t\tActions._setTabs(tabs);\r\n\t\tlet callback = () => {\r\n\t\t\tActions.parentWrapper?.setVisibleWindow({ windowIdentifier });\r\n\t\t};\r\n\r\n\t\tif (!Actions.parentWrapper) {\r\n\t\t\treturn Actions.createParentWrapper({\r\n\t\t\t\twindowIdentifiers: finsembleWindow.identifier\r\n\t\t\t\t\t? [finsembleWindow.identifier, windowIdentifier]\r\n\t\t\t\t\t: [windowIdentifier],\r\n\t\t\t\tvisibleWindowIdentifier: windowIdentifier,\r\n\t\t\t\tcreate: true,\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn Actions.parentWrapper.addWindow({ windowIdentifier, position: i }, callback);\r\n\t},\r\n\tremoveTab: function (windowIdentifier, i) {\r\n\t\treturn Actions.parentWrapper?.removeWindow({\r\n\t\t\twindowIdentifier,\r\n\t\t\tposition: i,\r\n\t\t});\r\n\t},\r\n\tcloseTab: function (windowIdentifier) {\r\n\t\tconst close: StandardCallback = (err, wrap) => {\r\n\t\t\twrap.close({ removeFromWorkspace: true });\r\n\t\t};\r\n\t\tFSBL.FinsembleWindow.getInstance(windowIdentifier, close);\r\n\t},\r\n\treorderTab: function (tab, newIndex) {\r\n\t\tlet tabs = Actions.getTabs();\r\n\t\tlet { currentIndex } = Actions.findTab(tab);\r\n\t\tif (currentIndex === -1 || !Actions.parentWrapper) {\r\n\t\t\treturn Actions.addTab(tab, newIndex);\r\n\t\t}\r\n\t\ttabs.splice(currentIndex, 1);\r\n\t\ttabs.splice(newIndex, 0, tab);\r\n\t\t// Local change, quickly updates the dom.\r\n\t\tActions._setTabs(tabs);\r\n\t\tActions.parentWrapper.reorder({ windowIdentifiers: tabs });\r\n\t},\r\n\tfindTab: function (tab) {\r\n\t\tlet tabs = this.getTabs();\r\n\t\tlet currentIndex = tabs.findIndex((el) => tab.windowName === el.windowName && tab.uuid === el.uuid);\r\n\t\treturn { tab, currentIndex };\r\n\t},\r\n\tsetActiveTab: function (windowIdentifier) {\r\n\t\tFSBL.Clients.Logger.system.debug(\"setActiveTab.visibleWindow\");\r\n\t\treturn finsembleWindow.parentWindow.setVisibleWindow({ windowIdentifier });\r\n\t},\r\n\tparentWrapper: null,\r\n\tonTabListChanged: function (err, response) {\r\n\t\tFSBL.Clients.Logger.system.debug(\"OnTabListChanged\", response.data);\r\n\t\tif (response.data && response.data.hasOwnProperty(constants.CHILD_WINDOW_FIELD)) {\r\n\t\t\tActions._setTabs(response.data[constants.CHILD_WINDOW_FIELD]);\r\n\t\t}\r\n\t},\r\n\tparentSubscriptions: [],\r\n\tstopListeningOnParentWrapper: function (cb) {\r\n\t\tActions.parentSubscriptions.forEach((sub) => {\r\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(sub);\r\n\t\t});\r\n\t\tActions.parentSubscriptions = []; // remove the subscribeId\r\n\t\t// Syncs scroll state across all tabs in a stack.\r\n\t\tFSBL.Clients.RouterClient.removeListener(\r\n\t\t\tconstants.TAB_SCROLL_POSITION_CHANGED,\r\n\t\t\tActions.onTabListScrollPositionChanged\r\n\t\t);\r\n\t\tcb();\r\n\t},\r\n\tlistenOnParentWrapper: function () {\r\n\t\tlet TABLIST_SUBSCRIPTION = FSBL.Clients.RouterClient.subscribe(\r\n\t\t\tconstants.PARENT_WRAPPER_UPDATES,\r\n\t\t\tActions.onTabListChanged\r\n\t\t);\r\n\t\tFSBL.Clients.RouterClient.addListener(\r\n\t\t\tconstants.TAB_SCROLL_POSITION_CHANGED,\r\n\t\t\tActions.onTabListScrollPositionChanged\r\n\t\t);\r\n\t\tActions.parentSubscriptions.push(TABLIST_SUBSCRIPTION);\r\n\t},\r\n\tsetupStore: function (cb = Function.prototype) {\r\n\t\tconstants = {\r\n\t\t\tPARENT_WRAPPER_UPDATES: `Finsemble.StackedWindow.${Actions.parentWrapper?.identifier?.windowName}`,\r\n\t\t\tCHILD_WINDOW_FIELD: \"childWindowIdentifiers\",\r\n\t\t\tVISIBLE_WINDOW_FIELD: \"visibleWindowIdentifier\",\r\n\t\t\tTAB_SCROLL_POSITION_CHANGED: `${Actions.parentWrapper?.name}.tabListTabListScrollPositionChanged`,\r\n\t\t};\r\n\t\tActions.listenOnParentWrapper();\r\n\t\tcb();\r\n\t},\r\n\tgetInitialTabList: function (cb) {\r\n\t\tfinsembleWindow.getParent((err, parentWrapper) => {\r\n\t\t\tActions.parentWrapper = parentWrapper;\r\n\t\t\tif (Actions.parentWrapper) {\r\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"GetInitialTabList, parent exists\");\r\n\t\t\t\tActions.setupStore(cb);\r\n\t\t\t} else {\r\n\t\t\t\tlet activeIdentifier: any = finsembleWindow.identifier;\r\n\t\t\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\r\n\t\t\t\tlet tabs = [activeIdentifier];\r\n\t\t\t\tcb(null, tabs);\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\tcreateParentWrapper(params: ParentParams, cb = Function.prototype) {\r\n\t\t(window as any).Actions = Actions;\r\n\t\tif (Actions.parentWrapper) {\r\n\t\t\tcb();\r\n\t\t} else {\r\n\t\t\tconst getStackedWindowCallback: StandardCallback = (err, wrap) => {\r\n\t\t\t\tif (err) {\r\n\t\t\t\t\tActions.parentWrapper = null;\r\n\t\t\t\t\tActions._setTabs(null);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tActions.parentWrapper = wrap;\r\n\t\t\t\t\tActions.setupStore(cb);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tgetStackedWindow(params, getStackedWindowCallback);\r\n\t\t}\r\n\t},\r\n};\r\n\r\n/**\r\n * Initializes the store for the windowTitleBar.\r\n *\r\n * @param {any} cb\r\n */\r\nfunction initialize(cb: Function) {\r\n\tFSBL.Clients.DistributedStoreClient.createStore(\r\n\t\t{ store: \"windowTitleBarStore\", values: windowTitleBarStoreDefaults },\r\n\t\t(err, store) => {\r\n\t\t\tif (!err && store) {\r\n\t\t\t\twindowTitleBarStore = store;\r\n\t\t\t}\r\n\t\t\tActions.initialize();\r\n\t\t\treturn cb(store, Actions);\r\n\t\t}\r\n\t);\r\n}\r\n\r\nlet getStore = () => windowTitleBarStore;\r\n\r\nclass StoreManager {\r\n\tinitialized = false;\r\n\r\n\tinitializing = false;\r\n\r\n\tstore: StoreModel | null = null;\r\n\r\n\tcallbacks: Function[] = [];\r\n\r\n\tconstructor() {}\r\n\r\n\tinitialize() {\r\n\t\tif (this.initializing) return;\r\n\t\tthis.initializing = true;\r\n\t\tinitialize((store: StoreModel) => {\r\n\t\t\tthis.initialized = true;\r\n\t\t\tthis.store = store;\r\n\t\t\tthis.callbacks.forEach((cb) => cb(store));\r\n\t\t});\r\n\t}\r\n\r\n\taddInitializedListener(cb: Function) {\r\n\t\tif (this.initialized) return cb(this.store);\r\n\t\tthis.callbacks.push(cb);\r\n\t}\r\n\r\n\tremoveInitializedListener(cb: Function) {\r\n\t\tthis.callbacks = this.callbacks.filter((entry) => entry !== cb);\r\n\t}\r\n}\r\nconst storeManager = new StoreManager();\r\n\r\nexport { storeManager };\r\nexport { initialize };\r\nexport { windowTitleBarStore as Store };\r\nexport { Actions };\r\nexport { getStore };\r\n"]}
1
+ {"version":3,"file":"windowTitleBarStore.js","sourceRoot":"","sources":["../../../../src/components/windowTitleBar/stores/windowTitleBarStore.ts"],"names":[],"mappings":"AAIA,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AAKxE,MAAM,uBAAuB,GAAG,CAAC,eAAgC,EAAE,EAAE;IACpE,MAAM,MAAM,GAAG,eAAe,CAAC,YAAY,CAAC;IAC5C,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;AACpD,CAAC,CAAC;AAQF,MAAM,gBAAgB,GAAG,CAAC,MAAoB,EAAE,EAAoB,EAAE,EAAE;IACvE,IAAI,CAAC,eAAe,CAAC,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE;QACnD,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,EAAE;YAChC,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC;YAChC,eAAe,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE;gBAC7E,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAG,IAAI,EAAE,aAAa,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;YACH,eA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S,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;CACD;AACD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,mBAAmB,IAAI,KAAK,EAAE,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport windowTitleBarStoreDefaults from \"./windowTitleBarStoreDefaults\";\nimport { StandardCallback } from \"@finsemble/finsemble-api/types/types\";\nimport { FinsembleWindow, WindowIdentifier } from \"@finsemble/finsemble-api\";\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\n\nconst getWindowNameForDocking = (finsembleWindow: FinsembleWindow) => {\n\tconst parent = finsembleWindow.parentWindow;\n\treturn parent ? parent.name : finsembleWindow.name;\n};\n\ntype ParentParams = {\n\twindowIdentifiers: WindowIdentifier[];\n\tvisibleWindowIdentifier: WindowIdentifier;\n\tcreate: boolean;\n};\n\nconst getStackedWindow = (params: ParentParams, cb: StandardCallback) => {\n\tif (!finsembleWindow.parentWindow && params.create) {\n\t\tconst onParentSet = (evt: any) => {\n\t\t\tconst { parentName } = evt.data;\n\t\t\tfinsembleWindow.setParent({ windowName: parentName }, (err2, windowWrapper) => {\n\t\t\t\tcb?.(err2, windowWrapper);\n\t\t\t});\n\t\t\tfinsembleWindow.removeListener(\"parent-set\", onParentSet);\n\t\t};\n\t\tfinsembleWindow.addListener(\"parent-set\", onParentSet);\n\t\tFSBL.Clients.LauncherClient.spawn(\n\t\t\t\"StackedWindow\",\n\t\t\t{\n\t\t\t\twindowType: \"StackedWindow\",\n\t\t\t\tdata: { windowIdentifiers: params.windowIdentifiers },\n\t\t\t\toptions: { newStack: true },\n\t\t\t},\n\t\t\t(err) => {\n\t\t\t\tif (!err) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcb?.(err, null);\n\t\t\t}\n\t\t);\n\t} else {\n\t\tfinsembleWindow.getParent(cb);\n\t}\n};\n\nlet windowTitleBarStore: StoreModel;\n\ntype ConstantsType = {\n\tPARENT_WRAPPER_UPDATES: string;\n\tCHILD_WINDOW_FIELD: string;\n\tVISIBLE_WINDOW_FIELD: string;\n\tTAB_SCROLL_POSITION_CHANGED: string;\n};\n\ntype ActionsType = {\n\tparentWrapperStore: any;\n\tparentSubscriptions: any[];\n\tparentWrapper: FinsembleWindow | null;\n\n\tinitialize: () => void;\n\tgetMyDockingGroups: (groupData: any) => any[];\n\tonTabListScrollPositionChanged: StandardCallback;\n\tsetTabListScrollPosition: (translateX: number) => void;\n\tremoteStateUpdate: (command: string, state: any) => void;\n\tclickMinimize: () => void;\n\tclickClose: () => void;\n\ttoggleGroup: () => void;\n\tclickMaximize: () => void;\n\tgetTabs: () => WindowIdentifier[];\n\t_setTabs: (tabs: WindowIdentifier[] | null) => any;\n\taddTabLocally: (windowIdentifier: WindowIdentifier, i: number) => void;\n\tremoveTabsLocally: () => void;\n\tremoveTabLocally: (windowIdentifier: WindowIdentifier) => void;\n\treorderTabLocally: (tab: WindowIdentifier, newIndex: number) => undefined | any;\n\taddTab: (windowIdentifier: WindowIdentifier, i: number) => any;\n\tremoveTab: (windowIdentifier: WindowIdentifier, i: number) => any;\n\tcloseTab: (windowIdentifier: WindowIdentifier) => void;\n\treorderTab: (tab: WindowIdentifier, newIndex: number) => any;\n\tfindTab: (tab: WindowIdentifier) => { tab: WindowIdentifier; currentIndex: number };\n\tsetActiveTab: (windowIdentifier: WindowIdentifier) => Promise<any>;\n\tonTabListChanged: StandardCallback;\n\tstopListeningOnParentWrapper: (cb: Function) => void;\n\tlistenOnParentWrapper: () => void;\n\tsetupStore: (cb?: Function) => void;\n\tgetInitialTabList: (cb: StandardCallback) => void;\n\tcreateParentWrapper: (params: ParentParams, cb?: Function) => void;\n};\n\n/**\n * When a group update is publish, we sift through the data to see if this window is snapped or grouped with other windows. Then we publish that info, and the GroupingButton renders the correct icon.\n * @param {*} err\n * @param {*} response\n */\nconst onDockingGroupUpdate: StandardCallback = (err, response) => {\n\tif (err || !response.data || !response.data.groupData) {\n\t\treturn;\n\t}\n\tFSBL.Clients.Logger.system.debug(\"On docking group update\", response.data.groupData);\n\tlet groupNames = Object.keys(response.data.groupData);\n\tlet movableGroups = groupNames\n\t\t.filter((groupName) => response.data.groupData[groupName].isMovable)\n\t\t.map((groupName) => response.data.groupData[groupName]);\n\t// This is all movable and snapped groups. It's used later to figure out the icon to display.\n\twindowTitleBarStore.setValue({\n\t\tfield: \"Main.allDockingGroups\",\n\t\tvalue: response.data.groupData,\n\t});\n\n\twindowTitleBarStore.setValue({\n\t\tfield: \"Main.allMovableDockingGroups\",\n\t\tvalue: movableGroups,\n\t});\n\tlet myGroups = Actions.getMyDockingGroups(response.data.groupData);\n\twindowTitleBarStore.setValue({\n\t\tfield: \"Main.dockingGroups\",\n\t\tvalue: myGroups,\n\t});\n\t/**\n\t * Goes through groups and sees if this window is grouped, snapped, or freely hanging out there.\n\t */\n\tlet isSnapped = false;\n\tlet isInMovableGroup = false;\n\tlet isTopRight = false;\n\tlet windowName = getWindowNameForDocking(finsembleWindow);\n\tfor (let i = 0; i < myGroups.length; i++) {\n\t\tlet myGroup = myGroups[i];\n\t\tif (myGroup.isMovable) {\n\t\t\tisInMovableGroup = true;\n\t\t\tif (windowName == myGroup.topRightWindow) {\n\t\t\t\tisTopRight = true;\n\t\t\t}\n\t\t} else {\n\t\t\tisSnapped = true;\n\t\t}\n\t}\n\tlet icon: string | false = false;\n\n\tif (isSnapped) {\n\t\ticon = \"joiner\";\n\t}\n\tif (isInMovableGroup) {\n\t\ticon = \"ejector\";\n\t}\n\n\twindowTitleBarStore.setValues([\n\t\t{ field: \"isSnapped\", value: isSnapped },\n\t\t{ field: \"isGrouped\", value: isInMovableGroup },\n\t\t{ field: \"isTopRight\", value: isTopRight },\n\t\t{ field: \"Main.dockingIcon\", value: icon },\n\t]);\n};\n\n/**\n * Listen for updates from the dragAndDropClient.\n */\nconst listenForDNDUpdates = () => {\n\tFSBL.Clients.RouterClient.subscribe(`${FSBL.Clients.WindowClient.options.name}Finsemble.Sharer`, (err, response) => {\n\t\tif (err) {\n\t\t\treturn console.error(err);\n\t\t}\n\t\twindowTitleBarStore.setValues([\n\t\t\t{\n\t\t\t\tfield: \"Sharer.emitterEnabled\",\n\t\t\t\tvalue: response.data.emitterEnabled,\n\t\t\t},\n\t\t\t{\n\t\t\t\tfield: \"Sharer.receiverEnabled\",\n\t\t\t\tvalue: response.data.receiverEnabled,\n\t\t\t},\n\t\t]);\n\t});\n};\n\n/**\n * Handles whether to show the linker button.\n */\nconst showLinkerButton = () => {\n\t// Get state (channel membership) from the linkerClient. Then set the value in the header so that the title bar accurately reflects the state.\n\tconst cb: StandardCallback = (err, response) => {\n\t\tif (response.channels) {\n\t\t\twindowTitleBarStore.setValue({\n\t\t\t\tfield: \"Linker.channels\",\n\t\t\t\tvalue: response.channels,\n\t\t\t});\n\t\t}\n\t\twindowTitleBarStore.setValue({\n\t\t\tfield: \"Linker.showLinkerButton\",\n\t\t\tvalue: true,\n\t\t});\n\t};\n\tcb(null, FSBL.Clients.LinkerClient.getState());\n\tFSBL.Clients.LinkerClient.onStateChange(cb);\n};\n\nconst processInitialTabList = (err: any, values: any) => {\n\tconst onParentSet = () => {\n\t\tActions.parentWrapper = null;\n\t\tActions.getInitialTabList(() => {\n\t\t\tFSBL.Clients.Logger.system.debug(\"docking group update after initial tab list\");\n\t\t\tonDockingGroupUpdate(null, {\n\t\t\t\tdata: {\n\t\t\t\t\tgroupData: windowTitleBarStore.getValue({\n\t\t\t\t\t\tfield: \"Main.allDockingGroups\",\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t};\n\tconst onParentCleared = () => {\n\t\tActions.parentWrapper = null;\n\t\tFSBL.Clients.Logger.system.debug(\"ClearParent, setting tabs to null\");\n\t\tActions.stopListeningOnParentWrapper(() => {\n\t\t\tActions.parentWrapperStore = null;\n\t\t\tActions._setTabs(null);\n\t\t\tonDockingGroupUpdate(null, {\n\t\t\t\tdata: {\n\t\t\t\t\tgroupData: windowTitleBarStore.getValue({\n\t\t\t\t\t\tfield: \"Main.allDockingGroups\",\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t};\n\n\tfinsembleWindow?.addListener(\"setParent\", onParentSet);\n\tfinsembleWindow?.addListener(\"clearParent\", onParentCleared);\n\tif (err) {\n\t\treturn FSBL.Clients.Logger.system.error(\"Error in getInitialTabList.\", err);\n\t}\n\n\tif (values) Actions._setTabs(values);\n};\n\n/**\n * \"FSBLHeader\" can be true, false or an object. If false then we'll never even be here. If true, then maximize, minimize and close buttons will display. If an object, then the developer can override whether buttons are shown with \"hideMaximize\", \"hideMinimize\" and \"hideClose\"\n */\nconst processFSBLHeader = (FSBLHeader: any, windowTitleBarConfig: any, options: any) => {\n\t// Display name is first up for display. If it doesn't exist, we look for a default title (or one that's already set on init). If no title, we display the window's name (e.g., '5434-Welcome Component-2321').\n\tconst displayName = options.customData?.component?.displayName;\n\n\tconst max = !!FSBLHeader.hideMaximize;\n\n\twindowTitleBarStore.setValues([\n\t\t{ field: \"Maximize.hide\", value: max },\n\t\t{ field: \"Minimize.hide\", value: !!FSBLHeader.hideMinimize },\n\t\t{ field: \"Close.hide\", value: !!FSBLHeader.hideClose },\n\t\t{ field: \"AlwaysOnTop.show\", value: !!FSBLHeader.alwaysOnTop },\n\t]);\n\n\t// By default, we hack the window's scroll bar so that it displays underneath the header. html.overflow: hidden body.overflow:auto\n\twindowTitleBarStore.setValue({\n\t\tfield: \"hackScrollbar\",\n\t\tvalue: windowTitleBarConfig.hackScrollbar !== false,\n\t});\n\n\tconst title = FSBL.Clients.WindowClient.title || windowTitleBarConfig.title || displayName;\n\n\tif (title) {\n\t\tdocument.title = title;\n\t}\n};\n\n// Once the above has been checked the individual component config is checked for customData.foreign.services[windowService || dockingService][!ignoreTilingAndTabbingRequests || allowTabbing]\nconst getOptionsCallback: StandardCallback = (err, opts: Record<string, any>) => {\n\tconst windowAllowTabbing = opts.customData?.foreign?.services?.windowService?.allowTabbing;\n\tconst windowIgnoreTabbing = opts.customData?.foreign?.services?.windowService?.ignoreTilingAndTabbingRequests;\n\tconst dockingAllowTabbing = opts.customData?.foreign?.services?.dockingService?.allowTabbing;\n\tconst dockingIgnoreTabbing = opts.customData?.foreign.services?.dockingService?.ignoreTilingAndTabbingRequests;\n\tconst dontShowTabs =\n\t\twindowAllowTabbing === false ||\n\t\twindowIgnoreTabbing === true ||\n\t\tdockingAllowTabbing === false ||\n\t\tdockingIgnoreTabbing === true;\n\n\twindowTitleBarStore.setValue({\n\t\tfield: \"showTabs\",\n\t\tvalue: !dontShowTabs,\n\t});\n};\n\nconst processFEAAndFinsembleConfig = (values: Record<string, any>, windowTitleBarConfig: Record<string, any>) => {\n\tconst finsembleConfig = values.finsemble;\n\n\t// Check FEA config for DOM based movement configuration\n\tconst { useDOMBasedMovement } = values[\"finsemble-electron-adapter\"];\n\n\twindowTitleBarStore.setValue({\n\t\tfield: \"Main.useDOMBasedMovement\",\n\t\tvalue: typeof useDOMBasedMovement === \"undefined\" ? true : useDOMBasedMovement,\n\t});\n\n\t// Override defaults if finsemble.Window Manager exists.\n\tconst globalWindowManagerConfig = finsembleConfig[\"Window Manager\"] || {\n\t\talwaysOnTopIcon: false,\n\t\tshowTabs: false,\n\t};\n\n\t// Look to see if docking is enabled. Cascade through backward compatibility with old \"betaFeatures\" and then a default if no config is found at all.\n\n\tfinsembleConfig.servicesConfig = finsembleConfig.servicesConfig ?? {};\n\n\tconst defaultDockingConfig = {\n\t\tenabled: true,\n\t};\n\tlet dockingConfig =\n\t\tfinsembleConfig.servicesConfig.docking ??\n\t\tfinsembleConfig.docking ??\n\t\tfinsembleConfig.betaFeatures?.docking ??\n\t\tdefaultDockingConfig;\n\tdockingConfig.tabbing = dockingConfig.tabbing ?? {};\n\n\twindowTitleBarStore.setValues([{ field: \"Main.dockingEnabled\", value: dockingConfig.enabled }]);\n\n\t// Whether the alwaysOnTop pin is displayed depends this component's config (foreign.components[\"Widow Manager\"].alwaysOnTop)\n\t// and then on the global setting (finsemble[\"Window Manager\"].alwaysOnTop)\n\tconst alwaysOnTopIcon = windowTitleBarConfig.alwaysOnTopIcon ?? globalWindowManagerConfig.alwaysOnTopIcon ?? false;\n\n\twindowTitleBarStore.setValues([{ field: \"AlwaysOnTop.show\", value: alwaysOnTopIcon }]);\n\n\t// If tabbing is turned off, ignore global/local 'windowManager' config about whether to allow tabbing.\n\tif (dockingConfig.tabbing.enabled === false) {\n\t\twindowTitleBarStore.setValue({\n\t\t\tfield: \"showTabs\",\n\t\t\tvalue: dockingConfig.tabbing.enabled,\n\t\t});\n\t} else {\n\t\twindowTitleBarStore.setValue({\n\t\t\tfield: \"allowTabEditing\",\n\t\t\tvalue: dockingConfig.tabbing.allowEditing !== undefined ? dockingConfig.tabbing.allowEditing : true,\n\t\t});\n\t\t// If tabbing is enabled system-wide, look to the global config for its value. Then look to the local component's config.\n\n\t\t// This is the global window manager config.\n\t\tif (typeof windowTitleBarConfig.showTabs !== \"boolean\") {\n\t\t\twindowTitleBarStore.setValue({\n\t\t\t\tfield: \"showTabs\",\n\t\t\t\tvalue: globalWindowManagerConfig.showTabs,\n\t\t\t});\n\t\t}\n\t\t// This is the component's config.\n\t\tif (windowTitleBarConfig.showTabs || windowTitleBarConfig.showTabs === false) {\n\t\t\twindowTitleBarStore.setValue({\n\t\t\t\tfield: \"showTabs\",\n\t\t\t\tvalue: windowTitleBarConfig.showTabs,\n\t\t\t});\n\t\t}\n\n\t\tfinsembleWindow.getOptions(getOptionsCallback);\n\t}\n};\n\n// these are constants that are set inside of setupStore. so they're declared as vars and not constants.\nlet constants: ConstantsType;\nconst Actions: ActionsType = {\n\tparentWrapperStore: null,\n\tinitialize: () => {\n\t\t// This ensures that our config is correct, even if the developer missed some entries\n\t\tconst { options } = FSBL.Clients.WindowClient;\n\t\tconst windowTitleBarConfig = options.customData.foreign.components[\"Window Manager\"];\n\t\tconst { FSBLHeader } = windowTitleBarConfig;\n\n\t\tif (FSBLHeader) processFSBLHeader(FSBLHeader, windowTitleBarConfig, options);\n\n\t\tif (windowTitleBarConfig.showLinker) showLinkerButton();\n\n\t\tlistenForDNDUpdates();\n\n\t\tFSBL.Clients.RouterClient.subscribe(\"Finsemble.WorkspaceService.groupUpdate\", onDockingGroupUpdate);\n\n\t\t// default title.\n\t\twindowTitleBarStore.setValue({\n\t\t\tfield: \"Main.windowTitle\",\n\t\t\tvalue: FSBL.Clients.WindowClient.getWindowTitle(),\n\t\t});\n\n\t\tFSBL.Clients.ConfigClient.getValues(\n\t\t\t[{ field: \"finsemble\" }, { field: \"finsemble-electron-adapter\" }],\n\t\t\t(err, config) => {\n\t\t\t\tif (config) processFEAAndFinsembleConfig(config, windowTitleBarConfig);\n\t\t\t}\n\t\t);\n\n\t\tActions.getInitialTabList(processInitialTabList);\n\n\t\t/**\n\t\t * This store does not listen on window events (such as \"maximized\" or \"minimized\") - that is the\n\t\t * WindowClient's job. The headerCommandChannel allows the WindowClient to affect the display state\n\t\t * of the windowTitleBar - such as changing the maximize icon when a \"maximized\" event is received.\n\t\t */\n\t\tFSBL.Clients.WindowClient.headerCommandChannel((command, state) => {\n\t\t\tActions.remoteStateUpdate(command, state);\n\t\t});\n\t},\n\t/**\n\t * Helper function to sift through all of the data coming from the windowService. Outputs an array of groups that the window belongs to.\n\t */\n\tgetMyDockingGroups: function (groupData) {\n\t\tlet myGroups = [];\n\t\tlet windowName = getWindowNameForDocking(finsembleWindow);\n\t\tif (finsembleWindow?.parentWindow) {\n\t\t\twindowName = finsembleWindow?.parentWindow.name;\n\t\t}\n\t\tFSBL.Clients.Logger.system.debug(\"Getting docking groups for \", windowName, groupData);\n\t\tif (groupData) {\n\t\t\tfor (let groupName in groupData) {\n\t\t\t\tgroupData[groupName].groupName = groupName;\n\t\t\t\tif (groupData[groupName].windowNames.includes(windowName)) {\n\t\t\t\t\tmyGroups.push(groupData[groupName]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn myGroups;\n\t},\n\tonTabListScrollPositionChanged: function (err, response) {\n\t\twindowTitleBarStore.setValue({\n\t\t\tfield: \"tabListTranslateX\",\n\t\t\tvalue: response.data.translateX,\n\t\t});\n\t},\n\tsetTabListScrollPosition: function (translateX) {\n\t\tFSBL.Clients.RouterClient.transmit(constants.TAB_SCROLL_POSITION_CHANGED, {\n\t\t\ttranslateX,\n\t\t});\n\t},\n\t/**\n\t * Handles messages coming from the windowClient.\n\t */\n\tremoteStateUpdate: function (command, state) {\n\t\tconst key = Object.keys(state)[0];\n\t\tconst field = `${command}.${key}`;\n\t\twindowTitleBarStore.setValue({ field: field, value: state[key] });\n\t},\n\t/**\n\t * Minimizes the window.\n\t */\n\tclickMinimize: function () {\n\t\tfinsembleWindow.minimize(() => {});\n\t},\n\t/**\n\t * Closes the window, allows for cleanup. Removes the window from workspace; this function is only invoked when the user clicks the close button.\n\t */\n\tclickClose: function () {\n\t\tFSBL.Clients.WindowClient.close({\n\t\t\tcloseWindow: true,\n\t\t\tremoveFromWorkspace: true, // this will cause the entire stack to close. Using this instead of a new parameter to ensure backwards compatibility\n\t\t\tuserInitiated: true,\n\t\t});\n\t},\n\t/**\n\t * Toggles group membership. If two windows are snapped, and this button is clicked, they become part of the same group that can be moved around together.\n\t */\n\ttoggleGroup: function () {\n\t\tconst groups = windowTitleBarStore.getValue({ field: \"Main.dockingGroups\" });\n\t\tconst isInMovableGroup = groups.some((group: any) => group.isMovable);\n\t\tif (isInMovableGroup) {\n\t\t\tfinsembleWindow.ejectFromGroup();\n\t\t} else {\n\t\t\tfinsembleWindow.formGroup();\n\t\t}\n\t},\n\t/**\n\t * Maximizes the window.\n\t */\n\tclickMaximize: function () {\n\t\tif (finsembleWindow.windowOptions.windowState !== finsembleWindow.WINDOWSTATE.MAXIMIZED)\n\t\t\treturn finsembleWindow.maximize(() => {\n\t\t\t\twindowTitleBarStore.setValue({\n\t\t\t\t\tfield: \"Maximize.maximized\",\n\t\t\t\t\tvalue: true,\n\t\t\t\t});\n\t\t\t});\n\n\t\treturn finsembleWindow.restore(() => {\n\t\t\twindowTitleBarStore.setValue({\n\t\t\t\tfield: \"Maximize.maximized\",\n\t\t\t\tvalue: false,\n\t\t\t});\n\t\t});\n\t},\n\n\tgetTabs() {\n\t\treturn windowTitleBarStore.getValue({ field: \"tabs\" }) as WindowIdentifier[];\n\t},\n\t_setTabs(tabs) {\n\t\tFSBL.Clients.Logger.system.debug(\"Set tabs\", tabs);\n\t\tlet activeIdentifier: any = finsembleWindow.identifier;\n\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\n\t\treturn windowTitleBarStore.setValue({\n\t\t\tfield: \"tabs\",\n\t\t\tvalue: tabs || [activeIdentifier],\n\t\t});\n\t},\n\taddTabLocally: function (windowIdentifier, i) {\n\t\tlet tabs = Actions.getTabs();\n\t\tif (typeof i === \"undefined\") {\n\t\t\ti = tabs.length + 1;\n\t\t}\n\t\ttabs.splice(i, 0, windowIdentifier);\n\t\tActions._setTabs(tabs);\n\t},\n\tremoveTabsLocally: function () {\n\t\tActions._setTabs(null);\n\t},\n\tremoveTabLocally: function (windowIdentifier) {\n\t\tlet tabs = Actions.getTabs();\n\t\tlet i = tabs.findIndex((el) => el.windowName === windowIdentifier.windowName && el.uuid === windowIdentifier.uuid);\n\t\ttabs.splice(i, 1);\n\t\tActions._setTabs(tabs);\n\t},\n\treorderTabLocally: function (tab, newIndex) {\n\t\tlet tabs = Actions.getTabs();\n\t\tlet { currentIndex } = Actions.findTab(tab);\n\t\tif (currentIndex === newIndex) return;\n\t\tif (currentIndex === -1) {\n\t\t\treturn Actions.addTabLocally(tab, newIndex);\n\t\t}\n\t\ttabs.splice(currentIndex, 1);\n\t\ttabs.splice(newIndex, 0, tab);\n\n\t\tActions._setTabs(tabs);\n\t},\n\taddTab: function (windowIdentifier, i) {\n\t\tlet tabs = Actions.getTabs();\n\t\ttabs.push(windowIdentifier);\n\t\t// quick UI update\n\t\tActions._setTabs(tabs);\n\t\tlet callback = () => {\n\t\t\tActions.parentWrapper?.setVisibleWindow({ windowIdentifier });\n\t\t};\n\n\t\tif (!Actions.parentWrapper) {\n\t\t\treturn Actions.createParentWrapper({\n\t\t\t\twindowIdentifiers: finsembleWindow.identifier\n\t\t\t\t\t? [finsembleWindow.identifier, windowIdentifier]\n\t\t\t\t\t: [windowIdentifier],\n\t\t\t\tvisibleWindowIdentifier: windowIdentifier,\n\t\t\t\tcreate: true,\n\t\t\t});\n\t\t}\n\t\treturn Actions.parentWrapper.addWindow({ windowIdentifier, position: i }, callback);\n\t},\n\tremoveTab: function (windowIdentifier, i) {\n\t\treturn Actions.parentWrapper?.removeWindow({\n\t\t\twindowIdentifier,\n\t\t\tposition: i,\n\t\t});\n\t},\n\tcloseTab: function (windowIdentifier) {\n\t\tconst close: StandardCallback = (err, wrap) => {\n\t\t\twrap.close({ removeFromWorkspace: true });\n\t\t};\n\t\tFSBL.FinsembleWindow.getInstance(windowIdentifier, close);\n\t},\n\treorderTab: function (tab, newIndex) {\n\t\tlet tabs = Actions.getTabs();\n\t\tlet { currentIndex } = Actions.findTab(tab);\n\t\tif (currentIndex === -1 || !Actions.parentWrapper) {\n\t\t\treturn Actions.addTab(tab, newIndex);\n\t\t}\n\t\ttabs.splice(currentIndex, 1);\n\t\ttabs.splice(newIndex, 0, tab);\n\t\t// Local change, quickly updates the dom.\n\t\tActions._setTabs(tabs);\n\t\tActions.parentWrapper.reorder({ windowIdentifiers: tabs });\n\t},\n\tfindTab: function (tab) {\n\t\tlet tabs = Actions.getTabs();\n\t\tlet currentIndex = tabs.findIndex((el) => tab.windowName === el.windowName && tab.uuid === el.uuid);\n\t\treturn { tab, currentIndex };\n\t},\n\tsetActiveTab: function (windowIdentifier) {\n\t\tFSBL.Clients.Logger.system.debug(\"setActiveTab.visibleWindow\");\n\t\treturn finsembleWindow.parentWindow.setVisibleWindow({ windowIdentifier });\n\t},\n\tparentWrapper: null,\n\tonTabListChanged: function (err, response) {\n\t\tFSBL.Clients.Logger.system.debug(\"OnTabListChanged\", response.data);\n\t\tif (response.data && response.data.hasOwnProperty(constants.CHILD_WINDOW_FIELD)) {\n\t\t\tActions._setTabs(response.data[constants.CHILD_WINDOW_FIELD]);\n\t\t}\n\t},\n\tparentSubscriptions: [],\n\tstopListeningOnParentWrapper: function (cb) {\n\t\tActions.parentSubscriptions.forEach((sub) => {\n\t\t\tFSBL.Clients.RouterClient.unsubscribe(sub);\n\t\t});\n\t\tActions.parentSubscriptions = []; // remove the subscribeId\n\t\t// Syncs scroll state across all tabs in a stack.\n\t\tFSBL.Clients.RouterClient.removeListener(\n\t\t\tconstants.TAB_SCROLL_POSITION_CHANGED,\n\t\t\tActions.onTabListScrollPositionChanged\n\t\t);\n\t\tcb();\n\t},\n\tlistenOnParentWrapper: function () {\n\t\tlet TABLIST_SUBSCRIPTION = FSBL.Clients.RouterClient.subscribe(\n\t\t\tconstants.PARENT_WRAPPER_UPDATES,\n\t\t\tActions.onTabListChanged\n\t\t);\n\t\tFSBL.Clients.RouterClient.addListener(\n\t\t\tconstants.TAB_SCROLL_POSITION_CHANGED,\n\t\t\tActions.onTabListScrollPositionChanged\n\t\t);\n\t\tActions.parentSubscriptions.push(TABLIST_SUBSCRIPTION);\n\t},\n\tsetupStore: function (cb = Function.prototype) {\n\t\tconstants = {\n\t\t\tPARENT_WRAPPER_UPDATES: `Finsemble.StackedWindow.${Actions.parentWrapper?.identifier?.windowName}`,\n\t\t\tCHILD_WINDOW_FIELD: \"childWindowIdentifiers\",\n\t\t\tVISIBLE_WINDOW_FIELD: \"visibleWindowIdentifier\",\n\t\t\tTAB_SCROLL_POSITION_CHANGED: `${Actions.parentWrapper?.name}.tabListTabListScrollPositionChanged`,\n\t\t};\n\t\tActions.listenOnParentWrapper();\n\t\tcb();\n\t},\n\tgetInitialTabList: function (cb) {\n\t\tfinsembleWindow.getParent((err, parentWrapper) => {\n\t\t\tActions.parentWrapper = parentWrapper;\n\t\t\tif (Actions.parentWrapper) {\n\t\t\t\tFSBL.Clients.Logger.system.debug(\"GetInitialTabList, parent exists\");\n\t\t\t\tActions.setupStore(cb);\n\t\t\t} else {\n\t\t\t\tlet activeIdentifier: any = finsembleWindow.identifier;\n\t\t\t\tactiveIdentifier.title = finsembleWindow.windowOptions.title;\n\t\t\t\tlet tabs = [activeIdentifier];\n\t\t\t\tcb(null, tabs);\n\t\t\t}\n\t\t});\n\t},\n\tcreateParentWrapper(params: ParentParams, cb = Function.prototype) {\n\t\t(window as any).Actions = Actions;\n\t\tif (Actions.parentWrapper) {\n\t\t\tcb();\n\t\t} else {\n\t\t\tconst getStackedWindowCallback: StandardCallback = (err, wrap) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tActions.parentWrapper = null;\n\t\t\t\t\tActions._setTabs(null);\n\t\t\t\t} else {\n\t\t\t\t\tActions.parentWrapper = wrap;\n\t\t\t\t\tActions.setupStore(cb);\n\t\t\t\t}\n\t\t\t};\n\t\t\tgetStackedWindow(params, getStackedWindowCallback);\n\t\t}\n\t},\n};\n\n/**\n * Initializes the store for the windowTitleBar.\n *\n * @param {any} cb\n */\nfunction initialize(cb: Function) {\n\tFSBL.Clients.DistributedStoreClient.createStore(\n\t\t{ store: \"windowTitleBarStore\", values: windowTitleBarStoreDefaults },\n\t\t(err, store) => {\n\t\t\tif (!err && store) {\n\t\t\t\twindowTitleBarStore = store;\n\t\t\t}\n\t\t\tActions.initialize();\n\t\t\treturn cb(store, Actions);\n\t\t}\n\t);\n}\n\nlet getStore = () => windowTitleBarStore;\n\nclass StoreManager {\n\tinitialized = false;\n\n\tinitializing = false;\n\n\tstore: StoreModel | null = null;\n\n\tcallbacks: Function[] = [];\n\n\tconstructor() {}\n\n\tinitialize() {\n\t\tif (this.initializing) return;\n\t\tthis.initializing = true;\n\t\tinitialize((store: StoreModel) => {\n\t\t\tthis.initialized = true;\n\t\t\tthis.store = store;\n\t\t\tthis.callbacks.forEach((cb) => cb(store));\n\t\t});\n\t}\n\n\taddInitializedListener(cb: Function) {\n\t\tif (this.initialized) return cb(this.store);\n\t\tthis.callbacks.push(cb);\n\t}\n\n\tremoveInitializedListener(cb: Function) {\n\t\tthis.callbacks = this.callbacks.filter((entry) => entry !== cb);\n\t}\n}\nconst storeManager = new StoreManager();\n\nexport { storeManager };\nexport { initialize };\nexport { windowTitleBarStore as Store };\nexport { Actions };\nexport { getStore };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"windowTitleBarStoreDefaults.js","sourceRoot":"","sources":["../../../../src/components/windowTitleBar/stores/windowTitleBarStoreDefaults.ts"],"names":[],"mappings":"AAAA,eAAe;IACd,IAAI,EAAE;QACL,WAAW,EAAE,EAAE;QACf,kBAAkB,EAAE,KAAK;QACzB,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,MAAM,EAAE;YACP,KAAK,EAAE;gBACN,KAAK,EAAE,EAAE;aACT;SACD;QACD,mBAAmB,EAAE,IAAI;KACzB;IACD,MAAM,EAAE;QACP,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,KAAK;QACtB,eAAe,EAAE,KAAK;KACtB;IACD,MAAM,EAAE;QACP,QAAQ,EAAE,EAAE;QACZ,WAAW,EAAE,EAAE;QACf,gBAAgB,EAAE,KAAK;KACvB;IACD,KAAK,EAAE;QACN,IAAI,EAAE,KAAK;KACX;IACD,QAAQ,EAAE;QACT,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,KAAK;KACX;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,KAAK;KACX;IACD,OAAO,EAAE;QACR,OAAO,EAAE,KAAK;KACd;IACD,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,EAAE;CACb,CAAC","sourcesContent":["export default {\r\n\tMain: {\r\n\t\twindowTitle: \"\",\r\n\t\tshowDockingTooltip: false,\r\n\t\tdockingIcon: false,\r\n\t\tdockingEnabled: false,\r\n\t\tmains2: {\r\n\t\t\tmain3: {\r\n\t\t\t\tmain4: {},\r\n\t\t\t},\r\n\t\t},\r\n\t\tuseDOMBasedMovement: true,\r\n\t},\r\n\tSharer: {\r\n\t\temitterEnabled: false,\r\n\t\treceiverEnabled: false,\r\n\t\treceiverHandler: false,\r\n\t},\r\n\tLinker: {\r\n\t\tchannels: {},\r\n\t\tallChannels: {},\r\n\t\tshowLinkerButton: false,\r\n\t},\r\n\tClose: {\r\n\t\thide: false,\r\n\t},\r\n\tMaximize: {\r\n\t\tmaximized: false,\r\n\t\thide: false,\r\n\t},\r\n\tMinimize: {\r\n\t\thide: false,\r\n\t},\r\n\tEjector: {\r\n\t\tenabled: false,\r\n\t},\r\n\tisSnapped: false,\r\n\tisGrouped: false,\r\n\tisTopRight: false,\r\n\ttabs: [],\r\n\tactiveTab: {},\r\n};\r\n"]}
1
+ {"version":3,"file":"windowTitleBarStoreDefaults.js","sourceRoot":"","sources":["../../../../src/components/windowTitleBar/stores/windowTitleBarStoreDefaults.ts"],"names":[],"mappings":"AAAA,eAAe;IACd,IAAI,EAAE;QACL,WAAW,EAAE,EAAE;QACf,kBAAkB,EAAE,KAAK;QACzB,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,MAAM,EAAE;YACP,KAAK,EAAE;gBACN,KAAK,EAAE,EAAE;aACT;SACD;QACD,mBAAmB,EAAE,IAAI;KACzB;IACD,MAAM,EAAE;QACP,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,KAAK;QACtB,eAAe,EAAE,KAAK;KACtB;IACD,MAAM,EAAE;QACP,QAAQ,EAAE,EAAE;QACZ,WAAW,EAAE,EAAE;QACf,gBAAgB,EAAE,KAAK;KACvB;IACD,KAAK,EAAE;QACN,IAAI,EAAE,KAAK;KACX;IACD,QAAQ,EAAE;QACT,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,KAAK;KACX;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,KAAK;KACX;IACD,OAAO,EAAE;QACR,OAAO,EAAE,KAAK;KACd;IACD,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,EAAE;CACb,CAAC","sourcesContent":["export default {\n\tMain: {\n\t\twindowTitle: \"\",\n\t\tshowDockingTooltip: false,\n\t\tdockingIcon: false,\n\t\tdockingEnabled: false,\n\t\tmains2: {\n\t\t\tmain3: {\n\t\t\t\tmain4: {},\n\t\t\t},\n\t\t},\n\t\tuseDOMBasedMovement: true,\n\t},\n\tSharer: {\n\t\temitterEnabled: false,\n\t\treceiverEnabled: false,\n\t\treceiverHandler: false,\n\t},\n\tLinker: {\n\t\tchannels: {},\n\t\tallChannels: {},\n\t\tshowLinkerButton: false,\n\t},\n\tClose: {\n\t\thide: false,\n\t},\n\tMaximize: {\n\t\tmaximized: false,\n\t\thide: false,\n\t},\n\tMinimize: {\n\t\thide: false,\n\t},\n\tEjector: {\n\t\tenabled: false,\n\t},\n\tisSnapped: false,\n\tisGrouped: false,\n\tisTopRight: false,\n\ttabs: [],\n\tactiveTab: {},\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"windowTitleBarContext.js","sourceRoot":"","sources":["../../../src/components/windowTitleBar/windowTitleBarContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B,MAAM,mBAAmB,GAA8B;IACtD,mBAAmB,EAAE,IAAI;IACzB,gBAAgB,EAAE,KAAK;IACvB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,KAAK;IACpB,iBAAiB,EAAE,KAAK;IACxB,qBAAqB,EAAE,KAAK;IAC5B,kBAAkB,EAAE,KAAK;IACzB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,KAAK;IACtB,YAAY,EAAE,IAAW;IACzB,eAAe,EAAE,EAAE;IACnB,WAAW,EAAE,IAAW;IACxB,iBAAiB,EAAE,IAAW;IAC9B,IAAI,EAAE,IAAW;IACjB,cAAc,EAAE,IAAW;IAC3B,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,KAAK;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,aAAa,CAA4B,mBAAmB,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { TabProperties } from \"../../types/windowTitleBar\";\r\n\r\nexport interface WindowTitleBarContextType {\r\n\tshowDockingButton: string | false;\r\n\tuseDOMBasedMovement: boolean;\r\n\ttabs: TabProperties[];\r\n\tshowLinkerButton: boolean;\r\n\tshowShareButton: boolean;\r\n\tshowTabRegion: boolean;\r\n\tshowAlwaysOnTopButton: boolean;\r\n\tshowMinimizeButton: boolean;\r\n\tshowMaximizeButton: boolean;\r\n\tshowCloseButton: boolean;\r\n\tonTabDropped: Function;\r\n\tthisWindowTitle: string;\r\n\tboundingBox: any;\r\n\tlistenForDragOver: boolean;\r\n\tonTitleUpdated: Function;\r\n\tshowTabs: boolean;\r\n\talwaysOnTop: boolean;\r\n}\r\n\r\nconst defaultConfigValues: WindowTitleBarContextType = {\r\n\tuseDOMBasedMovement: true,\r\n\tshowLinkerButton: false,\r\n\tshowShareButton: false,\r\n\tshowTabRegion: false,\r\n\tshowDockingButton: false,\r\n\tshowAlwaysOnTopButton: false,\r\n\tshowMinimizeButton: false,\r\n\tshowMaximizeButton: false,\r\n\tshowCloseButton: false,\r\n\tonTabDropped: null as any,\r\n\tthisWindowTitle: \"\",\r\n\tboundingBox: null as any,\r\n\tlistenForDragOver: null as any,\r\n\ttabs: null as any,\r\n\tonTitleUpdated: null as any,\r\n\tshowTabs: false,\r\n\talwaysOnTop: false,\r\n};\r\n\r\nexport const WindowTitleBarContext = React.createContext<WindowTitleBarContextType>(defaultConfigValues);\r\n"]}
1
+ {"version":3,"file":"windowTitleBarContext.js","sourceRoot":"","sources":["../../../src/components/windowTitleBar/windowTitleBarContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B,MAAM,mBAAmB,GAA8B;IACtD,mBAAmB,EAAE,IAAI;IACzB,gBAAgB,EAAE,KAAK;IACvB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,KAAK;IACpB,iBAAiB,EAAE,KAAK;IACxB,qBAAqB,EAAE,KAAK;IAC5B,kBAAkB,EAAE,KAAK;IACzB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,KAAK;IACtB,YAAY,EAAE,IAAW;IACzB,eAAe,EAAE,EAAE;IACnB,WAAW,EAAE,IAAW;IACxB,iBAAiB,EAAE,IAAW;IAC9B,IAAI,EAAE,IAAW;IACjB,cAAc,EAAE,IAAW;IAC3B,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,KAAK;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,aAAa,CAA4B,mBAAmB,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { TabProperties } from \"../../types/windowTitleBar\";\n\nexport interface WindowTitleBarContextType {\n\tshowDockingButton: string | false;\n\tuseDOMBasedMovement: boolean;\n\ttabs: TabProperties[];\n\tshowLinkerButton: boolean;\n\tshowShareButton: boolean;\n\tshowTabRegion: boolean;\n\tshowAlwaysOnTopButton: boolean;\n\tshowMinimizeButton: boolean;\n\tshowMaximizeButton: boolean;\n\tshowCloseButton: boolean;\n\tonTabDropped: Function;\n\tthisWindowTitle: string;\n\tboundingBox: any;\n\tlistenForDragOver: boolean;\n\tonTitleUpdated: Function;\n\tshowTabs: boolean;\n\talwaysOnTop: boolean;\n}\n\nconst defaultConfigValues: WindowTitleBarContextType = {\n\tuseDOMBasedMovement: true,\n\tshowLinkerButton: false,\n\tshowShareButton: false,\n\tshowTabRegion: false,\n\tshowDockingButton: false,\n\tshowAlwaysOnTopButton: false,\n\tshowMinimizeButton: false,\n\tshowMaximizeButton: false,\n\tshowCloseButton: false,\n\tonTabDropped: null as any,\n\tthisWindowTitle: \"\",\n\tboundingBox: null as any,\n\tlistenForDragOver: null as any,\n\ttabs: null as any,\n\tonTitleUpdated: null as any,\n\tshowTabs: false,\n\talwaysOnTop: false,\n};\n\nexport const WindowTitleBarContext = React.createContext<WindowTitleBarContextType>(defaultConfigValues);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Timer.spec.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/Timer.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,iBAAiB,CAAC;AAExC,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAElF,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACvD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAe,EAAI,CAAC,CAAC;QAE7D,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAe,EAAI,CAAC,CAAC;QAE7D,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjE,OAAO,CAAC,OAAO,EAAE,CAAC;IACnB,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 \"./Timer.stories\";\r\nimport { IProps } from \"./timer\";\r\nimport { accessibilityAssessor } from \"../smartDesktopDesigner/tests/a11y_helper\";\r\n\r\ndescribe(\"<Timer/>\", () => {\r\n\tit(\"should pass accessibility scans (Page)\", async () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as IProps)} />);\r\n\r\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\r\n\t});\r\n\tit(\"should display the text 'Time remaining: '\", async () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as IProps)} />);\r\n\r\n\t\texpect(wrapper.find(\"div\").text()).to.contain(\"Time remaining:\");\r\n\t\twrapper.unmount();\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"Timer.spec.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/Timer.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,iBAAiB,CAAC;AAExC,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAElF,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACvD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAe,EAAI,CAAC,CAAC;QAE7D,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAe,EAAI,CAAC,CAAC;QAE7D,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjE,OAAO,CAAC,OAAO,EAAE,CAAC;IACnB,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 \"./Timer.stories\";\nimport { IProps } from \"./timer\";\nimport { accessibilityAssessor } from \"../smartDesktopDesigner/tests/a11y_helper\";\n\ndescribe(\"<Timer/>\", () => {\n\tit(\"should pass accessibility scans (Page)\", async () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as IProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\tit(\"should display the text 'Time remaining: '\", async () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as IProps)} />);\n\n\t\texpect(wrapper.find(\"div\").text()).to.contain(\"Time remaining:\");\n\t\twrapper.unmount();\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Timer.stories.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/Timer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAiB,MAAM,SAAS,CAAC;AAExC,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACd,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,KAAK;CAChB,CAAC;AAEF,MAAM,QAAQ,GAAkB,CAAC,IAAY,EAAE,EAAE,CAAC,oBAAC,KAAK,oBAAK,IAAI,EAAI,CAAC;AAEtE,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,aAAa,EAAE,IAAI;IACnB,yBAAyB,EAAE,MAAM,CAAC,SAAS,CAAC;CAC5C,CAAC","sourcesContent":["import React from \"react\";\r\nimport Timer, { IProps } from \"./timer\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport \"../../assets/css/dialogs.css\";\r\nimport { action } from \"@storybook/addon-actions\";\r\n\r\nexport default {\r\n\ttitle: \"YesNoDialog/Timer\",\r\n\tcomponent: Timer,\r\n};\r\n\r\nconst Template: Story<IProps> = (args: IProps) => <Timer {...args} />;\r\n\r\nexport const Basic = Template.bind({});\r\nBasic.args = {\r\n\ttimerDuration: 1000,\r\n\tontimerDurationExpiration: action(\"Expired\"),\r\n};\r\n"]}
1
+ {"version":3,"file":"Timer.stories.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/Timer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAiB,MAAM,SAAS,CAAC;AAExC,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACd,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,KAAK;CAChB,CAAC;AAEF,MAAM,QAAQ,GAAkB,CAAC,IAAY,EAAE,EAAE,CAAC,oBAAC,KAAK,oBAAK,IAAI,EAAI,CAAC;AAEtE,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,aAAa,EAAE,IAAI;IACnB,yBAAyB,EAAE,MAAM,CAAC,SAAS,CAAC;CAC5C,CAAC","sourcesContent":["import React from \"react\";\nimport Timer, { IProps } from \"./timer\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport \"../../assets/css/dialogs.css\";\nimport { action } from \"@storybook/addon-actions\";\n\nexport default {\n\ttitle: \"YesNoDialog/Timer\",\n\tcomponent: Timer,\n};\n\nconst Template: Story<IProps> = (args: IProps) => <Timer {...args} />;\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\ttimerDuration: 1000,\n\tontimerDurationExpiration: action(\"Expired\"),\n};\n"]}
@@ -1,3 +1,3 @@
1
- body {
2
- margin: 0px;
3
- }
1
+ body {
2
+ margin: 0px;
3
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"YesNoDialog.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,uBAAuB,GAAG;IAC/B,KAAK,EAAE,aAAa;IACpB,QAAQ,EAAE,cAAc;IACxB,qBAAqB,EAAE,IAAI;IAC3B,wBAAwB,EAAE,KAAK;IAC/B,mBAAmB,EAAE,QAAQ;IAC7B,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,gBAAgB,EAAE,IAAI;CACtB,CAAC;A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,IAAI,CAAC,KAAK,CAAC,aAAa,GAAI,CACvG,CACwB;YAC1B,6BAAK,SAAS,EAAC,gBAAgB;gBAC9B,oBAAC,qBAAqB,IACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB,EACnC,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,IAAI,CAAC,oBAAoB,IAEjC,IAAI,CAAC,KAAK,CAAC,qBAAqB,CACV;gBAExB,oBAAC,qBAAqB,IACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,EACjC,SAAS,EAAC,qBAAqB,EAC/B,OAAO,EAAE,IAAI,CAAC,kBAAkB,IAE/B,IAAI,CAAC,KAAK,CAAC,mBAAmB,CACR;gBAExB,oBAAC,qBAAqB,IACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACtC,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,IAAI,CAAC,uBAAuB,IAEpC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CACb,CACnB,CACW,CAClB,CAAC;IACH,CAAC;CACD;AAKD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,oBAAC,eAAe,OAAG,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React from \"react\";\r\nimport \"./YesNoDialog.css\";\r\nimport \"../../assets/css/dialogs.css\";\r\nimport { FinsembleDialog } from \"../legacyControls/FinsembleDialog\";\r\nimport { FinsembleDialogQuestion } from \"../legacyControls/FinsembleDialogQuestion\";\r\nimport { FinsembleDialogButton } from \"../legacyControls/FinsembleDialogButton\";\r\nimport Timer from \"./timer\";\r\nconst DEFAULT_TITLE = \"\";\r\nconst DEFAULT_COMPONENT_STATE = {\r\n\ttitle: DEFAULT_TITLE,\r\n\tquestion: \"No question.\",\r\n\tnegativeResponseLabel: \"No\",\r\n\taffirmativeResponseLabel: \"Yes\",\r\n\tcancelResponseLabel: \"Cancel\",\r\n\tshowNegativeButton: true,\r\n\tshowAffirmativeButton: true,\r\n\tshowCancelButton: true,\r\n};\r\n\r\ninterface IProps {}\r\ninterface IState {\r\n\ttitle: string;\r\n\tquestion: string;\r\n\tnegativeResponseLabel: string;\r\n\taffirmativeResponseLabel: string;\r\n\tcancelResponseLabel: string;\r\n\tshowNegativeButton: boolean;\r\n\tshowAffirmativeButton: boolean;\r\n\tshowCancelButton: boolean;\r\n\thideModalOnClose?: boolean;\r\n\tshowTimer?: boolean;\r\n\ttimerDuration?: number | null;\r\n}\r\n\r\n/**\r\n * This is our standard dialog that presents the user with 1 - 3 choices. It can be used to allow the user to confirm, reject, or cancel an action. All of these options can be included, and all can be excluded.\r\n *\r\n * @class YesNoDialog\r\n * @extends {React.Component}\r\n */\r\nclass YesNoDialogBase extends React.Component<IProps, IState> {\r\n\tconstructor(props = {}) {\r\n\t\tsuper(props);\r\n\t\tthis.bindCorrectContext();\r\n\t\tthis.state = DEFAULT_COMPONENT_STATE;\r\n\t\tdocument.body.addEventListener(\"keydown\", this.handleKeydownOnBody);\r\n\t}\r\n\r\n\t/**\r\n\t * Handles escape and enter.\r\n\t *\r\n\t * @param {any} e\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\thandleKeydownOnBody(e: any) {\r\n\t\tif (e.code === \"Enter\" && e.shiftKey === false) {\r\n\t\t\tthis.sendResponse(\"affirmative\");\r\n\t\t}\r\n\r\n\t\tif (e.code === \"Escape\") {\r\n\t\t\tthis.sendResponse(\"cancel\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Necessary to ensure that `this` is correct when our methods are invoked.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tbindCorrectContext() {\r\n\t\tthis.handleKeydownOnBody = this.handleKeydownOnBody.bind(this);\r\n\t\tthis.onShowRequested = this.onShowRequested.bind(this);\r\n\t\tthis.sendAffirmativeResponse = this.sendAffirmativeResponse.bind(this);\r\n\t\tthis.sendCancelResponse = this.sendCancelResponse.bind(this);\r\n\t\tthis.sendNegativeResponse = this.sendNegativeResponse.bind(this);\r\n\t\tthis.sendExpiredResponse = this.sendExpiredResponse.bind(this);\r\n\t\tthis.sendResponse = this.sendResponse.bind(this);\r\n\t}\r\n\r\n\t/**\r\n\t * When the opener requests that the dialog show itself, it also passes in initialization data. This function grabs that data, calls setState, and then fits the window to the contents of the DOM. Then we call `showDialog`, which will display the dialog on the proper monitor.\r\n\t *\r\n\t * @param {any} err\r\n\t * @param {any} response\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tonShowRequested(err: any, response: any) {\r\n\t\tlet { data } = response;\r\n\t\tthis.setState(\r\n\t\t\t{\r\n\t\t\t\ttitle: typeof data.title === \"undefined\" ? DEFAULT_TITLE : data.title,\r\n\t\t\t\thideModalOnClose: typeof data.hideModalOnClose === \"undefined\" ? true : data.hideModalOnClose,\r\n\t\t\t\tquestion: data.question,\r\n\t\t\t\tnegativeResponseLabel: data.negativeResponseLabel || \"No\",\r\n\t\t\t\taffirmativeResponseLabel: data.affirmativeResponseLabel || \"Yes\",\r\n\t\t\t\tcancelResponseLabel: data.cancelResponseLabel || \"Cancel\",\r\n\t\t\t\tshowNegativeButton: typeof data.showNegativeButton === \"undefined\" ? true : data.showNegativeButton,\r\n\t\t\t\tshowAffirmativeButton: typeof data.showAffirmativeButton === \"undefined\" ? true : data.showAffirmativeButton,\r\n\t\t\t\tshowCancelButton: typeof data.showCancelButton === \"undefined\" ? true : data.showCancelButton,\r\n\t\t\t\tshowTimer: typeof data.showTimer === \"undefined\" ? false : data.showTimer,\r\n\t\t\t\ttimerDuration: typeof data.timerDuration === \"undefined\" ? null : data.timerDuration,\r\n\t\t\t},\r\n\t\t\tthis.fitAndShow\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Fits the contents of the DOM to the window, then calls `showDialog`, which positions the dialog on the proper monitor and toggles the visibility of the window.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tfitAndShow() {\r\n\t\tFSBL.Clients.WindowClient.fitToDOM(null, () => {\r\n\t\t\tFSBL.Clients.DialogManager.showDialog();\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sends user input to the opener.\r\n\t *\r\n\t * @param {any} response\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendResponse(response: any) {\r\n\t\tconsole.log(\"Response: \", response);\r\n\t\tFSBL.Clients.DialogManager.respondToOpener({\r\n\t\t\tchoice: response,\r\n\t\t\thideModalOnClose: this.state.hideModalOnClose,\r\n\t\t});\r\n\t\t// This will detach the timer component from the dom. Next time the component comes up, it'll have a fresh timer.\r\n\t\tthis.setState({\r\n\t\t\tshowTimer: false,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Sends an affirmative response to the opener.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendAffirmativeResponse() {\r\n\t\tthis.sendResponse(\"affirmative\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sends a negative response to the opener.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendNegativeResponse() {\r\n\t\tthis.sendResponse(\"negative\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sends a cancel response to the opener.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendCancelResponse() {\r\n\t\tthis.sendResponse(\"cancel\");\r\n\t}\r\n\r\n\t/**\r\n\t * Sends an expired response to the opener.\r\n\t *\r\n\t * @memberof YesNoDialog\r\n\t */\r\n\tsendExpiredResponse() {\r\n\t\tthis.sendResponse(\"expired\");\r\n\t}\r\n\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<FinsembleDialog\r\n\t\t\t\tuserInputTimeout={10000}\r\n\t\t\t\tbehaviorOnResponse=\"hide\"\r\n\t\t\t\tonShowRequested={this.onShowRequested}\r\n\t\t\t\tisModal={true}\r\n\t\t\t>\r\n\t\t\t\t<div className=\"dialog-title\">{this.state.title}</div>\r\n\t\t\t\t<FinsembleDialogQuestion>\r\n\t\t\t\t\t{this.state.question}\r\n\t\t\t\t\t{this.state.showTimer && typeof this.state.timerDuration === \"number\" && (\r\n\t\t\t\t\t\t<Timer ontimerDurationExpiration={this.sendExpiredResponse} timerDuration={this.state.timerDuration} />\r\n\t\t\t\t\t)}\r\n\t\t\t\t</FinsembleDialogQuestion>\r\n\t\t\t\t<div className=\"button-wrapper\">\r\n\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\tshow={this.state.showNegativeButton}\r\n\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\r\n\t\t\t\t\t\tonClick={this.sendNegativeResponse}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{this.state.negativeResponseLabel}\r\n\t\t\t\t\t</FinsembleDialogButton>\r\n\r\n\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\tshow={this.state.showCancelButton}\r\n\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\r\n\t\t\t\t\t\tonClick={this.sendCancelResponse}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{this.state.cancelResponseLabel}\r\n\t\t\t\t\t</FinsembleDialogButton>\r\n\r\n\t\t\t\t\t<FinsembleDialogButton\r\n\t\t\t\t\t\tshow={this.state.showAffirmativeButton}\r\n\t\t\t\t\t\tclassName=\"fsbl-button-affirmative\"\r\n\t\t\t\t\t\tonClick={this.sendAffirmativeResponse}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{this.state.affirmativeResponseLabel}\r\n\t\t\t\t\t</FinsembleDialogButton>\r\n\t\t\t\t</div>\r\n\t\t\t</FinsembleDialog>\r\n\t\t);\r\n\t}\r\n}\r\n\r\n/**\r\n * This dialog window provides a binary choice to the user, and reports back the response to the opener.\r\n */\r\nexport const YesNoDialog = () => <YesNoDialogBase />;\r\n"]}
1
+ {"version":3,"file":"YesNoDialog.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK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D;AAKD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,oBAAC,eAAe,OAAG,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React from \"react\";\nimport \"./YesNoDialog.css\";\nimport \"../../assets/css/dialogs.css\";\nimport { FinsembleDialog } from \"../legacyControls/FinsembleDialog\";\nimport { FinsembleDialogQuestion } from \"../legacyControls/FinsembleDialogQuestion\";\nimport { FinsembleDialogButton } from \"../legacyControls/FinsembleDialogButton\";\nimport Timer from \"./timer\";\nconst DEFAULT_TITLE = \"\";\nconst DEFAULT_COMPONENT_STATE = {\n\ttitle: DEFAULT_TITLE,\n\tquestion: \"No question.\",\n\tnegativeResponseLabel: \"No\",\n\taffirmativeResponseLabel: \"Yes\",\n\tcancelResponseLabel: \"Cancel\",\n\tshowNegativeButton: true,\n\tshowAffirmativeButton: true,\n\tshowCancelButton: true,\n};\n\ninterface IProps {}\ninterface IState {\n\ttitle: string;\n\tquestion: string;\n\tnegativeResponseLabel: string;\n\taffirmativeResponseLabel: string;\n\tcancelResponseLabel: string;\n\tshowNegativeButton: boolean;\n\tshowAffirmativeButton: boolean;\n\tshowCancelButton: boolean;\n\thideModalOnClose?: boolean;\n\tshowTimer?: boolean;\n\ttimerDuration?: number | null;\n}\n\n/**\n * This is our standard dialog that presents the user with 1 - 3 choices. It can be used to allow the user to confirm, reject, or cancel an action. All of these options can be included, and all can be excluded.\n *\n * @class YesNoDialog\n * @extends {React.Component}\n */\nclass YesNoDialogBase extends React.Component<IProps, IState> {\n\tconstructor(props = {}) {\n\t\tsuper(props);\n\t\tthis.bindCorrectContext();\n\t\tthis.state = DEFAULT_COMPONENT_STATE;\n\t\tdocument.body.addEventListener(\"keydown\", this.handleKeydownOnBody);\n\t}\n\n\t/**\n\t * Handles escape and enter.\n\t *\n\t * @param {any} e\n\t * @memberof YesNoDialog\n\t */\n\thandleKeydownOnBody(e: any) {\n\t\tif (e.code === \"Enter\" && e.shiftKey === false) {\n\t\t\tthis.sendResponse(\"affirmative\");\n\t\t}\n\n\t\tif (e.code === \"Escape\") {\n\t\t\tthis.sendResponse(\"cancel\");\n\t\t}\n\t}\n\n\t/**\n\t * Necessary to ensure that `this` is correct when our methods are invoked.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tbindCorrectContext() {\n\t\tthis.handleKeydownOnBody = this.handleKeydownOnBody.bind(this);\n\t\tthis.onShowRequested = this.onShowRequested.bind(this);\n\t\tthis.sendAffirmativeResponse = this.sendAffirmativeResponse.bind(this);\n\t\tthis.sendCancelResponse = this.sendCancelResponse.bind(this);\n\t\tthis.sendNegativeResponse = this.sendNegativeResponse.bind(this);\n\t\tthis.sendExpiredResponse = this.sendExpiredResponse.bind(this);\n\t\tthis.sendResponse = this.sendResponse.bind(this);\n\t}\n\n\t/**\n\t * When the opener requests that the dialog show itself, it also passes in initialization data. This function grabs that data, calls setState, and then fits the window to the contents of the DOM. Then we call `showDialog`, which will display the dialog on the proper monitor.\n\t *\n\t * @param {any} err\n\t * @param {any} response\n\t * @memberof YesNoDialog\n\t */\n\tonShowRequested(err: any, response: any) {\n\t\tlet { data } = response;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\ttitle: typeof data.title === \"undefined\" ? DEFAULT_TITLE : data.title,\n\t\t\t\thideModalOnClose: typeof data.hideModalOnClose === \"undefined\" ? true : data.hideModalOnClose,\n\t\t\t\tquestion: data.question,\n\t\t\t\tnegativeResponseLabel: data.negativeResponseLabel || \"No\",\n\t\t\t\taffirmativeResponseLabel: data.affirmativeResponseLabel || \"Yes\",\n\t\t\t\tcancelResponseLabel: data.cancelResponseLabel || \"Cancel\",\n\t\t\t\tshowNegativeButton: typeof data.showNegativeButton === \"undefined\" ? true : data.showNegativeButton,\n\t\t\t\tshowAffirmativeButton: typeof data.showAffirmativeButton === \"undefined\" ? true : data.showAffirmativeButton,\n\t\t\t\tshowCancelButton: typeof data.showCancelButton === \"undefined\" ? true : data.showCancelButton,\n\t\t\t\tshowTimer: typeof data.showTimer === \"undefined\" ? false : data.showTimer,\n\t\t\t\ttimerDuration: typeof data.timerDuration === \"undefined\" ? null : data.timerDuration,\n\t\t\t},\n\t\t\tthis.fitAndShow\n\t\t);\n\t}\n\n\t/**\n\t * Fits the contents of the DOM to the window, then calls `showDialog`, which positions the dialog on the proper monitor and toggles the visibility of the window.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tfitAndShow() {\n\t\tFSBL.Clients.WindowClient.fitToDOM(null, () => {\n\t\t\tFSBL.Clients.DialogManager.showDialog();\n\t\t});\n\t}\n\n\t/**\n\t * Sends user input to the opener.\n\t *\n\t * @param {any} response\n\t * @memberof YesNoDialog\n\t */\n\tsendResponse(response: any) {\n\t\tconsole.log(\"Response: \", response);\n\t\tFSBL.Clients.DialogManager.respondToOpener({\n\t\t\tchoice: response,\n\t\t\thideModalOnClose: this.state.hideModalOnClose,\n\t\t});\n\t\t// This will detach the timer component from the dom. Next time the component comes up, it'll have a fresh timer.\n\t\tthis.setState({\n\t\t\tshowTimer: false,\n\t\t});\n\t}\n\n\t/**\n\t * Sends an affirmative response to the opener.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tsendAffirmativeResponse() {\n\t\tthis.sendResponse(\"affirmative\");\n\t}\n\n\t/**\n\t * Sends a negative response to the opener.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tsendNegativeResponse() {\n\t\tthis.sendResponse(\"negative\");\n\t}\n\n\t/**\n\t * Sends a cancel response to the opener.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tsendCancelResponse() {\n\t\tthis.sendResponse(\"cancel\");\n\t}\n\n\t/**\n\t * Sends an expired response to the opener.\n\t *\n\t * @memberof YesNoDialog\n\t */\n\tsendExpiredResponse() {\n\t\tthis.sendResponse(\"expired\");\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<FinsembleDialog\n\t\t\t\tuserInputTimeout={10000}\n\t\t\t\tbehaviorOnResponse=\"hide\"\n\t\t\t\tonShowRequested={this.onShowRequested}\n\t\t\t\tisModal={true}\n\t\t\t>\n\t\t\t\t<div className=\"dialog-title\">{this.state.title}</div>\n\t\t\t\t<FinsembleDialogQuestion>\n\t\t\t\t\t{this.state.question}\n\t\t\t\t\t{this.state.showTimer && typeof this.state.timerDuration === \"number\" && (\n\t\t\t\t\t\t<Timer ontimerDurationExpiration={this.sendExpiredResponse} timerDuration={this.state.timerDuration} />\n\t\t\t\t\t)}\n\t\t\t\t</FinsembleDialogQuestion>\n\t\t\t\t<div className=\"button-wrapper\">\n\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\tshow={this.state.showNegativeButton}\n\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\n\t\t\t\t\t\tonClick={this.sendNegativeResponse}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.state.negativeResponseLabel}\n\t\t\t\t\t</FinsembleDialogButton>\n\n\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\tshow={this.state.showCancelButton}\n\t\t\t\t\t\tclassName=\"fsbl-button-neutral\"\n\t\t\t\t\t\tonClick={this.sendCancelResponse}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.state.cancelResponseLabel}\n\t\t\t\t\t</FinsembleDialogButton>\n\n\t\t\t\t\t<FinsembleDialogButton\n\t\t\t\t\t\tshow={this.state.showAffirmativeButton}\n\t\t\t\t\t\tclassName=\"fsbl-button-affirmative\"\n\t\t\t\t\t\tonClick={this.sendAffirmativeResponse}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.state.affirmativeResponseLabel}\n\t\t\t\t\t</FinsembleDialogButton>\n\t\t\t\t</div>\n\t\t\t</FinsembleDialog>\n\t\t);\n\t}\n}\n\n/**\n * This dialog window provides a binary choice to the user, and reports back the response to the opener.\n */\nexport const YesNoDialog = () => <YesNoDialogBase />;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"YesNoDialog.spec.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog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AAC,QAAQ,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAKpD,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, Empty, WithTimer, NoText, NoButtons, CustomButtonLabels } from \"./YesNoDialog.stories\";\r\nimport { accessibilityAssessor } from \"../smartDesktopDesigner/tests/a11y_helper\";\r\n\r\ndescribe(\"<YesNoDialog/>\", () => {\r\n\tit(\"should pass accessibility scans\", async () => {\r\n\t\tconst wrapper = mount(<Basic />);\r\n\r\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\r\n\t});\r\n\tit(\"should display Yes, No, and Cancel by default\", async () => {\r\n\t\tconst wrapper = mount(<Empty />);\r\n\r\n\t\tconst dialog_text = wrapper.find(\".dialog\").text();\r\n\t\texpect(dialog_text).to.contain(\"Yes\");\r\n\t\texpect(dialog_text).to.contain(\"No\");\r\n\t\texpect(dialog_text).to.contain(\"Cancel\");\r\n\t});\r\n\tit(\"should display Yes and Cancel, but not No\", async () => {\r\n\t\tconst wrapper = mount(<Basic {...(Basic.args as any)} />);\r\n\r\n\t\tconst dialog_text = wrapper.find(\".dialog\").text();\r\n\t\texpect(dialog_text).to.contain(\"Yes\");\r\n\t\texpect(dialog_text).to.not.contain(\"No\");\r\n\t\texpect(dialog_text).to.contain(\"Cancel\");\r\n\t});\r\n\tit(\"should show 'Time remaining' until the clock ticks away\", () => {\r\n\t\tconst clock = sinon.useFakeTimers();\r\n\t\tconst wrapper = mount(<WithTimer {...(WithTimer.args as any)} />);\r\n\r\n\t\texpect(wrapper.find(\".dialog\").text(), \"Before countdown\").to.contain(\"Time remaining:\");\r\n\t\tclock.tick(1000);\r\n\t\tclock.tick(1000);\r\n\t\tclock.tick(1000);\r\n\t\texpect(wrapper.find(\".dialog\").text(), \"After countdown\").to.not.contain(\"Time remaining:\");\r\n\t\tclock.restore();\r\n\t});\r\n\tit(\"should display empty text if no title is provided\", () => {\r\n\t\tconst wrapper = mount(<NoText {...(NoText.args as any)} />);\r\n\t\tconst titleText = wrapper.find(\".dialog-title\").text();\r\n\t\texpect(titleText).to.be.empty;\r\n\t});\r\n\tit(\"should not display any buttons if none are approved\", () => {\r\n\t\tconst wrapper = mount(<NoButtons {...(NoButtons.args as any)} />);\r\n\t\texpect(wrapper.find(\"button\").length).to.equal(0);\r\n\t});\r\n\tit(\"should display custom button labels when provided\", () => {\r\n\t\tconst wrapper = mount(<CustomButtonLabels {...(CustomButtonLabels.args as any)} />);\r\n\r\n\t\tconst dialog_text = wrapper.find(\".dialog\").text();\r\n\t\texpect(dialog_text).to.contain(\"Tak\");\r\n\t\texpect(dialog_text).to.contain(\"Nie\");\r\n\t\texpect(dialog_text).to.contain(\"Anuluj\");\r\n\t\texpect(dialog_text).to.not.contain(\"Yes\");\r\n\t\texpect(dialog_text).to.not.contain(\"No\");\r\n\t\texpect(dialog_text).to.not.contain(\"Cancel\");\r\n\t});\r\n\tit.skip(\"should handle keyboard interactions\", () => {\r\n\t\t// const wrapper = mount(<Basic {...(Basic.args as any)} />);\r\n\t\t// Keyboard interactions are wired up to document.body.addEventListener, and Enzyme doesn't let us mock that\r\n\t\t// This is a possibility, but it would require simulant and maybe also jsdom:\r\n\t\t// https://github.com/enzymejs/enzyme/issues/426\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"YesNoDialog.spec.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.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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\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { Basic, Empty, WithTimer, NoText, NoButtons, CustomButtonLabels } from \"./YesNoDialog.stories\";\nimport { accessibilityAssessor } from \"../smartDesktopDesigner/tests/a11y_helper\";\n\ndescribe(\"<YesNoDialog/>\", () => {\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<Basic />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\tit(\"should display Yes, No, and Cancel by default\", async () => {\n\t\tconst wrapper = mount(<Empty />);\n\n\t\tconst dialog_text = wrapper.find(\".dialog\").text();\n\t\texpect(dialog_text).to.contain(\"Yes\");\n\t\texpect(dialog_text).to.contain(\"No\");\n\t\texpect(dialog_text).to.contain(\"Cancel\");\n\t});\n\tit(\"should display Yes and Cancel, but not No\", async () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as any)} />);\n\n\t\tconst dialog_text = wrapper.find(\".dialog\").text();\n\t\texpect(dialog_text).to.contain(\"Yes\");\n\t\texpect(dialog_text).to.not.contain(\"No\");\n\t\texpect(dialog_text).to.contain(\"Cancel\");\n\t});\n\tit(\"should show 'Time remaining' until the clock ticks away\", () => {\n\t\tconst clock = sinon.useFakeTimers();\n\t\tconst wrapper = mount(<WithTimer {...(WithTimer.args as any)} />);\n\n\t\texpect(wrapper.find(\".dialog\").text(), \"Before countdown\").to.contain(\"Time remaining:\");\n\t\tclock.tick(1000);\n\t\tclock.tick(1000);\n\t\tclock.tick(1000);\n\t\texpect(wrapper.find(\".dialog\").text(), \"After countdown\").to.not.contain(\"Time remaining:\");\n\t\tclock.restore();\n\t});\n\tit(\"should display empty text if no title is provided\", () => {\n\t\tconst wrapper = mount(<NoText {...(NoText.args as any)} />);\n\t\tconst titleText = wrapper.find(\".dialog-title\").text();\n\t\texpect(titleText).to.be.empty;\n\t});\n\tit(\"should not display any buttons if none are approved\", () => {\n\t\tconst wrapper = mount(<NoButtons {...(NoButtons.args as any)} />);\n\t\texpect(wrapper.find(\"button\").length).to.equal(0);\n\t});\n\tit(\"should display custom button labels when provided\", () => {\n\t\tconst wrapper = mount(<CustomButtonLabels {...(CustomButtonLabels.args as any)} />);\n\n\t\tconst dialog_text = wrapper.find(\".dialog\").text();\n\t\texpect(dialog_text).to.contain(\"Tak\");\n\t\texpect(dialog_text).to.contain(\"Nie\");\n\t\texpect(dialog_text).to.contain(\"Anuluj\");\n\t\texpect(dialog_text).to.not.contain(\"Yes\");\n\t\texpect(dialog_text).to.not.contain(\"No\");\n\t\texpect(dialog_text).to.not.contain(\"Cancel\");\n\t});\n\tit.skip(\"should handle keyboard interactions\", () => {\n\t\t// const wrapper = mount(<Basic {...(Basic.args as any)} />);\n\t\t// Keyboard interactions are wired up to document.body.addEventListener, and Enzyme doesn't let us mock that\n\t\t// This is a possibility, but it would require simulant and maybe also jsdom:\n\t\t// https://github.com/enzymejs/enzyme/issues/426\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"YesNoDialog.stories.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,8BAA8B,CAAC;AAEtC,eAAe;IACd,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,QAAQ,GAAc,CAAC,IAAS,EAAE,EAAE;IACzC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,IAAI,IAAI,CAAC,KAAK,EAAE;QACf,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,sBAAsB,GAAG,CAAC,EAAY,EAAE,EAAE;YACpE,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CA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AE,KAAK;QACzB,qBAAqB,EAAE,KAAK;QAC5B,gBAAgB,EAAE,KAAK;KACvB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,kBAAkB,CAAC,IAAI,GAAG;IACzB,KAAK,EAAE;QACN,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,qBAAqB;QAC/B,kBAAkB,EAAE,IAAI;QACxB,qBAAqB,EAAE,IAAI;QAC3B,gBAAgB,EAAE,IAAI;QACtB,wBAAwB,EAAE,KAAK;QAC/B,qBAAqB,EAAE,KAAK;QAC5B,mBAAmB,EAAE,QAAQ;QAC7B,SAAS,EAAE,KAAK;KAChB;CACD,CAAC","sourcesContent":["import React from \"react\";\r\nimport { YesNoDialog } from \"./YesNoDialog\";\r\nimport { initFSBL } from \"../common/helpers\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport \"../../assets/css/dialogs.css\";\r\n\r\nexport default {\r\n\ttitle: \"YesNoDialog/YesNoDialog\",\r\n\tcomponent: YesNoDialog,\r\n};\r\n\r\nconst Template: Story<{}> = (args: any) => {\r\n\tinitFSBL(window);\r\n\r\n\tif (args._data) {\r\n\t\tFSBL.Clients.DialogManager.registerDialogCallback = (cb: Function) => {\r\n\t\t\tcb(\"\", { data: args._data });\r\n\t\t};\r\n\t}\r\n\r\n\treturn <YesNoDialog {...args} />;\r\n};\r\n\r\nexport const Empty = Template.bind({});\r\n\r\nexport const Basic = Template.bind({});\r\nBasic.args = {\r\n\t_data: {\r\n\t\ttitle: \"Example titles\",\r\n\t\tquestion: \"Is this a question?\",\r\n\t\tshowNegativeButton: false,\r\n\t\tshowAffirmativeButton: true,\r\n\t\tshowCancelButton: true,\r\n\t\tshowTimer: false,\r\n\t},\r\n};\r\n\r\nexport const NoText = Template.bind({});\r\nNoText.args = {\r\n\t_data: {\r\n\t\tshowNegativeButton: false,\r\n\t\tshowAffirmativeButton: true,\r\n\t\tshowCancelButton: true,\r\n\t},\r\n};\r\n\r\nexport const WithTimer = Template.bind({});\r\nWithTimer.args = {\r\n\t_data: {\r\n\t\ttitle: \"Example titles\",\r\n\t\tquestion: \"Is this a question?\",\r\n\t\tshowNegativeButton: false,\r\n\t\tshowAffirmativeButton: true,\r\n\t\tshowCancelButton: true,\r\n\t\tshowTimer: true,\r\n\t\ttimerDuration: 3000,\r\n\t},\r\n};\r\n\r\nexport const NoButtons = Template.bind({});\r\nNoButtons.args = {\r\n\t_data: {\r\n\t\ttitle: \"No buttons\",\r\n\t\tquestion: \"What are you going to do about it?\",\r\n\t\tshowNegativeButton: false,\r\n\t\tshowAffirmativeButton: false,\r\n\t\tshowCancelButton: false,\r\n\t},\r\n};\r\n\r\nexport const CustomButtonLabels = Template.bind({});\r\nCustomButtonLabels.args = {\r\n\t_data: {\r\n\t\ttitle: \"Example titles\",\r\n\t\tquestion: \"Is this a question?\",\r\n\t\tshowNegativeButton: true,\r\n\t\tshowAffirmativeButton: true,\r\n\t\tshowCancelButton: true,\r\n\t\taffirmativeResponseLabel: \"Tak\",\r\n\t\tnegativeResponseLabel: \"Nie\",\r\n\t\tcancelResponseLabel: \"Anuluj\",\r\n\t\tshowTimer: false,\r\n\t},\r\n};\r\n"]}
1
+ {"version":3,"file":"YesNoDialog.stories.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/YesNoDialog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,8BAA8B,CAAC;AAEtC,eAAe;IACd,KAAK,EAAE,yBAAyB;IAChC,SAAS,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,QAAQ,GAAc,CAAC,IAAS,EAAE,EAAE;IACzC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,IAAI,IAA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,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IAChB,KAAK,EAAE;QACN,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,oCAAoC;QAC9C,kBAAkB,EAAE,KAAK;QACzB,qBAAqB,EAAE,KAAK;QAC5B,gBAAgB,EAAE,KAAK;KACvB;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,kBAAkB,CAAC,IAAI,GAAG;IACzB,KAAK,EAAE;QACN,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,qBAAqB;QAC/B,kBAAkB,EAAE,IAAI;QACxB,qBAAqB,EAAE,IAAI;QAC3B,gBAAgB,EAAE,IAAI;QACtB,wBAAwB,EAAE,KAAK;QAC/B,qBAAqB,EAAE,KAAK;QAC5B,mBAAmB,EAAE,QAAQ;QAC7B,SAAS,EAAE,KAAK;KAChB;CACD,CAAC","sourcesContent":["import React from \"react\";\nimport { YesNoDialog } from \"./YesNoDialog\";\nimport { initFSBL } from \"../common/helpers\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport \"../../assets/css/dialogs.css\";\n\nexport default {\n\ttitle: \"YesNoDialog/YesNoDialog\",\n\tcomponent: YesNoDialog,\n};\n\nconst Template: Story<{}> = (args: any) => {\n\tinitFSBL(window);\n\n\tif (args._data) {\n\t\tFSBL.Clients.DialogManager.registerDialogCallback = (cb: Function) => {\n\t\t\tcb(\"\", { data: args._data });\n\t\t};\n\t}\n\n\treturn <YesNoDialog {...args} />;\n};\n\nexport const Empty = Template.bind({});\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\t_data: {\n\t\ttitle: \"Example titles\",\n\t\tquestion: \"Is this a question?\",\n\t\tshowNegativeButton: false,\n\t\tshowAffirmativeButton: true,\n\t\tshowCancelButton: true,\n\t\tshowTimer: false,\n\t},\n};\n\nexport const NoText = Template.bind({});\nNoText.args = {\n\t_data: {\n\t\tshowNegativeButton: false,\n\t\tshowAffirmativeButton: true,\n\t\tshowCancelButton: true,\n\t},\n};\n\nexport const WithTimer = Template.bind({});\nWithTimer.args = {\n\t_data: {\n\t\ttitle: \"Example titles\",\n\t\tquestion: \"Is this a question?\",\n\t\tshowNegativeButton: false,\n\t\tshowAffirmativeButton: true,\n\t\tshowCancelButton: true,\n\t\tshowTimer: true,\n\t\ttimerDuration: 3000,\n\t},\n};\n\nexport const NoButtons = Template.bind({});\nNoButtons.args = {\n\t_data: {\n\t\ttitle: \"No buttons\",\n\t\tquestion: \"What are you going to do about it?\",\n\t\tshowNegativeButton: false,\n\t\tshowAffirmativeButton: false,\n\t\tshowCancelButton: false,\n\t},\n};\n\nexport const CustomButtonLabels = Template.bind({});\nCustomButtonLabels.args = {\n\t_data: {\n\t\ttitle: \"Example titles\",\n\t\tquestion: \"Is this a question?\",\n\t\tshowNegativeButton: true,\n\t\tshowAffirmativeButton: true,\n\t\tshowCancelButton: true,\n\t\taffirmativeResponseLabel: \"Tak\",\n\t\tnegativeResponseLabel: \"Nie\",\n\t\tcancelResponseLabel: \"Anuluj\",\n\t\tshowTimer: false,\n\t},\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { YesNoDialog } from \"./YesNoDialog\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { YesNoDialog } from \"./YesNoDialog\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/timer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAyB;IAGjE,YAAY,KAAU;QACrB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,aAAa,EAAE,KAAK,CAAC,aAAa;SAClC,CAAC;IACH,CAAC;IAGD,iBAAiB;QAChB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;YAChC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;YAC9C,IAAI,OAAO,IAAI,CAAC,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,CAAC;gBACvC,IAAI,IAAI,CAAC,QAAQ;oBAAE,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAChD;iBAAM;gBACN,IAAI,CAAC,QAAQ,CAAC;oBACb,aAAa,EAAE,OAAO;iBACtB,CAAC,CAAC;aACH;QACF,CAAC,EAAE,IAAI,CAAC,CAAC;IACV,CAAC;IAGD,MAAM;QACL,OAAO;;YAAsB,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAO,CAAC;IACrE,CAAC;CACD","sourcesContent":["import React from \"react\";\r\n\r\nexport interface IProps {\r\n\ttimerDuration: number;\r\n\tontimerDurationExpiration: () => void;\r\n}\r\ninterface IState {\r\n\ttimerDuration: number;\r\n}\r\n\r\nexport default class Timer extends React.Component<IProps, IState> {\r\n\tinterval?: NodeJS.Timeout;\r\n\r\n\tconstructor(props: any) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\ttimerDuration: props.timerDuration,\r\n\t\t};\r\n\t}\r\n\r\n\t//Every second, subtract a second.\r\n\tcomponentDidMount() {\r\n\t\tthis.interval = setInterval(() => {\r\n\t\t\tlet newTime = this.state.timerDuration - 1000;\r\n\t\t\tif (newTime <= 0) {\r\n\t\t\t\tthis.props.ontimerDurationExpiration();\r\n\t\t\t\tif (this.interval) clearInterval(this.interval);\r\n\t\t\t} else {\r\n\t\t\t\tthis.setState({\r\n\t\t\t\t\ttimerDuration: newTime,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}, 1000);\r\n\t}\r\n\r\n\t//Countdown clock.\r\n\trender() {\r\n\t\treturn <div>Time remaining: {this.state.timerDuration / 1000}</div>;\r\n\t}\r\n}\r\n"]}
1
+ {"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../src/components/yesNoDialog/timer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAyB;IAGjE,YAAY,KAAU;QACrB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,aAAa,EAAE,KAAK,CAAC,aAAa;SAClC,CAAC;IACH,CAAC;IAGD,iBAAiB;QAChB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;YAChC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC;YAC9C,IAAI,OAAO,IAAI,CAAC,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,CAAC;gBACvC,IAAI,IAAI,CAAC,QAAQ;oBAAE,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAChD;iBAAM;gBACN,IAAI,CAAC,QAAQ,CAAC;oBACb,aAAa,EAAE,OAAO;iBACtB,CAAC,CAAC;aACH;QACF,CAAC,EAAE,IAAI,CAAC,CAAC;IACV,CAAC;IAGD,MAAM;QACL,OAAO;;YAAsB,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAO,CAAC;IACrE,CAAC;CACD","sourcesContent":["import React from \"react\";\n\nexport interface IProps {\n\ttimerDuration: number;\n\tontimerDurationExpiration: () => void;\n}\ninterface IState {\n\ttimerDuration: number;\n}\n\nexport default class Timer extends React.Component<IProps, IState> {\n\tinterval?: NodeJS.Timeout;\n\n\tconstructor(props: any) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\ttimerDuration: props.timerDuration,\n\t\t};\n\t}\n\n\t//Every second, subtract a second.\n\tcomponentDidMount() {\n\t\tthis.interval = setInterval(() => {\n\t\t\tlet newTime = this.state.timerDuration - 1000;\n\t\t\tif (newTime <= 0) {\n\t\t\t\tthis.props.ontimerDurationExpiration();\n\t\t\t\tif (this.interval) clearInterval(this.interval);\n\t\t\t} else {\n\t\t\t\tthis.setState({\n\t\t\t\t\ttimerDuration: newTime,\n\t\t\t\t});\n\t\t\t}\n\t\t}, 1000);\n\t}\n\n\t//Countdown clock.\n\trender() {\n\t\treturn <div>Time remaining: {this.state.timerDuration / 1000}</div>;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"enzymeSetup.js","sourceRoot":"","sources":["../src/enzymeSetup.js"],"names":[],"mappings":"AAMA,OAAO,OAAO,MAAM,oCAAoC,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;AAE7B,SAAS,SAAS,CAAC,GAAG,EAAE,MAAM;IAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC;SAC3C,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC;SACrD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,mBAAmB;IAC3B,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,2CAA2C,EAAE,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACjG,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IAEvB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAClC,MAAM,CAAC,SAAS,GAAG;QAClB,SAAS,EAAE,SAAS;KACpB,CAAC;IACF,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC1B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,mBAAmB,EAAE,CAAC;AAEtB,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,OAAO,EAAE,EAAE,CAAC,CAAC","sourcesContent":["// This is a helper/setup script that should be `--require`d when calling mocha to run enzyme tests\r\n// that require more real-world browser DOM objects to be exposed, like `.document` and `.window`.\r\n// This is needed to use methods like `.mount()` within enzyme.\r\n// It uses jsdom to set up a fake web browser in JavaScript.\r\n\r\n//import Adapter from \"enzyme-adapter-react-16\";\r\nimport Adapter from \"@wojtekmaj/enzyme-adapter-react-17\";\r\nimport { configure } from \"enzyme\";\r\nimport jsdom from \"jsdom\";\r\n\r\nrequire(\"@babel/register\")();\r\n\r\nfunction copyProps(src, target) {\r\n\tconst props = Object.getOwnPropertyNames(src)\r\n\t\t.filter((prop) => typeof target[prop] === \"undefined\")\r\n\t\t.map((prop) => Object.getOwnPropertyDescriptor(src, prop));\r\n\tObject.defineProperties(target, props);\r\n}\r\n\r\nfunction setUpDomEnvironment() {\r\n\tconst { JSDOM } = jsdom;\r\n\tconst dom = new JSDOM(\"<!doctype html><html><body></body></html>\", { url: \"http://localhost/\" });\r\n\tconst { window } = dom;\r\n\r\n\tglobal.window = window;\r\n\tglobal.document = window.document;\r\n\tglobal.navigator = {\r\n\t\tuserAgent: \"node.js\",\r\n\t};\r\n\tglobal.File = window.File;\r\n\tcopyProps(window, global);\r\n}\r\n\r\nsetUpDomEnvironment();\r\n\r\nconfigure({ adapter: new Adapter() });\r\n"]}
1
+ {"version":3,"file":"enzymeSetup.js","sourceRoot":"","sources":["../src/enzymeSetup.js"],"names":[],"mappings":"AAMA,OAAO,OAAO,MAAM,oCAAoC,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;AAE7B,SAAS,SAAS,CAAC,GAAG,EAAE,MAAM;IAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC;SAC3C,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC;SACrD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,mBAAmB;IAC3B,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,2CAA2C,EAAE,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACjG,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IAEvB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAClC,MAAM,CAAC,SAAS,GAAG;QAClB,SAAS,EAAE,SAAS;KACpB,CAAC;IACF,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC1B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,mBAAmB,EAAE,CAAC;AAEtB,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,OAAO,EAAE,EAAE,CAAC,CAAC","sourcesContent":["// This is a helper/setup script that should be `--require`d when calling mocha to run enzyme tests\n// that require more real-world browser DOM objects to be exposed, like `.document` and `.window`.\n// This is needed to use methods like `.mount()` within enzyme.\n// It uses jsdom to set up a fake web browser in JavaScript.\n\n//import Adapter from \"enzyme-adapter-react-16\";\nimport Adapter from \"@wojtekmaj/enzyme-adapter-react-17\";\nimport { configure } from \"enzyme\";\nimport jsdom from \"jsdom\";\n\nrequire(\"@babel/register\")();\n\nfunction copyProps(src, target) {\n\tconst props = Object.getOwnPropertyNames(src)\n\t\t.filter((prop) => typeof target[prop] === \"undefined\")\n\t\t.map((prop) => Object.getOwnPropertyDescriptor(src, prop));\n\tObject.defineProperties(target, props);\n}\n\nfunction setUpDomEnvironment() {\n\tconst { JSDOM } = jsdom;\n\tconst dom = new JSDOM(\"<!doctype html><html><body></body></html>\", { url: \"http://localhost/\" });\n\tconst { window } = dom;\n\n\tglobal.window = window;\n\tglobal.document = window.document;\n\tglobal.navigator = {\n\t\tuserAgent: \"node.js\",\n\t};\n\tglobal.File = window.File;\n\tcopyProps(window, global);\n}\n\nsetUpDomEnvironment();\n\nconfigure({ adapter: new Adapter() });\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { useAuth, useAuthSimulator } from \"./useAuth\";\r\nexport { useHotkey } from \"./useHotkey\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { useAuth, useAuthSimulator } from \"./useAuth\";\nexport { useHotkey } from \"./useHotkey\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useAuth.js","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC3B,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,WAAiB,EAAE,EAAE;QAChE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC3E,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,GAAG,EAAE;QAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO;QACN,oBAAoB;QACpB,eAAe;KACf,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACpC,MAAM,YAAY,GAAG,KAAK,EAAE,QAAgB,EAAE,QAAgB,EAAgD,EAAE;QAC/G,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,MAAM;YAAE,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,2BAA2B,EAAE,CAAC,CAAC;QACxG,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,MAAM;YAAE,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,2BAA2B,EAAE,CAAC,CAAC;QACxG,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;IAEF,OAAO;QACN,YAAY;KACZ,CAAC;AACH,CAAC,CAAC","sourcesContent":["export const useAuth = () => {\r\n\tconst publishAuthorization = (user: string, credentials?: any) => {\r\n\t\tFSBL.System.Window.getCurrent().hide();\r\n\t\tFSBL.Clients.AuthenticationClient.publishAuthorization(user, credentials);\r\n\t};\r\n\r\n\tconst quitApplication = () => {\r\n\t\tFSBL.System.exit();\r\n\t};\r\n\r\n\treturn {\r\n\t\tpublishAuthorization,\r\n\t\tquitApplication,\r\n\t};\r\n};\r\n\r\nexport const useAuthSimulator = () => {\r\n\tconst sendToServer = async (username: string, password: string): Promise<{ result?: string; error?: string }> => {\r\n\t\tif (!username || !username.length) return await Promise.resolve({ error: \"Missing or empty username\" });\r\n\t\tif (!password || !password.length) return await Promise.resolve({ error: \"Missing or empty password\" });\r\n\t\treturn await Promise.resolve({ result: \"ok\" });\r\n\t};\r\n\r\n\treturn {\r\n\t\tsendToServer,\r\n\t};\r\n};\r\n"]}
1
+ {"version":3,"file":"useAuth.js","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC3B,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,WAAiB,EAAE,EAAE;QAChE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC3E,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,GAAG,EAAE;QAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO;QACN,oBAAoB;QACpB,eAAe;KACf,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACpC,MAAM,YAAY,GAAG,KAAK,EAAE,QAAgB,EAAE,QAAgB,EAAgD,EAAE;QAC/G,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,MAAM;YAAE,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,2BAA2B,EAAE,CAAC,CAAC;QACxG,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,MAAM;YAAE,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,2BAA2B,EAAE,CAAC,CAAC;QACxG,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;IAEF,OAAO;QACN,YAAY;KACZ,CAAC;AACH,CAAC,CAAC","sourcesContent":["export const useAuth = () => {\n\tconst publishAuthorization = (user: string, credentials?: any) => {\n\t\tFSBL.System.Window.getCurrent().hide();\n\t\tFSBL.Clients.AuthenticationClient.publishAuthorization(user, credentials);\n\t};\n\n\tconst quitApplication = () => {\n\t\tFSBL.System.exit();\n\t};\n\n\treturn {\n\t\tpublishAuthorization,\n\t\tquitApplication,\n\t};\n};\n\nexport const useAuthSimulator = () => {\n\tconst sendToServer = async (username: string, password: string): Promise<{ result?: string; error?: string }> => {\n\t\tif (!username || !username.length) return await Promise.resolve({ error: \"Missing or empty username\" });\n\t\tif (!password || !password.length) return await Promise.resolve({ error: \"Missing or empty password\" });\n\t\treturn await Promise.resolve({ result: \"ok\" });\n\t};\n\n\treturn {\n\t\tsendToServer,\n\t};\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useDashbar.js","sourceRoot":"","sources":["../../src/hooks/useDashbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,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AAM,YAAY,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAE/E,YAAY,CAAC,QAAQ,CACpB;YACC,KAAK,EAAE,cAAc;YACrB,KAAK,EAAE,YAAY;SACnB,EACD,GAAG,EAAE;YACJ,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;QACxE,CAAC,CACD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACN,YAAY;QACZ,mBAAmB;KACnB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDeepEffect } from \"./useDeepEffect\";\r\nimport { useSelector } from \"../store\";\r\nimport { ToolbarActions } from \"../actions/toolbarActions\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { DashbarItem } from \"../types/dashbarTypes\";\r\nimport { types } from \"@finsemble/finsemble-core\";\r\n\r\ntype StoreModel = types.StoreModel;\r\ntype StandardError = types.StandardError;\r\n\r\nlet storageIsInitialized: boolean = false;\r\n\r\ntype DashbarStoreValueType = {\r\n\tdashbaritems: DashbarItem[];\r\n};\r\n\r\nlet DashbarStore: StoreModel;\r\n\r\nconst setDashbarItem = (\r\n\titemName: string,\r\n\tavailableDashbarItems: Record<string, DashbarItem>,\r\n\tnewDashbarItems: DashbarItem[]\r\n) => {\r\n\tif (availableDashbarItems.hasOwnProperty(itemName)) {\r\n\t\tconst newItem = availableDashbarItems[itemName];\r\n\t\tnewItem.id = itemName;\r\n\t\tnewDashbarItems.push(newItem);\r\n\t}\r\n};\r\n\r\nconst initializeDistributedStore = async (): Promise<void> => {\r\n\tconst storeParams = {\r\n\t\tstore: \"Finsemble-Dashbar-Store\",\r\n\t\tglobal: true,\r\n\t\tpersist: true,\r\n\t};\r\n\tconst { err, data: store } = await FSBL.Clients.DistributedStoreClient.createStore(storeParams);\r\n\tif (err || !store) {\r\n\t\tconst error = `Error initializing dashbar: unable to retrieve stored items, falling back to config: ${err}`;\r\n\t\tFSBL.Clients.Logger.system.error(error);\r\n\t\treturn;\r\n\t}\r\n\r\n\tDashbarStore = store;\r\n};\r\n\r\n/**\r\n * Fetches an initial list of dashbar items from the persistent distributed store,\r\n * and if that doesn't exist, from spawnData\r\n */\r\nconst initializeDashbarItems = async (): Promise<DashbarItem[] | null> => {\r\n\tlet dashbarItemList;\r\n\tif (DashbarStore && Object.keys(DashbarStore.values).length > 0) {\r\n\t\tdashbarItemList = (DashbarStore.values as DashbarStoreValueType).dashbaritems;\r\n\t}\r\n\r\n\tif (!dashbarItemList) {\r\n\t\tconst spawnData = FSBL.Clients.WindowClient.getSpawnData();\r\n\t\tif (Array.isArray(spawnData?.dashbar?.items)) {\r\n\t\t\tdashbarItemList = spawnData.dashbar.items;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!dashbarItemList) dashbarItemList = [];\r\n\r\n\tconst newDashbarItems: DashbarItem[] = [];\r\n\tif (dashbarItemList.length > 0) {\r\n\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\tfield: \"finsemble.availableDashbarItems\",\r\n\t\t});\r\n\r\n\t\tdashbarItemList.forEach((itemName: string) => setDashbarItem(itemName, availableDashbarItems, newDashbarItems));\r\n\t}\r\n\r\n\tif (!DashbarStore.values.dashbaritems) {\r\n\t\tDashbarStore.setValue({\r\n\t\t\tfield: \"dashbaritems\",\r\n\t\t\tvalue: dashbarItemList,\r\n\t\t});\r\n\t\treturn null;\r\n\t} else {\r\n\t\treturn newDashbarItems;\r\n\t}\r\n};\r\n\r\nexport const useDashbar = () => {\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst setDashbarItems = async (err: StandardError, data: any) => {\r\n\t\tif (!err && data) {\r\n\t\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\r\n\t\t\t\tfield: \"finsemble.availableDashbarItems\",\r\n\t\t\t});\r\n\t\t\tconst newDashbarItems: DashbarItem[] = [];\r\n\t\t\t// Add the widget name as an id to help identify\r\n\t\t\t// keys -> widgets when reordering items\r\n\t\t\tdata.value.forEach((item: string) => setDashbarItem(item, availableDashbarItems, newDashbarItems));\r\n\r\n\t\t\tdispatch(ToolbarActions.SET_DASHBAR_ITEMS(newDashbarItems));\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * This effect initializes the dashbar items in the redux store. The store must only be initialized once. We use the module level variable\r\n\t * `storageIsInitialized` as a simple flag to prevent initialization from occuring more than once.\r\n\t */\r\n\tuseDeepEffect(async () => {\r\n\t\tif (!storageIsInitialized) {\r\n\t\t\tstorageIsInitialized = true;\r\n\t\t\tawait initializeDistributedStore();\r\n\t\t\tconst newDashbarItems = await initializeDashbarItems();\r\n\t\t\tif (newDashbarItems) dispatch(ToolbarActions.SET_DASHBAR_ITEMS(newDashbarItems));\r\n\t\t\tDashbarStore.addListener({ field: \"dashbaritems\" }, setDashbarItems);\r\n\t\t}\r\n\t\treturn function cleanup() {\r\n\t\t\tDashbarStore.removeListener({ field: \"dashbaritems\" }, setDashbarItems);\r\n\t\t};\r\n\t}, [dispatch]);\r\n\r\n\tconst { dashbarItems } = useSelector((state) => state.toolbar);\r\n\r\n\tconst reorderDashbarItems = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\r\n\t\tconst dashbarItemsNewOrder = [...dashbarItems];\r\n\t\tconst dashbarItemToMove = dashbarItemsNewOrder[oldIndex];\r\n\t\tdashbarItemsNewOrder.splice(oldIndex, 1);\r\n\t\tdashbarItemsNewOrder.splice(newIndex, 0, dashbarItemToMove);\r\n\r\n\t\tconst newOrderList = dashbarItemsNewOrder.map((dashbarItem) => dashbarItem.id);\r\n\r\n\t\tDashbarStore.setValue(\r\n\t\t\t{\r\n\t\t\t\tfield: \"dashbaritems\",\r\n\t\t\t\tvalue: newOrderList,\r\n\t\t\t},\r\n\t\t\t() => {\r\n\t\t\t\tdispatch(ToolbarActions.REORDER_DASHBAR_ITEMS({ oldIndex, newIndex }));\r\n\t\t\t}\r\n\t\t);\r\n\t};\r\n\r\n\treturn {\r\n\t\tdashbarItems,\r\n\t\treorderDashbarItems,\r\n\t};\r\n};\r\n"]}
1
+ {"version":3,"file":"useDashbar.js","sourceRoot":"","sources":["../../src/hooks/useDashbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,IAAI,oBAAoB,GAAY,KAAK,CAAC;AAM1C,IAAI,YAAwB,CAAC;AAE7B,MAAM,cAAc,GAAG,CACtB,QAAgB,EAChB,qBAAkD,EAClD,eAA8B,EAC7B,EAAE;IACH,IAAI,qBAAqB,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnD,MAAM,OAAO,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAChD,OAAO,CAAC,EAAE,GAAG,QAAQ,CAAC;QACtB,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC9B;AACF,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,KAAK,IAAmB,EAAE;IAC5D,MAAM,WAAW,GAAG;QACnB,KAAK,EAAE,yBAAyB;QAChC,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,IAAI;KACb,CAAC;IACF,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAChG,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE;QAClB,MAAM,KAAK,GAAG,wFAAwF,GAAG,EAAE,CAAC;QAC5G,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,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AAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAE/D,MAAM,mBAAmB,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAA0C,EAAE,EAAE;QAC9F,MAAM,oBAAoB,GAAG,CAAC,GAAG,YAAY,CAAC,CAAC;QAC/C,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QACzD,oBAAoB,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QACzC,oBAAoB,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAE5D,MAAM,YAAY,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAE/E,YAAY,CAAC,QAAQ,CACpB;YACC,KAAK,EAAE,cAAc;YACrB,KAAK,EAAE,YAAY;SACnB,EACD,GAAG,EAAE;YACJ,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;QACxE,CAAC,CACD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACN,YAAY;QACZ,mBAAmB;KACnB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDeepEffect } from \"./useDeepEffect\";\nimport { useSelector } from \"../store\";\nimport { ToolbarActions } from \"../actions/toolbarActions\";\nimport { useDispatch } from \"react-redux\";\nimport { DashbarItem } from \"../types/dashbarTypes\";\nimport { types } from \"@finsemble/finsemble-api\";\n\ntype StoreModel = types.StoreModel;\ntype StandardError = types.StandardError;\n\nlet storageIsInitialized: boolean = false;\n\ntype DashbarStoreValueType = {\n\tdashbaritems: DashbarItem[];\n};\n\nlet DashbarStore: StoreModel;\n\nconst setDashbarItem = (\n\titemName: string,\n\tavailableDashbarItems: Record<string, DashbarItem>,\n\tnewDashbarItems: DashbarItem[]\n) => {\n\tif (availableDashbarItems.hasOwnProperty(itemName)) {\n\t\tconst newItem = availableDashbarItems[itemName];\n\t\tnewItem.id = itemName;\n\t\tnewDashbarItems.push(newItem);\n\t}\n};\n\nconst initializeDistributedStore = async (): Promise<void> => {\n\tconst storeParams = {\n\t\tstore: \"Finsemble-Dashbar-Store\",\n\t\tglobal: true,\n\t\tpersist: true,\n\t};\n\tconst { err, data: store } = await FSBL.Clients.DistributedStoreClient.createStore(storeParams);\n\tif (err || !store) {\n\t\tconst error = `Error initializing dashbar: unable to retrieve stored items, falling back to config: ${err}`;\n\t\tFSBL.Clients.Logger.system.error(error);\n\t\treturn;\n\t}\n\n\tDashbarStore = store;\n};\n\n/**\n * Fetches an initial list of dashbar items from the persistent distributed store,\n * and if that doesn't exist, from spawnData\n */\nconst initializeDashbarItems = async (): Promise<DashbarItem[] | null> => {\n\tlet dashbarItemList;\n\tif (DashbarStore && Object.keys(DashbarStore.values).length > 0) {\n\t\tdashbarItemList = (DashbarStore.values as DashbarStoreValueType).dashbaritems;\n\t}\n\n\tif (!dashbarItemList) {\n\t\tconst spawnData = FSBL.Clients.WindowClient.getSpawnData();\n\t\tif (Array.isArray(spawnData?.dashbar?.items)) {\n\t\t\tdashbarItemList = spawnData.dashbar.items;\n\t\t}\n\t}\n\n\tif (!dashbarItemList) dashbarItemList = [];\n\n\tconst newDashbarItems: DashbarItem[] = [];\n\tif (dashbarItemList.length > 0) {\n\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\n\t\t\tfield: \"finsemble.availableDashbarItems\",\n\t\t});\n\n\t\tdashbarItemList.forEach((itemName: string) => setDashbarItem(itemName, availableDashbarItems, newDashbarItems));\n\t}\n\n\tif (!DashbarStore.values.dashbaritems) {\n\t\tDashbarStore.setValue({\n\t\t\tfield: \"dashbaritems\",\n\t\t\tvalue: dashbarItemList,\n\t\t});\n\t\treturn null;\n\t} else {\n\t\treturn newDashbarItems;\n\t}\n};\n\nexport const useDashbar = () => {\n\tconst dispatch = useDispatch();\n\n\tconst setDashbarItems = async (err: StandardError, data: any) => {\n\t\tif (!err && data) {\n\t\t\tconst { data: availableDashbarItems } = await FSBL.Clients.ConfigClient.getValue({\n\t\t\t\tfield: \"finsemble.availableDashbarItems\",\n\t\t\t});\n\t\t\tconst newDashbarItems: DashbarItem[] = [];\n\t\t\t// Add the widget name as an id to help identify\n\t\t\t// keys -> widgets when reordering items\n\t\t\tdata.value.forEach((item: string) => setDashbarItem(item, availableDashbarItems, newDashbarItems));\n\n\t\t\tdispatch(ToolbarActions.SET_DASHBAR_ITEMS(newDashbarItems));\n\t\t}\n\t};\n\n\t/**\n\t * This effect initializes the dashbar items in the redux store. The store must only be initialized once. We use the module level variable\n\t * `storageIsInitialized` as a simple flag to prevent initialization from occuring more than once.\n\t */\n\tuseDeepEffect(async () => {\n\t\tif (!storageIsInitialized) {\n\t\t\tstorageIsInitialized = true;\n\t\t\tawait initializeDistributedStore();\n\t\t\tconst newDashbarItems = await initializeDashbarItems();\n\t\t\tif (newDashbarItems) dispatch(ToolbarActions.SET_DASHBAR_ITEMS(newDashbarItems));\n\t\t\tDashbarStore.addListener({ field: \"dashbaritems\" }, setDashbarItems);\n\t\t}\n\t\treturn function cleanup() {\n\t\t\tDashbarStore.removeListener({ field: \"dashbaritems\" }, setDashbarItems);\n\t\t};\n\t}, [dispatch]);\n\n\tconst { dashbarItems } = useSelector((state) => state.toolbar);\n\n\tconst reorderDashbarItems = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\n\t\tconst dashbarItemsNewOrder = [...dashbarItems];\n\t\tconst dashbarItemToMove = dashbarItemsNewOrder[oldIndex];\n\t\tdashbarItemsNewOrder.splice(oldIndex, 1);\n\t\tdashbarItemsNewOrder.splice(newIndex, 0, dashbarItemToMove);\n\n\t\tconst newOrderList = dashbarItemsNewOrder.map((dashbarItem) => dashbarItem.id);\n\n\t\tDashbarStore.setValue(\n\t\t\t{\n\t\t\t\tfield: \"dashbaritems\",\n\t\t\t\tvalue: newOrderList,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tdispatch(ToolbarActions.REORDER_DASHBAR_ITEMS({ oldIndex, newIndex }));\n\t\t\t}\n\t\t);\n\t};\n\n\treturn {\n\t\tdashbarItems,\n\t\treorderDashbarItems,\n\t};\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useDeepEffect.js","sourceRoot":"","sources":["../../src/hooks/useDeepEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,SAAS,qBAAqB,CAAC,KAAU;IACxC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IAErB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE;QACjC,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;KACpB;IAED,OAAO,GAAG,CAAC,OAAO,CAAC;AACpB,CAAC;AAMD,MAAM,UAAU,aAAa,CAAC,QAAa,EAAE,YAAwB;IACpE,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["import { useEffect, useRef } from \"react\";\r\nimport isEqual from \"lodash/isEqual\";\r\n\r\nfunction useDeepCompareMemoize(value: any) {\r\n\tconst ref = useRef();\r\n\r\n\tif (!isEqual(value, ref.current)) {\r\n\t\tref.current = value;\r\n\t}\r\n\r\n\treturn ref.current;\r\n}\r\n\r\n/**\r\n * Use this just like useEffect() except that this will compare objects and arrays using lodash's isEqual() method.\r\n * Always pass an array of dependencies as the second parameter!!!\r\n */\r\nexport function useDeepEffect(callback: any, dependencies: Array<any>) {\r\n\tuseEffect(callback, useDeepCompareMemoize(dependencies));\r\n}\r\n\r\n/*\r\n// Previous implementation that had bugs. Keep around for a bit until we shake out the new version.\r\nexport function useDeepEffect(effectFunc : Function, deps : Array<any>) {\r\n\tconst isFirst = useRef(true);\r\n\tconst prevDeps = useRef(deps);\r\n\r\n\tuseEffect(() => {\r\n\t\tconst isSame = prevDeps.current.every((obj: any, index: any) => isEqual(obj, deps[index]));\r\n\t\tif (isFirst.current || !isSame) {\r\n\t\t\teffectFunc();\r\n\t\t}\r\n\r\n\t\tisFirst.current = false;\r\n\t\tprevDeps.current = deps;\r\n\t}, deps);\r\n}\r\n*/\r\n"]}
1
+ {"version":3,"file":"useDeepEffect.js","sourceRoot":"","sources":["../../src/hooks/useDeepEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAErC,SAAS,qBAAqB,CAAC,KAAU;IACxC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IAErB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE;QACjC,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;KACpB;IAED,OAAO,GAAG,CAAC,OAAO,CAAC;AACpB,CAAC;AAMD,MAAM,UAAU,aAAa,CAAC,QAAa,EAAE,YAAwB;IACpE,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["import { useEffect, useRef } from \"react\";\nimport isEqual from \"lodash/isEqual\";\n\nfunction useDeepCompareMemoize(value: any) {\n\tconst ref = useRef();\n\n\tif (!isEqual(value, ref.current)) {\n\t\tref.current = value;\n\t}\n\n\treturn ref.current;\n}\n\n/**\n * Use this just like useEffect() except that this will compare objects and arrays using lodash's isEqual() method.\n * Always pass an array of dependencies as the second parameter!!!\n */\nexport function useDeepEffect(callback: any, dependencies: Array<any>) {\n\tuseEffect(callback, useDeepCompareMemoize(dependencies));\n}\n\n/*\n// Previous implementation that had bugs. Keep around for a bit until we shake out the new version.\nexport function useDeepEffect(effectFunc : Function, deps : Array<any>) {\n\tconst isFirst = useRef(true);\n\tconst prevDeps = useRef(deps);\n\n\tuseEffect(() => {\n\t\tconst isSame = prevDeps.current.every((obj: any, index: any) => isEqual(obj, deps[index]));\n\t\tif (isFirst.current || !isSame) {\n\t\t\teffectFunc();\n\t\t}\n\n\t\tisFirst.current = false;\n\t\tprevDeps.current = deps;\n\t}, deps);\n}\n*/\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFavorites.js","sourceRoot":"","sources":["../../src/hooks/useFavorites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA2B7D,MAAM,CAAC,MAAM,YAAY,GAAG,GAAkB,EAAE;IAC/C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEpD,MAAM,WAAW,GAAG,CAAC,QAAkB,EAAE,EAAE;QAC1C,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,EAAkB,EAAE,EAAE;QAC7C,QAAQ,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,EAAkB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEtE,OAAO;QACN,SAAS;QACT,WAAW;QACX,cAAc;QACd,WAAW;KACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDispatch, useSelector } from \"../store\";\r\nimport { Favorite } from \"../types/favoriteTypes\";\r\nimport { FavoriteActions } from \"../actions/favoriteActions\";\r\n\r\ntype FavoritesHook = {\r\n\t/**\r\n\t * The current favorites list from the store.\r\n\t */\r\n\tfavorites: Favorite[];\r\n\r\n\t/**\r\n\t * Adds a favorite to the favorites store.\r\n\t */\r\n\taddFavorite: (favorite: Favorite) => void;\r\n\r\n\t/**\r\n\t * Removes the favorite for the given id from the favorites store.\r\n\t */\r\n\tremoveFavorite: (id: Favorite[\"id\"]) => void;\r\n\r\n\t/**\r\n\t * Returns true if the current id has been favorited.\r\n\t */\r\n\tisFavorited: (id: Favorite[\"id\"]) => boolean;\r\n};\r\n\r\n/**\r\n * The useFavorites() hook is used by FavoriteMaker to interact with the redux store.\r\n */\r\nexport const useFavorites = (): FavoritesHook => {\r\n\tconst dispatch = useDispatch();\r\n\tconst { favorites } = useSelector((state) => state.favorite);\r\n\tconst favoritesIds = favorites.map((fav) => fav.id);\r\n\r\n\tconst addFavorite = (favorite: Favorite) => {\r\n\t\tdispatch(FavoriteActions.ADD_FAVORITE(favorite));\r\n\t};\r\n\r\n\tconst removeFavorite = (id: Favorite[\"id\"]) => {\r\n\t\tdispatch(FavoriteActions.REMOVE_FAVORITE(id));\r\n\t};\r\n\r\n\tconst isFavorited = (id: Favorite[\"id\"]) => favoritesIds.includes(id);\r\n\r\n\treturn {\r\n\t\tfavorites,\r\n\t\taddFavorite,\r\n\t\tremoveFavorite,\r\n\t\tisFavorited,\r\n\t};\r\n};\r\n"]}
1
+ {"version":3,"file":"useFavorites.js","sourceRoot":"","sources":["../../src/hooks/useFavorites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA2B7D,MAAM,CAAC,MAAM,YAAY,GAAG,GAAkB,EAAE;IAC/C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEpD,MAAM,WAAW,GAAG,CAAC,QAAkB,EAAE,EAAE;QAC1C,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,EAAkB,EAAE,EAAE;QAC7C,QAAQ,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,EAAkB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEtE,OAAO;QACN,SAAS;QACT,WAAW;QACX,cAAc;QACd,WAAW;KACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDispatch, useSelector } from \"../store\";\nimport { Favorite } from \"../types/favoriteTypes\";\nimport { FavoriteActions } from \"../actions/favoriteActions\";\n\ntype FavoritesHook = {\n\t/**\n\t * The current favorites list from the store.\n\t */\n\tfavorites: Favorite[];\n\n\t/**\n\t * Adds a favorite to the favorites store.\n\t */\n\taddFavorite: (favorite: Favorite) => void;\n\n\t/**\n\t * Removes the favorite for the given id from the favorites store.\n\t */\n\tremoveFavorite: (id: Favorite[\"id\"]) => void;\n\n\t/**\n\t * Returns true if the current id has been favorited.\n\t */\n\tisFavorited: (id: Favorite[\"id\"]) => boolean;\n};\n\n/**\n * The useFavorites() hook is used by FavoriteMaker to interact with the redux store.\n */\nexport const useFavorites = (): FavoritesHook => {\n\tconst dispatch = useDispatch();\n\tconst { favorites } = useSelector((state) => state.favorite);\n\tconst favoritesIds = favorites.map((fav) => fav.id);\n\n\tconst addFavorite = (favorite: Favorite) => {\n\t\tdispatch(FavoriteActions.ADD_FAVORITE(favorite));\n\t};\n\n\tconst removeFavorite = (id: Favorite[\"id\"]) => {\n\t\tdispatch(FavoriteActions.REMOVE_FAVORITE(id));\n\t};\n\n\tconst isFavorited = (id: Favorite[\"id\"]) => favoritesIds.includes(id);\n\n\treturn {\n\t\tfavorites,\n\t\taddFavorite,\n\t\tremoveFavorite,\n\t\tisFavorited,\n\t};\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"useFavoritesShell.js","sourceRoot":"","sources":["../../src/hooks/useFavoritesShell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,IAAI,oBAAoB,GAAY,KAAK,CAAC;AAM1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACrC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IASrD,MAAM,eAAe,GAAG,KAAK,EAAE,EAAkB,EAAE,QAA8B,EAAE,EAAE;QACpF,IAAI,QAAQ,KAAK,aAAa,EAAE;YAC/B,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE;gBACrC,cAAc,EAAE,IAAI;gBACpB,OAAO,EAAE,MAAM;aACf,CAAC,CAAC;SACH;aAAM,IAAI,QAAQ,KAAK,WAAW,EAAE;YACpC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAC3C,EAAE,KAAK,EAAE,sCAAsC,EAAE,MAAM,EAAE,IAAI,EAAE,EAC/D,CAAC,GAAkB,EAAE,KAAW,EAAE,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["import { useDispatch } from \"../store\";\r\nimport { Favorite } from \"../types/favoriteTypes\";\r\nimport { FavoriteActions } from \"../actions/favoriteActions\";\r\nimport { useFavorites } from \"./useFavorites\";\r\nimport { useEffect } from \"react\";\r\nimport { types } from \"@finsemble/finsemble-core\";\r\n\r\ntype StandardError = types.StandardError;\r\n\r\nlet storageIsInitialized: boolean = false;\r\n\r\n/**\r\n * The useFavoritesShell() hook is used by FavoritesShell to interact with the redux store\r\n * and storage.\r\n */\r\nexport const useFavoritesShell = () => {\r\n\tconst dispatch = useDispatch();\r\n\tconst { favorites, removeFavorite } = useFavorites();\r\n\r\n\t// Ideally in the future the following function will be decoupled from implementation, allowing Favorites to generically dispatch actions.\r\n\t/**\r\n\t * Given a favorite item, trigger the associated action on that item.\r\n\t * I.e. If it's a finsemble component, a new window of that component is launched. If it's a workspace, the workspace would be switched to.\r\n\t * @param id The favorite item's id\r\n\t * @param category The to be triggered favorite item's category\r\n\t */\r\n\tconst triggerFavorite = async (id: Favorite[\"id\"], category: Favorite[\"category\"]) => {\r\n\t\tif (category === \"Application\") {\r\n\t\t\tFSBL.Clients.LauncherClient.spawn(id, {\r\n\t\t\t\taddToWorkspace: true,\r\n\t\t\t\tmonitor: \"mine\",\r\n\t\t\t});\r\n\t\t} else if (category === \"Workspace\") {\r\n\t\t\tFSBL.Clients.DistributedStoreClient.getStore(\r\n\t\t\t\t{ store: \"Finsemble-WorkspaceMenu-Global-Store\", global: true },\r\n\t\t\t\t(err: StandardError, store?: any) => {\r\n\t\t\t\t\tstore.Dispatcher.dispatch({\r\n\t\t\t\t\t\tactionType: \"switchToWorkspace\",\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tname: id,\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};\r\n\r\n\t/**\r\n\t * We need to persist the right order in whent he user reorders favorites in the toolbar. This ensures\r\n\t * that favorites will appear in the right order on future Toolbar launches.\r\n\t * @param favElements The ordered collection of favorite elements\r\n\t */\r\n\tconst setFavoritesOrder = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\r\n\t\tdispatch(FavoriteActions.REORDER_FAVORITES({ oldIndex, newIndex }));\r\n\t};\r\n\r\n\t/**\r\n\t * This effect initializes the favorites redux store. The store must only be initialized once, even though useFavorites may be\r\n\t * referenced by many different React components. We use the module level variable `storageIsInitialized` as a simple flag to\r\n\t * prevent initialization from occuring more than once.\r\n\t */\r\n\tuseEffect(() => {\r\n\t\tif (storageIsInitialized) return;\r\n\t\tstorageIsInitialized = true;\r\n\t\t// Copy the persisted favorites from Storage to the redux store\r\n\t\tFSBL.Clients.StorageClient.get({ topic: \"favorites\", key: \"allCurrentFavorites\" }, (err, data) => {\r\n\t\t\tif (err) {\r\n\t\t\t\treturn FSBL.Clients.Logger.system.error(\r\n\t\t\t\t\t`Favorite Hook -> Failed to retrieve favorites from StorageClient: ${err}`\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tdispatch(FavoriteActions.INITIALIZE_FAVORITES(data));\r\n\t\t});\r\n\t}, [dispatch]);\r\n\r\n\t// When the list of favorite items change, we want to persist that data to the store.\r\n\tuseEffect(() => {\r\n\t\tFSBL.Clients.StorageClient.save({\r\n\t\t\ttopic: \"favorites\",\r\n\t\t\tkey: \"allCurrentFavorites\",\r\n\t\t\tvalue: favorites,\r\n\t\t});\r\n\t}, [favorites]);\r\n\r\n\treturn {\r\n\t\tfavorites,\r\n\t\tremoveFavorite,\r\n\t\ttriggerFavorite,\r\n\t\tsetFavoritesOrder,\r\n\t};\r\n};\r\n"]}
1
+ {"version":3,"file":"useFavoritesShell.js","sourceRoot":"","sources":["../../src/hooks/useFavoritesShell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,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AAC,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,qBAAqB,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAChG,IAAI,GAAG,EAAE;gBACR,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CACtC,qEAAqE,GAAG,EAAE,CAC1E,CAAC;aACF;YACD,QAAQ,CAAC,eAAe,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAGf,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC;YAC/B,KAAK,EAAE,WAAW;YAClB,GAAG,EAAE,qBAAqB;YAC1B,KAAK,EAAE,SAAS;SAChB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO;QACN,SAAS;QACT,cAAc;QACd,eAAe;QACf,iBAAiB;KACjB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { useDispatch } from \"../store\";\nimport { Favorite } from \"../types/favoriteTypes\";\nimport { FavoriteActions } from \"../actions/favoriteActions\";\nimport { useFavorites } from \"./useFavorites\";\nimport { useEffect } from \"react\";\nimport { types } from \"@finsemble/finsemble-api\";\n\ntype StandardError = types.StandardError;\n\nlet storageIsInitialized: boolean = false;\n\n/**\n * The useFavoritesShell() hook is used by FavoritesShell to interact with the redux store\n * and storage.\n */\nexport const useFavoritesShell = () => {\n\tconst dispatch = useDispatch();\n\tconst { favorites, removeFavorite } = useFavorites();\n\n\t// Ideally in the future the following function will be decoupled from implementation, allowing Favorites to generically dispatch actions.\n\t/**\n\t * Given a favorite item, trigger the associated action on that item.\n\t * I.e. If it's a finsemble component, a new window of that component is launched. If it's a workspace, the workspace would be switched to.\n\t * @param id The favorite item's id\n\t * @param category The to be triggered favorite item's category\n\t */\n\tconst triggerFavorite = async (id: Favorite[\"id\"], category: Favorite[\"category\"]) => {\n\t\tif (category === \"Application\") {\n\t\t\tFSBL.Clients.LauncherClient.spawn(id, {\n\t\t\t\taddToWorkspace: true,\n\t\t\t\tmonitor: \"mine\",\n\t\t\t});\n\t\t} else if (category === \"Workspace\") {\n\t\t\tFSBL.Clients.DistributedStoreClient.getStore(\n\t\t\t\t{ store: \"Finsemble-WorkspaceMenu-Global-Store\", global: true },\n\t\t\t\t(err: StandardError, store?: any) => {\n\t\t\t\t\tstore.Dispatcher.dispatch({\n\t\t\t\t\t\tactionType: \"switchToWorkspace\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tname: id,\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};\n\n\t/**\n\t * We need to persist the right order in whent he user reorders favorites in the toolbar. This ensures\n\t * that favorites will appear in the right order on future Toolbar launches.\n\t * @param favElements The ordered collection of favorite elements\n\t */\n\tconst setFavoritesOrder = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\n\t\tdispatch(FavoriteActions.REORDER_FAVORITES({ oldIndex, newIndex }));\n\t};\n\n\t/**\n\t * This effect initializes the favorites redux store. The store must only be initialized once, even though useFavorites may be\n\t * referenced by many different React components. We use the module level variable `storageIsInitialized` as a simple flag to\n\t * prevent initialization from occuring more than once.\n\t */\n\tuseEffect(() => {\n\t\tif (storageIsInitialized) return;\n\t\tstorageIsInitialized = true;\n\t\t// Copy the persisted favorites from Storage to the redux store\n\t\tFSBL.Clients.StorageClient.get({ topic: \"favorites\", key: \"allCurrentFavorites\" }, (err, data) => {\n\t\t\tif (err) {\n\t\t\t\treturn FSBL.Clients.Logger.system.error(\n\t\t\t\t\t`Favorite Hook -> Failed to retrieve favorites from StorageClient: ${err}`\n\t\t\t\t);\n\t\t\t}\n\t\t\tdispatch(FavoriteActions.INITIALIZE_FAVORITES(data));\n\t\t});\n\t}, [dispatch]);\n\n\t// When the list of favorite items change, we want to persist that data to the store.\n\tuseEffect(() => {\n\t\tFSBL.Clients.StorageClient.save({\n\t\t\ttopic: \"favorites\",\n\t\t\tkey: \"allCurrentFavorites\",\n\t\t\tvalue: favorites,\n\t\t});\n\t}, [favorites]);\n\n\treturn {\n\t\tfavorites,\n\t\tremoveFavorite,\n\t\ttriggerFavorite,\n\t\tsetFavoritesOrder,\n\t};\n};\n"]}