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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (814) hide show
  1. package/package.json +26 -22
  2. package/react/actions/smartDesktopDesignerActions.d.ts +7 -7
  3. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  4. package/react/actions/toolbarActions.d.ts +2 -3
  5. package/react/actions/toolbarActions.js.map +1 -1
  6. package/react/assets/css/defaultTheme.css +1 -1
  7. package/react/assets/css/notificationsCenter.css +5 -2
  8. package/react/assets/css/userPreferences.css +5 -2
  9. package/react/assets/css/windowTitleBar.css +34 -1
  10. package/react/assets/icons/check-square.svg +6 -0
  11. package/react/assets/icons/lock.svg +6 -0
  12. package/react/components/FinsembleProvider.js +1 -1
  13. package/react/components/FinsembleProvider.js.map +1 -1
  14. package/react/components/appCatalog/AppCatalogComponent.js.map +1 -1
  15. package/react/components/appCatalog/components/AppList.d.ts +7 -1
  16. package/react/components/appCatalog/components/AppList.js +1 -1
  17. package/react/components/appCatalog/components/AppList.js.map +1 -1
  18. package/react/components/appCatalog/components/AppResults.d.ts +10 -8
  19. package/react/components/appCatalog/components/AppResults.js +1 -1
  20. package/react/components/appCatalog/components/AppResults.js.map +1 -1
  21. package/react/components/appCatalog/components/Carousel.js +1 -1
  22. package/react/components/appCatalog/components/Carousel.js.map +1 -1
  23. package/react/components/appCatalog/components/EmptyResults.d.ts +2 -1
  24. package/react/components/appCatalog/components/EmptyResults.js +2 -4
  25. package/react/components/appCatalog/components/EmptyResults.js.map +1 -1
  26. package/react/components/appCatalog/components/Hero.d.ts +24 -4
  27. package/react/components/appCatalog/components/Hero.js +2 -1
  28. package/react/components/appCatalog/components/Hero.js.map +1 -1
  29. package/react/components/appCatalog/components/Home.d.ts +18 -4
  30. package/react/components/appCatalog/components/Home.js.map +1 -1
  31. package/react/components/appCatalog/components/SearchBar.d.ts +20 -7
  32. package/react/components/appCatalog/components/SearchBar.js +4 -7
  33. package/react/components/appCatalog/components/SearchBar.js.map +1 -1
  34. package/react/components/appCatalog/components/Showcase/AppDescription.d.ts +5 -3
  35. package/react/components/appCatalog/components/Showcase/AppDescription.js +4 -6
  36. package/react/components/appCatalog/components/Showcase/AppDescription.js.map +1 -1
  37. package/react/components/appCatalog/components/Showcase/AppDevNotes.d.ts +5 -4
  38. package/react/components/appCatalog/components/Showcase/AppDevNotes.js.map +1 -1
  39. package/react/components/appCatalog/components/Showcase/AppShowcase.js +1 -1
  40. package/react/components/appCatalog/components/Showcase/AppShowcase.js.map +1 -1
  41. package/react/components/appCatalog/components/Showcase/Header.d.ts +13 -5
  42. package/react/components/appCatalog/components/Showcase/Header.js +2 -2
  43. package/react/components/appCatalog/components/Showcase/Header.js.map +1 -1
  44. package/react/components/appCatalog/components/Showcase/Modal.d.ts +7 -4
  45. package/react/components/appCatalog/components/Showcase/Modal.js +6 -6
  46. package/react/components/appCatalog/components/Showcase/Modal.js.map +1 -1
  47. package/react/components/appCatalog/components/Showcase/defaults.d.ts +3 -3
  48. package/react/components/appCatalog/components/Showcase/defaults.js.map +1 -1
  49. package/react/components/appCatalog/components/Tag.d.ts +6 -4
  50. package/react/components/appCatalog/components/Tag.js.map +1 -1
  51. package/react/components/appCatalog/components/Toast.d.ts +5 -3
  52. package/react/components/appCatalog/components/Toast.js +5 -4
  53. package/react/components/appCatalog/components/Toast.js.map +1 -1
  54. package/react/components/appCatalog/modules/AppDirectory.d.ts +5 -1
  55. package/react/components/appCatalog/modules/AppDirectory.js.map +1 -1
  56. package/react/components/appCatalog/modules/FDC3.d.ts +12 -11
  57. package/react/components/appCatalog/modules/FDC3.js +20 -18
  58. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  59. package/react/components/appCatalog/stores/appStore.d.ts +9 -2
  60. package/react/components/appCatalog/stores/appStore.js +10 -4
  61. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  62. package/react/components/appCatalog/stores/storeActions.js.map +1 -1
  63. package/react/components/common/Button.d.ts +5 -4
  64. package/react/components/common/Button.js +2 -2
  65. package/react/components/common/Button.js.map +1 -1
  66. package/react/components/common/ButtonIcon.js +1 -1
  67. package/react/components/common/ButtonIcon.js.map +1 -1
  68. package/react/components/common/ButtonRow.d.ts +15 -0
  69. package/react/components/common/ButtonRow.js +32 -0
  70. package/react/components/common/ButtonRow.js.map +1 -0
  71. package/react/components/common/Checkbox.d.ts +8 -0
  72. package/react/components/common/Checkbox.js +22 -0
  73. package/react/components/common/Checkbox.js.map +1 -0
  74. package/react/components/common/ColorPicker.js +1 -1
  75. package/react/components/common/ColorPicker.js.map +1 -1
  76. package/react/components/common/DropZone.d.ts +0 -5
  77. package/react/components/common/DropZone.js.map +1 -1
  78. package/react/components/common/DropdownButton.js +1 -1
  79. package/react/components/common/DropdownButton.js.map +1 -1
  80. package/react/components/common/FileInput.d.ts +0 -5
  81. package/react/components/common/FileInput.js +7 -9
  82. package/react/components/common/FileInput.js.map +1 -1
  83. package/react/components/common/FinsembleIcon.d.ts +2 -2
  84. package/react/components/common/FinsembleIcon.js +4 -0
  85. package/react/components/common/FinsembleIcon.js.map +1 -1
  86. package/react/components/common/FinsembleSelect.d.ts +3 -2
  87. package/react/components/common/FinsembleSelect.js +3 -6
  88. package/react/components/common/FinsembleSelect.js.map +1 -1
  89. package/react/components/common/FinsembleToggle.js +2 -2
  90. package/react/components/common/FinsembleToggle.js.map +1 -1
  91. package/react/components/common/FontSizeSelector.js +2 -2
  92. package/react/components/common/FontSizeSelector.js.map +1 -1
  93. package/react/components/common/ImagePreview.js +2 -2
  94. package/react/components/common/ImagePreview.js.map +1 -1
  95. package/react/components/common/Tab.js +2 -1
  96. package/react/components/common/Tab.js.map +1 -1
  97. package/react/components/common/Tooltip.d.ts +4 -3
  98. package/react/components/common/Tooltip.js +3 -3
  99. package/react/components/common/Tooltip.js.map +1 -1
  100. package/react/components/common/css/tooltip.css +10 -0
  101. package/react/components/common/file_helpers.js +3 -2
  102. package/react/components/common/file_helpers.js.map +1 -1
  103. package/react/components/common/helpers.js +20 -10
  104. package/react/components/common/helpers.js.map +1 -1
  105. package/react/components/common/stories/Button.stories.js +1 -1
  106. package/react/components/common/stories/Button.stories.js.map +1 -1
  107. package/react/components/common/stories/ButtonIcon.stories.js +1 -1
  108. package/react/components/common/stories/ButtonIcon.stories.js.map +1 -1
  109. package/react/components/common/stories/ButtonRow.stories.d.ts +14 -0
  110. package/react/components/common/stories/ButtonRow.stories.js +39 -0
  111. package/react/components/common/stories/ButtonRow.stories.js.map +1 -0
  112. package/react/components/common/stories/ButtonTile.stories.js +1 -1
  113. package/react/components/common/stories/ButtonTile.stories.js.map +1 -1
  114. package/react/components/common/stories/Checkbox.stories.d.ts +13 -0
  115. package/react/components/common/stories/Checkbox.stories.js +29 -0
  116. package/react/components/common/stories/Checkbox.stories.js.map +1 -0
  117. package/react/components/common/stories/ColorPicker.stories.js +1 -1
  118. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  119. package/react/components/common/stories/DropZone.stories.js +1 -1
  120. package/react/components/common/stories/DropZone.stories.js.map +1 -1
  121. package/react/components/common/stories/DropdownButton.stories.d.ts +22 -0
  122. package/react/components/common/stories/DropdownButton.stories.js +29 -0
  123. package/react/components/common/stories/DropdownButton.stories.js.map +1 -0
  124. package/react/components/common/stories/FinsembleIcon.stories.js +2 -0
  125. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  126. package/react/components/common/stories/FinsembleSelect.stories.d.ts +1 -1
  127. package/react/components/common/stories/FinsembleSelect.stories.js +1 -1
  128. package/react/components/common/stories/FinsembleSelect.stories.js.map +1 -1
  129. package/react/components/common/stories/FinsembleToggle.stories.js +3 -1
  130. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  131. package/react/components/common/stories/FontSizeSelector.stories.js +1 -1
  132. package/react/components/common/stories/FontSizeSelector.stories.js.map +1 -1
  133. package/react/components/common/stories/Header.stories.js +1 -1
  134. package/react/components/common/stories/Header.stories.js.map +1 -1
  135. package/react/components/common/stories/Tooltip.stories.d.ts +1 -1
  136. package/react/components/{shared/addProtocolToValidURL.spec.d.ts → common/tests/ButtonRow.spec.d.ts} +0 -0
  137. package/react/components/common/tests/ButtonRow.spec.js +25 -0
  138. package/react/components/common/tests/ButtonRow.spec.js.map +1 -0
  139. package/react/components/common/tests/Checkbox.spec.d.ts +1 -0
  140. package/react/components/common/tests/Checkbox.spec.js +33 -0
  141. package/react/components/common/tests/Checkbox.spec.js.map +1 -0
  142. package/react/components/common/tests/ColorPicker.spec.js +6 -6
  143. package/react/components/common/tests/ColorPicker.spec.js.map +1 -1
  144. package/react/components/common/tests/DropZone.spec.js +4 -4
  145. package/react/components/common/tests/DropZone.spec.js.map +1 -1
  146. package/react/components/common/tests/FileInput.spec.js +5 -5
  147. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  148. package/react/components/common/tests/FinsembleSelect.spec.js +12 -11
  149. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  150. package/react/components/common/tests/FinsembleToggle.spec.js +8 -2
  151. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  152. package/react/components/common/tests/Header.spec.js +3 -3
  153. package/react/components/common/tests/Header.spec.js.map +1 -1
  154. package/react/components/common/tests/ImagePreview.spec.js +8 -8
  155. package/react/components/common/tests/ImagePreview.spec.js.map +1 -1
  156. package/react/components/common/tests/Tab.spec.js +3 -3
  157. package/react/components/common/tests/Tab.spec.js.map +1 -1
  158. package/react/components/common/tests/Tooltip.spec.js +5 -5
  159. package/react/components/common/tests/Tooltip.spec.js.map +1 -1
  160. package/react/components/favorites/FavoriteMaker.d.ts +0 -5
  161. package/react/components/favorites/FavoriteMaker.js +1 -1
  162. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  163. package/react/components/favorites/FavoritesShell.js +1 -1
  164. package/react/components/favorites/FavoritesShell.js.map +1 -1
  165. package/react/components/favorites/FavoritesShell.spec.js +7 -7
  166. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  167. package/react/components/favorites/FavoritesShell.stories.js +5 -4
  168. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  169. package/react/components/fdc3Resolver/ResolverContainer.js +2 -1
  170. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  171. package/react/components/fdc3Resolver/ResolverDialog.css +1 -0
  172. package/react/components/fdc3Resolver/ResolverDialog.js +15 -16
  173. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  174. package/react/components/fdc3Resolver/ResolverDialog.spec.js +6 -13
  175. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  176. package/react/components/fdc3Resolver/ResolverDialog.stories.js +46 -46
  177. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  178. package/react/components/icon/Icon.js +5 -4
  179. package/react/components/icon/Icon.js.map +1 -1
  180. package/react/components/legacyControls/FinsembleDialogButton.d.ts +1 -1
  181. package/react/components/legacyControls/FinsembleDialogButton.js +4 -3
  182. package/react/components/legacyControls/FinsembleDialogButton.js.map +1 -1
  183. package/react/components/legacyControls/FinsembleDialogQuestion.js +2 -1
  184. package/react/components/legacyControls/FinsembleDialogQuestion.js.map +1 -1
  185. package/react/components/legacyControls/FinsembleDialogTextInput.d.ts +1 -1
  186. package/react/components/legacyControls/FinsembleDialogTextInput.js +8 -5
  187. package/react/components/legacyControls/FinsembleDialogTextInput.js.map +1 -1
  188. package/react/components/legacyControls/FinsembleDnDContext.js +18 -17
  189. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  190. package/react/components/legacyControls/FinsembleDraggable.js +3 -3
  191. package/react/components/legacyControls/FinsembleDraggable.js.map +1 -1
  192. package/react/components/legacyControls/FinsembleHoverDetector.js +2 -1
  193. package/react/components/legacyControls/FinsembleHoverDetector.js.map +1 -1
  194. package/react/components/legacyControls/FinsembleMenuSection.js +6 -3
  195. package/react/components/legacyControls/FinsembleMenuSection.js.map +1 -1
  196. package/react/components/legacyControls/stories/FinsembleDialog.stories.js +1 -1
  197. package/react/components/legacyControls/stories/FinsembleDialog.stories.js.map +1 -1
  198. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js +1 -1
  199. package/react/components/legacyControls/stories/FinsembleDialogButton.stories.js.map +1 -1
  200. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js +1 -1
  201. package/react/components/legacyControls/stories/FinsembleDialogQuestion.stories.js.map +1 -1
  202. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js +1 -1
  203. package/react/components/legacyControls/stories/FinsembleDialogTextInput.stories.js.map +1 -1
  204. package/react/components/legacyControls/tests/FinsembleDialog.spec.js +1 -1
  205. package/react/components/legacyControls/tests/FinsembleDialog.spec.js.map +1 -1
  206. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js +8 -7
  207. package/react/components/legacyControls/tests/FinsembleDialogButton.spec.js.map +1 -1
  208. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js +7 -5
  209. package/react/components/legacyControls/tests/FinsembleDialogQuestion.spec.js.map +1 -1
  210. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +13 -12
  211. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  212. package/react/components/linker/LinkerMenu.js +4 -3
  213. package/react/components/linker/LinkerMenu.js.map +1 -1
  214. package/react/components/linker/LinkerMenuDeprecated.js +1 -1
  215. package/react/components/linker/LinkerMenuDeprecated.js.map +1 -1
  216. package/react/components/linker/remoteRedux.d.ts +10 -42
  217. package/react/components/linker/remoteRedux.js.map +1 -1
  218. package/react/components/menu/Menu.d.ts +1 -1
  219. package/react/components/menu/Menu.js +1 -1
  220. package/react/components/menu/Menu.js.map +1 -1
  221. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  222. package/react/components/menu/MenuPortal.js +7 -6
  223. package/react/components/menu/MenuPortal.js.map +1 -1
  224. package/react/components/menu/keyboardNavigation.js +14 -15
  225. package/react/components/menu/keyboardNavigation.js.map +1 -1
  226. package/react/components/notifications/components/NoNotifications.js +2 -4
  227. package/react/components/notifications/components/NoNotifications.js.map +1 -1
  228. package/react/components/notifications/components/drawer/Drawer.js +2 -4
  229. package/react/components/notifications/components/drawer/Drawer.js.map +1 -1
  230. package/react/components/notifications/components/drawer/DrawerControls.js +2 -4
  231. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  232. package/react/components/notifications/components/drawer/DrawerHeader.js +3 -6
  233. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  234. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +55 -69
  235. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  236. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +14 -15
  237. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  238. package/react/components/notifications/components/shared/CheckButton.d.ts +2 -2
  239. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  240. package/react/components/notifications/components/shared/IconButton.js +3 -5
  241. package/react/components/notifications/components/shared/IconButton.js.map +1 -1
  242. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +3 -2
  243. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  244. package/react/components/notifications/components/shared/OverflowMenu.d.ts +2 -1
  245. package/react/components/notifications/components/shared/OverflowMenu.js +6 -5
  246. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  247. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +3 -2
  248. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js +1 -1
  249. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  250. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +3 -2
  251. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  252. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +3 -2
  253. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +2 -4
  254. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  255. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +3 -2
  256. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  257. package/react/components/notifications/components/views/CardView.js +15 -24
  258. package/react/components/notifications/components/views/CardView.js.map +1 -1
  259. package/react/components/notifications/components/views/ListView.d.ts +2 -2
  260. package/react/components/notifications/components/views/ListView.js +10 -10
  261. package/react/components/notifications/components/views/ListView.js.map +1 -1
  262. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +2 -2
  263. package/react/components/notifications/components/views/NotificationDetailsView.js +5 -8
  264. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  265. package/react/components/notifications/constants.d.ts +13 -0
  266. package/react/components/notifications/constants.js.map +1 -1
  267. package/react/components/notifications/types.d.ts +7 -6
  268. package/react/components/notifications/types.js.map +1 -1
  269. package/react/components/notifications/utils.d.ts +6 -4
  270. package/react/components/notifications/utils.js +26 -32
  271. package/react/components/notifications/utils.js.map +1 -1
  272. package/react/components/processMonitor/ProcessMonitor.d.ts +3 -1
  273. package/react/components/processMonitor/ProcessMonitor.js +17 -10
  274. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  275. package/react/components/processMonitor/ProcessMonitorTypes.d.ts +33 -0
  276. package/react/components/processMonitor/ProcessMonitorTypes.js +6 -0
  277. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -0
  278. package/react/components/processMonitor/components/ChildWindow.d.ts +10 -3
  279. package/react/components/processMonitor/components/ChildWindow.js +19 -10
  280. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  281. package/react/components/processMonitor/components/ListHeader.d.ts +17 -4
  282. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  283. package/react/components/processMonitor/components/ProcessStatistics.d.ts +11 -3
  284. package/react/components/processMonitor/components/ProcessStatistics.js +25 -18
  285. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  286. package/react/components/processMonitor/constants.d.ts +11 -16
  287. package/react/components/processMonitor/constants.js +3 -1
  288. package/react/components/processMonitor/constants.js.map +1 -1
  289. package/react/components/processMonitor/helpers.d.ts +25 -5
  290. package/react/components/processMonitor/helpers.js +28 -20
  291. package/react/components/processMonitor/helpers.js.map +1 -1
  292. package/react/components/processMonitor/helpers.spec.d.ts +1 -0
  293. package/react/components/processMonitor/helpers.spec.js +44 -0
  294. package/react/components/processMonitor/helpers.spec.js.map +1 -0
  295. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +30 -15
  296. package/react/components/processMonitor/stores/ProcessMonitorStore.js +101 -86
  297. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  298. package/react/components/quickComponentForm/QuickComponentForm.d.ts +4 -1
  299. package/react/components/quickComponentForm/QuickComponentForm.js +13 -14
  300. package/react/components/quickComponentForm/QuickComponentForm.js.map +1 -1
  301. package/react/components/search/Highlight.js +13 -3
  302. package/react/components/search/Highlight.js.map +1 -1
  303. package/react/components/search/Highlight.spec.js +3 -3
  304. package/react/components/search/Highlight.spec.js.map +1 -1
  305. package/react/components/search/Highlight.stories.js +1 -1
  306. package/react/components/search/Highlight.stories.js.map +1 -1
  307. package/react/components/search/Search.js +17 -8
  308. package/react/components/search/Search.js.map +1 -1
  309. package/react/components/search/SearchBestMatch.js +2 -1
  310. package/react/components/search/SearchBestMatch.js.map +1 -1
  311. package/react/components/search/SearchProviderResults.js +4 -5
  312. package/react/components/search/SearchProviderResults.js.map +1 -1
  313. package/react/components/search/SearchResult.js +3 -2
  314. package/react/components/search/SearchResult.js.map +1 -1
  315. package/react/components/search/SearchResults.js +1 -1
  316. package/react/components/search/SearchResults.js.map +1 -1
  317. package/react/components/shared/Button.js +2 -4
  318. package/react/components/shared/Button.js.map +1 -1
  319. package/react/components/shared/DefaultDropdownButton.d.ts +1 -0
  320. package/react/components/shared/DefaultDropdownButton.js +14 -4
  321. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  322. package/react/components/shared/NavigationButton.js +9 -11
  323. package/react/components/shared/NavigationButton.js.map +1 -1
  324. package/react/components/shared/Tag.d.ts +11 -1
  325. package/react/components/shared/Tag.js.map +1 -1
  326. package/react/components/shared/TagsMenu.d.ts +26 -6
  327. package/react/components/shared/TagsMenu.js.map +1 -1
  328. package/react/components/shared/linkerUtil.d.ts +3 -1
  329. package/react/components/shared/linkerUtil.js.map +1 -1
  330. package/react/components/shared/tests/DefaultDropdownButton.spec.d.ts +1 -0
  331. package/react/components/shared/tests/DefaultDropdownButton.spec.js +54 -0
  332. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -0
  333. package/react/components/shared/tests/addProtocolToValidURL.spec.d.ts +1 -0
  334. package/react/components/shared/{addProtocolToValidURL.spec.js → tests/addProtocolToValidURL.spec.js} +1 -1
  335. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -0
  336. package/react/components/singleInputDialog/SingleInputDialog.spec.js +6 -6
  337. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  338. package/react/components/singleInputDialog/SingleInputDialog.stories.js +1 -1
  339. package/react/components/singleInputDialog/SingleInputDialog.stories.js.map +1 -1
  340. package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +15 -0
  341. package/react/components/smartDesktopDesigner/AppEditAccess.js +138 -0
  342. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -0
  343. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +9 -3
  344. package/react/components/smartDesktopDesigner/AppEditPage.js +5 -1
  345. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  346. package/react/components/smartDesktopDesigner/Appearance.js +3 -5
  347. package/react/components/smartDesktopDesigner/Appearance.js.map +1 -1
  348. package/react/components/smartDesktopDesigner/Application.d.ts +7 -4
  349. package/react/components/smartDesktopDesigner/Application.js +85 -83
  350. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  351. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +3 -0
  352. package/react/components/smartDesktopDesigner/ApplicationEdit.js +68 -51
  353. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  354. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +4 -2
  355. package/react/components/smartDesktopDesigner/ApplicationList.js +33 -20
  356. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  357. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +7 -1
  358. package/react/components/smartDesktopDesigner/ApplicationSetup.js +8 -20
  359. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  360. package/react/components/smartDesktopDesigner/Applications.d.ts +2 -1
  361. package/react/components/smartDesktopDesigner/Applications.js +73 -62
  362. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  363. package/react/components/smartDesktopDesigner/Authentication.js +2 -8
  364. package/react/components/smartDesktopDesigner/Authentication.js.map +1 -1
  365. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js +1 -8
  366. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +1 -1
  367. package/react/components/smartDesktopDesigner/Content.js.map +1 -1
  368. package/react/components/smartDesktopDesigner/CurrentView.js +1 -1
  369. package/react/components/smartDesktopDesigner/CurrentView.js.map +1 -1
  370. package/react/components/smartDesktopDesigner/Export.js +3 -3
  371. package/react/components/smartDesktopDesigner/Export.js.map +1 -1
  372. package/react/components/smartDesktopDesigner/ExportCloud.js +1 -1
  373. package/react/components/smartDesktopDesigner/ExportCloud.js.map +1 -1
  374. package/react/components/smartDesktopDesigner/ExportDeployInfo.js +1 -1
  375. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +1 -1
  376. package/react/components/smartDesktopDesigner/ExportZip.js +0 -1
  377. package/react/components/smartDesktopDesigner/ExportZip.js.map +1 -1
  378. package/react/components/smartDesktopDesigner/GettingStarted.d.ts +1 -1
  379. package/react/components/smartDesktopDesigner/GettingStarted.js +1 -1
  380. package/react/components/smartDesktopDesigner/GettingStarted.js.map +1 -1
  381. package/react/components/smartDesktopDesigner/ProjectHeader.d.ts +1 -1
  382. package/react/components/smartDesktopDesigner/ProjectHeader.js +1 -1
  383. package/react/components/smartDesktopDesigner/ProjectHeader.js.map +1 -1
  384. package/react/components/smartDesktopDesigner/Publish.js +1 -1
  385. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  386. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
  387. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +11 -24
  388. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  389. package/react/components/smartDesktopDesigner/Themes.js +2 -8
  390. package/react/components/smartDesktopDesigner/Themes.js.map +1 -1
  391. package/react/components/smartDesktopDesigner/View.js.map +1 -1
  392. package/react/components/smartDesktopDesigner/common/getCSSVars.d.ts +1 -1
  393. package/react/components/smartDesktopDesigner/common/getCSSVars.js +2 -1
  394. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +1 -1
  395. package/react/components/smartDesktopDesigner/common/views.d.ts +1 -1
  396. package/react/components/smartDesktopDesigner/common/views.js +6 -14
  397. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  398. package/react/components/smartDesktopDesigner/css/applications.css +38 -0
  399. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +20 -2
  400. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  401. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +10 -1
  402. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  403. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +6 -3
  404. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
  405. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +5 -2
  406. package/react/components/smartDesktopDesigner/fixtures/apps.js +15 -15
  407. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  408. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  409. package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +2 -1
  410. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  411. package/react/components/smartDesktopDesigner/fixtures/views.js +4 -4
  412. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  413. package/react/components/smartDesktopDesigner/sdd_helpers.js +2 -1
  414. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +1 -1
  415. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +3 -4
  416. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +22 -2
  417. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  418. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js +7 -7
  419. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +1 -1
  420. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js +3 -7
  421. package/react/components/smartDesktopDesigner/stories/ApplicationEdit.stories.js.map +1 -1
  422. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js +9 -2
  423. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +1 -1
  424. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js +3 -10
  425. package/react/components/smartDesktopDesigner/stories/ApplicationSetup.stories.js.map +1 -1
  426. package/react/components/smartDesktopDesigner/stories/Applications.stories.js +3 -2
  427. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  428. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js +7 -14
  429. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +1 -1
  430. package/react/components/smartDesktopDesigner/stories/Export.stories.js +2 -2
  431. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +1 -1
  432. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js +2 -2
  433. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +1 -1
  434. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js +5 -11
  435. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +1 -1
  436. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.d.ts +1 -1
  437. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js +1 -1
  438. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +1 -1
  439. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js +1 -1
  440. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +1 -1
  441. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js +2 -4
  442. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +1 -1
  443. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.d.ts +1 -1
  444. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js +1 -1
  445. package/react/components/smartDesktopDesigner/stories/ProjectHeader.stories.js.map +1 -1
  446. package/react/components/smartDesktopDesigner/stories/Publish.stories.js +13 -28
  447. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +1 -1
  448. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js +1 -1
  449. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +1 -1
  450. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js +3 -3
  451. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  452. package/react/components/smartDesktopDesigner/stories/Themes.stories.js +1 -1
  453. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +1 -1
  454. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +33 -32
  455. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  456. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js +6 -5
  457. package/react/components/smartDesktopDesigner/tests/ApplicationEdit.spec.js.map +1 -1
  458. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js +11 -11
  459. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +1 -1
  460. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js +9 -7
  461. package/react/components/smartDesktopDesigner/tests/ApplicationSetup.spec.js.map +1 -1
  462. package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
  463. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +118 -41
  464. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  465. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js +6 -18
  466. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +1 -1
  467. package/react/components/smartDesktopDesigner/tests/Export.spec.js +14 -22
  468. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +1 -1
  469. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js +2 -6
  470. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +1 -1
  471. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js +2 -2
  472. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +1 -1
  473. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js +2 -2
  474. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +1 -1
  475. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js +2 -2
  476. package/react/components/smartDesktopDesigner/tests/ProjectHeader.spec.js.map +1 -1
  477. package/react/components/smartDesktopDesigner/tests/Publish.spec.js +3 -10
  478. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +1 -1
  479. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js +2 -6
  480. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +1 -1
  481. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +3 -3
  482. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  483. package/react/components/smartDesktopDesigner/tests/Themes.spec.js +7 -7
  484. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +1 -1
  485. package/react/components/smartDesktopDesigner/tests/a11y_helper.js +2 -1
  486. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +1 -1
  487. package/react/components/system/System.spec.js +1 -1
  488. package/react/components/system/System.spec.js.map +1 -1
  489. package/react/components/system/SystemTrayComponentShell.js +1 -1
  490. package/react/components/system/SystemTrayComponentShell.js.map +1 -1
  491. package/react/components/toolbar/MinimizeAll.spec.js +5 -5
  492. package/react/components/toolbar/MinimizeAll.spec.js.map +1 -1
  493. package/react/components/toolbar/NotificationControl.js +3 -2
  494. package/react/components/toolbar/NotificationControl.js.map +1 -1
  495. package/react/components/toolbar/RevealAll.spec.js +5 -5
  496. package/react/components/toolbar/RevealAll.spec.js.map +1 -1
  497. package/react/components/toolbar/ToolbarIcon.js +14 -2
  498. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  499. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +22 -5
  500. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js +11 -6
  501. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  502. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js +21 -9
  503. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncherMenu.js.map +1 -1
  504. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.d.ts +33 -10
  505. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js +24 -3
  506. package/react/components/toolbar/advancedAppLauncher/components/AddNewAppForm.js.map +1 -1
  507. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.d.ts +3 -3
  508. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js +0 -3
  509. package/react/components/toolbar/advancedAppLauncher/components/AddNewFolder.js.map +1 -1
  510. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.d.ts +24 -8
  511. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +4 -2
  512. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  513. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +18 -4
  514. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js +5 -4
  515. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  516. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.d.ts +14 -6
  517. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js +2 -2
  518. package/react/components/toolbar/advancedAppLauncher/components/AppTagsList.js.map +1 -1
  519. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +34 -13
  520. package/react/components/toolbar/advancedAppLauncher/components/Content.js +22 -29
  521. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  522. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.d.ts +15 -5
  523. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js +4 -3
  524. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  525. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +38 -21
  526. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +14 -9
  527. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  528. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.d.ts +18 -3
  529. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js +7 -3
  530. package/react/components/toolbar/advancedAppLauncher/components/LeftNavBottomLinks.js.map +1 -1
  531. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.d.ts +10 -3
  532. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js +1 -3
  533. package/react/components/toolbar/advancedAppLauncher/components/NoAppsFound.js.map +1 -1
  534. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.d.ts +15 -6
  535. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js +11 -6
  536. package/react/components/toolbar/advancedAppLauncher/components/SearchBox.js.map +1 -1
  537. package/react/components/toolbar/advancedAppLauncher/components/SortBy.d.ts +11 -4
  538. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js +3 -2
  539. package/react/components/toolbar/advancedAppLauncher/components/SortBy.js.map +1 -1
  540. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +18 -6
  541. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js +2 -2
  542. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  543. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.d.ts +20 -4
  544. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js +2 -4
  545. package/react/components/toolbar/advancedAppLauncher/components/TagsMenu.js.map +1 -1
  546. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.d.ts +5 -1
  547. package/react/components/toolbar/advancedAppLauncher/modules/AppDirectory.js.map +1 -1
  548. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.d.ts +15 -10
  549. package/react/components/toolbar/advancedAppLauncher/modules/FDC3.js.map +1 -1
  550. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +5 -2
  551. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js +1 -1
  552. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  553. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +5 -4
  554. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  555. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.d.ts +7 -6
  556. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js +11 -13
  557. package/react/components/toolbar/advancedAppLauncher/utils/sort-functions.js.map +1 -1
  558. package/react/components/toolbar/appLauncher/AppLauncherMenu.d.ts +3 -3
  559. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +1 -1
  560. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  561. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +1 -1
  562. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.d.ts +25 -3
  563. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js +3 -10
  564. package/react/components/toolbar/appLauncher/StaticAppLauncherMenu.js.map +1 -1
  565. package/react/components/toolbar/appLauncher/components/componentList.d.ts +34 -6
  566. package/react/components/toolbar/appLauncher/components/componentList.js +24 -21
  567. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  568. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +32 -32
  569. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js +37 -55
  570. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  571. package/react/components/toolbar/dashbar/Dashbar.js +24 -13
  572. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  573. package/react/components/toolbar/dashbar/DashbarItem.js +1 -1
  574. package/react/components/toolbar/dashbar/DashbarItem.js.map +1 -1
  575. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +28 -5
  576. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js +17 -23
  577. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  578. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +25 -3
  579. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  580. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.d.ts +13 -8
  581. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js +2 -2
  582. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceActions.js.map +1 -1
  583. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +16 -8
  584. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js +0 -3
  585. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  586. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +65 -11
  587. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +95 -145
  588. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  589. package/react/components/userPreferences/UserPreferenceTypes.d.ts +5 -0
  590. package/react/components/userPreferences/UserPreferenceTypes.js +2 -0
  591. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -0
  592. package/react/components/userPreferences/UserPreferences.js +8 -23
  593. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  594. package/react/components/userPreferences/UserPreferencesBase.d.ts +3 -1
  595. package/react/components/userPreferences/UserPreferencesBase.js +5 -6
  596. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  597. package/react/components/userPreferences/UserPreferencesWrapper.d.ts +4 -0
  598. package/react/components/userPreferences/UserPreferencesWrapper.js +27 -0
  599. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -0
  600. package/react/components/userPreferences/components/ContentSection.d.ts +18 -3
  601. package/react/components/userPreferences/components/ContentSection.js +6 -3
  602. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  603. package/react/components/userPreferences/components/LeftNav.d.ts +19 -4
  604. package/react/components/userPreferences/components/LeftNav.js +12 -11
  605. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  606. package/react/components/userPreferences/components/content/DashbarEditor.d.ts +20 -5
  607. package/react/components/userPreferences/components/content/DashbarEditor.js +11 -11
  608. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  609. package/react/components/userPreferences/components/content/DashbarEditorItem.d.ts +10 -0
  610. package/react/components/userPreferences/components/content/DashbarEditorItem.js +11 -0
  611. package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -0
  612. package/react/components/userPreferences/components/content/General.d.ts +10 -3
  613. package/react/components/userPreferences/components/content/General.js +2 -2
  614. package/react/components/userPreferences/components/content/General.js.map +1 -1
  615. package/react/components/userPreferences/components/content/Notifications.js +2 -0
  616. package/react/components/userPreferences/components/content/Notifications.js.map +1 -1
  617. package/react/components/userPreferences/components/content/Workspaces.js +51 -113
  618. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  619. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +56 -61
  620. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  621. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.d.ts +1 -1
  622. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +17 -15
  623. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  624. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.d.ts +3 -1
  625. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +15 -16
  626. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  627. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js +6 -6
  628. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  629. package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +24 -7
  630. package/react/components/userPreferences/components/general/ScheduledRestart.js +71 -23
  631. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  632. package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +8 -0
  633. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +9 -0
  634. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -0
  635. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.d.ts +6 -0
  636. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +11 -0
  637. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -0
  638. package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +45 -0
  639. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +89 -0
  640. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -0
  641. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.d.ts +8 -0
  642. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +21 -0
  643. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -0
  644. package/react/components/userPreferences/index.d.ts +1 -1
  645. package/react/components/userPreferences/index.js +1 -1
  646. package/react/components/userPreferences/index.js.map +1 -1
  647. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +12 -13
  648. package/react/components/userPreferences/stores/UserPreferencesStore.js +13 -25
  649. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  650. package/react/components/userPreferences/stories/DashbarEditor.stories.d.ts +2 -1
  651. package/react/components/userPreferences/stories/DashbarEditor.stories.js +35 -4
  652. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  653. package/react/components/userPreferences/stories/DashbarEditorItem.stories.d.ts +11 -0
  654. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +21 -0
  655. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -0
  656. package/react/components/userPreferences/stories/General.stories.d.ts +9 -0
  657. package/react/components/userPreferences/stories/General.stories.js +16 -0
  658. package/react/components/userPreferences/stories/General.stories.js.map +1 -0
  659. package/react/components/userPreferences/stories/Notifications.stories.d.ts +9 -0
  660. package/react/components/userPreferences/stories/Notifications.stories.js +17 -0
  661. package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -0
  662. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.d.ts +9 -0
  663. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +20 -0
  664. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -0
  665. package/react/components/userPreferences/stories/NotificationsSources.stories.d.ts +12 -0
  666. package/react/components/userPreferences/stories/NotificationsSources.stories.js +28 -0
  667. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -0
  668. package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +8 -0
  669. package/react/components/userPreferences/stories/UserPreferences.stories.js +53 -0
  670. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -0
  671. package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +11 -0
  672. package/react/components/userPreferences/stories/WorkspaceButton.stories.js +20 -0
  673. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -0
  674. package/react/components/userPreferences/stories/WorkspaceComponents.stories.d.ts +13 -0
  675. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js +26 -0
  676. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -0
  677. package/react/components/userPreferences/stories/WorkspaceItem.stories.d.ts +9 -0
  678. package/react/components/userPreferences/stories/WorkspaceItem.stories.js +30 -0
  679. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -0
  680. package/react/components/userPreferences/stories/WorkspaceItemList.stories.d.ts +10 -0
  681. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js +57 -0
  682. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -0
  683. package/react/components/userPreferences/stories/Workspaces.stories.d.ts +9 -0
  684. package/react/components/userPreferences/stories/Workspaces.stories.js +44 -0
  685. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -0
  686. package/react/components/userPreferences/tests/ContentSection.spec.d.ts +1 -0
  687. package/react/components/userPreferences/tests/ContentSection.spec.js +41 -0
  688. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -0
  689. package/react/components/userPreferences/tests/DashbarEditor.spec.d.ts +1 -0
  690. package/react/components/userPreferences/tests/DashbarEditor.spec.js +37 -0
  691. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -0
  692. package/react/components/userPreferences/tests/DashbarEditorItem.spec.d.ts +1 -0
  693. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js +38 -0
  694. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -0
  695. package/react/components/userPreferences/tests/General.spec.d.ts +1 -0
  696. package/react/components/userPreferences/tests/General.spec.js +28 -0
  697. package/react/components/userPreferences/tests/General.spec.js.map +1 -0
  698. package/react/components/userPreferences/tests/LeftNav.spec.d.ts +1 -0
  699. package/react/components/userPreferences/tests/LeftNav.spec.js +12 -0
  700. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -0
  701. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.d.ts +1 -0
  702. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js +14 -0
  703. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -0
  704. package/react/components/userPreferences/tests/Notifications.spec.d.ts +1 -0
  705. package/react/components/userPreferences/tests/Notifications.spec.js +17 -0
  706. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -0
  707. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.d.ts +1 -0
  708. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +39 -0
  709. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -0
  710. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.d.ts +1 -0
  711. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js +22 -0
  712. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -0
  713. package/react/components/userPreferences/tests/ScheduledRestart.spec.d.ts +1 -0
  714. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +70 -0
  715. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -0
  716. package/react/components/userPreferences/tests/WorkspaceButton.spec.d.ts +1 -0
  717. package/react/components/userPreferences/tests/WorkspaceButton.spec.js +38 -0
  718. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -0
  719. package/react/components/userPreferences/tests/WorkspaceComponents.spec.d.ts +1 -0
  720. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +22 -0
  721. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -0
  722. package/react/components/userPreferences/tests/WorkspaceItem.spec.d.ts +1 -0
  723. package/react/components/userPreferences/tests/WorkspaceItem.spec.js +64 -0
  724. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -0
  725. package/react/components/userPreferences/tests/WorkspaceItemList.spec.d.ts +1 -0
  726. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js +45 -0
  727. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -0
  728. package/react/components/utils.js +1 -1
  729. package/react/components/utils.js.map +1 -1
  730. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +58 -31
  731. package/react/components/windowTitleBar/WindowTitleBarShell.js +47 -50
  732. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  733. package/react/components/windowTitleBar/components/center/Tab.d.ts +27 -7
  734. package/react/components/windowTitleBar/components/center/Tab.js +2 -2
  735. package/react/components/windowTitleBar/components/center/Tab.js.map +1 -1
  736. package/react/components/windowTitleBar/components/center/TabList.d.ts +43 -30
  737. package/react/components/windowTitleBar/components/center/TabList.js +111 -37
  738. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  739. package/react/components/windowTitleBar/components/left/LinkerButton.js +5 -4
  740. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  741. package/react/components/windowTitleBar/components/left/LinkerButtonDeprecated.d.ts +1 -21
  742. package/react/components/windowTitleBar/components/left/LinkerGroups.js +6 -8
  743. package/react/components/windowTitleBar/components/left/LinkerGroups.js.map +1 -1
  744. package/react/components/windowTitleBar/components/left/ShareButton.d.ts +1 -21
  745. package/react/components/windowTitleBar/components/right/CloseButton.d.ts +12 -25
  746. package/react/components/windowTitleBar/components/right/CloseButton.js.map +1 -1
  747. package/react/components/windowTitleBar/components/right/GroupingButton.d.ts +17 -26
  748. package/react/components/windowTitleBar/components/right/GroupingButton.js +2 -2
  749. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  750. package/react/components/windowTitleBar/components/right/MaximizeButton.d.ts +1 -21
  751. package/react/components/windowTitleBar/components/right/MinimizeButton.d.ts +12 -25
  752. package/react/components/windowTitleBar/components/right/MinimizeButton.js.map +1 -1
  753. package/react/components/windowTitleBar/components/windowTitle.js +11 -6
  754. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  755. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +51 -44
  756. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +63 -56
  757. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  758. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.d.ts +42 -44
  759. package/react/components/windowTitleBar/stores/windowTitleBarStoreDefaults.js.map +1 -1
  760. package/react/components/windowTitleBar/windowTitleBarContext.d.ts +9 -9
  761. package/react/components/windowTitleBar/windowTitleBarContext.js +2 -4
  762. package/react/components/windowTitleBar/windowTitleBarContext.js.map +1 -1
  763. package/react/components/yesNoDialog/Timer.spec.js +2 -2
  764. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  765. package/react/components/yesNoDialog/Timer.stories.js +1 -1
  766. package/react/components/yesNoDialog/Timer.stories.js.map +1 -1
  767. package/react/components/yesNoDialog/YesNoDialog.spec.js +5 -5
  768. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  769. package/react/components/yesNoDialog/YesNoDialog.stories.js +1 -1
  770. package/react/components/yesNoDialog/YesNoDialog.stories.js.map +1 -1
  771. package/react/hooks/useFavoritesShell.js.map +1 -1
  772. package/react/hooks/useLinker.js +1 -1
  773. package/react/hooks/useLinker.js.map +1 -1
  774. package/react/hooks/useMenu.js +1 -1
  775. package/react/hooks/useMenu.js.map +1 -1
  776. package/react/hooks/useNotifications.d.ts +10 -6
  777. package/react/hooks/useNotifications.js +53 -47
  778. package/react/hooks/useNotifications.js.map +1 -1
  779. package/react/hooks/usePubSub.js.map +1 -1
  780. package/react/hooks/useSearch.js +1 -1
  781. package/react/hooks/useSearch.js.map +1 -1
  782. package/react/hooks/useToolbar.js +71 -48
  783. package/react/hooks/useToolbar.js.map +1 -1
  784. package/react/hooks/useWorkspace.js +1 -1
  785. package/react/hooks/useWorkspace.js.map +1 -1
  786. package/react/reducers/favoriteReducer.js +1 -1
  787. package/react/reducers/favoriteReducer.js.map +1 -1
  788. package/react/reducers/rootReducer.d.ts +3 -4
  789. package/react/reducers/toolbarReducer.js +1 -1
  790. package/react/reducers/toolbarReducer.js.map +1 -1
  791. package/react/store.d.ts +6 -7
  792. package/react/types/advancedAppLauncherTypes.d.ts +28 -1
  793. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  794. package/react/types/dashbarTypes.d.ts +1 -1
  795. package/react/types/dashbarTypes.js.map +1 -1
  796. package/react/types/favoriteTypes.d.ts +1 -1
  797. package/react/types/favoriteTypes.js.map +1 -1
  798. package/react/types/fdc3.d.ts +28 -20
  799. package/react/types/fdc3.js.map +1 -1
  800. package/react/types/smartDesktopDesignerTypes.d.ts +13 -8
  801. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  802. package/react/types/windowTitleBar.d.ts +46 -0
  803. package/react/types/windowTitleBar.js +2 -0
  804. package/react/types/windowTitleBar.js.map +1 -0
  805. package/react/components/processMonitor/components/ChildWindows.d.ts +0 -4
  806. package/react/components/processMonitor/components/ChildWindows.js +0 -11
  807. package/react/components/processMonitor/components/ChildWindows.js.map +0 -1
  808. package/react/components/shared/addProtocolToValidURL.spec.js.map +0 -1
  809. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.d.ts +0 -4
  810. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js +0 -14
  811. package/react/components/toolbar/advancedAppLauncher/components/LeftNav.js.map +0 -1
  812. package/react/components/userPreferences/components/Checkbox.d.ts +0 -4
  813. package/react/components/userPreferences/components/Checkbox.js +0 -27
  814. package/react/components/userPreferences/components/Checkbox.js.map +0 -1
