@finsemble/finsemble-ui 6.5.2 → 6.6.0-beta.3

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 (555) hide show
  1. package/index.d.ts +1 -0
  2. package/package.json +18 -15
  3. package/react/actions/smartDesktopDesignerActions.d.ts +3 -3
  4. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  5. package/react/assets/css/finsemble.css +0 -1
  6. package/react/assets/css/toolbar.css +0 -4
  7. package/react/assets/css/userPreferences.css +39 -4
  8. package/react/componentTemplateGenerator.js +1 -1
  9. package/react/componentTemplateGenerator.js.map +1 -1
  10. package/react/components/appCatalog/AppCatalogComponent.d.ts +1 -1
  11. package/react/components/appCatalog/components/Showcase/ImageCarousel.d.ts +3 -3
  12. package/react/components/appCatalog/components/Showcase/SupportNotes.d.ts +1 -1
  13. package/react/components/appCatalog/stores/storeActions.d.ts +1 -1
  14. package/react/components/common/DropdownButton.js.map +1 -1
  15. package/react/components/common/FileInput.d.ts +2 -1
  16. package/react/components/common/FileInput.js +2 -2
  17. package/react/components/common/FileInput.js.map +1 -1
  18. package/react/components/common/FinsembleToggle.d.ts +3 -1
  19. package/react/components/common/FinsembleToggle.js +12 -4
  20. package/react/components/common/FinsembleToggle.js.map +1 -1
  21. package/react/components/common/ImagePreview.js +1 -1
  22. package/react/components/common/ImagePreview.js.map +1 -1
  23. package/react/components/common/TimeSelect.d.ts +16 -0
  24. package/react/components/common/TimeSelect.js +143 -0
  25. package/react/components/common/TimeSelect.js.map +1 -0
  26. package/react/components/common/css/accordion.css +3 -5
  27. package/react/components/common/css/application-edit-page.css +4 -1
  28. package/react/components/common/css/time-select.css +8 -0
  29. package/react/components/common/css/toggle.css +39 -3
  30. package/react/components/common/helpers.js +1 -0
  31. package/react/components/common/helpers.js.map +1 -1
  32. package/react/components/common/stories/FileInput.stories.d.ts +2 -1
  33. package/react/components/common/stories/FileInput.stories.js +6 -0
  34. package/react/components/common/stories/FileInput.stories.js.map +1 -1
  35. package/react/components/common/stories/FinsembleToggle.stories.d.ts +3 -1
  36. package/react/components/common/stories/FinsembleToggle.stories.js +12 -0
  37. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  38. package/react/components/common/stories/TimeSelect.stories.d.ts +11 -0
  39. package/react/components/common/stories/TimeSelect.stories.js +20 -0
  40. package/react/components/common/stories/TimeSelect.stories.js.map +1 -0
  41. package/react/components/common/tests/Accordion.spec.js +1 -1
  42. package/react/components/common/tests/Accordion.spec.js.map +1 -1
  43. package/react/components/common/tests/FileInput.spec.js +8 -1
  44. package/react/components/common/tests/FileInput.spec.js.map +1 -1
  45. package/react/components/common/tests/FinsembleSelect.spec.js +1 -1
  46. package/react/components/common/tests/FinsembleSelect.spec.js.map +1 -1
  47. package/react/components/common/tests/FinsembleToggle.spec.js +8 -3
  48. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  49. package/react/components/{smartDesktopDesigner/tests/AppEditPage.spec.d.ts → common/tests/TimeSelect.spec.d.ts} +0 -0
  50. package/react/components/common/tests/TimeSelect.spec.js +71 -0
  51. package/react/components/common/tests/TimeSelect.spec.js.map +1 -0
  52. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  53. package/react/components/favorites/FavoritesShell.spec.js +1 -1
  54. package/react/components/favorites/FavoritesShell.spec.js.map +1 -1
  55. package/react/components/fdc3Resolver/ResolverDialog.spec.js +1 -1
  56. package/react/components/fdc3Resolver/ResolverDialog.spec.js.map +1 -1
  57. package/react/components/icon/Icon.d.ts +4 -3
  58. package/react/components/icon/Icon.js +22 -12
  59. package/react/components/icon/Icon.js.map +1 -1
  60. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js +1 -1
  61. package/react/components/legacyControls/tests/FinsembleDialogTextInput.spec.js.map +1 -1
  62. package/react/components/linker/LinkerMenu.js.map +1 -1
  63. package/react/components/menu/MenuPortal.js +1 -1
  64. package/react/components/menu/MenuPortal.js.map +1 -1
  65. package/react/components/processMonitor/ProcessMonitorTypes.d.ts +4 -11
  66. package/react/components/processMonitor/ProcessMonitorTypes.js.map +1 -1
  67. package/react/components/processMonitor/components/ChildWindow.js +5 -10
  68. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  69. package/react/components/processMonitor/components/ProcessStatistics.js +8 -10
  70. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  71. package/react/components/processMonitor/constants.d.ts +0 -2
  72. package/react/components/processMonitor/constants.js +0 -2
  73. package/react/components/processMonitor/constants.js.map +1 -1
  74. package/react/components/processMonitor/helpers.d.ts +0 -11
  75. package/react/components/processMonitor/helpers.js +1 -9
  76. package/react/components/processMonitor/helpers.js.map +1 -1
  77. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +3 -11
  78. package/react/components/processMonitor/stores/ProcessMonitorStore.js +22 -62
  79. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  80. package/react/components/{smartDesktopDesigner → sdd}/AddApp.d.ts +0 -0
  81. package/react/components/{smartDesktopDesigner → sdd}/AddApp.js +0 -0
  82. package/react/components/sdd/AddApp.js.map +1 -0
  83. package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.d.ts +0 -0
  84. package/react/components/{smartDesktopDesigner → sdd}/AppEditAccess.js +0 -0
  85. package/react/components/sdd/AppEditAccess.js.map +1 -0
  86. package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.d.ts +0 -0
  87. package/react/components/{smartDesktopDesigner → sdd}/AppEditPage.js +7 -1
  88. package/react/components/sdd/AppEditPage.js.map +1 -0
  89. package/react/components/{smartDesktopDesigner → sdd}/Appearance.css +0 -0
  90. package/react/components/{smartDesktopDesigner → sdd}/Appearance.d.ts +0 -0
  91. package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.d.ts +0 -0
  92. package/react/components/{smartDesktopDesigner → sdd}/Appearance.helpers.js +0 -0
  93. package/react/components/sdd/Appearance.helpers.js.map +1 -0
  94. package/react/components/{smartDesktopDesigner → sdd}/Appearance.js +0 -0
  95. package/react/components/sdd/Appearance.js.map +1 -0
  96. package/react/components/{smartDesktopDesigner → sdd}/Application.d.ts +1 -2
  97. package/react/components/{smartDesktopDesigner → sdd}/Application.js +37 -39
  98. package/react/components/sdd/Application.js.map +1 -0
  99. package/react/components/{smartDesktopDesigner → sdd}/Applications.d.ts +0 -0
  100. package/react/components/{smartDesktopDesigner → sdd}/Applications.js +2 -2
  101. package/react/components/sdd/Applications.js.map +1 -0
  102. package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.css +0 -0
  103. package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.d.ts +0 -0
  104. package/react/components/{smartDesktopDesigner → sdd}/AssetsPage.js +0 -0
  105. package/react/components/sdd/AssetsPage.js.map +1 -0
  106. package/react/components/{smartDesktopDesigner → sdd}/Authentication.d.ts +0 -0
  107. package/react/components/{smartDesktopDesigner → sdd}/Authentication.js +1 -1
  108. package/react/components/sdd/Authentication.js.map +1 -0
  109. package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.d.ts +0 -0
  110. package/react/components/{smartDesktopDesigner → sdd}/AuthenticationProviderConfig.js +0 -0
  111. package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -0
  112. package/react/components/{smartDesktopDesigner → sdd}/Content.d.ts +0 -0
  113. package/react/components/{smartDesktopDesigner → sdd}/Content.js +0 -0
  114. package/react/components/sdd/Content.js.map +1 -0
  115. package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.d.ts +0 -0
  116. package/react/components/{smartDesktopDesigner → sdd}/ContentHeader.js +0 -0
  117. package/react/components/sdd/ContentHeader.js.map +1 -0
  118. package/react/components/{smartDesktopDesigner → sdd}/CurrentView.d.ts +0 -0
  119. package/react/components/{smartDesktopDesigner → sdd}/CurrentView.js +0 -0
  120. package/react/components/sdd/CurrentView.js.map +1 -0
  121. package/react/components/{smartDesktopDesigner → sdd}/EditPreload.d.ts +5 -7
  122. package/react/components/sdd/EditPreload.js +156 -0
  123. package/react/components/sdd/EditPreload.js.map +1 -0
  124. package/react/components/{smartDesktopDesigner → sdd}/Export.d.ts +0 -0
  125. package/react/components/{smartDesktopDesigner → sdd}/Export.js +0 -0
  126. package/react/components/sdd/Export.js.map +1 -0
  127. package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.d.ts +0 -0
  128. package/react/components/{smartDesktopDesigner → sdd}/ExportCloud.js +0 -0
  129. package/react/components/sdd/ExportCloud.js.map +1 -0
  130. package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.d.ts +0 -0
  131. package/react/components/{smartDesktopDesigner → sdd}/ExportDeployInfo.js +0 -0
  132. package/react/components/sdd/ExportDeployInfo.js.map +1 -0
  133. package/react/components/{smartDesktopDesigner → sdd}/ExportZip.d.ts +0 -0
  134. package/react/components/{smartDesktopDesigner → sdd}/ExportZip.js +0 -0
  135. package/react/components/sdd/ExportZip.js.map +1 -0
  136. package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.d.ts +0 -0
  137. package/react/components/{smartDesktopDesigner → sdd}/GettingStarted.js +0 -0
  138. package/react/components/sdd/GettingStarted.js.map +1 -0
  139. package/react/components/{smartDesktopDesigner → sdd}/ItemList.d.ts +0 -0
  140. package/react/components/{smartDesktopDesigner → sdd}/ItemList.js +0 -0
  141. package/react/components/sdd/ItemList.js.map +1 -0
  142. package/react/components/{smartDesktopDesigner → sdd}/Navigation.d.ts +0 -0
  143. package/react/components/{smartDesktopDesigner → sdd}/Navigation.js +0 -0
  144. package/react/components/sdd/Navigation.js.map +1 -0
  145. package/react/components/{smartDesktopDesigner → sdd}/OptionalSettingsView.d.ts +1 -3
  146. package/react/components/sdd/OptionalSettingsView.js +56 -0
  147. package/react/components/sdd/OptionalSettingsView.js.map +1 -0
  148. package/react/components/sdd/Preloads.d.ts +6 -0
  149. package/react/components/sdd/Preloads.js +24 -0
  150. package/react/components/sdd/Preloads.js.map +1 -0
  151. package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.d.ts +0 -0
  152. package/react/components/{smartDesktopDesigner → sdd}/ProjectErrors.js +0 -0
  153. package/react/components/sdd/ProjectErrors.js.map +1 -0
  154. package/react/components/{smartDesktopDesigner → sdd}/Publish.d.ts +0 -0
  155. package/react/components/{smartDesktopDesigner → sdd}/Publish.js +0 -0
  156. package/react/components/sdd/Publish.js.map +1 -0
  157. package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.d.ts +0 -0
  158. package/react/components/{smartDesktopDesigner → sdd}/PublishProgress.js +0 -0
  159. package/react/components/sdd/PublishProgress.js.map +1 -0
  160. package/react/components/sdd/SmartDesktopDesigner.d.ts +29 -0
  161. package/react/components/sdd/SmartDesktopDesigner.js +122 -0
  162. package/react/components/sdd/SmartDesktopDesigner.js.map +1 -0
  163. package/react/components/{smartDesktopDesigner → sdd}/ThemePage.css +0 -0
  164. package/react/components/{smartDesktopDesigner → sdd}/ThemePage.d.ts +0 -0
  165. package/react/components/{smartDesktopDesigner → sdd}/ThemePage.js +0 -0
  166. package/react/components/sdd/ThemePage.js.map +1 -0
  167. package/react/components/{smartDesktopDesigner → sdd}/Themes.d.ts +0 -0
  168. package/react/components/{smartDesktopDesigner → sdd}/Themes.js +0 -0
  169. package/react/components/sdd/Themes.js.map +1 -0
  170. package/react/components/{smartDesktopDesigner → sdd}/Toolbar.d.ts +0 -0
  171. package/react/components/{smartDesktopDesigner → sdd}/Toolbar.js +9 -7
  172. package/react/components/sdd/Toolbar.js.map +1 -0
  173. package/react/components/{smartDesktopDesigner → sdd}/View.d.ts +0 -0
  174. package/react/components/{smartDesktopDesigner → sdd}/View.js +0 -0
  175. package/react/components/sdd/View.js.map +1 -0
  176. package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.d.ts +0 -0
  177. package/react/components/{smartDesktopDesigner → sdd}/common/fsbl_functions.js +0 -0
  178. package/react/components/sdd/common/fsbl_functions.js.map +1 -0
  179. package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.d.ts +0 -0
  180. package/react/components/{smartDesktopDesigner → sdd}/common/getCSSVars.js +0 -0
  181. package/react/components/sdd/common/getCSSVars.js.map +1 -0
  182. package/react/components/sdd/common/setPreloadDefaults.d.ts +1 -0
  183. package/react/components/sdd/common/setPreloadDefaults.js +21 -0
  184. package/react/components/sdd/common/setPreloadDefaults.js.map +1 -0
  185. package/react/components/{smartDesktopDesigner/fixtures → sdd/common}/views.d.ts +0 -0
  186. package/react/components/sdd/common/views.js +202 -0
  187. package/react/components/sdd/common/views.js.map +1 -0
  188. package/react/components/{smartDesktopDesigner → sdd}/css/appearance.css +0 -0
  189. package/react/components/{smartDesktopDesigner → sdd}/css/applications.css +0 -0
  190. package/react/components/{smartDesktopDesigner → sdd}/css/authentication.css +5 -1
  191. package/react/components/{smartDesktopDesigner → sdd}/css/buttons.css +0 -0
  192. package/react/components/{smartDesktopDesigner → sdd}/css/export.css +0 -0
  193. package/react/components/{smartDesktopDesigner → sdd}/css/getting-started.css +0 -0
  194. package/react/components/{smartDesktopDesigner → sdd}/css/nav.css +0 -0
  195. package/react/components/{smartDesktopDesigner → sdd}/css/project-errors.css +0 -0
  196. package/react/components/{smartDesktopDesigner → sdd}/css/project-header.css +0 -0
  197. package/react/components/{smartDesktopDesigner → sdd}/css/styles.css +0 -0
  198. package/react/components/{smartDesktopDesigner → sdd}/css/views.css +0 -1
  199. package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.d.ts +0 -0
  200. package/react/components/{smartDesktopDesigner → sdd}/fixtures/apps.js +10 -10
  201. package/react/components/sdd/fixtures/apps.js.map +1 -0
  202. package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.d.ts +0 -0
  203. package/react/components/{smartDesktopDesigner → sdd}/fixtures/authenticationProps.js +0 -0
  204. package/react/components/sdd/fixtures/authenticationProps.js.map +1 -0
  205. package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.d.ts +1 -1
  206. package/react/components/{smartDesktopDesigner → sdd}/fixtures/configTemplate.js +1 -1
  207. package/react/components/sdd/fixtures/configTemplate.js.map +1 -0
  208. package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.d.ts +0 -0
  209. package/react/components/{smartDesktopDesigner → sdd}/fixtures/exportProps.js +0 -0
  210. package/react/components/sdd/fixtures/exportProps.js.map +1 -0
  211. package/react/components/sdd/fixtures/preloads.d.ts +3 -0
  212. package/react/components/sdd/fixtures/preloads.js +57 -0
  213. package/react/components/sdd/fixtures/preloads.js.map +1 -0
  214. package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.d.ts +0 -0
  215. package/react/components/{smartDesktopDesigner → sdd}/fixtures/projectErrorsProps.js +0 -0
  216. package/react/components/sdd/fixtures/projectErrorsProps.js.map +1 -0
  217. package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.d.ts +0 -0
  218. package/react/components/{smartDesktopDesigner → sdd}/fixtures/publishProgress.js +0 -0
  219. package/react/components/sdd/fixtures/publishProgress.js.map +1 -0
  220. package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.d.ts +0 -0
  221. package/react/components/{smartDesktopDesigner → sdd}/fixtures/themeProps.js +0 -0
  222. package/react/components/sdd/fixtures/themeProps.js.map +1 -0
  223. package/react/components/sdd/fixtures/views.d.ts +3 -0
  224. package/react/components/{smartDesktopDesigner → sdd}/fixtures/views.js +0 -0
  225. package/react/components/sdd/fixtures/views.js.map +1 -0
  226. package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.d.ts +0 -0
  227. package/react/components/{smartDesktopDesigner → sdd}/sdd_helpers.js +0 -0
  228. package/react/components/sdd/sdd_helpers.js.map +1 -0
  229. package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.d.ts +0 -0
  230. package/react/components/{smartDesktopDesigner → sdd}/stories/AppEditPage.stories.js +0 -0
  231. package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -0
  232. package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.d.ts +0 -0
  233. package/react/components/{smartDesktopDesigner → sdd}/stories/Appearance.stories.js +0 -0
  234. package/react/components/sdd/stories/Appearance.stories.js.map +1 -0
  235. package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.d.ts +0 -0
  236. package/react/components/{smartDesktopDesigner → sdd}/stories/Applications.stories.js +0 -0
  237. package/react/components/sdd/stories/Applications.stories.js.map +1 -0
  238. package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.d.ts +0 -0
  239. package/react/components/{smartDesktopDesigner → sdd}/stories/AssetsPage.stories.js +0 -0
  240. package/react/components/sdd/stories/AssetsPage.stories.js.map +1 -0
  241. package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.d.ts +0 -0
  242. package/react/components/{smartDesktopDesigner → sdd}/stories/Authentication.stories.js +0 -0
  243. package/react/components/sdd/stories/Authentication.stories.js.map +1 -0
  244. package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.d.ts +0 -0
  245. package/react/components/{smartDesktopDesigner → sdd}/stories/ContentHeader.stories.js +0 -0
  246. package/react/components/sdd/stories/ContentHeader.stories.js.map +1 -0
  247. package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.d.ts +0 -0
  248. package/react/components/{smartDesktopDesigner → sdd}/stories/Export.stories.js +0 -0
  249. package/react/components/sdd/stories/Export.stories.js.map +1 -0
  250. package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.d.ts +0 -0
  251. package/react/components/{smartDesktopDesigner → sdd}/stories/ExportCloud.stories.js +0 -0
  252. package/react/components/sdd/stories/ExportCloud.stories.js.map +1 -0
  253. package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.d.ts +0 -0
  254. package/react/components/{smartDesktopDesigner → sdd}/stories/ExportZip.stories.js +0 -0
  255. package/react/components/sdd/stories/ExportZip.stories.js.map +1 -0
  256. package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.d.ts +0 -0
  257. package/react/components/{smartDesktopDesigner → sdd}/stories/GettingStarted.stories.js +0 -0
  258. package/react/components/sdd/stories/GettingStarted.stories.js.map +1 -0
  259. package/react/components/{smartDesktopDesigner → sdd}/stories/ItemList.stories.d.ts +0 -0
  260. package/react/components/{smartDesktopDesigner → sdd}/stories/ItemList.stories.js +0 -0
  261. package/react/components/sdd/stories/ItemList.stories.js.map +1 -0
  262. package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.d.ts +0 -0
  263. package/react/components/{smartDesktopDesigner → sdd}/stories/Navigation.stories.js +0 -0
  264. package/react/components/sdd/stories/Navigation.stories.js.map +1 -0
  265. package/react/components/{smartDesktopDesigner → sdd}/stories/OptionalSettingsView.stories.d.ts +3 -2
  266. package/react/components/sdd/stories/OptionalSettingsView.stories.js +27 -0
  267. package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -0
  268. package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.d.ts +0 -0
  269. package/react/components/{smartDesktopDesigner → sdd}/stories/ProjectErrors.stories.js +0 -0
  270. package/react/components/sdd/stories/ProjectErrors.stories.js.map +1 -0
  271. package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.d.ts +0 -0
  272. package/react/components/{smartDesktopDesigner → sdd}/stories/Publish.stories.js +0 -0
  273. package/react/components/sdd/stories/Publish.stories.js.map +1 -0
  274. package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.d.ts +0 -0
  275. package/react/components/{smartDesktopDesigner → sdd}/stories/PublishProgress.stories.js +0 -0
  276. package/react/components/sdd/stories/PublishProgress.stories.js.map +1 -0
  277. package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.d.ts +0 -0
  278. package/react/components/{smartDesktopDesigner → sdd}/stories/SmartDesktopDesigner.stories.js +1 -0
  279. package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -0
  280. package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.d.ts +0 -0
  281. package/react/components/{smartDesktopDesigner → sdd}/stories/ThemePage.stories.js +0 -0
  282. package/react/components/sdd/stories/ThemePage.stories.js.map +1 -0
  283. package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.d.ts +0 -0
  284. package/react/components/{smartDesktopDesigner → sdd}/stories/Themes.stories.js +0 -0
  285. package/react/components/sdd/stories/Themes.stories.js.map +1 -0
  286. package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.d.ts +0 -0
  287. package/react/components/{smartDesktopDesigner → sdd}/stories/Toolbar.stories.js +0 -0
  288. package/react/components/sdd/stories/Toolbar.stories.js.map +1 -0
  289. package/react/components/{smartDesktopDesigner/tests/Application.spec.d.ts → sdd/tests/AppEditPage.spec.d.ts} +0 -0
  290. package/react/components/{smartDesktopDesigner → sdd}/tests/AppEditPage.spec.js +0 -0
  291. package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -0
  292. package/react/components/{smartDesktopDesigner/tests/Authentication.spec.d.ts → sdd/tests/Application.spec.d.ts} +0 -0
  293. package/react/components/{smartDesktopDesigner → sdd}/tests/Application.spec.js +13 -31
  294. package/react/components/sdd/tests/Application.spec.js.map +1 -0
  295. package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.d.ts +0 -0
  296. package/react/components/{smartDesktopDesigner → sdd}/tests/Applications.spec.js +0 -0
  297. package/react/components/sdd/tests/Applications.spec.js.map +1 -0
  298. package/react/components/{smartDesktopDesigner/tests/ContentHeader.spec.d.ts → sdd/tests/Authentication.spec.d.ts} +0 -0
  299. package/react/components/{smartDesktopDesigner → sdd}/tests/Authentication.spec.js +0 -0
  300. package/react/components/sdd/tests/Authentication.spec.js.map +1 -0
  301. package/react/components/{smartDesktopDesigner/tests/EditPreload.spec.d.ts → sdd/tests/ContentHeader.spec.d.ts} +0 -0
  302. package/react/components/{smartDesktopDesigner → sdd}/tests/ContentHeader.spec.js +0 -0
  303. package/react/components/sdd/tests/ContentHeader.spec.js.map +1 -0
  304. package/react/components/{smartDesktopDesigner/tests/Export.spec.d.ts → sdd/tests/EditPreload.spec.d.ts} +0 -0
  305. package/react/components/{smartDesktopDesigner → sdd}/tests/EditPreload.spec.js +8 -10
  306. package/react/components/sdd/tests/EditPreload.spec.js.map +1 -0
  307. package/react/components/{smartDesktopDesigner/tests/ExportZip.spec.d.ts → sdd/tests/Export.spec.d.ts} +0 -0
  308. package/react/components/{smartDesktopDesigner → sdd}/tests/Export.spec.js +0 -0
  309. package/react/components/sdd/tests/Export.spec.js.map +1 -0
  310. package/react/components/{smartDesktopDesigner/tests/ItemList.spec.d.ts → sdd/tests/ExportZip.spec.d.ts} +0 -0
  311. package/react/components/{smartDesktopDesigner → sdd}/tests/ExportZip.spec.js +0 -0
  312. package/react/components/sdd/tests/ExportZip.spec.js.map +1 -0
  313. package/react/components/{smartDesktopDesigner/tests/Navigation.spec.d.ts → sdd/tests/ItemList.spec.d.ts} +0 -0
  314. package/react/components/{smartDesktopDesigner → sdd}/tests/ItemList.spec.js +0 -0
  315. package/react/components/sdd/tests/ItemList.spec.js.map +1 -0
  316. package/react/components/{smartDesktopDesigner/tests/Preloads.spec.d.ts → sdd/tests/Navigation.spec.d.ts} +0 -0
  317. package/react/components/{smartDesktopDesigner → sdd}/tests/Navigation.spec.js +0 -0
  318. package/react/components/sdd/tests/Navigation.spec.js.map +1 -0
  319. package/react/components/{smartDesktopDesigner/tests/ProjectErrors.spec.d.ts → sdd/tests/OptionalSettingsView.spec.d.ts} +0 -0
  320. package/react/components/sdd/tests/OptionalSettingsView.spec.js +22 -0
  321. package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -0
  322. package/react/components/{smartDesktopDesigner/tests/Publish.spec.d.ts → sdd/tests/ProjectErrors.spec.d.ts} +0 -0
  323. package/react/components/{smartDesktopDesigner → sdd}/tests/ProjectErrors.spec.js +0 -0
  324. package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -0
  325. package/react/components/{smartDesktopDesigner/tests/PublishProgess.spec.d.ts → sdd/tests/Publish.spec.d.ts} +0 -0
  326. package/react/components/{smartDesktopDesigner → sdd}/tests/Publish.spec.js +0 -0
  327. package/react/components/sdd/tests/Publish.spec.js.map +1 -0
  328. package/react/components/{smartDesktopDesigner/tests/SmartDesktopDesigner.spec.d.ts → sdd/tests/PublishProgess.spec.d.ts} +0 -0
  329. package/react/components/{smartDesktopDesigner → sdd}/tests/PublishProgess.spec.js +0 -0
  330. package/react/components/sdd/tests/PublishProgess.spec.js.map +1 -0
  331. package/react/components/{smartDesktopDesigner/tests/Themes.spec.d.ts → sdd/tests/SmartDesktopDesigner.spec.d.ts} +0 -0
  332. package/react/components/{smartDesktopDesigner → sdd}/tests/SmartDesktopDesigner.spec.js +1 -1
  333. package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -0
  334. package/react/components/{smartDesktopDesigner/tests/sdd_helpers.spec.d.ts → sdd/tests/Themes.spec.d.ts} +0 -0
  335. package/react/components/{smartDesktopDesigner → sdd}/tests/Themes.spec.js +0 -0
  336. package/react/components/sdd/tests/Themes.spec.js.map +1 -0
  337. package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.d.ts +0 -0
  338. package/react/components/{smartDesktopDesigner → sdd}/tests/Toolbar.spec.js +0 -0
  339. package/react/components/sdd/tests/Toolbar.spec.js.map +1 -0
  340. package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.d.ts +0 -0
  341. package/react/components/{smartDesktopDesigner → sdd}/tests/a11y_helper.js +0 -0
  342. package/react/components/sdd/tests/a11y_helper.js.map +1 -0
  343. package/react/components/{userPreferences/tests/ScheduledRestart.spec.d.ts → sdd/tests/sdd_helpers.spec.d.ts} +0 -0
  344. package/react/components/{smartDesktopDesigner → sdd}/tests/sdd_helpers.spec.js +0 -0
  345. package/react/components/sdd/tests/sdd_helpers.spec.js.map +1 -0
  346. package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.d.ts +0 -0
  347. package/react/components/{smartDesktopDesigner → sdd}/themeDefinitions.js +0 -0
  348. package/react/components/sdd/themeDefinitions.js.map +1 -0
  349. package/react/components/search/SearchBestMatch.js.map +1 -1
  350. package/react/components/search/SearchProviderResults.d.ts +3 -1
  351. package/react/components/search/SearchProviderResults.js.map +1 -1
  352. package/react/components/search/SearchResult.d.ts +3 -1
  353. package/react/components/search/SearchResult.js +9 -7
  354. package/react/components/search/SearchResult.js.map +1 -1
  355. package/react/components/shared/DefaultDropdownButton.js +5 -4
  356. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  357. package/react/components/shared/tests/DefaultDropdownButton.spec.js +9 -0
  358. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  359. package/react/components/singleInputDialog/SingleInputDialog.spec.js +1 -1
  360. package/react/components/singleInputDialog/SingleInputDialog.spec.js.map +1 -1
  361. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +0 -11
  362. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +2 -116
  363. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  364. package/react/components/smartDesktopDesigner/common/views.js +1 -203
  365. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  366. package/react/components/toolbar/AutoArrange.js +1 -1
  367. package/react/components/toolbar/AutoArrange.js.map +1 -1
  368. package/react/components/toolbar/AutoArrange.spec.d.ts +1 -0
  369. package/react/components/toolbar/AutoArrange.spec.js +48 -0
  370. package/react/components/toolbar/AutoArrange.spec.js.map +1 -0
  371. package/react/components/toolbar/AutoArrange.stories.d.ts +11 -0
  372. package/react/components/toolbar/AutoArrange.stories.js +21 -0
  373. package/react/components/toolbar/AutoArrange.stories.js.map +1 -0
  374. package/react/components/toolbar/SddButton.d.ts +2 -0
  375. package/react/components/toolbar/SddButton.js +23 -0
  376. package/react/components/toolbar/SddButton.js.map +1 -0
  377. package/react/components/toolbar/ToolbarShell.js +4 -1
  378. package/react/components/toolbar/ToolbarShell.js.map +1 -1
  379. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js +2 -1
  380. package/react/components/toolbar/advancedAppLauncher/components/AppActionsMenu.js.map +1 -1
  381. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.d.ts +3 -2
  382. package/react/components/toolbar/advancedAppLauncher/components/AppDefinition.js.map +1 -1
  383. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  384. package/react/components/toolbar/appLauncher/AppLauncherMenu.js +15 -4
  385. package/react/components/toolbar/appLauncher/AppLauncherMenu.js.map +1 -1
  386. package/react/components/toolbar/appLauncher/components/componentList.js +3 -4
  387. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  388. package/react/components/toolbar/dashbar/Dashbar.js +2 -0
  389. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  390. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +71 -12
  391. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  392. package/react/components/userPreferences/UserPreferenceTypes.d.ts +3 -2
  393. package/react/components/userPreferences/UserPreferenceTypes.js.map +1 -1
  394. package/react/components/userPreferences/components/content/General.d.ts +2 -5
  395. package/react/components/userPreferences/components/content/General.js +31 -11
  396. package/react/components/userPreferences/components/content/General.js.map +1 -1
  397. package/react/components/userPreferences/components/content/Workspaces.d.ts +5 -0
  398. package/react/components/userPreferences/components/content/Workspaces.js +58 -17
  399. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  400. package/react/components/userPreferences/components/general/ScheduledClose.d.ts +10 -0
  401. package/react/components/userPreferences/components/general/ScheduledClose.js +95 -0
  402. package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -0
  403. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +6 -2
  404. package/react/components/userPreferences/stores/UserPreferencesStore.js +19 -3
  405. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  406. package/react/components/userPreferences/stories/General.stories.d.ts +6 -2
  407. package/react/components/userPreferences/stories/ScheduledClose.stories.d.ts +12 -0
  408. package/react/components/userPreferences/stories/ScheduledClose.stories.js +53 -0
  409. package/react/components/userPreferences/stories/ScheduledClose.stories.js.map +1 -0
  410. package/react/components/userPreferences/tests/General.spec.js +4 -17
  411. package/react/components/userPreferences/tests/General.spec.js.map +1 -1
  412. package/react/components/userPreferences/tests/ScheduledClose.spec.d.ts +1 -0
  413. package/react/components/userPreferences/tests/ScheduledClose.spec.js +47 -0
  414. package/react/components/userPreferences/tests/ScheduledClose.spec.js.map +1 -0
  415. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +1 -0
  416. package/react/components/windowTitleBar/WindowTitleBarShell.js +16 -6
  417. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  418. package/react/components/windowTitleBar/components/center/TabList.js +2 -2
  419. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  420. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  421. package/react/components/windowTitleBar/components/windowTitle.js +11 -10
  422. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  423. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +12 -9
  424. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  425. package/react/components/yesNoDialog/Timer.spec.js +1 -1
  426. package/react/components/yesNoDialog/Timer.spec.js.map +1 -1
  427. package/react/components/yesNoDialog/YesNoDialog.spec.js +1 -1
  428. package/react/components/yesNoDialog/YesNoDialog.spec.js.map +1 -1
  429. package/react/hooks/useSearch.d.ts +2 -1
  430. package/react/hooks/useSearch.js.map +1 -1
  431. package/react/hooks/useToolbar.js +6 -0
  432. package/react/hooks/useToolbar.js.map +1 -1
  433. package/react/reducers/rootReducer.d.ts +1 -1
  434. package/react/reducers/smartDesktopDesignerReducer.js +1 -1
  435. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  436. package/react/store.d.ts +2 -2
  437. package/react/types/advancedAppLauncherTypes.d.ts +5 -3
  438. package/react/types/advancedAppLauncherTypes.js.map +1 -1
  439. package/react/types/favoriteTypes.d.ts +4 -2
  440. package/react/types/favoriteTypes.js.map +1 -1
  441. package/react/types/smartDesktopDesignerTypes.d.ts +9 -1
  442. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  443. package/react/components/smartDesktopDesigner/AddApp.js.map +0 -1
  444. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +0 -1
  445. package/react/components/smartDesktopDesigner/AppEditPage.js.map +0 -1
  446. package/react/components/smartDesktopDesigner/Appearance.helpers.js.map +0 -1
  447. package/react/components/smartDesktopDesigner/Appearance.js.map +0 -1
  448. package/react/components/smartDesktopDesigner/Application.js.map +0 -1
  449. package/react/components/smartDesktopDesigner/Applications.js.map +0 -1
  450. package/react/components/smartDesktopDesigner/AssetsPage.js.map +0 -1
  451. package/react/components/smartDesktopDesigner/Authentication.js.map +0 -1
  452. package/react/components/smartDesktopDesigner/AuthenticationProviderConfig.js.map +0 -1
  453. package/react/components/smartDesktopDesigner/Content.js.map +0 -1
  454. package/react/components/smartDesktopDesigner/ContentHeader.js.map +0 -1
  455. package/react/components/smartDesktopDesigner/CurrentView.js.map +0 -1
  456. package/react/components/smartDesktopDesigner/EditPreload.js +0 -169
  457. package/react/components/smartDesktopDesigner/EditPreload.js.map +0 -1
  458. package/react/components/smartDesktopDesigner/Export.js.map +0 -1
  459. package/react/components/smartDesktopDesigner/ExportCloud.js.map +0 -1
  460. package/react/components/smartDesktopDesigner/ExportDeployInfo.js.map +0 -1
  461. package/react/components/smartDesktopDesigner/ExportZip.js.map +0 -1
  462. package/react/components/smartDesktopDesigner/GettingStarted.js.map +0 -1
  463. package/react/components/smartDesktopDesigner/ItemList.js.map +0 -1
  464. package/react/components/smartDesktopDesigner/Navigation.js.map +0 -1
  465. package/react/components/smartDesktopDesigner/OptionalSettingsView.js +0 -71
  466. package/react/components/smartDesktopDesigner/OptionalSettingsView.js.map +0 -1
  467. package/react/components/smartDesktopDesigner/Preloads.d.ts +0 -8
  468. package/react/components/smartDesktopDesigner/Preloads.js +0 -26
  469. package/react/components/smartDesktopDesigner/Preloads.js.map +0 -1
  470. package/react/components/smartDesktopDesigner/ProjectErrors.js.map +0 -1
  471. package/react/components/smartDesktopDesigner/Publish.js.map +0 -1
  472. package/react/components/smartDesktopDesigner/PublishProgress.js.map +0 -1
  473. package/react/components/smartDesktopDesigner/ThemePage.js.map +0 -1
  474. package/react/components/smartDesktopDesigner/Themes.js.map +0 -1
  475. package/react/components/smartDesktopDesigner/Toolbar.js.map +0 -1
  476. package/react/components/smartDesktopDesigner/View.js.map +0 -1
  477. package/react/components/smartDesktopDesigner/common/fsbl_functions.js.map +0 -1
  478. package/react/components/smartDesktopDesigner/common/getCSSVars.js.map +0 -1
  479. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +0 -1
  480. package/react/components/smartDesktopDesigner/fixtures/authenticationProps.js.map +0 -1
  481. package/react/components/smartDesktopDesigner/fixtures/configTemplate.js.map +0 -1
  482. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +0 -1
  483. package/react/components/smartDesktopDesigner/fixtures/preloads.d.ts +0 -22
  484. package/react/components/smartDesktopDesigner/fixtures/preloads.js +0 -40
  485. package/react/components/smartDesktopDesigner/fixtures/preloads.js.map +0 -1
  486. package/react/components/smartDesktopDesigner/fixtures/projectErrorsProps.js.map +0 -1
  487. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +0 -1
  488. package/react/components/smartDesktopDesigner/fixtures/themeProps.js.map +0 -1
  489. package/react/components/smartDesktopDesigner/fixtures/views.js.map +0 -1
  490. package/react/components/smartDesktopDesigner/sdd_helpers.js.map +0 -1
  491. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +0 -1
  492. package/react/components/smartDesktopDesigner/stories/Appearance.stories.js.map +0 -1
  493. package/react/components/smartDesktopDesigner/stories/Applications.stories.js.map +0 -1
  494. package/react/components/smartDesktopDesigner/stories/AssetsPage.stories.js.map +0 -1
  495. package/react/components/smartDesktopDesigner/stories/Authentication.stories.js.map +0 -1
  496. package/react/components/smartDesktopDesigner/stories/ContentHeader.stories.js.map +0 -1
  497. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.d.ts +0 -11
  498. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js +0 -35
  499. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js.map +0 -1
  500. package/react/components/smartDesktopDesigner/stories/Export.stories.js.map +0 -1
  501. package/react/components/smartDesktopDesigner/stories/ExportCloud.stories.js.map +0 -1
  502. package/react/components/smartDesktopDesigner/stories/ExportZip.stories.js.map +0 -1
  503. package/react/components/smartDesktopDesigner/stories/GettingStarted.stories.js.map +0 -1
  504. package/react/components/smartDesktopDesigner/stories/ItemList.stories.js.map +0 -1
  505. package/react/components/smartDesktopDesigner/stories/Navigation.stories.js.map +0 -1
  506. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js +0 -28
  507. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js.map +0 -1
  508. package/react/components/smartDesktopDesigner/stories/Preloads.stories.d.ts +0 -11
  509. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js +0 -31
  510. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js.map +0 -1
  511. package/react/components/smartDesktopDesigner/stories/ProjectErrors.stories.js.map +0 -1
  512. package/react/components/smartDesktopDesigner/stories/Publish.stories.js.map +0 -1
  513. package/react/components/smartDesktopDesigner/stories/PublishProgress.stories.js.map +0 -1
  514. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +0 -1
  515. package/react/components/smartDesktopDesigner/stories/ThemePage.stories.js.map +0 -1
  516. package/react/components/smartDesktopDesigner/stories/Themes.stories.js.map +0 -1
  517. package/react/components/smartDesktopDesigner/stories/Toolbar.stories.js.map +0 -1
  518. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +0 -1
  519. package/react/components/smartDesktopDesigner/tests/Application.spec.js.map +0 -1
  520. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +0 -1
  521. package/react/components/smartDesktopDesigner/tests/Authentication.spec.js.map +0 -1
  522. package/react/components/smartDesktopDesigner/tests/ContentHeader.spec.js.map +0 -1
  523. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js.map +0 -1
  524. package/react/components/smartDesktopDesigner/tests/Export.spec.js.map +0 -1
  525. package/react/components/smartDesktopDesigner/tests/ExportZip.spec.js.map +0 -1
  526. package/react/components/smartDesktopDesigner/tests/ItemList.spec.js.map +0 -1
  527. package/react/components/smartDesktopDesigner/tests/Navigation.spec.js.map +0 -1
  528. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js +0 -47
  529. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js.map +0 -1
  530. package/react/components/smartDesktopDesigner/tests/ProjectErrors.spec.js.map +0 -1
  531. package/react/components/smartDesktopDesigner/tests/Publish.spec.js.map +0 -1
  532. package/react/components/smartDesktopDesigner/tests/PublishProgess.spec.js.map +0 -1
  533. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +0 -1
  534. package/react/components/smartDesktopDesigner/tests/Themes.spec.js.map +0 -1
  535. package/react/components/smartDesktopDesigner/tests/Toolbar.spec.js.map +0 -1
  536. package/react/components/smartDesktopDesigner/tests/a11y_helper.js.map +0 -1
  537. package/react/components/smartDesktopDesigner/tests/sdd_helpers.spec.js.map +0 -1
  538. package/react/components/smartDesktopDesigner/themeDefinitions.js.map +0 -1
  539. package/react/components/toolbar/appLauncher/DynamicAppLauncher.d.ts +0 -6
  540. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js +0 -23
  541. package/react/components/toolbar/appLauncher/DynamicAppLauncher.js.map +0 -1
  542. package/react/components/userPreferences/components/general/ScheduledRestart.d.ts +0 -27
  543. package/react/components/userPreferences/components/general/ScheduledRestart.js +0 -190
  544. package/react/components/userPreferences/components/general/ScheduledRestart.js.map +0 -1
  545. package/react/components/userPreferences/tests/ScheduledRestart.spec.js +0 -70
  546. package/react/components/userPreferences/tests/ScheduledRestart.spec.js.map +0 -1
  547. package/react/hooks/useWorkspace.d.ts +0 -5
  548. package/react/hooks/useWorkspace.js +0 -26
  549. package/react/hooks/useWorkspace.js.map +0 -1
  550. package/react/types/iconTypes.d.ts +0 -11
  551. package/react/types/iconTypes.js +0 -2
  552. package/react/types/iconTypes.js.map +0 -1
  553. package/react/types/searchTypes.d.ts +0 -22
  554. package/react/types/searchTypes.js +0 -2
  555. package/react/types/searchTypes.js.map +0 -1
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ // There is no typedef file for this module. A blank typedef file is necessary to avoid this compiler error: https://github.com/microsoft/TypeScript/issues/27956
package/package.json CHANGED
@@ -1,33 +1,33 @@
1
1
  {
2
2
  "name": "@finsemble/finsemble-ui",
3
- "version": "6.5.2",
3
+ "version": "6.6.0-beta.3",
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
+ "index.d.ts",
7
8
  "react"
8
9
  ],
