@finsemble/finsemble-ui 6.3.0 → 6.4.0-beta.2

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 (745) hide show
  1. package/README.md +28 -28
  2. package/package.json +21 -33
  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 +1 -3
  9. package/react/actions/smartDesktopDesignerActions.js +0 -1
  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 -568
  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 -0
  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/copy.svg +10 -10
  50. package/react/assets/icons/documentation.svg +20 -0
  51. package/react/assets/icons/exclamation-circle.svg +4 -4
  52. package/react/assets/icons/external-link.svg +12 -12
  53. package/react/assets/icons/flag.svg +10 -10
  54. package/react/assets/icons/folder.svg +3 -3
  55. package/react/assets/icons/font.svg +3 -3
  56. package/react/assets/icons/globe.svg +3 -3
  57. package/react/assets/icons/hdd.svg +9 -9
  58. package/react/assets/icons/key.svg +10 -10
  59. package/react/assets/icons/life-ring.svg +3 -3
  60. package/react/assets/icons/linker.svg +18 -0
  61. package/react/assets/icons/lock.svg +5 -5
  62. package/react/assets/icons/magic.svg +15 -15
  63. package/react/assets/icons/maximize.svg +16 -0
  64. package/react/assets/icons/minimize.svg +15 -0
  65. package/react/assets/icons/moon.svg +10 -10
  66. package/react/assets/icons/paint-roller.svg +3 -3
  67. package/react/assets/icons/pencil.svg +10 -10
  68. package/react/assets/icons/plus.svg +3 -3
  69. package/react/assets/icons/question-circle.svg +5 -5
  70. package/react/assets/icons/search.svg +3 -3
  71. package/react/assets/icons/sun.svg +9 -9
  72. package/react/assets/icons/times.svg +3 -3
  73. package/react/assets/icons/toggle-off.svg +6 -6
  74. package/react/assets/icons/toggle-on.svg +6 -6
  75. package/react/assets/icons/toolbar.svg +12 -0
  76. package/react/assets/icons/tools.svg +3 -3
  77. package/react/assets/icons/trash.svg +12 -12
  78. package/react/assets/icons/upload.svg +10 -10
  79. package/react/assets/icons/window.svg +3 -3
  80. package/react/assets/img/finsemble-display.png +0 -0
  81. package/react/componentTemplateGenerator.js +85 -85
  82. package/react/componentTemplateGenerator.js.map +1 -1
  83. package/react/components/FinsembleProvider.js.map +1 -1
  84. package/react/components/appCatalog/AppCatalog.js.map +1 -1
  85. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  86. package/react/components/appCatalog/components/AppCard.js.map +1 -1
  87. package/react/components/appCatalog/components/AppList.js.map +1 -1
  88. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  89. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  90. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  91. package/react/components/appCatalog/components/Hero.js.map +1 -1
  92. package/react/components/appCatalog/components/Home.js.map +1 -1
  93. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  94. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  95. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  96. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  97. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  98. package/react/components/appCatalog/components/Showcase/ImageCarousel.js.map +1 -1
  99. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  100. package/react/components/appCatalog/components/Showcase/ReleaseNotes.js.map +1 -1
  101. package/react/components/appCatalog/components/Showcase/SupportNotes.js.map +1 -1
  102. package/react/components/appCatalog/components/Showcase/VersionNotes.js.map +1 -1
  103. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  104. package/react/components/appCatalog/components/Tag.js.map +1 -1
  105. package/react/components/appCatalog/components/Toast.js.map +1 -1
  106. package/react/components/appCatalog/components/helpers.js.map +1 -1
  107. package/react/components/appCatalog/index.js.map +1 -1
  108. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  109. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  110. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  111. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  112. package/react/components/common/Accordion.d.ts +11 -0
  113. package/react/components/common/Accordion.js +20 -0
  114. package/react/components/common/Accordion.js.map +1 -0
  115. package/react/components/common/Button.js.map +1 -1
  116. package/react/components/common/ButtonIcon.js.map +1 -1
  117. package/react/components/common/ButtonRow.js.map +1 -1
  118. package/react/components/common/ButtonTile.js.map +1 -1
  119. package/react/components/common/Checkbox.d.ts +1 -0
  120. package/react/components/common/Checkbox.js +3 -1
  121. package/react/components/common/Checkbox.js.map +1 -1
  122. package/react/components/common/ColorPicker.js.map +1 -1
  123. package/react/components/common/DropZone.js.map +1 -1
  124. package/react/components/common/DropdownButton.js.map +1 -1
  125. package/react/components/common/FileInput.d.ts +2 -1
  126. package/react/components/common/FileInput.js +9 -4
  127. package/react/components/common/FileInput.js.map +1 -1
  128. package/react/components/common/FinsembleIcon.d.ts +1 -1
  129. package/react/components/common/FinsembleIcon.js +16 -0
  130. package/react/components/common/FinsembleIcon.js.map +1 -1
  131. package/react/components/common/FinsembleSelect.js.map +1 -1
  132. package/react/components/common/FinsembleToggle.js.map +1 -1
  133. package/react/components/common/Header.js +1 -1
  134. package/react/components/common/Header.js.map +1 -1
  135. package/react/components/common/ImagePreview.js.map +1 -1
  136. package/react/components/common/InputTable.d.ts +11 -0
  137. package/react/components/common/InputTable.js +50 -0
  138. package/react/components/common/InputTable.js.map +1 -0
  139. package/react/components/common/LoadingSpinner.js.map +1 -1
  140. package/react/components/common/Tab.js.map +1 -1
  141. package/react/components/common/Tooltip.js.map +1 -1
  142. package/react/components/common/css/accordion.css +99 -0
  143. package/react/components/common/css/application-edit-page.css +324 -117
  144. package/react/components/common/css/application-list.css +49 -47
  145. package/react/components/common/css/button.css +166 -164
  146. package/react/components/common/css/checkbox.css +30 -0
  147. package/react/components/common/css/color-picker.css +52 -52
  148. package/react/components/common/css/drop-zone.css +17 -17
  149. package/react/components/common/css/file-input.css +65 -49
  150. package/react/components/common/css/header.css +30 -43
  151. package/react/components/common/css/icon.css +13 -13
  152. package/react/components/common/css/image-preview.css +57 -57
  153. package/react/components/common/css/loading-spinner.css +39 -39
  154. package/react/components/common/css/selector.css +51 -51
  155. package/react/components/common/css/styles.css +127 -128
  156. package/react/components/common/css/tab.css +56 -56
  157. package/react/components/common/css/toggle.css +32 -32
  158. package/react/components/common/css/tooltip.css +78 -78
  159. package/react/components/common/file_helpers.js.map +1 -1
  160. package/react/components/common/fixtures/FinsembleIcon.css +4 -4
  161. package/react/components/common/helpers.js.map +1 -1
  162. package/react/components/common/stories/Accordion.stories.d.ts +14 -0
  163. package/react/components/common/stories/Accordion.stories.js +42 -0
  164. package/react/components/common/stories/Accordion.stories.js.map +1 -0
  165. package/react/components/common/stories/Button.stories.js.map +1 -1
  166. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  167. package/react/components/common/stories/ButtonRow.stories.js.map +1 -1
  168. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  169. package/react/components/common/stories/Checkbox.stories.js.map +1 -1
  170. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  171. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  172. package/react/components/common/stories/DropdownButton.stories.d.ts +11 -0
  173. package/react/components/common/stories/DropdownButton.stories.js +12 -0
  174. package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
  175. package/react/components/common/stories/FileInput.stories.d.ts +2 -1
  176. package/react/components/common/stories/FileInput.stories.js +6 -0
  177. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  178. package/react/components/common/stories/FinsembleIcon.stories.js +1 -0
  179. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  180. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  181. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  182. package/react/components/common/stories/Header.stories.js.map +1 -1
  183. package/react/components/common/stories/ImagePreview.stories.js.map +1 -1
  184. package/react/components/common/stories/InputTable.stories.d.ts +12 -0
  185. package/react/components/common/stories/InputTable.stories.js +35 -0
  186. package/react/components/common/stories/InputTable.stories.js.map +1 -0
  187. package/react/components/common/stories/LoadingSpinner.stories.js.map +1 -1
  188. package/react/components/common/stories/Tab.stories.js.map +1 -1
  189. package/react/components/common/stories/Tooltip.stories.js.map +1 -1
  190. package/react/components/{smartDesktopDesigner/tests/ApplicationEdit.spec.d.ts → common/tests/Accordion.spec.d.ts} +0 -0
  191. package/react/components/common/tests/Accordion.spec.js +53 -0
  192. package/react/components/common/tests/Accordion.spec.js.map +1 -0
  193. package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
  194. package/react/components/common/tests/Checkbox.spec.js +5 -3
  195. package/react/components/common/tests/Checkbox.spec.js.map +1 -1
  196. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  197. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  198. package/react/components/common/tests/FileInput.spec.js +20 -5
  199. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  200. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  201. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  202. package/react/components/common/tests/Header.spec.js +6 -2
  203. package/react/components/common/tests/Header.spec.js.map +1 -1
  204. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  205. package/react/components/{smartDesktopDesigner/tests/ApplicationSetup.spec.d.ts → common/tests/InputTable.spec.d.ts} +0 -0
  206. package/react/components/common/tests/InputTable.spec.js +166 -0
  207. package/react/components/common/tests/InputTable.spec.js.map +1 -0
  208. package/react/components/common/tests/Tab.spec.js.map +1 -1
  209. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  210. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  211. package/react/components/favorites/FavoritesShell.js.map +1 -1
  212. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  213. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  214. package/react/components/favorites/index.js.map +1 -1
  215. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  216. package/react/components/fdc3Resolver/ResolverDialog.css +126 -126
  217. package/react/components/fdc3Resolver/ResolverDialog.js +1 -1
  218. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  219. package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
  220. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  221. package/react/components/fdc3Resolver/ResolverDialog.stories.js +13 -0
  222. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  223. package/react/components/icon/Icon.js.map +1 -1
  224. package/react/components/icon/index.js.map +1 -1
  225. package/react/components/legacyControls/FinsembleDialog.js.map +1 -1
  226. package/react/components/legacyControls/FinsembleDialogButton.js +1 -1
  227. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  228. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  229. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  230. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  231. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  232. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  233. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  234. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  235. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  236. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  237. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  238. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  239. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  240. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  241. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  242. package/react/components/linker/LinkerMenu.js.map +1 -1
  243. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  244. package/react/components/linker/index.js.map +1 -1
  245. package/react/components/linker/remoteRedux.js.map +1 -1
  246. package/react/components/menu/Menu.d.ts +1 -0
  247. package/react/components/menu/Menu.js.map +1 -1
  248. package/react/components/menu/MenuAutoResizer.d.ts +2 -1
  249. package/react/components/menu/MenuAutoResizer.js +4 -3
  250. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  251. package/react/components/menu/MenuContent.js.map +1 -1
  252. package/react/components/menu/MenuHotKey.js.map +1 -1
  253. package/react/components/menu/MenuItem.js.map +1 -1
  254. package/react/components/menu/MenuPortal.js +99 -92
  255. package/react/components/menu/MenuPortal.js.map +1 -1
  256. package/react/components/menu/MenuShell.d.ts +1 -0
  257. package/react/components/menu/MenuShell.js +3 -2
  258. package/react/components/menu/MenuShell.js.map +1 -1
  259. package/react/components/menu/MenuToggle.js.map +1 -1
  260. package/react/components/menu/index.js.map +1 -1
  261. package/react/components/menu/keyboardNavigation.js.map +1 -1
  262. package/react/components/menu/menuContext.d.ts +1 -0
  263. package/react/components/menu/menuContext.js.map +1 -1
  264. package/react/components/menu/menuHelpers.d.ts +1 -1
  265. package/react/components/menu/menuHelpers.js +2 -2
  266. package/react/components/menu/menuHelpers.js.map +1 -1
  267. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  268. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  269. package/react/components/notifications/components/drawer/DrawerControls.js +30 -6
  270. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  271. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  272. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +2 -0
  273. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  274. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +20 -27
  275. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  276. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  277. package/react/components/notifications/components/shared/IconButton.js +5 -1
  278. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  279. package/react/components/notifications/components/shared/NotificationCardShell.js +1 -1
  280. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  281. package/react/components/notifications/components/shared/OverflowMenu.js +5 -1
  282. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  283. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  284. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyContentLogo.js.map +1 -1
  285. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  286. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  287. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderLogo.js.map +1 -1
  288. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  289. package/react/components/notifications/components/views/CardView.js.map +1 -1
  290. package/react/components/notifications/components/views/ListView.js +1 -1
  291. package/react/components/notifications/components/views/ListView.js.map +1 -1
  292. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  293. package/react/components/notifications/constants.js.map +1 -1
  294. package/react/components/notifications/icons/Card.js.map +1 -1
  295. package/react/components/notifications/icons/Chevron.js.map +1 -1
  296. package/react/components/notifications/icons/CloseIcon.js.map +1 -1
  297. package/react/components/notifications/icons/EnvelopeClose.js.map +1 -1
  298. package/react/components/notifications/icons/EnvelopeOpen.js.map +1 -1
  299. package/react/components/notifications/icons/SnoozeIcon.js.map +1 -1
  300. package/react/components/notifications/index.js.map +1 -1
  301. package/react/components/notifications/notificationsContext.js.map +1 -1
  302. package/react/components/notifications/types.js.map +1 -1
  303. package/react/components/notifications/utils.js.map +1 -1
  304. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  305. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
  306. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  307. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  308. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  309. package/react/components/processMonitor/constants.js.map +1 -1
  310. package/react/components/processMonitor/helpers.js.map +1 -1
  311. package/react/components/processMonitor/helpers.spec.js.map +1 -1
  312. package/react/components/processMonitor/index.js.map +1 -1
  313. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +1 -0
  314. package/react/components/processMonitor/stores/ProcessMonitorStore.js +51 -50
  315. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  316. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  317. package/react/components/quickComponentForm/index.js.map +1 -1
  318. package/react/components/quickComponentForm/quickComponent.css +3 -3
  319. package/react/components/search/Highlight.js.map +1 -1
  320. package/react/components/search/Highlight.spec.js.map +1 -1
  321. package/react/components/search/Highlight.stories.js.map +1 -1
  322. package/react/components/search/Search.js.map +1 -1
  323. package/react/components/search/SearchBestMatch.js.map +1 -1
  324. package/react/components/search/SearchInput.js.map +1 -1
  325. package/react/components/search/SearchProviderResults.js.map +1 -1
  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 +1 -1
  335. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  336. package/react/components/shared/NavigationButton.js.map +1 -1
  337. package/react/components/shared/Tag.js.map +1 -1
  338. package/react/components/shared/TagsMenu.js.map +1 -1
  339. package/react/components/shared/addProtocolToValidURL.js.map +1 -1
  340. package/react/components/shared/linkerUtil.js.map +1 -1
  341. package/react/components/shared/openQuitConfirmationDialog.js.map +1 -1
  342. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  343. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -1
  344. package/react/components/shared/validateURL.js.map +1 -1
  345. package/react/components/shared/validateURL.spec.js.map +1 -1
  346. package/react/components/singleInputDialog/SingleInputDialog.css +3 -3
  347. package/react/components/singleInputDialog/SingleInputDialog.js.map +1 -1
  348. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  349. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  350. package/react/components/singleInputDialog/index.js.map +1 -1
  351. package/react/components/smartDesktopDesigner/AddApp.d.ts +14 -0
  352. package/react/components/smartDesktopDesigner/AddApp.js +60 -0
  353. package/react/components/smartDesktopDesigner/AddApp.js.map +1 -0
  354. package/react/components/smartDesktopDesigner/AppEditAccess.js +16 -32
  355. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
  356. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +5 -19
  357. package/react/components/smartDesktopDesigner/AppEditPage.js +548 -59
  358. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  359. package/react/components/smartDesktopDesigner/Appearance.css +27 -94
  360. package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +1 -1
  361. package/react/components/smartDesktopDesigner/Appearance.js +1 -1
  362. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  363. package/react/components/smartDesktopDesigner/Application.d.ts +1 -0
  364. package/react/components/smartDesktopDesigner/Application.js +151 -93
  365. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  366. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +2 -1
  367. package/react/components/smartDesktopDesigner/ApplicationList.js +7 -3
  368. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  369. package/react/components/smartDesktopDesigner/Applications.d.ts +0 -3
  370. package/react/components/smartDesktopDesigner/Applications.js +52 -102
  371. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  372. package/react/components/smartDesktopDesigner/AssetsPage.css +26 -26
  373. package/react/components/smartDesktopDesigner/AssetsPage.js.map +1 -1
  374. package/react/components/smartDesktopDesigner/Authentication.js +2 -9
  375. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  376. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +8 -1
  377. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  378. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  379. package/react/components/smartDesktopDesigner/ContentHeader.d.ts +5 -0
  380. package/react/components/smartDesktopDesigner/ContentHeader.js +10 -0
  381. package/react/components/smartDesktopDesigner/ContentHeader.js.map +1 -0
  382. package/react/components/smartDesktopDesigner/CurrentView.js +2 -1
  383. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  384. package/react/components/smartDesktopDesigner/Export.d.ts +1 -0
  385. package/react/components/smartDesktopDesigner/Export.js +40 -9
  386. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  387. package/react/components/smartDesktopDesigner/ExportCloud.d.ts +3 -1
  388. package/react/components/smartDesktopDesigner/ExportCloud.js +4 -6
  389. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  390. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  391. package/react/components/smartDesktopDesigner/ExportZip.d.ts +3 -1
  392. package/react/components/smartDesktopDesigner/ExportZip.js +8 -3
  393. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  394. package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -0
  395. package/react/components/smartDesktopDesigner/GettingStarted.js +11 -25
  396. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  397. package/react/components/smartDesktopDesigner/Navigation.d.ts +2 -2
  398. package/react/components/smartDesktopDesigner/Navigation.js +17 -15
  399. package/react/components/smartDesktopDesigner/Navigation.js.map +1 -1
  400. package/react/components/smartDesktopDesigner/ProjectErrors.js.map +1 -1
  401. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  402. package/react/components/smartDesktopDesigner/PublishProgress.js.map +1 -1
  403. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +3 -3
  404. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -17
  405. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  406. package/react/components/smartDesktopDesigner/ThemePage.css +109 -110
  407. package/react/components/smartDesktopDesigner/ThemePage.js +0 -7
  408. package/react/components/smartDesktopDesigner/ThemePage.js.map +1 -1
  409. package/react/components/smartDesktopDesigner/Themes.js +0 -2
  410. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  411. package/react/components/smartDesktopDesigner/Toolbar.d.ts +15 -0
  412. package/react/components/smartDesktopDesigner/Toolbar.js +123 -0
  413. package/react/components/smartDesktopDesigner/Toolbar.js.map +1 -0
  414. package/react/components/smartDesktopDesigner/View.js +1 -1
  415. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  416. package/react/components/smartDesktopDesigner/common/fsbl_functions.d.ts +1 -1
  417. package/react/components/smartDesktopDesigner/common/fsbl_functions.js +2 -2
  418. package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +1 -1
  419. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  420. package/react/components/smartDesktopDesigner/common/views.d.ts +2 -36
  421. package/react/components/smartDesktopDesigner/common/views.js +150 -111
  422. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  423. package/react/components/smartDesktopDesigner/css/appearance.css +18 -10
  424. package/react/components/smartDesktopDesigner/css/applications.css +167 -127
  425. package/react/components/smartDesktopDesigner/css/authentication.css +119 -125
  426. package/react/components/smartDesktopDesigner/css/buttons.css +12 -12
  427. package/react/components/smartDesktopDesigner/css/export.css +176 -163
  428. package/react/components/smartDesktopDesigner/css/getting-started.css +28 -6
  429. package/react/components/smartDesktopDesigner/css/nav.css +120 -93
  430. package/react/components/smartDesktopDesigner/css/project-errors.css +15 -15
  431. package/react/components/smartDesktopDesigner/css/project-header.css +124 -121
  432. package/react/components/smartDesktopDesigner/css/styles.css +178 -179
  433. package/react/components/smartDesktopDesigner/css/views.css +23 -16
  434. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +2 -0
  435. package/react/components/smartDesktopDesigner/fixtures/apps.js +41 -6
  436. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  437. package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +1 -1
  438. package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +1 -1
  439. package/react/components/smartDesktopDesigner/fixtures/exportProps.js +3 -0
  440. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  441. package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +1 -1
  442. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  443. package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +1 -1
  444. package/react/components/smartDesktopDesigner/fixtures/views.d.ts +2 -2
  445. package/react/components/smartDesktopDesigner/fixtures/views.js +58 -26
  446. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  447. package/react/components/smartDesktopDesigner/sdd_helpers.d.ts +1 -1
  448. package/react/components/smartDesktopDesigner/sdd_helpers.js +4 -3
  449. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  450. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -1
  451. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +12 -33
  452. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  453. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  454. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +2 -1
  455. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +8 -1
  456. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
  457. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  458. package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +1 -1
  459. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  460. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.d.ts +10 -0
  461. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js +13 -0
  462. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +1 -0
  463. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  464. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.d.ts +1 -1
  465. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +1 -1
  466. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  467. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.d.ts +1 -1
  468. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +1 -1
  469. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  470. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  471. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  472. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  473. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  474. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  475. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +7 -1
  476. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  477. package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +1 -1
  478. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  479. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.d.ts +14 -0
  480. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js +38 -0
  481. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +1 -0
  482. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +73 -122
  483. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  484. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
  485. package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
  486. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +61 -560
  487. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  488. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  489. package/react/components/smartDesktopDesigner/tests/{ProjectHeader.spec.d.ts → ContentHeader.spec.d.ts} +0 -0
  490. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js +31 -0
  491. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +1 -0
  492. package/react/components/smartDesktopDesigner/tests/Export.spec.js +129 -0
  493. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  494. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +7 -0
  495. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  496. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  497. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +3 -14
  498. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  499. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  500. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  501. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +2 -31
  502. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  503. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  504. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.d.ts +1 -0
  505. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js +203 -0
  506. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +1 -0
  507. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  508. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.d.ts +1 -0
  509. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js +18 -0
  510. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +1 -0
  511. package/react/components/smartDesktopDesigner/themeDefinitions.js.map +1 -1
  512. package/react/components/system/System.js.map +1 -1
  513. package/react/components/system/System.spec.js.map +1 -1
  514. package/react/components/system/System.stories.js.map +1 -1
  515. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  516. package/react/components/system/index.js.map +1 -1
  517. package/react/components/toolbar/AutoArrange.js.map +1 -1
  518. package/react/components/toolbar/DragHandle.js.map +1 -1
  519. package/react/components/toolbar/MinimizeAll.js.map +1 -1
  520. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  521. package/react/components/toolbar/MinimizeAll.stories.js.map +1 -1
  522. package/react/components/toolbar/NotificationControl.js.map +1 -1
  523. package/react/components/toolbar/RevealAll.js.map +1 -1
  524. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  525. package/react/components/toolbar/RevealAll.stories.js.map +1 -1
  526. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  527. package/react/components/toolbar/ToolbarSection.js.map +1 -1
  528. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  529. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  530. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  531. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  532. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  533. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  534. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  535. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  536. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  537. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  538. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +47 -45
  539. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  540. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  541. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  542. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  543. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  544. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  545. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  546. package/react/components/toolbar/advancedAppLauncher/components/ToggleFavoriteDropdown.js.map +1 -1
  547. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  548. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  549. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  550. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  551. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  552. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  553. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  554. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +1 -0
  555. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  556. package/react/components/toolbar/appLauncher/appLauncher.css +30 -30
  557. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  558. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +1 -0
  559. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +17 -34
  560. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  561. package/react/components/toolbar/dashbar/Dashbar.js +3 -1
  562. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  563. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  564. package/react/components/toolbar/index.js.map +1 -1
  565. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +1 -1
  566. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  567. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
  568. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  569. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  570. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
  571. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  572. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +1 -1
  573. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  574. package/react/components/toolbar/workspaceManagementMenu/workspaceManagementMenu.css +90 -90
  575. package/react/components/userPreferences/NotificationsPreferencesContext.js.map +1 -1
  576. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
  577. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  578. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  579. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -1
  580. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  581. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  582. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  583. package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -1
  584. package/react/components/userPreferences/components/content/General.js.map +1 -1
  585. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  586. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  587. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  588. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  589. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  590. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  591. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  592. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
  593. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -1
  594. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
  595. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -1
  596. package/react/components/userPreferences/index.js.map +1 -1
  597. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  598. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  599. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -1
  600. package/react/components/userPreferences/stories/General.stories.js.map +1 -1
  601. package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -1
  602. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -1
  603. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -1
  604. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -1
  605. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -1
  606. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -1
  607. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -1
  608. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -1
  609. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -1
  610. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -1
  611. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -1
  612. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -1
  613. package/react/components/userPreferences/tests/General.spec.js.map +1 -1
  614. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -1
  615. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -1
  616. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -1
  617. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
  618. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -1
  619. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +1 -1
  620. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
  621. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -1
  622. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -1
  623. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -1
  624. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -1
  625. package/react/components/utils.js.map +1 -1
  626. package/react/components/windowTitleBar/WindowTitleBarShell.js +8 -1
  627. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  628. package/react/components/windowTitleBar/components/center/Tab.d.ts +0 -1
  629. package/react/components/windowTitleBar/components/center/Tab.js +2 -2
  630. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  631. package/react/components/windowTitleBar/components/center/TabList.d.ts +0 -1
  632. package/react/components/windowTitleBar/components/center/TabList.js +16 -79
  633. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  634. package/react/components/windowTitleBar/components/center/TabRegion.js.map +1 -1
  635. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  636. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.js.map +1 -1
  637. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  638. package/react/components/windowTitleBar/components/left/LinkerGroupsDeprecated.js.map +1 -1
  639. package/react/components/windowTitleBar/components/left/ShareButton.js.map +1 -1
  640. package/react/components/windowTitleBar/components/right/AlwaysOnTopButton.js.map +1 -1
  641. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  642. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  643. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +7 -0
  644. package/react/components/windowTitleBar/components/right/MaximizeButton.js +11 -1
  645. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  646. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  647. package/react/components/windowTitleBar/components/windowTitle.d.ts +5 -4
  648. package/react/components/windowTitleBar/components/windowTitle.js +102 -39
  649. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  650. package/react/components/windowTitleBar/index.js.map +1 -1
  651. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +5 -1
  652. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  653. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  654. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  655. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  656. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  657. package/react/components/yesNoDialog/YesNoDialog.css +3 -3
  658. package/react/components/yesNoDialog/YesNoDialog.js.map +1 -1
  659. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  660. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  661. package/react/components/yesNoDialog/index.js.map +1 -1
  662. package/react/components/yesNoDialog/timer.js.map +1 -1
  663. package/react/enzymeSetup.js +1 -1
  664. package/react/enzymeSetup.js.map +1 -1
  665. package/react/hooks/index.js.map +1 -1
  666. package/react/hooks/useAuth.js.map +1 -1
  667. package/react/hooks/useDashbar.d.ts +8 -0
  668. package/react/hooks/useDashbar.js +104 -0
  669. package/react/hooks/useDashbar.js.map +1 -0
  670. package/react/hooks/useDeepEffect.js.map +1 -1
  671. package/react/hooks/useFavorites.js.map +1 -1
  672. package/react/hooks/useFavoritesShell.js.map +1 -1
  673. package/react/hooks/useHotkey.js.map +1 -1
  674. package/react/hooks/useLinker.js.map +1 -1
  675. package/react/hooks/useMenu.js.map +1 -1
  676. package/react/hooks/useNotifications.js.map +1 -1
  677. package/react/hooks/useOutsideClickDetector.js.map +1 -1
  678. package/react/hooks/usePubSub.js.map +1 -1
  679. package/react/hooks/useSearch.js.map +1 -1
  680. package/react/hooks/useToolbar.d.ts +0 -6
  681. package/react/hooks/useToolbar.js +0 -101
  682. package/react/hooks/useToolbar.js.map +1 -1
  683. package/react/hooks/useWorkspace.js.map +1 -1
  684. package/react/reducers/favoriteReducer.js.map +1 -1
  685. package/react/reducers/linkerReducer.js.map +1 -1
  686. package/react/reducers/menuReducer.js.map +1 -1
  687. package/react/reducers/rootReducer.d.ts +0 -4
  688. package/react/reducers/rootReducer.js.map +1 -1
  689. package/react/reducers/searchReducer.js.map +1 -1
  690. package/react/reducers/smartDesktopDesignerReducer.js +0 -3
  691. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  692. package/react/reducers/toolbarReducer.js.map +1 -1
  693. package/react/reducers/workspaceReducer.js.map +1 -1
  694. package/react/store.d.ts +0 -8
  695. package/react/store.js.map +1 -1
  696. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  697. package/react/types/dashbarTypes.js.map +1 -1
  698. package/react/types/favoriteTypes.js.map +1 -1
  699. package/react/types/fdc3.d.ts +7 -35
  700. package/react/types/fdc3.js.map +1 -1
  701. package/react/types/hotkeyTypes.js.map +1 -1
  702. package/react/types/iconTypes.js.map +1 -1
  703. package/react/types/linkerTypes.js.map +1 -1
  704. package/react/types/searchTypes.js.map +1 -1
  705. package/react/types/smartDesktopDesignerTypes.d.ts +45 -5
  706. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  707. package/react/types/windowTitleBar.d.ts +3 -2
  708. package/react/types/windowTitleBar.js.map +1 -1
  709. package/react/types/workspaceTypes.js.map +1 -1
  710. package/react/components/common/FontSizeSelector.d.ts +0 -7
  711. package/react/components/common/FontSizeSelector.js +0 -42
  712. package/react/components/common/FontSizeSelector.js.map +0 -1
  713. package/react/components/common/stories/FontSizeSelector.stories.d.ts +0 -12
  714. package/react/components/common/stories/FontSizeSelector.stories.js +0 -24
  715. package/react/components/common/stories/FontSizeSelector.stories.js.map +0 -1
  716. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +0 -25
  717. package/react/components/smartDesktopDesigner/ApplicationEdit.js +0 -103
  718. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +0 -1
  719. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +0 -23
  720. package/react/components/smartDesktopDesigner/ApplicationSetup.js +0 -73
  721. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +0 -1
  722. package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +0 -14
  723. package/react/components/smartDesktopDesigner/ProjectHeader.js +0 -70
  724. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +0 -1
  725. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.d.ts +0 -4
  726. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +0 -45
  727. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +0 -1
  728. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.d.ts +0 -3
  729. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +0 -29
  730. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +0 -1
  731. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.d.ts +0 -12
  732. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +0 -21
  733. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +0 -1
  734. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.d.ts +0 -12
  735. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +0 -28
  736. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +0 -1
  737. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +0 -10
  738. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +0 -19
  739. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +0 -1
  740. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +0 -66
  741. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +0 -1
  742. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +0 -41
  743. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +0 -1
  744. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +0 -27
  745. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleToggle.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/FinsembleToggle.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAGrF,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAEjC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IACnC,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,oBAAM,SAAS,CAAC,IAA6B,EAAI,CAAC,CAAC;QAEnF,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yEAAyE,EAAE,KAAK,IAAI,EAAE;;QACxF,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,oBAAM,SAAS,CAAC,IAA6B,EAAI,CAAC,CAAC;QAEnF,MAAM,QAAQ,CAAC,EAAE,CAAC,CAAC;QAEnB,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,MAAA,OAAO,CAAC,IAAI,0CAAE,OAAO,EAAE,CAAC,CAAC;QAErD,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACjF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { mount } from \"enzyme\";\r\nimport { describe, it } from \"mocha\";\r\nimport { expect } from \"chai\";\r\nimport sinon from \"sinon\";\r\nimport { FinsembleToggleProps } from \"../FinsembleToggle\";\r\nimport { Checked, Unchecked } from \"../stories/FinsembleToggle.stories\";\r\nimport { accessibilityAssessor } from \"../../smartDesktopDesigner/tests/a11y_helper\";\r\n\r\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\r\nimport addons, { mockChannel } from \"@storybook/addons\";\r\nimport { waitTime } from \"../../smartDesktopDesigner/sdd_helpers\";\r\naddons.setChannel(mockChannel());\r\n\r\ndescribe(\"<FinsembleToggle/>\", () => {\r\n\tafterEach(() => {\r\n\t\tsinon.restore();\r\n\t});\r\n\r\n\tit(\"should pass accessibility scans\", async () => {\r\n\t\tconst wrapper = mount(<Unchecked {...(Unchecked.args as FinsembleToggleProps)} />);\r\n\r\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\r\n\t});\r\n\r\n\tit(\"should be checked items if checked prop is updated after initial render\", async () => {\r\n\t\tconst wrapper = mount(<Unchecked {...(Unchecked.args as FinsembleToggleProps)} />);\r\n\r\n\t\tawait waitTime(10);\r\n\r\n\t\twrapper.setProps({ checked: Checked.args?.checked });\r\n\r\n\t\twrapper.update();\r\n\r\n\t\texpect(wrapper.find(\"input[type='checkbox']\").at(0).prop(\"checked\")).to.be.true;\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"FinsembleToggle.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/FinsembleToggle.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAGrF,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAEjC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IACnC,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,oBAAM,SAAS,CAAC,IAA6B,EAAI,CAAC,CAAC;QAEnF,MAAM,CAAC,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yEAAyE,EAAE,KAAK,IAAI,EAAE;;QACxF,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,oBAAM,SAAS,CAAC,IAA6B,EAAI,CAAC,CAAC;QAEnF,MAAM,QAAQ,CAAC,EAAE,CAAC,CAAC;QAEnB,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,MAAA,OAAO,CAAC,IAAI,0CAAE,OAAO,EAAE,CAAC,CAAC;QAErD,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACjF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { FinsembleToggleProps } from \"../FinsembleToggle\";\nimport { Checked, Unchecked } from \"../stories/FinsembleToggle.stories\";\nimport { accessibilityAssessor } from \"../../smartDesktopDesigner/tests/a11y_helper\";\n\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\nimport { waitTime } from \"../../smartDesktopDesigner/sdd_helpers\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<FinsembleToggle/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<Unchecked {...(Unchecked.args as FinsembleToggleProps)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\n\tit(\"should be checked items if checked prop is updated after initial render\", async () => {\n\t\tconst wrapper = mount(<Unchecked {...(Unchecked.args as FinsembleToggleProps)} />);\n\n\t\tawait waitTime(10);\n\n\t\twrapper.setProps({ checked: Checked.args?.checked });\n\n\t\twrapper.update();\n\n\t\texpect(wrapper.find(\"input[type='checkbox']\").at(0).prop(\"checked\")).to.be.true;\n\t});\n});\n"]}
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { mount } from "enzyme";
3
3
  import { describe, it } from "mocha";