@@ -1,10 +1,5 @@
1
1
  import React from "react";
2
2
  import "./css/drop-zone.css";
3
- declare global {
4
- interface Window {
5
- File: object;
6
- }
7
- }
8
3
  export declare type FileWithPath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,CAAC,CAAC,CAAC,CACH,6BACC,SAAS,EAAE,YAAY,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,EACnF,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,aAAa,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,EACD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,aAAa,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,EACD,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,aAAa,CAAC,KAAK,CAAC,CAAC;YAErB,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC;YACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;oBACtB,SAAS;iBACT;gBACD,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACzB;YAED,eAAe,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,IAEA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\nimport \"./css/drop-zone.css\";\r\n\r\ndeclare global {\r\n\tinterface Window {\r\n\t\tFile: object;\r\n\t}\r\n}\r\n\r\n// Electron adds File.path\r\nexport type FileWithPath = File & { path?: string };\r\n\r\nexport type DropZoneProps = {\r\n\tchildren: React.ReactNode;\r\n\tprocessFile: (fileObj: FileWithPath, index: number) => void;\r\n\tsuppress?: boolean;\r\n};\r\n\r\n/***\r\n * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for\r\n * drag-and-drop.\r\n *\r\n * The DropZone component is intended to be a container element for other elements, such as text, lists,\r\n * images, input elements, etc.\r\n *\r\n * @callback processFile - This function will be called for each file that is dropped in the dropzone.\r\n * @param {ReactNode} children - React will fill this in.\r\n * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div\r\n */\r\nexport const DropZone = ({ processFile, children, suppress = false }: DropZoneProps) => {\r\n\tconst [isDragging, setIsDragging] = useState(false);\r\n\tconst [potential, setPotential] = useState(false);\r\n\tconst [singleton, setSingleton] = useState(true);\r\n\r\n\tconst preventDefaults = (e: { preventDefault: Function; stopPropagation: Function }) => {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t};\r\n\r\n\t// Check if something is being dragged somewhere on the page\r\n\t// If dragging is happening on the page, there will be a visual indication for potential drop zone\r\n\tif (singleton) {\r\n\t\t// \"dragenter\" and \"dragleave\" events are fired off of every single child element, and counting them isn't reliable\r\n\t\t// so, when \"dragover\" events are fired, we know dragging is happening.\r\n\t\t// we will wait 100ms after the last \"dragover\" event is fired, and then turn off the potential zone.\r\n\t\tlet timeout: NodeJS.Timeout | null = null;\r\n\t\tdocument.addEventListener(\"dragover\", (e) => {\r\n\t\t\tpreventDefaults(e);\r\n\t\t\tsetPotential(true);\r\n\r\n\t\t\t// If timeout was previously set, clear it\r\n\t\t\tif (timeout !== null) {\r\n\t\t\t\tclearTimeout(timeout);\r\n\t\t\t}\r\n\r\n\t\t\t// Set a new timeout, now that we've gotten a new dragover event\r\n\t\t\ttimeout = setTimeout(() => {\r\n\t\t\t\t// If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.\r\n\t\t\t\tsetPotential(false);\r\n\t\t\t}, 100); // 100ms was chosen by trial and error.\r\n\t\t\t// 10ms was too little time, and caused flicker. 100ms doesn't have a flicker, and turns off potential without a noticeable delay\r\n\t\t});\r\n\t\tsetSingleton(false);\r\n\t}\r\n\r\n\treturn suppress ? (\r\n\t\t<>{children}</>\r\n\t) : (\r\n\t\t<div\r\n\t\t\tclassName={`dropZone ${isDragging ? \"isDragging\" : potential ? \"isPotential\" : \"\"}`}\r\n\t\t\tonDragEnter={(e) => {\r\n\t\t\t\tpreventDefaults(e);\r\n\t\t\t\tsetIsDragging(true);\r\n\t\t\t}}\r\n\t\t\tonDragLeave={(e) => {\r\n\t\t\t\tpreventDefaults(e);\r\n\t\t\t\tsetIsDragging(false);\r\n\t\t\t}}\r\n\t\t\tonDrop={(e) => {\r\n\t\t\t\tsetIsDragging(false);\r\n\r\n\t\t\t\tconst { files } = e.dataTransfer;\r\n\t\t\t\tfor (let i = 0; i < files.length; i++) {\r\n\t\t\t\t\tif (files[i] === null) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprocessFile(files[i], i);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpreventDefaults(e);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"DropZone.js","sourceRoot":"","sources":["../../../src/components/common/DropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,qBAAqB,CAAC;AAsB7B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAiB,EAAE,EAAE;IACtF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,CAAC,CAA0D,EAAE,EAAE;QACtF,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,eAAe,E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CAAC,KAAK,IAAI,EAAE;oBACtB,SAAS;iBACT;gBACD,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACzB;YAED,eAAe,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,IAEA,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\r\nimport \"./css/drop-zone.css\";\r\n\r\n// Electron adds File.path\r\nexport type FileWithPath = File & { path?: string };\r\n\r\nexport type DropZoneProps = {\r\n\tchildren: React.ReactNode;\r\n\tprocessFile: (fileObj: FileWithPath, index: number) => void;\r\n\tsuppress?: boolean;\r\n};\r\n\r\n/***\r\n * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for\r\n * drag-and-drop.\r\n *\r\n * The DropZone component is intended to be a container element for other elements, such as text, lists,\r\n * images, input elements, etc.\r\n *\r\n * @callback processFile - This function will be called for each file that is dropped in the dropzone.\r\n * @param {ReactNode} children - React will fill this in.\r\n * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div\r\n */\r\nexport const DropZone = ({ processFile, children, suppress = false }: DropZoneProps) => {\r\n\tconst [isDragging, setIsDragging] = useState(false);\r\n\tconst [potential, setPotential] = useState(false);\r\n\tconst [singleton, setSingleton] = useState(true);\r\n\r\n\tconst preventDefaults = (e: { preventDefault: Function; stopPropagation: Function }) => {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t};\r\n\r\n\t// Check if something is being dragged somewhere on the page\r\n\t// If dragging is happening on the page, there will be a visual indication for potential drop zone\r\n\tif (singleton) {\r\n\t\t// \"dragenter\" and \"dragleave\" events are fired off of every single child element, and counting them isn't reliable\r\n\t\t// so, when \"dragover\" events are fired, we know dragging is happening.\r\n\t\t// we will wait 100ms after the last \"dragover\" event is fired, and then turn off the potential zone.\r\n\t\tlet timeout: NodeJS.Timeout | null = null;\r\n\t\tdocument.addEventListener(\"dragover\", (e) => {\r\n\t\t\tpreventDefaults(e);\r\n\t\t\tsetPotential(true);\r\n\r\n\t\t\t// If timeout was previously set, clear it\r\n\t\t\tif (timeout !== null) {\r\n\t\t\t\tclearTimeout(timeout);\r\n\t\t\t}\r\n\r\n\t\t\t// Set a new timeout, now that we've gotten a new dragover event\r\n\t\t\ttimeout = setTimeout(() => {\r\n\t\t\t\t// If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.\r\n\t\t\t\tsetPotential(false);\r\n\t\t\t}, 100); // 100ms was chosen by trial and error.\r\n\t\t\t// 10ms was too little time, and caused flicker. 100ms doesn't have a flicker, and turns off potential without a noticeable delay\r\n\t\t});\r\n\t\tsetSingleton(false);\r\n\t}\r\n\r\n\treturn suppress ? (\r\n\t\t<>{children}</>\r\n\t) : (\r\n\t\t<div\r\n\t\t\tclassName={`dropZone ${isDragging ? \"isDragging\" : potential ? \"isPotential\" : \"\"}`}\r\n\t\t\tonDragEnter={(e) => {\r\n\t\t\t\tpreventDefaults(e);\r\n\t\t\t\tsetIsDragging(true);\r\n\t\t\t}}\r\n\t\t\tonDragLeave={(e) => {\r\n\t\t\t\tpreventDefaults(e);\r\n\t\t\t\tsetIsDragging(false);\r\n\t\t\t}}\r\n\t\t\tonDrop={(e) => {\r\n\t\t\t\tsetIsDragging(false);\r\n\r\n\t\t\t\tconst { files } = e.dataTransfer;\r\n\t\t\t\tfor (let i = 0; i < files.length; i++) {\r\n\t\t\t\t\tif (files[i] === null) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprocessFile(files[i], i);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpreventDefaults(e);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