9
10
  "scripts": {
10
- "build": "npm run preprod && tsc",
11
+ "build": "yarn clean && yarn copy-css && tsc",
11
12
  "do-audit": " improved-yarn-audit --min-severity high",
12
13
  "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",
14
+ "copy-css": "copyfiles -u 1 \"./src/assets/**/*\" react/ && copyfiles -u 1 \"src/**/*.css\" \"react/\"",
15
+ "dev": "yarn copy-css && yarn watch",
15
16
  "monodev": "yarn dev",
16
17
  "new-component": "node ./src/componentTemplateGenerator.js",
17
18
  "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",
19
+ "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
20
  "test": "yarn test-mocha && yarn test-storybook",
22
21
  "test-mocha": "ts-mocha -p ./spec/tsconfig.spec.json \"./spec/**/*.spec.ts\"",
23
22
  "test-storybook": "ts-mocha -p ./spec/tsconfig.storybook.json \"./src/**/*.spec.ts*\" --require src/enzymeSetup.js --require ignore-styles",
24
23
  "test-coverage": "nyc yarn test && nyc merge .nyc_output ../../.nyc_output/ui.json",
24
+ "watch": "concurrently \"npm run watch-css\" \"tsc --watch --preserveWatchOutput\" --prefix [{time}:{command}]: --prefix-length 20 --prefix-colors cyan,green",
25
25
  "watch-css": "chokidar \"./src/**/*.css\" -c \"npm run copy-css\"",
26
26
  "storybook": "start-storybook -p 6006",
27
27
  "build-storybook": "build-storybook"
28
28
  },
