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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (595) hide show
  1. package/package.json +31 -28
  2. package/react/actions/smartDesktopDesignerActions.d.ts +6 -2
  3. package/react/actions/smartDesktopDesignerActions.js +2 -0
  4. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  5. package/react/assets/css/finsemble.css +0 -1
  6. package/react/assets/css/userPreferences.css +6 -0
  7. package/react/assets/icons/code-block.svg +15 -0
  8. package/react/componentTemplateGenerator.js +1 -1
  9. package/react/componentTemplateGenerator.js.map +1 -1
  10. package/react/components/FinsembleProvider.js.map +1 -1
  11. package/react/components/appCatalog/AppCatalogComponent.d.ts +1 -1
  12. package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +3 -3
  13. package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +1 -1
  14. package/react/components/appCatalog/modules/FDC3.d.ts +1 -1
  15. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  16. package/react/components/appCatalog/stores/appStore.d.ts +2 -2
  17. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  18. package/react/components/appCatalog/stores/storeActions.d.ts +1 -1
  19. package/react/components/common/Checkbox.js +1 -1
  20. package/react/components/common/Checkbox.js.map +1 -1
  21. package/react/components/common/DropZone.js +3 -1
  22. package/react/components/common/DropZone.js.map +1 -1
  23. package/react/components/common/FileInput.d.ts +2 -1
  24. package/react/components/common/FileInput.js +2 -2
  25. package/react/components/common/FileInput.js.map +1 -1
  26. package/react/components/common/FinsembleIcon.d.ts +1 -1
  27. package/react/components/common/FinsembleIcon.js +2 -0
  28. package/react/components/common/FinsembleIcon.js.map +1 -1
  29. package/react/components/common/FinsembleSelect.js +1 -1
  30. package/react/components/common/FinsembleSelect.js.map +1 -1
  31. package/react/components/common/ImagePreview.js +1 -1
  32. package/react/components/common/ImagePreview.js.map +1 -1
  33. package/react/components/common/Tooltip.js +3 -1
  34. package/react/components/common/Tooltip.js.map +1 -1
  35. package/react/components/common/css/application-edit-page.css +4 -1
  36. package/react/components/common/css/application-list.css +4 -0
  37. package/react/components/common/css/preload-edit-page.css +37 -0
  38. package/react/components/common/helpers.js +1 -0
  39. package/react/components/common/helpers.js.map +1 -1
  40. package/react/components/common/stories/FileInput.stories.d.ts +2 -1
  41. package/react/components/common/stories/FileInput.stories.js +6 -0
  42. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  43. package/react/components/common/tests/Accordion.spec.js +1 -1
  44. package/react/components/common/tests/Accordion.spec.js.map +1 -1
  45. package/react/components/common/tests/FileInput.spec.js +8 -1
  46. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  47. package/react/components/common/tests/FinsembleSelect.spec.js +1 -1
  48. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  49. package/react/components/common/tests/FinsembleToggle.spec.js +2 -2
  50. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  51. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  52. package/react/components/favorites/FavoritesShell.spec.js +1 -1
  53. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  54. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  55. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  56. package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
  57. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  58. package/react/components/icon/Icon.d.ts +4 -3
  59. package/react/components/icon/Icon.js +22 -12
  60. package/react/components/icon/Icon.js.map +1 -1
  61. package/react/components/legacyControls/FinsembleDnDContext.d.ts +2 -1
  62. package/react/components/legacyControls/FinsembleDnDContext.js +8 -6
  63. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  64. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +1 -1
  65. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  66. package/react/components/linker/LinkerMenu.js.map +1 -1
  67. package/react/components/linker/remoteRedux.d.ts +1 -1
  68. package/react/components/linker/remoteRedux.js.map +1 -1
  69. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  70. package/react/components/menu/MenuPortal.js +20 -1
  71. package/react/components/menu/MenuPortal.js.map +1 -1
  72. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  73. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  74. package/react/components/notifications/components/shared/CheckButton.d.ts +1 -1
  75. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  76. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
  77. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  78. package/react/components/notifications/components/shared/OverflowMenu.d.ts +1 -1
  79. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  80. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +1 -1
  81. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  82. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +1 -1
  83. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  84. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
  85. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  86. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +1 -1
  87. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  88. package/react/components/notifications/components/views/CardView.js.map +1 -1
  89. package/react/components/notifications/components/views/ListView.d.ts +1 -1
  90. package/react/components/notifications/components/views/ListView.js.map +1 -1
  91. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +1 -1
  92. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  93. package/react/components/notifications/types.d.ts +1 -1
  94. package/react/components/notifications/types.js.map +1 -1
  95. package/react/components/notifications/utils.d.ts +1 -1
  96. package/react/components/notifications/utils.js.map +1 -1
  97. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  98. package/react/components/processMonitor/ProcessMonitorTypes.d.ts +4 -11
  99. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
  100. package/react/components/processMonitor/components/ChildWindow.js +5 -10
  101. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  102. package/react/components/processMonitor/components/ListHeader.d.ts +1 -1
  103. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  104. package/react/components/processMonitor/components/ProcessStatistics.js +8 -10
  105. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  106. package/react/components/processMonitor/constants.d.ts +0 -2
  107. package/react/components/processMonitor/constants.js +0 -2
  108. package/react/components/processMonitor/constants.js.map +1 -1
  109. package/react/components/processMonitor/helpers.d.ts +0 -11
  110. package/react/components/processMonitor/helpers.js +1 -9
  111. package/react/components/processMonitor/helpers.js.map +1 -1
  112. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +6 -14
  113. package/react/components/processMonitor/stores/ProcessMonitorStore.js +22 -62
  114. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  115. package/react/components/{smartDesktopDesigner → sdd}/AddApp.d.ts +0 -0
  116. package/react/components/{smartDesktopDesigner → sdd}/AddApp.js +0 -0
  117. package/react/components/sdd/AddApp.js.map +1 -0
  118. package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.d.ts +0 -0
  119. package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.js +0 -0
  120. package/react/components/sdd/AppEditAccess.js.map +1 -0
  121. package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.d.ts +2 -1
  122. package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.js +77 -73
  123. package/react/components/sdd/AppEditPage.js.map +1 -0
  124. package/react/components/{smartDesktopDesigner → sdd}/Appearance.css +8 -0
  125. package/react/components/{smartDesktopDesigner → sdd}/Appearance.d.ts +0 -0
  126. package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.d.ts +0 -0
  127. package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.js +0 -0
  128. package/react/components/sdd/Appearance.helpers.js.map +1 -0
  129. package/react/components/{smartDesktopDesigner → sdd}/Appearance.js +0 -0
  130. package/react/components/sdd/Appearance.js.map +1 -0
  131. package/react/components/{smartDesktopDesigner → sdd}/Application.d.ts +10 -3
  132. package/react/components/sdd/Application.js +220 -0
  133. package/react/components/sdd/Application.js.map +1 -0
  134. package/react/components/{smartDesktopDesigner → sdd}/Applications.d.ts +2 -0
  135. package/react/components/{smartDesktopDesigner → sdd}/Applications.js +17 -7
  136. package/react/components/sdd/Applications.js.map +1 -0
  137. package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.css +0 -0
  138. package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.d.ts +0 -0
  139. package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.js +0 -0
  140. package/react/components/sdd/AssetsPage.js.map +1 -0
  141. package/react/components/{smartDesktopDesigner → sdd}/Authentication.d.ts +0 -0
  142. package/react/components/{smartDesktopDesigner → sdd}/Authentication.js +1 -1
  143. package/react/components/sdd/Authentication.js.map +1 -0
  144. package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.d.ts +0 -0
  145. package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.js +0 -0
  146. package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -0
  147. package/react/components/{smartDesktopDesigner → sdd}/Content.d.ts +0 -0
  148. package/react/components/{smartDesktopDesigner → sdd}/Content.js +0 -0
  149. package/react/components/sdd/Content.js.map +1 -0
  150. package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.d.ts +0 -0
  151. package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.js +0 -0
  152. package/react/components/sdd/ContentHeader.js.map +1 -0
  153. package/react/components/{smartDesktopDesigner → sdd}/CurrentView.d.ts +0 -0
  154. package/react/components/{smartDesktopDesigner → sdd}/CurrentView.js +0 -0
  155. package/react/components/sdd/CurrentView.js.map +1 -0
  156. package/react/components/sdd/EditPreload.d.ts +14 -0
  157. package/react/components/sdd/EditPreload.js +169 -0
  158. package/react/components/sdd/EditPreload.js.map +1 -0
  159. package/react/components/{smartDesktopDesigner → sdd}/Export.d.ts +0 -0
  160. package/react/components/{smartDesktopDesigner → sdd}/Export.js +0 -0
  161. package/react/components/sdd/Export.js.map +1 -0
  162. package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.d.ts +0 -0
  163. package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.js +0 -0
  164. package/react/components/sdd/ExportCloud.js.map +1 -0
  165. package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.d.ts +0 -0
  166. package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.js +0 -0
  167. package/react/components/sdd/ExportDeployInfo.js.map +1 -0
  168. package/react/components/{smartDesktopDesigner → sdd}/ExportZip.d.ts +0 -0
  169. package/react/components/{smartDesktopDesigner → sdd}/ExportZip.js +0 -0
  170. package/react/components/sdd/ExportZip.js.map +1 -0
  171. package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.d.ts +0 -0
  172. package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.js +0 -0
  173. package/react/components/sdd/GettingStarted.js.map +1 -0
  174. package/react/components/sdd/ItemList.d.ts +17 -0
  175. package/react/components/sdd/ItemList.js +58 -0
  176. package/react/components/sdd/ItemList.js.map +1 -0
  177. package/react/components/{smartDesktopDesigner → sdd}/Navigation.d.ts +0 -0
  178. package/react/components/{smartDesktopDesigner → sdd}/Navigation.js +0 -0
  179. package/react/components/sdd/Navigation.js.map +1 -0
  180. package/react/components/sdd/OptionalSettingsView.d.ts +11 -0
  181. package/react/components/sdd/OptionalSettingsView.js +71 -0
  182. package/react/components/sdd/OptionalSettingsView.js.map +1 -0
  183. package/react/components/sdd/Preloads.d.ts +8 -0
  184. package/react/components/sdd/Preloads.js +26 -0
  185. package/react/components/sdd/Preloads.js.map +1 -0
  186. package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.d.ts +0 -0
  187. package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.js +0 -0
  188. package/react/components/sdd/ProjectErrors.js.map +1 -0
  189. package/react/components/{smartDesktopDesigner → sdd}/Publish.d.ts +0 -0
  190. package/react/components/{smartDesktopDesigner → sdd}/Publish.js +0 -0
  191. package/react/components/sdd/Publish.js.map +1 -0
  192. package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.d.ts +0 -0
  193. package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.js +0 -0
  194. package/react/components/sdd/PublishProgress.js.map +1 -0
  195. package/react/components/sdd/SmartDesktopDesigner.d.ts +28 -0
  196. package/react/components/sdd/SmartDesktopDesigner.js +121 -0
  197. package/react/components/sdd/SmartDesktopDesigner.js.map +1 -0
  198. package/react/components/{smartDesktopDesigner → sdd}/ThemePage.css +0 -0
  199. package/react/components/{smartDesktopDesigner → sdd}/ThemePage.d.ts +0 -0
  200. package/react/components/{smartDesktopDesigner → sdd}/ThemePage.js +0 -0
  201. package/react/components/sdd/ThemePage.js.map +1 -0
  202. package/react/components/{smartDesktopDesigner → sdd}/Themes.d.ts +0 -0
  203. package/react/components/{smartDesktopDesigner → sdd}/Themes.js +0 -0
  204. package/react/components/sdd/Themes.js.map +1 -0
  205. package/react/components/{smartDesktopDesigner → sdd}/Toolbar.d.ts +0 -0
  206. package/react/components/{smartDesktopDesigner → sdd}/Toolbar.js +13 -11
  207. package/react/components/sdd/Toolbar.js.map +1 -0
  208. package/react/components/{smartDesktopDesigner → sdd}/View.d.ts +0 -0
  209. package/react/components/{smartDesktopDesigner → sdd}/View.js +0 -0
  210. package/react/components/sdd/View.js.map +1 -0
  211. package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.d.ts +0 -0
  212. package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.js +0 -0
  213. package/react/components/sdd/common/fsbl_functions.js.map +1 -0
  214. package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.d.ts +0 -0
  215. package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.js +0 -0
  216. package/react/components/sdd/common/getCSSVars.js.map +1 -0
  217. package/react/components/{smartDesktopDesigner/fixtures → sdd/common}/views.d.ts +0 -0
  218. package/react/components/sdd/common/views.js +204 -0
  219. package/react/components/sdd/common/views.js.map +1 -0
  220. package/react/components/{smartDesktopDesigner → sdd}/css/appearance.css +3 -0
  221. package/react/components/{smartDesktopDesigner → sdd}/css/applications.css +0 -0
  222. package/react/components/{smartDesktopDesigner → sdd}/css/authentication.css +5 -1
  223. package/react/components/{smartDesktopDesigner → sdd}/css/buttons.css +0 -0
  224. package/react/components/{smartDesktopDesigner → sdd}/css/export.css +0 -0
  225. package/react/components/{smartDesktopDesigner → sdd}/css/getting-started.css +0 -0
  226. package/react/components/{smartDesktopDesigner → sdd}/css/nav.css +0 -0
  227. package/react/components/{smartDesktopDesigner → sdd}/css/project-errors.css +0 -0
  228. package/react/components/{smartDesktopDesigner → sdd}/css/project-header.css +0 -0
  229. package/react/components/{smartDesktopDesigner → sdd}/css/styles.css +0 -0
  230. package/react/components/{smartDesktopDesigner → sdd}/css/views.css +0 -1
  231. package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.d.ts +1 -1
  232. package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.js +27 -5
  233. package/react/components/sdd/fixtures/apps.js.map +1 -0
  234. package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.d.ts +0 -0
  235. package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.js +0 -0
  236. package/react/components/sdd/fixtures/authenticationProps.js.map +1 -0
  237. package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.d.ts +1 -1
  238. package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.js +1 -1
  239. package/react/components/sdd/fixtures/configTemplate.js.map +1 -0
  240. package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.d.ts +0 -0
  241. package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.js +0 -0
  242. package/react/components/sdd/fixtures/exportProps.js.map +1 -0
  243. package/react/components/sdd/fixtures/preloads.d.ts +22 -0
  244. package/react/components/sdd/fixtures/preloads.js +40 -0
  245. package/react/components/sdd/fixtures/preloads.js.map +1 -0
  246. package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.d.ts +0 -0
  247. package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.js +0 -0
  248. package/react/components/sdd/fixtures/projectErrorsProps.js.map +1 -0
  249. package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.d.ts +1 -1
  250. package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.js +0 -0
  251. package/react/components/sdd/fixtures/publishProgress.js.map +1 -0
  252. package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.d.ts +0 -0
  253. package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.js +0 -0
  254. package/react/components/sdd/fixtures/themeProps.js.map +1 -0
  255. package/react/components/sdd/fixtures/views.d.ts +3 -0
  256. package/react/components/{smartDesktopDesigner → sdd}/fixtures/views.js +9 -0
  257. package/react/components/sdd/fixtures/views.js.map +1 -0
  258. package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.d.ts +0 -0
  259. package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.js +0 -0
  260. package/react/components/sdd/sdd_helpers.js.map +1 -0
  261. package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.d.ts +1 -1
  262. package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.js +1 -0
  263. package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -0
  264. package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.d.ts +0 -0
  265. package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.js +0 -0
  266. package/react/components/sdd/stories/Appearance.stories.js.map +1 -0
  267. package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.d.ts +0 -0
  268. package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.js +0 -0
  269. package/react/components/sdd/stories/Applications.stories.js.map +1 -0
  270. package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.d.ts +0 -0
  271. package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.js +0 -0
  272. package/react/components/sdd/stories/AssetsPage.stories.js.map +1 -0
  273. package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.d.ts +0 -0
  274. package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.js +0 -0
  275. package/react/components/sdd/stories/Authentication.stories.js.map +1 -0
  276. package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.d.ts +0 -0
  277. package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.js +0 -0
  278. package/react/components/sdd/stories/ContentHeader.stories.js.map +1 -0
  279. package/react/components/sdd/stories/EditPreload.stories.d.ts +11 -0
  280. package/react/components/sdd/stories/EditPreload.stories.js +35 -0
  281. package/react/components/sdd/stories/EditPreload.stories.js.map +1 -0
  282. package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.d.ts +0 -0
  283. package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.js +0 -0
  284. package/react/components/sdd/stories/Export.stories.js.map +1 -0
  285. package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.d.ts +0 -0
  286. package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.js +0 -0
  287. package/react/components/sdd/stories/ExportCloud.stories.js.map +1 -0
  288. package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.d.ts +0 -0
  289. package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.js +0 -0
  290. package/react/components/sdd/stories/ExportZip.stories.js.map +1 -0
  291. package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.d.ts +0 -0
  292. package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.js +0 -0
  293. package/react/components/sdd/stories/GettingStarted.stories.js.map +1 -0
  294. package/react/components/sdd/stories/ItemList.stories.d.ts +16 -0
  295. package/react/components/{smartDesktopDesigner/stories/ApplicationList.stories.js → sdd/stories/ItemList.stories.js} +26 -26
  296. package/react/components/sdd/stories/ItemList.stories.js.map +1 -0
  297. package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.d.ts +0 -0
  298. package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.js +0 -0
  299. package/react/components/sdd/stories/Navigation.stories.js.map +1 -0
  300. package/react/components/sdd/stories/OptionalSettingsView.stories.d.ts +11 -0
  301. package/react/components/sdd/stories/OptionalSettingsView.stories.js +28 -0
  302. package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -0
  303. package/react/components/sdd/stories/Preloads.stories.d.ts +11 -0
  304. package/react/components/sdd/stories/Preloads.stories.js +31 -0
  305. package/react/components/sdd/stories/Preloads.stories.js.map +1 -0
  306. package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.d.ts +0 -0
  307. package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.js +0 -0
  308. package/react/components/sdd/stories/ProjectErrors.stories.js.map +1 -0
  309. package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.d.ts +0 -0
  310. package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.js +0 -0
  311. package/react/components/sdd/stories/Publish.stories.js.map +1 -0
  312. package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.d.ts +0 -0
  313. package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.js +0 -0
  314. package/react/components/sdd/stories/PublishProgress.stories.js.map +1 -0
  315. package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.d.ts +0 -0
  316. package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.js +0 -0
  317. package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -0
  318. package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.d.ts +0 -0
  319. package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.js +0 -0
  320. package/react/components/sdd/stories/ThemePage.stories.js.map +1 -0
  321. package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.d.ts +0 -0
  322. package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.js +0 -0
  323. package/react/components/sdd/stories/Themes.stories.js.map +1 -0
  324. package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.d.ts +0 -0
  325. package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.js +0 -0
  326. package/react/components/sdd/stories/Toolbar.stories.js.map +1 -0
  327. package/react/components/{smartDesktopDesigner → sdd}/tests/AppEditPage.spec.d.ts +0 -0
  328. package/react/components/sdd/tests/AppEditPage.spec.js +1151 -0
  329. package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -0
  330. package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.d.ts → sdd/tests/Application.spec.d.ts} +0 -0
  331. package/react/components/sdd/tests/Application.spec.js +1478 -0
  332. package/react/components/sdd/tests/Application.spec.js.map +1 -0
  333. package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.d.ts +0 -0
  334. package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.js +3 -3
  335. package/react/components/sdd/tests/Applications.spec.js.map +1 -0
  336. package/react/components/{smartDesktopDesigner → sdd}/tests/Authentication.spec.d.ts +0 -0
  337. package/react/components/{smartDesktopDesigner → sdd}/tests/Authentication.spec.js +0 -0
  338. package/react/components/sdd/tests/Authentication.spec.js.map +1 -0
  339. package/react/components/{smartDesktopDesigner → sdd}/tests/ContentHeader.spec.d.ts +0 -0
  340. package/react/components/{smartDesktopDesigner → sdd}/tests/ContentHeader.spec.js +0 -0
  341. package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -0
  342. package/react/components/{smartDesktopDesigner/tests/Export.spec.d.ts → sdd/tests/EditPreload.spec.d.ts} +0 -0
  343. package/react/components/sdd/tests/EditPreload.spec.js +61 -0
  344. package/react/components/sdd/tests/EditPreload.spec.js.map +1 -0
  345. package/react/components/{smartDesktopDesigner/tests/ExportZip.spec.d.ts → sdd/tests/Export.spec.d.ts} +0 -0
  346. package/react/components/{smartDesktopDesigner → sdd}/tests/Export.spec.js +0 -0
  347. package/react/components/sdd/tests/Export.spec.js.map +1 -0
  348. package/react/components/{smartDesktopDesigner/tests/Navigation.spec.d.ts → sdd/tests/ExportZip.spec.d.ts} +0 -0
  349. package/react/components/{smartDesktopDesigner → sdd}/tests/ExportZip.spec.js +0 -0
  350. package/react/components/sdd/tests/ExportZip.spec.js.map +1 -0
  351. package/react/components/{smartDesktopDesigner/tests/ProjectErrors.spec.d.ts → sdd/tests/ItemList.spec.d.ts} +0 -0
  352. package/react/components/{smartDesktopDesigner/tests/ApplicationList.spec.js → sdd/tests/ItemList.spec.js} +8 -8
  353. package/react/components/sdd/tests/ItemList.spec.js.map +1 -0
  354. package/react/components/{smartDesktopDesigner/tests/Publish.spec.d.ts → sdd/tests/Navigation.spec.d.ts} +0 -0
  355. package/react/components/{smartDesktopDesigner → sdd}/tests/Navigation.spec.js +0 -0
  356. package/react/components/sdd/tests/Navigation.spec.js.map +1 -0
  357. package/react/components/{smartDesktopDesigner/tests/PublishProgess.spec.d.ts → sdd/tests/Preloads.spec.d.ts} +0 -0
  358. package/react/components/sdd/tests/Preloads.spec.js +47 -0
  359. package/react/components/sdd/tests/Preloads.spec.js.map +1 -0
  360. package/react/components/{smartDesktopDesigner/tests/SmartDesktopDesigner.spec.d.ts → sdd/tests/ProjectErrors.spec.d.ts} +0 -0
  361. package/react/components/{smartDesktopDesigner → sdd}/tests/ProjectErrors.spec.js +0 -0
  362. package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -0
  363. package/react/components/{smartDesktopDesigner/tests/Themes.spec.d.ts → sdd/tests/Publish.spec.d.ts} +0 -0
  364. package/react/components/{smartDesktopDesigner → sdd}/tests/Publish.spec.js +0 -0
  365. package/react/components/sdd/tests/Publish.spec.js.map +1 -0
  366. package/react/components/{smartDesktopDesigner/tests/sdd_helpers.spec.d.ts → sdd/tests/PublishProgess.spec.d.ts} +0 -0
  367. package/react/components/{smartDesktopDesigner → sdd}/tests/PublishProgess.spec.js +0 -0
  368. package/react/components/sdd/tests/PublishProgess.spec.js.map +1 -0
  369. package/react/components/sdd/tests/SmartDesktopDesigner.spec.d.ts +1 -0
  370. package/react/components/{smartDesktopDesigner → sdd}/tests/SmartDesktopDesigner.spec.js +6 -0
  371. package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -0
  372. package/react/components/sdd/tests/Themes.spec.d.ts +1 -0
  373. package/react/components/{smartDesktopDesigner → sdd}/tests/Themes.spec.js +0 -0
  374. package/react/components/sdd/tests/Themes.spec.js.map +1 -0
  375. package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.d.ts +0 -0
  376. package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.js +0 -0
  377. package/react/components/sdd/tests/Toolbar.spec.js.map +1 -0
  378. package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.d.ts +0 -0
  379. package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.js +0 -0
  380. package/react/components/sdd/tests/a11y_helper.js.map +1 -0
  381. package/react/components/sdd/tests/sdd_helpers.spec.d.ts +1 -0
  382. package/react/components/{smartDesktopDesigner → sdd}/tests/sdd_helpers.spec.js +0 -0
  383. package/react/components/sdd/tests/sdd_helpers.spec.js.map +1 -0
  384. package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.d.ts +0 -0
  385. package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.js +0 -0
  386. package/react/components/sdd/themeDefinitions.js.map +1 -0
  387. package/react/components/search/SearchBestMatch.js.map +1 -1
  388. package/react/components/search/SearchProviderResults.d.ts +3 -1
  389. package/react/components/search/SearchProviderResults.js.map +1 -1
  390. package/react/components/search/SearchResult.d.ts +3 -1
  391. package/react/components/search/SearchResult.js +11 -8
  392. package/react/components/search/SearchResult.js.map +1 -1
  393. package/react/components/singleInputDialog/SingleInputDialog.spec.js +1 -1
  394. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  395. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
  396. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +2 -116
  397. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  398. package/react/components/smartDesktopDesigner/common/views.js +1 -185
  399. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  400. package/react/components/toolbar/AutoArrange.js +1 -1
  401. package/react/components/toolbar/AutoArrange.js.map +1 -1
  402. package/react/components/toolbar/AutoArrange.spec.d.ts +1 -0
  403. package/react/components/toolbar/AutoArrange.spec.js +48 -0
  404. package/react/components/toolbar/AutoArrange.spec.js.map +1 -0
  405. package/react/components/toolbar/AutoArrange.stories.d.ts +11 -0
  406. package/react/components/toolbar/AutoArrange.stories.js +21 -0
  407. package/react/components/toolbar/AutoArrange.stories.js.map +1 -0
  408. package/react/components/toolbar/DragHandle.spec.d.ts +1 -0
  409. package/react/components/toolbar/DragHandle.spec.js +31 -0
  410. package/react/components/toolbar/DragHandle.spec.js.map +1 -0
  411. package/react/components/toolbar/DragHandle.stories.d.ts +13 -0
  412. package/react/components/toolbar/DragHandle.stories.js +39 -0
  413. package/react/components/toolbar/DragHandle.stories.js.map +1 -0
  414. package/react/components/toolbar/SddButton.d.ts +2 -0
  415. package/react/components/toolbar/SddButton.js +23 -0
  416. package/react/components/toolbar/SddButton.js.map +1 -0
  417. package/react/components/toolbar/ToolbarShell.js +4 -1
  418. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  419. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +1 -1
  420. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  421. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +3 -2
  422. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  423. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +1 -1
  424. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  425. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  426. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +1 -1
  427. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  428. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +1 -1
  429. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  430. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +2 -2
  431. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  432. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  433. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +15 -4
  434. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  435. package/react/components/toolbar/appLauncher/components/componentList.d.ts +2 -2
  436. package/react/components/toolbar/appLauncher/components/componentList.js +3 -4
  437. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  438. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +2 -2
  439. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  440. package/react/components/toolbar/dashbar/Dashbar.js +11 -12
  441. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  442. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +2 -2
  443. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  444. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
  445. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  446. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
  447. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  448. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +4 -4
  449. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +72 -13
  450. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  451. package/react/components/userPreferences/components/content/Workspaces.d.ts +6 -1
  452. package/react/components/userPreferences/components/content/Workspaces.js +59 -18
  453. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  454. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  455. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  456. package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +2 -0
  457. package/react/components/userPreferences/components/general/ScheduledRestart.js +10 -2
  458. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +1 -1
  459. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +2 -1
  460. package/react/components/userPreferences/stores/UserPreferencesStore.js +10 -0
  461. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  462. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +6 -6
  463. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +1 -1
  464. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +5 -2
  465. package/react/components/windowTitleBar/WindowTitleBarShell.js +70 -59
  466. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  467. package/react/components/windowTitleBar/components/center/TabList.d.ts +2 -2
  468. package/react/components/windowTitleBar/components/center/TabList.js +5 -2
  469. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  470. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  471. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  472. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  473. package/react/components/windowTitleBar/components/windowTitle.d.ts +5 -2
  474. package/react/components/windowTitleBar/components/windowTitle.js +99 -94
  475. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  476. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +3 -3
  477. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +218 -219
  478. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  479. package/react/components/yesNoDialog/Timer.spec.js +1 -1
  480. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  481. package/react/components/yesNoDialog/YesNoDialog.spec.js +1 -1
  482. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  483. package/react/hooks/useDashbar.js.map +1 -1
  484. package/react/hooks/useFavoritesShell.js.map +1 -1
  485. package/react/hooks/useNotifications.d.ts +1 -1
  486. package/react/hooks/useNotifications.js.map +1 -1
  487. package/react/hooks/useSearch.d.ts +2 -1
  488. package/react/hooks/useSearch.js.map +1 -1
  489. package/react/hooks/useToolbar.js +6 -0
  490. package/react/hooks/useToolbar.js.map +1 -1
  491. package/react/reducers/rootReducer.d.ts +11 -3
  492. package/react/reducers/smartDesktopDesignerReducer.js +8 -0
  493. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  494. package/react/store.d.ts +22 -6
  495. package/react/types/advancedAppLauncherTypes.d.ts +5 -3
  496. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  497. package/react/types/favoriteTypes.d.ts +4 -2
  498. package/react/types/favoriteTypes.js.map +1 -1
  499. package/react/types/fdc3.d.ts +2 -2
  500. package/react/types/fdc3.js.map +1 -1
  501. package/react/types/smartDesktopDesignerTypes.d.ts +8 -2
  502. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  503. package/react/types/windowTitleBar.d.ts +1 -1
  504. package/react/types/windowTitleBar.js.map +1 -1
  505. package/react/components/smartDesktopDesigner/AddApp.js.map +0 -1
  506. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +0 -1
  507. package/react/components/smartDesktopDesigner/AppEditPage.js.map +0 -1
  508. package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +0 -1
  509. package/react/components/smartDesktopDesigner/Appearance.js.map +0 -1
  510. package/react/components/smartDesktopDesigner/Application.js +0 -228
  511. package/react/components/smartDesktopDesigner/Application.js.map +0 -1
  512. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +0 -16
  513. package/react/components/smartDesktopDesigner/ApplicationList.js +0 -60
  514. package/react/components/smartDesktopDesigner/ApplicationList.js.map +0 -1
  515. package/react/components/smartDesktopDesigner/Applications.js.map +0 -1
  516. package/react/components/smartDesktopDesigner/AssetsPage.js.map +0 -1
  517. package/react/components/smartDesktopDesigner/Authentication.js.map +0 -1
  518. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +0 -1
  519. package/react/components/smartDesktopDesigner/Content.js.map +0 -1
  520. package/react/components/smartDesktopDesigner/ContentHeader.js.map +0 -1
  521. package/react/components/smartDesktopDesigner/CurrentView.js.map +0 -1
  522. package/react/components/smartDesktopDesigner/Export.js.map +0 -1
  523. package/react/components/smartDesktopDesigner/ExportCloud.js.map +0 -1
  524. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +0 -1
  525. package/react/components/smartDesktopDesigner/ExportZip.js.map +0 -1
  526. package/react/components/smartDesktopDesigner/GettingStarted.js.map +0 -1
  527. package/react/components/smartDesktopDesigner/Navigation.js.map +0 -1
  528. package/react/components/smartDesktopDesigner/ProjectErrors.js.map +0 -1
  529. package/react/components/smartDesktopDesigner/Publish.js.map +0 -1
  530. package/react/components/smartDesktopDesigner/PublishProgress.js.map +0 -1
  531. package/react/components/smartDesktopDesigner/ThemePage.js.map +0 -1
  532. package/react/components/smartDesktopDesigner/Themes.js.map +0 -1
  533. package/react/components/smartDesktopDesigner/Toolbar.js.map +0 -1
  534. package/react/components/smartDesktopDesigner/View.js.map +0 -1
  535. package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +0 -1
  536. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +0 -1
  537. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +0 -1
  538. package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +0 -1
  539. package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +0 -1
  540. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +0 -1
  541. package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +0 -1
  542. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +0 -1
  543. package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +0 -1
  544. package/react/components/smartDesktopDesigner/fixtures/views.js.map +0 -1
  545. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +0 -1
  546. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +0 -1
  547. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +0 -1
  548. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +0 -16
  549. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +0 -1
  550. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +0 -1
  551. package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +0 -1
  552. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +0 -1
  553. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +0 -1
  554. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +0 -1
  555. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +0 -1
  556. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +0 -1
  557. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +0 -1
  558. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +0 -1
  559. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +0 -1
  560. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +0 -1
  561. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +0 -1
  562. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +0 -1
  563. package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +0 -1
  564. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +0 -1
  565. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +0 -1
  566. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +0 -310
  567. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +0 -1
  568. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +0 -1
  569. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +0 -1
  570. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +0 -1
  571. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +0 -1
  572. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +0 -1
  573. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +0 -1
  574. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +0 -1
  575. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +0 -1
  576. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +0 -1
  577. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +0 -1
  578. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +0 -1
  579. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +0 -1
  580. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +0 -1
  581. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +0 -1
  582. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +0 -1
  583. package/react/components/smartDesktopDesigner/themeDefinitions.js.map +0 -1
  584. package/react/components/toolbar/appLauncher/DynamicAppLauncher.d.ts +0 -6
  585. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js +0 -23
  586. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +0 -1
  587. package/react/hooks/useWorkspace.d.ts +0 -5
  588. package/react/hooks/useWorkspace.js +0 -26
  589. package/react/hooks/useWorkspace.js.map +0 -1
  590. package/react/types/iconTypes.d.ts +0 -11
  591. package/react/types/iconTypes.js +0 -2
  592. package/react/types/iconTypes.js.map +0 -1
  593. package/react/types/searchTypes.d.ts +0 -29
  594. package/react/types/searchTypes.js +0 -2
  595. package/react/types/searchTypes.js.map +0 -1
