@finsemble/finsemble-ui 6.1.3 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/package.json +20 -17
  2. package/react/actions/smartDesktopDesignerActions.d.ts +5 -4
  3. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  4. package/react/assets/css/defaultTheme.css +1 -1
  5. package/react/assets/css/notificationsCenter.css +1 -0
  6. package/react/assets/css/userPreferences.css +4 -2
  7. package/react/assets/css/windowTitleBar.css +1 -0
  8. package/react/assets/icons/check-square.svg +6 -0
  9. package/react/assets/icons/lock.svg +6 -0
  10. package/react/components/common/Button.d.ts +1 -0
  11. package/react/components/common/Button.js +2 -2
  12. package/react/components/common/Button.js.map +1 -1
  13. package/react/components/common/ButtonRow.d.ts +15 -0
  14. package/react/components/common/ButtonRow.js +32 -0
  15. package/react/components/common/ButtonRow.js.map +1 -0
  16. package/react/components/common/Checkbox.d.ts +8 -0
  17. package/react/components/common/Checkbox.js +22 -0
  18. package/react/components/common/Checkbox.js.map +1 -0
  19. package/react/components/common/FinsembleIcon.d.ts +1 -1
  20. package/react/components/common/FinsembleIcon.js +4 -0
  21. package/react/components/common/FinsembleIcon.js.map +1 -1
  22. package/react/components/common/FinsembleSelect.d.ts +3 -2
  23. package/react/components/common/FinsembleSelect.js +2 -2
  24. package/react/components/common/FinsembleSelect.js.map +1 -1
  25. package/react/components/common/Tooltip.d.ts +4 -3
  26. package/react/components/common/Tooltip.js +3 -3
  27. package/react/components/common/Tooltip.js.map +1 -1
  28. package/react/components/common/css/tooltip.css +10 -0
  29. package/react/components/common/helpers.js +12 -0
  30. package/react/components/common/helpers.js.map +1 -1
  31. package/react/components/common/stories/ButtonRow.stories.d.ts +14 -0
  32. package/react/components/common/stories/ButtonRow.stories.js +39 -0
  33. package/react/components/common/stories/ButtonRow.stories.js.map +1 -0
  34. package/react/components/common/stories/Checkbox.stories.d.ts +13 -0
  35. package/react/components/common/stories/Checkbox.stories.js +29 -0
  36. package/react/components/common/stories/Checkbox.stories.js.map +1 -0
  37. package/react/components/common/stories/DropdownButton.stories.d.ts +22 -0
  38. package/react/components/common/stories/DropdownButton.stories.js +29 -0
  39. package/react/components/common/stories/DropdownButton.stories.js.map +1 -0
  40. package/react/components/common/stories/FinsembleIcon.stories.js +2 -0
  41. package/react/components/common/stories/FinsembleIcon.stories.js.map +1 -1
  42. package/react/components/common/stories/FinsembleSelect.stories.d.ts +1 -1
  43. package/react/components/common/stories/Tooltip.stories.d.ts +1 -1
  44. package/react/components/{shared/addProtocolToValidURL.spec.d.ts → common/tests/ButtonRow.spec.d.ts} +0 -0
  45. package/react/components/common/tests/ButtonRow.spec.js +25 -0
  46. package/react/components/common/tests/ButtonRow.spec.js.map +1 -0
  47. package/react/components/common/tests/Checkbox.spec.d.ts +1 -0
  48. package/react/components/common/tests/Checkbox.spec.js +33 -0
  49. package/react/components/common/tests/Checkbox.spec.js.map +1 -0
  50. package/react/components/fdc3Resolver/ResolverDialog.css +1 -0
  51. package/react/components/fdc3Resolver/ResolverDialog.js +4 -5
  52. package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
  53. package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -8
  54. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  55. package/react/components/fdc3Resolver/ResolverDialog.stories.js +45 -45
  56. package/react/components/fdc3Resolver/ResolverDialog.stories.js.map +1 -1
  57. package/react/components/notifications/components/drawer/DrawerHeader.js +6 -6
  58. package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
  59. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +32 -31
  60. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  61. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +4 -6
  62. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  63. package/react/components/notifications/components/views/ListView.js +1 -1
  64. package/react/components/notifications/components/views/ListView.js.map +1 -1
  65. package/react/components/notifications/components/views/NotificationDetailsView.js +3 -2
  66. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  67. package/react/components/notifications/constants.d.ts +13 -0
  68. package/react/components/notifications/constants.js.map +1 -1
  69. package/react/components/search/Highlight.js +13 -3
  70. package/react/components/search/Highlight.js.map +1 -1
  71. package/react/components/shared/DefaultDropdownButton.d.ts +1 -0
  72. package/react/components/shared/DefaultDropdownButton.js +14 -4
  73. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  74. package/react/components/shared/tests/DefaultDropdownButton.spec.d.ts +1 -0
  75. package/react/components/shared/tests/DefaultDropdownButton.spec.js +54 -0
  76. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -0
  77. package/react/components/shared/tests/addProtocolToValidURL.spec.d.ts +1 -0
  78. package/react/components/shared/{addProtocolToValidURL.spec.js → tests/addProtocolToValidURL.spec.js} +1 -1
  79. package/react/components/shared/tests/addProtocolToValidURL.spec.js.map +1 -0
  80. package/react/components/smartDesktopDesigner/AppEditAccess.d.ts +15 -0
  81. package/react/components/smartDesktopDesigner/AppEditAccess.js +155 -0
  82. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -0
  83. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +7 -1
  84. package/react/components/smartDesktopDesigner/AppEditPage.js +5 -1
  85. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  86. package/react/components/smartDesktopDesigner/Application.d.ts +4 -1
  87. package/react/components/smartDesktopDesigner/Application.js +20 -10
  88. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  89. package/react/components/smartDesktopDesigner/ApplicationEdit.d.ts +3 -0
  90. package/react/components/smartDesktopDesigner/ApplicationEdit.js +2 -2
  91. package/react/components/smartDesktopDesigner/ApplicationEdit.js.map +1 -1
  92. package/react/components/smartDesktopDesigner/ApplicationList.js +11 -1
  93. package/react/components/smartDesktopDesigner/ApplicationList.js.map +1 -1
  94. package/react/components/smartDesktopDesigner/ApplicationSetup.d.ts +6 -1
  95. package/react/components/smartDesktopDesigner/ApplicationSetup.js.map +1 -1
  96. package/react/components/smartDesktopDesigner/Applications.d.ts +2 -0
  97. package/react/components/smartDesktopDesigner/Applications.js +2 -2
  98. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  99. package/react/components/smartDesktopDesigner/common/views.js +2 -0
  100. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  101. package/react/components/smartDesktopDesigner/css/applications.css +38 -0
  102. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js +18 -0
  103. package/react/components/smartDesktopDesigner/fixtures/applicationEditProps.js.map +1 -1
  104. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js +9 -0
  105. package/react/components/smartDesktopDesigner/fixtures/applicationSetupProps.js.map +1 -1
  106. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js +6 -2
  107. package/react/components/smartDesktopDesigner/fixtures/applicationsProps.js.map +1 -1
  108. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +71 -2
  109. package/react/components/smartDesktopDesigner/fixtures/apps.js +16 -5
  110. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  111. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +1 -1
  112. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +20 -0
  113. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  114. package/react/components/smartDesktopDesigner/stories/Applications.stories.js +2 -1
  115. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +1 -1
  116. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +1 -0
  117. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  118. package/react/components/smartDesktopDesigner/tests/Applications.spec.d.ts +1 -1
  119. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +84 -7
  120. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  121. package/react/components/toolbar/advancedAppLauncher/components/Content.js +2 -3
  122. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  123. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js +1 -1
  124. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  125. package/react/components/toolbar/dashbar/Dashbar.js +23 -11
  126. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  127. package/react/components/userPreferences/UserPreferences.js +8 -23
  128. package/react/components/userPreferences/UserPreferences.js.map +1 -1
  129. package/react/components/userPreferences/UserPreferencesBase.d.ts +3 -1
  130. package/react/components/userPreferences/UserPreferencesBase.js +5 -6
  131. package/react/components/userPreferences/UserPreferencesBase.js.map +1 -1
  132. package/react/components/userPreferences/UserPreferencesWrapper.d.ts +4 -0
  133. package/react/components/userPreferences/UserPreferencesWrapper.js +27 -0
  134. package/react/components/userPreferences/UserPreferencesWrapper.js.map +1 -0
  135. package/react/components/userPreferences/components/ContentSection.d.ts +18 -3
  136. package/react/components/userPreferences/components/ContentSection.js +4 -2
  137. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  138. package/react/components/userPreferences/components/LeftNav.d.ts +19 -4
  139. package/react/components/userPreferences/components/LeftNav.js +11 -10
  140. package/react/components/userPreferences/components/LeftNav.js.map +1 -1
  141. package/react/components/userPreferences/components/content/DashbarEditor.d.ts +20 -5
  142. package/react/components/userPreferences/components/content/DashbarEditor.js +11 -11
  143. package/react/components/userPreferences/components/content/DashbarEditor.js.map +1 -1
  144. package/react/components/userPreferences/components/content/DashbarEditorItem.d.ts +10 -0
  145. package/react/components/userPreferences/components/content/DashbarEditorItem.js +11 -0
  146. package/react/components/userPreferences/components/content/DashbarEditorItem.js.map +1 -0
  147. package/react/components/userPreferences/components/content/General.d.ts +10 -3
  148. package/react/components/userPreferences/components/content/General.js +2 -2
  149. package/react/components/userPreferences/components/content/General.js.map +1 -1
  150. package/react/components/userPreferences/components/content/Workspaces.js +39 -112
  151. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  152. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +9 -11
  153. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  154. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.d.ts +1 -1
  155. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js +9 -7
  156. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  157. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.d.ts +3 -1
  158. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js +13 -12
  159. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourcesPreferences.js.map +1 -1
  160. package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +24 -7
  161. package/react/components/userPreferences/components/general/ScheduledRestart.js +71 -22
  162. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  163. package/react/components/userPreferences/components/workspaces/WorkspaceButton.d.ts +9 -0
  164. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +5 -0
  165. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -0
  166. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.d.ts +6 -0
  167. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js +8 -0
  168. package/react/components/userPreferences/components/workspaces/WorkspaceComponents.js.map +1 -0
  169. package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +45 -0
  170. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +82 -0
  171. package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -0
  172. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.d.ts +8 -0
  173. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js +7 -0
  174. package/react/components/userPreferences/components/workspaces/WorkspaceItemList.js.map +1 -0
  175. package/react/components/userPreferences/index.d.ts +1 -1
  176. package/react/components/userPreferences/index.js +1 -1
  177. package/react/components/userPreferences/index.js.map +1 -1
  178. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +0 -1
  179. package/react/components/userPreferences/stores/UserPreferencesStore.js +4 -9
  180. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  181. package/react/components/userPreferences/stories/DashbarEditor.stories.d.ts +2 -1
  182. package/react/components/userPreferences/stories/DashbarEditor.stories.js +35 -4
  183. package/react/components/userPreferences/stories/DashbarEditor.stories.js.map +1 -1
  184. package/react/components/userPreferences/stories/DashbarEditorItem.stories.d.ts +11 -0
  185. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js +21 -0
  186. package/react/components/userPreferences/stories/DashbarEditorItem.stories.js.map +1 -0
  187. package/react/components/userPreferences/stories/General.stories.d.ts +9 -0
  188. package/react/components/userPreferences/stories/General.stories.js +16 -0
  189. package/react/components/userPreferences/stories/General.stories.js.map +1 -0
  190. package/react/components/userPreferences/stories/Notifications.stories.d.ts +9 -0
  191. package/react/components/userPreferences/stories/Notifications.stories.js +17 -0
  192. package/react/components/userPreferences/stories/Notifications.stories.js.map +1 -0
  193. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.d.ts +9 -0
  194. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js +20 -0
  195. package/react/components/userPreferences/stories/NotificationsSourceTypes.stories.js.map +1 -0
  196. package/react/components/userPreferences/stories/NotificationsSources.stories.d.ts +12 -0
  197. package/react/components/userPreferences/stories/NotificationsSources.stories.js +28 -0
  198. package/react/components/userPreferences/stories/NotificationsSources.stories.js.map +1 -0
  199. package/react/components/userPreferences/stories/UserPreferences.stories.d.ts +8 -0
  200. package/react/components/userPreferences/stories/UserPreferences.stories.js +53 -0
  201. package/react/components/userPreferences/stories/UserPreferences.stories.js.map +1 -0
  202. package/react/components/userPreferences/stories/WorkspaceButton.stories.d.ts +15 -0
  203. package/react/components/userPreferences/stories/WorkspaceButton.stories.js +13 -0
  204. package/react/components/userPreferences/stories/WorkspaceButton.stories.js.map +1 -0
  205. package/react/components/userPreferences/stories/WorkspaceComponents.stories.d.ts +13 -0
  206. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js +26 -0
  207. package/react/components/userPreferences/stories/WorkspaceComponents.stories.js.map +1 -0
  208. package/react/components/userPreferences/stories/WorkspaceItem.stories.d.ts +9 -0
  209. package/react/components/userPreferences/stories/WorkspaceItem.stories.js +30 -0
  210. package/react/components/userPreferences/stories/WorkspaceItem.stories.js.map +1 -0
  211. package/react/components/userPreferences/stories/WorkspaceItemList.stories.d.ts +10 -0
  212. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js +57 -0
  213. package/react/components/userPreferences/stories/WorkspaceItemList.stories.js.map +1 -0
  214. package/react/components/userPreferences/stories/Workspaces.stories.d.ts +9 -0
  215. package/react/components/userPreferences/stories/Workspaces.stories.js +44 -0
  216. package/react/components/userPreferences/stories/Workspaces.stories.js.map +1 -0
  217. package/react/components/userPreferences/tests/ContentSection.spec.d.ts +1 -0
  218. package/react/components/userPreferences/tests/ContentSection.spec.js +41 -0
  219. package/react/components/userPreferences/tests/ContentSection.spec.js.map +1 -0
  220. package/react/components/userPreferences/tests/DashbarEditor.spec.d.ts +1 -0
  221. package/react/components/userPreferences/tests/DashbarEditor.spec.js +37 -0
  222. package/react/components/userPreferences/tests/DashbarEditor.spec.js.map +1 -0
  223. package/react/components/userPreferences/tests/DashbarEditorItem.spec.d.ts +1 -0
  224. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js +38 -0
  225. package/react/components/userPreferences/tests/DashbarEditorItem.spec.js.map +1 -0
  226. package/react/components/userPreferences/tests/General.spec.d.ts +1 -0
  227. package/react/components/userPreferences/tests/General.spec.js +28 -0
  228. package/react/components/userPreferences/tests/General.spec.js.map +1 -0
  229. package/react/components/userPreferences/tests/LeftNav.spec.d.ts +1 -0
  230. package/react/components/userPreferences/tests/LeftNav.spec.js +12 -0
  231. package/react/components/userPreferences/tests/LeftNav.spec.js.map +1 -0
  232. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.d.ts +1 -0
  233. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js +14 -0
  234. package/react/components/userPreferences/tests/NotificationSourceTypes.spec.js.map +1 -0
  235. package/react/components/userPreferences/tests/Notifications.spec.d.ts +1 -0
  236. package/react/components/userPreferences/tests/Notifications.spec.js +17 -0
  237. package/react/components/userPreferences/tests/Notifications.spec.js.map +1 -0
  238. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.d.ts +1 -0
  239. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +39 -0
  240. package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -0
  241. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.d.ts +1 -0
  242. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js +22 -0
  243. package/react/components/userPreferences/tests/NotificationsSourcesPreferences.spec.js.map +1 -0
  244. package/react/components/userPreferences/tests/ScheduledRestart.spec.d.ts +1 -0
  245. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +70 -0
  246. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -0
  247. package/react/components/userPreferences/tests/WorkspaceButton.spec.d.ts +1 -0
  248. package/react/components/userPreferences/tests/WorkspaceButton.spec.js +24 -0
  249. package/react/components/userPreferences/tests/WorkspaceButton.spec.js.map +1 -0
  250. package/react/components/userPreferences/tests/WorkspaceComponents.spec.d.ts +1 -0
  251. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js +22 -0
  252. package/react/components/userPreferences/tests/WorkspaceComponents.spec.js.map +1 -0
  253. package/react/components/userPreferences/tests/WorkspaceItem.spec.d.ts +1 -0
  254. package/react/components/userPreferences/tests/WorkspaceItem.spec.js +64 -0
  255. package/react/components/userPreferences/tests/WorkspaceItem.spec.js.map +1 -0
  256. package/react/components/userPreferences/tests/WorkspaceItemList.spec.d.ts +1 -0
  257. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js +45 -0
  258. package/react/components/userPreferences/tests/WorkspaceItemList.spec.js.map +1 -0
  259. package/react/hooks/useNotifications.d.ts +4 -0
  260. package/react/hooks/useNotifications.js +47 -40
  261. package/react/hooks/useNotifications.js.map +1 -1
  262. package/react/hooks/usePubSub.js.map +1 -1
  263. package/react/hooks/useToolbar.js +71 -48
  264. package/react/hooks/useToolbar.js.map +1 -1
  265. package/react/reducers/rootReducer.d.ts +2 -2
  266. package/react/store.d.ts +4 -4
  267. package/react/types/dashbarTypes.d.ts +1 -1
  268. package/react/types/dashbarTypes.js.map +1 -1
  269. package/react/types/fdc3.d.ts +8 -22
  270. package/react/types/fdc3.js.map +1 -1
  271. package/react/types/smartDesktopDesignerTypes.d.ts +4 -1
  272. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  273. package/react/components/shared/addProtocolToValidURL.spec.js.map +0 -1
  274. package/react/components/userPreferences/components/Checkbox.d.ts +0 -4
  275. package/react/components/userPreferences/components/Checkbox.js +0 -27
  276. package/react/components/userPreferences/components/Checkbox.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finsemble/finsemble-ui",