@@ -25,7 +25,7 @@ const DropdownButton = ({ buttonLabel = "Label", buttonOptions = [], mainAction,
25
25
  React.createElement("div", { className: "finsemble-dropdown-action__btn" },
26
26
  React.createElement("span", { className: "btn-label", onClick: buttonAction }, buttonLabel),
27
27
  React.createElement("span", { className: "separator" }),
28
- React.createElement("div", { className: "expand-options", onClick: (event) => setExpanded(!expanded) },
28
+ React.createElement("div", { className: "expand-options", onClick: () => setExpanded(!expanded) },
29
29
  React.createElement("span", { className: "caret" }))),
30
30
  expanded ? React.createElement("div", { className: "finsemble-dropdown-action__btn-options" }, options) : null));
31
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/components/common/DropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAS9E,MAAM,cAAc,GAAiE,CAAC,EACrF,WAAW,GAAG,OAAO,EACrB,aAAa,GAAG,EAAE,EAClB,UAAU,GAC2B,EAAE,EAAE;IACzC,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,uBAAuB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9D,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CACpD,6BACC,GAAG,EAAE,KAAK,EACV,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,GAAG,EAAE;YACb,MAAM,CAAC,YAAY,EAAE,CAAC;YACtB,WAAW,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC,IAEA,MAAM,CAAC,WAAW,CACd,CACN,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,IAAI,QAAQ,EAAE;YACb,WAAW,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO;SACP;QAED,IAAI,UAAU,EAAE;YACf,UAAU,EAAE,CAAC;SACb;aAAM;YACN,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC;SAC7B;IACF,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,0CAA0C;QACzE,6BAAK,SAAS,EAAC,gCAAgC;YAC9C,8BAAM,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,YAAY,IAC/C,WAAW,CACN;YACP,8BAAM,SAAS,EAAC,WAAW,GAAQ;YACnC,6BAAK,SAAS,EAAC,gBAAgB,EAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC;gBACzE,8BAAM,SAAS,EAAC,OAAO,GAAQ,CAC1B,CACD;QACL,QAAQ,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,wCAAwC,IAAE,OAAO,CAAO,CAAC,CAAC,CAAC,IAAI,CACrF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useState, useRef } from \"react\";\r\nimport \"../../assets/css/button.css\";\r\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\r\nimport { IFinsembleButtonProps } from \"../shared/Button\";\r\n\r\nexport interface IFinsembleDropdownActionButtonProps {\r\n\tbuttonLabel: string;\r\n\tbuttonOptions: Array<IFinsembleButtonProps>;\r\n\tmainAction: Function;\r\n}\r\n\r\nconst DropdownButton: React.FunctionComponent<IFinsembleDropdownActionButtonProps> = ({\r\n\tbuttonLabel = \"Label\",\r\n\tbuttonOptions = [],\r\n\tmainAction,\r\n}: IFinsembleDropdownActionButtonProps) => {\r\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\r\n\tconst [expanded, setExpanded] = useState(false);\r\n\r\n\tuseOutsideClickDetector(wrapperRef, () => setExpanded(false));\r\n\r\n\tconst options = buttonOptions.map((option, index) => (\r\n\t\t<div\r\n\t\t\tkey={index}\r\n\t\t\tclassName=\"finsemble-dropdown-action__btn-option\"\r\n\t\t\tonClick={() => {\r\n\t\t\t\toption.clickHandler();\r\n\t\t\t\tsetExpanded(false);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{option.buttonLabel}\r\n\t\t</div>\r\n\t));\r\n\r\n\tconst buttonAction = () => {\r\n\t\tif (expanded) {\r\n\t\t\tsetExpanded(false);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (mainAction) {\r\n\t\t\tmainAction();\r\n\t\t} else {\r\n\t\t\t() => setExpanded(!expanded);\r\n\t\t}\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div ref={wrapperRef} className=\"finsemble-dropdown-action__btn-container\">\r\n\t\t\t<div className=\"finsemble-dropdown-action__btn\">\r\n\t\t\t\t<span className=\"btn-label\" onClick={buttonAction}>\r\n\t\t\t\t\t{buttonLabel}\r\n\t\t\t\t</span>\r\n\t\t\t\t<span className=\"separator\"></span>\r\n\t\t\t\t<div className=\"expand-options\" onClick={(event) => setExpanded(!expanded)}>\r\n\t\t\t\t\t<span className=\"caret\"></span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t{expanded ? <div className=\"finsemble-dropdown-action__btn-options\">{options}</div> : null}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default DropdownButton;\r\n"]}
1
+ {"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/components/common/DropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAS9E,MAAM,cAAc,GAAiE,CAAC,EACrF,WAAW,GAAG,OAAO,EACrB,aAAa,GAAG,EAAE,EAClB,UAAU,GAC2B,EAAE,EAAE;IACzC,MAAM,UAAU,GAA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F,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useState, useRef } from \"react\";\r\nimport \"../../assets/css/button.css\";\r\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\r\nimport { IFinsembleButtonProps } from \"../shared/Button\";\r\n\r\nexport interface IFinsembleDropdownActionButtonProps {\r\n\tbuttonLabel: string;\r\n\tbuttonOptions: Array<IFinsembleButtonProps>;\r\n\tmainAction: Function;\r\n}\r\n\r\nconst DropdownButton: React.FunctionComponent<IFinsembleDropdownActionButtonProps> = ({\r\n\tbuttonLabel = \"Label\",\r\n\tbuttonOptions = [],\r\n\tmainAction,\r\n}: IFinsembleDropdownActionButtonProps) => {\r\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\r\n\tconst [expanded, setExpanded] = useState(false);\r\n\r\n\tuseOutsideClickDetector(wrapperRef, () => setExpanded(false));\r\n\r\n\tconst options = buttonOptions.map((option, index) => (\r\n\t\t<div\r\n\t\t\tkey={index}\r\n\t\t\tclassName=\"finsemble-dropdown-action__btn-option\"\r\n\t\t\tonClick={() => {\r\n\t\t\t\toption.clickHandler();\r\n\t\t\t\tsetExpanded(false);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{option.buttonLabel}\r\n\t\t</div>\r\n\t));\r\n\r\n\tconst buttonAction = () => {\r\n\t\tif (expanded) {\r\n\t\t\tsetExpanded(false);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (mainAction) {\r\n\t\t\tmainAction();\r\n\t\t} else {\r\n\t\t\t() => setExpanded(!expanded);\r\n\t\t}\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div ref={wrapperRef} className=\"finsemble-dropdown-action__btn-container\">\r\n\t\t\t<div className=\"finsemble-dropdown-action__btn\">\r\n\t\t\t\t<span className=\"btn-label\" onClick={buttonAction}>\r\n\t\t\t\t\t{buttonLabel}\r\n\t\t\t\t</span>\r\n\t\t\t\t<span className=\"separator\"></span>\r\n\t\t\t\t<div className=\"expand-options\" onClick={() => setExpanded(!expanded)}>\r\n\t\t\t\t\t<span className=\"caret\"></span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t{expanded ? <div className=\"finsemble-dropdown-action__btn-options\">{options}</div> : null}\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nexport default DropdownButton;\r\n"]}
@@ -4,11 +4,6 @@
4
4
  */