29
29
  "dependencies": {
30
- "@finsemble/finsemble-api": "6.5.2",
30
+ "@finsemble/finsemble-api": "6.6.0-beta.3",
31
31
  "@q42/floating-focus-a11y": "^1.3.3",
32
32
  "@reduxjs/toolkit": "^1.5.0",
33
33
  "@svgr/webpack": "^5.5.0",
@@ -35,20 +35,19 @@
35
35
  "@types/chai": "4.3.0",
36
36
  "@types/lodash": "4.14.178",
37
37
  "@types/mime-types": "^2.1.0",
38
- "@types/mocha": "9.0.0",
38
+ "@types/mocha": "9.1.0",
39
39
  "@types/react": "17.0.38",
40
40
  "@types/react-dom": "17.0.11",
41
41
  "@types/react-input-autosize": "2.2.1",
42
- "@types/react-redux": "7.1.21",
42
+ "@types/react-redux": "7.1.22",
43
43
  "@types/react-relative-portal": "^1.8.1",
44
+ "@types/react-syntax-highlighter": "13.5.2",
44
45
  "async": "3.2.3",
45
46
  "date-fns": "^2.25.0",
46
- "dom-autoscroller": "2.3.4",
47
47
  "immer": "9.0.12",
48
48
  "lodash": "4.17.21",
49
49
  "prop-types": "15.8.1",
50
50
  "react-circular-progressbar": "^2.0.3",
51
- "react-input-autosize": "^3.0.0",
52
51
  "react-redux": "7.2.6",
53
52
  "react-relative-portal": "^1.8.0",
54
53
  "react-sortable-hoc": "2.0.0",
@@ -67,10 +66,11 @@
67
66
  "@babel/preset-react": "^7.12.10",
68
67
  "@babel/register": "^7.16.0",
69
68
  "@storybook/addon-actions": "6.4.13",
70
- "@storybook/addon-essentials": "6.4.13",
69
+ "@storybook/addon-essentials": "6.4.19",
71
70
  "@storybook/addon-links": "6.4.13",
72
71
  "@storybook/react": "6.4.13",
73
72
  "@types/enzyme": "^3.10.8",
73
+ "@types/react-syntax-highlighter": "13.5.2",
74
74
  "@types/react-transition-group": "4.4.4",
75
75
  "@types/sinon": "^10.0.2",
76
76
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.2",
@@ -95,9 +95,10 @@
95
95
  "sinon": "^12.0.0",
96
96
  "ts-loader": "^9.2.3",
97
97
  "ts-mocha": "9.0.2",
98
- "typescript": "4.4.4"
98
+ "typescript": "4.5.5"
99
99
  },