package/package.json CHANGED
@@ -1,58 +1,58 @@
1
1
  {
2
2
  "name": "@finsemble/finsemble-ui",
3
- "version": "6.4.0",
3
+ "version": "6.6.0-beta.2",
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": [
7
7
  "react"
8
8
  ],
9
9
  "scripts": {
10
- "build": "npm run preprod && tsc",
11
- "do-audit": " improved-yarn-audit --min-severity high --exclude GHSA-whgm-jr23-g3j9",
10
+ "build": "yarn clean && yarn copy-css && tsc",
11
+ "do-audit": " improved-yarn-audit --min-severity high",
12
12
  "clean": "rimraf ./react & rimraf coverage",
13
- "copy-css": "copyfiles -u 1 \"src/**/*.css\" \"react/\"",
14
- "dev": "concurrently \"npm run watch-css\" \"tsc --watch --preserveWatchOutput\" --prefix [{time}:{command}]: --prefix-length 20 --prefix-colors cyan,green",
13
+ "copy-css": "copyfiles -u 1 \"./src/assets/**/*\" react/ && copyfiles -u 1 \"src/**/*.css\" \"react/\"",
14
+ "dev": "yarn copy-css && yarn watch",
15
15
  "monodev": "yarn dev",
16
16
  "new-component": "node ./src/componentTemplateGenerator.js",
17
17
  "obfuscate": "npm run build",
18
- "predev": "rimraf ./react && copyfiles -u 1 \"./src/assets/**/*\" react/ && npm run copy-css",
19
- "preprod": "rimraf ./react && copyfiles -u 1 \"./src/assets/**/*\" react/ && npm run copy-css",
20
- "prod": "tsc",
18
+ "pack_obfuscate": "npm install ../api/api.tgz --force --no-package-lock && npm install --force --no-package-lock && yarn run obfuscate && npm pack && mv *.tgz ui.tgz",
21
19
  "test": "yarn test-mocha && yarn test-storybook",
22
20
  "test-mocha": "ts-mocha -p ./spec/tsconfig.spec.json \"./spec/**/*.spec.ts\"",
23
21
  "test-storybook": "ts-mocha -p ./spec/tsconfig.storybook.json \"./src/**/*.spec.ts*\" --require src/enzymeSetup.js --require ignore-styles",
24
22
  "test-coverage": "nyc yarn test && nyc merge .nyc_output ../../.nyc_output/ui.json",
23
+ "watch": "concurrently \"npm run watch-css\" \"tsc --watch --preserveWatchOutput\" --prefix [{time}:{command}]: --prefix-length 20 --prefix-colors cyan,green",
25
24
  "watch-css": "chokidar \"./src/**/*.css\" -c \"npm run copy-css\"",
26
25
  "storybook": "start-storybook -p 6006",
27
26
  "build-storybook": "build-storybook"
28
27
  },