5
5
  /// <reference types="react" />
6
6
  import "./css/file-input.css";
7
- declare global {
8
- interface Window {
9
- File: object;
10
- }
11
- }
12
7
  export declare type FileInputUploadCb = (fileObject: File, cb?: (progress: number) => void) => Promise<{
13
8
  err: string | null;
14
9
  path: string;
@@ -36,7 +36,7 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
36
36
  dispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));
37
37
  setErrorMessage(null);
38
38
  setPath(successPath);
39
- onSetValue?.(successPath);
39
+ onSetValue === null || onSetValue === void 0 ? void 0 : onSetValue(successPath);
40
40
  fileInput.value = "";
41
41
  }
42
42
  };
@@ -48,12 +48,9 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
48
48
  return;
49
49
  }
50
50
  setIsUploading(true);
51
- uploadFunction?.(fileObj, (progress) => {
51
+ uploadFunction === null || uploadFunction === void 0 ? void 0 : uploadFunction(fileObj, (progress) => {
52
52
  setUploadProgress(progress);
53
- })
54
- .then(uploadSuccess)
55
- .catch(uploadError)
56
- .finally(() => {
53
+ }).then(uploadSuccess).catch(uploadError).finally(() => {
57
54
  setIsUploading(false);
58
55
  setUploadProgress(0);
59
56
  });
@@ -62,7 +59,7 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
62
59
  if (shouldUpload) {
63
60
  uploadFile(fileObj);
64
61
  }
65
- else if (fileObj?.path) {
62
+ else if (fileObj === null || fileObj === void 0 ? void 0 : fileObj.path) {
66
63
  uploadSuccess({
67
64
  err: null,
68
65
  path: fileObj.path,
@@ -76,7 +73,8 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
76
73
  setPath(value || "");
77
74
  }, [value]);
78
75
  const onFileChange = (e) => {
79
- const fileObj = e.target.files?.[0];
76
+ var _a;
77
+ const fileObj = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
80
78
  if (fileObj !== undefined) {
81
79
  processFile(fileObj);
82
80
  }
@@ -96,7 +94,7 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
96
94
  fileInputElement.current.click();
97
95
  } })),
98
96
  React.createElement("div", { className: "file-input-value" },
99
- React.createElement("input", { className: "file-input-value-input", type: "text", disabled: true, value: path, "aria-invalid": isInvalid, ...{ id } }),
97
+ React.createElement("input", Object.assign({ className: "file-input-value-input", type: "text", disabled: true, value: path, "aria-invalid": isInvalid }, { id })),
100
98
  errorMessage && React.createElement("div", { className: "file-input-error" }, errorMessage)),
101
99
  React.createElement("div", { className: "file-input-status" }, isUploading ? (React.createElement("div", { className: "file-input-progress-container" },
102
100
  uploadProgress,
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/components/common/FileInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAwBlD,MAAM,uBAAuB,GAAiB;IAC7C,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,iDAAi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,EAAE,IAAI,kBACG,SAAS,KACnB,EAAE,EAAE,EAAE,GACF;gBACR,YAAY,IAAI,6BAAK,SAAS,EAAC,kBAAkB,IAAE,YAAY,CAAO,CAClE;YACN,6BAAK,SAAS,EAAC,mBAAmB,IAChC,WAAW,CAAC,CAAC,CAAC,CACd,6BAAK,SAAS,EAAC,+BAA+B;gBAAE,cAAc;6BAAiB,CAC/E,CAAC,CAAC,CAAC,CACH,CAAC,YAAY,IAAI,yCAAK,CACtB,CACI,CACD,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useRef, useEffect } from \"react\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { useDispatch } from \"../../store\";\r\nimport { ProjectError } from \"../../types/smartDesktopDesignerTypes\";\r\n\r\nimport { Button } from \"./Button\";\r\nimport \"./css/file-input.css\";\r\n\r\nimport { DropZone, FileWithPath } from \"./DropZone\";\r\nimport { validateFilename } from \"./file_helpers\";\r\n\r\ndeclare global {\r\n\tinterface Window {\r\n\t\tFile: object;\r\n\t}\r\n}\r\n\r\nexport type FileInputUploadCb = (\r\n\tfileObject: File,\r\n\tcb?: (progress: number) => void\r\n) => Promise<{ err: string | null; path: string }>;\r\n\r\nexport type FileInputProps = {\r\n\tacceptTypes: string[];\r\n\tvalue: string;\r\n\tid?: string;\r\n\tshouldUpload?: boolean;\r\n\tonSetValue?: (value: string) => void;\r\n\tuploadFunction?: FileInputUploadCb;\r\n\tpresetFile?: null | File;\r\n\tsuppressDropzone?: boolean;\r\n};\r\n\r\nconst INVALID_FILE_TYPE_ERROR: ProjectError = {\r\n\tviewId: \"themes\",\r\n\tmessage: \"Your uploaded file is not in the correct format\",\r\n};\r\n\r\nconst defaultUploadFunction = async () => {\r\n\treturn { err: null, path: \"\" };\r\n};\r\n\r\n/**\r\n * A Browse button with a hidden file input to allow for a file select dialog and extraction of a path\r\n *\r\n * @param {FileInputProps} { acceptTypes, value, onSetValue, shouldUpload=true, uploadFunction = defaultUploadFunction}\r\n * @return {*}\r\n */\r\nexport const FileInput = ({\r\n\tacceptTypes,\r\n\tvalue,\r\n\tonSetValue,\r\n\tid,\r\n\tshouldUpload = true,\r\n\tuploadFunction = defaultUploadFunction,\r\n\tpresetFile = null,\r\n\tsuppressDropzone = false,\r\n}: FileInputProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst fileInputElement = useRef({} as HTMLInputElement);\r\n\tconst [isUploading, setIsUploading] = useState(false);\r\n\tconst [uploadProgress, setUploadProgress] = useState(0);\r\n\tconst [fileInput, setFileInput] = useState({} as HTMLInputElement); // cast to correct type so typescript doesn't complain\r\n\tconst [path, setPath] = useState(value || \"\");\r\n\tconst [errorMessage, setErrorMessage] = useState(null as string | null);\r\n\tconst [handedFile, setHandedFile] = useState<FileWithPath | null>(presetFile);\r\n\r\n\tconst isInvalid = validateFilename(acceptTypes, path);\r\n\r\n\tconst uploadSuccess = ({ err, path: successPath }: { err: string | null; path: string }) => {\r\n\t\tif (err) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.set_project_error(INVALID_FILE_TYPE_ERROR));\r\n\r\n\t\t\tsetErrorMessage(err);\r\n\t\t\tsetPath(\"\");\r\n\t\t} else {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));\r\n\t\t\tsetErrorMessage(null);\r\n\t\t\tsetPath(successPath);\r\n\r\n\t\t\tonSetValue?.(successPath);\r\n\r\n\t\t\tfileInput.value = \"\";\r\n\t\t}\r\n\t};\r\n\r\n\tconst uploadError = (err: string) => {\r\n\t\tsetErrorMessage(err);\r\n\t};\r\n\r\n\tconst uploadFile = (fileObj: FileWithPath | undefined) => {\r\n\t\t// If it's not a file, we can't do anything with it\r\n\t\tif (!(fileObj instanceof File)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsetIsUploading(true);\r\n\t\tuploadFunction?.(fileObj, (progress: number) => {\r\n\t\t\tsetUploadProgress(progress);\r\n\t\t})\r\n\t\t\t.then(uploadSuccess)\r\n\t\t\t.catch(uploadError)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tsetIsUploading(false);\r\n\t\t\t\tsetUploadProgress(0);\r\n\t\t\t});\r\n\t};\r\n\r\n\tconst processFile = (fileObj: FileWithPath) => {\r\n\t\tif (shouldUpload) {\r\n\t\t\tuploadFile(fileObj);\r\n\t\t} else if (fileObj?.path) {\r\n\t\t\t// If the consumer doesn't want the file actually uploaded, just return the file name\r\n\t\t\tuploadSuccess({\r\n\t\t\t\terr: null,\r\n\t\t\t\tpath: fileObj.path,\r\n\t\t\t});\r\n\t\t}\r\n\t\tsetIsUploading(false);\r\n\t\tsetUploadProgress(0);\r\n\t\tsetErrorMessage(null);\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tsetPath(value || \"\");\r\n\t}, [value]);\r\n\r\n\tconst onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n\t\tconst fileObj = e.target.files?.[0] as FileWithPath | undefined;\r\n\r\n\t\tif (fileObj !== undefined) {\r\n\t\t\tprocessFile(fileObj);\r\n\t\t}\r\n\r\n\t\tsetFileInput(e.target);\r\n\t};\r\n\r\n\t// Check if props updated\r\n\tif (handedFile !== presetFile) {\r\n\t\tsetHandedFile(presetFile);\r\n\t\tif (presetFile !== null) {\r\n\t\t\tuploadFile(presetFile);\r\n\t\t}\r\n\t}\r\n\r\n\treturn (\r\n\t\t<DropZone processFile={processFile} suppress={suppressDropzone}>\r\n\t\t\t<div className=\"file-input-container\">\r\n\t\t\t\t<div className=\"file-input-actions\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tref={fileInputElement}\r\n\t\t\t\t\t\ttype=\"file\"\r\n\t\t\t\t\t\tonChange={onFileChange}\r\n\t\t\t\t\t\taccept={acceptTypes.join(\", \")}\r\n\t\t\t\t\t\ttabIndex={-1}\r\n\t\t\t\t\t\taria-hidden=\"true\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<Button\r\n\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\ttext=\"Browse\"\r\n\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\tfileInputElement.current.click();\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"file-input-value\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tclassName=\"file-input-value-input\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\tvalue={path}\r\n\t\t\t\t\t\taria-invalid={isInvalid}\r\n\t\t\t\t\t\t{...{ id }}\r\n\t\t\t\t\t></input>\r\n\t\t\t\t\t{errorMessage && <div className=\"file-input-error\">{errorMessage}</div>}\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"file-input-status\">\r\n\t\t\t\t\t{isUploading ? (\r\n\t\t\t\t\t\t<div className=\"file-input-progress-container\">{uploadProgress}% uploaded</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t!errorMessage && <></>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</DropZone>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/components/common/FileInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAgB,MA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GAAG,EAAE;wBACb,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;oBAClC,CAAC,GACA,CACG;YACN,6BAAK,SAAS,EAAC,kBAAkB;gBAChC,6CACC,SAAS,EAAC,wBAAwB,EAClC,IAAI,EAAC,MAAM,EACX,QAAQ,QACR,KAAK,EAAE,IAAI,kBACG,SAAS,IACnB,EAAE,EAAE,EAAE,EACF;gBACR,YAAY,IAAI,6BAAK,SAAS,EAAC,kBAAkB,IAAE,YAAY,CAAO,CAClE;YACN,6BAAK,SAAS,EAAC,mBAAmB,IAChC,WAAW,CAAC,CAAC,CAAC,CACd,6BAAK,SAAS,EAAC,+BAA+B;gBAAE,cAAc;6BAAiB,CAC/E,CAAC,CAAC,CAAC,CACH,CAAC,YAAY,IAAI,yCAAK,CACtB,CACI,CACD,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useRef, useEffect } from \"react\";\r\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\r\nimport { useDispatch } from \"../../store\";\r\nimport { ProjectError } from \"../../types/smartDesktopDesignerTypes\";\r\n\r\nimport { Button } from \"./Button\";\r\nimport \"./css/file-input.css\";\r\n\r\nimport { DropZone, FileWithPath } from \"./DropZone\";\r\nimport { validateFilename } from \"./file_helpers\";\r\n\r\nexport type FileInputUploadCb = (\r\n\tfileObject: File,\r\n\tcb?: (progress: number) => void\r\n) => Promise<{ err: string | null; path: string }>;\r\n\r\nexport type FileInputProps = {\r\n\tacceptTypes: string[];\r\n\tvalue: string;\r\n\tid?: string;\r\n\tshouldUpload?: boolean;\r\n\tonSetValue?: (value: string) => void;\r\n\tuploadFunction?: FileInputUploadCb;\r\n\tpresetFile?: null | File;\r\n\tsuppressDropzone?: boolean;\r\n};\r\n\r\nconst INVALID_FILE_TYPE_ERROR: ProjectError = {\r\n\tviewId: \"themes\",\r\n\tmessage: \"Your uploaded file is not in the correct format\",\r\n};\r\n\r\nconst defaultUploadFunction = async () => {\r\n\treturn { err: null, path: \"\" };\r\n};\r\n\r\n/**\r\n * A Browse button with a hidden file input to allow for a file select dialog and extraction of a path\r\n *\r\n * @param {FileInputProps} { acceptTypes, value, onSetValue, shouldUpload=true, uploadFunction = defaultUploadFunction}\r\n * @return {*}\r\n */\r\nexport const FileInput = ({\r\n\tacceptTypes,\r\n\tvalue,\r\n\tonSetValue,\r\n\tid,\r\n\tshouldUpload = true,\r\n\tuploadFunction = defaultUploadFunction,\r\n\tpresetFile = null,\r\n\tsuppressDropzone = false,\r\n}: FileInputProps) => {\r\n\tconst dispatch = useDispatch();\r\n\tconst fileInputElement = useRef({} as HTMLInputElement);\r\n\tconst [isUploading, setIsUploading] = useState(false);\r\n\tconst [uploadProgress, setUploadProgress] = useState(0);\r\n\tconst [fileInput, setFileInput] = useState({} as HTMLInputElement); // cast to correct type so typescript doesn't complain\r\n\tconst [path, setPath] = useState(value || \"\");\r\n\tconst [errorMessage, setErrorMessage] = useState(null as string | null);\r\n\tconst [handedFile, setHandedFile] = useState<FileWithPath | null>(presetFile);\r\n\r\n\tconst isInvalid = validateFilename(acceptTypes, path);\r\n\r\n\tconst uploadSuccess = ({ err, path: successPath }: { err: string | null; path: string }) => {\r\n\t\tif (err) {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.set_project_error(INVALID_FILE_TYPE_ERROR));\r\n\r\n\t\t\tsetErrorMessage(err);\r\n\t\t\tsetPath(\"\");\r\n\t\t} else {\r\n\t\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));\r\n\t\t\tsetErrorMessage(null);\r\n\t\t\tsetPath(successPath);\r\n\r\n\t\t\tonSetValue?.(successPath);\r\n\r\n\t\t\tfileInput.value = \"\";\r\n\t\t}\r\n\t};\r\n\r\n\tconst uploadError = (err: string) => {\r\n\t\tsetErrorMessage(err);\r\n\t};\r\n\r\n\tconst uploadFile = (fileObj: FileWithPath | undefined) => {\r\n\t\t// If it's not a file, we can't do anything with it\r\n\t\tif (!(fileObj instanceof File)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsetIsUploading(true);\r\n\t\tuploadFunction?.(fileObj, (progress: number) => {\r\n\t\t\tsetUploadProgress(progress);\r\n\t\t})\r\n\t\t\t.then(uploadSuccess)\r\n\t\t\t.catch(uploadError)\r\n\t\t\t.finally(() => {\r\n\t\t\t\tsetIsUploading(false);\r\n\t\t\t\tsetUploadProgress(0);\r\n\t\t\t});\r\n\t};\r\n\r\n\tconst processFile = (fileObj: FileWithPath) => {\r\n\t\tif (shouldUpload) {\r\n\t\t\tuploadFile(fileObj);\r\n\t\t} else if (fileObj?.path) {\r\n\t\t\t// If the consumer doesn't want the file actually uploaded, just return the file name\r\n\t\t\tuploadSuccess({\r\n\t\t\t\terr: null,\r\n\t\t\t\tpath: fileObj.path,\r\n\t\t\t});\r\n\t\t}\r\n\t\tsetIsUploading(false);\r\n\t\tsetUploadProgress(0);\r\n\t\tsetErrorMessage(null);\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tsetPath(value || \"\");\r\n\t}, [value]);\r\n\r\n\tconst onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\r\n\t\tconst fileObj = e.target.files?.[0] as FileWithPath | undefined;\r\n\r\n\t\tif (fileObj !== undefined) {\r\n\t\t\tprocessFile(fileObj);\r\n\t\t}\r\n\r\n\t\tsetFileInput(e.target);\r\n\t};\r\n\r\n\t// Check if props updated\r\n\tif (handedFile !== presetFile) {\r\n\t\tsetHandedFile(presetFile);\r\n\t\tif (presetFile !== null) {\r\n\t\t\tuploadFile(presetFile);\r\n\t\t}\r\n\t}\r\n\r\n\treturn (\r\n\t\t<DropZone processFile={processFile} suppress={suppressDropzone}>\r\n\t\t\t<div className=\"file-input-container\">\r\n\t\t\t\t<div className=\"file-input-actions\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tref={fileInputElement}\r\n\t\t\t\t\t\ttype=\"file\"\r\n\t\t\t\t\t\tonChange={onFileChange}\r\n\t\t\t\t\t\taccept={acceptTypes.join(\", \")}\r\n\t\t\t\t\t\ttabIndex={-1}\r\n\t\t\t\t\t\taria-hidden=\"true\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<Button\r\n\t\t\t\t\t\tfashion=\"primary\"\r\n\t\t\t\t\t\ttext=\"Browse\"\r\n\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\tfileInputElement.current.click();\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"file-input-value\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tclassName=\"file-input-value-input\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tdisabled\r\n\t\t\t\t\t\tvalue={path}\r\n\t\t\t\t\t\taria-invalid={isInvalid}\r\n\t\t\t\t\t\t{...{ id }}\r\n\t\t\t\t\t></input>\r\n\t\t\t\t\t{errorMessage && <div className=\"file-input-error\">{errorMessage}</div>}\r\n\t\t\t\t</div>\r\n\t\t\t\t<div className=\"file-input-status\">\r\n\t\t\t\t\t{isUploading ? (\r\n\t\t\t\t\t\t<div className=\"file-input-progress-container\">{uploadProgress}% uploaded</div>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t!errorMessage && <></>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</DropZone>\r\n\t);\r\n};\r\n"]}
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import "./css/icon.css";
3
- export declare type FinsembleIcon = "check" | "chevron-left" | "chevron-right" | "copy" | "exclamation-circle" | "external-link" | "flag" | "font" | "folder" | "globe" | "hdd" | "key" | "life-ring" | "magic" | "moon" | "paint-roller" | "pencil" | "plus" | "question-circle" | "search" | "sun" | "times" | "toggle-off" | "toggle-on" | "tools" | "trash" | "upload" | "window";
3
+ export declare type FinsembleIconType = "check" | "check-square" | "chevron-left" | "chevron-right" | "copy" | "exclamation-circle" | "external-link" | "flag" | "font" | "folder" | "globe" | "hdd" | "key" | "life-ring" | "lock" | "magic" | "moon" | "paint-roller" | "pencil" | "plus" | "question-circle" | "search" | "sun" | "times" | "toggle-off" | "toggle-on" | "tools" | "trash" | "upload" | "window";
4
4
  export declare type FinsembleIconProps = {
5
- icon: FinsembleIcon;
5
+ icon: FinsembleIconType;
6
6
  className?: string;
7
7
  onClick?: (e: React.MouseEvent) => void;
8
8
  };
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import "./css/icon.css";
3
3
  import { ReactComponent as CheckIcon } from "../../assets/icons/check.svg";
4
+ import { ReactComponent as CheckSquare } from "../../assets/icons/check-square.svg";
4
5
  import { ReactComponent as ChevronLeftIcon } from "../../assets/icons/chevron-left.svg";
5
6
  import { ReactComponent as ChevronRightIcon } from "../../assets/icons/chevron-right.svg";
6
7
  import { ReactComponent as CopyIcon } from "../../assets/icons/copy.svg";
@@ -13,6 +14,7 @@ import { ReactComponent as GlobeIcon } from "../../assets/icons/globe.svg";
13
14
  import { ReactComponent as HDDIcon } from "../../assets/icons/hdd.svg";
14
15
  import { ReactComponent as KeyIcon } from "../../assets/icons/key.svg";
15
16
  import { ReactComponent as LifeRingIcon } from "../../assets/icons/life-ring.svg";
17
+ import { ReactComponent as LockIcon } from "../../assets/icons/lock.svg";
16
18
  import { ReactComponent as MagicIcon } from "../../assets/icons/magic.svg";
17
19
  import { ReactComponent as MoonIcon } from "../../assets/icons/moon.svg";
18
20
  import { ReactComponent as PaintRollerIcon } from "../../assets/icons/paint-roller.svg";
@@ -30,6 +32,7 @@ import { ReactComponent as UploadIcon } from "../../assets/icons/upload.svg";
30
32
  import { ReactComponent as WindowIcon } from "../../assets/icons/window.svg";
31
33
  const icons = {
32
34
  check: CheckIcon,
35
+ "check-square": CheckSquare,
33
36
  "chevron-left": ChevronLeftIcon,
34
37
  "chevron-right": ChevronRightIcon,
35
38
  copy: CopyIcon,
@@ -42,6 +45,7 @@ const icons = {
42
45
  hdd: HDDIcon,
43
46
  key: KeyIcon,
44
47
  "life-ring": LifeRingIcon,
48
+ lock: LockIcon,
45
49
  magic: MagicIcon,
46
50
  moon: MoonIcon,
47
51
  "paint-roller": PaintRollerIcon,
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleIcon.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACrG,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,cAAc,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,cAAc,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O;IACZ,GAAG,EAAE,OAAO;IACZ,WAAW,EAAE,YAAY;IACzB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,QAAQ;IACd,cAAc,EAAE,eAAe;IAC/B,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,kBAAkB;IACrC,MAAM,EAAE,UAAU;IAClB,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,SAAS;IAChB,YAAY,EAAE,aAAa;IAC3B,WAAW,EAAE,YAAY;IACzB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,UAAU;CAClB,CAAC;AAQF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IAC1D,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE/B,OAAO,CACN,8BACC,SAAS,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC9F,IAAI,EAAC,KAAK,gBACE,GAAG,KAAK,CAAC,IAAI,OAAO,EAChC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAEhD,IAAI,IAAI,oBAAC,IAAI,OAAQ,CAChB,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\r\nimport \"./css/icon.css\";\r\nimport { ReactComponent as CheckIcon } from \"../../assets/icons/check.svg\";\r\nimport { ReactComponent as ChevronLeftIcon } from \"../../assets/icons/chevron-left.svg\";\r\nimport { ReactComponent as ChevronRightIcon } from \"../../assets/icons/chevron-right.svg\";\r\nimport { ReactComponent as CopyIcon } from \"../../assets/icons/copy.svg\";\r\nimport { ReactComponent as ExclaimationCircleIcon } from \"../../assets/icons/exclamation-circle.svg\";\r\nimport { ReactComponent as ExternalLinkIcon } from \"../../assets/icons/external-link.svg\";\r\nimport { ReactComponent as FlagIcon } from \"../../assets/icons/flag.svg\";\r\nimport { ReactComponent as FolderIcon } from \"../../assets/icons/folder.svg\";\r\nimport { ReactComponent as FontIcon } from \"../../assets/icons/font.svg\";\r\nimport { ReactComponent as GlobeIcon } from \"../../assets/icons/globe.svg\";\r\nimport { ReactComponent as HDDIcon } from \"../../assets/icons/hdd.svg\";\r\nimport { ReactComponent as KeyIcon } from \"../../assets/icons/key.svg\";\r\nimport { ReactComponent as LifeRingIcon } from \"../../assets/icons/life-ring.svg\";\r\nimport { ReactComponent as MagicIcon } from \"../../assets/icons/magic.svg\";\r\nimport { ReactComponent as MoonIcon } from \"../../assets/icons/moon.svg\";\r\nimport { ReactComponent as PaintRollerIcon } from \"../../assets/icons/paint-roller.svg\";\r\nimport { ReactComponent as PencilIcon } from \"../../assets/icons/pencil.svg\";\r\nimport { ReactComponent as PlusIcon } from \"../../assets/icons/plus.svg\";\r\nimport { ReactComponent as QuestionCircleIcon } from \"../../assets/icons/question-circle.svg\";\r\nimport { ReactComponent as SearchIcon } from \"../../assets/icons/search.svg\";\r\nimport { ReactComponent as SunIcon } from \"../../assets/icons/sun.svg\";\r\nimport { ReactComponent as TimesIcon } from \"../../assets/icons/times.svg\";\r\nimport { ReactComponent as ToggleOffIcon } from \"../../assets/icons/toggle-off.svg\";\r\nimport { ReactComponent as ToggleOnIcon } from \"../../assets/icons/toggle-on.svg\";\r\nimport { ReactComponent as ToolsIcon } from \"../../assets/icons/tools.svg\";\r\nimport { ReactComponent as TrashIcon } from \"../../assets/icons/trash.svg\";\r\nimport { ReactComponent as UploadIcon } from \"../../assets/icons/upload.svg\";\r\nimport { ReactComponent as WindowIcon } from \"../../assets/icons/window.svg\";\r\n\r\nexport type FinsembleIcon =\r\n\t| \"check\"\r\n\t| \"chevron-left\"\r\n\t| \"chevron-right\"\r\n\t| \"copy\"\r\n\t| \"exclamation-circle\"\r\n\t| \"external-link\"\r\n\t| \"flag\"\r\n\t| \"font\"\r\n\t| \"folder\"\r\n\t| \"globe\"\r\n\t| \"hdd\"\r\n\t| \"key\"\r\n\t| \"life-ring\"\r\n\t| \"magic\"\r\n\t| \"moon\"\r\n\t| \"paint-roller\"\r\n\t| \"pencil\"\r\n\t| \"plus\"\r\n\t| \"question-circle\"\r\n\t| \"search\"\r\n\t| \"sun\"\r\n\t| \"times\"\r\n\t| \"toggle-off\"\r\n\t| \"toggle-on\"\r\n\t| \"tools\"\r\n\t| \"trash\"\r\n\t| \"upload\"\r\n\t| \"window\";\r\n\r\ntype IconComponents = {\r\n\t[key in FinsembleIcon]: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;\r\n};\r\n\r\nconst icons: IconComponents = {\r\n\tcheck: CheckIcon,\r\n\t\"chevron-left\": ChevronLeftIcon,\r\n\t\"chevron-right\": ChevronRightIcon,\r\n\tcopy: CopyIcon,\r\n\t\"exclamation-circle\": ExclaimationCircleIcon,\r\n\t\"external-link\": ExternalLinkIcon,\r\n\tflag: FlagIcon,\r\n\tfolder: FolderIcon,\r\n\tfont: FontIcon,\r\n\tglobe: GlobeIcon,\r\n\thdd: HDDIcon,\r\n\tkey: KeyIcon,\r\n\t\"life-ring\": LifeRingIcon,\r\n\tmagic: MagicIcon,\r\n\tmoon: MoonIcon,\r\n\t\"paint-roller\": PaintRollerIcon,\r\n\tpencil: PencilIcon,\r\n\tplus: PlusIcon,\r\n\t\"question-circle\": QuestionCircleIcon,\r\n\tsearch: SearchIcon,\r\n\tsun: SunIcon,\r\n\ttimes: TimesIcon,\r\n\t\"toggle-off\": ToggleOffIcon,\r\n\t\"toggle-on\": ToggleOnIcon,\r\n\ttools: ToolsIcon,\r\n\ttrash: TrashIcon,\r\n\tupload: UploadIcon,\r\n\twindow: WindowIcon,\r\n};\r\n\r\nexport type FinsembleIconProps = {\r\n\ticon: FinsembleIcon;\r\n\tclassName?: string;\r\n\tonClick?: (e: React.MouseEvent) => void;\r\n};\r\n\r\nexport const FinsembleIcon = (props: FinsembleIconProps) => {\r\n\tconst Icon = icons[props.icon];\r\n\r\n\treturn (\r\n\t\t<span\r\n\t\t\tclassName={[\"finsemble-icon\", `finsemble-icon-${props.icon}`, props.className || \"\"].join(\" \")}\r\n\t\t\trole=\"img\"\r\n\t\t\taria-label={`${props.icon} icon`}\r\n\t\t\tonClick={(e) => props.onClick && props.onClick(e)}\r\n\t\t>\r\n\t\t\t{Icon && <Icon></Icon>}\r\n\t\t</span>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleIcon.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,cAAc,IAAI,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACrG,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3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BAAC,IAAI,OAAQ,CAChB,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\r\nimport \"./css/icon.css\";\r\nimport { ReactComponent as CheckIcon } from \"../../assets/icons/check.svg\";\r\nimport { ReactComponent as CheckSquare } from \"../../assets/icons/check-square.svg\";\r\nimport { ReactComponent as ChevronLeftIcon } from \"../../assets/icons/chevron-left.svg\";\r\nimport { ReactComponent as ChevronRightIcon } from \"../../assets/icons/chevron-right.svg\";\r\nimport { ReactComponent as CopyIcon } from \"../../assets/icons/copy.svg\";\r\nimport { ReactComponent as ExclaimationCircleIcon } from \"../../assets/icons/exclamation-circle.svg\";\r\nimport { ReactComponent as ExternalLinkIcon } from \"../../assets/icons/external-link.svg\";\r\nimport { ReactComponent as FlagIcon } from \"../../assets/icons/flag.svg\";\r\nimport { ReactComponent as FolderIcon } from \"../../assets/icons/folder.svg\";\r\nimport { ReactComponent as FontIcon } from \"../../assets/icons/font.svg\";\r\nimport { ReactComponent as GlobeIcon } from \"../../assets/icons/globe.svg\";\r\nimport { ReactComponent as HDDIcon } from \"../../assets/icons/hdd.svg\";\r\nimport { ReactComponent as KeyIcon } from \"../../assets/icons/key.svg\";\r\nimport { ReactComponent as LifeRingIcon } from \"../../assets/icons/life-ring.svg\";\r\nimport { ReactComponent as LockIcon } from \"../../assets/icons/lock.svg\";\r\nimport { ReactComponent as MagicIcon } from \"../../assets/icons/magic.svg\";\r\nimport { ReactComponent as MoonIcon } from \"../../assets/icons/moon.svg\";\r\nimport { ReactComponent as PaintRollerIcon } from \"../../assets/icons/paint-roller.svg\";\r\nimport { ReactComponent as PencilIcon } from \"../../assets/icons/pencil.svg\";\r\nimport { ReactComponent as PlusIcon } from \"../../assets/icons/plus.svg\";\r\nimport { ReactComponent as QuestionCircleIcon } from \"../../assets/icons/question-circle.svg\";\r\nimport { ReactComponent as SearchIcon } from \"../../assets/icons/search.svg\";\r\nimport { ReactComponent as SunIcon } from \"../../assets/icons/sun.svg\";\r\nimport { ReactComponent as TimesIcon } from \"../../assets/icons/times.svg\";\r\nimport { ReactComponent as ToggleOffIcon } from \"../../assets/icons/toggle-off.svg\";\r\nimport { ReactComponent as ToggleOnIcon } from \"../../assets/icons/toggle-on.svg\";\r\nimport { ReactComponent as ToolsIcon } from \"../../assets/icons/tools.svg\";\r\nimport { ReactComponent as TrashIcon } from \"../../assets/icons/trash.svg\";\r\nimport { ReactComponent as UploadIcon } from \"../../assets/icons/upload.svg\";\r\nimport { ReactComponent as WindowIcon } from \"../../assets/icons/window.svg\";\r\n\r\nexport type FinsembleIconType =\r\n\t| \"check\"\r\n\t| \"check-square\"\r\n\t| \"chevron-left\"\r\n\t| \"chevron-right\"\r\n\t| \"copy\"\r\n\t| \"exclamation-circle\"\r\n\t| \"external-link\"\r\n\t| \"flag\"\r\n\t| \"font\"\r\n\t| \"folder\"\r\n\t| \"globe\"\r\n\t| \"hdd\"\r\n\t| \"key\"\r\n\t| \"life-ring\"\r\n\t| \"lock\"\r\n\t| \"magic\"\r\n\t| \"moon\"\r\n\t| \"paint-roller\"\r\n\t| \"pencil\"\r\n\t| \"plus\"\r\n\t| \"question-circle\"\r\n\t| \"search\"\r\n\t| \"sun\"\r\n\t| \"times\"\r\n\t| \"toggle-off\"\r\n\t| \"toggle-on\"\r\n\t| \"tools\"\r\n\t| \"trash\"\r\n\t| \"upload\"\r\n\t| \"window\";\r\n\r\ntype IconComponents = {\r\n\t[key in FinsembleIconType]: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;\r\n};\r\n\r\nconst icons: IconComponents = {\r\n\tcheck: CheckIcon,\r\n\t\"check-square\": CheckSquare,\r\n\t\"chevron-left\": ChevronLeftIcon,\r\n\t\"chevron-right\": ChevronRightIcon,\r\n\tcopy: CopyIcon,\r\n\t\"exclamation-circle\": ExclaimationCircleIcon,\r\n\t\"external-link\": ExternalLinkIcon,\r\n\tflag: FlagIcon,\r\n\tfolder: FolderIcon,\r\n\tfont: FontIcon,\r\n\tglobe: GlobeIcon,\r\n\thdd: HDDIcon,\r\n\tkey: KeyIcon,\r\n\t\"life-ring\": LifeRingIcon,\r\n\tlock: LockIcon,\r\n\tmagic: MagicIcon,\r\n\tmoon: MoonIcon,\r\n\t\"paint-roller\": PaintRollerIcon,\r\n\tpencil: PencilIcon,\r\n\tplus: PlusIcon,\r\n\t\"question-circle\": QuestionCircleIcon,\r\n\tsearch: SearchIcon,\r\n\tsun: SunIcon,\r\n\ttimes: TimesIcon,\r\n\t\"toggle-off\": ToggleOffIcon,\r\n\t\"toggle-on\": ToggleOnIcon,\r\n\ttools: ToolsIcon,\r\n\ttrash: TrashIcon,\r\n\tupload: UploadIcon,\r\n\twindow: WindowIcon,\r\n};\r\n\r\nexport type FinsembleIconProps = {\r\n\ticon: FinsembleIconType;\r\n\tclassName?: string;\r\n\tonClick?: (e: React.MouseEvent) => void;\r\n};\r\n\r\nexport const FinsembleIcon = (props: FinsembleIconProps) => {\r\n\tconst Icon = icons[props.icon];\r\n\r\n\treturn (\r\n\t\t<span\r\n\t\t\tclassName={[\"finsemble-icon\", `finsemble-icon-${props.icon}`, props.className || \"\"].join(\" \")}\r\n\t\t\trole=\"img\"\r\n\t\t\taria-label={`${props.icon} icon`}\r\n\t\t\tonClick={(e) => props.onClick && props.onClick(e)}\r\n\t\t>\r\n\t\t\t{Icon && <Icon></Icon>}\r\n\t\t</span>\r\n\t);\r\n};\r\n"]}
@@ -1,7 +1,8 @@
1
- /// <reference types="react" />
1
+ import { ReactNode } from "react";
2
2
  import "./css/selector.css";
3
3
  export interface FinsembleSelectProps {
4
4
  options: string[];
5
+ optionComponents?: ReactNode[];
5
6
  values?: string[];
6
7
  selected?: string[];
7
8
  size?: number;
@@ -9,4 +10,4 @@ export interface FinsembleSelectProps {
9
10
  showSearch?: boolean;
10
11
  limit?: number;
11
12
  }
12
- export declare const FinsembleSelect: ({ options, updateCallback, selected, size, values, showSearch, limit, }: FinsembleSelectProps) => JSX.Element;
13
+ export declare const FinsembleSelect: ({ options, optionComponents, updateCallback, selected, size, values, showSearch, limit, }: FinsembleSelectProps) => JSX.Element;
@@ -10,7 +10,7 @@ const removeItem = (startingArray, removableItem) => {
10
10
  }
11
11
  return startingArray.slice(0, removableIndex).concat(startingArray.slice(removableIndex + 1));
12
12
  };
13
- export const FinsembleSelect = ({ options, updateCallback, selected = [], size, values = options, showSearch = false, limit = Infinity, }) => {
13
+ export const FinsembleSelect = ({ options, optionComponents, updateCallback, selected = [], size, values = options, showSearch = false, limit = Infinity, }) => {
14
14
  const mappedOptions = options.map((option, index) => {
15
15
  return { option, value: values[index] };
16
16
  });
@@ -34,10 +34,7 @@ export const FinsembleSelect = ({ options, updateCallback, selected = [], size,
34
34
  setDisplayOptions(mappedOptions
35
35
  .filter((optionMap) => optionMap.option.toUpperCase().includes(searchString.toUpperCase()))
36
36
  .map((combination) => {
37
- return {
38
- ...combination,
39
- option: combination.option.replace(new RegExp(`(${searchString})`, "i"), `<span class="highlight">$1</span>`),
40
- };
37
+ return Object.assign(Object.assign({}, combination), { option: combination.option.replace(new RegExp(`(${searchString})`, "i"), `<span class="highlight">$1</span>`) });
41
38
  }));
42
39
  };
43
40
  return (React.createElement(React.Fragment, null,
@@ -56,6 +53,6 @@ export const FinsembleSelect = ({ options, updateCallback, selected = [], size,
56
53
  doSetSelectedOptions(selectedOptions.concat([value]));
57
54
  }
58
55
  } }),
59
- React.createElement("span", { dangerouslySetInnerHTML: { __html: option } })))))))));
56
+ (optionComponents === null || optionComponents === void 0 ? void 0 : optionComponents[index]) ? (optionComponents === null || optionComponents === void 0 ? void 0 : optionComponents[index]) : (React.createElement("span", { dangerouslySetInnerHTML: { __html: option } }))))))))));
60
57
  };