100
100
  "resolutions": {
101
+ "@types/react-dom": "17.0.11",
101
102
  "ts-mocha/ts-node": "^10.1.0",
102
103
  "trim": "0.0.3",
103
104
  "css-what": "5.0.1",
@@ -106,7 +107,9 @@
106
107
  "set-value": "^4.0.1",
107
108
  "glob-parent": "^5.1.2",
108
109
  "immer": "^9.0.6",
109
- "coa": "2.0.2"
110
+ "coa": "2.0.2",
111
+ "node-fetch": "2.6.7",
112
+ "simple-get": "^4.0.1"
110
113
  },
111
114
  "repository": {
112
115
  "type": "git",
@@ -1,5 +1,5 @@
1
1
  import { UnionOf } from "unionize";
2
- import { AuthenticationProvider, MenuType, PreloadType, ProjectError, ProjectSaveData } from "../types/smartDesktopDesignerTypes";
2
+ import { AuthenticationProvider, MenuType, PreloadMap, PreloadType, ProjectError, ProjectSaveData } from "../types/smartDesktopDesignerTypes";
3
3
  import { services, FEA } from "@finsemble/finsemble-api";
4
4
  export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
5
5
  change_view: string;
@@ -9,7 +9,7 @@ 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[];
12
+ update_preloads: PreloadMap;
13
13
  set_current_preload: PreloadType | null;
14
14
  set_deploy_info: FEA.DeployInfo | null;
15
15
  set_publish_error: string | null;
@@ -29,7 +29,7 @@ export declare const SmartDesktopDesignerActions: import("unionize").Unionized<{
29
29
  update_app: services.Interop.types.AppDefinition;
30
30
  delete_app: string;
31
31
  update_menus: MenuType;
32
- update_preloads: PreloadType[];
32
+ update_preloads: PreloadMap;
33
33
  set_current_preload: PreloadType | null;
34
34
  set_deploy_info: FEA.DeployInfo | null;
35
35
  set_publish_error: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"smartDesktopDesignerActions.js","sourceRoot":"","sources":["../../src/actions/smartDesktopDesignerActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;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"]}
1
+ {"version":3,"file":"smartDesktopDesignerActions.js","sourceRoot":"","sources":["../../src/actions/smartDesktopDesignerActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AAerD,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,EAAc;IACrC,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\tPreloadMap,\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<PreloadMap>(),\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");
@@ -239,10 +239,6 @@ img.pinned-icon {
239
239
  padding-top: 4px;
240
240
  }
241
241
 
242
- .ff-caret-down {
243
- margin-top: 14px;
244
- }
245
-
246
242
  .finsemble-toolbar-drag-handle > svg {
247
243
  width: 23px;
248
244
  margin-top: -7px;
@@ -371,10 +371,39 @@ img {
371
371
  margin-top: 0.5em;
372
372
  }
373
373
 
374
- .scheduled-restart-select-label {
375
- margin-top: 0.45em;
376
- margin-left: 4em;
377
- margin-right: 0.5em;
374
+ .close-toggle-container {
375
+ display: flex;
376
+ vertical-align: middle;
377
+ margin-bottom: 10px;
378
+ }
379
+
380
+ .close-toggle-container .complex-menu-checkbox-wrapper {
381
+ margin-top: 0;
382
+ width: 90px;
383
+ margin-right: 15px;
384
+ }
385
+
386
+ .time-selectors {
387
+ margin-left: 9em;
388
+ }
389
+
390
+ .daily-select {
391
+ display: flex;
392
+ align-items: center;
393
+ margin-bottom: 10px;
394
+ }
395
+
396
+ .daily-select-label {
397
+ display: inline-block;
398
+ padding-right: 10px;
399
+ }
400
+
401
+ .daily-select-dropdown {
402
+ width: 100px;
403
+ }
404
+
405
+ .daily-select.disabled {
406
+ color: var(--content-nav-highlighter);
378
407
  }
379
408
 
380
409
  .disabled-restart {
@@ -536,3 +565,9 @@ option:focus {
536
565
  .db-col-4 {
537
566
  width: 20%;
538
567
  }
568
+
569
+ .general-row {
570
+ display: flex;
571
+ margin-top: 8px;
572
+ margin-left: 10px;
573
+ }
@@ -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,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,IAAI,IAAI,GAAG,EAAE,CAAC;AACd,IAAI,IAAI,GAAG,aAAa,CAAC;AAGzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE;QAChB,KAAK,QAAQ,CAAC,CAAC;YACd,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACjB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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,CAAC,CAAC;AACnC,IAAI,IAAI,GAAG,EAAE,CAAC;AACd,IAAI,IAAI,GAAG,aAAa,CAAC;AAGzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,QAAQ,IAAI,CAAC,CAAC,CAAC,EAAE;QAChB,KAAK,QAAQ,CAAC,CAAC;YACd,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACjB,MAAM;SACN;QACD,KAAK,QAAQ,CAAC,CAAC;YACd,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,C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AC;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"]}
@@ -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;
@@ -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;
@@ -1 +1 @@
1
- {"version":3,"file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SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,YAAY,IAC/C,WAAW,CACN;YACP,8BAAM,SAAS,EAAC,WAAW,GAAQ;YACnC,6BAAK,SAAS,EAAC,gBAAgB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC;gBACpE,8BAAM,SAAS,EAAC,OAAO,GAAQ,CAC1B,CACD;QACL,QAAQ,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,wCAAwC,IAAE,OAAO,CAAO,CAAC,CAAC,CAAC,IAAI,CACrF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useState, useRef } from \"react\";\nimport \"../../assets/css/button.css\";\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\nimport { IFinsembleButtonProps } from \"../shared/Button\";\n\nexport interface IFinsembleDropdownActionButtonProps {\n\tbuttonLabel: string;\n\tbuttonOptions: Array<IFinsembleButtonProps>;\n\tmainAction: Function;\n}\n\nconst DropdownButton: React.FunctionComponent<IFinsembleDropdownActionButtonProps> = ({\n\tbuttonLabel = \"Label\",\n\tbuttonOptions = [],\n\tmainAction,\n}: IFinsembleDropdownActionButtonProps) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst [expanded, setExpanded] = useState(false);\n\n\tuseOutsideClickDetector(wrapperRef, () => setExpanded(false));\n\n\tconst options = buttonOptions.map((option, index) => (\n\t\t<div\n\t\t\tkey={index}\n\t\t\tclassName=\"finsemble-dropdown-action__btn-option\"\n\t\t\tonClick={() => {\n\t\t\t\toption.clickHandler();\n\t\t\t\tsetExpanded(false);\n\t\t\t}}\n\t\t>\n\t\t\t{option.buttonLabel}\n\t\t</div>\n\t));\n\n\tconst buttonAction = () => {\n\t\tif (expanded) {\n\t\t\tsetExpanded(false);\n\t\t\treturn;\n\t\t}\n\n\t\tif (mainAction) {\n\t\t\tmainAction();\n\t\t} else {\n\t\t\t() => setExpanded(!expanded);\n\t\t}\n\t};\n\n\treturn (\n\t\t<div ref={wrapperRef} className=\"finsemble-dropdown-action__btn-container\">\n\t\t\t<div className=\"finsemble-dropdown-action__btn\">\n\t\t\t\t<span className=\"btn-label\" onClick={buttonAction}>\n\t\t\t\t\t{buttonLabel}\n\t\t\t\t</span>\n\t\t\t\t<span className=\"separator\"></span>\n\t\t\t\t<div className=\"expand-options\" onClick={() => setExpanded(!expanded)}>\n\t\t\t\t\t<span className=\"caret\"></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{expanded ? <div className=\"finsemble-dropdown-action__btn-options\">{options}</div> : null}\n\t\t</div>\n\t);\n};\n\nexport default DropdownButton;\n"]}
1
+ {"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../../src/components/common/DropdownButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAa9E,MAAM,cAAc,GAAiE,CAAC,EACrF,WAAW,GAAG,OAAO,EACrB,aAAa,GAAG,EAAE,EAClB,UAAU,GAC2B,EAAE,EAAE;IACzC,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,uBAAuB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9D,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CACpD,6BACC,GAAG,EAAE,KAAK,EACV,SAAS,EAAC,uCAAuC,EACjD,OAAO,EAAE,GAAG,EAAE;YACb,MAAM,CAAC,YAAY,EAAE,CAAC;YACtB,WAAW,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC,IAEA,MAAM,CAAC,WAAW,CACd,CACN,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,IAAI,QAAQ,EAAE;YACb,WAAW,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO;SACP;QAED,IAAI,UAAU,EAAE;YACf,UAAU,EAAE,CAAC;SACb;aAAM;YACN,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC;SAC7B;IACF,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,0CAA0C;QACzE,6BAAK,SAAS,EAAC,gCAAgC;YAC9C,8BAAM,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,YAAY,IAC/C,WAAW,CACN;YACP,8BAAM,SAAS,EAAC,WAAW,GAAQ;YACnC,6BAAK,SAAS,EAAC,gBAAgB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC;gBACpE,8BAAM,SAAS,EAAC,OAAO,GAAQ,CAC1B,CACD;QACL,QAAQ,CAAC,CAAC,CAAC,6BAAK,SAAS,EAAC,wCAAwC,IAAE,OAAO,CAAO,CAAC,CAAC,CAAC,IAAI,CACrF,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useState, useRef } from \"react\";\nimport \"../../assets/css/button.css\";\nimport { useOutsideClickDetector } from \"../../hooks/useOutsideClickDetector\";\nimport { IFinsembleButtonProps } from \"../shared/Button\";\n\nexport interface IFinsembleDropdownActionButtonProps {\n\tbuttonLabel: string;\n\tbuttonOptions: Array<IFinsembleButtonProps>;\n\tmainAction: Function;\n}\n\n/**\n * @TODO: Consolidate this and DefaultDropDownButton and change all usages to use DefaultDropDownButton.\n * @deprecated Use DefaultDropDownButton instead.\n */\nconst DropdownButton: React.FunctionComponent<IFinsembleDropdownActionButtonProps> = ({\n\tbuttonLabel = \"Label\",\n\tbuttonOptions = [],\n\tmainAction,\n}: IFinsembleDropdownActionButtonProps) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst [expanded, setExpanded] = useState(false);\n\n\tuseOutsideClickDetector(wrapperRef, () => setExpanded(false));\n\n\tconst options = buttonOptions.map((option, index) => (\n\t\t<div\n\t\t\tkey={index}\n\t\t\tclassName=\"finsemble-dropdown-action__btn-option\"\n\t\t\tonClick={() => {\n\t\t\t\toption.clickHandler();\n\t\t\t\tsetExpanded(false);\n\t\t\t}}\n\t\t>\n\t\t\t{option.buttonLabel}\n\t\t</div>\n\t));\n\n\tconst buttonAction = () => {\n\t\tif (expanded) {\n\t\t\tsetExpanded(false);\n\t\t\treturn;\n\t\t}\n\n\t\tif (mainAction) {\n\t\t\tmainAction();\n\t\t} else {\n\t\t\t() => setExpanded(!expanded);\n\t\t}\n\t};\n\n\treturn (\n\t\t<div ref={wrapperRef} className=\"finsemble-dropdown-action__btn-container\">\n\t\t\t<div className=\"finsemble-dropdown-action__btn\">\n\t\t\t\t<span className=\"btn-label\" onClick={buttonAction}>\n\t\t\t\t\t{buttonLabel}\n\t\t\t\t</span>\n\t\t\t\t<span className=\"separator\"></span>\n\t\t\t\t<div className=\"expand-options\" onClick={() => setExpanded(!expanded)}>\n\t\t\t\t\t<span className=\"caret\"></span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{expanded ? <div className=\"finsemble-dropdown-action__btn-options\">{options}</div> : null}\n\t\t</div>\n\t);\n};\n\nexport default DropdownButton;\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,OAAO,sBAAsB,CAAC;AAE9B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ACF,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":[],"mappings":"AAAA;;;GAGG;AAE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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"]}
@@ -3,6 +3,8 @@ import "./css/toggle.css";
3
3
  export interface FinsembleToggleProps {
4
4
  label?: string;
5
5
  checked: boolean;
6
+ textToggle?: [onLabel: string, offLabel: string];
6
7
  onChange: (selected: boolean) => void;
8
+ enabled?: boolean;
7
9
  }
8
- export declare const FinsembleToggle: ({ checked, onChange, label }: FinsembleToggleProps) => JSX.Element;
10
+ export declare const FinsembleToggle: ({ checked, onChange, label, enabled, textToggle }: FinsembleToggleProps) => JSX.Element;
@@ -1,19 +1,27 @@
1
1
  import React, { useEffect, useState } from "react";
2
2
  import "./css/toggle.css";
3
3
  import { FinsembleIcon } from "./FinsembleIcon";
4
- export const FinsembleToggle = ({ checked, onChange, label }) => {
4
+ export const FinsembleToggle = ({ checked, onChange, label, enabled = true, textToggle }) => {
5
5
  const [selected, setSelected] = useState(checked);
6
6
  function doSetSelected(newValue) {
7
7
  onChange(newValue);
8
8
  setSelected(newValue);
9
9
  }
10
+ const [yesLabel, noLabel] = textToggle !== null && textToggle !== void 0 ? textToggle : [];
10
11
  useEffect(() => {
11
12
  setSelected(checked);
12
13
  }, [checked]);
13
- return (React.createElement("span", { className: ["finsembleToggle", selected ? "finsembleToggle-on" : "finsembleToggle-off"].join(" ") },
14
- React.createElement(FinsembleIcon, { className: "finsembleToggle-icon", icon: selected ? "toggle-on" : "toggle-off" }),
14
+ return (React.createElement("span", { className: [
15
+ "finsembleToggle",
16
+ selected ? "finsembleToggle-on" : "finsembleToggle-off",
17
+ !enabled ? "disabled" : "",
18
+ ].join(" ") },
19
+ !textToggle && React.createElement(FinsembleIcon, { className: "finsembleToggle-icon", icon: selected ? "toggle-on" : "toggle-off" }),
20
+ textToggle && (React.createElement("span", { className: "toggle-text-label-wrapper" },
21
+ React.createElement("span", { className: "toggle-text-label toggle-text-label_on" }, yesLabel),
22
+ React.createElement("span", { className: "toggle-text-label toggle-text-label_off" }, noLabel))),
15
23
  React.createElement("input", Object.assign({ type: "checkbox", onChange: (e) => {
16
24
  doSetSelected(e.target.checked);
17
- }, checked: selected }, (label ? { "aria-label": label } : "")))));
25
+ }, checked: selected, disabled: !enabled }, (label ? { "aria-label": label } : "")))));
18
26
  };
19
27
  //# sourceMappingURL=FinsembleToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FinsembleToggle.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAwB,EAAE,EAAE;IACrF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElD,SAAS,aAAa,CAAC,QAAiB;QACvC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;IAED,SAAS,CAAC,GAAG,EAAE;QACd,WAAW,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACN,8BAAM,SAAS,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QACtG,oBAAC,aAAa,IAAC,SAAS,EAAC,sBAAsB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,GAAkB;QAC7G,6CACC,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACf,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC,EACD,OAAO,EAAE,QAAQ,IACb,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACzC,CACI,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport \"./css/toggle.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\n\nexport interface FinsembleToggleProps {\n\tlabel?: string;\n\tchecked: boolean;\n\tonChange: (selected: boolean) => void;\n}\n\nexport const FinsembleToggle = ({ checked, onChange, label }: FinsembleToggleProps) => {\n\tconst [selected, setSelected] = useState(checked);\n\n\tfunction doSetSelected(newValue: boolean) {\n\t\tonChange(newValue);\n\t\tsetSelected(newValue);\n\t}\n\n\tuseEffect(() => {\n\t\tsetSelected(checked);\n\t}, [checked]);\n\n\treturn (\n\t\t<span className={[\"finsembleToggle\", selected ? \"finsembleToggle-on\" : \"finsembleToggle-off\"].join(\" \")}>\n\t\t\t<FinsembleIcon className=\"finsembleToggle-icon\" icon={selected ? \"toggle-on\" : \"toggle-off\"}></FinsembleIcon>\n\t\t\t<input\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tonChange={(e) => {\n\t\t\t\t\tdoSetSelected(e.target.checked);\n\t\t\t\t}}\n\t\t\t\tchecked={selected}\n\t\t\t\t{...(label ? { \"aria-label\": label } : \"\")}\n\t\t\t/>\n\t\t</span>\n\t);\n};\n"]}
1
+ {"version":3,"file":"FinsembleToggle.js","sourceRoot":"","sources":["../../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CAAyC,IAAG,OAAO,CAAQ,CACtE,CACP;QACD,6CACC,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACf,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC,EACD,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,CAAC,OAAO,IACd,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACzC,CACI,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport \"./css/toggle.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\n\nexport interface FinsembleToggleProps {\n\tlabel?: string;\n\tchecked: boolean;\n\ttextToggle?: [onLabel: string, offLabel: string];\n\tonChange: (selected: boolean) => void;\n\tenabled?: boolean;\n}\n\nexport const FinsembleToggle = ({ checked, onChange, label, enabled = true, textToggle }: FinsembleToggleProps) => {\n\tconst [selected, setSelected] = useState(checked);\n\n\tfunction doSetSelected(newValue: boolean) {\n\t\tonChange(newValue);\n\t\tsetSelected(newValue);\n\t}\n\tconst [yesLabel, noLabel] = textToggle ?? [];\n\n\tuseEffect(() => {\n\t\tsetSelected(checked);\n\t}, [checked]);\n\n\treturn (\n\t\t<span\n\t\t\tclassName={[\n\t\t\t\t\"finsembleToggle\",\n\t\t\t\tselected ? \"finsembleToggle-on\" : \"finsembleToggle-off\",\n\t\t\t\t!enabled ? \"disabled\" : \"\",\n\t\t\t].join(\" \")}\n\t\t>\n\t\t\t{!textToggle && <FinsembleIcon className=\"finsembleToggle-icon\" icon={selected ? \"toggle-on\" : \"toggle-off\"} />}\n\t\t\t{textToggle && (\n\t\t\t\t<span className=\"toggle-text-label-wrapper\">\n\t\t\t\t\t<span className={\"toggle-text-label toggle-text-label_on\"}>{yesLabel}</span>\n\t\t\t\t\t<span className={\"toggle-text-label toggle-text-label_off\"}>{noLabel}</span>\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t<input\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tonChange={(e) => {\n\t\t\t\t\tdoSetSelected(e.target.checked);\n\t\t\t\t}}\n\t\t\t\tchecked={selected}\n\t\t\t\tdisabled={!enabled}\n\t\t\t\t{...(label ? { \"aria-label\": label } : \"\")}\n\t\t\t/>\n\t\t</span>\n\t);\n};\n"]}
@@ -36,7 +36,7 @@ export const ImagePreview = (props) => {
36
36
  React.createElement(FileInput, Object.assign({ value: imagePath, uploadFunction: props.uploadFunction, onSetValue: (value) => {
37
37
  setImagePath(value);
38
38
  setCacheIndex(++globalCacheIndex);
39
- }, acceptTypes: props.acceptTypes, presetFile: droppedFile, suppressDropzone: true }, (props.id ? { id: props.id } : {}))),
39
+ }, acceptTypes: props.acceptTypes, presetFile: droppedFile, suppressDropzone: true, allowClearing: false }, (props.id ? { id: props.id } : {}))),
40
40
  !imagePath ? (React.createElement("div", { className: "empty-preview" })) : (React.createElement("div", { className: "filled-preview" },
41
41
  React.createElement("img", { src: `${props.baseURL}/${imagePath}?${cacheIndex}` }))))));