29
28
  "dependencies": {
29
+ "@finsemble/finsemble-api": "6.6.0-beta.2",
30
30
  "@q42/floating-focus-a11y": "^1.3.3",
31
31
  "@reduxjs/toolkit": "^1.5.0",
32
32
  "@svgr/webpack": "^5.5.0",
33
- "@types/async": "3.2.9",
34
- "@types/chai": "4.2.22",
35
- "@types/lodash": "4.14.176",
33
+ "@types/async": "3.2.12",
34
+ "@types/chai": "4.3.0",
35
+ "@types/lodash": "4.14.178",
36
36
  "@types/mime-types": "^2.1.0",
37
37
  "@types/mocha": "9.0.0",
38
- "@types/react": "17.0.34",
38
+ "@types/react": "17.0.38",
39
39
  "@types/react-dom": "17.0.11",
40
40
  "@types/react-input-autosize": "2.2.1",
41
- "@types/react-redux": "7.1.20",
41
+ "@types/react-redux": "7.1.22",
42
42
  "@types/react-relative-portal": "^1.8.1",
43
- "async": "3.2.2",
43
+ "@types/react-syntax-highlighter": "13.5.2",
44
+ "async": "3.2.3",
44
45
  "date-fns": "^2.25.0",
45
- "dom-autoscroller": "2.3.4",
46
- "immer": "9.0.6",
46
+ "immer": "9.0.12",
47
47
  "lodash": "4.17.21",
48
- "prop-types": "15.7.2",
48
+ "prop-types": "15.8.1",
49
49
  "react-circular-progressbar": "^2.0.3",
50
- "react-input-autosize": "^3.0.0",
51
50
  "react-redux": "7.2.6",
52
51
  "react-relative-portal": "^1.8.0",
53
52
  "react-sortable-hoc": "2.0.0",
54
53
  "react-transition-group": "4.4.2",
55
54
  "redux": "4.1.2",
55
+ "redux-loop": "6.2.0",
56
56
  "unionize": "3.1.0"
57
57
  },
58
58
  "peerDependencies": {
@@ -60,16 +60,16 @@
60
60
  "react-dom": "17.0.2"
61
61
  },
62
62
  "devDependencies": {
63
- "@babel/plugin-proposal-private-methods": "7.16.0",
63
+ "@babel/plugin-proposal-private-methods": "7.16.7",
64
64
  "@babel/preset-env": "^7.16.0",
65
65
  "@babel/preset-react": "^7.12.10",
66
66
  "@babel/register": "^7.16.0",
67
- "@finsemble/finsemble-core": "6.2.1",
68
- "@storybook/addon-actions": "6.3.12",
69
- "@storybook/addon-essentials": "6.4.4",
70
- "@storybook/addon-links": "6.4.3",
71
- "@storybook/react": "6.3.12",
67
+ "@storybook/addon-actions": "6.4.13",
68
+ "@storybook/addon-essentials": "6.4.19",
69
+ "@storybook/addon-links": "6.4.13",
70
+ "@storybook/react": "6.4.13",
72
71
  "@types/enzyme": "^3.10.8",
72
+ "@types/react-syntax-highlighter": "13.5.2",
73
73
  "@types/react-transition-group": "4.4.4",
74
74
  "@types/sinon": "^10.0.2",
75
75
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.2",
@@ -78,7 +78,7 @@
78
78
  "canvas": "^2.6.1",
79
79
  "chai": "4.3.4",
80
80
  "chokidar-cli": "3.0.0",
81
- "concurrently": "6.4.0",
81
+ "concurrently": "7.0.0",
82
82
  "copyfiles": "2.4.1",
83
83
  "core-js": "^3.15.2",
84
84
  "enzyme": "^3.11.0",
@@ -93,10 +93,11 @@
93
93
  "rimraf": "3.0.2",
94
94
  "sinon": "^12.0.0",
95
95
  "ts-loader": "^9.2.3",
96
- "ts-mocha": "8.0.0",
97
- "typescript": "4.4.4"
96
+ "ts-mocha": "9.0.2",
97
+ "typescript": "4.5.5"
98
98
  },
99
99
  "resolutions": {
100
+ "@types/react-dom": "17.0.11",
100
101
  "ts-mocha/ts-node": "^10.1.0",
101
102
  "trim": "0.0.3",
102
103
  "css-what": "5.0.1",
@@ -105,7 +106,9 @@
105
106
  "set-value": "^4.0.1",
106
107
  "glob-parent": "^5.1.2",
107
108
  "immer": "^9.0.6",
108
- "coa": "2.0.2"
109
+ "coa": "2.0.2",
110
+ "node-fetch": "2.6.7",
111
+ "simple-get": "^4.0.1"
109
112
  },