61
58
  //# sourceMappingURL=FinsembleSelect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleSelect.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD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CACD,CACJ,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\nimport \"./css/selector.css\";\r\nimport { FinsembleIcon } from \"./FinsembleIcon\";\r\nimport { FinsembleToggle } from \"./FinsembleToggle\";\r\n\r\nconst heightMultiplier = 40; // It works in storybook, but we will probably want a better way of detecting this soon.\r\n\r\nconst removeItem = (startingArray: string[], removableItem: string) => {\r\n\tconst removableIndex = startingArray.indexOf(removableItem);\r\n\tif (removableIndex < 0) {\r\n\t\treturn startingArray;\r\n\t}\r\n\treturn startingArray.slice(0, removableIndex).concat(startingArray.slice(removableIndex + 1));\r\n};\r\n\r\nexport interface FinsembleSelectProps {\r\n\toptions: string[];\r\n\tvalues?: string[];\r\n\tselected?: string[];\r\n\tsize?: number;\r\n\tupdateCallback: (selectedValues: string[]) => void;\r\n\tshowSearch?: boolean;\r\n\tlimit?: number;\r\n}\r\n\r\nexport const FinsembleSelect = ({\r\n\toptions,\r\n\tupdateCallback,\r\n\tselected = [],\r\n\tsize,\r\n\tvalues = options,\r\n\tshowSearch = false,\r\n\tlimit = Infinity,\r\n}: FinsembleSelectProps) => {\r\n\tconst mappedOptions = options.map((option, index) => {\r\n\t\treturn { option, value: values[index] };\r\n\t});\r\n\tconst [selectedOptions, setSelectedOptions] = useState<string[]>(selected);\r\n\tconst [displayOptions, setDisplayOptions] = useState(mappedOptions);\r\n\r\n\t// Magic numbers\r\n\tconst height = size ? heightMultiplier * size : \"\";\r\n\r\n\t// Updating consumer\r\n\tconst doSetSelectedOptions = (opts: string[]) => {\r\n\t\tif (opts.length > limit) {\r\n\t\t\topts = opts.slice(limit * -1);\r\n\t\t}\r\n\r\n\t\tif (JSON.stringify(opts) !== JSON.stringify(selectedOptions)) {\r\n\t\t\tupdateCallback(opts);\r\n\t\t}\r\n\t\tsetSelectedOptions(opts);\r\n\t};\r\n\r\n\t// Event handlers\r\n\tconst changeHandler = (e: any) => {\r\n\t\tdoSetSelectedOptions(Array.from(e.target.selectedOptions).map((option: any) => option.value));\r\n\t};\r\n\r\n\tconst updateSearch = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n\t\t// @ts-ignore: \"value\" is on e.target, I don't know what your problem is\r\n\t\t// TS doesn't complain if I use .currentTarget, but then I can't use Enzyme to test it, so here we are\r\n\t\tconst searchString = e.target.value;\r\n\t\tsetDisplayOptions(\r\n\t\t\tmappedOptions\r\n\t\t\t\t.filter((optionMap) => optionMap.option.toUpperCase().includes(searchString.toUpperCase()))\r\n\t\t\t\t.map((combination) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\t...combination,\r\n\t\t\t\t\t\toption: combination.option.replace(\r\n\t\t\t\t\t\t\tnew RegExp(`(${searchString})`, \"i\"),\r\n\t\t\t\t\t\t\t`<span class=\"highlight\">$1</span>`\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t};\r\n\t\t\t\t})\r\n\t\t);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div className=\"emperorSelectContainer\">\r\n\t\t\t\t{showSearch && (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t<FinsembleIcon className=\"searchIcon\" icon=\"search\"></FinsembleIcon>\r\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"Search\" aria-label=\"search\" className=\"search\" onInput={updateSearch} />\r\n\t\t\t\t\t</>\r\n\t\t\t\t)}\r\n\t\t\t\t<select className=\"shogunSelect\" multiple onChange={changeHandler}>\r\n\t\t\t\t\t{displayOptions.map(({ option, value }, index: number) => (\r\n\t\t\t\t\t\t<option key={`shogun-option-${index}`} value={value}>\r\n\t\t\t\t\t\t\t{option}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t))}\r\n\t\t\t\t</select>\r\n\t\t\t\t<div className=\"emperorSelect\" style={height === \"\" ? {} : { height }}>\r\n\t\t\t\t\t{displayOptions.map(({ option, value }, index: number) => (\r\n\t\t\t\t\t\t<div className=\"emperorOption\" key={`emperor-option-${index}`}>\r\n\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t<FinsembleToggle\r\n\t\t\t\t\t\t\t\t\tchecked={selectedOptions.includes(value) || selected.includes(value)}\r\n\t\t\t\t\t\t\t\t\tonChange={() => {\r\n\t\t\t\t\t\t\t\t\t\tif (selectedOptions.includes(value) || selected.includes(value)) {\r\n\t\t\t\t\t\t\t\t\t\t\tdoSetSelectedOptions(removeItem(selectedOptions, value));\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tdoSetSelectedOptions(selectedOptions.concat([value]));\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t></FinsembleToggle>\r\n\t\t\t\t\t\t\t\t<span dangerouslySetInnerHTML={{ __html: option }}></span>\r\n\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t))}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleSelect.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AACnD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B,MAAM,UAAU,GAAG,CAAC,aAAuB,EAAE,aAAqB,EAAE,EAAE;IACrE,MAAM,cAAc,GAAG,aAAa,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5D,IAAI,cAAc,GAAG,CAAC,EAAE;QACvB,OAAO,aAAa,CAAC;KACrB;IACD,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,MA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AC,KAAK,EAAE,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IACnE,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAa,EAAE,EAAE,CAAC,CACzD,6BAAK,SAAS,EAAC,eAAe,EAAC,GAAG,EAAE,kBAAkB,KAAK,EAAE;gBAC5D;oBACC,oBAAC,eAAe,IACf,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EACpE,QAAQ,EAAE,GAAG,EAAE;4BACd,IAAI,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gCAChE,oBAAoB,CAAC,UAAU,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC;6BACzD;iCAAM;gCACN,oBAAoB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;6BACtD;wBACF,CAAC,GACiB;oBAClB,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAG,KAAK,CAAC,EAAC,CAAC,CAAC,CAC5B,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAG,KAAK,CAAC,CACzB,CAAC,CAAC,CAAC,CACH,8BAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAS,CAC1D,CACM,CACH,CACN,CAAC,CACG,CACD,CACJ,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, ReactNode } from \"react\";\r\nimport \"./css/selector.css\";\r\nimport { FinsembleIcon } from \"./FinsembleIcon\";\r\nimport { FinsembleToggle } from \"./FinsembleToggle\";\r\n\r\nconst heightMultiplier = 40; // It works in storybook, but we will probably want a better way of detecting this soon.\r\n\r\nconst removeItem = (startingArray: string[], removableItem: string) => {\r\n\tconst removableIndex = startingArray.indexOf(removableItem);\r\n\tif (removableIndex < 0) {\r\n\t\treturn startingArray;\r\n\t}\r\n\treturn startingArray.slice(0, removableIndex).concat(startingArray.slice(removableIndex + 1));\r\n};\r\n\r\nexport interface FinsembleSelectProps {\r\n\toptions: string[];\r\n\toptionComponents?: ReactNode[];\r\n\tvalues?: string[];\r\n\tselected?: string[];\r\n\tsize?: number;\r\n\tupdateCallback: (selectedValues: string[]) => void;\r\n\tshowSearch?: boolean;\r\n\tlimit?: number;\r\n}\r\n\r\nexport const FinsembleSelect = ({\r\n\toptions,\r\n\toptionComponents,\r\n\tupdateCallback,\r\n\tselected = [],\r\n\tsize,\r\n\tvalues = options,\r\n\tshowSearch = false,\r\n\tlimit = Infinity,\r\n}: FinsembleSelectProps) => {\r\n\tconst mappedOptions = options.map((option, index) => {\r\n\t\treturn { option, value: values[index] };\r\n\t});\r\n\tconst [selectedOptions, setSelectedOptions] = useState<string[]>(selected);\r\n\tconst [displayOptions, setDisplayOptions] = useState(mappedOptions);\r\n\r\n\t// Magic numbers\r\n\tconst height = size ? heightMultiplier * size : \"\";\r\n\r\n\t// Updating consumer\r\n\tconst doSetSelectedOptions = (opts: string[]) => {\r\n\t\tif (opts.length > limit) {\r\n\t\t\topts = opts.slice(limit * -1);\r\n\t\t}\r\n\r\n\t\tif (JSON.stringify(opts) !== JSON.stringify(selectedOptions)) {\r\n\t\t\tupdateCallback(opts);\r\n\t\t}\r\n\t\tsetSelectedOptions(opts);\r\n\t};\r\n\r\n\t// Event handlers\r\n\tconst changeHandler = (e: any) => {\r\n\t\tdoSetSelectedOptions(Array.from(e.target.selectedOptions).map((option: any) => option.value));\r\n\t};\r\n\r\n\tconst updateSearch = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n\t\t// @ts-ignore: \"value\" is on e.target, I don't know what your problem is\r\n\t\t// TS doesn't complain if I use .currentTarget, but then I can't use Enzyme to test it, so here we are\r\n\t\tconst searchString = e.target.value;\r\n\t\tsetDisplayOptions(\r\n\t\t\tmappedOptions\r\n\t\t\t\t.filter((optionMap) => optionMap.option.toUpperCase().includes(searchString.toUpperCase()))\r\n\t\t\t\t.map((combination) => {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\t...combination,\r\n\t\t\t\t\t\toption: combination.option.replace(\r\n\t\t\t\t\t\t\tnew RegExp(`(${searchString})`, \"i\"),\r\n\t\t\t\t\t\t\t`<span class=\"highlight\">$1</span>`\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t};\r\n\t\t\t\t})\r\n\t\t);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div className=\"emperorSelectContainer\">\r\n\t\t\t\t{showSearch && (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t<FinsembleIcon className=\"searchIcon\" icon=\"search\"></FinsembleIcon>\r\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"Search\" aria-label=\"search\" className=\"search\" onInput={updateSearch} />\r\n\t\t\t\t\t</>\r\n\t\t\t\t)}\r\n\t\t\t\t<select className=\"shogunSelect\" multiple onChange={changeHandler}>\r\n\t\t\t\t\t{displayOptions.map(({ option, value }, index: number) => (\r\n\t\t\t\t\t\t<option key={`shogun-option-${index}`} value={value}>\r\n\t\t\t\t\t\t\t{option}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t))}\r\n\t\t\t\t</select>\r\n\t\t\t\t<div className=\"emperorSelect\" style={height === \"\" ? {} : { height }}>\r\n\t\t\t\t\t{displayOptions.map(({ option, value }, index: number) => (\r\n\t\t\t\t\t\t<div className=\"emperorOption\" key={`emperor-option-${index}`}>\r\n\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t<FinsembleToggle\r\n\t\t\t\t\t\t\t\t\tchecked={selectedOptions.includes(value) || selected.includes(value)}\r\n\t\t\t\t\t\t\t\t\tonChange={() => {\r\n\t\t\t\t\t\t\t\t\t\tif (selectedOptions.includes(value) || selected.includes(value)) {\r\n\t\t\t\t\t\t\t\t\t\t\tdoSetSelectedOptions(removeItem(selectedOptions, value));\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tdoSetSelectedOptions(selectedOptions.concat([value]));\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t></FinsembleToggle>\r\n\t\t\t\t\t\t\t\t{optionComponents?.[index] ? (\r\n\t\t\t\t\t\t\t\t\toptionComponents?.[index]\r\n\t\t\t\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t\t\t<span dangerouslySetInnerHTML={{ __html: option }}></span>\r\n\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t))}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