3
- "version": "6.1.3",
3
+ "version": "6.2.0",
4
4
  "description": "Ready-made React components to give you a head-start building your SmartDesktop.",
5
5
  "types": "index.d.ts",
6
6
  "files": [
@@ -33,16 +33,17 @@
33
33
  "@reduxjs/toolkit": "^1.5.0",
34
34
  "@svgr/webpack": "^5.5.0",
35
35
  "@types/chai": "4.2.21",
36
- "@types/lodash": "4.14.171",
36
+ "@types/lodash": "4.14.172",
37
37
  "@types/mime-types": "^2.1.0",
38
38
  "@types/mocha": "9.0.0",
39
- "@types/react": "17.0.14",
39
+ "@types/react": "17.0.19",
40
40
  "@types/react-dom": "17.0.8",
41
41
  "@types/react-input-autosize": "2.2.1",
42
42
  "@types/react-redux": "7.1.18",
43
- "@typescript-eslint/eslint-plugin": "4.28.1",
44
- "@typescript-eslint/parser": "4.28.4",
45
- "async": "3.2.0",
43
+ "@types/react-relative-portal": "^1.8.1",
44
+ "@typescript-eslint/eslint-plugin": "4.29.3",
45
+ "@typescript-eslint/parser": "4.29.3",
46
+ "async": "3.2.1",
46
47
  "babel-core": "^6.26.3",
47
48
  "date-fns": "^2.16.1",
48
49
  "dom-autoscroller": "2.3.4",
@@ -52,9 +53,10 @@
52
53
  "react-circular-progressbar": "^2.0.3",
53
54
  "react-input-autosize": "^3.0.0",
54
55
  "react-redux": "7.2.4",
56
+ "react-relative-portal": "^1.8.0",
55
57
  "react-sortable-hoc": "2.0.0",
56
58
  "react-transition-group": "4.4.2",
57
- "redux": "4.1.0",
59
+ "redux": "4.1.1",
58
60
  "unionize": "3.1.0"
59
61
  },