110
113
  "repository": {
111
114
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  import { UnionOf } from "unionize";
2
- import { AuthenticationProvider, MenuType, ProjectError, ProjectSaveData } from "../types/smartDesktopDesignerTypes";
3
- import { services, FEA } from "@finsemble/finsemble-core";
2
+ import { AuthenticationProvider, MenuType, PreloadType, ProjectError, ProjectSaveData } from "../types/smartDesktopDesignerTypes";
3
+ import { services, FEA } from "@finsemble/finsemble-api";
4
4
  export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
5
5
  change_view: string;
6
6
  update_apps: services.Interop.types.AppDefinition[];
@@ -9,6 +9,8 @@ export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
9
9
  update_app: services.Interop.types.AppDefinition;
10
10
  delete_app: string;
11
11
  update_menus: MenuType;
12
+ update_preloads: PreloadType[];
13
+ set_current_preload: PreloadType | null;
12
14
  set_deploy_info: FEA.DeployInfo | null;
13
15
  set_publish_error: string | null;
14
16
  set_is_publishing: boolean;
@@ -27,6 +29,8 @@ export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
27
29
  update_app: services.Interop.types.AppDefinition;
28
30
  delete_app: string;
29
31
  update_menus: MenuType;
32
+ update_preloads: PreloadType[];
33
+ set_current_preload: PreloadType | null;
30
34
  set_deploy_info: FEA.DeployInfo | null;
31
35
  set_publish_error: string | null;
32
36
  set_is_publishing: boolean;
@@ -7,6 +7,8 @@ export const SmartDesktopDesignerActions = unionize({
7
7
  update_app: ofType(),
8
8
  delete_app: ofType(),
9
9
  update_menus: ofType(),
10
+ update_preloads: ofType(),
11
+ set_current_preload: ofType(),
10
12
  set_deploy_info: ofType(),
11
13
  set_publish_error: ofType(),
12
14
  set_is_publishing: ofType(),
@@ -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;AAQrD,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,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 { unionize, ofType, UnionOf } from \"unionize\";\nimport { AuthenticationProvider, MenuType, ProjectError, ProjectSaveData } from \"../types/smartDesktopDesignerTypes\";\n\nimport { services, FEA } from \"@finsemble/finsemble-core\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\ntype DeployInfo = FEA.DeployInfo;\n\nexport const SmartDesktopDesignerActions = unionize(\n\t{\n\t\tchange_view: ofType<string>(),\n\t\tupdate_apps: ofType<AppDefinition[]>(),\n\t\tnew_app: ofType<string | null>(),\n\t\tset_current_app_id: ofType<string | null>(),\n\t\tupdate_app: ofType<AppDefinition>(),\n\t\tdelete_app: ofType<string>(),\n\t\tupdate_menus: ofType<MenuType>(),\n\t\tset_deploy_info: ofType<DeployInfo | null>(),\n\t\tset_publish_error: ofType<string | null>(),\n\t\tset_is_publishing: ofType<boolean>(),\n\t\tset_project_info: ofType<ProjectSaveData>(),\n\t\tset_is_getting_started: ofType<boolean>(),\n\t\tupdate_auth_provider: ofType<AuthenticationProvider>(),\n\t\tenable_auth_provider: ofType<string>(),\n\t\tset_project_error: ofType<ProjectError>(),\n\t\tdelete_project_error: ofType<ProjectError>(),\n\t\tset_reviewing_project_errors: ofType<boolean>(),\n\t},\n\t{ tag: \"type\", value: \"payload\" }\n);\n\nexport type SmartDesktopDesignerActionsTypes = UnionOf<typeof SmartDesktopDesignerActions>;\n"]}
1
+ {"version":3,"file":"smartDesktopDesignerActions.js","sourceRoot":"","sources":["../../src/actions/smartDesktopDesignerActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AAcrD,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,UAAU,EAAE,MAAM,EAAiB;IACnC,UAAU,EAAE,MAAM,EAAU;IAC5B,YAAY,EAAE,MAAM,EAAY;IAChC,eAAe,EAAE,MAAM,EAAiB;IACxC,mBAAmB,EAAE,MAAM,EAAsB;IACjD,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\";\nimport {\n\tAuthenticationProvider,\n\tMenuType,\n\tPreloadType,\n\tProjectError,\n\tProjectSaveData,\n} from \"../types/smartDesktopDesignerTypes\";\n\nimport { services, FEA } from \"@finsemble/finsemble-api\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\ntype DeployInfo = FEA.DeployInfo;\n\nexport const SmartDesktopDesignerActions = unionize(\n\t{\n\t\tchange_view: ofType<string>(),\n\t\tupdate_apps: ofType<AppDefinition[]>(),\n\t\tnew_app: ofType<string | null>(),\n\t\tset_current_app_id: ofType<string | null>(),\n\t\tupdate_app: ofType<AppDefinition>(),\n\t\tdelete_app: ofType<string>(),\n\t\tupdate_menus: ofType<MenuType>(),\n\t\tupdate_preloads: ofType<PreloadType[]>(),\n\t\tset_current_preload: ofType<PreloadType | null>(),\n\t\tset_deploy_info: ofType<DeployInfo | null>(),\n\t\tset_publish_error: ofType<string | null>(),\n\t\tset_is_publishing: ofType<boolean>(),\n\t\tset_project_info: ofType<ProjectSaveData>(),\n\t\tset_is_getting_started: ofType<boolean>(),\n\t\tupdate_auth_provider: ofType<AuthenticationProvider>(),\n\t\tenable_auth_provider: ofType<string>(),\n\t\tset_project_error: ofType<ProjectError>(),\n\t\tdelete_project_error: ofType<ProjectError>(),\n\t\tset_reviewing_project_errors: ofType<boolean>(),\n\t},\n\t{ tag: \"type\", value: \"payload\" }\n);\n\nexport type SmartDesktopDesignerActionsTypes = UnionOf<typeof SmartDesktopDesignerActions>;\n"]}
@@ -8,7 +8,6 @@
8
8
  @import url("core/icons.css");
9
9
  @import url("core/windowFrame.css");
10
10
  @import url("core/formElements.css");
11
- @import url("core/notifications.css");
12
11
  @import url("./font-finance.css");
13
12
  @import url("./fonts/Open_Sans/OpenSans-Definition.css");
14
13
  @import url("./focus.css");
@@ -536,3 +536,9 @@ option:focus {
536
536
  .db-col-4 {
537
537
  width: 20%;
538
538
  }
539
+
540
+ .indent-15px {
541
+ display: flex;
542
+ margin-top: 8px;
543
+ margin-left: 15px;
544
+ }
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="16px" height="13px" viewBox="0 0 16 13" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>Group 7 Copy</title>
4
+ <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
+ <g id="main-menu-copy" transform="translate(-32.000000, -199.000000)" fill="#5B606F">
6
+ <g id="Optional" transform="translate(14.000000, 188.000000)">
7
+ <g id="Group-7-Copy" transform="translate(18.000000, 11.000000)">
8
+ <path d="M4.7920808,9.07004831 L1.4321161,6.48309179 L4.7920808,3.91304348 C5.03076681,3.72705314 5.06748774,3.4057971 4.86552265,3.18599034 C4.75535987,3.06763285 4.5901157,3 4.42487154,3 C4.2963483,3 4.16782506,3.03381643 4.05766228,3.11835749 L0.201965091,6.0942029 C0.0734418513,6.19565217 0,6.33091787 0,6.5 C0,6.66908213 0.0734418513,6.80434783 0.201965091,6.9057971 L4.07602275,9.88164251 C4.18618552,9.96618357 4.2963483,10 4.443232,10 C4.60847617,10 4.77372033,9.93236715 4.88388311,9.81384058 C5.06748774,9.57729469 5.03076681,9.25603865 4.7920808,9.07004831" id="Fill-1"></path>
9
+ <path d="M16,6.5 C16,6.34799517 15.927227,6.19565217 15.7993727,6.09437198 L11.9327372,3.11835749 C11.8234865,3.03381643 11.6956322,3 11.5679602,3 C11.4038106,3 11.239661,3.06763285 11.1302279,3.18599034 C10.9296006,3.4057971 10.9660783,3.72722222 11.2031833,3.91304348 L14.5408923,6.5 L11.2214222,9.0871256 C10.9843172,9.27294686 10.9478395,9.59437198 11.1484668,9.81417874 C11.2578999,9.93253623 11.4038106,10 11.5861991,10 C11.713871,10 11.8415429,9.94927536 11.950976,9.88164251 L15.7993727,6.9057971 C15.927227,6.80451691 16,6.65217391 16,6.5" id="Fill-3"></path>
10
+ <path d="M9.6316044,0.0167741935 C9.57864799,0 9.52569158,0 9.47273517,0 C9.24325739,0 9.03143175,0.134193548 8.9608232,0.369032258 L5.02439668,12.3458065 C4.936136,12.6141935 5.09500523,12.8993548 5.37743942,12.9832258 C5.43039583,13 5.48335224,13 5.53630865,13 C5.78343857,13 5.97761207,12.8490323 6.04822062,12.6309677 L9.966995,0.637419355 C10.0729078,0.385806452 9.91403859,0.100645161 9.6316044,0.0167741935" id="Fill-5"></path>
11
+ </g>
12
+ </g>
13
+ </g>
14
+ </g>
15
+ </svg>
@@ -83,7 +83,7 @@ import { ${name}Props } from "./${path.parse(component_file).name}";
83
83
  import { BasicStory } from "./${path.parse(component_file).name}.stories";
84
84
 
85
85
  // For running accessibility scans
86
- import { accessibilityAssessor } from "${prepRelativeLink(test_file, "./src/components/smartDesktopDesigner/tests/a11y_helper")}";
86
+ import { accessibilityAssessor } from "${prepRelativeLink(test_file, "./src/components/sdd/tests/a11y_helper")}";
87
87
 
88
88
  // For testing user interactions (like click events):
89
89
  import sinon from "sinon";
@@ -1 +1 @@
1
- {"version":3,"file":"componentTemplateGenerator.js","sourceRoot":"","sources":["../src/componentTemplateGenerator.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CA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EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,cAAc,EAAE,CAAC,GAAG,EAAE,EAAE;IAChD,IAAI,GAAG,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;QAC7D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;gCACnC,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AACH,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;IAC9C,IAAI,GAAG,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,SAAS,EAAE,EAAE,GAAG,CAAC,CAAC;QAC5D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;gDACb,IAAI;iCACnB,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC","sourcesContent":["const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst args = process.argv.slice(2);\nlet file = \"\";\nlet name = \"MyComponent\";\n\n// Stupid simple args parser\nfor (let i = 0; i < args.length; i++) {\n\tswitch (args[i]) {\n\t\tcase \"--file\": {\n\t\t\tfile = args[++i];\n\t\t\tbreak;\n\t\t}\n\t\tcase \"--name\": {\n\t\t\tname = args[++i];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tconsole.log(`Unknown flag: ${args[i]}`);\n\t\t}\n\t}\n}\n\nif (file === \"\") {\n\tconsole.log(\"Error: no provided file\");\n\treturn;\n}\n\nconst prepRelativeLink = (from, to) =>\n\tpath\n\t\t.relative(from, to)\n\t\t.replace(/\\\\/g, \"/\") // swap the slashes\n\t\t.replace(\"../\", \"\"); // path.relative adds an extra \"../\" for some reason, so remove it\nconst base_path = path.join(\"src\", \"components\", file);\nconst component_file = `${base_path}.tsx`;\nconst story_file = `${base_path}.stories.tsx`;\nconst test_file = `${base_path}.spec.tsx`;\n\nconst parsed_component_file = path.parse(component_file);\nconst { dir } = parsed_component_file;\nif (!fs.existsSync(dir)) {\n\tconsole.log(`Target directory, ${path.relative(\".\", dir)}, does not exist`);\n\treturn;\n}\n\nconst component_template = `\nimport React from \"react\";\n\nexport interface ${name}Props {\n example: string;\n onClick: () => void;\n};\n\nexport const ${name}: React.FunctionComponent<${name}Props> = (props: ${name}Props) => {\n // Do things\n return (\n <div>\n <button onClick={props.onClick}>{props.example}</button>\n </div>\n );\n};\n`;\n\nconst story_template = `\nimport React from \"react\";\nimport { ${name}, ${name}Props } from \"./${parsed_component_file.name}\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport { action } from \"@storybook/addon-actions\";\nimport \"${prepRelativeLink(story_file, \"./src/assets/css/finsemble.css\")}\";\n\nexport default {\n title: \"${name}\",\n component: ${name}\n};\n\nconst Template: Story<${name}Props> = (args: ${name}Props) => <${name} {...args} />;\n\nexport const BasicStory = Template.bind({});\nBasicStory.args = {\n example: \"My Example\",\n onClick: action(\"Clicked\")\n};\n`;\n\nconst test_template = `\nimport * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it, afterEach } from \"mocha\";\nimport { expect } from \"chai\";\nimport { ${name}Props } from \"./${path.parse(component_file).name}\";\nimport { BasicStory } from \"./${path.parse(component_file).name}.stories\";\n\n// For running accessibility scans\nimport { accessibilityAssessor } from \"${prepRelativeLink(\n\ttest_file,\n\t\"./src/components/smartDesktopDesigner/tests/a11y_helper\"\n)}\";\n\n// For testing user interactions (like click events):\nimport sinon from \"sinon\";\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<${name}/>\", () => {\n // Used to clear after each interactive test using sinon\n afterEach(() => {\n sinon.restore();\n });\n\n // Example basic test\n it(\"should display text\", () => {\n const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n expect(wrapper.find(\"button\").exists(), \"The button exists\").to.be.true;\n expect(wrapper.find(\"button\").text(), \"The button's text\").to.equal(\"My Example\");\n });\n\n // Example interactive test\n it(\"should call function when clicked\", () => {\n\t\tconst buttonSpy = sinon.spy(BasicStory.args as ${name}Props, \"onClick\");\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n wrapper.find(\"button\").simulate(\"click\");\n expect(buttonSpy.calledOnce).to.be.true;\n });\n\n\t// Example accessibility scan\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n});\n`;\n\nfs.writeFile(component_file, component_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${component_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Component added at ${path.relative(\".\", component_file)}`);\n});\nfs.writeFile(story_file, story_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${story_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Story added at path \"${path.relative(\".\", story_file)}\".\nTo view it, run: yarn storybook`);\n});\nfs.writeFile(test_file, test_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${test_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Tests added at \"${path.relative(\".\", test_file)}\".\nTo run this test, run: yarn test-storybook -g ${name}\nTo run all tests, run: yarn test`);\n});\n"]}
1
+ {"version":3,"file":"componentTemplateGenerator.js","sourceRoot":"","sources":["../src/componentTemplateGenerator.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,C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G,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;QAC7D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;gCACnC,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AACH,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;IAC9C,IAAI,GAAG,EAAE;QACR,OAAO,CAAC,GAAG,CAAC,8BAA8B,SAAS,EAAE,EAAE,GAAG,CAAC,CAAC;QAC5D,OAAO;KACP;IACD,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;gDACb,IAAI;iCACnB,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC","sourcesContent":["const fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst args = process.argv.slice(2);\nlet file = \"\";\nlet name = \"MyComponent\";\n\n// Stupid simple args parser\nfor (let i = 0; i < args.length; i++) {\n\tswitch (args[i]) {\n\t\tcase \"--file\": {\n\t\t\tfile = args[++i];\n\t\t\tbreak;\n\t\t}\n\t\tcase \"--name\": {\n\t\t\tname = args[++i];\n\t\t\tbreak;\n\t\t}\n\t\tdefault: {\n\t\t\tconsole.log(`Unknown flag: ${args[i]}`);\n\t\t}\n\t}\n}\n\nif (file === \"\") {\n\tconsole.log(\"Error: no provided file\");\n\treturn;\n}\n\nconst prepRelativeLink = (from, to) =>\n\tpath\n\t\t.relative(from, to)\n\t\t.replace(/\\\\/g, \"/\") // swap the slashes\n\t\t.replace(\"../\", \"\"); // path.relative adds an extra \"../\" for some reason, so remove it\nconst base_path = path.join(\"src\", \"components\", file);\nconst component_file = `${base_path}.tsx`;\nconst story_file = `${base_path}.stories.tsx`;\nconst test_file = `${base_path}.spec.tsx`;\n\nconst parsed_component_file = path.parse(component_file);\nconst { dir } = parsed_component_file;\nif (!fs.existsSync(dir)) {\n\tconsole.log(`Target directory, ${path.relative(\".\", dir)}, does not exist`);\n\treturn;\n}\n\nconst component_template = `\nimport React from \"react\";\n\nexport interface ${name}Props {\n example: string;\n onClick: () => void;\n};\n\nexport const ${name}: React.FunctionComponent<${name}Props> = (props: ${name}Props) => {\n // Do things\n return (\n <div>\n <button onClick={props.onClick}>{props.example}</button>\n </div>\n );\n};\n`;\n\nconst story_template = `\nimport React from \"react\";\nimport { ${name}, ${name}Props } from \"./${parsed_component_file.name}\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport { action } from \"@storybook/addon-actions\";\nimport \"${prepRelativeLink(story_file, \"./src/assets/css/finsemble.css\")}\";\n\nexport default {\n title: \"${name}\",\n component: ${name}\n};\n\nconst Template: Story<${name}Props> = (args: ${name}Props) => <${name} {...args} />;\n\nexport const BasicStory = Template.bind({});\nBasicStory.args = {\n example: \"My Example\",\n onClick: action(\"Clicked\")\n};\n`;\n\nconst test_template = `\nimport * as React from \"react\";\nimport { mount } from \"enzyme\";\nimport { describe, it, afterEach } from \"mocha\";\nimport { expect } from \"chai\";\nimport { ${name}Props } from \"./${path.parse(component_file).name}\";\nimport { BasicStory } from \"./${path.parse(component_file).name}.stories\";\n\n// For running accessibility scans\nimport { accessibilityAssessor } from \"${prepRelativeLink(test_file, \"./src/components/sdd/tests/a11y_helper\")}\";\n\n// For testing user interactions (like click events):\nimport sinon from \"sinon\";\n// Necessary to allow sinon to work with mocked actions (which are shown in the Actions panel in Storybook)\nimport addons, { mockChannel } from \"@storybook/addons\";\naddons.setChannel(mockChannel());\n\ndescribe(\"<${name}/>\", () => {\n // Used to clear after each interactive test using sinon\n afterEach(() => {\n sinon.restore();\n });\n\n // Example basic test\n it(\"should display text\", () => {\n const wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n expect(wrapper.find(\"button\").exists(), \"The button exists\").to.be.true;\n expect(wrapper.find(\"button\").text(), \"The button's text\").to.equal(\"My Example\");\n });\n\n // Example interactive test\n it(\"should call function when clicked\", () => {\n\t\tconst buttonSpy = sinon.spy(BasicStory.args as ${name}Props, \"onClick\");\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n wrapper.find(\"button\").simulate(\"click\");\n expect(buttonSpy.calledOnce).to.be.true;\n });\n\n\t// Example accessibility scan\n\tit(\"should pass accessibility scans\", async () => {\n\t\tconst wrapper = mount(<BasicStory {...(BasicStory.args as ${name}Props)} />);\n\n\t\texpect(await accessibilityAssessor(wrapper)).to.be.true;\n\t});\n});\n`;\n\nfs.writeFile(component_file, component_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${component_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Component added at ${path.relative(\".\", component_file)}`);\n});\nfs.writeFile(story_file, story_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${story_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Story added at path \"${path.relative(\".\", story_file)}\".\nTo view it, run: yarn storybook`);\n});\nfs.writeFile(test_file, test_template, (err) => {\n\tif (err) {\n\t\tconsole.log(`Error writing to file path ${test_file}`, err);\n\t\treturn;\n\t}\n\tconsole.log(`Tests added at \"${path.relative(\".\", test_file)}\".\nTo run this test, run: yarn test-storybook -g ${name}\nTo run all tests, run: yarn test`);\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleProvider.js","sourceRoot":"","sources":["../../src/components/FinsembleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,WAAW,EAAE,CAAC;AAcvB,MAAM,CAAC,MAAM,iBAAiB,GAAoD,CAAC,KAAK,EAAE,EAAE;IAC3F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,KAAK;YAAE,OAAO;QAClB,MAAM,OAAO,GAAG,GAAG,EAAE;YACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;QACF,MAAM,CAAC,IAAI,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAA;YACpC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;YAC3C,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,KAAK,CAAC,CAAC,CAAC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,IAAG,KAAK,CAAC,QAAQ,CAAY,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1F,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { store, createStore } from \"../store\";\nimport { Provider } from \"react-redux\";\nimport { useState, useEffect } from \"react\";\n//import { common } from \"@finsemble/finsemble-core\";\n\n//let { Globals } = common;\n\nexport { createStore };\n\n/**\n * The <FinsembleProvider> must be an ancestor of any Finsemble React UI components or hooks.\n * It manages FSBL initialization (ensuring that all components and hooks are operating with a properly initialized API.)\n * It also constructs the UI API's redux store and makes it available through a Context Provider for all descendent components and hooks.\n *\n * The <FinsembleProvider> will render its children.\n */\n\nexport type FinsembleProviderProps = {\n\tstore?: typeof store;\n};\n\nexport const FinsembleProvider: React.FunctionComponent<FinsembleProviderProps> = (props) => {\n\tconst [ready, setReady] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (ready) return;\n\t\tconst release = () => {\n\t\t\tsetReady(true);\n\t\t};\n\t\twindow.FSBL && FSBL?.addEventListener\n\t\t\t? FSBL.addEventListener(\"onReady\", release)\n\t\t\t: window.addEventListener(\"FSBLReady\", release);\n\t}, [ready]);\n\n\treturn ready ? <Provider store={props.store || store}>{props.children}</Provider> : null;\n};\n"]}
1
+ {"version":3,"file":"FinsembleProvider.js","sourceRoot":"","sources":["../../src/components/FinsembleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,WAAW,EAAE,CAAC;AAcvB,MAAM,CAAC,MAAM,iBAAiB,GAAoD,CAAC,KAAK,EAAE,EAAE;IAC3F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,KAAK;YAAE,OAAO;QAClB,MAAM,OAAO,GAAG,GAAG,EAAE;YACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;QACF,MAAM,CAAC,IAAI,KAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,CAAA;YACpC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC;YAC3C,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,KAAK,CAAC,CAAC,CAAC,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,IAAG,KAAK,CAAC,QAAQ,CAAY,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1F,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { store, createStore } from \"../store\";\nimport { Provider } from \"react-redux\";\nimport { useState, useEffect } from \"react\";\n//import { common } from \"@finsemble/finsemble-api\";\n\n//let { Globals } = common;\n\nexport { createStore };\n\n/**\n * The <FinsembleProvider> must be an ancestor of any Finsemble React UI components or hooks.\n * It manages FSBL initialization (ensuring that all components and hooks are operating with a properly initialized API.)\n * It also constructs the UI API's redux store and makes it available through a Context Provider for all descendent components and hooks.\n *\n * The <FinsembleProvider> will render its children.\n */\n\nexport type FinsembleProviderProps = {\n\tstore?: typeof store;\n};\n\nexport const FinsembleProvider: React.FunctionComponent<FinsembleProviderProps> = (props) => {\n\tconst [ready, setReady] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (ready) return;\n\t\tconst release = () => {\n\t\t\tsetReady(true);\n\t\t};\n\t\twindow.FSBL && FSBL?.addEventListener\n\t\t\t? FSBL.addEventListener(\"onReady\", release)\n\t\t\t: window.addEventListener(\"FSBLReady\", release);\n\t}, [ready]);\n\n\treturn ready ? <Provider store={props.store || store}>{props.children}</Provider> : null;\n};\n"]}
@@ -15,7 +15,7 @@ export class AppCatalogComponent extends React.Component<any, any, any> {
15
15
  navigateToShowcase(id: any): void;
16
16
  viewApp(error: any, event: any): void;
17
17
  isActiveApp(): boolean;
18
- getActiveTags(): any;
18
+ getActiveTags(): array;
19
19
  _asyncAppRequest: Promise<void> | undefined;
20
20
  _asyncTagsRequest: Promise<void> | undefined;
21
21
  getActiveApp(): string;
@@ -1,6 +1,6 @@
1
1
  export default ImageCarousel;
2
2
  declare function ImageCarousel(props: {
3
- nextImage: any;
4
- previousImage: any;
5
- images: any;
3
+ nextImage: func;
4
+ previousImage: func;
5
+ images: array;
6
6
  }): JSX.Element;
@@ -1,5 +1,5 @@
1
1
  export default SupportNotes;
2
2
  declare function SupportNotes(props: {
3
3
  email: string;
4
- tags: any;
4
+ tags: array;
5
5
  }): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { FDC3Props, FDC3PostCallback, FDC3SearchCallback, FDC3GetCallback } from "../../../types/fdc3";
3
- import { StandardError } from "@finsemble/finsemble-core/types/types";
3
+ import { StandardError } from "@finsemble/finsemble-api/types/types";
4
4
  export default class FDC3 extends React.Component<FDC3Props> {
5
5
  creds: {};
6
6
  config: FDC3Props["config"];
@@ -1 +1 @@
1
- {"version":3,"file":"FDC3.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/modules/FDC3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,kBAAkB,GAAG,CAC1B,QAGC,EACD,IAA2C,EAC1C,EAAE;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAE7B,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;YAE5B,IAAI,CAAC,IAAI,CAAC,CAAC;SACX;aAAM;YAEN,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SACjB;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAY,EAAE,IAAwC,EAAE,EAAE;IAClF,IAAI,CAAC;QACJ,OAAO,EAAE,kBAAkB,KAAK,CAAC,OAAO,EAAE;KAC1C,CAAC,CAAC;AACJ,CAAC,CAAC;AAUF,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAoB;IAK3D,YAAY,KAAgB;QAC3B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;SAChE;QACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG;YAC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IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;iBAC1B;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;IAQD,MAAM,CAAC,MAA8B,EAAE,QAA4B;QAClE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC,KAAqB,EAAE,IAA0B,EAAE,EAAE;gBACxF,IAAI,KAAK,EAAE;oBACV,MAAM,CAAC,KAAK,CAAC,CAAC;iBACd;gBAED,IAAI,QAAQ,EAAE;oBACb,QAAQ,CAAC,IAAI,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,CAAC,CAAC;iBACnC;qBAAM,IAAI,IAAI,EAAE;oBAChB,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;iBAC3B;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport {\n\tFDC3Props,\n\tFDC3PostCallback,\n\tFDC3SearchCallback,\n\tFDC3GetCallback,\n\tErrorOrMessage,\n\tFDC3PostCallbackData,\n} from \"../../../types/fdc3\";\nimport { StandardError } from \"@finsemble/finsemble-core/types/types\";\n\nconst handleFdc3Response = (\n\tresponse: {\n\t\tjson: () => Promise<any>;\n\t\tstatus: number;\n\t},\n\tdone: (dataOrNull: any, data?: any) => void\n) => {\n\tresponse.json().then((data) => {\n\t\t// We are expecting 200 here for data\n\t\tif (response.status !== 200) {\n\t\t\t// We have a problem, data as error message\n\t\t\tdone(data);\n\t\t} else {\n\t\t\t// All good, no problem\n\t\t\tdone(null, data);\n\t\t}\n\t});\n};\n\nconst handleFdc3Error = (error: Error, done: (msg: { message: string }) => void) => {\n\tdone({\n\t\tmessage: `Request failed ${error.message}`,\n\t});\n};\n\n/**\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n *\n * FDC3 App directory client, I will be using fetch()\n * to make calls to the appd web service, even though I'm\n * not sure where did fetch() come from, will investigate later\n */\nexport default class FDC3 extends React.Component<FDC3Props> {\n\tcreds: {};\n\n\tconfig: FDC3Props[\"config\"];\n\n\tconstructor(props: FDC3Props) {\n\t\tsuper(props);\n\t\tif (!this.props.config.url) {\n\t\t\tthrow new Error(\"Please specify the url of the app directory.\");\n\t\t}\n\t\tthis.creds = this.props.creds;\n\t\tthis.config = {\n\t\t\turl: this.props.config.url.replace(/\\/+$/, \"\"),\n\t\t};\n\t}\n\n\t/**\n\t * Http get wrapper\n\t * @param {string} path The restful method path\n\t * @param {function} done The callback function\n\t */\n\t_get(path: string, done: FDC3GetCallback) {\n\t\tfetch(this.config.url + path, {\n\t\t\tmethod: \"GET\",\n\t\t})\n\t\t\t.then((response) => handleFdc3Response(response, done))\n\t\t\t.catch((error) => handleFdc3Error(error, done));\n\t}\n\n\t/**\n\t *\n\t * @param {string} path The restful method path\n\t * @param {object} params The post data\n\t * @param {function} done The callback function\n\t */\n\t_post(path: string, params: Record<string, string>, done: FDC3PostCallback) {\n\t\tfetch(this.config.url + path, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify(params),\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t})\n\t\t\t.then((response) => handleFdc3Response(response, done))\n\t\t\t.catch((error) => handleFdc3Error(error, done));\n\t}\n\n\t/**\n\t * Returns all applications\n\t * @param {function} callback The optional callback function\n\t */\n\tgetAll(callback: (arg1: Record<string, string> | null, applications: string[]) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(\"/apps/\", (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(data?.applications);\n\t\t\t\t}\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback(error, data?.applications || []);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns a single application in results\n\t * @param {string} appId The app id\n\t */\n\tget(appId: string, callback: (error: StandardError, application: string) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(`/apps/${appId}`, (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\t\t\t\tif (callback && data?.applications) {\n\t\t\t\t\tcallback(null, data.applications[0]);\n\t\t\t\t}\n\n\t\t\t\tif (data?.applications) {\n\t\t\t\t\tresolve(data.applications[0]);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns unique tags\n\t * @param {function} callback The optional callback function\n\t */\n\tgetTags(callback: (error: StandardError, results: string[]) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(\"/tags/\", (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else if (data) {\n\t\t\t\t\tresolve(data.tags);\n\t\t\t\t}\n\t\t\t\tif (callback && data) {\n\t\t\t\t\tcallback(null, data.tags);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns a list of applications based on text and filter\n\t * @param {object} params The search criteria\n\t * @param {function} callback The callback function\n\t * @example search({text: 'blah', filter: {tag: 'newrelease'}})\n\t */\n\tsearch(params: Record<string, string>, callback: FDC3SearchCallback) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._post(\"/apps/search\", params, (error: ErrorOrMessage, data: FDC3PostCallbackData) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback(null, data?.applications);\n\t\t\t\t} else if (data) {\n\t\t\t\t\tresolve(data.applications);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"FDC3.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/modules/FDC3.ts"],"names":[],"mappings":"AAAA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C,CAAC;iBACd;gBAED,IAAI,QAAQ,EAAE;oBACb,QAAQ,CAAC,IAAI,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,CAAC,CAAC;iBACnC;qBAAM,IAAI,IAAI,EAAE;oBAChB,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;iBAC3B;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport {\n\tFDC3Props,\n\tFDC3PostCallback,\n\tFDC3SearchCallback,\n\tFDC3GetCallback,\n\tErrorOrMessage,\n\tFDC3PostCallbackData,\n} from \"../../../types/fdc3\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\n\nconst handleFdc3Response = (\n\tresponse: {\n\t\tjson: () => Promise<any>;\n\t\tstatus: number;\n\t},\n\tdone: (dataOrNull: any, data?: any) => void\n) => {\n\tresponse.json().then((data) => {\n\t\t// We are expecting 200 here for data\n\t\tif (response.status !== 200) {\n\t\t\t// We have a problem, data as error message\n\t\t\tdone(data);\n\t\t} else {\n\t\t\t// All good, no problem\n\t\t\tdone(null, data);\n\t\t}\n\t});\n};\n\nconst handleFdc3Error = (error: Error, done: (msg: { message: string }) => void) => {\n\tdone({\n\t\tmessage: `Request failed ${error.message}`,\n\t});\n};\n\n/**\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n *\n * FDC3 App directory client, I will be using fetch()\n * to make calls to the appd web service, even though I'm\n * not sure where did fetch() come from, will investigate later\n */\nexport default class FDC3 extends React.Component<FDC3Props> {\n\tcreds: {};\n\n\tconfig: FDC3Props[\"config\"];\n\n\tconstructor(props: FDC3Props) {\n\t\tsuper(props);\n\t\tif (!this.props.config.url) {\n\t\t\tthrow new Error(\"Please specify the url of the app directory.\");\n\t\t}\n\t\tthis.creds = this.props.creds;\n\t\tthis.config = {\n\t\t\turl: this.props.config.url.replace(/\\/+$/, \"\"),\n\t\t};\n\t}\n\n\t/**\n\t * Http get wrapper\n\t * @param {string} path The restful method path\n\t * @param {function} done The callback function\n\t */\n\t_get(path: string, done: FDC3GetCallback) {\n\t\tfetch(this.config.url + path, {\n\t\t\tmethod: \"GET\",\n\t\t})\n\t\t\t.then((response) => handleFdc3Response(response, done))\n\t\t\t.catch((error) => handleFdc3Error(error, done));\n\t}\n\n\t/**\n\t *\n\t * @param {string} path The restful method path\n\t * @param {object} params The post data\n\t * @param {function} done The callback function\n\t */\n\t_post(path: string, params: Record<string, string>, done: FDC3PostCallback) {\n\t\tfetch(this.config.url + path, {\n\t\t\tmethod: \"POST\",\n\t\t\tbody: JSON.stringify(params),\n\t\t\theaders: {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t})\n\t\t\t.then((response) => handleFdc3Response(response, done))\n\t\t\t.catch((error) => handleFdc3Error(error, done));\n\t}\n\n\t/**\n\t * Returns all applications\n\t * @param {function} callback The optional callback function\n\t */\n\tgetAll(callback: (arg1: Record<string, string> | null, applications: string[]) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(\"/apps/\", (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(data?.applications);\n\t\t\t\t}\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback(error, data?.applications || []);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns a single application in results\n\t * @param {string} appId The app id\n\t */\n\tget(appId: string, callback: (error: StandardError, application: string) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(`/apps/${appId}`, (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\t\t\t\tif (callback && data?.applications) {\n\t\t\t\t\tcallback(null, data.applications[0]);\n\t\t\t\t}\n\n\t\t\t\tif (data?.applications) {\n\t\t\t\t\tresolve(data.applications[0]);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns unique tags\n\t * @param {function} callback The optional callback function\n\t */\n\tgetTags(callback: (error: StandardError, results: string[]) => void) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._get(\"/tags/\", (error, data) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else if (data) {\n\t\t\t\t\tresolve(data.tags);\n\t\t\t\t}\n\t\t\t\tif (callback && data) {\n\t\t\t\t\tcallback(null, data.tags);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Returns a list of applications based on text and filter\n\t * @param {object} params The search criteria\n\t * @param {function} callback The callback function\n\t * @example search({text: 'blah', filter: {tag: 'newrelease'}})\n\t */\n\tsearch(params: Record<string, string>, callback: FDC3SearchCallback) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._post(\"/apps/search\", params, (error: ErrorOrMessage, data: FDC3PostCallbackData) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback(null, data?.applications);\n\t\t\t\t} else if (data) {\n\t\t\t\t\tresolve(data.applications);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n}\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright 2018 by ChartIQ, Inc.
3
3
  * All rights reserved.
4
4
  */
5
- import StoreModel from "@finsemble/finsemble-core/types/clients/StoreModel";
6
- import { StandardCallback } from "@finsemble/finsemble-core/types/types";
5
+ import StoreModel from "@finsemble/finsemble-api/types/clients/StoreModel";
6
+ import { StandardCallback } from "@finsemble/finsemble-api/types/types";
7
7
  export { createStore, getStore };
8
8
  declare function createStore(cb: StandardCallback): void;
9
9
  declare function getStore(): StoreModel;
@@ -1 +1 @@
1
- {"version":3,"file":"appStore.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/appStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAEjC,MAAM,aAAa,GAAG;IACrB;QACC,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,IAAI;KACX;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,KAAK;KACZ;CACD,CAAC;AAEF,IAAI,eAA2B,CAAC;AAEhC,SAAS,WAAW,CAAC,EAAoB;IACxC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAC3C,EAAE,KAAK,EAAE,6BAA6B,EAAE,MAAM,EAAE,IAAI,EAAE,EACtD,CAAC,GAAkB,EAAE,KAAkB,EAAE,EAAE;QAC1C,IAAI,KAAK,EAAE;YACV,eAAe,GAAG,KAAK,CAAC;YAGxB,eAAe,CAAC,SAAS,CAAC,aAAa,EAAE,GAAG,EAAE;gBAC7C,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;SACH;IACF,CAAC,CACD,CAAC;AACH,CAAC;AAED,SAAS,QAAQ;IAChB,OAAO,eAAe,CAAC;AACxB,CAAC","sourcesContent":["/*!\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport StoreModel from \"@finsemble/finsemble-core/types/clients/StoreModel\";\nimport { StandardCallback, StandardError } from \"@finsemble/finsemble-core/types/types\";\n\nexport { createStore, getStore };\n\nconst defaultValues = [\n\t{\n\t\tfield: \"apps\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"filteredApps\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"activeTags\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"activeApp\",\n\t\tvalue: null,\n\t},\n\t{\n\t\tfield: \"searchText\",\n\t\tvalue: \"\",\n\t},\n\t{\n\t\tfield: \"forceSearch\",\n\t\tvalue: false,\n\t},\n];\n\nlet appCatalogStore: StoreModel;\n\nfunction createStore(cb: StandardCallback) {\n\tFSBL.Clients.DistributedStoreClient.getStore(\n\t\t{ store: \"Finsemble-AppLauncher-Store\", global: true },\n\t\t(err: StandardError, store?: StoreModel) => {\n\t\t\tif (store) {\n\t\t\t\tappCatalogStore = store;\n\n\t\t\t\t// set default values before initializing the store with values from storage.\n\t\t\t\tappCatalogStore.setValues(defaultValues, () => {\n\t\t\t\t\tcb(null, appCatalogStore);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t);\n}\n\nfunction getStore() {\n\treturn appCatalogStore;\n}\n"]}
1
+ {"version":3,"file":"appStore.js","sourceRoot":"","sources":["../../../../src/components/appCatalog/stores/appStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAEjC,MAAM,aAAa,GAAG;IACrB;QACC,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,IAAI;KACX;IACD;QACC,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,EAAE;KACT;IACD;QACC,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,KAAK;KACZ;CACD,CAAC;AAEF,IAAI,eAA2B,CAAC;AAEhC,SAAS,WAAW,CAAC,EAAoB;IACxC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAC3C,EAAE,KAAK,EAAE,6BAA6B,EAAE,MAAM,EAAE,IAAI,EAAE,EACtD,CAAC,GAAkB,EAAE,KAAkB,EAAE,EAAE;QAC1C,IAAI,KAAK,EAAE;YACV,eAAe,GAAG,KAAK,CAAC;YAGxB,eAAe,CAAC,SAAS,CAAC,aAAa,EAAE,GAAG,EAAE;gBAC7C,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;SACH;IACF,CAAC,CACD,CAAC;AACH,CAAC;AAED,SAAS,QAAQ;IAChB,OAAO,eAAe,CAAC;AACxB,CAAC","sourcesContent":["/*!\n * Copyright 2018 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { StandardCallback, StandardError } from \"@finsemble/finsemble-api/types/types\";\n\nexport { createStore, getStore };\n\nconst defaultValues = [\n\t{\n\t\tfield: \"apps\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"filteredApps\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"activeTags\",\n\t\tvalue: [],\n\t},\n\t{\n\t\tfield: \"activeApp\",\n\t\tvalue: null,\n\t},\n\t{\n\t\tfield: \"searchText\",\n\t\tvalue: \"\",\n\t},\n\t{\n\t\tfield: \"forceSearch\",\n\t\tvalue: false,\n\t},\n];\n\nlet appCatalogStore: StoreModel;\n\nfunction createStore(cb: StandardCallback) {\n\tFSBL.Clients.DistributedStoreClient.getStore(\n\t\t{ store: \"Finsemble-AppLauncher-Store\", global: true },\n\t\t(err: StandardError, store?: StoreModel) => {\n\t\t\tif (store) {\n\t\t\t\tappCatalogStore = store;\n\n\t\t\t\t// set default values before initializing the store with values from storage.\n\t\t\t\tappCatalogStore.setValues(defaultValues, () => {\n\t\t\t\t\tcb(null, appCatalogStore);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t);\n}\n\nfunction getStore() {\n\treturn appCatalogStore;\n}\n"]}
@@ -47,7 +47,7 @@ declare function getInstalledApps(): any;
47
47
  declare function getActiveApp(): string;
48
48
  declare function setActiveApp(app: any): void;
49
49
  declare function filterApps(): void;
50
- declare function setSearchValue(val: any): void;
50
+ declare function setSearchValue(val: set): void;
51
51
  declare function setForceSearch(val: string): void;
52
52
  declare function getSearchValue(): string;
53
53
  declare function getForceSearch(): boolean;
@@ -13,7 +13,7 @@ export const Checkbox = ({ checked = false, disabled = false, label = "", onClic
13
13
  opacity: ".55",
14
14
  };
15
15
  }
16
- return (React.createElement("div", { style: style, className: "complex-menu-checkbox-wrapper", role: "checkbox", "aria-label": label, tabIndex: 0, onClick: disabled ? () => { } : onClick, onKeyDown: (e) => {
16
+ return (React.createElement("div", { style: style, className: "complex-menu-checkbox-wrapper", role: "checkbox", "aria-checked": checked, "aria-label": label, tabIndex: 0, onClick: disabled ? () => { } : onClick, onKeyDown: (e) => {
17
17
  if (e.key === "Enter" || e.key === " ") {
18
18
  !disabled && onClick(e);
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,oBAAoB,CAAC;AAS5B,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,oBAAC,aAAa,IAAC,IAAI,EAAC,OAAO,GAAG,CAAO;QAClF,6BAAK,SAAS,EAAC,6BAA6B,IAAE,KAAK,CAAO,CACrD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\nimport \"./css/checkbox.css\";\n\nexport interface CheckboxProps {\n\tchecked?: boolean;\n\tdisabled?: boolean;\n\tlabel?: string;\n\tonClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n\tchecked = false,\n\tdisabled = false,\n\tlabel = \"\",\n\tonClick = () => {},\n}) => {\n\tlet checkboxClasses = \"complex-menu-checkbox\";\n\tif (checked) {\n\t\tcheckboxClasses = `${checkboxClasses} checked`;\n\t}\n\tlet style = {};\n\tif (disabled) {\n\t\tstyle = {\n\t\t\tcursor: \"default\",\n\t\t\topacity: \".55\",\n\t\t};\n\t}\n\treturn (\n\t\t<div\n\t\t\tstyle={style}\n\t\t\tclassName=\"complex-menu-checkbox-wrapper\"\n\t\t\trole=\"checkbox\"\n\t\t\taria-label={label}\n\t\t\ttabIndex={0}\n\t\t\tonClick={disabled ? () => {} : onClick}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t!disabled && onClick(e);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<div className={checkboxClasses}>{checked && <FinsembleIcon icon=\"check\" />}</div>\n\t\t\t<div className=\"complex-menu-checkbox-label\">{label}</div>\n\t\t</div>\n\t);\n};\n"]}
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,oBAAoB,CAAC;AAS5B,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,kBACD,OAAO,gBACT,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,oBAAC,aAAa,IAAC,IAAI,EAAC,OAAO,GAAG,CAAO;QAClF,6BAAK,SAAS,EAAC,6BAA6B,IAAE,KAAK,CAAO,CACrD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\nimport \"./css/checkbox.css\";\n\nexport interface CheckboxProps {\n\tchecked?: boolean;\n\tdisabled?: boolean;\n\tlabel?: string;\n\tonClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n\tchecked = false,\n\tdisabled = false,\n\tlabel = \"\",\n\tonClick = () => {},\n}) => {\n\tlet checkboxClasses = \"complex-menu-checkbox\";\n\tif (checked) {\n\t\tcheckboxClasses = `${checkboxClasses} checked`;\n\t}\n\tlet style = {};\n\tif (disabled) {\n\t\tstyle = {\n\t\t\tcursor: \"default\",\n\t\t\topacity: \".55\",\n\t\t};\n\t}\n\treturn (\n\t\t<div\n\t\t\tstyle={style}\n\t\t\tclassName=\"complex-menu-checkbox-wrapper\"\n\t\t\trole=\"checkbox\"\n\t\t\taria-checked={checked}\n\t\t\taria-label={label}\n\t\t\ttabIndex={0}\n\t\t\tonClick={disabled ? () => {} : onClick}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t!disabled && onClick(e);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<div className={checkboxClasses}>{checked && <FinsembleIcon icon=\"check\" />}</div>\n\t\t\t<div className=\"complex-menu-checkbox-label\">{label}</div>\n\t\t</div>\n\t);\n};\n"]}
@@ -22,7 +22,9 @@ export const DropZone = ({ processFile, children, suppress = false }) => {
22
22
  });
23
23
  setSingleton(false);
24
24
  }
25
- return suppress ? (React.createElement(React.Fragment, null, children)) : (React.createElement("div", { className: `dropZone ${isDragging ? "isDragging" : potential ? "isPotential" : ""}`, onDragEnter: (e) => {
25
+ const isPotentialStr = potential ? "isPotential" : "";
26
+ const isDraggingStr = isDragging ? "isDragging" : isPotentialStr;
27
+ return suppress ? (React.createElement(React.Fragment, null, children)) : (React.createElement("div", { className: `dropZone ${isDraggingStr}`, onDragEnter: (e) => {
26
28
  preventDefaults(e);
27
29
  setIsDragging(true);
28
30
  }, onDragLeave: (e) => {
@@ -1 +1 @@
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,EAAE,CAAC;IACrB,CAAC,CAAC;IAIF,IAAI,SAAS,EAAE;QAId,IAAI,OAAO,GAA0B,IAAI,CAAC;QAC1C,QAAQ,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;YAC3C,eAAe,CAAC,CAAC,CAAC,CAAC;YACnB,YAAY,CAAC,IAAI,CAAC,CAAC;YAGnB,IAAI,OAAO,KAAK,IAAI,EAAE;gBACrB,YAAY,CAAC,OAAO,CAAC,CAAC;aACtB;YAGD,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBAEzB,YAAY,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,EAAE,GAAG,CAAC,CAAC;QAET,CAAC,CAAC,CAAC;QACH,YAAY,CAAC,KAAK,CAAC,CAAC;KACpB;IAED,OAAO,QAAQ,CAAC,CAAC,CAAC,CACjB,0CAAG,QAAQ,CAAI,CACf,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, { useState } from \"react\";\nimport \"./css/drop-zone.css\";\n\n// Electron adds File.path\nexport type FileWithPath = File & { path?: string };\n\nexport type DropZoneProps = {\n\tchildren: React.ReactNode;\n\tprocessFile: (fileObj: FileWithPath, index: number) => void;\n\tsuppress?: boolean;\n};\n\n/***\n * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for\n * drag-and-drop.\n *\n * The DropZone component is intended to be a container element for other elements, such as text, lists,\n * images, input elements, etc.\n *\n * @callback processFile - This function will be called for each file that is dropped in the dropzone.\n * @param {ReactNode} children - React will fill this in.\n * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div\n */\nexport const DropZone = ({ processFile, children, suppress = false }: DropZoneProps) => {\n\tconst [isDragging, setIsDragging] = useState(false);\n\tconst [potential, setPotential] = useState(false);\n\tconst [singleton, setSingleton] = useState(true);\n\n\tconst preventDefaults = (e: { preventDefault: Function; stopPropagation: Function }) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t};\n\n\t// Check if something is being dragged somewhere on the page\n\t// If dragging is happening on the page, there will be a visual indication for potential drop zone\n\tif (singleton) {\n\t\t// \"dragenter\" and \"dragleave\" events are fired off of every single child element, and counting them isn't reliable\n\t\t// so, when \"dragover\" events are fired, we know dragging is happening.\n\t\t// we will wait 100ms after the last \"dragover\" event is fired, and then turn off the potential zone.\n\t\tlet timeout: NodeJS.Timeout | null = null;\n\t\tdocument.addEventListener(\"dragover\", (e) => {\n\t\t\tpreventDefaults(e);\n\t\t\tsetPotential(true);\n\n\t\t\t// If timeout was previously set, clear it\n\t\t\tif (timeout !== null) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\t// Set a new timeout, now that we've gotten a new dragover event\n\t\t\ttimeout = setTimeout(() => {\n\t\t\t\t// If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.\n\t\t\t\tsetPotential(false);\n\t\t\t}, 100); // 100ms was chosen by trial and error.\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\n\t\t});\n\t\tsetSingleton(false);\n\t}\n\n\treturn suppress ? (\n\t\t<>{children}</>\n\t) : (\n\t\t<div\n\t\t\tclassName={`dropZone ${isDragging ? \"isDragging\" : potential ? \"isPotential\" : \"\"}`}\n\t\t\tonDragEnter={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(true);\n\t\t\t}}\n\t\t\tonDragLeave={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(false);\n\t\t\t}}\n\t\t\tonDrop={(e) => {\n\t\t\t\tsetIsDragging(false);\n\n\t\t\t\tconst { files } = e.dataTransfer;\n\t\t\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\t\t\tif (files[i] === null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tprocessFile(files[i], i);\n\t\t\t\t}\n\n\t\t\t\tpreventDefaults(e);\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\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,EAAE,CAAC;IACrB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M,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, { useState } from \"react\";\nimport \"./css/drop-zone.css\";\n\n// Electron adds File.path\nexport type FileWithPath = File & { path?: string };\n\nexport type DropZoneProps = {\n\tchildren: React.ReactNode;\n\tprocessFile: (fileObj: FileWithPath, index: number) => void;\n\tsuppress?: boolean;\n};\n\n/***\n * Component that serves as a drop zone. It also keeps track of visual concerns and event handlers for\n * drag-and-drop.\n *\n * The DropZone component is intended to be a container element for other elements, such as text, lists,\n * images, input elements, etc.\n *\n * @callback processFile - This function will be called for each file that is dropped in the dropzone.\n * @param {ReactNode} children - React will fill this in.\n * @param {boolean} suppress=false - If the dropzone-ness should be suppressed, which would turn this container into just a div\n */\nexport const DropZone = ({ processFile, children, suppress = false }: DropZoneProps) => {\n\tconst [isDragging, setIsDragging] = useState(false);\n\tconst [potential, setPotential] = useState(false);\n\tconst [singleton, setSingleton] = useState(true);\n\n\tconst preventDefaults = (e: { preventDefault: Function; stopPropagation: Function }) => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t};\n\n\t// Check if something is being dragged somewhere on the page\n\t// If dragging is happening on the page, there will be a visual indication for potential drop zone\n\tif (singleton) {\n\t\t// \"dragenter\" and \"dragleave\" events are fired off of every single child element, and counting them isn't reliable\n\t\t// so, when \"dragover\" events are fired, we know dragging is happening.\n\t\t// we will wait 100ms after the last \"dragover\" event is fired, and then turn off the potential zone.\n\t\tlet timeout: NodeJS.Timeout | null = null;\n\t\tdocument.addEventListener(\"dragover\", (e) => {\n\t\t\tpreventDefaults(e);\n\t\t\tsetPotential(true);\n\n\t\t\t// If timeout was previously set, clear it\n\t\t\tif (timeout !== null) {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t}\n\n\t\t\t// Set a new timeout, now that we've gotten a new dragover event\n\t\t\ttimeout = setTimeout(() => {\n\t\t\t\t// If it's been 100ms and no dragover event has been fired, assume the user isn't dragging anymore.\n\t\t\t\tsetPotential(false);\n\t\t\t}, 100); // 100ms was chosen by trial and error.\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\n\t\t});\n\t\tsetSingleton(false);\n\t}\n\n\tconst isPotentialStr = potential ? \"isPotential\" : \"\";\n\tconst isDraggingStr = isDragging ? \"isDragging\" : isPotentialStr;\n\n\treturn suppress ? (\n\t\t<>{children}</>\n\t) : (\n\t\t<div\n\t\t\tclassName={`dropZone ${isDraggingStr}`}\n\t\t\tonDragEnter={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(true);\n\t\t\t}}\n\t\t\tonDragLeave={(e) => {\n\t\t\t\tpreventDefaults(e);\n\t\t\t\tsetIsDragging(false);\n\t\t\t}}\n\t\t\tonDrop={(e) => {\n\t\t\t\tsetIsDragging(false);\n\n\t\t\t\tconst { files } = e.dataTransfer;\n\t\t\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\t\t\tif (files[i] === null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tprocessFile(files[i], i);\n\t\t\t\t}\n\n\t\t\t\tpreventDefaults(e);\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"]}
@@ -18,5 +18,6 @@ export declare type FileInputProps = {
18
18
  presetFile?: null | File;
19
19
  suppressDropzone?: boolean;
20
20
  disabled?: boolean;
21
+ allowClearing?: boolean;
21
22
  };
22
- export declare const FileInput: ({ acceptTypes, value, onSetValue, id, shouldUpload, uploadFunction, presetFile, suppressDropzone, disabled, }: FileInputProps) => JSX.Element;
23
+ export declare const FileInput: ({ acceptTypes, value, onSetValue, id, shouldUpload, uploadFunction, presetFile, suppressDropzone, disabled, allowClearing, }: FileInputProps) => JSX.Element;
@@ -17,7 +17,7 @@ const INVALID_FILE_TYPE_ERROR = {
17
17
  const defaultUploadFunction = async () => {
18
18
  return { err: null, path: "" };
19
19
  };
20
- export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = true, uploadFunction = defaultUploadFunction, presetFile = null, suppressDropzone = false, disabled = false, }) => {
20
+ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = true, uploadFunction = defaultUploadFunction, presetFile = null, suppressDropzone = false, disabled = false, allowClearing = true, }) => {
21
21
  const dispatch = useDispatch();
22
22
  const fileInputElement = useRef({});
23
23
  const [isUploading, setIsUploading] = useState(false);
@@ -96,7 +96,7 @@ export const FileInput = ({ acceptTypes, value, onSetValue, id, shouldUpload = t
96
96
  } })),
97
97
  React.createElement("div", { className: "file-input-value" },
98
98
  React.createElement("span", Object.assign({ className: `file-input-value-input ${isInvalid && "invalid"}` }, { id }), path),
99
- path !== "" && (React.createElement(ButtonIcon, { text: "Cancel", icon: "times", onClick: () => {
99
+ allowClearing && path !== "" && (React.createElement(ButtonIcon, { text: "Cancel", icon: "times", onClick: () => {
100
100
  setPath("");
101
101
  onSetValue === null || onSetValue === void 0 ? void 0 : onSetValue("");
102
102
  } })),
@@ -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,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OA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AC,iBACA,MAAM,GACjB;gBACF,oBAAC,MAAM,IACN,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,aAAa,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE;wBACb,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;oBAClC,CAAC,GACA,CACG;YACN,6BAAK,SAAS,EAAC,kBAAkB;gBAChC,4CAAM,SAAS,EAAE,0BAA0B,SAAS,IAAI,SAAS,EAAE,IAAM,EAAE,EAAE,EAAE,GAC7E,IAAI,CACC;gBACN,IAAI,KAAK,EAAE,IAAI,CACf,oBAAC,UAAU,IACV,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,GAAG,EAAE;wBACb,OAAO,CAAC,EAAE,CAAC,CAAC;wBACZ,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,EAAE,CAAC,CAAC;oBAClB,CAAC,GACA,CACF;gBACA,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":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useRef, useEffect } from \"react\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { useDispatch } from \"../../store\";\nimport { ProjectError } from \"../../types/smartDesktopDesignerTypes\";\n\nimport { Button } from \"./Button\";\nimport { ButtonIcon } from \"./ButtonIcon\";\nimport \"./css/file-input.css\";\n\nimport { DropZone, FileWithPath } from \"./DropZone\";\nimport { validateFilename } from \"./file_helpers\";\n\nexport type FileInputUploadCb = (\n\tfileObject: File,\n\tcb?: (progress: number) => void\n) => Promise<{ err: string | null; path: string }>;\n\nexport type FileInputProps = {\n\tacceptTypes: string[];\n\tvalue: string;\n\tid?: string;\n\tshouldUpload?: boolean;\n\tonSetValue?: (value: string) => void;\n\tuploadFunction?: FileInputUploadCb;\n\tpresetFile?: null | File;\n\tsuppressDropzone?: boolean;\n\tdisabled?: boolean;\n};\n\nconst INVALID_FILE_TYPE_ERROR: ProjectError = {\n\tviewId: \"themes\",\n\tmessage: \"Your uploaded file is not in the correct format\",\n};\n\nconst defaultUploadFunction = async () => {\n\treturn { err: null, path: \"\" };\n};\n\n/**\n * A Browse button with a hidden file input to allow for a file select dialog and extraction of a path\n *\n * @param {FileInputProps} { acceptTypes, value, onSetValue, shouldUpload=true, uploadFunction = defaultUploadFunction}\n * @return {*}\n */\nexport const FileInput = ({\n\tacceptTypes,\n\tvalue,\n\tonSetValue,\n\tid,\n\tshouldUpload = true,\n\tuploadFunction = defaultUploadFunction,\n\tpresetFile = null,\n\tsuppressDropzone = false,\n\tdisabled = false,\n}: FileInputProps) => {\n\tconst dispatch = useDispatch();\n\tconst fileInputElement = useRef({} as HTMLInputElement);\n\tconst [isUploading, setIsUploading] = useState(false);\n\tconst [uploadProgress, setUploadProgress] = useState(0);\n\tconst [fileInput, setFileInput] = useState({} as HTMLInputElement); // cast to correct type so typescript doesn't complain\n\tconst [path, setPath] = useState(value || \"\");\n\tconst [errorMessage, setErrorMessage] = useState(null as string | null);\n\tconst [handedFile, setHandedFile] = useState<FileWithPath | null>(presetFile);\n\n\tconst isInvalid = validateFilename(acceptTypes, path);\n\n\tconst uploadSuccess = ({ err, path: successPath }: { err: string | null; path: string }) => {\n\t\tif (err) {\n\t\t\tdispatch(SmartDesktopDesignerActions.set_project_error(INVALID_FILE_TYPE_ERROR));\n\n\t\t\tsetErrorMessage(err);\n\t\t\tsetPath(\"\");\n\t\t} else {\n\t\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));\n\t\t\tsetErrorMessage(null);\n\t\t\tsetPath(successPath);\n\n\t\t\tonSetValue?.(successPath);\n\n\t\t\tfileInput.value = \"\";\n\t\t}\n\t};\n\n\tconst uploadError = (err: string) => {\n\t\tsetErrorMessage(err);\n\t};\n\n\tconst uploadFile = (fileObj: FileWithPath | undefined) => {\n\t\t// If it's not a file, we can't do anything with it\n\t\tif (!(fileObj instanceof File)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsUploading(true);\n\t\tuploadFunction?.(fileObj, (progress: number) => {\n\t\t\tsetUploadProgress(progress);\n\t\t})\n\t\t\t.then(uploadSuccess)\n\t\t\t.catch(uploadError)\n\t\t\t.finally(() => {\n\t\t\t\tsetIsUploading(false);\n\t\t\t\tsetUploadProgress(0);\n\t\t\t});\n\t};\n\n\tconst processFile = (fileObj: FileWithPath) => {\n\t\tif (shouldUpload) {\n\t\t\tuploadFile(fileObj);\n\t\t} else if (fileObj?.path) {\n\t\t\t// If the consumer doesn't want the file actually uploaded, just return the file name\n\t\t\tuploadSuccess({\n\t\t\t\terr: null,\n\t\t\t\tpath: fileObj.path,\n\t\t\t});\n\t\t}\n\t\tsetIsUploading(false);\n\t\tsetUploadProgress(0);\n\t\tsetErrorMessage(null);\n\t};\n\n\tuseEffect(() => {\n\t\tsetPath(value || \"\");\n\t}, [value]);\n\n\tconst onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst fileObj = e.target.files?.[0] as FileWithPath | undefined;\n\n\t\tif (fileObj !== undefined) {\n\t\t\tprocessFile(fileObj);\n\t\t}\n\n\t\tsetFileInput(e.target);\n\t};\n\n\t// Check if props updated\n\tif (handedFile !== presetFile) {\n\t\tsetHandedFile(presetFile);\n\t\tif (presetFile !== null) {\n\t\t\tuploadFile(presetFile);\n\t\t}\n\t}\n\n\treturn (\n\t\t<DropZone processFile={processFile} suppress={suppressDropzone}>\n\t\t\t<div className=\"file-input-container\">\n\t\t\t\t<div className=\"file-input-actions\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={fileInputElement}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tonChange={onFileChange}\n\t\t\t\t\t\taccept={acceptTypes.join(\", \")}\n\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tfashion=\"primary\"\n\t\t\t\t\t\ttext=\"Select file\"\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tfileInputElement.current.click();\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-value\">\n\t\t\t\t\t<span className={`file-input-value-input ${isInvalid && \"invalid\"}`} {...{ id }}>\n\t\t\t\t\t\t{path}\n\t\t\t\t\t</span>\n\t\t\t\t\t{path !== \"\" && (\n\t\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\t\ttext=\"Cancel\"\n\t\t\t\t\t\t\ticon=\"times\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetPath(\"\");\n\t\t\t\t\t\t\t\tonSetValue?.(\"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{errorMessage && <div className=\"file-input-error\">{errorMessage}</div>}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-status\">\n\t\t\t\t\t{isUploading ? (\n\t\t\t\t\t\t<div className=\"file-input-progress-container\">{uploadProgress}% uploaded</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t!errorMessage && <></>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</DropZone>\n\t);\n};\n"]}
1
+ {"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/components/common/FileInput.tsx"],"names":[],"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AC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useRef, useEffect } from \"react\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { useDispatch } from \"../../store\";\nimport { ProjectError } from \"../../types/smartDesktopDesignerTypes\";\n\nimport { Button } from \"./Button\";\nimport { ButtonIcon } from \"./ButtonIcon\";\nimport \"./css/file-input.css\";\n\nimport { DropZone, FileWithPath } from \"./DropZone\";\nimport { validateFilename } from \"./file_helpers\";\n\nexport type FileInputUploadCb = (\n\tfileObject: File,\n\tcb?: (progress: number) => void\n) => Promise<{ err: string | null; path: string }>;\n\nexport type FileInputProps = {\n\tacceptTypes: string[];\n\tvalue: string;\n\tid?: string;\n\tshouldUpload?: boolean;\n\tonSetValue?: (value: string) => void;\n\tuploadFunction?: FileInputUploadCb;\n\tpresetFile?: null | File;\n\tsuppressDropzone?: boolean;\n\tdisabled?: boolean;\n\tallowClearing?: boolean;\n};\n\nconst INVALID_FILE_TYPE_ERROR: ProjectError = {\n\tviewId: \"themes\",\n\tmessage: \"Your uploaded file is not in the correct format\",\n};\n\nconst defaultUploadFunction = async () => {\n\treturn { err: null, path: \"\" };\n};\n\n/**\n * A Browse button with a hidden file input to allow for a file select dialog and extraction of a path\n *\n * @param {FileInputProps} { acceptTypes, value, onSetValue, shouldUpload=true, uploadFunction = defaultUploadFunction}\n * @return {*}\n */\nexport const FileInput = ({\n\tacceptTypes,\n\tvalue,\n\tonSetValue,\n\tid,\n\tshouldUpload = true,\n\tuploadFunction = defaultUploadFunction,\n\tpresetFile = null,\n\tsuppressDropzone = false,\n\tdisabled = false,\n\tallowClearing = true,\n}: FileInputProps) => {\n\tconst dispatch = useDispatch();\n\tconst fileInputElement = useRef({} as HTMLInputElement);\n\tconst [isUploading, setIsUploading] = useState(false);\n\tconst [uploadProgress, setUploadProgress] = useState(0);\n\tconst [fileInput, setFileInput] = useState({} as HTMLInputElement); // cast to correct type so typescript doesn't complain\n\tconst [path, setPath] = useState(value || \"\");\n\tconst [errorMessage, setErrorMessage] = useState(null as string | null);\n\tconst [handedFile, setHandedFile] = useState<FileWithPath | null>(presetFile);\n\n\tconst isInvalid = validateFilename(acceptTypes, path);\n\n\tconst uploadSuccess = ({ err, path: successPath }: { err: string | null; path: string }) => {\n\t\tif (err) {\n\t\t\tdispatch(SmartDesktopDesignerActions.set_project_error(INVALID_FILE_TYPE_ERROR));\n\n\t\t\tsetErrorMessage(err);\n\t\t\tsetPath(\"\");\n\t\t} else {\n\t\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(INVALID_FILE_TYPE_ERROR));\n\t\t\tsetErrorMessage(null);\n\t\t\tsetPath(successPath);\n\n\t\t\tonSetValue?.(successPath);\n\n\t\t\tfileInput.value = \"\";\n\t\t}\n\t};\n\n\tconst uploadError = (err: string) => {\n\t\tsetErrorMessage(err);\n\t};\n\n\tconst uploadFile = (fileObj: FileWithPath | undefined) => {\n\t\t// If it's not a file, we can't do anything with it\n\t\tif (!(fileObj instanceof File)) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsUploading(true);\n\t\tuploadFunction?.(fileObj, (progress: number) => {\n\t\t\tsetUploadProgress(progress);\n\t\t})\n\t\t\t.then(uploadSuccess)\n\t\t\t.catch(uploadError)\n\t\t\t.finally(() => {\n\t\t\t\tsetIsUploading(false);\n\t\t\t\tsetUploadProgress(0);\n\t\t\t});\n\t};\n\n\tconst processFile = (fileObj: FileWithPath) => {\n\t\tif (shouldUpload) {\n\t\t\tuploadFile(fileObj);\n\t\t} else if (fileObj?.path) {\n\t\t\t// If the consumer doesn't want the file actually uploaded, just return the file name\n\t\t\tuploadSuccess({\n\t\t\t\terr: null,\n\t\t\t\tpath: fileObj.path,\n\t\t\t});\n\t\t}\n\t\tsetIsUploading(false);\n\t\tsetUploadProgress(0);\n\t\tsetErrorMessage(null);\n\t};\n\n\tuseEffect(() => {\n\t\tsetPath(value || \"\");\n\t}, [value]);\n\n\tconst onFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n\t\tconst fileObj = e.target.files?.[0] as FileWithPath | undefined;\n\n\t\tif (fileObj !== undefined) {\n\t\t\tprocessFile(fileObj);\n\t\t}\n\n\t\tsetFileInput(e.target);\n\t};\n\n\t// Check if props updated\n\tif (handedFile !== presetFile) {\n\t\tsetHandedFile(presetFile);\n\t\tif (presetFile !== null) {\n\t\t\tuploadFile(presetFile);\n\t\t}\n\t}\n\n\treturn (\n\t\t<DropZone processFile={processFile} suppress={suppressDropzone}>\n\t\t\t<div className=\"file-input-container\">\n\t\t\t\t<div className=\"file-input-actions\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={fileInputElement}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\tonChange={onFileChange}\n\t\t\t\t\t\taccept={acceptTypes.join(\", \")}\n\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tfashion=\"primary\"\n\t\t\t\t\t\ttext=\"Select file\"\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tfileInputElement.current.click();\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-value\">\n\t\t\t\t\t<span className={`file-input-value-input ${isInvalid && \"invalid\"}`} {...{ id }}>\n\t\t\t\t\t\t{path}\n\t\t\t\t\t</span>\n\t\t\t\t\t{allowClearing && path !== \"\" && (\n\t\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\t\ttext=\"Cancel\"\n\t\t\t\t\t\t\ticon=\"times\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tsetPath(\"\");\n\t\t\t\t\t\t\t\tonSetValue?.(\"\");\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{errorMessage && <div className=\"file-input-error\">{errorMessage}</div>}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"file-input-status\">\n\t\t\t\t\t{isUploading ? (\n\t\t\t\t\t\t<div className=\"file-input-progress-container\">{uploadProgress}% uploaded</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t!errorMessage && <></>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</DropZone>\n\t);\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import "./css/icon.css";
3
- export declare type FinsembleIconType = "alwaysOnTop" | "caret" | "check-square" | "check" | "chevron-left" | "chevron-right" | "close" | "copy" | "documentation" | "exclamation-circle" | "external-link" | "flag" | "folder" | "font" | "globe" | "hdd" | "key" | "life-ring" | "linker" | "lock" | "magic" | "maximize" | "minimize" | "moon" | "paint-roller" | "pencil" | "plus" | "question-circle" | "search" | "sun" | "times" | "toggle-off" | "toggle-on" | "toolbar" | "tools" | "trash" | "upload" | "window";
3
+ export declare type FinsembleIconType = "alwaysOnTop" | "caret" | "check-square" | "check" | "chevron-left" | "chevron-right" | "close" | "code-block" | "copy" | "documentation" | "exclamation-circle" | "external-link" | "flag" | "folder" | "font" | "globe" | "hdd" | "key" | "life-ring" | "linker" | "lock" | "magic" | "maximize" | "minimize" | "moon" | "paint-roller" | "pencil" | "plus" | "question-circle" | "search" | "sun" | "times" | "toggle-off" | "toggle-on" | "toolbar" | "tools" | "trash" | "upload" | "window";
4
4
  export declare type FinsembleIconProps = {
5
5
  icon: FinsembleIconType;
6
6
  className?: string;
@@ -7,6 +7,7 @@ import { ReactComponent as CheckSquare } from "../../assets/icons/check-square.s
7
7
  import { ReactComponent as ChevronLeftIcon } from "../../assets/icons/chevron-left.svg";
8
8
  import { ReactComponent as ChevronRightIcon } from "../../assets/icons/chevron-right.svg";
9
9
  import { ReactComponent as CloseIcon } from "../../assets/icons/close.svg";
10
+ import { ReactComponent as CodeBlockIcon } from "../../assets/icons/code-block.svg";
10
11
  import { ReactComponent as CopyIcon } from "../../assets/icons/copy.svg";
11
12
  import { ReactComponent as DocumentationIcon } from "../../assets/icons/documentation.svg";
12
13
  import { ReactComponent as ExclaimationCircleIcon } from "../../assets/icons/exclamation-circle.svg";
@@ -46,6 +47,7 @@ const icons = {
46
47
  "chevron-left": ChevronLeftIcon,
47
48
  "chevron-right": ChevronRightIcon,
48
49
  close: CloseIcon,
50
+ "code-block": CodeBlockIcon,
49
51
  copy: CopyIcon,
50
52
  documentation: DocumentationIcon,
51
53
  "exclamation-circle": ExclaimationCircleIcon,