@@ -12,8 +12,8 @@ export const FinsembleToggle = ({ checked, onChange, label }) => {
12
12
  }, [checked]);
13
13
  return (React.createElement("span", { className: ["finsembleToggle", selected ? "finsembleToggle-on" : "finsembleToggle-off"].join(" ") },
14
14
  React.createElement(FinsembleIcon, { className: "finsembleToggle-icon", icon: selected ? "toggle-on" : "toggle-off" }),
15
- React.createElement("input", { type: "checkbox", tabIndex: -1, onChange: (e) => {
15
+ React.createElement("input", Object.assign({ type: "checkbox", onChange: (e) => {
16
16
  doSetSelected(e.target.checked);
17
- }, checked: selected, ...(label ? { "aria-label": label } : "") })));
17
+ }, checked: selected }, (label ? { "aria-label": label } : "")))));
18
18
  };
19
19
  //# sourceMappingURL=FinsembleToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleToggle.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAwB,EAAE,EAAE;IACrF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElD,SAAS,aAAa,CAAC,QAAiB;QACvC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;IAED,SAAS,CAAC,GAAG,EAAE;QACd,WAAW,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACN,8BAAM,SAAS,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QACtG,oBAAC,aAAa,IAAC,SAAS,EAAC,sBAAsB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,GAAkB;QAC7G,+BACC,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC,EACZ,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACf,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC,EACD,OAAO,EAAE,QAAQ,KACb,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GACzC,CACI,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\nimport \"./css/toggle.css\";\r\nimport { FinsembleIcon } from \"./FinsembleIcon\";\r\n\r\nexport interface FinsembleToggleProps {\r\n\tlabel?: string;\r\n\tchecked: boolean;\r\n\tonChange: (selected: boolean) => void;\r\n}\r\n\r\nexport const FinsembleToggle = ({ checked, onChange, label }: FinsembleToggleProps) => {\r\n\tconst [selected, setSelected] = useState(checked);\r\n\r\n\tfunction doSetSelected(newValue: boolean) {\r\n\t\tonChange(newValue);\r\n\t\tsetSelected(newValue);\r\n\t}\r\n\r\n\tuseEffect(() => {\r\n\t\tsetSelected(checked);\r\n\t}, [checked]);\r\n\r\n\treturn (\r\n\t\t<span className={[\"finsembleToggle\", selected ? \"finsembleToggle-on\" : \"finsembleToggle-off\"].join(\" \")}>\r\n\t\t\t<FinsembleIcon className=\"finsembleToggle-icon\" icon={selected ? \"toggle-on\" : \"toggle-off\"}></FinsembleIcon>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\ttabIndex={-1}\r\n\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\tdoSetSelected(e.target.checked);\r\n\t\t\t\t}}\r\n\t\t\t\tchecked={selected}\r\n\t\t\t\t{...(label ? { \"aria-label\": label } : \"\")}\r\n\t\t\t/>\r\n\t\t</span>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"FinsembleToggle.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAwB,EAAE,EAAE;IACrF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElD,SAAS,aAAa,CAAC,QAAiB;QACvC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;IAED,SAAS,CAAC,GAAG,EAAE;QACd,WAAW,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACN,8BAAM,SAAS,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QACtG,oBAAC,aAAa,IAAC,SAAS,EAAC,sBAAsB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,GAAkB;QAC7G,6CACC,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACf,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC,EACD,OAAO,EAAE,QAAQ,IACb,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACzC,CACI,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\r\nimport \"./css/toggle.css\";\r\nimport { FinsembleIcon } from \"./FinsembleIcon\";\r\n\r\nexport interface FinsembleToggleProps {\r\n\tlabel?: string;\r\n\tchecked: boolean;\r\n\tonChange: (selected: boolean) => void;\r\n}\r\n\r\nexport const FinsembleToggle = ({ checked, onChange, label }: FinsembleToggleProps) => {\r\n\tconst [selected, setSelected] = useState(checked);\r\n\r\n\tfunction doSetSelected(newValue: boolean) {\r\n\t\tonChange(newValue);\r\n\t\tsetSelected(newValue);\r\n\t}\r\n\r\n\tuseEffect(() => {\r\n\t\tsetSelected(checked);\r\n\t}, [checked]);\r\n\r\n\treturn (\r\n\t\t<span className={[\"finsembleToggle\", selected ? \"finsembleToggle-on\" : \"finsembleToggle-off\"].join(\" \")}>\r\n\t\t\t<FinsembleIcon className=\"finsembleToggle-icon\" icon={selected ? \"toggle-on\" : \"toggle-off\"}></FinsembleIcon>\r\n\t\t\t<input\r\n\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\tonChange={(e) => {\r\n\t\t\t\t\tdoSetSelected(e.target.checked);\r\n\t\t\t\t}}\r\n\t\t\t\tchecked={selected}\r\n\t\t\t\t{...(label ? { \"aria-label\": label } : \"\")}\r\n\t\t\t/>\r\n\t\t</span>\r\n\t);\r\n};\r\n"]}