60
62
  "peerDependencies": {
@@ -66,10 +68,10 @@
66
68
  "@babel/preset-env": "^7.14.7",
67
69
  "@babel/preset-react": "^7.12.10",
68
70
  "@finsemble/finsemble-core": "6.0.0-beta.4",
69
- "@storybook/addon-actions": "6.3.4",
70
- "@storybook/addon-essentials": "6.3.5",
71
- "@storybook/addon-links": "6.3.4",
72
- "@storybook/react": "6.3.4",
71
+ "@storybook/addon-actions": "6.3.7",
72
+ "@storybook/addon-essentials": "6.3.7",
73
+ "@storybook/addon-links": "6.3.7",
74
+ "@storybook/react": "6.3.7",
73
75
  "@types/enzyme": "^3.10.8",
74
76
  "@types/enzyme-adapter-react-16": "^1.0.6",
75
77
  "@types/react-transition-group": "4.4.2",
@@ -80,20 +82,20 @@
80
82
  "babel-register": "^6.26.0",
81
83
  "canvas": "^2.6.1",
82
84
  "chai": "4.3.4",
83
- "chokidar-cli": "2.1.0",
84
- "concurrently": "6.2.0",
85
+ "chokidar-cli": "3.0.0",
86
+ "concurrently": "6.2.1",
85
87
  "copyfiles": "2.4.1",
86
88
  "core-js": "^3.15.2",
87
89
  "enzyme": "^3.11.0",
88
90
  "enzyme-adapter-react-16": "^1.15.6",
89
- "eslint": "7.31.0",
90
- "eslint-plugin-import": "2.23.4",
91
+ "eslint": "7.32.0",
92
+ "eslint-plugin-import": "2.24.2",
91
93
  "eslint-plugin-react": "7.24.0",
92
94
  "eslint-plugin-react-hooks": "4.2.0",
93
95
  "esm": "^3.2.25",
94
96
  "ignore-styles": "^5.0.1",
95
97
  "improved-yarn-audit": "^2.3.3",
96
- "jsdom": "^16.4.0",
98
+ "jsdom": "^17.0.0",
97
99
  "mime-types": "^2.1.28",
98
100
  "mocha": "8.2.1",
99
101
  "nyc": "15.1.0",
@@ -109,7 +111,8 @@
109
111
  "ts-mocha/ts-node": "^10.1.0",
110
112
  "trim": "0.0.3",
111
113
  "css-what": "5.0.1",
112
- "prismjs": "1.24.0"
114
+ "prismjs": "1.24.0",
115
+ "tar": "6.1.2"
113
116
  },