4
4
  import { expect } from "chai";
5
- import { BasicHeader, HeaderWithBackButton } from "../stories/Header.stories";
5
+ import { BasicHeader, HeaderWithBackButton, HeaderWithHelp } from "../stories/Header.stories";
6
6
  describe("<Header/>", () => {
7
7
  it("should display text", () => {
8
8
  const wrapper = mount(React.createElement(BasicHeader, Object.assign({}, BasicHeader.args)));
@@ -12,7 +12,11 @@ describe("<Header/>", () => {
12
12
  const wrapper = mount(React.createElement(HeaderWithBackButton, Object.assign({}, HeaderWithBackButton.args)));
13
13
  expect(wrapper.find("button").text()).to.contain("Back");
14
14
  });
15
- it("should not contain a button when no back function is provided", () => {
15
+ it("should contain a button when a help function is provided", () => {
16
+ const wrapper = mount(React.createElement(HeaderWithHelp, Object.assign({}, HeaderWithHelp.args)));
17
+ expect(wrapper.find("button")).to.have.lengthOf(1);
18
+ });
19
+ it("should not contain a button when no back or help function is provided", () => {
16
20
  const wrapper = mount(React.createElement(BasicHeader, Object.assign({}, BasicHeader.args)));
17
21
  expect(wrapper.find("button")).to.have.lengthOf(0);
18
22
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Header.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/Header.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,WAAW,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAG9E,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,WAAW,oBAAM,WAAW,CAAC,IAAoB,EAAI,CAAC,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACnF,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,oBAAoB,oBAAM,oBAAoB,CAAC,IAAoB,EAAI,CAAC,CAAC;QAChG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACxE,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,WAAW,oBAAM,WAAW,CAAC,IAAoB,EAAI,CAAC,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpD,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 { BasicHeader, HeaderWithBackButton } from \"../stories/Header.stories\";\r\nimport { HeaderProps } from \"../Header\";\r\n\r\ndescribe(\"<Header/>\", () => {\r\n\tit(\"should display text\", () => {\r\n\t\tconst wrapper = mount(<BasicHeader {...(BasicHeader.args as HeaderProps)} />);\r\n\t\texpect(wrapper.find(\".view-title\").first().text()).to.contain(\"This is a Header\");\r\n\t});\r\n\tit(\"should contain a button when a back function is provided\", () => {\r\n\t\tconst wrapper = mount(<HeaderWithBackButton {...(HeaderWithBackButton.args as HeaderProps)} />);\r\n\t\texpect(wrapper.find(\"button\").text()).to.contain(\"Back\");\r\n\t});\r\n\tit(\"should not contain a button when no back function is provided\", () => {\r\n\t\tconst wrapper = mount(<BasicHeader {...(BasicHeader.args as HeaderProps)} />);\r\n\t\texpect(wrapper.find(\"button\")).to.have.lengthOf(0);\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"Header.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/Header.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,WAAW,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG9F,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC9B,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,WAAW,oBAAM,WAAW,CAAC,IAAoB,EAAI,CAAC,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACnF,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,oBAAoB,oBAAM,oBAAoB,CAAC,IAAoB,EAAI,CAAC,CAAC;QAChG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,cAAc,oBAAM,cAAc,CAAC,IAAoB,EAAI,CAAC,CAAC;QACpF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE;QAChF,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,WAAW,oBAAM,WAAW,CAAC,IAAoB,EAAI,CAAC,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpD,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 { BasicHeader, HeaderWithBackButton, HeaderWithHelp } from \"../stories/Header.stories\";\nimport { HeaderProps } from \"../Header\";\n\ndescribe(\"<Header/>\", () => {\n\tit(\"should display text\", () => {\n\t\tconst wrapper = mount(<BasicHeader {...(BasicHeader.args as HeaderProps)} />);\n\t\texpect(wrapper.find(\".view-title\").first().text()).to.contain(\"This is a Header\");\n\t});\n\tit(\"should contain a button when a back function is provided\", () => {\n\t\tconst wrapper = mount(<HeaderWithBackButton {...(HeaderWithBackButton.args as HeaderProps)} />);\n\t\texpect(wrapper.find(\"button\").text()).to.contain(\"Back\");\n\t});\n\tit(\"should contain a button when a help function is provided\", () => {\n\t\tconst wrapper = mount(<HeaderWithHelp {...(HeaderWithHelp.args as HeaderProps)} />);\n\t\texpect(wrapper.find(\"button\")).to.have.lengthOf(1);\n\t});\n\tit(\"should not contain a button when no back or help function is provided\", () => {\n\t\tconst wrapper = mount(<BasicHeader {...(BasicHeader.args as HeaderProps)} />);\n\t\texpect(wrapper.find(\"button\")).to.have.lengthOf(0);\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ImagePreview.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/ImagePreview.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,EACN,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,GACnB,MAAM,iCAAiC,CAAC;AAGzC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC/D,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,eAAe,oBAAM,eAAe,CAAC,IAA0B,EAAI,CAAC,CAAC;QAC5F,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAC1C,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAA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GAAG,CAAC,CAAC,CAAC;IAC/C,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 {\r\n\tSmallEmptyField,\r\n\tSmallPreFilledField,\r\n\tSmallPreFilledFieldFullURL,\r\n\tLargeEmptyField,\r\n\tLargePreFilledField,\r\n} from \"../stories/ImagePreview.stories\";\r\nimport { ImagePreviewProps } from \"../ImagePreview\";\r\n\r\ndescribe(\"<ImagePreview/>\", () => {\r\n\tit(\"should display no preview image in its default state\", () => {\r\n\t\tconst wrapper = mount(<SmallEmptyField {...(SmallEmptyField.args as ImagePreviewProps)} />);\r\n\t\texpect(wrapper.exists(\"img\")).to.be.false;\r\n\t\texpect(wrapper.exists(\".empty-preview\")).to.be.true;\r\n\t});\r\n\r\n\tit(\"should display a preview image when a path is provided\", () => {\r\n\t\tconst wrapper = mount(<SmallPreFilledField {...(SmallPreFilledField.args as ImagePreviewProps)} />);\r\n\t\texpect(wrapper.exists(\"img\")).to.be.true;\r\n\t\texpect(wrapper.exists(\".empty-preview\")).to.be.false;\r\n\t});\r\n\r\n\tit(\"should display with a small preview container\", () => {\r\n\t\tconst wrapper = mount(<SmallEmptyField {...(SmallEmptyField.args as ImagePreviewProps)} />);\r\n\t\texpect(wrapper.find(\".image-preview-container\").hasClass(\"image-preview-size-small\")).to.be.true;\r\n\t});\r\n\r\n\tit(\"should display with a large preview container\", () => {\r\n\t\tconst wrapper = mount(<LargeEmptyField {...(LargeEmptyField.args as ImagePreviewProps)} />);\r\n\t\texpect(wrapper.find(\".image-preview-container\").hasClass(\"image-preview-size-large\")).to.be.true;\r\n\t});\r\n\r\n\tit(\"should display a preview image when given a partial path\", () => {\r\n\t\tconst wrapper = mount(<SmallPreFilledField {...(SmallPreFilledField.args as ImagePreviewProps)} />);\r\n\t\texpect(wrapper.find(\"img\").prop(\"src\")).to.have.string(\r\n\t\t\t\"https://cosaic.io/wp-content/uploads/2020/07//cosiac-blog.png\"\r\n\t\t);\r\n\t});\r\n\r\n\tit(\"should display a preview image when given a full path\", () => {\r\n\t\tconst wrapper = mount(<SmallPreFilledFieldFullURL {...(SmallPreFilledFieldFullURL.args as ImagePreviewProps)} />);\r\n\t\texpect(wrapper.find(\"img\").prop(\"src\")).to.have.string(\r\n\t\t\t\"https://cosaic.io/wp-content/uploads/2020/07//cosiac-blog.png\"\r\n\t\t);\r\n\t});\r\n\r\n\tit(\"globally increment the cache index for every valid image\", () => {\r\n\t\tconst wrapper1 = mount(<LargePreFilledField {...(LargePreFilledField.args as ImagePreviewProps)} />);\r\n\t\tconst wrapper2 = mount(<LargePreFilledField {...(LargePreFilledField.args as ImagePreviewProps)} />);\r\n\r\n\t\tconst imgSrc1 = wrapper1.find(\"img\").prop(\"src\");\r\n\t\tconst imgSrc2 = wrapper2.find(\"img\").prop(\"src\");\r\n\r\n\t\tif (!imgSrc1 || !imgSrc2) {\r\n\t\t\tthrow new Error(\"Image source not found!\");\r\n\t\t}\r\n\r\n\t\tconst cacheIndex1 = parseInt(imgSrc1.split(\"?\")[1]);\r\n\t\tconst cacheIndex2 = parseInt(imgSrc2.split(\"?\")[1]);\r\n\r\n\t\texpect(cacheIndex2).to.equal(cacheIndex1 + 1);\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"ImagePreview.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/ImagePreview.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,EACN,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,GACnB,MAAM,i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I,CAAC,KAAK,CAAC,CAAC;QAEjD,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE;YACzB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC3C;QAED,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAEpD,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;IAC/C,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 {\n\tSmallEmptyField,\n\tSmallPreFilledField,\n\tSmallPreFilledFieldFullURL,\n\tLargeEmptyField,\n\tLargePreFilledField,\n} from \"../stories/ImagePreview.stories\";\nimport { ImagePreviewProps } from \"../ImagePreview\";\n\ndescribe(\"<ImagePreview/>\", () => {\n\tit(\"should display no preview image in its default state\", () => {\n\t\tconst wrapper = mount(<SmallEmptyField {...(SmallEmptyField.args as ImagePreviewProps)} />);\n\t\texpect(wrapper.exists(\"img\")).to.be.false;\n\t\texpect(wrapper.exists(\".empty-preview\")).to.be.true;\n\t});\n\n\tit(\"should display a preview image when a path is provided\", () => {\n\t\tconst wrapper = mount(<SmallPreFilledField {...(SmallPreFilledField.args as ImagePreviewProps)} />);\n\t\texpect(wrapper.exists(\"img\")).to.be.true;\n\t\texpect(wrapper.exists(\".empty-preview\")).to.be.false;\n\t});\n\n\tit(\"should display with a small preview container\", () => {\n\t\tconst wrapper = mount(<SmallEmptyField {...(SmallEmptyField.args as ImagePreviewProps)} />);\n\t\texpect(wrapper.find(\".image-preview-container\").hasClass(\"image-preview-size-small\")).to.be.true;\n\t});\n\n\tit(\"should display with a large preview container\", () => {\n\t\tconst wrapper = mount(<LargeEmptyField {...(LargeEmptyField.args as ImagePreviewProps)} />);\n\t\texpect(wrapper.find(\".image-preview-container\").hasClass(\"image-preview-size-large\")).to.be.true;\n\t});\n\n\tit(\"should display a preview image when given a partial path\", () => {\n\t\tconst wrapper = mount(<SmallPreFilledField {...(SmallPreFilledField.args as ImagePreviewProps)} />);\n\t\texpect(wrapper.find(\"img\").prop(\"src\")).to.have.string(\n\t\t\t\"https://cosaic.io/wp-content/uploads/2020/07//cosiac-blog.png\"\n\t\t);\n\t});\n\n\tit(\"should display a preview image when given a full path\", () => {\n\t\tconst wrapper = mount(<SmallPreFilledFieldFullURL {...(SmallPreFilledFieldFullURL.args as ImagePreviewProps)} />);\n\t\texpect(wrapper.find(\"img\").prop(\"src\")).to.have.string(\n\t\t\t\"https://cosaic.io/wp-content/uploads/2020/07//cosiac-blog.png\"\n\t\t);\n\t});\n\n\tit(\"globally increment the cache index for every valid image\", () => {\n\t\tconst wrapper1 = mount(<LargePreFilledField {...(LargePreFilledField.args as ImagePreviewProps)} />);\n\t\tconst wrapper2 = mount(<LargePreFilledField {...(LargePreFilledField.args as ImagePreviewProps)} />);\n\n\t\tconst imgSrc1 = wrapper1.find(\"img\").prop(\"src\");\n\t\tconst imgSrc2 = wrapper2.find(\"img\").prop(\"src\");\n\n\t\tif (!imgSrc1 || !imgSrc2) {\n\t\t\tthrow new Error(\"Image source not found!\");\n\t\t}\n\n\t\tconst cacheIndex1 = parseInt(imgSrc1.split(\"?\")[1]);\n\t\tconst cacheIndex2 = parseInt(imgSrc2.split(\"?\")[1]);\n\n\t\texpect(cacheIndex2).to.equal(cacheIndex1 + 1);\n\t});\n});\n"]}
@@ -0,0 +1,166 @@
1
+ import * as React from "react";
2
+ import { mount } from "enzyme";
3
+ import { describe, it } from "mocha";
4
+ import { expect } from "chai";
5
+ import sinon from "sinon";
6
+ import { Basic, StartingData } from "../stories/InputTable.stories";
7
+ describe("<InputTable/>", () => {
8
+ afterEach(() => {
9
+ sinon.restore();
10
+ });
11
+ it("string table headers display correctly", () => {
12
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
13
+ expect(wrapper.find("th").at(0).text(), "First header").to.equal("Letter");
14
+ expect(wrapper.find("th").at(1).text(), "Second header").to.equal("Number");
15
+ });
16
+ it("JSX table headers display correctly", () => {
17
+ const wrapper = mount(React.createElement(Basic, Object.assign({}, Basic.args)));
18
+ expect(wrapper.find("th").at(0).text()).to.include("Contexts");
19
+ expect(wrapper.find("th .tooltip-content").exists()).to.be.true;
20
+ });
21
+ it("providing 2 column headers creates a table with 2 columns of input fields", () => {
22
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
23
+ expect(wrapper.find("tr").at(1).find("td input").length).to.equal(2);
24
+ });
25
+ it("providing 3 column headers creates a table with 3 columns", () => {
26
+ const wrapper = mount(React.createElement(Basic, Object.assign({}, Basic.args)));
27
+ expect(wrapper.find("tr").at(1).find("td").length).to.equal(3);
28
+ });
29
+ it("when a component has startingData, that data is displayed, plus an extra row", () => {
30
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
31
+ expect(wrapper.find("tr").length).to.equal(4);
32
+ expect(wrapper.find("tr").at(1).find("td input").at(0).props().value).to.equal("A");
33
+ expect(wrapper.find("tr").at(1).find("td input").at(1).props().value).to.equal("1");
34
+ expect(wrapper.find("tr").at(2).find("td input").at(0).props().value).to.equal("B");
35
+ expect(wrapper.find("tr").at(2).find("td input").at(1).props().value).to.equal("2");
36
+ expect(wrapper.find("tr").at(3).find("td input").at(0).props().value).to.equal("");
37
+ expect(wrapper.find("tr").at(3).find("td input").at(1).props().value).to.equal("");
38
+ });
39
+ it("when a component has no startingData, the table shows only 1 empty row", () => {
40
+ const wrapper = mount(React.createElement(Basic, Object.assign({}, Basic.args)));
41
+ expect(wrapper.find("tr").length).to.equal(2);
42
+ expect(wrapper.find("tr").at(1).find("td input").at(0).props().value).to.equal("");
43
+ expect(wrapper.find("tr").at(1).find("td input").at(1).props().value).to.equal("");
44
+ });
45
+ it("show no X on the last row of a single-row table", () => {
46
+ const wrapper = mount(React.createElement(Basic, Object.assign({}, Basic.args)));
47
+ expect(wrapper.find("tr").length).to.equal(2);
48
+ expect(wrapper.find("tr").at(1).find("td button").exists()).to.be.false;
49
+ });
50
+ it("show X's on all but the last row of a multi-row table", () => {
51
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
52
+ expect(wrapper.find("tr").length).to.equal(4);
53
+ expect(wrapper.find("tr").at(1).find("td button").exists()).to.be.true;
54
+ expect(wrapper.find("tr").at(2).find("td button").exists()).to.be.true;
55
+ expect(wrapper.find("tr").at(3).find("td button").exists()).to.be.false;
56
+ });
57
+ it("Typing in the last row causes a new row to be created", () => {
58
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
59
+ expect(wrapper.find("tr").length).to.equal(4);
60
+ expect(wrapper.find("input").length).to.equal(6);
61
+ wrapper
62
+ .find("tr")
63
+ .at(3)
64
+ .find("input")
65
+ .at(0)
66
+ .simulate("change", {
67
+ target: {
68
+ value: "New text",
69
+ },
70
+ });
71
+ expect(wrapper.find("tr").length).to.equal(5);
72
+ expect(wrapper.find("input").length).to.equal(8);
73
+ });
74
+ it("Clicking X on the first row deletes it", () => {
75
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
76
+ expect(wrapper.find("tr").length).to.equal(4);
77
+ expect(wrapper.find("input").at(0).props().value).to.equal("A");
78
+ expect(wrapper.find("input").at(2).props().value).to.equal("B");
79
+ wrapper.find("button").at(0).simulate("click");
80
+ expect(wrapper.find("tr").length).to.equal(3);
81
+ expect(wrapper.find("input").at(0).props().value).to.equal("B");
82
+ expect(wrapper.find("input").at(2).props().value).to.equal("");
83
+ });
84
+ it("Clicking X on a middle row deletes it", () => {
85
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
86
+ expect(wrapper.find("tr").length).to.equal(4);
87
+ expect(wrapper.find("input").at(0).props().value).to.equal("A");
88
+ expect(wrapper.find("input").at(2).props().value).to.equal("B");
89
+ expect(wrapper.find("input").at(4).props().value).to.equal("");
90
+ wrapper.find("button").at(1).simulate("click");
91
+ expect(wrapper.find("tr").length).to.equal(3);
92
+ expect(wrapper.find("input").at(0).props().value).to.equal("A");
93
+ expect(wrapper.find("input").at(2).props().value).to.equal("");
94
+ });
95
+ it("onUpdate is called after an input causes a new row to be added", () => {
96
+ const buttonSpy = sinon.spy(StartingData.args, "onUpdate");
97
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
98
+ expect(buttonSpy.getCall(0).args[0]).to.deep.equal([
99
+ ["A", "1"],
100
+ ["B", "2"],
101
+ ["", ""],
102
+ ]);
103
+ expect(buttonSpy.getCall(1)).to.be.null;
104
+ wrapper
105
+ .find("input")
106
+ .at(4)
107
+ .simulate("change", {
108
+ target: {
109
+ value: "New text",
110
+ },
111
+ });
112
+ expect(buttonSpy.getCall(1).args[0]).to.deep.equal([
113
+ ["A", "1"],
114
+ ["B", "2"],
115
+ ["New text", ""],
116
+ ]);
117
+ expect(buttonSpy.getCall(2).args[0]).to.deep.equal([
118
+ ["A", "1"],
119
+ ["B", "2"],
120
+ ["New text", ""],
121
+ ["", ""],
122
+ ]);
123
+ expect(buttonSpy.getCall(3)).to.be.null;
124
+ });
125
+ it("onUpdate is called after an input is edited", () => {
126
+ const buttonSpy = sinon.spy(StartingData.args, "onUpdate");
127
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
128
+ expect(buttonSpy.getCall(0).args[0]).to.deep.equal([
129
+ ["A", "1"],
130
+ ["B", "2"],
131
+ ["", ""],
132
+ ]);
133
+ expect(buttonSpy.getCall(1)).to.be.null;
134
+ wrapper
135
+ .find("input")
136
+ .at(0)
137
+ .simulate("change", {
138
+ target: {
139
+ value: "New text",
140
+ },
141
+ });
142
+ expect(buttonSpy.getCall(1).args[0]).to.deep.equal([
143
+ ["New text", "1"],
144
+ ["B", "2"],
145
+ ["", ""],
146
+ ]);
147
+ expect(buttonSpy.getCall(2)).to.be.null;
148
+ });
149
+ it("onUpdate is called after a row is deleted", () => {
150
+ const buttonSpy = sinon.spy(StartingData.args, "onUpdate");
151
+ const wrapper = mount(React.createElement(StartingData, Object.assign({}, StartingData.args)));
152
+ expect(buttonSpy.getCall(0).args[0]).to.deep.equal([
153
+ ["A", "1"],
154
+ ["B", "2"],
155
+ ["", ""],
156
+ ]);
157
+ expect(buttonSpy.getCall(1)).to.be.null;
158
+ wrapper.find("button").at(1).simulate("click");
159
+ expect(buttonSpy.getCall(1).args[0]).to.deep.equal([
160
+ ["A", "1"],
161
+ ["", ""],
162
+ ]);
163
+ expect(buttonSpy.getCall(2)).to.be.null;
164
+ });
165
+ });
166
+ //# sourceMappingURL=InputTable.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputTable.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/InputTable.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGpE,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC9B,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QACjD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,YAAY,oBAAM,YAAY,CAAC,IAAwB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AC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACpD,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,IAAuB,EAAE,UAAU,CAAC,CAAC;QAC9E,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,YAAY,oBAAM,YAAY,CAAC,IAAwB,EAAI,CAAC,CAAC;QAEpF,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;YAClD,CAAC,GAAG,EAAE,GAAG,CAAC;YACV,CAAC,GAAG,EAAE,GAAG,CAAC;YACV,CAAC,EAAE,EAAE,EAAE,CAAC;SACR,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAExC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE/C,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;YAClD,CAAC,GAAG,EAAE,GAAG,CAAC;YACV,CAAC,EAAE,EAAE,EAAE,CAAC;SACR,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { Basic, StartingData } from \"../stories/InputTable.stories\";\nimport { InputTableProps } from \"../InputTable\";\n\ndescribe(\"<InputTable/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\n\tit(\"string table headers display correctly\", () => {\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"th\").at(0).text(), \"First header\").to.equal(\"Letter\");\n\t\texpect(wrapper.find(\"th\").at(1).text(), \"Second header\").to.equal(\"Number\");\n\t});\n\tit(\"JSX table headers display correctly\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"th\").at(0).text()).to.include(\"Contexts\");\n\t\texpect(wrapper.find(\"th .tooltip-content\").exists()).to.be.true;\n\t});\n\tit(\"providing 2 column headers creates a table with 2 columns of input fields\", () => {\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"tr\").at(1).find(\"td input\").length).to.equal(2);\n\t});\n\tit(\"providing 3 column headers creates a table with 3 columns\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"tr\").at(1).find(\"td\").length).to.equal(3);\n\t});\n\tit(\"when a component has startingData, that data is displayed, plus an extra row\", () => {\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"tr\").length).to.equal(4);\n\t\texpect(wrapper.find(\"tr\").at(1).find(\"td input\").at(0).props().value).to.equal(\"A\");\n\t\texpect(wrapper.find(\"tr\").at(1).find(\"td input\").at(1).props().value).to.equal(\"1\");\n\t\texpect(wrapper.find(\"tr\").at(2).find(\"td input\").at(0).props().value).to.equal(\"B\");\n\t\texpect(wrapper.find(\"tr\").at(2).find(\"td input\").at(1).props().value).to.equal(\"2\");\n\t\texpect(wrapper.find(\"tr\").at(3).find(\"td input\").at(0).props().value).to.equal(\"\");\n\t\texpect(wrapper.find(\"tr\").at(3).find(\"td input\").at(1).props().value).to.equal(\"\");\n\t});\n\tit(\"when a component has no startingData, the table shows only 1 empty row\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"tr\").length).to.equal(2);\n\t\texpect(wrapper.find(\"tr\").at(1).find(\"td input\").at(0).props().value).to.equal(\"\");\n\t\texpect(wrapper.find(\"tr\").at(1).find(\"td input\").at(1).props().value).to.equal(\"\");\n\t});\n\tit(\"show no X on the last row of a single-row table\", () => {\n\t\tconst wrapper = mount(<Basic {...(Basic.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"tr\").length).to.equal(2);\n\t\texpect(wrapper.find(\"tr\").at(1).find(\"td button\").exists()).to.be.false;\n\t});\n\tit(\"show X's on all but the last row of a multi-row table\", () => {\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"tr\").length).to.equal(4);\n\t\texpect(wrapper.find(\"tr\").at(1).find(\"td button\").exists()).to.be.true;\n\t\texpect(wrapper.find(\"tr\").at(2).find(\"td button\").exists()).to.be.true;\n\t\texpect(wrapper.find(\"tr\").at(3).find(\"td button\").exists()).to.be.false;\n\t});\n\tit(\"Typing in the last row causes a new row to be created\", () => {\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"tr\").length).to.equal(4);\n\t\texpect(wrapper.find(\"input\").length).to.equal(6);\n\t\twrapper\n\t\t\t.find(\"tr\")\n\t\t\t.at(3)\n\t\t\t.find(\"input\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"New text\",\n\t\t\t\t},\n\t\t\t});\n\t\texpect(wrapper.find(\"tr\").length).to.equal(5);\n\t\texpect(wrapper.find(\"input\").length).to.equal(8);\n\t});\n\tit(\"Clicking X on the first row deletes it\", () => {\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"tr\").length).to.equal(4);\n\t\texpect(wrapper.find(\"input\").at(0).props().value).to.equal(\"A\");\n\t\texpect(wrapper.find(\"input\").at(2).props().value).to.equal(\"B\");\n\n\t\twrapper.find(\"button\").at(0).simulate(\"click\");\n\t\texpect(wrapper.find(\"tr\").length).to.equal(3);\n\t\texpect(wrapper.find(\"input\").at(0).props().value).to.equal(\"B\");\n\t\texpect(wrapper.find(\"input\").at(2).props().value).to.equal(\"\");\n\t});\n\tit(\"Clicking X on a middle row deletes it\", () => {\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\t\texpect(wrapper.find(\"tr\").length).to.equal(4);\n\t\texpect(wrapper.find(\"input\").at(0).props().value).to.equal(\"A\");\n\t\texpect(wrapper.find(\"input\").at(2).props().value).to.equal(\"B\");\n\t\texpect(wrapper.find(\"input\").at(4).props().value).to.equal(\"\");\n\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\t\texpect(wrapper.find(\"tr\").length).to.equal(3);\n\t\texpect(wrapper.find(\"input\").at(0).props().value).to.equal(\"A\");\n\t\texpect(wrapper.find(\"input\").at(2).props().value).to.equal(\"\");\n\t});\n\tit(\"onUpdate is called after an input causes a new row to be added\", () => {\n\t\tconst buttonSpy = sinon.spy(StartingData.args as InputTableProps, \"onUpdate\");\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\n\t\texpect(buttonSpy.getCall(0).args[0]).to.deep.equal([\n\t\t\t[\"A\", \"1\"],\n\t\t\t[\"B\", \"2\"],\n\t\t\t[\"\", \"\"],\n\t\t]);\n\t\texpect(buttonSpy.getCall(1)).to.be.null;\n\n\t\twrapper\n\t\t\t.find(\"input\")\n\t\t\t.at(4)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"New text\",\n\t\t\t\t},\n\t\t\t});\n\n\t\texpect(buttonSpy.getCall(1).args[0]).to.deep.equal([\n\t\t\t[\"A\", \"1\"],\n\t\t\t[\"B\", \"2\"],\n\t\t\t[\"New text\", \"\"],\n\t\t]);\n\n\t\texpect(buttonSpy.getCall(2).args[0]).to.deep.equal([\n\t\t\t[\"A\", \"1\"],\n\t\t\t[\"B\", \"2\"],\n\t\t\t[\"New text\", \"\"],\n\t\t\t[\"\", \"\"],\n\t\t]);\n\t\texpect(buttonSpy.getCall(3)).to.be.null;\n\t});\n\tit(\"onUpdate is called after an input is edited\", () => {\n\t\tconst buttonSpy = sinon.spy(StartingData.args as InputTableProps, \"onUpdate\");\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\n\t\texpect(buttonSpy.getCall(0).args[0]).to.deep.equal([\n\t\t\t[\"A\", \"1\"],\n\t\t\t[\"B\", \"2\"],\n\t\t\t[\"\", \"\"],\n\t\t]);\n\t\texpect(buttonSpy.getCall(1)).to.be.null;\n\n\t\twrapper\n\t\t\t.find(\"input\")\n\t\t\t.at(0)\n\t\t\t.simulate(\"change\", {\n\t\t\t\ttarget: {\n\t\t\t\t\tvalue: \"New text\",\n\t\t\t\t},\n\t\t\t});\n\n\t\texpect(buttonSpy.getCall(1).args[0]).to.deep.equal([\n\t\t\t[\"New text\", \"1\"],\n\t\t\t[\"B\", \"2\"],\n\t\t\t[\"\", \"\"],\n\t\t]);\n\t\texpect(buttonSpy.getCall(2)).to.be.null;\n\t});\n\tit(\"onUpdate is called after a row is deleted\", () => {\n\t\tconst buttonSpy = sinon.spy(StartingData.args as InputTableProps, \"onUpdate\");\n\t\tconst wrapper = mount(<StartingData {...(StartingData.args as InputTableProps)} />);\n\n\t\texpect(buttonSpy.getCall(0).args[0]).to.deep.equal([\n\t\t\t[\"A\", \"1\"],\n\t\t\t[\"B\", \"2\"],\n\t\t\t[\"\", \"\"],\n\t\t]);\n\t\texpect(buttonSpy.getCall(1)).to.be.null;\n\n\t\twrapper.find(\"button\").at(1).simulate(\"click\");\n\n\t\texpect(buttonSpy.getCall(1).args[0]).to.deep.equal([\n\t\t\t[\"A\", \"1\"],\n\t\t\t[\"\", \"\"],\n\t\t]);\n\t\texpect(buttonSpy.getCall(2)).to.be.null;\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/Tab.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,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG1D,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACvB,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAiB,EAAI,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IAChF,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAiB,EAAI,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAC/E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAC/E,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC3E,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,oBAAM,SAAS,CAAC,IAAiB,EAAI,CAAC,CAAC;QACvE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IAChF,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 { Plain, AutoFocus } from \"../stories/Tab.stories\";\r\nimport { TabProps } from \"../Tab\";\r\n\r\ndescribe(\"<Tab/>\", () => {\r\n\tit(\"should change tab panels with the tab 'Number' is chosen\", () => {\r\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TabProps)} />);\r\n\t\twrapper.find(\"[role='tab']\").at(1).simulate(\"click\");\r\n\t\texpect(wrapper.find(\".visible div[data-label='Number']\").exists()).to.be.true;\r\n\t\texpect(wrapper.find(\".visible div[data-label='Letter']\").exists()).to.be.false;\r\n\t});\r\n\tit(\"should change tab panels with the tab 'Letter' is chosen\", () => {\r\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TabProps)} />);\r\n\t\twrapper.find(\"[role='tab']\").at(0).simulate(\"click\");\r\n\t\texpect(wrapper.find(\".visible div[data-label='Number']\").exists()).to.be.false;\r\n\t\texpect(wrapper.find(\".visible div[data-label='Letter']\").exists()).to.be.true;\r\n\t});\r\n\tit(\"should display autofocused tab panels when autofocus is provided\", () => {\r\n\t\tconst wrapper = mount(<AutoFocus {...(AutoFocus.args as TabProps)} />);\r\n\t\texpect(wrapper.find(\".visible div[data-label='Number']\").exists()).to.be.true;\r\n\t\texpect(wrapper.find(\".visible div[data-label='Letter']\").exists()).to.be.false;\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"Tab.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/Tab.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,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG1D,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACvB,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAiB,EAAI,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IAChF,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAiB,EAAI,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAC/E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAC/E,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC3E,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,SAAS,oBAAM,SAAS,CAAC,IAAiB,EAAI,CAAC,CAAC;QACvE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IAChF,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 { Plain, AutoFocus } from \"../stories/Tab.stories\";\nimport { TabProps } from \"../Tab\";\n\ndescribe(\"<Tab/>\", () => {\n\tit(\"should change tab panels with the tab 'Number' is chosen\", () => {\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TabProps)} />);\n\t\twrapper.find(\"[role='tab']\").at(1).simulate(\"click\");\n\t\texpect(wrapper.find(\".visible div[data-label='Number']\").exists()).to.be.true;\n\t\texpect(wrapper.find(\".visible div[data-label='Letter']\").exists()).to.be.false;\n\t});\n\tit(\"should change tab panels with the tab 'Letter' is chosen\", () => {\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TabProps)} />);\n\t\twrapper.find(\"[role='tab']\").at(0).simulate(\"click\");\n\t\texpect(wrapper.find(\".visible div[data-label='Number']\").exists()).to.be.false;\n\t\texpect(wrapper.find(\".visible div[data-label='Letter']\").exists()).to.be.true;\n\t});\n\tit(\"should display autofocused tab panels when autofocus is provided\", () => {\n\t\tconst wrapper = mount(<AutoFocus {...(AutoFocus.args as TabProps)} />);\n\t\texpect(wrapper.find(\".visible div[data-label='Number']\").exists()).to.be.true;\n\t\texpect(wrapper.find(\".visible div[data-label='Letter']\").exists()).to.be.false;\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/Tooltip.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,IAAI,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGhE,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACrC,MAAM,OAAO,GAAG,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CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAClD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QAC1D,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAqB,EAAI,CAAC,CAAC;QACnE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAC5E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACxD,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,IAAI,oBAAM,IAAI,CAAC,IAAqB,EAAI,CAAC,CAAC;QACjE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAC3E,CAAC,CAAC,CAAC;AAkBJ,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 { Plain, Info, Error } from \"../stories/Tooltip.stories\";\r\nimport { TooltipProps } from \"../Tooltip\";\r\n\r\ndescribe(\"<Tooltip/>\", () => {\r\n\tit(\"should display a help icon\", () => {\r\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TooltipProps)} />);\r\n\t\texpect(wrapper.exists(\".tooltip-icon\")).to.be.true;\r\n\t});\r\n\r\n\tit(\"should display/hide sample text in a popup when moused over/off\", () => {\r\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TooltipProps)} />);\r\n\t\twrapper.find(\".tooltip\").first().simulate(\"mouseover\");\r\n\t\texpect(wrapper.find(\".tooltip-content\").is(\".visible\")).to.be.true;\r\n\t\twrapper.find(\".tooltip\").first().simulate(\"mouseleave\");\r\n\t\texpect(wrapper.find(\".tooltip-content\").is(\".visible\")).to.be.false;\r\n\t});\r\n\r\n\tit(\"should display/hide sample text in a popup when focused/blurred\", () => {\r\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TooltipProps)} />);\r\n\t\twrapper.find(\".tooltip\").first().simulate(\"focus\");\r\n\t\texpect(wrapper.find(\".tooltip-content\").is(\".visible\")).to.be.true;\r\n\t\twrapper.find(\".tooltip\").first().simulate(\"blur\");\r\n\t\texpect(wrapper.find(\".tooltip-content\").is(\".visible\")).to.be.false;\r\n\t});\r\n\r\n\tit(\"should display an error icon when type is error\", () => {\r\n\t\tconst wrapper = mount(<Error {...(Error.args as TooltipProps)} />);\r\n\t\texpect(wrapper.find(\".tooltip-icon\").is(\".tooltip-icon-error\")).to.be.true;\r\n\t});\r\n\r\n\tit(\"should display an info icon when type is info\", () => {\r\n\t\tconst wrapper = mount(<Info {...(Info.args as TooltipProps)} />);\r\n\t\texpect(wrapper.find(\".tooltip-icon\").is(\".tooltip-icon-info\")).to.be.true;\r\n\t});\r\n\r\n\t// CANNOT DETECT *ACCURATE* CSS POSITIONING WITH ENZYME\r\n\t/*\r\n it(\"should display a tooltip to the left when position is left\", () => {\r\n const wrapper = mount(<Left {...(Left.args as TooltipProps)} />);\r\n wrapper.find(\".tooltip\").first().simulate(\"focus\");\r\n const iconNode = wrapper.find(\".tooltip-icon\").at(0).getDOMNode();\r\n const iconLeftPx = window.getComputedStyle(iconNode).getPropertyValue(\"left\");\r\n const iconLeftNum = Number(iconLeftPx.replace(\"px\", \"\"));\r\n const contentNode = wrapper.find(\".tooltip-content\").at(0).getDOMNode();\r\n const contentLeftPx = window.getComputedStyle(contentNode).getPropertyValue(\"left\");\r\n const contentLeftNum = Number(contentLeftPx.replace(\"px\", \"\"));\r\n \r\n // Both contentLeftnum and iconLeftNum are 0\r\n expect(contentLeftNum).to.be.lessThan(iconLeftNum);\r\n });\r\n */\r\n});\r\n"]}
1
+ {"version":3,"file":"Tooltip.spec.js","sourceRoot":"","sources":["../../../../src/components/common/tests/Tooltip.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,IAAI,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGhE,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACrC,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAqB,EAAI,CAAC,CAAC;QACnE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QAC1E,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAM,KAAK,CAAC,IAAqB,EAAI,CAAC,CAAC;QACnE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACvD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACnE,OAAO,CAAC,IAAI,CAAC,UAAU,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AC,IAAI,oBAAM,IAAI,CAAC,IAAqB,EAAI,CAAC,CAAC;QACjE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAC3E,CAAC,CAAC,CAAC;AAkBJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport { Plain, Info, Error } from \"../stories/Tooltip.stories\";\nimport { TooltipProps } from \"../Tooltip\";\n\ndescribe(\"<Tooltip/>\", () => {\n\tit(\"should display a help icon\", () => {\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TooltipProps)} />);\n\t\texpect(wrapper.exists(\".tooltip-icon\")).to.be.true;\n\t});\n\n\tit(\"should display/hide sample text in a popup when moused over/off\", () => {\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TooltipProps)} />);\n\t\twrapper.find(\".tooltip\").first().simulate(\"mouseover\");\n\t\texpect(wrapper.find(\".tooltip-content\").is(\".visible\")).to.be.true;\n\t\twrapper.find(\".tooltip\").first().simulate(\"mouseleave\");\n\t\texpect(wrapper.find(\".tooltip-content\").is(\".visible\")).to.be.false;\n\t});\n\n\tit(\"should display/hide sample text in a popup when focused/blurred\", () => {\n\t\tconst wrapper = mount(<Plain {...(Plain.args as TooltipProps)} />);\n\t\twrapper.find(\".tooltip\").first().simulate(\"focus\");\n\t\texpect(wrapper.find(\".tooltip-content\").is(\".visible\")).to.be.true;\n\t\twrapper.find(\".tooltip\").first().simulate(\"blur\");\n\t\texpect(wrapper.find(\".tooltip-content\").is(\".visible\")).to.be.false;\n\t});\n\n\tit(\"should display an error icon when type is error\", () => {\n\t\tconst wrapper = mount(<Error {...(Error.args as TooltipProps)} />);\n\t\texpect(wrapper.find(\".tooltip-icon\").is(\".tooltip-icon-error\")).to.be.true;\n\t});\n\n\tit(\"should display an info icon when type is info\", () => {\n\t\tconst wrapper = mount(<Info {...(Info.args as TooltipProps)} />);\n\t\texpect(wrapper.find(\".tooltip-icon\").is(\".tooltip-icon-info\")).to.be.true;\n\t});\n\n\t// CANNOT DETECT *ACCURATE* CSS POSITIONING WITH ENZYME\n\t/*\n it(\"should display a tooltip to the left when position is left\", () => {\n const wrapper = mount(<Left {...(Left.args as TooltipProps)} />);\n wrapper.find(\".tooltip\").first().simulate(\"focus\");\n const iconNode = wrapper.find(\".tooltip-icon\").at(0).getDOMNode();\n const iconLeftPx = window.getComputedStyle(iconNode).getPropertyValue(\"left\");\n const iconLeftNum = Number(iconLeftPx.replace(\"px\", \"\"));\n const contentNode = wrapper.find(\".tooltip-content\").at(0).getDOMNode();\n const contentLeftPx = window.getComputedStyle(contentNode).getPropertyValue(\"left\");\n const contentLeftNum = Number(contentLeftPx.replace(\"px\", \"\"));\n \n // Both contentLeftnum and iconLeftNum are 0\n expect(contentLeftNum).to.be.lessThan(iconLeftNum);\n });\n */\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FavoriteMaker.js","sourceRoot":"","sources":["../../../src/components/favorites/FavoriteMaker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAiBxD,MAAM,CAAC,MAAM,aAAa,GAAgD,CAAC,EAC1E,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,KAAK,GACL,EAAE,EAAE;IACJ,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IAGpE,MAAM,cAAc,GAAS,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI;QACpC,SAAS,EAAE,UAAU;QACrB,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,QAAQ;KAClB,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,CAAmB,EAAE,EAAE;QAC9C,cAAc,CAAC;QACf,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,IAAI,WAAW,CAAC,EAAE,CAAC,EAAE;YACpB,cAAc,CAAC,EAAE,CAAC,CAAC;SACnB;aAAM;YACN,WAAW,CAAC;gBACX,EAAE;gBACF,QAAQ;gBACR,IAAI;gBACJ,IAAI,EAAE,cAAc;aACpB,CAAC,CAAC;SACH;IACF,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC;IAC/D,MAAM,OAAO,GAAG,kBAAkB,MAAM,IAAI,SAAS,EAAE,CAAC;IACxD,MAAM,KAAK,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC;IAE1D,OAAO,CACN,6BAAK,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAC1E,QAAQ,IAAI,2BAAG,SAAS,EAAC,aAAa,GAAK,CACvC,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { useFavorites } from \"../../hooks/useFavorites\";\r\nimport { Favorite } from \"../../types/favoriteTypes\";\r\nimport { Icon } from \"../../types/iconTypes\";\r\n\r\ntype FavoriteMakerProps = Favorite & {\r\n\tclassName?: string;\r\n\tstyle?: React.CSSProperties;\r\n};\r\n\r\n/**\r\n * Creates a clickable \"favorite\" that coordinates with the toolbar's pinned <FavoritesShell>.\r\n * @param {string} [className] - An optional CSS className to append.\r\n * @param {string} [id] - The unique identifier for the favorite item. This must be consistent across restarts.\r\n * @param {string} [category] - \"Workspace\" | \"Application\". The catagory of the favorite item. Currenly only workspaces and launchable Finsemble applications can be favorited.\r\n * @param {string} [name] - The name of the favorite item. This will be used for display in the FavoriteShell.\r\n * @param {Icon} [icon] - The icon of the favorite item. This displays in the FavoriteShell. It defaults to use the initials of the `name` field as its content.\r\n */\r\nexport const FavoriteMaker: React.FunctionComponent<FavoriteMakerProps> = ({\r\n\tid,\r\n\tcategory,\r\n\ticon,\r\n\tname,\r\n\tchildren,\r\n\tclassName = \"\",\r\n\tstyle,\r\n}) => {\r\n\tconst { isFavorited, addFavorite, removeFavorite } = useFavorites();\r\n\r\n\t// If no icon is specified then default to an avatar based on initials\r\n\tconst definitiveIcon: Icon = icon ?? {\r\n\t\timageType: \"initials\",\r\n\t\tname: name,\r\n\t\tcategory: category,\r\n\t};\r\n\r\n\tconst toggleFavorite = (e: React.MouseEvent) => {\r\n\t\tdefinitiveIcon;\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t\tif (isFavorited(id)) {\r\n\t\t\tremoveFavorite(id);\r\n\t\t} else {\r\n\t\t\taddFavorite({\r\n\t\t\t\tid,\r\n\t\t\t\tcategory,\r\n\t\t\t\tname,\r\n\t\t\t\ticon: definitiveIcon,\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n\r\n\tconst active = isFavorited(id) ? \"favorited\" : \"not-favorited\";\r\n\tconst classes = `favorite-maker ${active} ${className}`;\r\n\tconst title = isFavorited(id) ? \"Unfavorite\" : \"Favorite\";\r\n\r\n\treturn (\r\n\t\t<div onClick={toggleFavorite} className={classes} style={style} title={title}>\r\n\t\t\t{children || <i className=\"ff-favorite\"></i>}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"FavoriteMaker.js","sourceRoot":"","sources":["../../../src/components/favorites/FavoriteMaker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAiBxD,MAAM,CAAC,MAAM,aAAa,GAAgD,CAAC,EAC1E,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,KAAK,GACL,EAAE,EAAE;IACJ,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IAGpE,MAAM,cAAc,GAAS,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI;QACpC,SAAS,EAAE,UAAU;QACrB,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,QAAQ;KAClB,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,CAAmB,EAAE,EAAE;QAC9C,cAAc,CAAC;QACf,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,IAAI,WAAW,CAAC,EAAE,CAAC,EAAE;YACpB,cAAc,CAAC,EAAE,CAAC,CAAC;SACnB;aAAM;YACN,WAAW,CAAC;gBACX,EAAE;gBACF,QAAQ;gBACR,IAAI;gBACJ,IAAI,EAAE,cAAc;aACpB,CAAC,CAAC;SACH;IACF,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC;IAC/D,MAAM,OAAO,GAAG,kBAAkB,MAAM,IAAI,SAAS,EAAE,CAAC;IACxD,MAAM,KAAK,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC;IAE1D,OAAO,CACN,6BAAK,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAC1E,QAAQ,IAAI,2BAAG,SAAS,EAAC,aAAa,GAAK,CACvC,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { useFavorites } from \"../../hooks/useFavorites\";\nimport { Favorite } from \"../../types/favoriteTypes\";\nimport { Icon } from \"../../types/iconTypes\";\n\ntype FavoriteMakerProps = Favorite & {\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n};\n\n/**\n * Creates a clickable \"favorite\" that coordinates with the toolbar's pinned <FavoritesShell>.\n * @param {string} [className] - An optional CSS className to append.\n * @param {string} [id] - The unique identifier for the favorite item. This must be consistent across restarts.\n * @param {string} [category] - \"Workspace\" | \"Application\". The catagory of the favorite item. Currenly only workspaces and launchable Finsemble applications can be favorited.\n * @param {string} [name] - The name of the favorite item. This will be used for display in the FavoriteShell.\n * @param {Icon} [icon] - The icon of the favorite item. This displays in the FavoriteShell. It defaults to use the initials of the `name` field as its content.\n */\nexport const FavoriteMaker: React.FunctionComponent<FavoriteMakerProps> = ({\n\tid,\n\tcategory,\n\ticon,\n\tname,\n\tchildren,\n\tclassName = \"\",\n\tstyle,\n}) => {\n\tconst { isFavorited, addFavorite, removeFavorite } = useFavorites();\n\n\t// If no icon is specified then default to an avatar based on initials\n\tconst definitiveIcon: Icon = icon ?? {\n\t\timageType: \"initials\",\n\t\tname: name,\n\t\tcategory: category,\n\t};\n\n\tconst toggleFavorite = (e: React.MouseEvent) => {\n\t\tdefinitiveIcon;\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tif (isFavorited(id)) {\n\t\t\tremoveFavorite(id);\n\t\t} else {\n\t\t\taddFavorite({\n\t\t\t\tid,\n\t\t\t\tcategory,\n\t\t\t\tname,\n\t\t\t\ticon: definitiveIcon,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst active = isFavorited(id) ? \"favorited\" : \"not-favorited\";\n\tconst classes = `favorite-maker ${active} ${className}`;\n\tconst title = isFavorited(id) ? \"Unfavorite\" : \"Favorite\";\n\n\treturn (\n\t\t<div onClick={toggleFavorite} className={classes} style={style} title={title}>\n\t\t\t{children || <i className=\"ff-favorite\"></i>}\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FavoritesShell.js","sourceRoot":"","sources":["../../../src/components/favorites/F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BAA0B,EACvC,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,QAAQ,CAAC,EAC5C,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE;gBACvB,qBAAqB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;aAC7B;QACF,CAAC;QAED,oBAAC,IAAI,kBAAC,QAAQ,EAAE,QAAQ,IAAM,IAAI,EAAI;QACtC,6BAAK,SAAS,EAAC,gCAAgC,EAAC,KAAK,EAAE,IAAI,IACzD,oBAAoB,CAAC,IAAI,CAAC,CACtB;QACN,2BACC,KAAK,EAAC,YAAY,EAClB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,EAAE,EAAE,CAAC,EACpD,EAAE,EAAC,gBAAgB,EACnB,SAAS,EAAC,YAAY,GAClB,CACe,CACrB,CAAC,CAAC;IACH,OAAO,CACN,oBAAC,mBAAmB,IACnB,SAAS,EAAE,OAAO,EAClB,SAAS,EAAC,4CAA4C,EACtD,EAAE,EAAC,oBAAoB,EACvB,qBAAqB,EAAE,IAAI,EAC3B,IAAI,EAAE,gBAAgB,CAAC,CAAC,IAEvB,gBAAgB,CACI,CACtB,CAAC;AACH,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,CAGnC,6BAAK,SAAS,EAAC,2BAA2B,EAAC,EAAE,EAAC,WAAW;IACxD,oBAAC,kBAAkB,OAAG,CACjB,CACN,CAAC","sourcesContent":["import * as React from \"react\";\r\nimport { useFavoritesShell } from \"../../hooks/useFavoritesShell\";\r\nimport \"../../assets/css/favorites.css\";\r\nimport { Icon } from \"../icon/Icon\";\r\nimport { FinsembleDnDContext, AllowableDnDAxis } from \"../legacyControls/FinsembleDnDContext\";\r\nimport { FinsembleDraggable } from \"../legacyControls/FinsembleDraggable\";\r\n\r\n/*\r\n * The component that loads and renders all the favorited items.\r\n */\r\nconst FavoritesComponent = () => {\r\n\tconst { favorites, triggerFavorite, removeFavorite, setFavoritesOrder } = useFavoritesShell();\r\n\r\n\t// When user is reordering the favorite items in the UI, we need to keep track to this new order and persist the order information.\r\n\t// This function gets all the favorite item elements in the correct order and call the hook function to set and persist this order.\r\n\tconst reorder = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\r\n\t\tsetFavoritesOrder({ oldIndex, newIndex });\r\n\t};\r\n\r\n\t// Delete a favorite item from the toolbar\r\n\tconst triggerRemoveFavorite = (\r\n\t\tevent: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\r\n\t\tid: string\r\n\t) => {\r\n\t\tevent.stopPropagation();\r\n\t\tremoveFavorite(id);\r\n\t};\r\n\r\n\tconst nameLengthCheckPoint = (name: string) => (name.length > 24 ? `${name.substring(0, 25)}...` : name);\r\n\r\n\tconst favoriteElements = favorites.map(({ id, name, icon, category }, index) => (\r\n\t\t<FinsembleDraggable\r\n\t\t\tdraggableId={id}\r\n\t\t\tindex={index}\r\n\t\t\tkey={id}\r\n\t\t\twrapperClass=\"finsemble-toolbar-button\"\r\n\t\t\tonClick={() => triggerFavorite(id, category)}\r\n\t\t\tonKeydown={(e) => {\r\n\t\t\t\tif (e.key === \"Delete\") {\r\n\t\t\t\t\ttriggerRemoveFavorite(e, id);\r\n\t\t\t\t}\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t<Icon category={category} {...icon} />\r\n\t\t\t<div className=\"finsemble-toolbar-button-label\" title={name}>\r\n\t\t\t\t{nameLengthCheckPoint(name)}\r\n\t\t\t</div>\r\n\t\t\t<i\r\n\t\t\t\ttitle=\"Unfavorite\"\r\n\t\t\t\tonClick={(event) => triggerRemoveFavorite(event, id)}\r\n\t\t\t\tid=\"toolbar-delete\"\r\n\t\t\t\tclassName=\"ff-close-3\"\r\n\t\t\t></i>\r\n\t\t</FinsembleDraggable>\r\n\t));\r\n\treturn (\r\n\t\t<FinsembleDnDContext\r\n\t\t\tonDragEnd={reorder}\r\n\t\t\tclassName=\"finsemble-toolbar-section rearrange-region\"\r\n\t\t\tid=\"favoritesContainer\"\r\n\t\t\tallowHorizontalScroll={true}\r\n\t\t\taxis={AllowableDnDAxis.x}\r\n\t\t>\r\n\t\t\t{favoriteElements}\r\n\t\t</FinsembleDnDContext>\r\n\t);\r\n};\r\n\r\n/**\r\n * The FavoritesShell renders the favorite component, which displays all the favorited items and allows the user\r\n * to launch, reorder, or delete a favorited item.\r\n */\r\nexport const FavoritesShell = () => (\r\n\t// When user scrolls to one end of the favorite list, the corresponding variable will be set to \"false\" so that the scrolling indicator will grey out\r\n\r\n\t<div className=\"finsemble-toolbar-section\" id=\"fav-shell\">\r\n\t\t<FavoritesComponent />\r\n\t</div>\r\n);\r\n"]}
1
+ {"version":3,"file":"FavoritesShell.js","sourceRoot":"","sources":["../../../src/components/favorites/FavoritesShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,gCAAgC,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAK1E,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAI9F,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAA0C,EAAE,EAAE;QAClF,iBAAiB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3C,CAAC,CAAC;IAGF,MAAM,qBAAqB,GAAG,CAC7B,KAAuE,EACvE,EAAU,E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4CAA4C,EACtD,EAAE,EAAC,oBAAoB,EACvB,qBAAqB,EAAE,IAAI,EAC3B,IAAI,EAAE,gBAAgB,CAAC,CAAC,IAEvB,gBAAgB,CACI,CACtB,CAAC;AACH,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,CAGnC,6BAAK,SAAS,EAAC,2BAA2B,EAAC,EAAE,EAAC,WAAW;IACxD,oBAAC,kBAAkB,OAAG,CACjB,CACN,CAAC","sourcesContent":["import * as React from \"react\";\nimport { useFavoritesShell } from \"../../hooks/useFavoritesShell\";\nimport \"../../assets/css/favorites.css\";\nimport { Icon } from \"../icon/Icon\";\nimport { FinsembleDnDContext, AllowableDnDAxis } from \"../legacyControls/FinsembleDnDContext\";\nimport { FinsembleDraggable } from \"../legacyControls/FinsembleDraggable\";\n\n/*\n * The component that loads and renders all the favorited items.\n */\nconst FavoritesComponent = () => {\n\tconst { favorites, triggerFavorite, removeFavorite, setFavoritesOrder } = useFavoritesShell();\n\n\t// When user is reordering the favorite items in the UI, we need to keep track to this new order and persist the order information.\n\t// This function gets all the favorite item elements in the correct order and call the hook function to set and persist this order.\n\tconst reorder = ({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) => {\n\t\tsetFavoritesOrder({ oldIndex, newIndex });\n\t};\n\n\t// Delete a favorite item from the toolbar\n\tconst triggerRemoveFavorite = (\n\t\tevent: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n\t\tid: string\n\t) => {\n\t\tevent.stopPropagation();\n\t\tremoveFavorite(id);\n\t};\n\n\tconst nameLengthCheckPoint = (name: string) => (name.length > 24 ? `${name.substring(0, 25)}...` : name);\n\n\tconst favoriteElements = favorites.map(({ id, name, icon, category }, index) => (\n\t\t<FinsembleDraggable\n\t\t\tdraggableId={id}\n\t\t\tindex={index}\n\t\t\tkey={id}\n\t\t\twrapperClass=\"finsemble-toolbar-button\"\n\t\t\tonClick={() => triggerFavorite(id, category)}\n\t\t\tonKeydown={(e) => {\n\t\t\t\tif (e.key === \"Delete\") {\n\t\t\t\t\ttriggerRemoveFavorite(e, id);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<Icon category={category} {...icon} />\n\t\t\t<div className=\"finsemble-toolbar-button-label\" title={name}>\n\t\t\t\t{nameLengthCheckPoint(name)}\n\t\t\t</div>\n\t\t\t<i\n\t\t\t\ttitle=\"Unfavorite\"\n\t\t\t\tonClick={(event) => triggerRemoveFavorite(event, id)}\n\t\t\t\tid=\"toolbar-delete\"\n\t\t\t\tclassName=\"ff-close-3\"\n\t\t\t></i>\n\t\t</FinsembleDraggable>\n\t));\n\treturn (\n\t\t<FinsembleDnDContext\n\t\t\tonDragEnd={reorder}\n\t\t\tclassName=\"finsemble-toolbar-section rearrange-region\"\n\t\t\tid=\"favoritesContainer\"\n\t\t\tallowHorizontalScroll={true}\n\t\t\taxis={AllowableDnDAxis.x}\n\t\t>\n\t\t\t{favoriteElements}\n\t\t</FinsembleDnDContext>\n\t);\n};\n\n/**\n * The FavoritesShell renders the favorite component, which displays all the favorited items and allows the user\n * to launch, reorder, or delete a favorited item.\n */\nexport const FavoritesShell = () => (\n\t// When user scrolls to one end of the favorite list, the corresponding variable will be set to \"false\" so that the scrolling indicator will grey out\n\n\t<div className=\"finsemble-toolbar-section\" id=\"fav-shell\">\n\t\t<FavoritesComponent />\n\t</div>\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FavoritesShell.spec.js","sourceRoot":"","sources":["../../../src/components/favorites/FavoritesShell.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO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AAC,SAAS,EAAE;YACrE,GAAG,EAAE,OAAO;SACZ,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC9C,MAAM,OAAO,GAAG,KAAK,CAAC,oBAAC,KAAK,oBAAK,KAAK,CAAC,IAAI,EAAI,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACxE,OAAO;aACL,IAAI,CAAC,2BAA2B,CAAC;aACjC,KAAK,EAAE;aACP,QAAQ,CAAC,SAAS,EAAE;YACpB,GAAG,EAAE,QAAQ;YACb,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;SACxB,CAAC,CAAC;QACJ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACzE,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 } from \"./FavoritesShell.stories\";\r\nimport { accessibilityAssessor } from \"../smartDesktopDesigner/tests/a11y_helper\";\r\n\r\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\r\nimport addons, { mockChannel } from \"@storybook/addons\";\r\naddons.setChannel(mockChannel());\r\n\r\ndescribe(\"<FavoritesShell/>\", () => {\r\n\tafterEach(() => {\r\n\t\tsinon.restore();\r\n\t});\r\n\t// Scan fails due to duplicate ID\r\n\t// Multiple instances of <i id=\"toolbar-delete\">, which violates the rule \"id attribute value must be unique\"\r\n\tit.skip(\"should pass accessibility scans (Page)\", async () => {\r\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\r\n\r\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\r\n\t});\r\n\tit(\"should display text\", () => {\r\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\r\n\t\texpect(wrapper.find(\".finsemble-toolbar-button\").first().text()).to.contain(\"Hello World\");\r\n\t});\r\n\tit(\"should display truncate long text\", () => {\r\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\r\n\t\tconst truncated_text = wrapper.find(\"div.finsemble-toolbar-button\").at(2).text();\r\n\t\texpect(\r\n\t\t\ttruncated_text.length,\r\n\t\t\t\"Truncated text down to 25 characters, then add ellipses (total of 28 characters)\"\r\n\t\t).to.equal(28);\r\n\t\texpect(truncated_text, \"Include '...'\").to.contain(\"...\");\r\n\t});\r\n\tit(\"should display category icon\", () => {\r\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\r\n\t\texpect(wrapper.find(\".finsemble-toolbar-button .icon-avatar\").first().prop(\"data-category\")).to.equal(\r\n\t\t\t\"Application\"\r\n\t\t);\r\n\t});\r\n\tit(\"should open the item when clicked\", () => {\r\n\t\tconst buttonSpy = sinon.spy(Basic.args as any, \"spawn\");\r\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\r\n\t\twrapper.find(\".finsemble-toolbar-button\").first().simulate(\"click\");\r\n\t\texpect(buttonSpy.calledOnce).to.be.true;\r\n\t});\r\n\tit(\"should open the item when the user presses Enter\", () => {\r\n\t\tconst buttonSpy = sinon.spy(Basic.args as any, \"spawn\");\r\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\r\n\t\twrapper.find(\".finsemble-toolbar-button\").first().simulate(\"keyDown\", {\r\n\t\t\tkey: \"Enter\",\r\n\t\t});\r\n\t\texpect(buttonSpy.calledOnce).to.be.true;\r\n\t});\r\n\tit(\"should remove the item when deleted\", () => {\r\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\r\n\t\texpect(wrapper.find(\"div.finsemble-toolbar-button\").length).to.equal(3);\r\n\t\twrapper.find(\"div.finsemble-toolbar-button i\").first().simulate(\"click\");\r\n\t\texpect(wrapper.find(\"div.finsemble-toolbar-button\").length).to.equal(2);\r\n\t\twrapper\r\n\t\t\t.find(\".finsemble-toolbar-button\")\r\n\t\t\t.first()\r\n\t\t\t.simulate(\"keyDown\", {\r\n\t\t\t\tkey: \"Delete\",\r\n\t\t\t\tpreventDefault: () => {},\r\n\t\t\t});\r\n\t\texpect(wrapper.find(\"div.finsemble-toolbar-button\").length).to.equal(1);\r\n\t});\r\n});\r\n"]}
1
+ {"version":3,"file":"FavoritesShell.spec.js","sourceRoot":"","sources":["../../../src/components/favorites/FavoritesShell.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAGlF,OAAO,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAEjC,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAClC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AAK,KAAK,CAAC,IAAI,EAAI,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACxE,OAAO;aACL,IAAI,CAAC,2BAA2B,CAAC;aACjC,KAAK,EAAE;aACP,QAAQ,CAAC,SAAS,EAAE;YACpB,GAAG,EAAE,QAAQ;YACb,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;SACxB,CAAC,CAAC;QACJ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport sinon from \"sinon\";\nimport { Basic } from \"./FavoritesShell.stories\";\nimport { accessibilityAssessor } from \"../smartDesktopDesigner/tests/a11y_helper\";\n\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<FavoritesShell/>\", () => {\n\tafterEach(() => {\n\t\tsinon.restore();\n\t});\n\t// Scan fails due to duplicate ID\n\t// Multiple instances of <i id=\"toolbar-delete\">, which violates the rule \"id attribute value must be unique\"\n\tit.skip(\"should pass accessibility scans (Page)\", async () => {\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n\tit(\"should display text\", () => {\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\n\t\texpect(wrapper.find(\".finsemble-toolbar-button\").first().text()).to.contain(\"Hello World\");\n\t});\n\tit(\"should display truncate long text\", () => {\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\n\t\tconst truncated_text = wrapper.find(\"div.finsemble-toolbar-button\").at(2).text();\n\t\texpect(\n\t\t\ttruncated_text.length,\n\t\t\t\"Truncated text down to 25 characters, then add ellipses (total of 28 characters)\"\n\t\t).to.equal(28);\n\t\texpect(truncated_text, \"Include '...'\").to.contain(\"...\");\n\t});\n\tit(\"should display category icon\", () => {\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\n\t\texpect(wrapper.find(\".finsemble-toolbar-button .icon-avatar\").first().prop(\"data-category\")).to.equal(\n\t\t\t\"Application\"\n\t\t);\n\t});\n\tit(\"should open the item when clicked\", () => {\n\t\tconst buttonSpy = sinon.spy(Basic.args as any, \"spawn\");\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\n\t\twrapper.find(\".finsemble-toolbar-button\").first().simulate(\"click\");\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\tit(\"should open the item when the user presses Enter\", () => {\n\t\tconst buttonSpy = sinon.spy(Basic.args as any, \"spawn\");\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\n\t\twrapper.find(\".finsemble-toolbar-button\").first().simulate(\"keyDown\", {\n\t\t\tkey: \"Enter\",\n\t\t});\n\t\texpect(buttonSpy.calledOnce).to.be.true;\n\t});\n\tit(\"should remove the item when deleted\", () => {\n\t\tconst wrapper = mount(<Basic {...Basic.args} />);\n\t\texpect(wrapper.find(\"div.finsemble-toolbar-button\").length).to.equal(3);\n\t\twrapper.find(\"div.finsemble-toolbar-button i\").first().simulate(\"click\");\n\t\texpect(wrapper.find(\"div.finsemble-toolbar-button\").length).to.equal(2);\n\t\twrapper\n\t\t\t.find(\".finsemble-toolbar-button\")\n\t\t\t.first()\n\t\t\t.simulate(\"keyDown\", {\n\t\t\t\tkey: \"Delete\",\n\t\t\t\tpreventDefault: () => {},\n\t\t\t});\n\t\texpect(wrapper.find(\"div.finsemble-toolbar-button\").length).to.equal(1);\n\t});\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FavoritesShell.stories.js","sourceRoot":"","sources":["../../../src/components/favorites/FavoritesShell.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,gCAAgC,CAAC;AAGxC,eAAe;IACd,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,cAAc;CACzB,CAAC;AAEF,MAAM,QAAQ,GAAe,CAAC,IAAS,EAAE,EAAE;IAC1C,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,IAAI,IAAI,CAAC,SAAS,EAAE;QACnB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,KAAU,EAAE,QAA0C,EAAgB,EAAE;YAChH,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC9B,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC;KACF;IAED,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAEtD,OAAO,CACN,oBAAC,iBAAiB;QACjB,oBAAC,cAAc,OAAG,CACC,CACpB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,SAAS,EAAE;QACV;YACC,EAAE,EAAE,GAAG;YACP,QAAQ,EAAE,aAAa;YACvB,IAAI,EAAE,aAAa;SACnB;QACD;YACC,EAAE,EAAE,GAAG;YACP,QAAQ,EAAE,aAAa;YACvB,IAAI,EAAE,qBAAqB;SAC3B;QACD;YACC,EAAE,EAAE,GAAG;YACP,QAAQ,EAAE,aAAa;YACvB,IAAI,EAAE,sCAAsC;SAC5C;KACD;IACD,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC;CACvB,CAAC","sourcesContent":["import React from \"react\";\r\nimport { FavoritesShell } from \"./FavoritesShell\";\r\nimport { Story } from \"@storybook/react/types-6-0\";\r\nimport { initFSBL } from \"../common/helpers\";\r\nimport { FinsembleProvider } from \"../FinsembleProvider\";\r\nimport { action } from \"@storybook/addon-actions\";\r\nimport \"../../assets/css/favorites.css\";\r\nimport { StandardCallback, StandardError } from \"@finsemble/finsemble-core/types/types\";\r\n\r\nexport default {\r\n\ttitle: \"Menu/FavoritesShell\",\r\n\tcomponent: FavoritesShell,\r\n};\r\n\r\nconst Template: Story<any> = (args: any) => {\r\n\tinitFSBL(window);\r\n\r\n\tif (args.favorites) {\r\n\t\twindow.FSBL.Clients.StorageClient.get = (query: any, callback?: StandardCallback<StandardError>): Promise<any> => {\r\n\t\t\tcallback?.(\"\", args.favorites);\r\n\t\t\treturn new Promise((resolve) => {\r\n\t\t\t\tresolve(args.favorites);\r\n\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\twindow.FSBL.Clients.LauncherClient.spawn = args.spawn;\r\n\r\n\treturn (\r\n\t\t<FinsembleProvider>\r\n\t\t\t<FavoritesShell />\r\n\t\t</FinsembleProvider>\r\n\t);\r\n};\r\n\r\nexport const Basic = Template.bind({});\r\nBasic.args = {\r\n\tfavorites: [\r\n\t\t{\r\n\t\t\tid: \"1\",\r\n\t\t\tcategory: \"Application\",\r\n\t\t\tname: \"Hello World\",\r\n\t\t},\r\n\t\t{\r\n\t\t\tid: \"2\",\r\n\t\t\tcategory: \"Application\",\r\n\t\t\tname: \"Another application\",\r\n\t\t},\r\n\t\t{\r\n\t\t\tid: \"3\",\r\n\t\t\tcategory: \"Application\",\r\n\t\t\tname: \"This is a very long, extra long name\",\r\n\t\t},\r\n\t],\r\n\tspawn: action(\"launch\"),\r\n};\r\n"]}
1
+ {"version":3,"file":"FavoritesShell.stories.js","sourceRoot":"","sources":["../../../src/components/favorites/FavoritesShell.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,gCAAgC,CAAC;AAGxC,eAAe;IACd,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,cAAc;CACzB,CAAC;AAEF,MAAM,QAAQ,GAAe,CAAC,IAAS,EAAE,EAAE;IAC1C,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,IAAI,IAAI,CAAC,SAAS,EAAE;QACnB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,KAAU,EAAE,QAA0C,EAAgB,EAAE;YAChH,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC9B,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC;KACF;IAED,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAEtD,OAAO,CACN,oBAAC,iBAAiB;QACjB,oBAAC,cAAc,OAAG,CACC,CACpB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACZ,SAAS,EAAE;QACV;YACC,EAAE,EAAE,GAAG;YACP,QAAQ,EAAE,aAAa;YACvB,IAAI,EAAE,aAAa;SACnB;QACD;YACC,EAAE,EAAE,GAAG;YACP,QAAQ,EAAE,aAAa;YACvB,IAAI,EAAE,qBAAqB;SAC3B;QACD;YACC,EAAE,EAAE,GAAG;YACP,QAAQ,EAAE,aAAa;YACvB,IAAI,EAAE,sCAAsC;SAC5C;KACD;IACD,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC;CACvB,CAAC","sourcesContent":["import React from \"react\";\nimport { FavoritesShell } from \"./FavoritesShell\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport { initFSBL } from \"../common/helpers\";\nimport { FinsembleProvider } from \"../FinsembleProvider\";\nimport { action } from \"@storybook/addon-actions\";\nimport \"../../assets/css/favorites.css\";\nimport { StandardCallback, StandardError } from \"@finsemble/finsemble-core/types/types\";\n\nexport default {\n\ttitle: \"Menu/FavoritesShell\",\n\tcomponent: FavoritesShell,\n};\n\nconst Template: Story<any> = (args: any) => {\n\tinitFSBL(window);\n\n\tif (args.favorites) {\n\t\twindow.FSBL.Clients.StorageClient.get = (query: any, callback?: StandardCallback<StandardError>): Promise<any> => {\n\t\t\tcallback?.(\"\", args.favorites);\n\t\t\treturn new Promise((resolve) => {\n\t\t\t\tresolve(args.favorites);\n\t\t\t});\n\t\t};\n\t}\n\n\twindow.FSBL.Clients.LauncherClient.spawn = args.spawn;\n\n\treturn (\n\t\t<FinsembleProvider>\n\t\t\t<FavoritesShell />\n\t\t</FinsembleProvider>\n\t);\n};\n\nexport const Basic = Template.bind({});\nBasic.args = {\n\tfavorites: [\n\t\t{\n\t\t\tid: \"1\",\n\t\t\tcategory: \"Application\",\n\t\t\tname: \"Hello World\",\n\t\t},\n\t\t{\n\t\t\tid: \"2\",\n\t\t\tcategory: \"Application\",\n\t\t\tname: \"Another application\",\n\t\t},\n\t\t{\n\t\t\tid: \"3\",\n\t\t\tcategory: \"Application\",\n\t\t\tname: \"This is a very long, extra long name\",\n\t\t},\n\t],\n\tspawn: action(\"launch\"),\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/favorites/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { FavoriteMaker } from \"./FavoriteMaker\";\r\nexport { FavoritesShell } from \"./FavoritesShell\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/favorites/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { FavoriteMaker } from \"./FavoriteMaker\";\nexport { FavoritesShell } from \"./FavoritesShell\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ResolverContainer.js","sourceRoot":"","sources":["../../../src/components/fdc3Resolver/ResolverContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,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AE,CAAC,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;IAKF,IAAI,SAAS,EAAE;QACd,YAAY,CAAC,KAAK,CAAC,CAAC;QAEpB,MAAM,qBAAqB,GAAG,CAAC,OAA4B,EAAE,EAAE,CAC9D,IAAI,OAAO,CAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnD,aAAa,CAAC,OAAO,CAAC,CAAC;YACvB,eAAe,CAAC,GAAG,EAAE,CAAC,CAAC,MAAc,EAAE,EAAE;gBACxC,QAAQ,EAAE,CAAC;gBACX,OAAO,CAAC,MAAM,CAAC,CAAC;YACjB,CAAC,CAAC,CAAC;YACH,iBAAiB,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE;gBAC5B,QAAQ,EAAE,CAAC;gBACX,MAAM,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEJ,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,0BAA0B,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC5F,QAAQ,EAAE,CAAC;KACX;IAED,OAAO,CACN,oBAAC,cAAc,IACd,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,CAAC,QAAa,EAAE,EAAE;YACzB,YAAY,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC,EACD,QAAQ,EAAE,GAAG,EAAE;YACd,cAAc,EAAE,CAAC;QAClB,CAAC,GACA,CACF,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\nimport React, { useState } from \"react\";\r\nimport { ResolverDialog } from \"./ResolverDialog\";\r\nimport { ResolutionList } from \"../../types/fdc3\";\r\nimport { clients } from \"@finsemble/finsemble-core\";\r\n\r\ntype ResolverResolution = clients.Interop.types.ResolverResolution;\r\n\r\nconst { name: windowName } = FSBL.Clients.WindowClient.getCurrentWindow();\r\n\r\ntype ResolverChoicesType = {\r\n\tresolutionList: ResolutionList[];\r\n\toriginatingAppName?: string;\r\n};\r\n\r\nexport const ResolverContainer = () => {\r\n\tconst [firstLoad, setFirstLoad] = useState(true);\r\n\tconst [intentRaiser, setIntentRaiser] = useState(\"\");\r\n\tconst [sendCallback, setSendCallback] = useState<any>(() => () => {});\r\n\tconst [cancelCallback, setCancelCallback] = useState<any>(() => () => {});\r\n\tconst [resolutionList, setResolutionList] = useState<ResolutionList[]>([]);\r\n\r\n\tconst clearAll = () => {\r\n\t\tFSBL.FinsembleWindow.getInstance({ name: windowName }, (err: any, win: any) => {\r\n\t\t\twin.hide(() => {});\r\n\t\t});\r\n\t\tsetIntentRaiser(\"\");\r\n\t\tsetResolutionList([]);\r\n\t};\r\n\tconst handleChoices = (choices: ResolverChoicesType) => {\r\n\t\tsetIntentRaiser(choices.originatingAppName ?? \"\");\r\n\t\tsetResolutionList(choices.resolutionList);\r\n\t\tFSBL.FinsembleWindow.getInstance({ name: windowName }, (err: any, win: any) => {\r\n\t\t\twin.show(() => {});\r\n\t\t});\r\n\t};\r\n\r\n\t// We want to register as an IntentResolverListener, but we only want to register once\r\n\t// However, the IntentResovlerListener handler needs to have access to this component's states\r\n\t// So, this block will register the listener, and then never be called again\r\n\tif (firstLoad) {\r\n\t\tsetFirstLoad(false);\r\n\r\n\t\tconst handleResolverChoices = (choices: ResolverChoicesType) =>\r\n\t\t\tnew Promise<ResolverResolution>((resolve, reject) => {\r\n\t\t\t\thandleChoices(choices);\r\n\t\t\t\tsetSendCallback(() => (result: object) => {\r\n\t\t\t\t\tclearAll();\r\n\t\t\t\t\tresolve(result);\r\n\t\t\t\t});\r\n\t\t\t\tsetCancelCallback(() => () => {\r\n\t\t\t\t\tclearAll();\r\n\t\t\t\t\treject({ err: \"Cancelled by user\" });\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\tFSBL.internal.interopAdmin.registerUIResolverListener(handleResolverChoices).then(() => {});\r\n\t\tclearAll();\r\n\t}\r\n\r\n\treturn (\r\n\t\t<ResolverDialog\r\n\t\t\tintentRaiser={intentRaiser}\r\n\t\t\tresolutionList={resolutionList}\r\n\t\t\tonSend={(selected: any) => {\r\n\t\t\t\tsendCallback(selected);\r\n\t\t\t}}\r\n\t\t\tonCancel={() => {\r\n\t\t\t\tcancelCallback();\r\n\t\t\t}}\r\n\t\t/>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"ResolverContainer.js","sourceRoot":"","sources":["../../../src/components/fdc3Resolver/ResolverContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,gBAAgB,EAAE,CAAC;AAO1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACrC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAM,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACtE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAM,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAC1E,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAmB,EAAE,CAAC,CAAC;IAE3E,MAAM,QAAQ,GAAG,GAAG,EAAE;QACrB,IAAI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AEJ,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,0BAA0B,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC5F,QAAQ,EAAE,CAAC;KACX;IAED,OAAO,CACN,oBAAC,cAAc,IACd,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,CAAC,QAAa,EAAE,EAAE;YACzB,YAAY,CAAC,QAAQ,CAAC,CAAC;QACxB,CAAC,EACD,QAAQ,EAAE,GAAG,EAAE;YACd,cAAc,EAAE,CAAC;QAClB,CAAC,GACA,CACF,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport React, { useState } from \"react\";\nimport { ResolverDialog } from \"./ResolverDialog\";\nimport { ResolutionList } from \"../../types/fdc3\";\nimport { clients } from \"@finsemble/finsemble-core\";\n\ntype ResolverResolution = clients.Interop.types.ResolverResolution;\n\nconst { name: windowName } = FSBL.Clients.WindowClient.getCurrentWindow();\n\ntype ResolverChoicesType = {\n\tresolutionList: ResolutionList[];\n\toriginatingAppName?: string;\n};\n\nexport const ResolverContainer = () => {\n\tconst [firstLoad, setFirstLoad] = useState(true);\n\tconst [intentRaiser, setIntentRaiser] = useState(\"\");\n\tconst [sendCallback, setSendCallback] = useState<any>(() => () => {});\n\tconst [cancelCallback, setCancelCallback] = useState<any>(() => () => {});\n\tconst [resolutionList, setResolutionList] = useState<ResolutionList[]>([]);\n\n\tconst clearAll = () => {\n\t\tFSBL.FinsembleWindow.getInstance({ name: windowName }, (err: any, win: any) => {\n\t\t\twin.hide(() => {});\n\t\t});\n\t\tsetIntentRaiser(\"\");\n\t\tsetResolutionList([]);\n\t};\n\tconst handleChoices = (choices: ResolverChoicesType) => {\n\t\tsetIntentRaiser(choices.originatingAppName ?? \"\");\n\t\tsetResolutionList(choices.resolutionList);\n\t\tFSBL.FinsembleWindow.getInstance({ name: windowName }, (err: any, win: any) => {\n\t\t\twin.show(() => {});\n\t\t});\n\t};\n\n\t// We want to register as an IntentResolverListener, but we only want to register once\n\t// However, the IntentResovlerListener handler needs to have access to this component's states\n\t// So, this block will register the listener, and then never be called again\n\tif (firstLoad) {\n\t\tsetFirstLoad(false);\n\n\t\tconst handleResolverChoices = (choices: ResolverChoicesType) =>\n\t\t\tnew Promise<ResolverResolution>((resolve, reject) => {\n\t\t\t\thandleChoices(choices);\n\t\t\t\tsetSendCallback(() => (result: object) => {\n\t\t\t\t\tclearAll();\n\t\t\t\t\tresolve(result);\n\t\t\t\t});\n\t\t\t\tsetCancelCallback(() => () => {\n\t\t\t\t\tclearAll();\n\t\t\t\t\treject({ err: \"Cancelled by user\" });\n\t\t\t\t});\n\t\t\t});\n\n\t\tFSBL.internal.interopAdmin.registerUIResolverListener(handleResolverChoices).then(() => {});\n\t\tclearAll();\n\t}\n\n\treturn (\n\t\t<ResolverDialog\n\t\t\tintentRaiser={intentRaiser}\n\t\t\tresolutionList={resolutionList}\n\t\t\tonSend={(selected: any) => {\n\t\t\t\tsendCallback(selected);\n\t\t\t}}\n\t\t\tonCancel={() => {\n\t\t\t\tcancelCallback();\n\t\t\t}}\n\t\t/>\n\t);\n};\n"]}