@@ -34,9 +34,9 @@ const FONT_SIZE_LIST = [
34
34
  export const FontSize = ({ id, startSize, updateSize }) => {
35
35
  const [size, setSize] = useState(startSize);
36
36
  return (React.createElement("div", { className: "font-size-picker" },
37
- React.createElement("select", { ...{ id }, value: size, onChange: (e) => {
37
+ React.createElement("select", Object.assign({}, { id }, { value: size, onChange: (e) => {
38
38
  setSize(e.target.value);
39
39
  updateSize(e.target.value);
40
- } }, FONT_SIZE_LIST.map((font_size) => (React.createElement("option", { key: font_size }, font_size))))));
40
+ } }), FONT_SIZE_LIST.map((font_size) => (React.createElement("option", { key: font_size }, font_size))))));
41
41
  };
42
42
  //# sourceMappingURL=FontSizeSelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FontSizeSelector.js","sourceRoot":"","sources":["../../../src/components/common/FontSizeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAe,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,cAAc,GAAG;IACtB,UAAU;IACV,SAAS;IACT,OAAO;IACP,QAAQ;IACR,OAAO;IACP,SAAS;IACT,UAAU;IACV,WAAW;IACX,SAAS;IACT,QAAQ;IACR,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,SAAS;IACT,SAAS;IACT,OAAO;CACP,CAAC;AAaF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAiB,EAAE,EAAE;IACxE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACN,6BAAK,SAAS,EAAC,kBAAkB;QAChC,mCACK,EAAE,EAAE,EAAE,EACV,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,CAAC,CAAiC,EAAE,EAAE;gBAC/C,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACxB,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,IAEA,cAAc,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAClC,gCAAQ,GAAG,EAAE,SAAS,IAAG,SAAS,CAAU,CAC5C,CAAC,CACM,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { ChangeEvent, useState } from \"react\";\r\n\r\nconst FONT_SIZE_LIST = [\r\n\t\"xx-small\",\r\n\t\"x-small\",\r\n\t\"small\",\r\n\t\"medium\",\r\n\t\"large\",\r\n\t\"x-large\",\r\n\t\"xx-large\",\r\n\t\"xxx-large\",\r\n\t\"smaller\",\r\n\t\"larger\",\r\n\t\"8px\",\r\n\t\"10px\",\r\n\t\"12px\",\r\n\t\"14px\",\r\n\t\"16px\",\r\n\t\"8pt\",\r\n\t\"10pt\",\r\n\t\"12pt\",\r\n\t\"14pt\",\r\n\t\"0.6em\",\r\n\t\"0.8em\",\r\n\t\"1.2em\",\r\n\t\"1.4em\",\r\n\t\"60%\",\r\n\t\"80%\",\r\n\t\"120%\",\r\n\t\"140%\",\r\n\t\"inherit\",\r\n\t\"initial\",\r\n\t\"unset\",\r\n];\r\n\r\nexport interface FontSizeProps {\r\n\tid?: string;\r\n\tstartSize: string;\r\n\tupdateSize: (newSize: string) => void;\r\n}\r\n\r\n/**\r\n * FontSize component to update theme variables. Text input that validates against browser.\r\n *\r\n * @param {{ id?: string; startSize: string; updateSize: (newSize: string) => void }} { startSize, updateSize }\r\n */\r\nexport const FontSize = ({ id, startSize, updateSize }: FontSizeProps) => {\r\n\tconst [size, setSize] = useState(startSize);\r\n\r\n\treturn (\r\n\t\t<div className=\"font-size-picker\">\r\n\t\t\t<select\r\n\t\t\t\t{...{ id }}\r\n\t\t\t\tvalue={size}\r\n\t\t\t\tonChange={(e: ChangeEvent<HTMLSelectElement>) => {\r\n\t\t\t\t\tsetSize(e.target.value);\r\n\t\t\t\t\tupdateSize(e.target.value);\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{FONT_SIZE_LIST.map((font_size) => (\r\n\t\t\t\t\t<option key={font_size}>{font_size}</option>\r\n\t\t\t\t))}\r\n\t\t\t</select>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"FontSizeSelector.js","sourceRoot":"","sources":["../../../src/components/common/FontSizeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAe,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,cAAc,GAAG;IACtB,UAAU;IACV,SAAS;IACT,OAAO;IACP,QAAQ;IACR,OAAO;IACP,SAAS;IACT,UAAU;IACV,WAAW;IACX,SAAS;IACT,QAAQ;IACR,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,SAAS;IACT,SAAS;IACT,OAAO;CACP,CAAC;AAaF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAiB,EAAE,EAAE;IACxE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACN,6BAAK,SAAS,EAAC,kBAAkB;QAChC,gDACK,EAAE,EAAE,EAAE,IACV,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,CAAC,CAAiC,EAAE,EAAE;gBAC/C,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACxB,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,KAEA,cAAc,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAClC,gCAAQ,GAAG,EAAE,SAAS,IAAG,SAAS,CAAU,CAC5C,CAAC,CACM,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { ChangeEvent, useState } from \"react\";\r\n\r\nconst FONT_SIZE_LIST = [\r\n\t\"xx-small\",\r\n\t\"x-small\",\r\n\t\"small\",\r\n\t\"medium\",\r\n\t\"large\",\r\n\t\"x-large\",\r\n\t\"xx-large\",\r\n\t\"xxx-large\",\r\n\t\"smaller\",\r\n\t\"larger\",\r\n\t\"8px\",\r\n\t\"10px\",\r\n\t\"12px\",\r\n\t\"14px\",\r\n\t\"16px\",\r\n\t\"8pt\",\r\n\t\"10pt\",\r\n\t\"12pt\",\r\n\t\"14pt\",\r\n\t\"0.6em\",\r\n\t\"0.8em\",\r\n\t\"1.2em\",\r\n\t\"1.4em\",\r\n\t\"60%\",\r\n\t\"80%\",\r\n\t\"120%\",\r\n\t\"140%\",\r\n\t\"inherit\",\r\n\t\"initial\",\r\n\t\"unset\",\r\n];\r\n\r\nexport interface FontSizeProps {\r\n\tid?: string;\r\n\tstartSize: string;\r\n\tupdateSize: (newSize: string) => void;\r\n}\r\n\r\n/**\r\n * FontSize component to update theme variables. Text input that validates against browser.\r\n *\r\n * @param {{ id?: string; startSize: string; updateSize: (newSize: string) => void }} { startSize, updateSize }\r\n */\r\nexport const FontSize = ({ id, startSize, updateSize }: FontSizeProps) => {\r\n\tconst [size, setSize] = useState(startSize);\r\n\r\n\treturn (\r\n\t\t<div className=\"font-size-picker\">\r\n\t\t\t<select\r\n\t\t\t\t{...{ id }}\r\n\t\t\t\tvalue={size}\r\n\t\t\t\tonChange={(e: ChangeEvent<HTMLSelectElement>) => {\r\n\t\t\t\t\tsetSize(e.target.value);\r\n\t\t\t\t\tupdateSize(e.target.value);\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t{FONT_SIZE_LIST.map((font_size) => (\r\n\t\t\t\t\t<option key={font_size}>{font_size}</option>\r\n\t\t\t\t))}\r\n\t\t\t</select>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
@@ -33,10 +33,10 @@ export const ImagePreview = (props) => {
33
33
  setDroppedFile(file);
34
34
  } },
35
35
  React.createElement("div", { className: ["image-preview-container", `image-preview-size-${previewSize}`].join(" ") },
36
- React.createElement(FileInput, { value: imagePath, uploadFunction: props.uploadFunction, onSetValue: (value) => {
36
+ React.createElement(FileInput, Object.assign({ value: imagePath, uploadFunction: props.uploadFunction, onSetValue: (value) => {
37
37
  setImagePath(value);
38
38
  setCacheIndex(++globalCacheIndex);
39
- }, acceptTypes: props.acceptTypes, presetFile: droppedFile, suppressDropzone: true, ...(props.id ? { id: props.id } : {}) }),
39
+ }, acceptTypes: props.acceptTypes, presetFile: droppedFile, suppressDropzone: true }, (props.id ? { id: props.id } : {}))),
40
40
  !imagePath ? (React.createElement("div", { className: "empty-preview" })) : (React.createElement("div", { className: "filled-preview" },
41
41
  React.createElement("img", { src: `${props.baseURL}/${imagePath}?${cacheIndex}` }))))));
42
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ImagePreview.js","sourceRoot":"","sources":["../../../src/components/common/ImagePreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAqB,MAAM,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CAAC;IACrD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACN,oBAAC,QAAQ,IACR,WAAW,EAAE,CAAC,IAAU,EAAE,EAAE;YAC3B,cAAc,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;QAED,6BAAK,SAAS,EAAE,CAAC,yBAAyB,EAAE,sBAAsB,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YACzF,oBAAC,SAAS,IACT,KAAK,EAAE,SAAS,EAChB,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE;oBAC7B,YAAY,CAAC,KAAK,CAAC,CAAC;oBACpB,aAAa,CAAC,EAAE,gBAAgB,CAAC,CAAC;gBACnC,CAAC,EACD,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,UAAU,EAAE,WAAW,EACvB,gBAAgB,EAAE,IAAI,KAClB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAC1B;YAEZ,CAAC,SAAS,CAAC,CAAC,CAAC,CACb,6BAAK,SAAS,EAAC,eAAe,GAAO,CACrC,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,gBAAgB;gBAC9B,6BAAK,GAAG,EAAE,GAAG,KAAK,CAAC,OAAO,IAAI,SAAS,IAAI,UAAU,EAAE,GAAI,CACtD,CACN,CACI,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useEffect } from \"react\";\r\n\r\nimport { FileInput, FileInputUploadCb } from \"./FileInput\";\r\nimport \"./css/image-preview.css\";\r\nimport { DropZone, FileWithPath } from \"./DropZone\";\r\n\r\nexport enum ImagePreviewSize {\r\n\tSMALL = \"small\",\r\n\tLARGE = \"large\",\r\n}\r\n\r\nexport type ImagePreviewProps = {\r\n\tid?: string;\r\n\tvalue: string;\r\n\tbaseURL: string;\r\n\tonSetValue?: (value: string) => void;\r\n\tuploadFunction: FileInputUploadCb;\r\n\tacceptTypes: string[];\r\n\tpreviewSize?: ImagePreviewSize;\r\n};\r\n\r\nlet globalCacheIndex = 0;\r\n\r\nconst cleanPath = (path: string, baseURL: string) =>\r\n\tpath\r\n\t\t.replace(new RegExp(`^${baseURL}`), \"\")\r\n\t\t.replace(/\\/{1,}/g, \"/\")\r\n\t\t.replace(/^\\//, \"\");\r\n\r\nexport const ImagePreview = (props: ImagePreviewProps) => {\r\n\tconst [cacheIndex, setCacheIndex] = useState(++globalCacheIndex);\r\n\tconst previewSize = props.previewSize || ImagePreviewSize.SMALL;\r\n\tconst [droppedFile, setDroppedFile] = useState<FileWithPath | null>(null);\r\n\r\n\tconst [imagePath, setImagePath] = useState(cleanPath(props.value, props.baseURL));\r\n\r\n\tuseEffect(() => {\r\n\t\tif (props.onSetValue) {\r\n\t\t\tprops.onSetValue(imagePath);\r\n\t\t}\r\n\t}, [imagePath]);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetImagePath(cleanPath(props.value, props.baseURL));\r\n\t}, [props]);\r\n\r\n\treturn (\r\n\t\t<DropZone\r\n\t\t\tprocessFile={(file: File) => {\r\n\t\t\t\tsetDroppedFile(file);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t<div className={[\"image-preview-container\", `image-preview-size-${previewSize}`].join(\" \")}>\r\n\t\t\t\t<FileInput\r\n\t\t\t\t\tvalue={imagePath}\r\n\t\t\t\t\tuploadFunction={props.uploadFunction}\r\n\t\t\t\t\tonSetValue={(value: string) => {\r\n\t\t\t\t\t\tsetImagePath(value);\r\n\t\t\t\t\t\tsetCacheIndex(++globalCacheIndex);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tacceptTypes={props.acceptTypes}\r\n\t\t\t\t\tpresetFile={droppedFile}\r\n\t\t\t\t\tsuppressDropzone={true}\r\n\t\t\t\t\t{...(props.id ? { id: props.id } : {})}\r\n\t\t\t\t></FileInput>\r\n\r\n\t\t\t\t{!imagePath ? (\r\n\t\t\t\t\t<div className=\"empty-preview\"></div>\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<div className=\"filled-preview\">\r\n\t\t\t\t\t\t<img src={`${props.baseURL}/${imagePath}?${cacheIndex}`} />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\t\t</DropZone>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"ImagePreview.js","sourceRoot":"","sources":["../../../src/components/common/ImagePreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAqB,MAAM,aAAa,CAAC;AAC3D,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AAEpD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,mCAAe,CAAA;IACf,mCAAe,CAAA;AAChB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAYD,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAEzB,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CACnD,IAAI;KACF,OAAO,CAAC,IAAI,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC;KACtC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;KACvB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAEtB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAE,EAAE;IACxD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,gBAAgB,CAAC,CAAC;IACjE,MAAM,WA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AAC,CAAC,CAAC,EAAE,CAAC,EAC1B;YAEZ,CAAC,SAAS,CAAC,CAAC,CAAC,CACb,6BAAK,SAAS,EAAC,eAAe,GAAO,CACrC,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,gBAAgB;gBAC9B,6BAAK,GAAG,EAAE,GAAG,KAAK,CAAC,OAAO,IAAI,SAAS,IAAI,UAAU,EAAE,GAAI,CACtD,CACN,CACI,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useEffect } from \"react\";\r\n\r\nimport { FileInput, FileInputUploadCb } from \"./FileInput\";\r\nimport \"./css/image-preview.css\";\r\nimport { DropZone, FileWithPath } from \"./DropZone\";\r\n\r\nexport enum ImagePreviewSize {\r\n\tSMALL = \"small\",\r\n\tLARGE = \"large\",\r\n}\r\n\r\nexport type ImagePreviewProps = {\r\n\tid?: string;\r\n\tvalue: string;\r\n\tbaseURL: string;\r\n\tonSetValue?: (value: string) => void;\r\n\tuploadFunction: FileInputUploadCb;\r\n\tacceptTypes: string[];\r\n\tpreviewSize?: ImagePreviewSize;\r\n};\r\n\r\nlet globalCacheIndex = 0;\r\n\r\nconst cleanPath = (path: string, baseURL: string) =>\r\n\tpath\r\n\t\t.replace(new RegExp(`^${baseURL}`), \"\")\r\n\t\t.replace(/\\/{1,}/g, \"/\")\r\n\t\t.replace(/^\\//, \"\");\r\n\r\nexport const ImagePreview = (props: ImagePreviewProps) => {\r\n\tconst [cacheIndex, setCacheIndex] = useState(++globalCacheIndex);\r\n\tconst previewSize = props.previewSize || ImagePreviewSize.SMALL;\r\n\tconst [droppedFile, setDroppedFile] = useState<FileWithPath | null>(null);\r\n\r\n\tconst [imagePath, setImagePath] = useState(cleanPath(props.value, props.baseURL));\r\n\r\n\tuseEffect(() => {\r\n\t\tif (props.onSetValue) {\r\n\t\t\tprops.onSetValue(imagePath);\r\n\t\t}\r\n\t}, [imagePath]);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetImagePath(cleanPath(props.value, props.baseURL));\r\n\t}, [props]);\r\n\r\n\treturn (\r\n\t\t<DropZone\r\n\t\t\tprocessFile={(file: File) => {\r\n\t\t\t\tsetDroppedFile(file);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t<div className={[\"image-preview-container\", `image-preview-size-${previewSize}`].join(\" \")}>\r\n\t\t\t\t<FileInput\r\n\t\t\t\t\tvalue={imagePath}\r\n\t\t\t\t\tuploadFunction={props.uploadFunction}\r\n\t\t\t\t\tonSetValue={(value: string) => {\r\n\t\t\t\t\t\tsetImagePath(value);\r\n\t\t\t\t\t\tsetCacheIndex(++globalCacheIndex);\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tacceptTypes={props.acceptTypes}\r\n\t\t\t\t\tpresetFile={droppedFile}\r\n\t\t\t\t\tsuppressDropzone={true}\r\n\t\t\t\t\t{...(props.id ? { id: props.id } : {})}\r\n\t\t\t\t></FileInput>\r\n\r\n\t\t\t\t{!imagePath ? (\r\n\t\t\t\t\t<div className=\"empty-preview\"></div>\r\n\t\t\t\t) : (\r\n\t\t\t\t\t<div className=\"filled-preview\">\r\n\t\t\t\t\t\t<img src={`${props.baseURL}/${imagePath}?${cacheIndex}`} />\r\n\t\t\t\t\t</div>\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\t\t</DropZone>\r\n\t);\r\n};\r\n"]}
@@ -8,8 +8,9 @@ export const Tab = ({ children, autofocus }) => {
8
8
  const [selectedTab, setSelectedTab] = useState(autofocus || 0);
9
9
  const ref = useRef(null);
10
10
  useLayoutEffect(() => {
11
+ var _a;
11
12
  if (ref.current !== null) {
12
- ref.current.style.height = `${window.innerHeight - (ref.current.getBoundingClientRect()?.top || 0) - 10}px`;
13
+ ref.current.style.height = `${window.innerHeight - (((_a = ref.current.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.top) || 0) - 10}px`;
13
14
  }
14
15
  });
15
16
  return (React.createElement(React.Fragment, null,
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.js","sourceRoot":"","sources":["../../../src/components/common/Tab.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAmC,MAAM,OAAO,CAAC;AAClG,OAAO,eAAe,CAAC;AAOvB,MAAM,CAAC,MAAM,GAAG,GAAgC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;IAC3E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEzC,eAAe,CAAC,GAAG,EAAE;QAIpB,IAAI,GAAG,CAAC,OAAO,KAAK,IAAI,EAAE;YACzB,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC;SAC5G;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,CACN;QACC,6BAAK,IAAI,EAAC,SAAS,IACjB,KAAK,CAAC,QAAQ,CAAC,GAAG,CAClB,QAAQ,EACR,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CACZ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAC5B,6BACC,GAAG,EAAE,OAAO,GAAG,EAAE,EACjB,IAAI,EAAC,KAAK,mBACK,WAAW,KAAK,GAAG,mBACnB,YAAY,GAAG,EAAE,EAChC,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;gBAChB,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;oBACvC,cAAc,CAAC,GAAG,CAAC,CAAC;oBACpB,CAAC,CAAC,cAAc,EAAE,CAAC;iBACnB;YACF,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;gBACb,cAAc,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC,IAEC,GAAoB,CAAC,KAAK,CAAC,YAAY,CAAC,CACrC,CACN,CACF,CACI;QAEN,6BAAK,EAAE,EAAC,mBAAmB,EAAC,GAAG,EAAE,GAAG,IAClC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3C,6BACC,GAAG,EAAE,YAAY,GAAG,EAAE,EACtB,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,YAAY,GAAG,EAAE,EACrB,SAAS,EAAE,WAAW,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAE9C,GAAG,CACC,CACN,CAAC,CACG,CACJ,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useRef, useLayoutEffect, FunctionComponent, ReactElement } from \"react\";\r\nimport \"./css/tab.css\";\r\n\r\nexport type TabProps = {\r\n\tchildren?: React.ReactNode;\r\n\tautofocus?: number;\r\n};\r\n\r\nexport const Tab: FunctionComponent<TabProps> = ({ children, autofocus }) => {\r\n\tconst [selectedTab, setSelectedTab] = useState(autofocus || 0);\r\n\tconst ref = useRef<HTMLDivElement>(null);\r\n\r\n\tuseLayoutEffect(() => {\r\n\t\t// Allow for the tab panel content to look nice with its own scrollbar,\r\n\t\t// which also keeps the heading/tab group at the top of the page.\r\n\t\t// It feels like css flex should do this, but I could never get it to work.\r\n\t\tif (ref.current !== null) {\r\n\t\t\tref.current.style.height = `${window.innerHeight - (ref.current.getBoundingClientRect()?.top || 0) - 10}px`;\r\n\t\t}\r\n\t});\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div role=\"tablist\">\r\n\t\t\t\t{React.Children.map(\r\n\t\t\t\t\tchildren,\r\n\t\t\t\t\t(tab, key) =>\r\n\t\t\t\t\t\tReact.isValidElement(tab) && (\r\n\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\tkey={`tab-${key}`}\r\n\t\t\t\t\t\t\t\trole=\"tab\"\r\n\t\t\t\t\t\t\t\taria-selected={selectedTab === key}\r\n\t\t\t\t\t\t\t\taria-controls={`tabpanel-${key}`}\r\n\t\t\t\t\t\t\t\ttabIndex={0}\r\n\t\t\t\t\t\t\t\tonKeyDown={(e) => {\r\n\t\t\t\t\t\t\t\t\tif (e.key === \" \" || e.key === \"Enter\") {\r\n\t\t\t\t\t\t\t\t\t\tsetSelectedTab(key);\r\n\t\t\t\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\tsetSelectedTab(key);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t{(tab as ReactElement).props[\"data-label\"]}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t)\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"tabpanelContainer\" ref={ref}>\r\n\t\t\t\t{React.Children.map(children, (tab, key) => (\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tkey={`tabpanel-${key}`}\r\n\t\t\t\t\t\trole=\"tabpanel\"\r\n\t\t\t\t\t\tid={`tabpanel-${key}`}\r\n\t\t\t\t\t\tclassName={selectedTab === key ? \"visible\" : \"\"}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{tab}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t))}\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n};\r\n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AC,CAAC;oBACpB,CAAC,CAAC,cAAc,EAAE,CAAC;iBACnB;YACF,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;gBACb,cAAc,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC,IAEC,GAAoB,CAAC,KAAK,CAAC,YAAY,CAAC,CACrC,CACN,CACF,CACI;QAEN,6BAAK,EAAE,EAAC,mBAAmB,EAAC,GAAG,EAAE,GAAG,IAClC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3C,6BACC,GAAG,EAAE,YAAY,GAAG,EAAE,EACtB,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,YAAY,GAAG,EAAE,EACrB,SAAS,EAAE,WAAW,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAE9C,GAAG,CACC,CACN,CAAC,CACG,CACJ,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useRef, useLayoutEffect, FunctionComponent, ReactElement } from \"react\";\r\nimport \"./css/tab.css\";\r\n\r\nexport type TabProps = {\r\n\tchildren?: React.ReactNode;\r\n\tautofocus?: number;\r\n};\r\n\r\nexport const Tab: FunctionComponent<TabProps> = ({ children, autofocus }) => {\r\n\tconst [selectedTab, setSelectedTab] = useState(autofocus || 0);\r\n\tconst ref = useRef<HTMLDivElement>(null);\r\n\r\n\tuseLayoutEffect(() => {\r\n\t\t// Allow for the tab panel content to look nice with its own scrollbar,\r\n\t\t// which also keeps the heading/tab group at the top of the page.\r\n\t\t// It feels like css flex should do this, but I could never get it to work.\r\n\t\tif (ref.current !== null) {\r\n\t\t\tref.current.style.height = `${window.innerHeight - (ref.current.getBoundingClientRect()?.top || 0) - 10}px`;\r\n\t\t}\r\n\t});\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<div role=\"tablist\">\r\n\t\t\t\t{React.Children.map(\r\n\t\t\t\t\tchildren,\r\n\t\t\t\t\t(tab, key) =>\r\n\t\t\t\t\t\tReact.isValidElement(tab) && (\r\n\t\t\t\t\t\t\t<div\r\n\t\t\t\t\t\t\t\tkey={`tab-${key}`}\r\n\t\t\t\t\t\t\t\trole=\"tab\"\r\n\t\t\t\t\t\t\t\taria-selected={selectedTab === key}\r\n\t\t\t\t\t\t\t\taria-controls={`tabpanel-${key}`}\r\n\t\t\t\t\t\t\t\ttabIndex={0}\r\n\t\t\t\t\t\t\t\tonKeyDown={(e) => {\r\n\t\t\t\t\t\t\t\t\tif (e.key === \" \" || e.key === \"Enter\") {\r\n\t\t\t\t\t\t\t\t\t\tsetSelectedTab(key);\r\n\t\t\t\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\tonClick={() => {\r\n\t\t\t\t\t\t\t\t\tsetSelectedTab(key);\r\n\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t{(tab as ReactElement).props[\"data-label\"]}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t)\r\n\t\t\t\t)}\r\n\t\t\t</div>\r\n\r\n\t\t\t<div id=\"tabpanelContainer\" ref={ref}>\r\n\t\t\t\t{React.Children.map(children, (tab, key) => (\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tkey={`tabpanel-${key}`}\r\n\t\t\t\t\t\trole=\"tabpanel\"\r\n\t\t\t\t\t\tid={`tabpanel-${key}`}\r\n\t\t\t\t\t\tclassName={selectedTab === key ? \"visible\" : \"\"}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{tab}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t))}\r\n\t\t\t</div>\r\n\t\t</>\r\n\t);\r\n};\r\n"]}
@@ -2,12 +2,13 @@
2
2
  * Copyright 2017 - 2020 by ChartIQ, Inc.