42
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ImagePreview.js","sourceRoot":"","sources":["../../../src/components/common/ImagePreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAqB,MAAM,aAAa,CAAC;AAC3D,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AAEpD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,mCAAe,CAAA;IACf,mCAAe,CAAA;AAChB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAYD,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAEzB,MAAM,SAAS,GAAG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AS,kBACT,KAAK,EAAE,SAAS,EAChB,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE;oBAC7B,YAAY,CAAC,KAAK,CAAC,CAAC;oBACpB,aAAa,CAAC,EAAE,gBAAgB,CAAC,CAAC;gBACnC,CAAC,EACD,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,UAAU,EAAE,WAAW,EACvB,gBAAgB,EAAE,IAAI,IAClB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC1B;YAEZ,CAAC,SAAS,CAAC,CAAC,CAAC,CACb,6BAAK,SAAS,EAAC,eAAe,GAAO,CACrC,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,gBAAgB;gBAC9B,6BAAK,GAAG,EAAE,GAAG,KAAK,CAAC,OAAO,IAAI,SAAS,IAAI,UAAU,EAAE,GAAI,CACtD,CACN,CACI,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useEffect } from \"react\";\n\nimport { FileInput, FileInputUploadCb } from \"./FileInput\";\nimport \"./css/image-preview.css\";\nimport { DropZone, FileWithPath } from \"./DropZone\";\n\nexport enum ImagePreviewSize {\n\tSMALL = \"small\",\n\tLARGE = \"large\",\n}\n\nexport type ImagePreviewProps = {\n\tid?: string;\n\tvalue: string;\n\tbaseURL: string;\n\tonSetValue?: (value: string) => void;\n\tuploadFunction: FileInputUploadCb;\n\tacceptTypes: string[];\n\tpreviewSize?: ImagePreviewSize;\n};\n\nlet globalCacheIndex = 0;\n\nconst cleanPath = (path: string, baseURL: string) =>\n\tpath\n\t\t.replace(new RegExp(`^${baseURL}`), \"\")\n\t\t.replace(/\\/{1,}/g, \"/\")\n\t\t.replace(/^\\//, \"\");\n\nexport const ImagePreview = (props: ImagePreviewProps) => {\n\tconst [cacheIndex, setCacheIndex] = useState(++globalCacheIndex);\n\tconst previewSize = props.previewSize || ImagePreviewSize.SMALL;\n\tconst [droppedFile, setDroppedFile] = useState<FileWithPath | null>(null);\n\n\tconst [imagePath, setImagePath] = useState(cleanPath(props.value, props.baseURL));\n\n\tuseEffect(() => {\n\t\tif (props.onSetValue) {\n\t\t\tprops.onSetValue(imagePath);\n\t\t}\n\t}, [imagePath]);\n\n\tuseEffect(() => {\n\t\tsetImagePath(cleanPath(props.value, props.baseURL));\n\t}, [props]);\n\n\treturn (\n\t\t<DropZone\n\t\t\tprocessFile={(file: File) => {\n\t\t\t\tsetDroppedFile(file);\n\t\t\t}}\n\t\t>\n\t\t\t<div className={[\"image-preview-container\", `image-preview-size-${previewSize}`].join(\" \")}>\n\t\t\t\t<FileInput\n\t\t\t\t\tvalue={imagePath}\n\t\t\t\t\tuploadFunction={props.uploadFunction}\n\t\t\t\t\tonSetValue={(value: string) => {\n\t\t\t\t\t\tsetImagePath(value);\n\t\t\t\t\t\tsetCacheIndex(++globalCacheIndex);\n\t\t\t\t\t}}\n\t\t\t\t\tacceptTypes={props.acceptTypes}\n\t\t\t\t\tpresetFile={droppedFile}\n\t\t\t\t\tsuppressDropzone={true}\n\t\t\t\t\t{...(props.id ? { id: props.id } : {})}\n\t\t\t\t></FileInput>\n\n\t\t\t\t{!imagePath ? (\n\t\t\t\t\t<div className=\"empty-preview\"></div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"filled-preview\">\n\t\t\t\t\t\t<img src={`${props.baseURL}/${imagePath}?${cacheIndex}`} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</DropZone>\n\t);\n};\n"]}
1
+ {"version":3,"file":"ImagePreview.js","sourceRoot":"","sources":["../../../src/components/common/ImagePreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,S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,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACrD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACN,oBAAC,QAAQ,IACR,WAAW,EAAE,CAAC,IAAU,EAAE,EAAE;YAC3B,cAAc,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;QAED,6BAAK,SAAS,EAAE,CAAC,yBAAyB,EAAE,sBAAsB,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YACzF,oBAAC,SAAS,kBACT,KAAK,EAAE,SAAS,EAChB,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE;oBAC7B,YAAY,CAAC,KAAK,CAAC,CAAC;oBACpB,aAAa,CAAC,EAAE,gBAAgB,CAAC,CAAC;gBACnC,CAAC,EACD,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,UAAU,EAAE,WAAW,EACvB,gBAAgB,EAAE,IAAI,EACtB,aAAa,EAAE,KAAK,IAChB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC1B;YAEZ,CAAC,SAAS,CAAC,CAAC,CAAC,CACb,6BAAK,SAAS,EAAC,eAAe,GAAO,CACrC,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,gBAAgB;gBAC9B,6BAAK,GAAG,EAAE,GAAG,KAAK,CAAC,OAAO,IAAI,SAAS,IAAI,UAAU,EAAE,GAAI,CACtD,CACN,CACI,CACI,CACX,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useEffect } from \"react\";\n\nimport { FileInput, FileInputUploadCb } from \"./FileInput\";\nimport \"./css/image-preview.css\";\nimport { DropZone, FileWithPath } from \"./DropZone\";\n\nexport enum ImagePreviewSize {\n\tSMALL = \"small\",\n\tLARGE = \"large\",\n}\n\nexport type ImagePreviewProps = {\n\tid?: string;\n\tvalue: string;\n\tbaseURL: string;\n\tonSetValue?: (value: string) => void;\n\tuploadFunction: FileInputUploadCb;\n\tacceptTypes: string[];\n\tpreviewSize?: ImagePreviewSize;\n};\n\nlet globalCacheIndex = 0;\n\nconst cleanPath = (path: string, baseURL: string) =>\n\tpath\n\t\t.replace(new RegExp(`^${baseURL}`), \"\")\n\t\t.replace(/\\/{1,}/g, \"/\")\n\t\t.replace(/^\\//, \"\");\n\nexport const ImagePreview = (props: ImagePreviewProps) => {\n\tconst [cacheIndex, setCacheIndex] = useState(++globalCacheIndex);\n\tconst previewSize = props.previewSize || ImagePreviewSize.SMALL;\n\tconst [droppedFile, setDroppedFile] = useState<FileWithPath | null>(null);\n\n\tconst [imagePath, setImagePath] = useState(cleanPath(props.value, props.baseURL));\n\n\tuseEffect(() => {\n\t\tif (props.onSetValue) {\n\t\t\tprops.onSetValue(imagePath);\n\t\t}\n\t}, [imagePath]);\n\n\tuseEffect(() => {\n\t\tsetImagePath(cleanPath(props.value, props.baseURL));\n\t}, [props]);\n\n\treturn (\n\t\t<DropZone\n\t\t\tprocessFile={(file: File) => {\n\t\t\t\tsetDroppedFile(file);\n\t\t\t}}\n\t\t>\n\t\t\t<div className={[\"image-preview-container\", `image-preview-size-${previewSize}`].join(\" \")}>\n\t\t\t\t<FileInput\n\t\t\t\t\tvalue={imagePath}\n\t\t\t\t\tuploadFunction={props.uploadFunction}\n\t\t\t\t\tonSetValue={(value: string) => {\n\t\t\t\t\t\tsetImagePath(value);\n\t\t\t\t\t\tsetCacheIndex(++globalCacheIndex);\n\t\t\t\t\t}}\n\t\t\t\t\tacceptTypes={props.acceptTypes}\n\t\t\t\t\tpresetFile={droppedFile}\n\t\t\t\t\tsuppressDropzone={true}\n\t\t\t\t\tallowClearing={false}\n\t\t\t\t\t{...(props.id ? { id: props.id } : {})}\n\t\t\t\t></FileInput>\n\n\t\t\t\t{!imagePath ? (\n\t\t\t\t\t<div className=\"empty-preview\"></div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"filled-preview\">\n\t\t\t\t\t\t<img src={`${props.baseURL}/${imagePath}?${cacheIndex}`} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</DropZone>\n\t);\n};\n"]}
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import "./css/time-select.css";
3
+ export interface TimeSelectProps {
4
+ label?: string;
5
+ initialTime?: TimeSelectTime;
6
+ onChange?: (time: TimeSelectTime) => void;
7
+ enabled?: boolean;
8
+ className?: string;
9
+ minuteInterval?: number;
10
+ }
11
+ export declare type TimeSelectTime = {
12
+ hour: number;
13
+ minute: number;
14
+ meridiem?: string;
15
+ };
16
+ export declare const TimeSelect: React.FunctionComponent<TimeSelectProps>;