114
117
  "repository": {
115
118
  "type": "git",
@@ -1,13 +1,14 @@
1
1
  /// <reference types="finsemble-core" />
2
+ import { AppDefinition } from "services/Interop/types";
2
3
  import { UnionOf } from "unionize";
3
4
  import { ApplicationSetupType, AuthenticationProvider, MenuType, ProjectError, ProjectSaveData } from "../types/smartDesktopDesignerTypes";
4
5
  export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
5
6
  change_view: string;
6
- update_apps: any[];
7
+ update_apps: AppDefinition[];
7
8
  new_app: string | null;
8
9
  set_current_app_id: string | null;
9
10
  set_current_app_setup_type: ApplicationSetupType | null;
10
- update_app: any;
11
+ update_app: AppDefinition;
11
12
  delete_app: string;
12
13
  update_menus: MenuType;
13
14
  set_deploy_info: DeployInfo | null;
@@ -22,11 +23,11 @@ export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
22
23
  set_reviewing_project_errors: boolean;
23
24
  }, import("unionize").SingleValueVariants<{
24
25
  change_view: string;
25
- update_apps: any[];
26
+ update_apps: AppDefinition[];
26
27
  new_app: string | null;
27
28
  set_current_app_id: string | null;
28
29
  set_current_app_setup_type: ApplicationSetupType | null;
29
- update_app: any;
30
+ update_app: AppDefinition;
30
31
  delete_app: string;
31
32
  update_menus: MenuType;
32
33
  set_deploy_info: DeployInfo | null;
@@ -1 +1 @@
1
- {"version":3,"file":"smartDesktopDesignerActions.js","sourceRoot":"","sources":["../../src/actions/smartDesktopDesignerActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AASrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,QAAQ,CAClD;IACC,WAAW,EAAE,MAAM,EAAU;IAC7B,WAAW,EAAE,MAAM,EAAgB;IACnC,OAAO,EAAE,MAAM,EAAiB;IAChC,kBAAkB,EAAE,MAAM,EAAiB;IAC3C,0BAA0B,EAAE,MAAM,EAA+B;IACjE,UAAU,EAAE,MAAM,EAAc;IAChC,UAAU,EAAE,MAAM,EAAU;IAC5B,YAAY,EAAE,MAAM,EAAY;IAChC,eAAe,EAAE,MAAM,EAAqB;IAC5C,iBAAiB,EAAE,MAAM,EAAiB;IAC1C,iBAAiB,EAAE,MAAM,EAAW;IACpC,gBAAgB,EAAE,MAAM,EAAmB;IAC3C,sBAAsB,EAAE,MAAM,EAAW;IACzC,oBAAoB,EAAE,MAAM,EAA0B;IACtD,oBAAoB,EAAE,MAAM,EAAU;IACtC,iBAAiB,EAAE,MAAM,EAAgB;IACzC,oBAAoB,EAAE,MAAM,EAAgB;IAC5C,4BAA4B,EAAE,MAAM,EAAW;CAC/C,EACD,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CACjC,CAAC","sourcesContent":["import { unionize, ofType, UnionOf } from \"unionize\";\r\nimport {\r\n\tApplicationSetupType,\r\n\tAuthenticationProvider,\r\n\tMenuType,\r\n\tProjectError,\r\n\tProjectSaveData,\r\n} from \"../types/smartDesktopDesignerTypes\";\r\n\r\nexport const SmartDesktopDesignerActions = unionize(\r\n\t{\r\n\t\tchange_view: ofType<string>(),\r\n\t\tupdate_apps: ofType<AppDConfig[]>(),\r\n\t\tnew_app: ofType<string | null>(),\r\n\t\tset_current_app_id: ofType<string | null>(),\r\n\t\tset_current_app_setup_type: ofType<ApplicationSetupType | null>(),\r\n\t\tupdate_app: ofType<AppDConfig>(),\r\n\t\tdelete_app: ofType<string>(),\r\n\t\tupdate_menus: ofType<MenuType>(),\r\n\t\tset_deploy_info: ofType<DeployInfo | null>(),\r\n\t\tset_publish_error: ofType<string | null>(),\r\n\t\tset_is_publishing: ofType<boolean>(),\r\n\t\tset_project_info: ofType<ProjectSaveData>(),\r\n\t\tset_is_getting_started: ofType<boolean>(),\r\n\t\tupdate_auth_provider: ofType<AuthenticationProvider>(),\r\n\t\tenable_auth_provider: ofType<string>(),\r\n\t\tset_project_error: ofType<ProjectError>(),\r\n\t\tdelete_project_error: ofType<ProjectError>(),\r\n\t\tset_reviewing_project_errors: ofType<boolean>(),\r\n\t},\r\n\t{ tag: \"type\", value: \"payload\" }\r\n);\r\n\r\nexport type SmartDesktopDesignerActionsTypes = UnionOf<typeof SmartDesktopDesignerActions>;\r\n"]}
1
+ {"version":3,"file":"smartDesktopDesignerActions.js","sourceRoot":"","sources":["../../src/actions/smartDesktopDesignerActions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AASrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,QAAQ,CAClD;IACC,WAAW,EAAE,MAAM,EAAU;IAC7B,WAAW,EAAE,MAAM,EAAmB;IACtC,OAAO,EAAE,MAAM,EAAiB;IAChC,kBAAkB,EAAE,MAAM,EAAiB;IAC3C,0BAA0B,EAAE,MAAM,EAA+B;IACjE,UAAU,EAAE,MAAM,EAAiB;IACnC,UAAU,EAAE,MAAM,EAAU;IAC5B,YAAY,EAAE,MAAM,EAAY;IAChC,eAAe,EAAE,MAAM,EAAqB;IAC5C,iBAAiB,EAAE,MAAM,EAAiB;IAC1C,iBAAiB,EAAE,MAAM,EAAW;IACpC,gBAAgB,EAAE,MAAM,EAAmB;IAC3C,sBAAsB,EAAE,MAAM,EAAW;IACzC,oBAAoB,EAAE,MAAM,EAA0B;IACtD,oBAAoB,EAAE,MAAM,EAAU;IACtC,iBAAiB,EAAE,MAAM,EAAgB;IACzC,oBAAoB,EAAE,MAAM,EAAgB;IAC5C,4BAA4B,EAAE,MAAM,EAAW;CAC/C,EACD,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CACjC,CAAC","sourcesContent":["import { AppDefinition } from \"services/Interop/types\";\r\nimport { unionize, ofType, UnionOf } from \"unionize\";\r\nimport {\r\n\tApplicationSetupType,\r\n\tAuthenticationProvider,\r\n\tMenuType,\r\n\tProjectError,\r\n\tProjectSaveData,\r\n} from \"../types/smartDesktopDesignerTypes\";\r\n\r\nexport const SmartDesktopDesignerActions = unionize(\r\n\t{\r\n\t\tchange_view: ofType<string>(),\r\n\t\tupdate_apps: ofType<AppDefinition[]>(),\r\n\t\tnew_app: ofType<string | null>(),\r\n\t\tset_current_app_id: ofType<string | null>(),\r\n\t\tset_current_app_setup_type: ofType<ApplicationSetupType | null>(),\r\n\t\tupdate_app: ofType<AppDefinition>(),\r\n\t\tdelete_app: ofType<string>(),\r\n\t\tupdate_menus: ofType<MenuType>(),\r\n\t\tset_deploy_info: ofType<DeployInfo | null>(),\r\n\t\tset_publish_error: ofType<string | null>(),\r\n\t\tset_is_publishing: ofType<boolean>(),\r\n\t\tset_project_info: ofType<ProjectSaveData>(),\r\n\t\tset_is_getting_started: ofType<boolean>(),\r\n\t\tupdate_auth_provider: ofType<AuthenticationProvider>(),\r\n\t\tenable_auth_provider: ofType<string>(),\r\n\t\tset_project_error: ofType<ProjectError>(),\r\n\t\tdelete_project_error: ofType<ProjectError>(),\r\n\t\tset_reviewing_project_errors: ofType<boolean>(),\r\n\t},\r\n\t{ tag: \"type\", value: \"payload\" }\r\n);\r\n\r\nexport type SmartDesktopDesignerActionsTypes = UnionOf<typeof SmartDesktopDesignerActions>;\r\n"]}
@@ -90,7 +90,7 @@
90
90
  --titlebar-tab-icon-font-color: var(--accent-primary);
91
91
  --titlebar-tab-hover-background-color: var(--core-primary-2);
92
92
  --titlebar-tab-active-background-color: var(--core-primary-3);
93
- --titlebar-tab-inactive-background-color: var(--core-primary);
93
+ --titlebar-tab-inactive-background-color: var(--core-primary-1);
94
94
  --titlebar-tab-ghost-background-color: var(--accent-primary-1);
95
95
  --titlebar-tab-ghost-border-color: var(--accent-primary);
96
96
 
@@ -196,6 +196,7 @@ body.notifications-center-body.notifications-popped-in {
196
196
  font-family: var(--notification-font-family);
197
197
  min-height: 120px;
198
198
  padding: 8px 10px;
199
+ margin: 0 5px 0 5px;
199
200
  }
200
201
 
201
202
  .notification-card.read {
@@ -402,6 +402,7 @@ img {
402
402
  }
403
403
 
404
404
  .scheduled-restart-select-label {
405
+ margin-top: 0.45em;
405
406
  margin-left: 4em;
406
407
  margin-right: 0.5em;
407
408
  }
@@ -454,7 +455,7 @@ option:focus {
454
455
  .notifications-main-preferences__container {
455
456
  display: flex;
456
457
  flex-direction: column;
457
- padding: 20px 10px;
458
+ padding: 5px 15px;
458
459
  }
459
460
 
460
461
  .notifications-main-preferences__container .row-section {
@@ -468,7 +469,8 @@ option:focus {
468
469
  }
469
470
 
470
471
  .row-section .row-btn,
471
- .row-section .row {
472
+ .row-section .row,
473
+ .row-section .row-btn-disabled {
472
474
  display: grid;
473
475
  grid-template-columns: min-content auto min-content;
474
476
  grid-template-rows: 100%;
@@ -116,6 +116,7 @@ html.desktop-active .title-text {
116
116
  transition: background-color 0.2s ease;
117
117
  border-top-left-radius: 10px;
118
118
  border-top-right-radius: 10px;
119
+ background-color: var(--titlebar-tab-inactive-background-color);
119
120
  }
120
121
 
121
122
  .fsbl-header-title[data-hover="true"] {
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path
3
+ d="M12.667 0.666748H3.33366C1.8609 0.666748 0.666992 1.86066 0.666992 3.33341V12.6667C0.666992 14.1395 1.8609 15.3334 3.33366 15.3334H12.667C14.1398 15.3334 15.3337 14.1395 15.3337 12.6667V3.33341C15.3337 1.86066 14.1398 0.666748 12.667 0.666748Z"
4
+ fill="transparent" style="stroke: currentColor" />
5
+ <path d="M2.66699 7.6122H5.11348L6.77708 10.1334L10.8872 2.66675H13.3337L7.07066 13.3334H6.38565L2.66699 7.6122Z" />
6
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path
3
+ d="M13.2225 6.39998C13.8205 6.39998 14.3051 6.91444 14.2909 7.54952V14.8504C14.2909 15.4855 13.8064 16 13.2084 16H3.08255C2.48455 16 2 15.4855 2 14.8504V7.54952C2 6.91444 2.48455 6.39998 3.08255 6.39998H13.2225ZM8.15255 8.71383C7.58291 8.71383 7.11255 9.21229 7.09836 9.83137C7.09836 10.1489 7.213 10.4369 7.44109 10.6486C7.54036 10.7384 7.61127 10.9046 7.61127 11.056V13.1274C7.61127 13.4449 7.85355 13.6874 8.13836 13.6874C8.43736 13.6874 8.66545 13.4289 8.66545 13.1274V11.0412C8.66545 10.8898 8.73636 10.7384 8.84982 10.6326C9.06373 10.4209 9.19255 10.1341 9.19255 9.8166C9.19255 9.21229 8.72218 8.7126 8.15255 8.7126V8.71383Z" />
4
+ <path
5
+ d="M8.14534 0C5.77934 0 3.84353 2.32 3.84353 5.15446V7.68H5.16244V5.15446C5.16244 3.17908 6.49671 1.58031 8.14534 1.58031C9.79398 1.58031 11.1283 3.17908 11.1283 5.15446V7.68H12.4472V5.15446C12.4472 2.32 10.5113 0 8.14534 0Z" />
6
+ </svg>
@@ -19,6 +19,7 @@ export interface ButtonProps {
19
19
  onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
20
20
  className?: string;
21
21
  buttonAttributes?: object;
22
+ fixedSize?: number;
22
23
  }
23
24
  export declare const fashion_class_lookup: {
24
25
  secondary: string;
@@ -10,10 +10,10 @@ export const fashion_class_lookup = {
10
10
  ghost: "button-container-ghost",
11
11
  "danger ghost": "button-container-danger-ghost",
12
12
  };
13
- export const Button = ({ fashion = "secondary", text = "", iconBefore, iconAfter, disabled = false, onClick = () => { }, className = "", buttonAttributes = {}, }) => {
13
+ export const Button = ({ fashion = "secondary", text = "", iconBefore, iconAfter, disabled = false, onClick = () => { }, className = "", buttonAttributes = {}, fixedSize, }) => {
14
14
  const containerClassName = [fashion_class_lookup[fashion], className].join(" ");
15
15
  return (React.createElement("div", { className: `${containerClassName}` },
16
- React.createElement("button", { ...buttonAttributes, onClick: onClick, disabled: disabled },
16
+ React.createElement("button", { ...buttonAttributes, onClick: onClick, disabled: disabled, style: { width: fixedSize } },
17
17
  iconBefore && React.createElement(FinsembleIcon, { className: "button-icon-before", icon: iconBefore }),
18
18
  text,
19
19
  iconAfter && React.createElement(FinsembleIcon, { className: "button-icon-after", icon: iconAfter }))));
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/common/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAuBhD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,yBAAyB;IACjC,KAAK,EAAE,wBAAwB;IAC/B,cAAc,EAAE,+BAA+B;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC7C,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,EAAE,EACT,UAAU,EACV,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,GACrB,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEhF,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,EAAE;QACtC,mCAAY,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;YAChE,UAAU,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,oBAAoB,EAAC,IAAI,EAAE,UAAU,GAAkB;YAC9F,IAAI;YACJ,SAAS,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,mBAAmB,EAAC,IAAI,EAAE,SAAS,GAAkB,CACpF,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\r\nimport \"./css/button.css\";\r\nimport { FinsembleIcon } from \"./FinsembleIcon\";\r\n\r\nexport interface AdvancedButtonProps {\r\n\ticon: FinsembleIcon;\r\n\ttext: string;\r\n\tdisabled?: boolean;\r\n\tonClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\r\n\ttabIndex?: number;\r\n\tclassName?: string;\r\n\tbuttonAttributes?: object;\r\n}\r\n\r\nexport interface ButtonProps {\r\n\tfashion: \"secondary\" | \"primary\" | \"danger\" | \"ghost\" | \"danger ghost\";\r\n\ttext: string;\r\n\ticonBefore?: FinsembleIcon;\r\n\ticonAfter?: FinsembleIcon;\r\n\tdisabled?: boolean;\r\n\tonClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\r\n\tclassName?: string;\r\n\tbuttonAttributes?: object;\r\n}\r\n\r\nexport const fashion_class_lookup = {\r\n\tsecondary: \"button-container-secondary\",\r\n\ttile: \"button-container-tile\",\r\n\tprimary: \"button-container-primary\",\r\n\ticon: \"button-container-icon\",\r\n\tdanger: \"button-container-danger\",\r\n\tghost: \"button-container-ghost\",\r\n\t\"danger ghost\": \"button-container-danger-ghost\",\r\n};\r\n\r\nexport const Button: React.FC<ButtonProps> = ({\r\n\tfashion = \"secondary\",\r\n\ttext = \"\",\r\n\ticonBefore,\r\n\ticonAfter,\r\n\tdisabled = false,\r\n\tonClick = () => {},\r\n\tclassName = \"\",\r\n\tbuttonAttributes = {},\r\n}) => {\r\n\tconst containerClassName = [fashion_class_lookup[fashion], className].join(\" \");\r\n\r\n\treturn (\r\n\t\t<div className={`${containerClassName}`}>\r\n\t\t\t<button {...buttonAttributes} onClick={onClick} disabled={disabled}>\r\n\t\t\t\t{iconBefore && <FinsembleIcon className=\"button-icon-before\" icon={iconBefore}></FinsembleIcon>}\r\n\t\t\t\t{text}\r\n\t\t\t\t{iconAfter && <FinsembleIcon className=\"button-icon-after\" icon={iconAfter}></FinsembleIcon>}\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/common/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAwBhD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,yBAAyB;IACjC,KAAK,EAAE,wBAAwB;IAC/B,cAAc,EAAE,+BAA+B;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC7C,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,EAAE,EACT,UAAU,EACV,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,EACrB,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEhF,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,EAAE;QACtC,mCAAY,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC7F,UAAU,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,oBAAoB,EAAC,IAAI,EAAE,UAAU,GAAkB;YAC9F,IAAI;YACJ,SAAS,IAAI,oBAAC,aAAa,IAAC,SAAS,EAAC,mBAAmB,EAAC,IAAI,EAAE,SAAS,GAAkB,CACpF,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\r\nimport \"./css/button.css\";\r\nimport { FinsembleIcon } from \"./FinsembleIcon\";\r\n\r\nexport interface AdvancedButtonProps {\r\n\ticon: FinsembleIcon;\r\n\ttext: string;\r\n\tdisabled?: boolean;\r\n\tonClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\r\n\ttabIndex?: number;\r\n\tclassName?: string;\r\n\tbuttonAttributes?: object;\r\n}\r\n\r\nexport interface ButtonProps {\r\n\tfashion: \"secondary\" | \"primary\" | \"danger\" | \"ghost\" | \"danger ghost\";\r\n\ttext: string;\r\n\ticonBefore?: FinsembleIcon;\r\n\ticonAfter?: FinsembleIcon;\r\n\tdisabled?: boolean;\r\n\tonClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;\r\n\tclassName?: string;\r\n\tbuttonAttributes?: object;\r\n\tfixedSize?: number;\r\n}\r\n\r\nexport const fashion_class_lookup = {\r\n\tsecondary: \"button-container-secondary\",\r\n\ttile: \"button-container-tile\",\r\n\tprimary: \"button-container-primary\",\r\n\ticon: \"button-container-icon\",\r\n\tdanger: \"button-container-danger\",\r\n\tghost: \"button-container-ghost\",\r\n\t\"danger ghost\": \"button-container-danger-ghost\",\r\n};\r\n\r\nexport const Button: React.FC<ButtonProps> = ({\r\n\tfashion = \"secondary\",\r\n\ttext = \"\",\r\n\ticonBefore,\r\n\ticonAfter,\r\n\tdisabled = false,\r\n\tonClick = () => {},\r\n\tclassName = \"\",\r\n\tbuttonAttributes = {},\r\n\tfixedSize,\r\n}) => {\r\n\tconst containerClassName = [fashion_class_lookup[fashion], className].join(\" \");\r\n\r\n\treturn (\r\n\t\t<div className={`${containerClassName}`}>\r\n\t\t\t<button {...buttonAttributes} onClick={onClick} disabled={disabled} style={{ width: fixedSize }}>\r\n\t\t\t\t{iconBefore && <FinsembleIcon className=\"button-icon-before\" icon={iconBefore}></FinsembleIcon>}\r\n\t\t\t\t{text}\r\n\t\t\t\t{iconAfter && <FinsembleIcon className=\"button-icon-after\" icon={iconAfter}></FinsembleIcon>}\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ export interface ButtonRowProps {
3
+ label?: string;
4
+ onClick: Function;
5
+ iconClass?: string;
6
+ disabled?: boolean;
7
+ img?: string;
8
+ showDefaultIcon?: boolean;
9
+ className?: string;
10
+ role?: string;
11
+ tabIndex?: number;
12
+ onKeyDown?: Function;
13
+ }
14
+ declare const ButtonRow: React.FC<ButtonRowProps>;
15
+ export default ButtonRow;
@@ -0,0 +1,32 @@
1
+ import React, { useState } from "react";
2
+ const defaultProps = {
3
+ label: "",
4
+ onClick: () => { },
5
+ iconClass: "",
6
+ disabled: false,
7
+ showDefaultIcon: false,
8
+ className: "row-btn",
9
+ };
10
+ const ButtonRow = ({ label, onClick, iconClass, disabled, img, showDefaultIcon, className, }) => {
11
+ const [imgError, setImgError] = useState(false);
12
+ return (React.createElement("div", { className: disabled ? "row-btn-disabled" : className, role: "button", tabIndex: 0, onClick: () => {
13
+ if (!disabled) {
14
+ const func = onClick;
15
+ func();
16
+ }
17
+ }, onKeyDown: (e) => {
18
+ if ((e.key === "Enter" || e.key === " ") && !disabled) {
19
+ const func = onClick;
20
+ func();
21
+ }
22
+ } },
23
+ img && (React.createElement("img", { src: img, style: showDefaultIcon || imgError ? { display: "none" } : { width: "auto", height: "20px" }, onError: () => {
24
+ setImgError(true);
25
+ } })),
26
+ (showDefaultIcon || imgError) && React.createElement("i", { className: "ff-finsemble default-img" }),
27
+ React.createElement("span", { className: "row__lbl" }, label),
28
+ React.createElement("i", { className: iconClass })));
29
+ };
30
+ ButtonRow.defaultProps = defaultProps;
31
+ export default ButtonRow;
32
+ //# sourceMappingURL=ButtonRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonRow.js","sourceRoot":"","sources":["../../../src/components/common/ButtonRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAexC,MAAM,YAAY,GAAmB;IACpC,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;IACjB,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,SAAS,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,SAAS,GAA6B,CAAC,EAC5C,KAAK,EACL,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,EACH,eAAe,EACf,SAAS,GACT,EAAE,EAAE;IACJ,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,CACN,6BACC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,EACpD,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,GAAG,EAAE;YACb,IAAI,CAAC,QAAQ,EAAE;gBACd,MAAM,IAAI,GAAG,OAAO,CAAC;gBACrB,IAAI,EAAE,CAAC;aACP;QACF,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACtD,MAAM,IAAI,GAAG,OAAO,CAAC;gBACrB,IAAI,EAAE,CAAC;aACP;QACF,CAAC;QAEA,GAAG,IAAI,CACP,6BACC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5F,OAAO,EAAE,GAAG,EAAE;gBACb,WAAW,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC,GACA,CACF;QACA,CAAC,eAAe,IAAI,QAAQ,CAAC,IAAI,2BAAG,SAAS,EAAC,0BAA0B,GAAG;QAC5E,8BAAM,SAAS,EAAC,UAAU,IAAE,KAAK,CAAQ;QACzC,2BAAG,SAAS,EAAE,SAAS,GAAI,CACtB,CACN,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;AACtC,eAAe,SAAS,CAAC","sourcesContent":["import React, { useState } from \"react\";\r\n\r\nexport interface ButtonRowProps {\r\n\tlabel?: string;\r\n\tonClick: Function;\r\n\ticonClass?: string;\r\n\tdisabled?: boolean;\r\n\timg?: string;\r\n\tshowDefaultIcon?: boolean;\r\n\tclassName?: string;\r\n\trole?: string;\r\n\ttabIndex?: number;\r\n\tonKeyDown?: Function;\r\n}\r\n\r\nconst defaultProps: ButtonRowProps = {\r\n\tlabel: \"\",\r\n\tonClick: () => {},\r\n\ticonClass: \"\",\r\n\tdisabled: false,\r\n\tshowDefaultIcon: false,\r\n\tclassName: \"row-btn\",\r\n};\r\n\r\nconst ButtonRow: React.FC<ButtonRowProps> = ({\r\n\tlabel,\r\n\tonClick,\r\n\ticonClass,\r\n\tdisabled,\r\n\timg,\r\n\tshowDefaultIcon,\r\n\tclassName,\r\n}) => {\r\n\tconst [imgError, setImgError] = useState(false);\r\n\treturn (\r\n\t\t<div\r\n\t\t\tclassName={disabled ? \"row-btn-disabled\" : className}\r\n\t\t\trole=\"button\"\r\n\t\t\ttabIndex={0}\r\n\t\t\tonClick={() => {\r\n\t\t\t\tif (!disabled) {\r\n\t\t\t\t\tconst func = onClick;\r\n\t\t\t\t\tfunc();\r\n\t\t\t\t}\r\n\t\t\t}}\r\n\t\t\tonKeyDown={(e) => {\r\n\t\t\t\tif ((e.key === \"Enter\" || e.key === \" \") && !disabled) {\r\n\t\t\t\t\tconst func = onClick;\r\n\t\t\t\t\tfunc();\r\n\t\t\t\t}\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{img && (\r\n\t\t\t\t<img\r\n\t\t\t\t\tsrc={img}\r\n\t\t\t\t\tstyle={showDefaultIcon || imgError ? { display: \"none\" } : { width: \"auto\", height: \"20px\" }}\r\n\t\t\t\t\tonError={() => {\r\n\t\t\t\t\t\tsetImgError(true);\r\n\t\t\t\t\t}}\r\n\t\t\t\t/>\r\n\t\t\t)}\r\n\t\t\t{(showDefaultIcon || imgError) && <i className=\"ff-finsemble default-img\" />}\r\n\t\t\t<span className=\"row__lbl\">{label}</span>\r\n\t\t\t<i className={iconClass} />\r\n\t\t</div>\r\n\t);\r\n};\r\n\r\nButtonRow.defaultProps = defaultProps;\r\nexport default ButtonRow;\r\n"]}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export interface CheckboxProps {
3
+ checked?: boolean;
4
+ disabled?: boolean;
5
+ label?: string;
6
+ onClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;
7
+ }
8
+ export declare const Checkbox: React.FC<CheckboxProps>;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ export const Checkbox = ({ checked = false, disabled = false, label = "", onClick = () => { }, }) => {
3
+ let checkboxClasses = "complex-menu-checkbox";
4
+ if (checked) {
5
+ checkboxClasses = `${checkboxClasses} checked`;
6
+ }
7
+ let style = {};
8
+ if (disabled) {
9
+ style = {
10
+ cursor: "default",
11
+ opacity: ".55",
12
+ };
13
+ }
14
+ return (React.createElement("div", { style: style, className: "complex-menu-checkbox-wrapper", role: "checkbox", "aria-label": label, tabIndex: 0, onClick: disabled ? () => { } : onClick, onKeyDown: (e) => {
15
+ if (e.key === "Enter" || e.key === " ") {
16
+ !disabled && onClick(e);
17
+ }
18
+ } },
19
+ React.createElement("div", { className: checkboxClasses }, checked && React.createElement("i", { className: "ff-check-mark" })),
20
+ React.createElement("div", { className: "complex-menu-checkbox-label" }, label)));
21
+ };
22
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EACjD,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,GAClB,EAAE,EAAE;IACJ,IAAI,eAAe,GAAG,uBAAuB,CAAC;IAC9C,IAAI,OAAO,EAAE;QACZ,eAAe,GAAG,GAAG,eAAe,UAAU,CAAC;KAC/C;IACD,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,QAAQ,EAAE;QACb,KAAK,GAAG;YACP,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,KAAK;SACd,CAAC;KACF;IACD,OAAO,CACN,6BACC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,+BAA+B,EACzC,IAAI,EAAC,UAAU,gBACH,KAAK,EACjB,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EACtC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;gBACvC,CAAC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;aACxB;QACF,CAAC;QAED,6BAAK,SAAS,EAAE,eAAe,IAAG,OAAO,IAAI,2BAAG,SAAS,EAAC,eAAe,GAAK,CAAO;QACrF,6BAAK,SAAS,EAAC,6BAA6B,IAAE,KAAK,CAAO,CACrD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\r\n\r\nexport interface CheckboxProps {\r\n\tchecked?: boolean;\r\n\tdisabled?: boolean;\r\n\tlabel?: string;\r\n\tonClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\r\n}\r\n\r\nexport const Checkbox: React.FC<CheckboxProps> = ({\r\n\tchecked = false,\r\n\tdisabled = false,\r\n\tlabel = \"\",\r\n\tonClick = () => {},\r\n}) => {\r\n\tlet checkboxClasses = \"complex-menu-checkbox\";\r\n\tif (checked) {\r\n\t\tcheckboxClasses = `${checkboxClasses} checked`;\r\n\t}\r\n\tlet style = {};\r\n\tif (disabled) {\r\n\t\tstyle = {\r\n\t\t\tcursor: \"default\",\r\n\t\t\topacity: \".55\",\r\n\t\t};\r\n\t}\r\n\treturn (\r\n\t\t<div\r\n\t\t\tstyle={style}\r\n\t\t\tclassName=\"complex-menu-checkbox-wrapper\"\r\n\t\t\trole=\"checkbox\"\r\n\t\t\taria-label={label}\r\n\t\t\ttabIndex={0}\r\n\t\t\tonClick={disabled ? () => {} : onClick}\r\n\t\t\tonKeyDown={(e) => {\r\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\r\n\t\t\t\t\t!disabled && onClick(e);\r\n\t\t\t\t}\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t<div className={checkboxClasses}>{checked && <i className=\"ff-check-mark\"></i>}</div>\r\n\t\t\t<div className=\"complex-menu-checkbox-label\">{label}</div>\r\n\t\t</div>\r\n\t);\r\n};\r\n"]}
@@ -1,6 +1,6 @@
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 FinsembleIcon = "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
5
  icon: FinsembleIcon;
6
6
  className?: string;
@@ -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,E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ent":["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,CAA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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 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 FinsembleIcon =\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 FinsembleIcon]: 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: 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,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
  });
@@ -56,6 +56,6 @@ export const FinsembleSelect = ({ options, updateCallback, selected = [], size,
56
56
  doSetSelectedOptions(selectedOptions.concat([value]));
57
57
  }
58
58
  } }),
59
- React.createElement("span", { dangerouslySetInnerHTML: { __html: option } })))))))));
59
+ optionComponents?.[index] ? (optionComponents?.[index]) : (React.createElement("span", { dangerouslySetInnerHTML: { __html: option } }))))))))));
60
60
  };
61
61
  //# 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,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,gBAAgB,GAAG,EAAE,CA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,EAAC,QAAQ,QAAC,QAAQ,EAAE,aAAa,IAC/D,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAa,EAAE,EAAE,CAAC,CACzD,gCAAQ,GAAG,EAAE,iBAAiB,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,IACjD,MAAM,CACC,CACT,CAAC,CACM;YACT,6BAAK,SAAS,EAAC,eAAe,EAAC,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;oBACnB,8BAAM,uBAAuB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAS,CACnD,CACH,CACN,CAAC,CACG,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,EAAa,QAAQ,EAAa,MAAM,OAAO,CAAC;AAC9D,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,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC,CAAC;AAaF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC/B,OAAO,EACP,gBAAgB,E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M,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,gBAAgB,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAC5B,gBAAgB,EAAE,CAAC,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, { useEffect, 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"]}
@@ -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,CAA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\"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,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAUhD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACvB,IAAI,GAAG,MAAM,EACb,QAAQ,GAAG,OAAO,EAClB,QAAQ,GAAG,EAAE,EACb,YAAY,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,GACJ,EAAE,EAAE;IAClB,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,EACD,OAAO,EAAE,OAAO;QAEf,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,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
+ }