3
3
  * All rights reserved.
4
4
  */
5
- /// <reference types="react" />
5
+ import React from "react";
6
6
  import "./css/tooltip.css";
7
7
  export declare type TooltipProps = {
8
- type?: "info" | "error" | "warn";
8
+ type?: "info" | "error" | "warn" | "lock";
9
9
  altClassName?: string;
10
10
  position?: string;
11
11
  children?: string;
12
+ onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
12
13
  };
13
- export declare const Tooltip: ({ type, position, children, altClassName }: TooltipProps) => JSX.Element;
14
+ export declare const Tooltip: ({ type, position, children, altClassName, onClick, }: TooltipProps) => JSX.Element;
@@ -5,7 +5,7 @@
5
5
  import React, { useState, useRef } from "react";
6
6
  import "./css/tooltip.css";
7
7
  import { FinsembleIcon } from "./FinsembleIcon";
8
- export const Tooltip = ({ type = "info", position = "right", children = "", altClassName }) => {
8
+ export const Tooltip = ({ type = "info", position = "right", children = "", altClassName, onClick = () => { }, }) => {
9
9
  const [tooltipOpen, setTooltipOpen] = useState(false);
10
10
  const tooltipContentRef = useRef(null);
11
11
  const pos = tooltipContentRef.current && tooltipContentRef.current.getBoundingClientRect().right > window.innerWidth
@@ -19,8 +19,8 @@ export const Tooltip = ({ type = "info", position = "right", children = "", altC
19
19
  setTooltipOpen(false);
20
20
  }, onBlur: () => {
21
21
  setTooltipOpen(false);
22
- } },
23
- altClassName ? (React.createElement("div", { className: altClassName })) : (React.createElement("div", { className: ["tooltip-icon", `tooltip-icon-${type}`].join(" ") }, type === "error" || type === "warn" ? (React.createElement(FinsembleIcon, { icon: "exclamation-circle" })) : (React.createElement(FinsembleIcon, { icon: "question-circle" })))),
22
+ }, onClick: onClick },
23
+ altClassName ? (React.createElement("div", { className: altClassName })) : (React.createElement("div", { className: ["tooltip-icon", `tooltip-icon-${type}`].join(" ") }, type === "error" || type === "warn" ? (React.createElement(FinsembleIcon, { icon: "exclamation-circle" })) : type === "lock" ? (React.createElement(FinsembleIcon, { icon: "lock" })) : (React.createElement(FinsembleIcon, { icon: "question-circle" })))),
24
24
  React.createElement("div", { ref: tooltipContentRef, className: ["tooltip-content", tooltipOpen ? "visible" : ""].join(" ") }, children)));
25
25
  };
26
26
  //# sourceMappingURL=Tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/components/common/Tooltip.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,QAAQ,GAAG,OAAO,EAAE,QAAQ,GAAG,EAAE,EAAE,YAAY,EAAgB,EAAE,EAAE;IAC3G,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAItD,MAAM,iBAAiB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACvD,MAAM,GAAG,GACR,iBAAiB,CAAC,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU;QACvG,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,QAAQ,CAAC;IAEb,OAAO,CACN,6BACC,SAAS,EAAE,CAAC,SAAS,EAAE,4BAA4B,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACnE,QAAQ,EAAE,CAAC,EACX,IAAI,EAAC,SAAS,gBACF,QAAQ,EACpB,WAAW,EAAE,GAAG,EAAE;YACjB,cAAc,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;YACb,cAAc,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;YAClB,cAAc,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,EACD,MAAM,EAAE,GAAG,EAAE;YACZ,cAAc,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QAEA,YAAY,CAAC,CAAC,CAAC,CACf,6BAAK,SAAS,EAAE,YAAY,GAAQ,CACpC,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAE,CAAC,cAAc,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAChE,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACtC,oBAAC,aAAa,IAAC,IAAI,EAAC,oBAAoB,GAAiB,CACzD,CAAC,CAAC,CAAC,CACH,oBAAC,aAAa,IAAC,IAAI,EAAC,iBAAiB,GAAiB,CACtD,CACI,CACN;QACD,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IACjG,QAAQ,CACJ,CACD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useRef } from \"react\";\r\nimport \"./css/tooltip.css\";\r\nimport { FinsembleIcon } from \"./FinsembleIcon\";\r\n\r\nexport type TooltipProps = {\r\n\ttype?: \"info\" | \"error\" | \"warn\";\r\n\taltClassName?: string;\r\n\tposition?: string;\r\n\tchildren?: string;\r\n};\r\n\r\nexport const Tooltip = ({ type = \"info\", position = \"right\", children = \"\", altClassName }: TooltipProps) => {\r\n\tconst [tooltipOpen, setTooltipOpen] = useState(false);\r\n\r\n\t// If the tooltip content is floating so far to the right that it flows offscreen, switch the position to the left.\r\n\t// This only works for right-sided tooltips. Left-sided tooltips that float offscreen are not addressed.\r\n\tconst tooltipContentRef = useRef<HTMLDivElement>(null);\r\n\tconst pos =\r\n\t\ttooltipContentRef.current && tooltipContentRef.current.getBoundingClientRect().right > window.innerWidth\r\n\t\t\t? \"left\"\r\n\t\t\t: position;\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={[\"tooltip\", `tooltip-position-content-${pos}`].join(\" \")}\r\n\t\t\ttabIndex={0}\r\n\t\t\trole=\"tooltip\"\r\n\t\t\taria-label={children}\r\n\t\t\tonMouseOver={() => {\r\n\t\t\t\tsetTooltipOpen(true);\r\n\t\t\t}}\r\n\t\t\tonFocus={() => {\r\n\t\t\t\tsetTooltipOpen(true);\r\n\t\t\t}}\r\n\t\t\tonMouseLeave={() => {\r\n\t\t\t\tsetTooltipOpen(false);\r\n\t\t\t}}\r\n\t\t\tonBlur={() => {\r\n\t\t\t\tsetTooltipOpen(false);\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{altClassName ? (\r\n\t\t\t\t<div className={altClassName}></div>\r\n\t\t\t) : (\r\n\t\t\t\t<div className={[\"tooltip-icon\", `tooltip-icon-${type}`].join(\" \")}>\r\n\t\t\t\t\t{type === \"error\" || type === \"warn\" ? (\r\n\t\t\t\t\t\t<FinsembleIcon icon=\"exclamation-circle\"></FinsembleIcon>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<FinsembleIcon icon=\"question-circle\"></FinsembleIcon>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t\t<div ref={tooltipContentRef} className={[\"tooltip-content\", tooltipOpen ? \"visible\" : \"\"].join(\" \")}>\r\n\t\t\t\t{children}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/components/common/Tooltip.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,mBAA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C,IAAI,CAAC,GAAG,CAAC,IAChE,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACtC,oBAAC,aAAa,IAAC,IAAI,EAAC,oBAAoB,GAAiB,CACzD,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACrB,oBAAC,aAAa,IAAC,IAAI,EAAC,MAAM,GAAiB,CAC3C,CAAC,CAAC,CAAC,CACH,oBAAC,aAAa,IAAC,IAAI,EAAC,iBAAiB,GAAiB,CACtD,CACI,CACN;QACD,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IACjG,QAAQ,CACJ,CACD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\r\n * Copyright 2017 - 2020 by ChartIQ, Inc.\r\n * All rights reserved.\r\n */\r\n\r\nimport React, { useState, useRef } from \"react\";\r\nimport \"./css/tooltip.css\";\r\nimport { FinsembleIcon } from \"./FinsembleIcon\";\r\n\r\nexport type TooltipProps = {\r\n\ttype?: \"info\" | \"error\" | \"warn\" | \"lock\";\r\n\taltClassName?: string;\r\n\tposition?: string;\r\n\tchildren?: string;\r\n\tonClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\r\n};\r\n\r\nexport const Tooltip = ({\r\n\ttype = \"info\",\r\n\tposition = \"right\",\r\n\tchildren = \"\",\r\n\taltClassName,\r\n\tonClick = () => {},\r\n}: TooltipProps) => {\r\n\tconst [tooltipOpen, setTooltipOpen] = useState(false);\r\n\r\n\t// If the tooltip content is floating so far to the right that it flows offscreen, switch the position to the left.\r\n\t// This only works for right-sided tooltips. Left-sided tooltips that float offscreen are not addressed.\r\n\tconst tooltipContentRef = useRef<HTMLDivElement>(null);\r\n\tconst pos =\r\n\t\ttooltipContentRef.current && tooltipContentRef.current.getBoundingClientRect().right > window.innerWidth\r\n\t\t\t? \"left\"\r\n\t\t\t: position;\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={[\"tooltip\", `tooltip-position-content-${pos}`].join(\" \")}\r\n\t\t\ttabIndex={0}\r\n\t\t\trole=\"tooltip\"\r\n\t\t\taria-label={children}\r\n\t\t\tonMouseOver={() => {\r\n\t\t\t\tsetTooltipOpen(true);\r\n\t\t\t}}\r\n\t\t\tonFocus={() => {\r\n\t\t\t\tsetTooltipOpen(true);\r\n\t\t\t}}\r\n\t\t\tonMouseLeave={() => {\r\n\t\t\t\tsetTooltipOpen(false);\r\n\t\t\t}}\r\n\t\t\tonBlur={() => {\r\n\t\t\t\tsetTooltipOpen(false);\r\n\t\t\t}}\r\n\t\t\tonClick={onClick}\r\n\t\t>\r\n\t\t\t{altClassName ? (\r\n\t\t\t\t<div className={altClassName}></div>\r\n\t\t\t) : (\r\n\t\t\t\t<div className={[\"tooltip-icon\", `tooltip-icon-${type}`].join(\" \")}>\r\n\t\t\t\t\t{type === \"error\" || type === \"warn\" ? (\r\n\t\t\t\t\t\t<FinsembleIcon icon=\"exclamation-circle\"></FinsembleIcon>\r\n\t\t\t\t\t) : type === \"lock\" ? (\r\n\t\t\t\t\t\t<FinsembleIcon icon=\"lock\"></FinsembleIcon>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t<FinsembleIcon icon=\"question-circle\"></FinsembleIcon>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</div>\r\n\t\t\t)}\r\n\t\t\t<div ref={tooltipContentRef} className={[\"tooltip-content\", tooltipOpen ? \"visible\" : \"\"].join(\" \")}>\r\n\t\t\t\t{children}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
@@ -66,3 +66,13 @@
66
66
  border-color: #f5a623;
67
67
  position: relative;
68
68
  }
69
+
70
+ .app-edit-access-item {
71
+ display: flex;
72
+ width: 100%;
73
+ padding-right: 1em;
74
+ }
75
+
76
+ .app-edit-access-item-name {
77
+ flex-grow: 1;
78
+ }