@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
@@ -1 +1 @@
1
- {"version":3,"file":"Workspaces.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/Workspaces.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,8EAA8E,CAAC;AACzI,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,mBAAmB,MAAM,mCAAmC,CAAC;AACpE,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAqBhE,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK,CAAC,SAAyB;IAGtE,YAAY,KAAa;;QACxB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,EAAE;YACjB,gBAAgB,EAAE,EAAE;YACpB,sBAAsB,EAAE,IAAI;YAC5B,YAAY,EAAE,EAAE;YAChB,oBAAoB,EAAE,EAAE;YACxB,6BAA6B,EAAE,EAAE;YACjC,kBAAkB,EAAE,MAAA,eAAe,CAAC,aAAa,0CAAE,WAAW;YAC9D,WAAW,EAAE,MAAA,eAAe,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B;wBAChC,oBAAC,mBAAmB,IAAC,6BAA6B,EAAE,IAAI,CAAC,KAAK,CAAC,6BAA6B,GAAI;wBAChG,6BAAK,SAAS,EAAC,0BAA0B;4BACxC,oBAAC,eAAe,IACf,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,IAAI,CAAC,kBAAkB,EACpC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,EACrD,IAAI,EAAC,QAAQ,GACZ;4BAEF,oBAAC,eAAe,IACf,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,IAAI,CAAC,kBAAkB,EACpC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,EACtD,IAAI,EAAC,QAAQ,GACZ,CACG,CACD,CACD;gBACN,oBAAC,QAAQ,IACR,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EACtC,OAAO,EAAE,IAAI,CAAC,yBAAyB,EACvC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAC1E,KAAK,EAAC,gCAAgC,GACrC,CACG,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport async from \"async\";\nimport { Util } from \"@finsemble/finsemble-api\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nimport { Actions as WorkspaceManagementMenuActions } from \"../../../toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore\";\nimport { WorkspaceManagementMenuStore } from \"../../stores/UserPreferencesStore\";\nimport { Checkbox } from \"../../../common/Checkbox\";\nimport { WorkspaceButton } from \"../workspaces/WorkspaceButton\";\nimport WorkspaceComponents from \"../workspaces/WorkspaceComponents\";\nimport WorkspaceItemList from \"../workspaces/WorkspaceItemList\";\nimport { Workspace, ImportWorkspace, WorkspaceTemplate } from \"../../../../types/workspaceTypes\";\n\ninterface IProps {\n\taddListener: (fieldListener: { field: string }, cb: (err: StandardError, data: any) => void) => void;\n\tgetValue: (fieldName: { field: string }, cb: (err: StandardError, data: Workspace[]) => void) => void;\n\tremoveListener: (fieldName: { field: string }, cb: (err: StandardError, data: any) => void) => void;\n}\n\ninterface IState {\n\tinitialAlwaysOnTop: boolean;\n\talwaysOnTop: boolean;\n\tworkspaceList: Workspace[];\n\tfocusedWorkspace: string;\n\tediting: boolean;\n\tworkspaceBeingEdited: string;\n\ttemplateName: string;\n\tadding: boolean;\n\tworkspaceToLoadOnStart: string | null;\n\tfocusedWorkspaceComponentList: string[];\n}\nexport default class Workspaces extends React.Component<IProps, IState> {\n\taddWorkspace?: () => void;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tadding: false,\n\t\t\tediting: false,\n\t\t\tworkspaceList: [],\n\t\t\tfocusedWorkspace: \"\",\n\t\t\tworkspaceToLoadOnStart: null,\n\t\t\ttemplateName: \"\",\n\t\t\tworkspaceBeingEdited: \"\",\n\t\t\tfocusedWorkspaceComponentList: [],\n\t\t\tinitialAlwaysOnTop: finsembleWindow.windowOptions?.alwaysOnTop,\n\t\t\talwaysOnTop: finsembleWindow.windowOptions?.alwaysOnTop,\n\t\t};\n\t\tthis.bindCorrectContext();\n\t\tthis.addListeners();\n\t}\n\n\tresetState() {\n\t\tthis.setState({\n\t\t\tadding: false,\n\t\t\tediting: false,\n\t\t\tfocusedWorkspace: \"\",\n\t\t\ttemplateName: \"\",\n\t\t\tworkspaceBeingEdited: \"\",\n\t\t});\n\t}\n\n\tbindCorrectContext() {\n\t\tthis.deleteWorkspace = this.deleteWorkspace.bind(this);\n\t\tthis.addListeners = this.addListeners.bind(this);\n\t\tthis.setWorkspaceList = this.setWorkspaceList.bind(this);\n\t\tthis.onDragEnd = this.onDragEnd.bind(this);\n\t\tthis.startEditingWorkspace = this.startEditingWorkspace.bind(this);\n\t\tthis.renameWorkspace = this.renameWorkspace.bind(this);\n\t\tthis.cancelEdit = this.cancelEdit.bind(this);\n\t\tthis.setWorkspaceToLoadOnStart = this.setWorkspaceToLoadOnStart.bind(this);\n\t\tthis.setPreferences = this.setPreferences.bind(this);\n\t\tthis.exportWorkspace = this.exportWorkspace.bind(this);\n\t\tthis.handleButtonClicks = this.handleButtonClicks.bind(this);\n\t\tthis.getFocusedWorkspaceComponentList = this.getFocusedWorkspaceComponentList.bind(this);\n\t\tthis.changePreferencesAlwaysOnTop = this.changePreferencesAlwaysOnTop.bind(this);\n\t\tthis.openFileDialog = this.openFileDialog.bind(this);\n\t\tthis.preferencesFocused = this.preferencesFocused.bind(this);\n\t\tthis.setFocusedWorkspace = this.setFocusedWorkspace.bind(this);\n\t}\n\n\tsetWorkspaceList(err: StandardError, data: { value: Workspace[] }) {\n\t\tconsole.log(\"Set workspacelist\", data);\n\t\tif (!data) return;\n\t\tthis.setState({\n\t\t\tworkspaceList: data.value,\n\t\t});\n\t}\n\n\taddListeners() {\n\t\tthis.props.addListener({ field: \"WorkspaceList\" }, this.setWorkspaceList);\n\t}\n\n\t/**\n\t * Sets the windowOptions.alwaysOnTop to the value supplied. The preferences component should\n\t * not be always on top when a file dialog is open.\n\t * @param {boolean} alwaysOnTop The value to set finsembleWindow.options.alwaysOnTop\n\t */\n\tchangePreferencesAlwaysOnTop(alwaysOnTop: boolean) {\n\t\t// The initialAlwaysOnTop check is to prevent making a component be alwaysOnTop when the\n\t\t// client may have set it to alwaysOnTop:false in the config. If that's the case, it should\n\t\t// never set its alwaysOnTop to true and should always remain unchanged\n\t\tif (this.state.initialAlwaysOnTop && FSBL.System.container() === \"Electron\") {\n\t\t\tFSBL.Clients.WindowClient.setAlwaysOnTop(alwaysOnTop, () => {\n\t\t\t\tthis.setState({\n\t\t\t\t\talwaysOnTop,\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\tonDragEnd({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) {\n\t\tlet workspaces = JSON.parse(JSON.stringify(this.state.workspaceList));\n\t\tlet workspaceToMove = JSON.parse(JSON.stringify(workspaces[oldIndex]));\n\t\tworkspaces.splice(oldIndex, 1);\n\t\tworkspaces.splice(newIndex, 0, workspaceToMove);\n\t\tthis.setState({\n\t\t\tworkspaceList: workspaces,\n\t\t});\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\n\t\t\tactionType: \"reorderWorkspace\",\n\t\t\tdata: { oldIndex, newIndex },\n\t\t});\n\t}\n\n\t// returns all the component types of a template definition to display to user for additional info. If multiple components with same type, then instead of listing each\n\t// individually, only one entry will be returned with the count in parentheses.\n\tgetComponentTypes(templateObject: WorkspaceTemplate) {\n\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes templateObject\", templateObject);\n\t\tlet componentType: string;\n\t\tlet componentMap: { [key: string]: number } = {};\n\t\tlet annotatedComponentList = [];\n\t\tfor (let i = 0; i < templateObject.windows.length; i++) {\n\t\t\tlet windowData = templateObject.windowData[i];\n\t\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes loop\", windowData);\n\t\t\tcomponentType = \"Unknown Component\";\n\t\t\tif (windowData) {\n\t\t\t\t// current assimilation doesn't fill in windowData, so in this case use \"Unknown Component\" for component type\n\t\t\t\tcomponentType = windowData.componentType || windowData.customData.component.type;\n\t\t\t} else {\n\t\t\t\tcomponentType = \"Unknown Component\";\n\t\t\t}\n\t\t\tif (!componentMap[componentType]) {\n\t\t\t\tcomponentMap[componentType] = 1;\n\t\t\t} else {\n\t\t\t\tcomponentMap[componentType]++;\n\t\t\t}\n\t\t}\n\n\t\tconst componentTypes = Object.keys(componentMap);\n\t\tfor (let i = 0; i < componentTypes.length; i++) {\n\t\t\tlet annotatedName = componentTypes[i];\n\t\t\tlet identicalCount = componentMap[componentTypes[i]];\n\t\t\tif (identicalCount > 1) {\n\t\t\t\tannotatedName = `${annotatedName} (${identicalCount})`;\n\t\t\t}\n\t\t\tannotatedComponentList.push(annotatedName);\n\t\t}\n\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes\", annotatedComponentList);\n\t\treturn annotatedComponentList;\n\t}\n\n\tsetFocusedWorkspace(workspace: string) {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tfocusedWorkspace: workspace,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.getFocusedWorkspaceComponentList();\n\t\t\t}\n\t\t);\n\t}\n\n\tcancelEdit() {\n\t\tif (this.state.adding) {\n\t\t\tlet { workspaceList } = this.state;\n\t\t\tworkspaceList.pop();\n\t\t\tthis.setFocusedWorkspace(\"\");\n\t\t\tthis.setState({\n\t\t\t\tworkspaceList: workspaceList,\n\t\t\t});\n\t\t}\n\t\tthis.setState({\n\t\t\tediting: false,\n\t\t\tadding: false,\n\t\t\tworkspaceBeingEdited: \"\",\n\t\t});\n\t}\n\n\trenameWorkspace(newName: string) {\n\t\tlet oldName = this.state.workspaceBeingEdited;\n\t\tif (oldName === \"\") {\n\t\t\treturn this.cancelEdit();\n\t\t}\n\n\t\tif (newName === oldName || newName.trim() === \"\") return this.cancelEdit();\n\n\t\tlet newNameCamelCase = Util.camelCase(newName);\n\t\tif (this.state.workspaceList.some((workspace) => Util.camelCase(workspace.name) === newNameCamelCase)) {\n\t\t\tlet notification = new FSBL.Clients.NotificationClient.Notification();\n\t\t\tnotification.source = \"Finsemble\";\n\t\t\tnotification.title = \"Workspace renaming\";\n\t\t\tnotification.details = `Sorry, unable to rename workspace to \"${newName}\". Please use another name.`;\n\t\t\tFSBL.Clients.NotificationClient.notify(notification);\n\t\t\treturn this.cancelEdit();\n\t\t}\n\n\t\tlet updatedWorkspaceList = this.state.workspaceList;\n\t\tlet index = updatedWorkspaceList.findIndex((el) => el.name === oldName);\n\t\t// Set state locally so that the text doesn't change when the input field unmounts.\n\t\tif (index !== -1) {\n\t\t\tupdatedWorkspaceList[index].name = newName;\n\t\t\tthis.setState({\n\t\t\t\tworkspaceList: updatedWorkspaceList,\n\t\t\t});\n\t\t}\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\n\t\t\tactionType: \"renameWorkspace\",\n\t\t\tdata: {\n\t\t\t\toldName: oldName,\n\t\t\t\tnewName: newName,\n\t\t\t},\n\t\t});\n\t\tif (this.state.workspaceToLoadOnStart === oldName) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tfocusedWorkspace: newName,\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tthis.setWorkspaceToLoadOnStart(() => {\n\t\t\t\t\t\tthis.cancelEdit();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tthis.cancelEdit();\n\t\t}\n\t}\n\n\tstartEditingWorkspace(e: React.SyntheticEvent, workspaceName = this.state.focusedWorkspace) {\n\t\t// without preventing this event from reaching the finsemble draggable,\n\t\t// the editor will lose focus and you won't be able to rename your workspaces\n\t\te.stopPropagation();\n\t\tthis.setState({\n\t\t\tediting: true,\n\t\t\tfocusedWorkspace: workspaceName,\n\t\t\tworkspaceBeingEdited: workspaceName,\n\t\t});\n\t}\n\n\tstartExportingTemplate() {\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\n\t\t\tactionType: \"exportWorkspace\",\n\t\t\tdata: {\n\t\t\t\tname: this.state.focusedWorkspace,\n\t\t\t},\n\t\t});\n\t}\n\n\tstartImportingTemplate() {\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\n\t\t\tactionType: \"importTemplate\",\n\t\t\tdata: {\n\t\t\t\tname: this.state.templateName,\n\t\t\t},\n\t\t});\n\t}\n\n\tdeleteWorkspace(workspaceName = this.state.focusedWorkspace) {\n\t\tthis.resetState();\n\n\t\tconst removeWorkspaceFromList = (wasDeleted: boolean) => {\n\t\t\tif (wasDeleted) {\n\t\t\t\tlet workspaceListCopy = [...this.state.workspaceList];\n\t\t\t\tworkspaceListCopy = workspaceListCopy.filter((workspace) => workspace.name !== workspaceName);\n\t\t\t\tthis.setState({ workspaceList: workspaceListCopy });\n\t\t\t}\n\t\t};\n\t\tconst data = {\n\t\t\tname: workspaceName,\n\t\t\thideModalOnClose: false,\n\t\t};\n\n\t\tWorkspaceManagementMenuActions.removeWorkspace(data, removeWorkspaceFromList);\n\t}\n\n\tsetPreferences(err: StandardError, data: any) {\n\t\tconst { value } = data || {};\n\t\tif (!value) return;\n\t\tconsole.log(\"Set preferences\", data.value);\n\t\tthis.setState({\n\t\t\tworkspaceToLoadOnStart: data.value[\"finsemble.initialWorkspace\"],\n\t\t\tfocusedWorkspace: data.value[\"finsemble.initialWorkspace\"],\n\t\t});\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.props.addListener({ field: \"preferences\" }, this.setPreferences);\n\t\tFSBL.Clients.ConfigClient.getPreferences((err, data) => {\n\t\t\tthis.setPreferences(err, { value: data });\n\t\t});\n\t\tthis.props.getValue({ field: \"WorkspaceList\" }, (err: StandardError, data: Workspace[]) => {\n\t\t\tif (data && data.length) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tworkspaceList: data,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.props.removeListener({ field: \"preferences\" }, this.setPreferences);\n\t}\n\n\tsetWorkspaceToLoadOnStart(\n\t\teventOrCb: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement> | (() => void)\n\t) {\n\t\tif (!this.state.focusedWorkspace) return;\n\t\tconst setPreference = () => {\n\t\t\tFSBL.Clients.ConfigClient.setPreference(\n\t\t\t\t{\n\t\t\t\t\tfield: \"finsemble.initialWorkspace\",\n\t\t\t\t\tvalue: this.state.workspaceToLoadOnStart,\n\t\t\t\t},\n\t\t\t\t(err) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tconsole.error(err);\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof eventOrCb === \"function\") {\n\t\t\t\t\t\teventOrCb();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t};\n\t\tif (this.state.focusedWorkspace === this.state.workspaceToLoadOnStart) {\n\t\t\tthis.setState({ workspaceToLoadOnStart: null }, setPreference);\n\t\t} else {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tworkspaceToLoadOnStart: this.state.focusedWorkspace,\n\t\t\t\t},\n\t\t\t\tsetPreference\n\t\t\t);\n\t\t}\n\t}\n\n\topenFileDialog() {\n\t\t// Set alwaysOnTop to false and add an event listener on the window. When focus is regained\n\t\t// then reset always on top\n\t\tthis.changePreferencesAlwaysOnTop(false);\n\t\tfinsembleWindow.addEventListener(\"focused\", this.preferencesFocused);\n\t\tlet inputElement = document.getElementById(\"file-input\");\n\t\tinputElement?.addEventListener(\"change\", this.importWorkspace as ImportWorkspace, false);\n\t\tinputElement?.click();\n\t}\n\n\t/**\n\t * If the event is being listened to, when the preferences component is focused\n\t * it will set always on top to true, and remove the event listener\n\t *\n\t * This is to handle bringing alwaysOnTop back to true when file dialogs are closed\n\t * without changes (also handles bringing back to front after exporting)\n\t */\n\tpreferencesFocused() {\n\t\tfinsembleWindow.removeEventListener(\"focused\", this.preferencesFocused);\n\t\tthis.changePreferencesAlwaysOnTop(true);\n\t}\n\n\timportWorkspace(\n\t\tevt: Event & {\n\t\t\ttarget: {\n\t\t\t\tfiles: File[];\n\t\t\t\tvalue?: string | string[];\n\t\t\t};\n\t\t}\n\t): void {\n\t\tlet inputElement = document.getElementById(\"file-input\") as HTMLInputElement;\n\t\tinputElement?.removeEventListener(\"change\", this.importWorkspace as ImportWorkspace);\n\t\tconst { files } = evt.target; // FileList object\n\n\t\tfunction loadFile(file: File, done: () => void) {\n\t\t\tconst reader = new FileReader();\n\t\t\tlet fileName = evt.target.value;\n\t\t\t// When the file info is loaded, we get into here..\n\t\t\treader.onload = function (e) {\n\t\t\t\tfileName = (fileName as string).split(\"\\\\\");\n\t\t\t\tfileName = fileName[fileName.length - 1].replace(\".json\", \"\");\n\t\t\t\tlet workspaceTemplateDefinition = JSON.parse(e?.target?.result as string);\n\t\t\t\tlet templateName = Object.keys(workspaceTemplateDefinition.workspaceTemplates)[0];\n\t\t\t\tif (fileName !== templateName) {\n\t\t\t\t\t// We want the file name to overwrite the name of the workspace that was saved as the template..\n\t\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[fileName] =\n\t\t\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[templateName];\n\t\t\t\t\tdelete workspaceTemplateDefinition.workspaceTemplates[templateName];\n\t\t\t\t}\n\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[fileName].name = fileName;\n\t\t\t\tFSBL.Clients.WorkspaceClient.addWorkspaceDefinition(\n\t\t\t\t\t{\n\t\t\t\t\t\tworkspaceJSONDefinition: workspaceTemplateDefinition.workspaceTemplates,\n\t\t\t\t\t\tforce: false,\n\t\t\t\t\t},\n\t\t\t\t\t(err: StandardError) => {\n\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\tFSBL.Clients.Logger.system.info(\"addWorkspaceTemplateDefinition error\", err);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdone();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t};\n\n\t\t\t// Read in the image file as a data URL.\n\t\t\treader.readAsText(file);\n\t\t}\n\n\t\tasync.each(files, loadFile, () => {\n\t\t\t// Clear out files. so if the user imports the same file back-to-back, the event will fire.\n\t\t\tif (inputElement?.value) {\n\t\t\t\tinputElement.value = \"\";\n\t\t\t}\n\t\t\tFSBL.Clients.Logger.system.info(\"Workspaces imported\");\n\t\t});\n\t}\n\n\texportWorkspace() {\n\t\tif (this.state.focusedWorkspace === \"\") return;\n\t\tconst doExport = () => {\n\t\t\tFSBL.Clients.WorkspaceClient.getWorkspaceDefinition(\n\t\t\t\t{ workspaceName: this.state.focusedWorkspace },\n\t\t\t\t(err: StandardError, workspaceDefinition: string) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tFSBL.Clients.Logger.system.error(\"getWorkspaceDefinition error\", err);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// We're saving using a routine initially created for templates. The outcome is the same and it probably should have just been \"Save to file\". This bool is to allow it to save.\n\t\t\t\t\t\tFSBL.ConfigUtils.promptAndSaveJSONToLocalFile(this.state.focusedWorkspace, {\n\t\t\t\t\t\t\tworkspaceTemplates: workspaceDefinition,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t};\n\n\t\t// Set alwaysOnTop to false and add an event listener on the window. When focus is regained\n\t\t// then reset always on top\n\t\tthis.changePreferencesAlwaysOnTop(false);\n\t\tfinsembleWindow.addEventListener(\"focused\", this.preferencesFocused);\n\t\t// If we're autosaving, autosave, then export.\n\t\tFSBL.Clients.ConfigClient.getValue(\n\t\t\t{\n\t\t\t\tfield: \"finsemble.preferences.workspaceService.promptUserOnDirtyWorkspace\",\n\t\t\t},\n\t\t\t(err, data) => {\n\t\t\t\t// default to false.\n\t\t\t\tlet PROMPT_ON_SAVE = data === null ? false : data;\n\t\t\t\tif (!PROMPT_ON_SAVE) {\n\t\t\t\t\tlet activeName = FSBL?.Clients?.WorkspaceClient?.activeWorkspace?.name;\n\t\t\t\t\treturn FSBL.Clients.WorkspaceClient.saveAs(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: activeName,\n\t\t\t\t\t\t\tforce: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tdoExport();\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tdoExport();\n\t\t\t}\n\t\t);\n\t}\n\n\thandleButtonClicks(e: React.MouseEvent<HTMLDivElement>) {\n\t\tif (this.state.adding || this.state.editing) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\tgetFocusedWorkspaceComponentList() {\n\t\tlet { workspaceList, focusedWorkspace } = this.state;\n\t\tif (focusedWorkspace === \"\") return [];\n\t\tlet workspace = workspaceList.filter((wSpace) => wSpace.name === focusedWorkspace)[0];\n\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceDefinition(\n\t\t\t{ workspaceName: focusedWorkspace },\n\t\t\t(\n\t\t\t\t_: StandardError,\n\t\t\t\tworkspaceDefinition: {\n\t\t\t\t\t[key: string]: WorkspaceTemplate;\n\t\t\t\t}\n\t\t\t) => {\n\t\t\t\tlet componentTypes = workspace?.components;\n\t\t\t\ttry {\n\t\t\t\t\tcomponentTypes = this.getComponentTypes(workspaceDefinition[focusedWorkspace]);\n\t\t\t\t} catch (err) {\n\t\t\t\t} finally {\n\t\t\t\t\tif (componentTypes) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tfocusedWorkspaceComponentList: componentTypes,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\trender() {\n\t\tlet deleteButtonClasses = \"individual-workspace-action delete-workspace\",\n\t\t\trenameButtonClasses = \"individual-workspace-action\",\n\t\t\tallowDelete = true,\n\t\t\tallowExport = true,\n\t\t\tallowRename = true,\n\t\t\tallowImport = true,\n\t\t\tdeleteTooltip = \"Delete\";\n\n\t\tif (this.state.focusedWorkspace === FSBL?.Clients?.WorkspaceClient?.activeWorkspace?.name) {\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-individual-workspace-action`;\n\t\t}\n\n\t\tif (this.state.focusedWorkspace === \"\") {\n\t\t\trenameButtonClasses = `${renameButtonClasses} disabled-individual-workspace-action`;\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-individual-workspace-action`;\n\t\t\tdeleteTooltip = \"No workspace selected\";\n\t\t\tallowRename = false;\n\t\t\tallowExport = false;\n\t\t\tallowDelete = false;\n\t\t}\n\n\t\tif (this.state.adding || this.state.editing) {\n\t\t\trenameButtonClasses = `${renameButtonClasses} disabled-button`;\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-button`;\n\t\t\tallowDelete = false;\n\t\t\tallowExport = false;\n\t\t\tallowRename = false;\n\t\t\tallowImport = false;\n\t\t}\n\n\t\tlet importTooltip = \"Import workspace from file\",\n\t\t\texportTooltip = allowExport ? \"Export selected workspace\" : \"No workspace selected\",\n\t\t\trenameTooltip = allowRename ? \"Rename\" : \"Cannot Edit\";\n\n\t\treturn (\n\t\t\t<div style={{ paddingLeft: 10 }}>\n\t\t\t\t<input style={{ display: \"none\" }} type=\"file\" id=\"file-input\" />\n\t\t\t\t<div className=\"complex-menu-content-row\">\n\t\t\t\t\t<div className=\"workspace-list-header-row\">\n\t\t\t\t\t\t<div className=\"content-section-header workspace-list-header\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"content-section-wrapper\">\n\t\t\t\t\t\t<WorkspaceItemList\n\t\t\t\t\t\t\tonDragEnd={this.onDragEnd}\n\t\t\t\t\t\t\tworkspaceList={this.state.workspaceList}\n\t\t\t\t\t\t\tallowDelete={allowDelete}\n\t\t\t\t\t\t\tdeleteButtonClasses={deleteButtonClasses}\n\t\t\t\t\t\t\tdeleteTooltip={deleteTooltip}\n\t\t\t\t\t\t\tworkspaceToLoadOnStart={this.state.workspaceToLoadOnStart}\n\t\t\t\t\t\t\tfocusedWorkspace={this.state.focusedWorkspace}\n\t\t\t\t\t\t\tediting={this.state.editing}\n\t\t\t\t\t\t\tadding={this.state.adding}\n\t\t\t\t\t\t\trenameWorkspace={this.renameWorkspace}\n\t\t\t\t\t\t\taddWorkspace={this.addWorkspace}\n\t\t\t\t\t\t\tcancelEdit={this.cancelEdit}\n\t\t\t\t\t\t\tsetFocusedWorkspace={this.setFocusedWorkspace}\n\t\t\t\t\t\t\trenameTooltip={renameTooltip}\n\t\t\t\t\t\t\trenameButtonClasses={renameButtonClasses}\n\t\t\t\t\t\t\tallowRename={allowRename}\n\t\t\t\t\t\t\thandleButtonClicks={this.handleButtonClicks}\n\t\t\t\t\t\t\tstartEditingWorkspace={this.startEditingWorkspace}\n\t\t\t\t\t\t\tdeleteWorkspace={this.deleteWorkspace}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"workspace-extras\">\n\t\t\t\t\t\t\t<WorkspaceComponents focusedWorkspaceComponentList={this.state.focusedWorkspaceComponentList} />\n\t\t\t\t\t\t\t<div className=\"workspace-action-buttons\">\n\t\t\t\t\t\t\t\t<WorkspaceButton\n\t\t\t\t\t\t\t\t\ttitle={importTooltip}\n\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\n\t\t\t\t\t\t\t\t\tonClick={allowImport ? this.openFileDialog : () => {}}\n\t\t\t\t\t\t\t\t\ttype=\"import\"\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<WorkspaceButton\n\t\t\t\t\t\t\t\t\ttitle={exportTooltip}\n\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\n\t\t\t\t\t\t\t\t\tonClick={allowExport ? this.exportWorkspace : () => {}}\n\t\t\t\t\t\t\t\t\ttype=\"export\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Checkbox\n\t\t\t\t\t\tdisabled={!this.state.focusedWorkspace}\n\t\t\t\t\t\tonClick={this.setWorkspaceToLoadOnStart}\n\t\t\t\t\t\tchecked={this.state.focusedWorkspace === this.state.workspaceToLoadOnStart}\n\t\t\t\t\t\tlabel=\"Load this workspace on startup\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"Workspaces.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/content/Workspaces.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,8EAA8E,CAAC;AACzI,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AAE,IAAI,CAAC,kBAAkB,EACpC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,EACrD,IAAI,EAAC,QAAQ,GACZ;4BAEF,oBAAC,eAAe,IACf,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,IAAI,CAAC,kBAAkB,EACpC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,EACtD,IAAI,EAAC,QAAQ,GACZ,CACG,CACD,CACD;gBACN,oBAAC,QAAQ,IACR,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EACtC,OAAO,EAAE,IAAI,CAAC,yBAAyB,EACvC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,KAAK,IAAI,CAAC,KAAK,CAAC,sBAAsB,EAC1E,KAAK,EAAC,gCAAgC,GACrC;gBACF,mDAAW;gBACX,oBAAC,QAAQ,IACR,OAAO,EAAE,IAAI,CAAC,gCAAgC,EAC9C,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EAC9C,KAAK,EAAC,gCAAgC,GACrC;gBACF,8BAAM,SAAS,EAAC,aAAa;oBAC5B,oBAAC,QAAQ,IACR,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,EAC/C,OAAO,EAAE,IAAI,CAAC,2BAA2B,EACzC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,EACzC,KAAK,EAAC,yBAAyB,GAC9B,CACI,CACF,CACD,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["import React from \"react\";\nimport async from \"async\";\nimport { Util } from \"@finsemble/finsemble-api\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nimport { Actions as WorkspaceManagementMenuActions } from \"../../../toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore\";\nimport { WorkspaceManagementMenuStore } from \"../../stores/UserPreferencesStore\";\nimport { Checkbox } from \"../../../common/Checkbox\";\nimport { WorkspaceButton } from \"../workspaces/WorkspaceButton\";\nimport WorkspaceComponents from \"../workspaces/WorkspaceComponents\";\nimport WorkspaceItemList from \"../workspaces/WorkspaceItemList\";\nimport { Workspace, ImportWorkspace, WorkspaceTemplate } from \"../../../../types/workspaceTypes\";\n\ninterface IProps {\n\taddListener: (fieldListener: { field: string }, cb: (err: StandardError, data: any) => void) => void;\n\tgetValue: (fieldName: { field: string }, cb: (err: StandardError, data: Workspace[]) => void) => void;\n\tremoveListener: (fieldName: { field: string }, cb: (err: StandardError, data: any) => void) => void;\n}\n\ninterface IState {\n\tinitialAlwaysOnTop: boolean;\n\talwaysOnTop: boolean;\n\tworkspaceList: Workspace[];\n\tfocusedWorkspace: string;\n\tediting: boolean;\n\tworkspaceBeingEdited: string;\n\ttemplateName: string;\n\tadding: boolean;\n\tworkspaceToLoadOnStart: string | null;\n\tfocusedWorkspaceComponentList: string[];\n\n\tpromptUserOnDirtyWorkspace: boolean;\n\tdiscardUnsavedChanges: boolean;\n}\n\nconst WORKSPACE_PREFERENCES = {\n\tPROMPT_USER_ON_DIRTY_WORKSPACE: \"finsemble.servicesConfig.workspace.promptUserOnDirtyWorkspace\",\n\tDISCARD_UNSAVED_CHANGES: \"finsemble.servicesConfig.workspace.discardUnsavedChanges\",\n};\n\nexport default class Workspaces extends React.Component<IProps, IState> {\n\taddWorkspace?: () => void;\n\n\tconstructor(props: IProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tadding: false,\n\t\t\tediting: false,\n\t\t\tworkspaceList: [],\n\t\t\tfocusedWorkspace: \"\",\n\t\t\tworkspaceToLoadOnStart: null,\n\t\t\ttemplateName: \"\",\n\t\t\tworkspaceBeingEdited: \"\",\n\t\t\tfocusedWorkspaceComponentList: [],\n\t\t\tinitialAlwaysOnTop: finsembleWindow.windowOptions?.alwaysOnTop,\n\t\t\talwaysOnTop: finsembleWindow.windowOptions?.alwaysOnTop,\n\t\t\tpromptUserOnDirtyWorkspace: true,\n\t\t\tdiscardUnsavedChanges: false,\n\t\t};\n\t\tthis.bindCorrectContext();\n\t\tthis.addListeners();\n\t}\n\n\tresetState() {\n\t\tthis.setState({\n\t\t\tadding: false,\n\t\t\tediting: false,\n\t\t\tfocusedWorkspace: \"\",\n\t\t\ttemplateName: \"\",\n\t\t\tworkspaceBeingEdited: \"\",\n\t\t});\n\t}\n\n\tbindCorrectContext() {\n\t\tthis.deleteWorkspace = this.deleteWorkspace.bind(this);\n\t\tthis.addListeners = this.addListeners.bind(this);\n\t\tthis.setWorkspaceList = this.setWorkspaceList.bind(this);\n\t\tthis.onDragEnd = this.onDragEnd.bind(this);\n\t\tthis.startEditingWorkspace = this.startEditingWorkspace.bind(this);\n\t\tthis.renameWorkspace = this.renameWorkspace.bind(this);\n\t\tthis.cancelEdit = this.cancelEdit.bind(this);\n\t\tthis.setWorkspaceToLoadOnStart = this.setWorkspaceToLoadOnStart.bind(this);\n\t\tthis.setPreferences = this.setPreferences.bind(this);\n\t\tthis.exportWorkspace = this.exportWorkspace.bind(this);\n\t\tthis.handleButtonClicks = this.handleButtonClicks.bind(this);\n\t\tthis.getFocusedWorkspaceComponentList = this.getFocusedWorkspaceComponentList.bind(this);\n\t\tthis.changePreferencesAlwaysOnTop = this.changePreferencesAlwaysOnTop.bind(this);\n\t\tthis.openFileDialog = this.openFileDialog.bind(this);\n\t\tthis.preferencesFocused = this.preferencesFocused.bind(this);\n\t\tthis.setFocusedWorkspace = this.setFocusedWorkspace.bind(this);\n\n\t\tthis.toggleDiscardUnsavedChanges = this.toggleDiscardUnsavedChanges.bind(this);\n\t\tthis.togglePromptUserOnDirtyWorkspace = this.togglePromptUserOnDirtyWorkspace.bind(this);\n\t}\n\n\tsetWorkspaceList(err: StandardError, data: { value: Workspace[] }) {\n\t\tconsole.log(\"Set workspacelist\", data);\n\t\tif (!data) return;\n\t\tthis.setState({\n\t\t\tworkspaceList: data.value,\n\t\t});\n\t}\n\n\taddListeners() {\n\t\tthis.props.addListener({ field: \"WorkspaceList\" }, this.setWorkspaceList);\n\t}\n\n\t/**\n\t * Sets the windowOptions.alwaysOnTop to the value supplied. The preferences component should\n\t * not be always on top when a file dialog is open.\n\t * @param {boolean} alwaysOnTop The value to set finsembleWindow.options.alwaysOnTop\n\t */\n\tchangePreferencesAlwaysOnTop(alwaysOnTop: boolean) {\n\t\t// The initialAlwaysOnTop check is to prevent making a component be alwaysOnTop when the\n\t\t// client may have set it to alwaysOnTop:false in the config. If that's the case, it should\n\t\t// never set its alwaysOnTop to true and should always remain unchanged\n\t\tif (this.state.initialAlwaysOnTop) {\n\t\t\tFSBL.Clients.WindowClient.setAlwaysOnTop(alwaysOnTop, () => {\n\t\t\t\tthis.setState({\n\t\t\t\t\talwaysOnTop,\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\tonDragEnd({ oldIndex, newIndex }: { oldIndex: number; newIndex: number }) {\n\t\tlet workspaces = JSON.parse(JSON.stringify(this.state.workspaceList));\n\t\tlet workspaceToMove = JSON.parse(JSON.stringify(workspaces[oldIndex]));\n\t\tworkspaces.splice(oldIndex, 1);\n\t\tworkspaces.splice(newIndex, 0, workspaceToMove);\n\t\tthis.setState({\n\t\t\tworkspaceList: workspaces,\n\t\t});\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\n\t\t\tactionType: \"reorderWorkspace\",\n\t\t\tdata: { oldIndex, newIndex },\n\t\t});\n\t}\n\n\t// returns all the component types of a template definition to display to user for additional info. If multiple components with same type, then instead of listing each\n\t// individually, only one entry will be returned with the count in parentheses.\n\tgetComponentTypes(templateObject: WorkspaceTemplate) {\n\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes templateObject\", templateObject);\n\t\tlet componentType: string;\n\t\tlet componentMap: { [key: string]: number } = {};\n\t\tlet annotatedComponentList = [];\n\t\tfor (let i = 0; i < templateObject.windows.length; i++) {\n\t\t\tlet windowData = templateObject.windowData[i];\n\t\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes loop\", windowData);\n\t\t\tcomponentType = \"Unknown Component\";\n\t\t\tif (windowData) {\n\t\t\t\t// current assimilation doesn't fill in windowData, so in this case use \"Unknown Component\" for component type\n\t\t\t\tcomponentType = windowData.componentType || windowData.customData.component.type;\n\t\t\t} else {\n\t\t\t\tcomponentType = \"Unknown Component\";\n\t\t\t}\n\t\t\tif (!componentMap[componentType]) {\n\t\t\t\tcomponentMap[componentType] = 1;\n\t\t\t} else {\n\t\t\t\tcomponentMap[componentType]++;\n\t\t\t}\n\t\t}\n\n\t\tconst componentTypes = Object.keys(componentMap);\n\t\tfor (let i = 0; i < componentTypes.length; i++) {\n\t\t\tlet annotatedName = componentTypes[i];\n\t\t\tlet identicalCount = componentMap[componentTypes[i]];\n\t\t\tif (identicalCount > 1) {\n\t\t\t\tannotatedName = `${annotatedName} (${identicalCount})`;\n\t\t\t}\n\t\t\tannotatedComponentList.push(annotatedName);\n\t\t}\n\t\tFSBL.Clients.Logger.system.debug(\"getComponentTypes\", annotatedComponentList);\n\t\treturn annotatedComponentList;\n\t}\n\n\tsetFocusedWorkspace(workspace: string) {\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tfocusedWorkspace: workspace,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.getFocusedWorkspaceComponentList();\n\t\t\t}\n\t\t);\n\t}\n\n\tcancelEdit() {\n\t\tif (this.state.adding) {\n\t\t\tlet { workspaceList } = this.state;\n\t\t\tworkspaceList.pop();\n\t\t\tthis.setFocusedWorkspace(\"\");\n\t\t\tthis.setState({\n\t\t\t\tworkspaceList: workspaceList,\n\t\t\t});\n\t\t}\n\t\tthis.setState({\n\t\t\tediting: false,\n\t\t\tadding: false,\n\t\t\tworkspaceBeingEdited: \"\",\n\t\t});\n\t}\n\n\trenameWorkspace(newName: string) {\n\t\tlet oldName = this.state.workspaceBeingEdited;\n\t\tif (oldName === \"\") {\n\t\t\treturn this.cancelEdit();\n\t\t}\n\n\t\tif (newName === oldName || newName.trim() === \"\") return this.cancelEdit();\n\n\t\tlet newNameCamelCase = Util.camelCase(newName);\n\t\tif (this.state.workspaceList.some((workspace) => Util.camelCase(workspace.name) === newNameCamelCase)) {\n\t\t\tlet notification = new FSBL.Clients.NotificationClient.Notification();\n\t\t\tnotification.source = \"Finsemble\";\n\t\t\tnotification.title = \"Workspace renaming\";\n\t\t\tnotification.details = `Sorry, unable to rename workspace to \"${newName}\". Please use another name.`;\n\t\t\tFSBL.Clients.NotificationClient.notify(notification);\n\t\t\treturn this.cancelEdit();\n\t\t}\n\n\t\tlet updatedWorkspaceList = this.state.workspaceList;\n\t\tlet index = updatedWorkspaceList.findIndex((el) => el.name === oldName);\n\t\t// Set state locally so that the text doesn't change when the input field unmounts.\n\t\tif (index !== -1) {\n\t\t\tupdatedWorkspaceList[index].name = newName;\n\t\t\tthis.setState({\n\t\t\t\tworkspaceList: updatedWorkspaceList,\n\t\t\t});\n\t\t}\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\n\t\t\tactionType: \"renameWorkspace\",\n\t\t\tdata: {\n\t\t\t\toldName: oldName,\n\t\t\t\tnewName: newName,\n\t\t\t},\n\t\t});\n\t\tif (this.state.workspaceToLoadOnStart === oldName) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tfocusedWorkspace: newName,\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tthis.setWorkspaceToLoadOnStart(() => {\n\t\t\t\t\t\tthis.cancelEdit();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tthis.cancelEdit();\n\t\t}\n\t}\n\n\tstartEditingWorkspace(e: React.SyntheticEvent, workspaceName = this.state.focusedWorkspace) {\n\t\t// without preventing this event from reaching the finsemble draggable,\n\t\t// the editor will lose focus and you won't be able to rename your workspaces\n\t\te.stopPropagation();\n\t\tthis.setState({\n\t\t\tediting: true,\n\t\t\tfocusedWorkspace: workspaceName,\n\t\t\tworkspaceBeingEdited: workspaceName,\n\t\t});\n\t}\n\n\tstartExportingTemplate() {\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\n\t\t\tactionType: \"exportWorkspace\",\n\t\t\tdata: {\n\t\t\t\tname: this.state.focusedWorkspace,\n\t\t\t},\n\t\t});\n\t}\n\n\tstartImportingTemplate() {\n\t\tWorkspaceManagementMenuStore?.Dispatcher.dispatch({\n\t\t\tactionType: \"importTemplate\",\n\t\t\tdata: {\n\t\t\t\tname: this.state.templateName,\n\t\t\t},\n\t\t});\n\t}\n\n\tdeleteWorkspace(workspaceName = this.state.focusedWorkspace) {\n\t\tthis.resetState();\n\n\t\tconst removeWorkspaceFromList = (wasDeleted: boolean) => {\n\t\t\tif (wasDeleted) {\n\t\t\t\tlet workspaceListCopy = [...this.state.workspaceList];\n\t\t\t\tworkspaceListCopy = workspaceListCopy.filter((workspace) => workspace.name !== workspaceName);\n\t\t\t\tthis.setState({ workspaceList: workspaceListCopy });\n\t\t\t}\n\t\t};\n\t\tconst data = {\n\t\t\tname: workspaceName,\n\t\t\thideModalOnClose: false,\n\t\t};\n\n\t\tWorkspaceManagementMenuActions.removeWorkspace(data, removeWorkspaceFromList);\n\t}\n\n\tsetPreferences(err: StandardError, data: any) {\n\t\tconst { value } = data || {};\n\t\tif (!value) return;\n\t\tconsole.log(\"Set preferences\", data.value);\n\t\tthis.setState({\n\t\t\tworkspaceToLoadOnStart: data.value[\"finsemble.initialWorkspace\"],\n\t\t\tfocusedWorkspace: data.value[\"finsemble.initialWorkspace\"],\n\t\t});\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.props.addListener({ field: \"preferences\" }, this.setPreferences);\n\t\tFSBL.Clients.ConfigClient.getPreferences((err, data) => {\n\t\t\tthis.setPreferences(err, { value: data });\n\t\t});\n\n\t\tFSBL.Clients.ConfigClient.getValues(\n\t\t\t[WORKSPACE_PREFERENCES.PROMPT_USER_ON_DIRTY_WORKSPACE, WORKSPACE_PREFERENCES.DISCARD_UNSAVED_CHANGES],\n\t\t\t(err, values) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tFSBL.Clients.Logger.system.info(\"componentDidMount.getValues error\", err);\n\t\t\t\t}\n\n\t\t\t\tif (values) {\n\t\t\t\t\tthis.setState({\n\t\t\t\t\t\tpromptUserOnDirtyWorkspace: values[WORKSPACE_PREFERENCES.PROMPT_USER_ON_DIRTY_WORKSPACE],\n\t\t\t\t\t\tdiscardUnsavedChanges: values[WORKSPACE_PREFERENCES.DISCARD_UNSAVED_CHANGES],\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.props.getValue({ field: \"WorkspaceList\" }, (err: StandardError, data: Workspace[]) => {\n\t\t\tif (data && data.length) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tworkspaceList: data,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.props.removeListener({ field: \"preferences\" }, this.setPreferences);\n\t}\n\n\tsetPreference(field: string, value: any, cb?: Function) {\n\t\tFSBL.Clients.ConfigClient.setPreference(\n\t\t\t{\n\t\t\t\tfield,\n\t\t\t\tvalue,\n\t\t\t},\n\t\t\t(err) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tconsole.error(err);\n\t\t\t\t}\n\t\t\t\tif (cb) {\n\t\t\t\t\tcb();\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\tsetWorkspaceToLoadOnStart(\n\t\teventOrCb: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement> | (() => void)\n\t) {\n\t\tif (!this.state.focusedWorkspace) return;\n\t\tif (this.state.focusedWorkspace === this.state.workspaceToLoadOnStart) {\n\t\t\tthis.setState({ workspaceToLoadOnStart: null }, () => this.setPreference(\"finsemble.initialWorkspace\", null));\n\t\t} else {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tworkspaceToLoadOnStart: this.state.focusedWorkspace,\n\t\t\t\t},\n\t\t\t\t() => this.setPreference(\"finsemble.initialWorkspace\", this.state.focusedWorkspace)\n\t\t\t);\n\t\t}\n\t}\n\n\topenFileDialog() {\n\t\t// Set alwaysOnTop to false and add an event listener on the window. When focus is regained\n\t\t// then reset always on top\n\t\tthis.changePreferencesAlwaysOnTop(false);\n\t\tfinsembleWindow.addEventListener(\"focused\", this.preferencesFocused);\n\t\tlet inputElement = document.getElementById(\"file-input\");\n\t\tinputElement?.addEventListener(\"change\", this.importWorkspace as ImportWorkspace, false);\n\t\tinputElement?.click();\n\t}\n\n\t/**\n\t * If the event is being listened to, when the preferences component is focused\n\t * it will set always on top to true, and remove the event listener\n\t *\n\t * This is to handle bringing alwaysOnTop back to true when file dialogs are closed\n\t * without changes (also handles bringing back to front after exporting)\n\t */\n\tpreferencesFocused() {\n\t\tfinsembleWindow.removeEventListener(\"focused\", this.preferencesFocused);\n\t\tthis.changePreferencesAlwaysOnTop(true);\n\t}\n\n\timportWorkspace(\n\t\tevt: Event & {\n\t\t\ttarget: {\n\t\t\t\tfiles: File[];\n\t\t\t\tvalue?: string | string[];\n\t\t\t};\n\t\t}\n\t): void {\n\t\tlet inputElement = document.getElementById(\"file-input\") as HTMLInputElement;\n\t\tinputElement?.removeEventListener(\"change\", this.importWorkspace as ImportWorkspace);\n\t\tconst { files } = evt.target; // FileList object\n\n\t\tfunction loadFile(file: File, done: () => void) {\n\t\t\tconst reader = new FileReader();\n\t\t\tlet fileName = evt.target.value;\n\t\t\t// When the file info is loaded, we get into here..\n\t\t\treader.onload = function (e) {\n\t\t\t\tfileName = (fileName as string).split(\"\\\\\");\n\t\t\t\tfileName = fileName[fileName.length - 1].replace(\".json\", \"\");\n\t\t\t\tlet workspaceTemplateDefinition = JSON.parse(e?.target?.result as string);\n\t\t\t\tlet templateName = Object.keys(workspaceTemplateDefinition.workspaceTemplates)[0];\n\t\t\t\tif (fileName !== templateName) {\n\t\t\t\t\t// We want the file name to overwrite the name of the workspace that was saved as the template..\n\t\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[fileName] =\n\t\t\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[templateName];\n\t\t\t\t\tdelete workspaceTemplateDefinition.workspaceTemplates[templateName];\n\t\t\t\t}\n\t\t\t\tworkspaceTemplateDefinition.workspaceTemplates[fileName].name = fileName;\n\t\t\t\tFSBL.Clients.WorkspaceClient.addWorkspaceDefinition(\n\t\t\t\t\t{\n\t\t\t\t\t\tworkspaceJSONDefinition: workspaceTemplateDefinition.workspaceTemplates,\n\t\t\t\t\t\tforce: false,\n\t\t\t\t\t},\n\t\t\t\t\t(err: StandardError) => {\n\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\tFSBL.Clients.Logger.system.info(\"addWorkspaceTemplateDefinition error\", err);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdone();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t};\n\n\t\t\t// Read in the image file as a data URL.\n\t\t\treader.readAsText(file);\n\t\t}\n\n\t\tasync.each(files, loadFile, () => {\n\t\t\t// Clear out files. so if the user imports the same file back-to-back, the event will fire.\n\t\t\tif (inputElement?.value) {\n\t\t\t\tinputElement.value = \"\";\n\t\t\t}\n\t\t\tFSBL.Clients.Logger.system.info(\"Workspaces imported\");\n\t\t});\n\t}\n\n\texportWorkspace() {\n\t\tif (this.state.focusedWorkspace === \"\") return;\n\t\tconst doExport = () => {\n\t\t\tFSBL.Clients.WorkspaceClient.getWorkspaceDefinition(\n\t\t\t\t{ workspaceName: this.state.focusedWorkspace },\n\t\t\t\t(err: StandardError, workspaceDefinition: string) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tFSBL.Clients.Logger.system.error(\"getWorkspaceDefinition error\", err);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// We're saving using a routine initially created for templates. The outcome is the same and it probably should have just been \"Save to file\". This bool is to allow it to save.\n\t\t\t\t\t\tFSBL.ConfigUtils.promptAndSaveJSONToLocalFile(this.state.focusedWorkspace, {\n\t\t\t\t\t\t\tworkspaceTemplates: workspaceDefinition,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t};\n\n\t\t// Set alwaysOnTop to false and add an event listener on the window. When focus is regained\n\t\t// then reset always on top\n\t\tthis.changePreferencesAlwaysOnTop(false);\n\t\tfinsembleWindow.addEventListener(\"focused\", this.preferencesFocused);\n\t\t// If we're autosaving, autosave, then export.\n\t\tFSBL.Clients.ConfigClient.getValue(\n\t\t\t{\n\t\t\t\tfield: \"finsemble.preferences.workspaceService.promptUserOnDirtyWorkspace\",\n\t\t\t},\n\t\t\t(err, data) => {\n\t\t\t\t// default to false.\n\t\t\t\tlet PROMPT_ON_SAVE = data === null ? false : data;\n\t\t\t\tif (!PROMPT_ON_SAVE) {\n\t\t\t\t\tlet activeName = FSBL?.Clients?.WorkspaceClient?.activeWorkspace?.name;\n\t\t\t\t\treturn FSBL.Clients.WorkspaceClient.saveAs(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: activeName,\n\t\t\t\t\t\t\tforce: true,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\tdoExport();\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tdoExport();\n\t\t\t}\n\t\t);\n\t}\n\n\thandleButtonClicks(e: React.MouseEvent<HTMLDivElement>) {\n\t\tif (this.state.adding || this.state.editing) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\tgetFocusedWorkspaceComponentList() {\n\t\tlet { workspaceList, focusedWorkspace } = this.state;\n\t\tif (focusedWorkspace === \"\") return [];\n\t\tlet workspace = workspaceList.filter((wSpace) => wSpace.name === focusedWorkspace)[0];\n\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceDefinition(\n\t\t\t{ workspaceName: focusedWorkspace },\n\t\t\t(\n\t\t\t\t_: StandardError,\n\t\t\t\tworkspaceDefinition: {\n\t\t\t\t\t[key: string]: WorkspaceTemplate;\n\t\t\t\t}\n\t\t\t) => {\n\t\t\t\tlet componentTypes = workspace?.components;\n\t\t\t\ttry {\n\t\t\t\t\tcomponentTypes = this.getComponentTypes(workspaceDefinition[focusedWorkspace]);\n\t\t\t\t} catch (err) {\n\t\t\t\t} finally {\n\t\t\t\t\tif (componentTypes) {\n\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\tfocusedWorkspaceComponentList: componentTypes,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\ttoggleDiscardUnsavedChanges() {\n\t\tconst newValue = !this.state.discardUnsavedChanges;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tdiscardUnsavedChanges: newValue,\n\t\t\t},\n\t\t\t() => this.setPreference(WORKSPACE_PREFERENCES.DISCARD_UNSAVED_CHANGES, newValue)\n\t\t);\n\t}\n\n\ttogglePromptUserOnDirtyWorkspace() {\n\t\tconst newValue = !this.state.promptUserOnDirtyWorkspace;\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tpromptUserOnDirtyWorkspace: newValue,\n\t\t\t\tdiscardUnsavedChanges: newValue ? false : this.state.discardUnsavedChanges,\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.setPreference(WORKSPACE_PREFERENCES.PROMPT_USER_ON_DIRTY_WORKSPACE, newValue);\n\t\t\t\tif (newValue) {\n\t\t\t\t\tthis.setPreference(WORKSPACE_PREFERENCES.DISCARD_UNSAVED_CHANGES, false);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\trender() {\n\t\tlet deleteButtonClasses = \"individual-workspace-action delete-workspace\",\n\t\t\trenameButtonClasses = \"individual-workspace-action\",\n\t\t\tallowDelete = true,\n\t\t\tallowExport = true,\n\t\t\tallowRename = true,\n\t\t\tallowImport = true,\n\t\t\tdeleteTooltip = \"Delete\";\n\n\t\tif (this.state.focusedWorkspace === FSBL?.Clients?.WorkspaceClient?.activeWorkspace?.name) {\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-individual-workspace-action`;\n\t\t}\n\n\t\tif (this.state.focusedWorkspace === \"\") {\n\t\t\trenameButtonClasses = `${renameButtonClasses} disabled-individual-workspace-action`;\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-individual-workspace-action`;\n\t\t\tdeleteTooltip = \"No workspace selected\";\n\t\t\tallowRename = false;\n\t\t\tallowExport = false;\n\t\t\tallowDelete = false;\n\t\t}\n\n\t\tif (this.state.adding || this.state.editing) {\n\t\t\trenameButtonClasses = `${renameButtonClasses} disabled-button`;\n\t\t\tdeleteButtonClasses = `${deleteButtonClasses} disabled-button`;\n\t\t\tallowDelete = false;\n\t\t\tallowExport = false;\n\t\t\tallowRename = false;\n\t\t\tallowImport = false;\n\t\t}\n\n\t\tlet importTooltip = \"Import workspace from file\",\n\t\t\texportTooltip = allowExport ? \"Export selected workspace\" : \"No workspace selected\",\n\t\t\trenameTooltip = allowRename ? \"Rename\" : \"Cannot Edit\";\n\n\t\treturn (\n\t\t\t<div style={{ paddingLeft: 10 }}>\n\t\t\t\t<input style={{ display: \"none\" }} type=\"file\" id=\"file-input\" />\n\t\t\t\t<div className=\"complex-menu-content-row\">\n\t\t\t\t\t<div className=\"workspace-list-header-row\">\n\t\t\t\t\t\t<div className=\"content-section-header workspace-list-header\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"content-section-wrapper\">\n\t\t\t\t\t\t<WorkspaceItemList\n\t\t\t\t\t\t\tonDragEnd={this.onDragEnd}\n\t\t\t\t\t\t\tworkspaceList={this.state.workspaceList}\n\t\t\t\t\t\t\tallowDelete={allowDelete}\n\t\t\t\t\t\t\tdeleteButtonClasses={deleteButtonClasses}\n\t\t\t\t\t\t\tdeleteTooltip={deleteTooltip}\n\t\t\t\t\t\t\tworkspaceToLoadOnStart={this.state.workspaceToLoadOnStart}\n\t\t\t\t\t\t\tfocusedWorkspace={this.state.focusedWorkspace}\n\t\t\t\t\t\t\tediting={this.state.editing}\n\t\t\t\t\t\t\tadding={this.state.adding}\n\t\t\t\t\t\t\trenameWorkspace={this.renameWorkspace}\n\t\t\t\t\t\t\taddWorkspace={this.addWorkspace}\n\t\t\t\t\t\t\tcancelEdit={this.cancelEdit}\n\t\t\t\t\t\t\tsetFocusedWorkspace={this.setFocusedWorkspace}\n\t\t\t\t\t\t\trenameTooltip={renameTooltip}\n\t\t\t\t\t\t\trenameButtonClasses={renameButtonClasses}\n\t\t\t\t\t\t\tallowRename={allowRename}\n\t\t\t\t\t\t\thandleButtonClicks={this.handleButtonClicks}\n\t\t\t\t\t\t\tstartEditingWorkspace={this.startEditingWorkspace}\n\t\t\t\t\t\t\tdeleteWorkspace={this.deleteWorkspace}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"workspace-extras\">\n\t\t\t\t\t\t\t<WorkspaceComponents focusedWorkspaceComponentList={this.state.focusedWorkspaceComponentList} />\n\t\t\t\t\t\t\t<div className=\"workspace-action-buttons\">\n\t\t\t\t\t\t\t\t<WorkspaceButton\n\t\t\t\t\t\t\t\t\ttitle={importTooltip}\n\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\n\t\t\t\t\t\t\t\t\tonClick={allowImport ? this.openFileDialog : () => {}}\n\t\t\t\t\t\t\t\t\ttype=\"import\"\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<WorkspaceButton\n\t\t\t\t\t\t\t\t\ttitle={exportTooltip}\n\t\t\t\t\t\t\t\t\tonMouseDown={this.handleButtonClicks}\n\t\t\t\t\t\t\t\t\tonClick={allowExport ? this.exportWorkspace : () => {}}\n\t\t\t\t\t\t\t\t\ttype=\"export\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Checkbox\n\t\t\t\t\t\tdisabled={!this.state.focusedWorkspace}\n\t\t\t\t\t\tonClick={this.setWorkspaceToLoadOnStart}\n\t\t\t\t\t\tchecked={this.state.focusedWorkspace === this.state.workspaceToLoadOnStart}\n\t\t\t\t\t\tlabel=\"Load this workspace on startup\"\n\t\t\t\t\t/>\n\t\t\t\t\t<>&nbsp;</>\n\t\t\t\t\t<Checkbox\n\t\t\t\t\t\tonClick={this.togglePromptUserOnDirtyWorkspace}\n\t\t\t\t\t\tchecked={this.state.promptUserOnDirtyWorkspace}\n\t\t\t\t\t\tlabel=\"Prompt user on dirty workspace\"\n\t\t\t\t\t/>\n\t\t\t\t\t<span className=\"indent-15px\">\n\t\t\t\t\t\t<Checkbox\n\t\t\t\t\t\t\tdisabled={this.state.promptUserOnDirtyWorkspace}\n\t\t\t\t\t\t\tonClick={this.toggleDiscardUnsavedChanges}\n\t\t\t\t\t\t\tchecked={this.state.discardUnsavedChanges}\n\t\t\t\t\t\t\tlabel=\"Discard unsaved changes\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { StandardCallback } from "@finsemble/finsemble-api/types/types";
3
+ export declare type ScheduledCloseProps = {
4
+ getPreferences: (cb: StandardCallback) => void;
5
+ setPreferences: (key: any, value: any) => void;
6
+ configKey: string;
7
+ label: string;
8
+ };
9
+ export declare const ScheduledClose: React.FunctionComponent<ScheduledCloseProps>;
10
+ export default ScheduledClose;
@@ -0,0 +1,95 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import { Checkbox } from "../../../common/Checkbox";
3
+ import { TimeSelect } from "../../../common/TimeSelect";
4
+ import { FinsembleToggle } from "../../../common/FinsembleToggle";
5
+ import DefaultDropdownButton from "../../../shared/DefaultDropdownButton";
6
+ const DEFAULT_TIME = {
7
+ hour: 4,
8
+ minute: 0,
9
+ meridiem: "AM",
10
+ };
11
+ export const ScheduledClose = (props) => {
12
+ const [initialized, setInitialized] = useState(false);
13
+ const [enabled, setEnabled] = useState(false);
14
+ const [weekly, setWeekly] = useState(false);
15
+ const [scheduledClose, setScheduledClose] = useState(DEFAULT_TIME);
16
+ const [day, setDay] = useState(false);
17
+ const dayChanged = (dayValue) => {
18
+ setDay(Number.parseInt(dayValue, 10));
19
+ };
20
+ const dayOptions = [];
21
+ const DAYS = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
22
+ for (let k in DAYS) {
23
+ dayOptions.push({
24
+ optionLabel: DAYS[k],
25
+ optionValue: k,
26
+ clickHandler: () => {
27
+ dayChanged(k);
28
+ },
29
+ });
30
+ }
31
+ const toggleEnabled = () => {
32
+ const toggled = !enabled;
33
+ setEnabled(toggled);
34
+ };
35
+ const onTimeSelectChange = (time) => {
36
+ setScheduledClose(time);
37
+ };
38
+ useEffect(() => {
39
+ props.getPreferences((err, data) => {
40
+ var _a;
41
+ if (data) {
42
+ let configValue = data[props.configKey];
43
+ const isEnabled = typeof configValue === "object";
44
+ let preferencesDay = false;
45
+ if (isEnabled) {
46
+ preferencesDay = (_a = configValue.dayOfWeek) !== null && _a !== void 0 ? _a : false;
47
+ configValue.meridiem = configValue.hour > 11 ? "PM" : "AM";
48
+ }
49
+ else {
50
+ configValue = DEFAULT_TIME;
51
+ }
52
+ setDay(preferencesDay);
53
+ setWeekly(preferencesDay !== false);
54
+ setEnabled(isEnabled);
55
+ setScheduledClose(configValue);
56
+ setInitialized(true);
57
+ }
58
+ });
59
+ }, []);
60
+ const getSchedule = () => {
61
+ let returnValue = false;
62
+ if (enabled) {
63
+ returnValue = Object.assign({}, scheduledClose);
64
+ if (weekly) {
65
+ returnValue.dayOfWeek = day ? day : 0;
66
+ }
67
+ else {
68
+ delete returnValue.dayOfWeek;
69
+ }
70
+ }
71
+ return returnValue;
72
+ };
73
+ useEffect(() => {
74
+ if (initialized) {
75
+ props.setPreferences(props.configKey, getSchedule());
76
+ }
77
+ }, [scheduledClose, weekly, enabled, day]);
78
+ return (React.createElement("div", { className: "complex-menu-content-row", style: { overflow: "visible" } },
79
+ React.createElement("div", { className: "close-toggle-container" },
80
+ React.createElement(Checkbox, { onClick: toggleEnabled, checked: enabled, label: props.label }),
81
+ React.createElement(FinsembleToggle, { key: `${weekly}`, checked: !weekly, onChange: (value) => {
82
+ if (!value) {
83
+ setDay(false);
84
+ }
85
+ setWeekly(!value);
86
+ }, textToggle: ["Daily", "Weekly"], enabled: enabled })),
87
+ weekly && (React.createElement("div", { className: `time-selectors daily-select ${enabled ? "" : "disabled"}` },
88
+ React.createElement("div", { className: "daily-select-label" }, "Day:"),
89
+ React.createElement("div", { className: "daily-select-dropdown" },
90
+ React.createElement(DefaultDropdownButton, { key: `${day}`, buttonOptions: dayOptions, classNames: "push-right", allowEmpty: false, caretLocation: "right", enabled: enabled, defaultSelection: dayOptions[day ? day : 0] })))),
91
+ React.createElement("div", { className: "time-selectors" },
92
+ React.createElement(TimeSelect, { key: `${scheduledClose.hour}${scheduledClose.minute}${scheduledClose.meridiem}`, enabled: enabled, initialTime: scheduledClose, onChange: onTimeSelectChange }))));
93
+ };
94
+ export default ScheduledClose;
95
+ //# sourceMappingURL=ScheduledClose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScheduledClose.js","sourceRoot":"","sources":["../../../../../src/components/userPreferences/components/general/ScheduledClose.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAkB,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,qBAEN,MAAM,uCAAuC,CAAC;AAI/C,MAAM,YAAY,GAAG;IACpB,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,IAAI;CACd,CAAC;AASF,M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AAK,SAAS,EAAC,gBAAgB;YAC9B,oBAAC,UAAU,IACV,GAAG,EAAE,GAAG,cAAc,CAAC,IAAI,GAAG,cAAc,CAAC,MAAM,GAAG,cAAc,CAAC,QAAQ,EAAE,EAC/E,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,cAAc,EAC3B,QAAQ,EAAE,kBAAkB,GAC3B,CACG,CACD,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport { Checkbox } from \"../../../common/Checkbox\";\nimport { TimeSelect, TimeSelectTime } from \"../../../common/TimeSelect\";\nimport { FinsembleToggle } from \"../../../common/FinsembleToggle\";\nimport DefaultDropdownButton, {\n\tIFinsembleDefaultDropdownButtonOptionsProps,\n} from \"../../../shared/DefaultDropdownButton\";\nimport { ScheduledDayTimeObjectType } from \"../../UserPreferenceTypes\";\nimport { StandardCallback } from \"@finsemble/finsemble-api/types/types\";\n\nconst DEFAULT_TIME = {\n\thour: 4,\n\tminute: 0,\n\tmeridiem: \"AM\",\n};\n\nexport type ScheduledCloseProps = {\n\tgetPreferences: (cb: StandardCallback) => void;\n\tsetPreferences: (key: any, value: any) => void;\n\tconfigKey: string;\n\tlabel: string;\n};\n\nexport const ScheduledClose: React.FunctionComponent<ScheduledCloseProps> = (props) => {\n\tconst [initialized, setInitialized] = useState<boolean>(false);\n\tconst [enabled, setEnabled] = useState(false);\n\tconst [weekly, setWeekly] = useState<boolean>(false);\n\tconst [scheduledClose, setScheduledClose] = useState<TimeSelectTime>(DEFAULT_TIME);\n\tconst [day, setDay] = useState<false | number>(false);\n\n\tconst dayChanged = (dayValue: any) => {\n\t\tsetDay(Number.parseInt(dayValue, 10));\n\t};\n\n\tconst dayOptions: IFinsembleDefaultDropdownButtonOptionsProps[] = [];\n\tconst DAYS = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n\tfor (let k in DAYS) {\n\t\tdayOptions.push({\n\t\t\toptionLabel: DAYS[k],\n\t\t\toptionValue: k,\n\t\t\tclickHandler: () => {\n\t\t\t\tdayChanged(k);\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Toggle the enabled state of the select boxes.\n\t */\n\tconst toggleEnabled = () => {\n\t\tconst toggled = !enabled;\n\t\t// If the select boxes are no longer enabled, reset the scheduled restart time and call a method on the Actions object.\n\t\t// That function will set scheduledRestart to null via the preferences API. But we want our display to look nice, hence the bit where we reset it to the default value.\n\t\tsetEnabled(toggled);\n\t};\n\n\tconst onTimeSelectChange = (time: TimeSelectTime) => {\n\t\tsetScheduledClose(time);\n\t};\n\n\t/**\n\t * Add listener on the store. When the preferences field changes, we change our local state.\n\t * Also, get the initial state from the store.\n\t */\n\tuseEffect(() => {\n\t\tprops.getPreferences((err: any, data: any) => {\n\t\t\tif (data) {\n\t\t\t\tlet configValue = data[props.configKey];\n\t\t\t\tconst isEnabled = typeof configValue === \"object\";\n\t\t\t\tlet preferencesDay: number | false = false;\n\t\t\t\tif (isEnabled) {\n\t\t\t\t\tpreferencesDay = configValue.dayOfWeek ?? false;\n\t\t\t\t\tconfigValue.meridiem = configValue.hour > 11 ? \"PM\" : \"AM\";\n\t\t\t\t} else {\n\t\t\t\t\tconfigValue = DEFAULT_TIME;\n\t\t\t\t}\n\n\t\t\t\tsetDay(preferencesDay);\n\t\t\t\tsetWeekly(preferencesDay !== false);\n\t\t\t\tsetEnabled(isEnabled);\n\t\t\t\tsetScheduledClose(configValue);\n\t\t\t\tsetInitialized(true);\n\t\t\t}\n\t\t});\n\t}, []);\n\n\tconst getSchedule = (): ScheduledDayTimeObjectType | false => {\n\t\tlet returnValue: ScheduledDayTimeObjectType | false = false;\n\n\t\tif (enabled) {\n\t\t\treturnValue = { ...scheduledClose };\n\t\t\tif (weekly) {\n\t\t\t\treturnValue.dayOfWeek = day ? day : 0;\n\t\t\t} else {\n\t\t\t\tdelete returnValue.dayOfWeek;\n\t\t\t}\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tuseEffect(() => {\n\t\tif (initialized) {\n\t\t\tprops.setPreferences(props.configKey, getSchedule());\n\t\t}\n\t}, [scheduledClose, weekly, enabled, day]);\n\n\treturn (\n\t\t<div className=\"complex-menu-content-row\" style={{ overflow: \"visible\" }}>\n\t\t\t<div className=\"close-toggle-container\">\n\t\t\t\t<Checkbox onClick={toggleEnabled} checked={enabled} label={props.label} />\n\t\t\t\t<FinsembleToggle\n\t\t\t\t\tkey={`${weekly}`}\n\t\t\t\t\tchecked={!weekly}\n\t\t\t\t\tonChange={(value) => {\n\t\t\t\t\t\tif (!value) {\n\t\t\t\t\t\t\tsetDay(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetWeekly(!value);\n\t\t\t\t\t}}\n\t\t\t\t\ttextToggle={[\"Daily\", \"Weekly\"]}\n\t\t\t\t\tenabled={enabled}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{weekly && (\n\t\t\t\t<div className={`time-selectors daily-select ${enabled ? \"\" : \"disabled\"}`}>\n\t\t\t\t\t<div className=\"daily-select-label\">Day:</div>\n\t\t\t\t\t<div className=\"daily-select-dropdown\">\n\t\t\t\t\t\t<DefaultDropdownButton\n\t\t\t\t\t\t\tkey={`${day}`}\n\t\t\t\t\t\t\tbuttonOptions={dayOptions}\n\t\t\t\t\t\t\tclassNames={\"push-right\"}\n\t\t\t\t\t\t\tallowEmpty={false}\n\t\t\t\t\t\t\tcaretLocation={\"right\"}\n\t\t\t\t\t\t\tenabled={enabled}\n\t\t\t\t\t\t\tdefaultSelection={dayOptions[day ? day : 0]}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<div className=\"time-selectors\">\n\t\t\t\t<TimeSelect\n\t\t\t\t\tkey={`${scheduledClose.hour}${scheduledClose.minute}${scheduledClose.meridiem}`}\n\t\t\t\t\tenabled={enabled}\n\t\t\t\t\tinitialTime={scheduledClose}\n\t\t\t\t\tonChange={onTimeSelectChange}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default ScheduledClose;\n"]}
@@ -1,12 +1,16 @@
1
1
  import StoreModel from "@finsemble/finsemble-api/types/clients/StoreModel";
2
- import { ScheduledRestartObjectType } from "../UserPreferenceTypes";
2
+ import { StandardCallback } from "@finsemble/finsemble-api/types/types";
3
+ import { ScheduledDayTimeObjectType } from "../UserPreferenceTypes";
3
4
  declare let UserPreferencesStore: StoreModel;
4
5
  declare let WorkspaceManagementMenuStore: StoreModel;
5
6
  declare const Actions: {
6
7
  initialize: () => void;
7
8
  getWorkspaces(cb?: Function): void;
8
9
  disableScheduledRestart: () => void;
9
- setScheduledRestart: (val: ScheduledRestartObjectType) => void;
10
+ setScheduledRestart: (val: ScheduledDayTimeObjectType | false) => void;
11
+ setScheduledClose: (key: "finsemble.scheduledRestart" | "finsemble.scheduledShutdown", value: ScheduledDayTimeObjectType | false) => void;
12
+ setDiscardUnsavedChangesPreference: (value: boolean) => void;
13
+ getPreferences: (callback: StandardCallback) => import("@finsemble/finsemble-api/types/types").StandardPromise<Record<string, any> | null>;
10
14
  };
11
15
  declare function initialize(WorkspaceMngMenuStore: StoreModel, cb: (store: StoreModel) => void): void;
12
16
  export { WorkspaceManagementMenuStore, initialize, UserPreferencesStore, Actions };
@@ -6,9 +6,6 @@ const Actions = {
6
6
  FSBL.Clients.WorkspaceClient.getWorkspaceActions((err, constants) => {
7
7
  updateConstants = constants;
8
8
  });
9
- FSBL.Clients.ConfigClient.getPreferences((err, data) => {
10
- UserPreferencesStore.setValue({ field: "preferences", value: data });
11
- });
12
9
  FSBL.Clients.WorkspaceClient.getWorkspaces((err, workspaces) => {
13
10
  UserPreferencesStore.setValue({
14
11
  field: "WorkspaceList",
@@ -65,6 +62,10 @@ const Actions = {
65
62
  field: "finsemble.scheduledRestart",
66
63
  value: false,
67
64
  });
65
+ FSBL.Clients.ConfigClient.setPreference({
66
+ field: "finsemble.scheduledCloseDiscardUnsavedChanges",
67
+ value: false,
68
+ });
68
69
  },
69
70
  setScheduledRestart: (val) => {
70
71
  FSBL.Clients.ConfigClient.setPreference({
@@ -72,6 +73,21 @@ const Actions = {
72
73
  value: val,
73
74
  });
74
75
  },
76
+ setScheduledClose: (key, value) => {
77
+ FSBL.Clients.ConfigClient.setPreference({
78
+ field: key,
79
+ value: value,
80
+ });
81
+ },
82
+ setDiscardUnsavedChangesPreference: (value) => {
83
+ FSBL.Clients.ConfigClient.setPreference({
84
+ field: "finsemble.scheduledCloseDiscardUnsavedChanges",
85
+ value: value,
86
+ });
87
+ },
88
+ getPreferences: (callback) => {
89
+ return FSBL.Clients.ConfigClient.getPreferences(callback);
90
+ },
75
91
  };
76
92
  async function createLocalStore(done) {
77
93
  FSBL.Clients.DistributedStoreClient.createStore({ store: "Finsemble-UserPreferences-Local-Store" }, (preferencesErr, preferencesStore) => {
@@ -1 +1 @@
1
- {"version":3,"file":"UserPreferencesStore.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/stores/UserPreferencesStore.tsx"],"names":[],"mappings":"AAkBA,IAAI,oBAAgC,CAAC;AACrC,IAAI,4BAAwC,CAAC;AAE7C,IAAI,eAA8B,CAAC;AAEnC,MAAM,OAAO,GAAG;IACf,UAAU,EAAE;QACX,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAkB,EAAE,SAAwB,EAAE,EAAE;YACjG,eAAe,GAAG,SAAS,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,GAAkB,EAAE,IAA6B,EAAE,EAAE;YAC9F,oBAAoB,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;QAGH,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,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iC,EAAE,EAA+B;IACrF,4BAA4B,GAAG,qBAAqB,CAAC;IACrD,gBAAgB,CAAC,GAAG,EAAE;QACrB,OAAO,CAAC,UAAU,EAAE,CAAC;QACrB,EAAE,CAAC,oBAAoB,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,4BAA4B,EAAE,UAAU,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { WORKSPACE } from \"@finsemble/finsemble-api/types/common/constants\";\nimport { Workspace as WorkspaceType } from \"@finsemble/finsemble-api/types/common/workspace\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nimport { ScheduledRestartObjectType } from \"../UserPreferenceTypes\";\n\ntype ConstantsType = typeof WORKSPACE[\"API_CHANNELS\"];\ntype PreferencesType = {\n\t[key: string]: any;\n};\n\ntype UpdateResponseType = {\n\tdata: {\n\t\tactiveWorkspace: WorkspaceType;\n\t\treason: keyof ConstantsType;\n\t};\n};\n\nlet UserPreferencesStore: StoreModel;\nlet WorkspaceManagementMenuStore: StoreModel;\n\nlet updateConstants: ConstantsType;\n\nconst Actions = {\n\tinitialize: function () {\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceActions((err: StandardError, constants: ConstantsType) => {\n\t\t\tupdateConstants = constants;\n\t\t});\n\n\t\tFSBL.Clients.ConfigClient.getPreferences((err: StandardError, data?: PreferencesType | null) => {\n\t\t\tUserPreferencesStore.setValue({ field: \"preferences\", value: data });\n\t\t});\n\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces: WorkspaceType[]) => {\n\t\t\tUserPreferencesStore.setValue({\n\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\tvalue: workspaces,\n\t\t\t});\n\t\t});\n\n\t\t// Get the activeWorkspace and set the value.\n\t\tFSBL.Clients.WorkspaceClient.getActiveWorkspace((err: StandardError, activeWorkspace?: { data: WorkspaceType }) => {\n\t\t\tif (activeWorkspace) {\n\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\tvalue: activeWorkspace,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * We listen here for any workspace updates, and pass them to the store.\n\t\t * **NOTE**: You may notice that the signature of this callback is different from the previous ones. In this case we receive a `response`, instead of `workspaces` or `activeWorkspace`. This is because this callback is for a `RouterClient` message. The functions above are callbacks to `WorkspaceClient` API calls.\n\t\t */\n\t\tFSBL.Clients.RouterClient.subscribe(\n\t\t\t\"Finsemble.WorkspaceService.update\",\n\t\t\t(err: StandardError, response: UpdateResponseType) => {\n\t\t\t\tif (response.data && response.data.activeWorkspace) {\n\t\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\t\tvalue: response.data.activeWorkspace,\n\t\t\t\t\t});\n\n\t\t\t\t\tif (updateConstants) {\n\t\t\t\t\t\tswitch (response.data.reason) {\n\t\t\t\t\t\t\tcase updateConstants.GET_ACTIVE_WORKSPACE:\n\t\t\t\t\t\t\tcase updateConstants.NEW_WORKSPACE:\n\t\t\t\t\t\t\tcase updateConstants.IMPORT:\n\t\t\t\t\t\t\tcase updateConstants.SAVE:\n\t\t\t\t\t\t\tcase updateConstants.SAVE_AS:\n\t\t\t\t\t\t\tcase updateConstants.REMOVE:\n\t\t\t\t\t\t\tcase updateConstants.SWITCH_TO:\n\t\t\t\t\t\t\tcase updateConstants.SET_WORKSPACE_ORDER:\n\t\t\t\t\t\t\tcase updateConstants.ADD_WINDOW:\n\t\t\t\t\t\t\tcase updateConstants.REMOVE_WINDOW:\n\t\t\t\t\t\t\tcase updateConstants.RENAME:\n\t\t\t\t\t\t\t\tActions.getWorkspaces();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\tgetWorkspaces(cb = Function.prototype) {\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces: WorkspaceType[]) => {\n\t\t\tUserPreferencesStore.setValue({\n\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\tvalue: workspaces,\n\t\t\t});\n\t\t\tcb();\n\t\t});\n\t},\n\t/**\n\t * By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.\n\t */\n\tdisableScheduledRestart: () => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: false,\n\t\t});\n\t},\n\t/** Finsemble listens for this piece of config. When it changes, it will schedule a daily restart at that time. */\n\tsetScheduledRestart: (val: ScheduledRestartObjectType) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: val,\n\t\t});\n\t},\n};\n\nasync function createLocalStore(done: () => void) {\n\t// While the order of these two functions is unimportant, they cannot be done in series as we don't want\n\t// to call the callback until both stores have been initiated. This keeps the initialization function\n\t// executing until both stores either have values, or fail to initialize.\n\tFSBL.Clients.DistributedStoreClient.createStore(\n\t\t{ store: \"Finsemble-UserPreferences-Local-Store\" },\n\t\t(preferencesErr: StandardError, preferencesStore: StoreModel | undefined) => {\n\t\t\tif (preferencesErr) {\n\t\t\t\tFSBL.Clients.Logger.system.error(\"Error fetching user preferences data: \", preferencesErr);\n\t\t\t}\n\t\t\tif (preferencesStore) {\n\t\t\t\tUserPreferencesStore = preferencesStore;\n\t\t\t}\n\t\t\tdone();\n\t\t}\n\t);\n}\n\n/**\n * Initializes the store for the User Preferences Menu.\n */\nfunction initialize(WorkspaceMngMenuStore: StoreModel, cb: (store: StoreModel) => void) {\n\tWorkspaceManagementMenuStore = WorkspaceMngMenuStore;\n\tcreateLocalStore(() => {\n\t\tActions.initialize();\n\t\tcb(UserPreferencesStore);\n\t});\n}\n\nexport { WorkspaceManagementMenuStore, initialize, UserPreferencesStore, Actions };\n"]}
1
+ {"version":3,"file":"UserPreferencesStore.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/stores/UserPreferencesStore.tsx"],"names":[],"mappings":"AAeA,IAAI,oBAAgC,CAAC;AACrC,IAAI,4BAAwC,CAAC;AAE7C,IAAI,eAA8B,CAAC;AAEnC,MAAM,OAAO,GAAG;IACf,UAAU,EAAE;QACX,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAkB,EAAE,SAAwB,EAAE,EAAE;YACjG,eAAe,GAAG,SAAS,CAAC;QAC7B,CAAC,CAAC,CAAC;QAGH,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,GAAkB,EAAE,UAA2B,EAAE,EAAE;YAC9F,oBAAoB,CAAC,QAAQ,CAAC;gBAC7B,KAAK,EAAE,eAAe;gBACtB,KAAK,EAAE,UAAU;aACjB,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAGH,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,GAAkB,EAAE,eAAyC,EAAE,EAAE;YACjH,IAAI,eAAe,EAAE;gBACpB,oBAAoB,CAAC,QAAQ,CAAC;oBAC7B,KAAK,EAAE,iBAAiB;oBACxB,KAAK,EAAE,eAAe;iBACtB,CAAC,CAAC;aACH;QACF,CAAC,CAAC,CAAC;QAMH,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAClC,mCAAmC,EACnC,CAAC,GAAkB,EAAE,QAA4B,EAAE,EAAE;YACpD,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE;gBACnD,oBAAoB,CAAC,QAAQ,CAAC;oBAC7B,KAAK,EAAE,iBAAiB;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AG,qBAAqB,CAAC;IACrD,gBAAgB,CAAC,GAAG,EAAE;QACrB,OAAO,CAAC,UAAU,EAAE,CAAC;QACrB,EAAE,CAAC,oBAAoB,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,4BAA4B,EAAE,UAAU,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { WORKSPACE } from \"@finsemble/finsemble-api/types/common/constants\";\nimport { Workspace as WorkspaceType } from \"@finsemble/finsemble-api/types/common/workspace\";\nimport { StandardError, StandardCallback } from \"@finsemble/finsemble-api/types/types\";\nimport { ScheduledDayTimeObjectType } from \"../UserPreferenceTypes\";\n\ntype ConstantsType = typeof WORKSPACE[\"API_CHANNELS\"];\n\ntype UpdateResponseType = {\n\tdata: {\n\t\tactiveWorkspace: WorkspaceType;\n\t\treason: keyof ConstantsType;\n\t};\n};\n\nlet UserPreferencesStore: StoreModel;\nlet WorkspaceManagementMenuStore: StoreModel;\n\nlet updateConstants: ConstantsType;\n\nconst Actions = {\n\tinitialize: function () {\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaceActions((err: StandardError, constants: ConstantsType) => {\n\t\t\tupdateConstants = constants;\n\t\t});\n\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces: WorkspaceType[]) => {\n\t\t\tUserPreferencesStore.setValue({\n\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\tvalue: workspaces,\n\t\t\t});\n\t\t});\n\n\t\t// Get the activeWorkspace and set the value.\n\t\tFSBL.Clients.WorkspaceClient.getActiveWorkspace((err: StandardError, activeWorkspace?: { data: WorkspaceType }) => {\n\t\t\tif (activeWorkspace) {\n\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\tvalue: activeWorkspace,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * We listen here for any workspace updates, and pass them to the store.\n\t\t * **NOTE**: You may notice that the signature of this callback is different from the previous ones. In this case we receive a `response`, instead of `workspaces` or `activeWorkspace`. This is because this callback is for a `RouterClient` message. The functions above are callbacks to `WorkspaceClient` API calls.\n\t\t */\n\t\tFSBL.Clients.RouterClient.subscribe(\n\t\t\t\"Finsemble.WorkspaceService.update\",\n\t\t\t(err: StandardError, response: UpdateResponseType) => {\n\t\t\t\tif (response.data && response.data.activeWorkspace) {\n\t\t\t\t\tUserPreferencesStore.setValue({\n\t\t\t\t\t\tfield: \"activeWorkspace\",\n\t\t\t\t\t\tvalue: response.data.activeWorkspace,\n\t\t\t\t\t});\n\n\t\t\t\t\tif (updateConstants) {\n\t\t\t\t\t\tswitch (response.data.reason) {\n\t\t\t\t\t\t\tcase updateConstants.GET_ACTIVE_WORKSPACE:\n\t\t\t\t\t\t\tcase updateConstants.NEW_WORKSPACE:\n\t\t\t\t\t\t\tcase updateConstants.IMPORT:\n\t\t\t\t\t\t\tcase updateConstants.SAVE:\n\t\t\t\t\t\t\tcase updateConstants.SAVE_AS:\n\t\t\t\t\t\t\tcase updateConstants.REMOVE:\n\t\t\t\t\t\t\tcase updateConstants.SWITCH_TO:\n\t\t\t\t\t\t\tcase updateConstants.SET_WORKSPACE_ORDER:\n\t\t\t\t\t\t\tcase updateConstants.ADD_WINDOW:\n\t\t\t\t\t\t\tcase updateConstants.REMOVE_WINDOW:\n\t\t\t\t\t\t\tcase updateConstants.RENAME:\n\t\t\t\t\t\t\t\tActions.getWorkspaces();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\tgetWorkspaces(cb = Function.prototype) {\n\t\t// Gets the workspace list and sets the value in the store.\n\t\tFSBL.Clients.WorkspaceClient.getWorkspaces((err: StandardError, workspaces: WorkspaceType[]) => {\n\t\t\tUserPreferencesStore.setValue({\n\t\t\t\tfield: \"WorkspaceList\",\n\t\t\t\tvalue: workspaces,\n\t\t\t});\n\t\t\tcb();\n\t\t});\n\t},\n\t/**\n\t * By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.\n\t * @deprecated use `setScheduledRestart(false)` instead.\n\t */\n\tdisableScheduledRestart: () => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: false,\n\t\t});\n\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledCloseDiscardUnsavedChanges\",\n\t\t\tvalue: false,\n\t\t});\n\t},\n\t/**\n\t * Finsemble listens for this piece of config. When it changes, it will schedule a daily restart at that time.\n\t * By making the value of `finsemble.scheduledRestart` falsy, the application will remove any existing restart timers.\n\t * @deprecated use setScheduledClose\n\t */\n\tsetScheduledRestart: (val: ScheduledDayTimeObjectType | false) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledRestart\",\n\t\t\tvalue: val,\n\t\t});\n\t},\n\n\t/**\n\t * Finsemble listens the config set by this function. When it changes, it will schedule a daily restart/shutdown at\n\t * that time. By making the value falsy, the application will remove any existing restart/shutdown timers.\n\t *\n\t */\n\tsetScheduledClose: (\n\t\tkey: \"finsemble.scheduledRestart\" | \"finsemble.scheduledShutdown\",\n\t\tvalue: ScheduledDayTimeObjectType | false\n\t) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: key,\n\t\t\tvalue: value,\n\t\t});\n\t},\n\n\tsetDiscardUnsavedChangesPreference: (value: boolean) => {\n\t\tFSBL.Clients.ConfigClient.setPreference({\n\t\t\tfield: \"finsemble.scheduledCloseDiscardUnsavedChanges\",\n\t\t\tvalue: value,\n\t\t});\n\t},\n\n\tgetPreferences: (callback: StandardCallback) => {\n\t\treturn FSBL.Clients.ConfigClient.getPreferences(callback);\n\t},\n};\n\nasync function createLocalStore(done: () => void) {\n\t// While the order of these two functions is unimportant, they cannot be done in series as we don't want\n\t// to call the callback until both stores have been initiated. This keeps the initialization function\n\t// executing until both stores either have values, or fail to initialize.\n\tFSBL.Clients.DistributedStoreClient.createStore(\n\t\t{ store: \"Finsemble-UserPreferences-Local-Store\" },\n\t\t(preferencesErr: StandardError, preferencesStore: StoreModel | undefined) => {\n\t\t\tif (preferencesErr) {\n\t\t\t\tFSBL.Clients.Logger.system.error(\"Error fetching user preferences data: \", preferencesErr);\n\t\t\t}\n\t\t\tif (preferencesStore) {\n\t\t\t\tUserPreferencesStore = preferencesStore;\n\t\t\t}\n\t\t\tdone();\n\t\t}\n\t);\n}\n\n/**\n * Initializes the store for the User Preferences Menu.\n */\nfunction initialize(WorkspaceMngMenuStore: StoreModel, cb: (store: StoreModel) => void) {\n\tWorkspaceManagementMenuStore = WorkspaceMngMenuStore;\n\tcreateLocalStore(() => {\n\t\tActions.initialize();\n\t\tcb(UserPreferencesStore);\n\t});\n}\n\nexport { WorkspaceManagementMenuStore, initialize, UserPreferencesStore, Actions };\n"]}
@@ -1,9 +1,13 @@
1
- import General from "../components/content/General";
1
+ import React from "react";
2
2
  import "../../../assets/css/finsemble.css";
3
3
  import { Story } from "@storybook/react/types-6-0";
4
4
  declare const _default: {
5
5
  title: string;
6
- component: typeof General;
6
+ component: React.FunctionComponent<{
7
+ addListener: Function;
8
+ removeListener: Function;
9
+ getValue: Function;
10
+ }>;
7
11
  };
8
12
  export default _default;
9
13
  export declare const DefaultGeneral: Story<import("@storybook/react/types-6-0").Args>;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { ScheduledCloseProps } from "../components/general/ScheduledClose";
3
+ import { Story } from "@storybook/react/types-6-0";
4
+ import "../../../assets/css/finsemble.css";
5
+ declare const _default: {
6
+ title: string;
7
+ component: React.FunctionComponent<ScheduledCloseProps>;
8
+ };
9
+ export default _default;
10
+ export declare const Weekly: Story<ScheduledCloseProps>;
11
+ export declare const Daily: Story<ScheduledCloseProps>;
12
+ export declare const Disabled: Story<ScheduledCloseProps>;
@@ -0,0 +1,53 @@
1
+ import React from "react";
2
+ import { ScheduledClose } from "../components/general/ScheduledClose";
3
+ import "../../../assets/css/finsemble.css";
4
+ export default {
5
+ title: "User Preferences/General/Scheduled Close",
6
+ component: ScheduledClose,
7
+ };
8
+ const Template = (args) => React.createElement(ScheduledClose, Object.assign({}, args));
9
+ export const Weekly = Template.bind({});
10
+ Weekly.args = {
11
+ getPreferences: async (cb) => {
12
+ const data = {
13
+ key: {
14
+ dayOfWeek: 5,
15
+ hour: 12,
16
+ minute: 15,
17
+ },
18
+ };
19
+ cb(null, data);
20
+ return data;
21
+ },
22
+ label: "Day/Time",
23
+ setPreferences: () => { },
24
+ configKey: "key",
25
+ };
26
+ export const Daily = Template.bind({});
27
+ Daily.args = {
28
+ getPreferences: async (cb) => {
29
+ const data = {
30
+ key: {
31
+ hour: 15,
32
+ minute: 30,
33
+ },
34
+ };
35
+ cb(null, data);
36
+ return data;
37
+ },
38
+ setPreferences: () => { },
39
+ label: "Day/Time",
40
+ configKey: "key",
41
+ };
42
+ export const Disabled = Template.bind({});
43
+ Disabled.args = {
44
+ getPreferences: async (cb) => {
45
+ const data = {};
46
+ cb(null, data);
47
+ return data;
48
+ },
49
+ setPreferences: () => { },
50
+ label: "Day/Time",
51
+ configKey: "key",
52
+ };
53
+ //# sourceMappingURL=ScheduledClose.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScheduledClose.stories.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/stories/ScheduledClose.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAuB,MAAM,sCAAsC,CAAC;AAE3F,OAAO,mCAAmC,CAAC;AAE3C,eAAe;IACd,KAAK,EAAE,0CAA0C;IACjD,SAAS,EAAE,cAAc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AE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACf,OAAO,IAAI,CAAC;IACb,CAAC;IACD,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,KAAK;CAChB,CAAC","sourcesContent":["import React from \"react\";\nimport { ScheduledClose, ScheduledCloseProps } from \"../components/general/ScheduledClose\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport \"../../../assets/css/finsemble.css\";\n\nexport default {\n\ttitle: \"User Preferences/General/Scheduled Close\",\n\tcomponent: ScheduledClose,\n};\n\nconst Template: Story<ScheduledCloseProps> = (args: ScheduledCloseProps) => <ScheduledClose {...args} />;\n\nexport const Weekly = Template.bind({});\nWeekly.args = {\n\tgetPreferences: async (cb: Function) => {\n\t\tconst data = {\n\t\t\tkey: {\n\t\t\t\tdayOfWeek: 5,\n\t\t\t\thour: 12,\n\t\t\t\tminute: 15,\n\t\t\t},\n\t\t};\n\t\tcb(null, data);\n\t\treturn data;\n\t},\n\tlabel: \"Day/Time\",\n\tsetPreferences: () => {},\n\tconfigKey: \"key\",\n};\n\nexport const Daily = Template.bind({});\nDaily.args = {\n\tgetPreferences: async (cb: Function) => {\n\t\tconst data = {\n\t\t\tkey: {\n\t\t\t\thour: 15,\n\t\t\t\tminute: 30,\n\t\t\t},\n\t\t};\n\t\tcb(null, data);\n\t\treturn data;\n\t},\n\tsetPreferences: () => {},\n\tlabel: \"Day/Time\",\n\tconfigKey: \"key\",\n};\n\nexport const Disabled = Template.bind({});\nDisabled.args = {\n\tgetPreferences: async (cb: Function) => {\n\t\tconst data = {};\n\t\tcb(null, data);\n\t\treturn data;\n\t},\n\tsetPreferences: () => {},\n\tlabel: \"Day/Time\",\n\tconfigKey: \"key\",\n};\n"]}
@@ -3,26 +3,13 @@ import { shallow } from "enzyme";
3
3
  import { describe, it } from "mocha";
4
4
  import { expect } from "chai";
5
5
  import General from "./../components/content/General";
6
- import ScheduledRestart from "../components/general/ScheduledRestart";
6
+ import ScheduledClose from "../components/general/ScheduledClose";
7
+ import { Checkbox } from "../../common/Checkbox";
7
8
  describe("<General/>", () => {
8
9
  it("should render the ScheduledRestart component", () => {
9
10
  const wrapper = shallow(React.createElement(General, { addListener: () => { }, removeListener: () => { }, getValue: () => { } }));
10
- expect(wrapper.find(ScheduledRestart)).to.have.lengthOf(1);
11
- });
12
- it("should pass the correct props to the ScheduledRestart component", () => {
13
- const func1 = () => {
14
- console.log("FINSEMBLE");
15
- };
16
- const func2 = () => {
17
- console.log("CHARTIQ");
18
- };
19
- const func3 = () => {
20
- console.log("COSAIC");
21
- };
22
- const wrapper = shallow(React.createElement(General, { addListener: func1, removeListener: func2, getValue: func3 }));
23
- expect(wrapper.find(ScheduledRestart).props().addListener).to.equal(func1);
24
- expect(wrapper.find(ScheduledRestart).props().removeListener).to.equal(func2);
25
- expect(wrapper.find(ScheduledRestart).props().getValue).to.equal(func3);
11
+ expect(wrapper.find(ScheduledClose)).to.have.lengthOf(2);
12
+ expect(wrapper.find(Checkbox)).to.have.lengthOf(1);
26
13
  });
27
14
  });
28
15
  //# sourceMappingURL=General.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"General.spec.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/tests/General.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,OAAO,MAAM,iCAAiC,CAAC;AACtD,OAAO,gBAAgB,MAAM,wCAAwC,CAAC;AAEtE,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACvD,MAAM,OAAO,GAAG,OAAO,CAAC,oBAAC,OAAO,I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AC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { shallow } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport General from \"./../components/content/General\";\nimport ScheduledRestart from \"../components/general/ScheduledRestart\";\n\ndescribe(\"<General/>\", () => {\n\tit(\"should render the ScheduledRestart component\", () => {\n\t\tconst wrapper = shallow(<General addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\texpect(wrapper.find(ScheduledRestart)).to.have.lengthOf(1);\n\t});\n\tit(\"should pass the correct props to the ScheduledRestart component\", () => {\n\t\tconst func1 = () => {\n\t\t\tconsole.log(\"FINSEMBLE\");\n\t\t};\n\t\tconst func2 = () => {\n\t\t\tconsole.log(\"CHARTIQ\");\n\t\t};\n\t\tconst func3 = () => {\n\t\t\tconsole.log(\"COSAIC\");\n\t\t};\n\t\tconst wrapper = shallow(<General addListener={func1} removeListener={func2} getValue={func3} />);\n\t\texpect(wrapper.find(ScheduledRestart).props().addListener).to.equal(func1);\n\t\texpect(wrapper.find(ScheduledRestart).props().removeListener).to.equal(func2);\n\t\texpect(wrapper.find(ScheduledRestart).props().getValue).to.equal(func3);\n\t});\n});\n"]}
1
+ {"version":3,"file":"General.spec.js","sourceRoot":"","sources":["../../../../src/components/userPreferences/tests/General.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,OAAO,MAAM,iCAAiC,CAAC;AACtD,OAAO,cAAc,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACvD,MAAM,OAAO,GAAG,OAAO,CAAC,oBAAC,OAAO,IAAC,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,GAAI,CAAC,CAAC;QAC1G,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import * as React from \"react\";\nimport { shallow } from \"enzyme\";\nimport { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\nimport General from \"./../components/content/General\";\nimport ScheduledClose from \"../components/general/ScheduledClose\";\nimport { Checkbox } from \"../../common/Checkbox\";\n\ndescribe(\"<General/>\", () => {\n\tit(\"should render the ScheduledRestart component\", () => {\n\t\tconst wrapper = shallow(<General addListener={() => {}} removeListener={() => {}} getValue={() => {}} />);\n\t\texpect(wrapper.find(ScheduledClose)).to.have.lengthOf(2);\n\t\texpect(wrapper.find(Checkbox)).to.have.lengthOf(1);\n\t});\n});\n"]}