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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/package.json +19 -18
  2. package/react/actions/smartDesktopDesignerActions.d.ts +6 -2
  3. package/react/actions/smartDesktopDesignerActions.js +2 -0
  4. package/react/actions/smartDesktopDesignerActions.js.map +1 -1
  5. package/react/assets/icons/code-block.svg +15 -0
  6. package/react/components/FinsembleProvider.js.map +1 -1
  7. package/react/components/appCatalog/modules/FDC3.d.ts +1 -1
  8. package/react/components/appCatalog/modules/FDC3.js.map +1 -1
  9. package/react/components/appCatalog/stores/appStore.d.ts +2 -2
  10. package/react/components/appCatalog/stores/appStore.js.map +1 -1
  11. package/react/components/common/Checkbox.js +1 -1
  12. package/react/components/common/Checkbox.js.map +1 -1
  13. package/react/components/common/DropZone.js +3 -1
  14. package/react/components/common/DropZone.js.map +1 -1
  15. package/react/components/common/FinsembleIcon.d.ts +1 -1
  16. package/react/components/common/FinsembleIcon.js +2 -0
  17. package/react/components/common/FinsembleIcon.js.map +1 -1
  18. package/react/components/common/FinsembleSelect.js +1 -1
  19. package/react/components/common/FinsembleSelect.js.map +1 -1
  20. package/react/components/common/Tooltip.js +3 -1
  21. package/react/components/common/Tooltip.js.map +1 -1
  22. package/react/components/common/css/application-list.css +4 -0
  23. package/react/components/common/css/preload-edit-page.css +37 -0
  24. package/react/components/favorites/FavoritesShell.stories.js.map +1 -1
  25. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  26. package/react/components/legacyControls/FinsembleDnDContext.d.ts +2 -1
  27. package/react/components/legacyControls/FinsembleDnDContext.js +8 -6
  28. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  29. package/react/components/linker/remoteRedux.d.ts +1 -1
  30. package/react/components/linker/remoteRedux.js.map +1 -1
  31. package/react/components/menu/MenuAutoResizer.js.map +1 -1
  32. package/react/components/menu/MenuPortal.js +19 -0
  33. package/react/components/menu/MenuPortal.js.map +1 -1
  34. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  35. package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
  36. package/react/components/notifications/components/shared/CheckButton.d.ts +1 -1
  37. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  38. package/react/components/notifications/components/shared/NotificationCardShell.d.ts +1 -1
  39. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  40. package/react/components/notifications/components/shared/OverflowMenu.d.ts +1 -1
  41. package/react/components/notifications/components/shared/OverflowMenu.js.map +1 -1
  42. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.d.ts +1 -1
  43. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyActions.js.map +1 -1
  44. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.d.ts +1 -1
  45. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  46. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +1 -1
  47. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
  48. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.d.ts +1 -1
  49. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  50. package/react/components/notifications/components/views/CardView.js.map +1 -1
  51. package/react/components/notifications/components/views/ListView.d.ts +1 -1
  52. package/react/components/notifications/components/views/ListView.js.map +1 -1
  53. package/react/components/notifications/components/views/NotificationDetailsView.d.ts +1 -1
  54. package/react/components/notifications/components/views/NotificationDetailsView.js.map +1 -1
  55. package/react/components/notifications/types.d.ts +1 -1
  56. package/react/components/notifications/types.js.map +1 -1
  57. package/react/components/notifications/utils.d.ts +1 -1
  58. package/react/components/notifications/utils.js.map +1 -1
  59. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  60. package/react/components/processMonitor/components/ChildWindow.js.map +1 -1
  61. package/react/components/processMonitor/components/ListHeader.d.ts +1 -1
  62. package/react/components/processMonitor/components/ListHeader.js.map +1 -1
  63. package/react/components/processMonitor/stores/ProcessMonitorStore.d.ts +3 -3
  64. package/react/components/processMonitor/stores/ProcessMonitorStore.js.map +1 -1
  65. package/react/components/search/SearchResult.js +4 -3
  66. package/react/components/search/SearchResult.js.map +1 -1
  67. package/react/components/smartDesktopDesigner/AppEditAccess.js.map +1 -1
  68. package/react/components/smartDesktopDesigner/AppEditPage.d.ts +2 -1
  69. package/react/components/smartDesktopDesigner/AppEditPage.js +77 -73
  70. package/react/components/smartDesktopDesigner/AppEditPage.js.map +1 -1
  71. package/react/components/smartDesktopDesigner/Appearance.css +8 -0
  72. package/react/components/smartDesktopDesigner/Application.d.ts +10 -3
  73. package/react/components/smartDesktopDesigner/Application.js +35 -42
  74. package/react/components/smartDesktopDesigner/Application.js.map +1 -1
  75. package/react/components/smartDesktopDesigner/Applications.d.ts +2 -0
  76. package/react/components/smartDesktopDesigner/Applications.js +17 -7
  77. package/react/components/smartDesktopDesigner/Applications.js.map +1 -1
  78. package/react/components/smartDesktopDesigner/EditPreload.d.ts +14 -0
  79. package/react/components/smartDesktopDesigner/EditPreload.js +169 -0
  80. package/react/components/smartDesktopDesigner/EditPreload.js.map +1 -0
  81. package/react/components/smartDesktopDesigner/ItemList.d.ts +17 -0
  82. package/react/components/smartDesktopDesigner/ItemList.js +58 -0
  83. package/react/components/smartDesktopDesigner/ItemList.js.map +1 -0
  84. package/react/components/smartDesktopDesigner/OptionalSettingsView.d.ts +11 -0
  85. package/react/components/smartDesktopDesigner/OptionalSettingsView.js +71 -0
  86. package/react/components/smartDesktopDesigner/OptionalSettingsView.js.map +1 -0
  87. package/react/components/smartDesktopDesigner/Preloads.d.ts +8 -0
  88. package/react/components/smartDesktopDesigner/Preloads.js +26 -0
  89. package/react/components/smartDesktopDesigner/Preloads.js.map +1 -0
  90. package/react/components/smartDesktopDesigner/Publish.js.map +1 -1
  91. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  92. package/react/components/smartDesktopDesigner/Toolbar.js +5 -5
  93. package/react/components/smartDesktopDesigner/Toolbar.js.map +1 -1
  94. package/react/components/smartDesktopDesigner/common/views.js +18 -0
  95. package/react/components/smartDesktopDesigner/common/views.js.map +1 -1
  96. package/react/components/smartDesktopDesigner/css/appearance.css +3 -0
  97. package/react/components/smartDesktopDesigner/fixtures/apps.d.ts +1 -1
  98. package/react/components/smartDesktopDesigner/fixtures/apps.js +23 -1
  99. package/react/components/smartDesktopDesigner/fixtures/apps.js.map +1 -1
  100. package/react/components/smartDesktopDesigner/fixtures/exportProps.js.map +1 -1
  101. package/react/components/smartDesktopDesigner/fixtures/preloads.d.ts +22 -0
  102. package/react/components/smartDesktopDesigner/fixtures/preloads.js +40 -0
  103. package/react/components/smartDesktopDesigner/fixtures/preloads.js.map +1 -0
  104. package/react/components/smartDesktopDesigner/fixtures/publishProgress.d.ts +1 -1
  105. package/react/components/smartDesktopDesigner/fixtures/publishProgress.js.map +1 -1
  106. package/react/components/smartDesktopDesigner/fixtures/views.js +9 -0
  107. package/react/components/smartDesktopDesigner/fixtures/views.js.map +1 -1
  108. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.d.ts +1 -1
  109. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js +1 -0
  110. package/react/components/smartDesktopDesigner/stories/AppEditPage.stories.js.map +1 -1
  111. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.d.ts +11 -0
  112. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js +35 -0
  113. package/react/components/smartDesktopDesigner/stories/EditPreload.stories.js.map +1 -0
  114. package/react/components/smartDesktopDesigner/stories/ItemList.stories.d.ts +16 -0
  115. package/react/components/smartDesktopDesigner/stories/{ApplicationList.stories.js → ItemList.stories.js} +26 -26
  116. package/react/components/smartDesktopDesigner/stories/ItemList.stories.js.map +1 -0
  117. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.d.ts +11 -0
  118. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js +28 -0
  119. package/react/components/smartDesktopDesigner/stories/OptionalSettingsView.stories.js.map +1 -0
  120. package/react/components/smartDesktopDesigner/stories/Preloads.stories.d.ts +11 -0
  121. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js +31 -0
  122. package/react/components/smartDesktopDesigner/stories/Preloads.stories.js.map +1 -0
  123. package/react/components/smartDesktopDesigner/stories/SmartDesktopDesigner.stories.js.map +1 -1
  124. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js +1099 -258
  125. package/react/components/smartDesktopDesigner/tests/AppEditPage.spec.js.map +1 -1
  126. package/react/components/smartDesktopDesigner/tests/{ApplicationList.spec.d.ts → Application.spec.d.ts} +0 -0
  127. package/react/components/smartDesktopDesigner/tests/Application.spec.js +1496 -0
  128. package/react/components/smartDesktopDesigner/tests/Application.spec.js.map +1 -0
  129. package/react/components/smartDesktopDesigner/tests/Applications.spec.js +3 -3
  130. package/react/components/smartDesktopDesigner/tests/Applications.spec.js.map +1 -1
  131. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.d.ts +1 -0
  132. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js +61 -0
  133. package/react/components/smartDesktopDesigner/tests/EditPreload.spec.js.map +1 -0
  134. package/react/components/smartDesktopDesigner/tests/ItemList.spec.d.ts +1 -0
  135. package/react/components/smartDesktopDesigner/tests/{ApplicationList.spec.js → ItemList.spec.js} +8 -8
  136. package/react/components/smartDesktopDesigner/tests/ItemList.spec.js.map +1 -0
  137. package/react/components/smartDesktopDesigner/tests/Preloads.spec.d.ts +1 -0
  138. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js +47 -0
  139. package/react/components/smartDesktopDesigner/tests/Preloads.spec.js.map +1 -0
  140. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js +6 -0
  141. package/react/components/smartDesktopDesigner/tests/SmartDesktopDesigner.spec.js.map +1 -1
  142. package/react/components/toolbar/DragHandle.spec.d.ts +1 -0
  143. package/react/components/toolbar/DragHandle.spec.js +31 -0
  144. package/react/components/toolbar/DragHandle.spec.js.map +1 -0
  145. package/react/components/toolbar/DragHandle.stories.d.ts +13 -0
  146. package/react/components/toolbar/DragHandle.stories.js +39 -0
  147. package/react/components/toolbar/DragHandle.stories.js.map +1 -0
  148. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.d.ts +1 -1
  149. package/react/components/toolbar/advancedAppLauncher/AdvancedAppLauncher.js.map +1 -1
  150. package/react/components/toolbar/advancedAppLauncher/components/Content.d.ts +1 -1
  151. package/react/components/toolbar/advancedAppLauncher/components/Content.js.map +1 -1
  152. package/react/components/toolbar/advancedAppLauncher/components/FilterSort.js.map +1 -1
  153. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.d.ts +1 -1
  154. package/react/components/toolbar/advancedAppLauncher/components/FoldersList.js.map +1 -1
  155. package/react/components/toolbar/advancedAppLauncher/components/TagsList.d.ts +1 -1
  156. package/react/components/toolbar/advancedAppLauncher/components/TagsList.js.map +1 -1
  157. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.d.ts +2 -2
  158. package/react/components/toolbar/advancedAppLauncher/stores/LauncherStore.js.map +1 -1
  159. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  160. package/react/components/toolbar/appLauncher/components/componentList.d.ts +2 -2
  161. package/react/components/toolbar/appLauncher/components/componentList.js.map +1 -1
  162. package/react/components/toolbar/appLauncher/stores/appLauncherStore.d.ts +2 -2
  163. package/react/components/toolbar/appLauncher/stores/appLauncherStore.js.map +1 -1
  164. package/react/components/toolbar/dashbar/Dashbar.js +9 -12
  165. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  166. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.d.ts +2 -2
  167. package/react/components/toolbar/workspaceManagementMenu/WorkspaceManagementMenu.js.map +1 -1
  168. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +1 -1
  169. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  170. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.d.ts +1 -1
  171. package/react/components/toolbar/workspaceManagementMenu/components/WorkspaceList.js.map +1 -1
  172. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.d.ts +4 -4
  173. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +1 -1
  174. package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
  175. package/react/components/userPreferences/components/content/Workspaces.d.ts +1 -1
  176. package/react/components/userPreferences/components/content/Workspaces.js +1 -1
  177. package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
  178. package/react/components/userPreferences/components/content/notificationViews/NotificationsSourceTypes.js.map +1 -1
  179. package/react/components/userPreferences/components/content/notificationViews/notificationViewsUtils.js.map +1 -1
  180. package/react/components/userPreferences/stores/UserPreferencesStore.d.ts +1 -1
  181. package/react/components/userPreferences/stores/UserPreferencesStore.js.map +1 -1
  182. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +4 -2
  183. package/react/components/windowTitleBar/WindowTitleBarShell.js +60 -59
  184. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  185. package/react/components/windowTitleBar/components/center/TabList.d.ts +2 -2
  186. package/react/components/windowTitleBar/components/center/TabList.js +3 -0
  187. package/react/components/windowTitleBar/components/center/TabList.js.map +1 -1
  188. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  189. package/react/components/windowTitleBar/components/right/GroupingButton.js.map +1 -1
  190. package/react/components/windowTitleBar/components/right/MaximizeButton.js.map +1 -1
  191. package/react/components/windowTitleBar/components/windowTitle.d.ts +5 -2
  192. package/react/components/windowTitleBar/components/windowTitle.js +93 -89
  193. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  194. package/react/components/windowTitleBar/stores/windowTitleBarStore.d.ts +3 -3
  195. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +213 -217
  196. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  197. package/react/hooks/useDashbar.js.map +1 -1
  198. package/react/hooks/useFavoritesShell.js.map +1 -1
  199. package/react/hooks/useNotifications.d.ts +1 -1
  200. package/react/hooks/useNotifications.js.map +1 -1
  201. package/react/reducers/rootReducer.d.ts +11 -3
  202. package/react/reducers/smartDesktopDesignerReducer.js +8 -0
  203. package/react/reducers/smartDesktopDesignerReducer.js.map +1 -1
  204. package/react/store.d.ts +22 -6
  205. package/react/types/fdc3.d.ts +2 -2
  206. package/react/types/fdc3.js.map +1 -1
  207. package/react/types/searchTypes.d.ts +1 -8
  208. package/react/types/searchTypes.js.map +1 -1
  209. package/react/types/smartDesktopDesignerTypes.d.ts +8 -2
  210. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
  211. package/react/types/windowTitleBar.d.ts +1 -1
  212. package/react/types/windowTitleBar.js.map +1 -1
  213. package/react/components/smartDesktopDesigner/ApplicationList.d.ts +0 -16
  214. package/react/components/smartDesktopDesigner/ApplicationList.js +0 -60
  215. package/react/components/smartDesktopDesigner/ApplicationList.js.map +0 -1
  216. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.d.ts +0 -16
  217. package/react/components/smartDesktopDesigner/stories/ApplicationList.stories.js.map +0 -1
  218. package/react/components/smartDesktopDesigner/tests/ApplicationList.spec.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ItemList.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/ItemList.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,oCAAoC,CAAC;AAa5C,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACxB,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR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ACN,CAAC;AACH,CAAC,CAAC,CACE,CACN,CACC,CACH,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { ReactNode } from \"react\";\nimport { ButtonIcon } from \"../common/ButtonIcon\";\nimport \"../common/css/application-list.css\";\n\nexport type ItemListProps = {\n\titems: any[];\n\tgetItemId?: (item: any) => string;\n\tgetItemDisplayName?: (item: any) => string;\n\tclickItem: (s: string) => void;\n\tdeleteItem: (s: string) => void;\n\teditItem?: (s: string) => void;\n\temptyListMessage?: ReactNode;\n\tclassName?: string;\n};\n\nexport const ItemList = ({\n\titems,\n\tclickItem,\n\tdeleteItem,\n\teditItem,\n\tgetItemId = (item) => item.appId,\n\tgetItemDisplayName = (item) => item.manifest?.component?.displayName || item.name || item.appId,\n\temptyListMessage = (\n\t\t<>\n\t\t\tThere’s nothing here!\n\t\t\t<br />\n\t\t\tClick the Add button to add apps.\n\t\t</>\n\t),\n\tclassName = \"\",\n}: ItemListProps) => (\n\t<>\n\t\t{items.length < 1 ? (\n\t\t\t<div className={`app-list-empty ${className}`}>{emptyListMessage}</div>\n\t\t) : (\n\t\t\t<div className={`app-list-table ${className}`} role=\"list\">\n\t\t\t\t{items\n\t\t\t\t\t.sort((a, b) => {\n\t\t\t\t\t\tif (getItemDisplayName(a) > getItemDisplayName(b)) {\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t} else if (getItemDisplayName(b) > getItemDisplayName(a)) {\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t})\n\t\t\t\t\t.map((item: any) => {\n\t\t\t\t\t\tconst appID = getItemId(item);\n\n\t\t\t\t\t\tconst openItemEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\n\t\t\t\t\t\t\tclickItem(appID);\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst editItemEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\teditItem?.(appID);\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst deleteItemEventHandler = (e: React.MouseEvent<Element> | React.KeyboardEvent<Element>) => {\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\tdeleteItem(appID);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst keyDownHandler = (e: React.KeyboardEvent<HTMLDivElement>) => {\n\t\t\t\t\t\t\tswitch (e.key) {\n\t\t\t\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\t\t\t\tcase \" \": {\n\t\t\t\t\t\t\t\t\topenItemEventHandler(e);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase \"Delete\": {\n\t\t\t\t\t\t\t\t\tdeleteItemEventHandler(e);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tconst displayName = getItemDisplayName(item);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={appID}\n\t\t\t\t\t\t\t\tid={`app-list-row-${appID}`}\n\t\t\t\t\t\t\t\tclassName=\"app-list-row\"\n\t\t\t\t\t\t\t\trole=\"listitem\"\n\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\tonClick={openItemEventHandler}\n\t\t\t\t\t\t\t\tonKeyDown={keyDownHandler}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span className=\"app-name\">{displayName}</span>\n\t\t\t\t\t\t\t\t<div className=\"icon-bar\">\n\t\t\t\t\t\t\t\t\t{editItem && (\n\t\t\t\t\t\t\t\t\t\t<ButtonIcon className=\"icon-edit\" icon=\"pencil\" text=\"Edit\" onClick={editItemEventHandler} />\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\t\t\t\t\tclassName=\"icon-delete\"\n\t\t\t\t\t\t\t\t\t\ticon=\"trash\"\n\t\t\t\t\t\t\t\t\t\ttext=\"Delete\"\n\t\t\t\t\t\t\t\t\t\tonClick={deleteItemEventHandler}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t</div>\n\t\t)}\n\t</>\n);\n"]}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export declare type OptionalSettingsViewProps = {
3
+ getConfig: typeof FSBL.Clients.ConfigClient.getValue;
4
+ getApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;
5
+ updateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;
6
+ getPreloads: typeof FSBL.Clients.SmartDesktopClient.prototype.getPreloads;
7
+ deletePreload: typeof FSBL.Clients.SmartDesktopClient.prototype.deletePreload;
8
+ addPreload: typeof FSBL.Clients.SmartDesktopClient.prototype.addPreload;
9
+ updatePreload: typeof FSBL.Clients.SmartDesktopClient.prototype.updatePreload;
10
+ };
11
+ export declare const OptionalSettingsView: React.FunctionComponent<OptionalSettingsViewProps>;
@@ -0,0 +1,71 @@
1
+ import React, { useEffect } from "react";
2
+ import { Header } from "../common/Header";
3
+ import { View } from "./View";
4
+ import { Content } from "./Content";
5
+ import { Tab } from "../common/Tab";
6
+ import { launchTutorialLink } from "./common/fsbl_functions";
7
+ import { Preloads } from "./Preloads";
8
+ import { useDispatch, useSelector } from "../../store";
9
+ import { SmartDesktopDesignerActions } from "../../actions/smartDesktopDesignerActions";
10
+ import { EditPreload } from "./EditPreload";
11
+ const openLink = (url) => {
12
+ FSBL.Clients.LauncherClient.spawn("", {
13
+ url,
14
+ addToWorkspace: false,
15
+ }, () => { });
16
+ };
17
+ export const OptionalSettingsView = (props) => {
18
+ const dispatch = useDispatch();
19
+ const preloads = useSelector((state) => state.smartDesktopDesigner.preloads);
20
+ const currentPreload = useSelector((state) => state.smartDesktopDesigner.currentPreload);
21
+ const refreshPreloadList = () => {
22
+ props.getPreloads().then((response) => {
23
+ dispatch(SmartDesktopDesignerActions.update_preloads(response.preloads));
24
+ });
25
+ };
26
+ const setEditView = (preloadAlias) => {
27
+ let isSet = false;
28
+ preloads.forEach((preload) => {
29
+ if (preload.alias == preloadAlias) {
30
+ dispatch(SmartDesktopDesignerActions.set_current_preload(preload));
31
+ isSet = true;
32
+ }
33
+ });
34
+ if (!isSet) {
35
+ dispatch(SmartDesktopDesignerActions.set_current_preload({ alias: "", url: "" }));
36
+ }
37
+ };
38
+ const deletePreload = async (preloadAlias) => {
39
+ await props.deletePreload(preloadAlias);
40
+ refreshPreloadList();
41
+ };
42
+ const cancelAdd = () => {
43
+ dispatch(SmartDesktopDesignerActions.set_current_preload(null));
44
+ refreshPreloadList();
45
+ };
46
+ useEffect(() => {
47
+ refreshPreloadList();
48
+ }, []);
49
+ const preloadComponentProps = {
50
+ preloads,
51
+ deletePreload,
52
+ setEditView,
53
+ };
54
+ return (React.createElement(View, null,
55
+ React.createElement(Header, { helpFunction: () => {
56
+ launchTutorialLink("SDD-06-Preloads");
57
+ } }, "Optional"),
58
+ React.createElement(Content, null,
59
+ React.createElement(Tab, null,
60
+ React.createElement("div", { "data-label": "Preloads" },
61
+ React.createElement("div", { className: "frontmatter" },
62
+ "Inject logic into an existing JavaScript app to augment or modify its behavior.",
63
+ React.createElement("br", null),
64
+ React.createElement("a", { href: "", onClick: (e) => {
65
+ e.preventDefault();
66
+ openLink("https://documentation.finsemble.com/tutorial-Preloads.html");
67
+ } }, "Learn more about preloads"),
68
+ "."),
69
+ currentPreload !== null ? (React.createElement(EditPreload, Object.assign({}, props, { preload: currentPreload, cancelFunction: cancelAdd, updateApp: props.updateApp, deletePreload: deletePreload }))) : (React.createElement(Preloads, Object.assign({}, preloadComponentProps))))))));
70
+ };
71
+ //# sourceMappingURL=OptionalSettingsView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionalSettingsView.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/OptionalSettingsView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAoB,QAAQ,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE;IAChC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAChC,EAAE,EACF;QACC,GAAG;QACH,cAAc,EAAE,KAAK;KACrB,EACD,GAAG,EAAE,GAAE,CAAC,CACR,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAuD,CAAC,KAAK,EAAE,EAAE;IACjG,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC,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tB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,qBAAqB,GAAqB;QAC/C,QAAQ;QACR,aAAa;QACb,WAAW;KACX,CAAC;IAEF,OAAO,CACN,oBAAC,IAAI;QACJ,oBAAC,MAAM,IACN,YAAY,EAAE,GAAG,EAAE;gBAClB,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;YACvC,CAAC,eAGO;QAET,oBAAC,OAAO;YACP,oBAAC,GAAG;gBACH,2CAAgB,UAAU;oBACzB,6BAAK,SAAS,EAAC,aAAa;;wBAE3B,+BAAM;wBACN,2BACC,IAAI,EAAC,EAAE,EACP,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;gCACd,CAAC,CAAC,cAAc,EAAE,CAAC;gCACnB,QAAQ,CAAC,4DAA4D,CAAC,CAAC;4BACxE,CAAC,gCAGE;4BAEC;oBACL,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,CAC1B,oBAAC,WAAW,oBACP,KAAK,IACT,OAAO,EAAE,cAAc,EACvB,cAAc,EAAE,SAAS,EACzB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,aAAa,EAAE,aAAa,IAC3B,CACF,CAAC,CAAC,CAAC,CACH,oBAAC,QAAQ,oBAAK,qBAAqB,EAAI,CACvC,CACI,CAmBD,CACG,CACJ,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect } from \"react\";\nimport { Header } from \"../common/Header\";\nimport { View } from \"./View\";\nimport { Content } from \"./Content\";\nimport { Tab } from \"../common/Tab\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\nimport { PreloadListProps, Preloads } from \"./Preloads\";\nimport { useDispatch, useSelector } from \"../../store\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { EditPreload } from \"./EditPreload\";\n\nexport type OptionalSettingsViewProps = {\n\tgetConfig: typeof FSBL.Clients.ConfigClient.getValue;\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\n\tupdateApp: typeof FSBL.Clients.SmartDesktopClient.prototype.updateApp;\n\tgetPreloads: typeof FSBL.Clients.SmartDesktopClient.prototype.getPreloads;\n\tdeletePreload: typeof FSBL.Clients.SmartDesktopClient.prototype.deletePreload;\n\taddPreload: typeof FSBL.Clients.SmartDesktopClient.prototype.addPreload;\n\tupdatePreload: typeof FSBL.Clients.SmartDesktopClient.prototype.updatePreload;\n};\n\nconst openLink = (url: string) => {\n\tFSBL.Clients.LauncherClient.spawn(\n\t\t\"\",\n\t\t{\n\t\t\turl,\n\t\t\taddToWorkspace: false,\n\t\t},\n\t\t() => {}\n\t);\n};\n\nexport const OptionalSettingsView: React.FunctionComponent<OptionalSettingsViewProps> = (props) => {\n\tconst dispatch = useDispatch();\n\tconst preloads = useSelector((state: RootState) => state.smartDesktopDesigner.preloads);\n\tconst currentPreload = useSelector((state: RootState) => state.smartDesktopDesigner.currentPreload);\n\n\tconst refreshPreloadList = () => {\n\t\tprops.getPreloads().then((response: any) => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_preloads(response.preloads));\n\t\t});\n\t};\n\n\tconst setEditView = (preloadAlias: string | null) => {\n\t\tlet isSet = false;\n\t\tpreloads.forEach((preload) => {\n\t\t\tif (preload.alias == preloadAlias) {\n\t\t\t\tdispatch(SmartDesktopDesignerActions.set_current_preload(preload));\n\t\t\t\tisSet = true;\n\t\t\t}\n\t\t});\n\n\t\tif (!isSet) {\n\t\t\tdispatch(SmartDesktopDesignerActions.set_current_preload({ alias: \"\", url: \"\" }));\n\t\t}\n\t};\n\n\tconst deletePreload = async (preloadAlias: string) => {\n\t\tawait props.deletePreload(preloadAlias);\n\t\trefreshPreloadList();\n\t};\n\n\tconst cancelAdd = () => {\n\t\tdispatch(SmartDesktopDesignerActions.set_current_preload(null));\n\t\trefreshPreloadList();\n\t};\n\n\tuseEffect(() => {\n\t\trefreshPreloadList();\n\t}, []);\n\n\tconst preloadComponentProps: PreloadListProps = {\n\t\tpreloads,\n\t\tdeletePreload,\n\t\tsetEditView,\n\t};\n\n\treturn (\n\t\t<View>\n\t\t\t<Header\n\t\t\t\thelpFunction={() => {\n\t\t\t\t\tlaunchTutorialLink(\"SDD-06-Preloads\");\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tOptional\n\t\t\t</Header>\n\n\t\t\t<Content>\n\t\t\t\t<Tab>\n\t\t\t\t\t<div data-label=\"Preloads\">\n\t\t\t\t\t\t<div className=\"frontmatter\">\n\t\t\t\t\t\t\tInject logic into an existing JavaScript app to augment or modify its behavior.\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref=\"\"\n\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\topenLink(\"https://documentation.finsemble.com/tutorial-Preloads.html\");\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tLearn more about preloads\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t.\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{currentPreload !== null ? (\n\t\t\t\t\t\t\t<EditPreload\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\tpreload={currentPreload}\n\t\t\t\t\t\t\t\tcancelFunction={cancelAdd}\n\t\t\t\t\t\t\t\tupdateApp={props.updateApp}\n\t\t\t\t\t\t\t\tdeletePreload={deletePreload}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Preloads {...preloadComponentProps} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/*\n\t\t\t\t\t<div data-label=\"Config\">\n\t\t\t\t\t\t<div className=\"frontmatter\">\n\t\t\t\t\t\t\tText text text\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\tText text text\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div data-label=\"SelectConnect\">\n\t\t\t\t\t\t<div className=\"frontmatter\">\n\t\t\t\t\t\t\tText text text\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\tText text text\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t*/}\n\t\t\t\t</Tab>\n\t\t\t</Content>\n\t\t</View>\n\t);\n};\n"]}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { PreloadType } from "../../types/smartDesktopDesignerTypes";
3
+ export interface PreloadListProps {
4
+ preloads: PreloadType[];
5
+ deletePreload: (preloadAlias: string) => void;
6
+ setEditView: (preloadAlias: string | null) => void;
7
+ }
8
+ export declare const Preloads: React.FunctionComponent<PreloadListProps>;
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { Button } from "../common/Button";
3
+ import { ItemList } from "./ItemList";
4
+ export const Preloads = ({ preloads, deletePreload, setEditView }) => {
5
+ const getItemId = (preload) => preload.alias;
6
+ const props = {
7
+ items: [...preloads],
8
+ deleteItem: deletePreload,
9
+ clickItem: setEditView,
10
+ getItemId,
11
+ getItemDisplayName: getItemId,
12
+ emptyListMessage: (React.createElement(React.Fragment, null,
13
+ "There\u2019s nothing here!",
14
+ React.createElement("br", null),
15
+ "Click the Add button to add preloads.")),
16
+ className: "no-dropzone",
17
+ };
18
+ return (React.createElement(React.Fragment, null,
19
+ React.createElement("div", null,
20
+ React.createElement(Button, { className: "icon-before-add", fashion: "primary", iconBefore: "plus", text: "Add", onClick: () => {
21
+ setEditView("");
22
+ } })),
23
+ React.createElement("div", null,
24
+ React.createElement(ItemList, Object.assign({}, props)))));
25
+ };
26
+ //# sourceMappingURL=Preloads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Preloads.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Preloads.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAWrD,MAAM,CAAC,MAAM,QAAQ,GAA8C,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,EAAE;IAC/G,MAAM,SAAS,GAAG,CAAC,OAAoB,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAE1D,MAAM,KAAK,GAAkB;QAC5B,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC;QACpB,UAAU,EAAE,aAAa;QACzB,SAAS,EAAE,WAAW;QACtB,SAAS;QACT,kBAAkB,EAAE,SAAS;QAC7B,gBAAgB,EAAE,CACjB;;YAEC,+BAAM;oDAEJ,CACH;QACD,SAAS,EAAE,aAAa;KACxB,CAAC;IAEF,OAAO,CACN;QACC;YACC,oBAAC,MAAM,IACN,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAC,SAAS,EACjB,UAAU,EAAC,MAAM,EACjB,IAAI,EAAC,KAAK,EACV,OAAO,EAAE,GAAG,EAAE;oBACb,WAAW,CAAC,EAAE,CAAC,CAAC;gBACjB,CAAC,GACA,CACG;QACN;YACC,oBAAC,QAAQ,oBAAK,KAAK,EAAI,CAClB,CACJ,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { Button } from \"../common/Button\";\nimport { ItemList, ItemListProps } from \"./ItemList\";\nimport { PreloadType } from \"../../types/smartDesktopDesignerTypes\";\n\nexport interface PreloadListProps {\n\tpreloads: PreloadType[];\n\tdeletePreload: (preloadAlias: string) => void;\n\tsetEditView: (preloadAlias: string | null) => void;\n}\n\ntype preloadType = { alias: string; url: string };\n\nexport const Preloads: React.FunctionComponent<PreloadListProps> = ({ preloads, deletePreload, setEditView }) => {\n\tconst getItemId = (preload: preloadType) => preload.alias;\n\n\tconst props: ItemListProps = {\n\t\titems: [...preloads],\n\t\tdeleteItem: deletePreload,\n\t\tclickItem: setEditView,\n\t\tgetItemId,\n\t\tgetItemDisplayName: getItemId,\n\t\temptyListMessage: (\n\t\t\t<>\n\t\t\t\tThere’s nothing here!\n\t\t\t\t<br />\n\t\t\t\tClick the Add button to add preloads.\n\t\t\t</>\n\t\t),\n\t\tclassName: \"no-dropzone\",\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"icon-before-add\"\n\t\t\t\t\tfashion=\"primary\"\n\t\t\t\t\ticonBefore=\"plus\"\n\t\t\t\t\ttext=\"Add\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetEditView(\"\");\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<ItemList {...props} />\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Publish.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Publish.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAOxD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC9C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAA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AAK,SAAS,EAAC,uBAAuB,IACpC,IAAI,CAAC,KAAK,KAAK,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CACvC,oBAAC,eAAe,oBAAK,IAAI,EAAoB,CAC7C,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAC7C,6BAAK,SAAS,EAAC,0BAA0B,GAAO,CAChD,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CACxC,6BAAK,SAAS,EAAC,wBAAwB;oBACtC,oBAAC,aAAa,IAAC,SAAS,EAAC,6BAA6B,EAAC,IAAI,EAAC,OAAO,GAAiB,CAC/E,CACN,CAAC,CAAC,CAAC,CACH,6BAAK,SAAS,EAAC,0BAA0B;oBACxC,oBAAC,aAAa,IAAC,SAAS,EAAC,+BAA+B,EAAC,IAAI,EAAC,OAAO,GAAiB,CACjF,CACN,CACI;gBACN,6BAAK,SAAS,EAAC,uBAAuB,IAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAO,CACpF,CACN,CACD,CAAC;QACH,CAAC,CAAC,CACG;QACL,UAAU,IAAI,CACd,6BAAK,SAAS,EAAC,yBAAyB;YACvC,mDAAyB;YACzB,gRAII;YACJ,oBAAC,gBAAgB,OAAG,CACf,CACN,CACC,CACH,CACI,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useEffect } from \"react\";\nimport { PublishProgress } from \"./PublishProgress\";\nimport { ExportDeployInfo } from \"./ExportDeployInfo\";\nimport { Button } from \"../common/Button\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { useDispatch, useSelector } from \"../../store\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { ProgressState } from \"../../types/smartDesktopDesignerTypes\";\nimport { ExportProps } from \"./Export\";\nimport { FinsembleIcon } from \"../common/FinsembleIcon\";\nimport { FEA } from \"@finsemble/finsemble-core\";\n\ntype ProgressItem = FEA.ProgressItem;\n\nexport type PublishProps = ExportProps;\n\nexport const Publish = (props: PublishProps) => {\n\tconst dispatch = useDispatch();\n\n\tconst [currentStep, setCurrentStep] = useState(\"\");\n\tconst [stepProgress, setStepProgress] = useState([] as Array<ProgressItem>);\n\n\tconst exportContext = useSelector((state: RootState) => state.smartDesktopDesigner.export);\n\n\tconst { deployInfo, publishError } = exportContext;\n\n\tconst tryAgain = () => {\n\t\tsetCurrentStep(\"\");\n\t\tsetStepProgress([]);\n\t\tdispatch(SmartDesktopDesignerActions.set_deploy_info(null));\n\t\tdispatch(SmartDesktopDesignerActions.set_publish_error(null));\n\n\t\tprops\n\t\t\t.publishToCosaicCloud()\n\t\t\t.then((currentDeployInfo) => dispatch(SmartDesktopDesignerActions.set_deploy_info(currentDeployInfo)))\n\t\t\t.catch((error) => dispatch(SmartDesktopDesignerActions.set_publish_error(error)));\n\t};\n\n\tconst reset = () => {\n\t\tdispatch(SmartDesktopDesignerActions.set_is_publishing(false));\n\t\tdispatch(SmartDesktopDesignerActions.set_publish_error(null));\n\t};\n\n\tconst hasError = stepProgress.some((step) => step.state === ProgressState.Error);\n\n\tconst didFinish =\n\t\t(stepProgress.length > 0 &&\n\t\t\tstepProgress.every((step) => {\n\t\t\t\tif (step.state === ProgressState.Error) {\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.set_publish_error(step.error));\n\t\t\t\t}\n\t\t\t\treturn step.state === ProgressState.Finished;\n\t\t\t})) ||\n\t\thasError;\n\n\tuseEffect(() => {\n\t\tlet debounceTimeout: any = null;\n\t\tif (!didFinish) {\n\t\t\tdebounceTimeout = setInterval(() => {\n\t\t\t\tprops.getPublishProgress().then((data) => {\n\t\t\t\t\tsetCurrentStep(data.currentStep);\n\t\t\t\t\tsetStepProgress(Object.values(data.steps));\n\n\t\t\t\t\t// Finished! When the installer step reaches state \"Finished\"\n\t\t\t\t\tif (data.steps[\"cloud\"].state === ProgressState.Finished) {\n\t\t\t\t\t\t// dispatch(SmartDesktopDesignerActions.SET_IS_PUBLISHING(false));\n\t\t\t\t\t\tclearInterval(debounceTimeout);\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}, props.progressCheckInterval);\n\t\t}\n\n\t\treturn () => {\n\t\t\tif (debounceTimeout) {\n\t\t\t\tclearInterval(debounceTimeout);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\treturn (\n\t\t<div className=\"export-publish-container\">\n\t\t\t{publishError ? (\n\t\t\t\t<div className=\"export-publish-error\">\n\t\t\t\t\t<h3>Your project was not published</h3>\n\n\t\t\t\t\t<p>An error occurred while trying to publish.</p>\n\t\t\t\t\t<p className=\"export-publish-error-message\">&quot;{publishError}&quot;</p>\n\n\t\t\t\t\t<div className=\"export-error-actions\">\n\t\t\t\t\t\t<Button fashion=\"ghost\" text=\"Cancel\" onClick={reset} />\n\t\t\t\t\t\t<Button className=\"export-error-btn\" fashion=\"secondary\" text=\"Try again\" onClick={tryAgain} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<h2>Publishing...</h2>\n\n\t\t\t\t\t<div className={[\"export-publish-progress\", hasError ? \"export-publish-has-error\" : \"\"].join(\" \")}>\n\t\t\t\t\t\t{[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: \"initialize\",\n\t\t\t\t\t\t\t\tdescription: \"Creating a location for the project\",\n\t\t\t\t\t\t\t\terror: \"Failed to create a location for the project\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: \"zip\",\n\t\t\t\t\t\t\t\tdescription: \"Zipping project\",\n\t\t\t\t\t\t\t\terror: \"Failed to zip the project\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: \"upload\",\n\t\t\t\t\t\t\t\tdescription: \"Uploading project\",\n\t\t\t\t\t\t\t\terror: \"Failed to upload the project\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: \"cloud\",\n\t\t\t\t\t\t\t\tdescription: \"Creating installer and site\",\n\t\t\t\t\t\t\t\terror: \"Failed to publish\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t].map((step) => {\n\t\t\t\t\t\t\tlet data = stepProgress.find((item) => item.step === step.name);\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\tdata && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={step.name}\n\t\t\t\t\t\t\t\t\t\tclassName={[\n\t\t\t\t\t\t\t\t\t\t\t\"publish-progress-container\",\n\t\t\t\t\t\t\t\t\t\t\tcurrentStep === step.name ? \"publish-current-step\" : \"\",\n\t\t\t\t\t\t\t\t\t\t].join(\" \")}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-icon\">\n\t\t\t\t\t\t\t\t\t\t\t{data.state === ProgressState.Started ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<PublishProgress {...data}></PublishProgress>\n\t\t\t\t\t\t\t\t\t\t\t) : data.state === ProgressState.NotStarted ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-pending\"></div>\n\t\t\t\t\t\t\t\t\t\t\t) : data.state === ProgressState.Error ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-error\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FinsembleIcon className=\"publish-progress-error-icon\" icon=\"times\"></FinsembleIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-success\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FinsembleIcon className=\"publish-progress-success-icon\" icon=\"check\"></FinsembleIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-text\">{data.error ? step.error : step.description}</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t\t{deployInfo && (\n\t\t\t\t\t\t<div className=\"export-publish-uploaded\">\n\t\t\t\t\t\t\t<h3>Project uploaded</h3>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\tYour project has been uploaded to the cloud. It will take several minutes to generate an installer.\n\t\t\t\t\t\t\t\tShare the installer link with your team. The desktop you&apos;ve created will be available shortly by\n\t\t\t\t\t\t\t\tdownloading and installing from the link.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<ExportDeployInfo />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"]}
1
+ {"version":3,"file":"Publish.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Publish.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,E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inc.\n * All rights reserved.\n */\n\nimport React, { useState, useEffect } from \"react\";\nimport { PublishProgress } from \"./PublishProgress\";\nimport { ExportDeployInfo } from \"./ExportDeployInfo\";\nimport { Button } from \"../common/Button\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { useDispatch, useSelector } from \"../../store\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { ProgressState } from \"../../types/smartDesktopDesignerTypes\";\nimport { ExportProps } from \"./Export\";\nimport { FinsembleIcon } from \"../common/FinsembleIcon\";\nimport { FEA } from \"@finsemble/finsemble-api\";\n\ntype ProgressItem = FEA.ProgressItem;\n\nexport type PublishProps = ExportProps;\n\nexport const Publish = (props: PublishProps) => {\n\tconst dispatch = useDispatch();\n\n\tconst [currentStep, setCurrentStep] = useState(\"\");\n\tconst [stepProgress, setStepProgress] = useState([] as Array<ProgressItem>);\n\n\tconst exportContext = useSelector((state: RootState) => state.smartDesktopDesigner.export);\n\n\tconst { deployInfo, publishError } = exportContext;\n\n\tconst tryAgain = () => {\n\t\tsetCurrentStep(\"\");\n\t\tsetStepProgress([]);\n\t\tdispatch(SmartDesktopDesignerActions.set_deploy_info(null));\n\t\tdispatch(SmartDesktopDesignerActions.set_publish_error(null));\n\n\t\tprops\n\t\t\t.publishToCosaicCloud()\n\t\t\t.then((currentDeployInfo) => dispatch(SmartDesktopDesignerActions.set_deploy_info(currentDeployInfo)))\n\t\t\t.catch((error) => dispatch(SmartDesktopDesignerActions.set_publish_error(error)));\n\t};\n\n\tconst reset = () => {\n\t\tdispatch(SmartDesktopDesignerActions.set_is_publishing(false));\n\t\tdispatch(SmartDesktopDesignerActions.set_publish_error(null));\n\t};\n\n\tconst hasError = stepProgress.some((step) => step.state === ProgressState.Error);\n\n\tconst didFinish =\n\t\t(stepProgress.length > 0 &&\n\t\t\tstepProgress.every((step) => {\n\t\t\t\tif (step.state === ProgressState.Error) {\n\t\t\t\t\tdispatch(SmartDesktopDesignerActions.set_publish_error(step.error));\n\t\t\t\t}\n\t\t\t\treturn step.state === ProgressState.Finished;\n\t\t\t})) ||\n\t\thasError;\n\n\tuseEffect(() => {\n\t\tlet debounceTimeout: any = null;\n\t\tif (!didFinish) {\n\t\t\tdebounceTimeout = setInterval(() => {\n\t\t\t\tprops.getPublishProgress().then((data) => {\n\t\t\t\t\tsetCurrentStep(data.currentStep);\n\t\t\t\t\tsetStepProgress(Object.values(data.steps));\n\n\t\t\t\t\t// Finished! When the installer step reaches state \"Finished\"\n\t\t\t\t\tif (data.steps[\"cloud\"].state === ProgressState.Finished) {\n\t\t\t\t\t\t// dispatch(SmartDesktopDesignerActions.SET_IS_PUBLISHING(false));\n\t\t\t\t\t\tclearInterval(debounceTimeout);\n\t\t\t\t\t\treset();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}, props.progressCheckInterval);\n\t\t}\n\n\t\treturn () => {\n\t\t\tif (debounceTimeout) {\n\t\t\t\tclearInterval(debounceTimeout);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\treturn (\n\t\t<div className=\"export-publish-container\">\n\t\t\t{publishError ? (\n\t\t\t\t<div className=\"export-publish-error\">\n\t\t\t\t\t<h3>Your project was not published</h3>\n\n\t\t\t\t\t<p>An error occurred while trying to publish.</p>\n\t\t\t\t\t<p className=\"export-publish-error-message\">&quot;{publishError}&quot;</p>\n\n\t\t\t\t\t<div className=\"export-error-actions\">\n\t\t\t\t\t\t<Button fashion=\"ghost\" text=\"Cancel\" onClick={reset} />\n\t\t\t\t\t\t<Button className=\"export-error-btn\" fashion=\"secondary\" text=\"Try again\" onClick={tryAgain} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<h2>Publishing...</h2>\n\n\t\t\t\t\t<div className={[\"export-publish-progress\", hasError ? \"export-publish-has-error\" : \"\"].join(\" \")}>\n\t\t\t\t\t\t{[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: \"initialize\",\n\t\t\t\t\t\t\t\tdescription: \"Creating a location for the project\",\n\t\t\t\t\t\t\t\terror: \"Failed to create a location for the project\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: \"zip\",\n\t\t\t\t\t\t\t\tdescription: \"Zipping project\",\n\t\t\t\t\t\t\t\terror: \"Failed to zip the project\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: \"upload\",\n\t\t\t\t\t\t\t\tdescription: \"Uploading project\",\n\t\t\t\t\t\t\t\terror: \"Failed to upload the project\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: \"cloud\",\n\t\t\t\t\t\t\t\tdescription: \"Creating installer and site\",\n\t\t\t\t\t\t\t\terror: \"Failed to publish\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t].map((step) => {\n\t\t\t\t\t\t\tlet data = stepProgress.find((item) => item.step === step.name);\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\tdata && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={step.name}\n\t\t\t\t\t\t\t\t\t\tclassName={[\n\t\t\t\t\t\t\t\t\t\t\t\"publish-progress-container\",\n\t\t\t\t\t\t\t\t\t\t\tcurrentStep === step.name ? \"publish-current-step\" : \"\",\n\t\t\t\t\t\t\t\t\t\t].join(\" \")}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-icon\">\n\t\t\t\t\t\t\t\t\t\t\t{/* eslint-disable no-nested-ternary */}\n\t\t\t\t\t\t\t\t\t\t\t{data.state === ProgressState.Started ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<PublishProgress {...data}></PublishProgress>\n\t\t\t\t\t\t\t\t\t\t\t) : data.state === ProgressState.NotStarted ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-pending\"></div>\n\t\t\t\t\t\t\t\t\t\t\t) : data.state === ProgressState.Error ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-error\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FinsembleIcon className=\"publish-progress-error-icon\" icon=\"times\"></FinsembleIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-success\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FinsembleIcon className=\"publish-progress-success-icon\" icon=\"check\"></FinsembleIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"publish-progress-text\">{data.error ? step.error : step.description}</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t\t{deployInfo && (\n\t\t\t\t\t\t<div className=\"export-publish-uploaded\">\n\t\t\t\t\t\t\t<h3>Project uploaded</h3>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\tYour project has been uploaded to the cloud. It will take several minutes to generate an installer.\n\t\t\t\t\t\t\t\tShare the installer link with your team. The desktop you&apos;ve created will be available shortly by\n\t\t\t\t\t\t\t\tdownloading and installing from the link.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<ExportDeployInfo />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SmartDesktopDesigner.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/SmartDesktopDesigner.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,EA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EAAE;YAC1C,IAAI,QAAQ,CAAC,MAAM,KAAK,aAAa,EAAE;gBACtC,YAAY,EAAE,CAAC;aACf;QACF,CAAC,CACD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAC7B,6BAAK,SAAS,EAAC,kBAAkB;QAChC,6BAAK,SAAS,EAAC,mBAAmB;YACjC,6BAAK,SAAS,EAAC,eAAe;gBAC7B,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAe;gBAEvC,6BAAK,SAAS,EAAC,oBAAoB;oBAClC,6BAAK,SAAS,EAAC,kBAAkB;wBAChC,6BAAK,SAAS,EAAC,cAAc,IAAE,OAAO,IAAI,qBAAqB,OAAO,EAAE,CAAO;wBAC/E,oBAAC,MAAM,IACN,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAC,eAAe,EACpB,OAAO,EAAE,GAAG,EAAE;gCACb,uBAAuB,EAAE,CAAC;4BAC3B,CAAC,GACA,CACG,CACD,CACD;YAEN,6BAAK,SAAS,EAAC,mBAAmB;gBACjC,oBAAC,aAAa,IAAC,IAAI,EAAE,OAAO,CAAC,IAAI,GAAI;gBACrC,6BAAK,SAAS,EAAC,gBAAgB;oBAC9B,oBAAC,WAAW,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAgB,CAClD,CACD,CACD,CACD,CACN,CAAC,CAAC,CAAC,CACH,yCAAK,CACL,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\n/* If you rename \"SmartDesktopDesigner\" to something else (it's been Maker UI, Jumpstart, and DesktopProjectEditor in the past), grep for the following terms (case insensitive):\n * \"SmartDesktop\", \"Smart Desktop\", \"SDD\", \"SDServer\", \"SMART_DESKTOP\"\n */\n\nimport React, { useState, useEffect, useRef } from \"react\";\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\nimport \"../../assets/css/finsemble.css\";\nimport \"./css/styles.css\";\nimport { Navigation } from \"./Navigation\";\nimport { CurrentView } from \"./CurrentView\";\nimport { getCSSVars } from \"./common/getCSSVars\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { ProjectSaveData } from \"../../types/smartDesktopDesignerTypes\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { FEA } from \"@finsemble/finsemble-core\";\nimport { ContentHeader } from \"./ContentHeader\";\nimport { Button } from \"../common/Button\";\n\ntype SDServerInfo = FEA.SDServerInfo;\n\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\nnew FloatingFocus();\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\n\nconst getDefaultTheme = () => {\n\tlet globalCssVars: any = {};\n\tconst docStyle = window.getComputedStyle(document.documentElement);\n\tgetCSSVars(document.styleSheets).forEach((varName: any) => {\n\t\tglobalCssVars[varName] = docStyle.getPropertyValue(varName).trim();\n\t});\n\n\t// In order to prevent the theme from affecting content of smartDesktopDesigner.tsx,\n\t// remove the sheet after reading variables\n\tconst themesheet = document.body.querySelector(\"#themesheet\");\n\tif (themesheet) {\n\t\tdocument.body.removeChild(themesheet);\n\t}\n\n\treturn globalCssVars;\n};\n\nlet themeConfig = {\n\tcurrentTheme: \"Default\",\n\tdefaultTheme: \"Default\",\n\tthemes: {\n\t\tDefault: getDefaultTheme(),\n\t},\n};\n\nexport type ThemeConfig = typeof themeConfig;\n\nexport type SmartDesktopDesignerProps = {\n\tviews: any[];\n\tgetConfig: typeof FSBL.Clients.ConfigClient.getValues;\n\tresetProject: typeof FSBL.Clients.SmartDesktopClient.prototype.resetProject;\n\tgetSDServerInfo: typeof FSBL.Clients.SmartDesktopClient.prototype.getSDServerInfo;\n\tgetProjectSettings: typeof FSBL.Clients.SmartDesktopClient.prototype.getProjectSettings;\n\tupdateProjectSettings?: typeof FSBL.Clients.SmartDesktopClient.prototype.updateProjectSettings;\n\tonThemeUpdated: typeof FSBL.Clients.SmartDesktopClient.onThemeUpdated;\n\tselectProjectPath?: typeof FSBL.Clients.SmartDesktopClient.prototype.selectProjectPath;\n\trestartFinsemble?: () => void;\n};\n\nexport const SmartDesktopDesigner = (props: SmartDesktopDesignerProps) => {\n\tconst dispatch = useDispatch();\n\n\tconst { views } = props;\n\tconst [theme, setTheme] = useState(themeConfig);\n\tconst [sdServerInfo, setSDServerInfo] = useState({ enabled: false, applicationRoot: \"\" } as SDServerInfo);\n\tconst [version, setVersion] = useState(\"\");\n\n\tconst project = useSelector((state: RootState) => state.smartDesktopDesigner.projectInfo);\n\n\tconst setProject = (value: ProjectSaveData) => {\n\t\tdispatch(SmartDesktopDesignerActions.set_project_info(value));\n\t};\n\n\tconst themeListenerRef = useRef((addListenerErr: any, { data }: { data: any }) => {\n\t\tconst newTheme = { ...themeConfig };\n\t\tnewTheme.themes.Default = { ...newTheme.themes.Default };\n\n\t\tfor (let [key, value] of Object.entries(data)) {\n\t\t\tnewTheme.themes.Default[key] = value;\n\t\t}\n\t\tsetTheme(newTheme);\n\t});\n\n\t// Similar to componentDidMount and componentDidUpdate:\n\tuseEffect(() => {\n\t\tprops.getConfig(null, (err: any, newConfig: any) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Clients.Logger.system.error(\"SmartDesktopDesigner\", err);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// @todo: We should use a Client API for this, rather than relying on the config to look this way.\n\t\t\t// That change will be easier to do once the SDD is removed from the Seed.\n\t\t\tsetVersion(newConfig?.finsemble?.system?.FSBLVersion ?? \"\");\n\n\t\t\tprops.getProjectSettings().then((response) => {\n\t\t\t\tlet projectPath = project.path;\n\n\t\t\t\tif (response.settings?.path) {\n\t\t\t\t\tprojectPath = response.settings.path;\n\t\t\t\t}\n\n\t\t\t\tprops.getSDServerInfo().then((jsInfo) => {\n\t\t\t\t\tif (!jsInfo.enabled) {\n\t\t\t\t\t\tFSBL.Clients.Logger.system.error(\n\t\t\t\t\t\t\t\"Smart Desktop Designer started without the Smart Desktop Server being enabled. Check FEA configuration.\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tFSBL.Clients.Logger.system.log(`DPS application root: ${jsInfo.applicationRoot}`);\n\t\t\t\t\t}\n\t\t\t\t\tFSBL.Clients.Logger.system.log(`DPS info: ${JSON.stringify(jsInfo)}`);\n\t\t\t\t\tFSBL.Clients.Logger.system.log(`NewConfig info: ${JSON.stringify(newConfig)}`);\n\n\t\t\t\t\tsetProject({\n\t\t\t\t\t\t...project,\n\t\t\t\t\t\tname: jsInfo?.projectConfig?.name || \"\",\n\t\t\t\t\t\tpath: projectPath,\n\t\t\t\t\t\texport: {\n\t\t\t\t\t\t\t...project.export,\n\t\t\t\t\t\t\ttoolbarIcon: \"/assets/img/Finsemble_Toolbar_Icon.png\",\n\t\t\t\t\t\t\tinstallerIcon: \"/assets/img/installer_icon.ico\",\n\t\t\t\t\t\t\ttaskbarIcon: newConfig?.startup_app?.applicationIcon,\n\t\t\t\t\t\t\tsystemTrayIcon: newConfig?.finsemble?.systemTrayIcon,\n\t\t\t\t\t\t\tsplashScreenImage: newConfig?.splashScreenImage,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\n\t\t\t\t\t// This should be done last as its checked for initial rendering\n\t\t\t\t\t// Otherwise, inital values will be cached within states of sub components\n\t\t\t\t\t// \"Untitled project\" will show as project.name since it will be \"\", e.g.\n\t\t\t\t\tsetSDServerInfo(jsInfo);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\tconst removeHandler = props.onThemeUpdated(themeListenerRef.current);\n\t\treturn () => {\n\t\t\tremoveHandler();\n\t\t};\n\t}, []);\n\n\tconst clickResetProjectButton = () => {\n\t\tconst resetProject = async () => {\n\t\t\tconst [err] = await props.resetProject();\n\t\t\tif (err) alert(`Project failed to reset: ${err.message}`);\n\t\t};\n\t\tFSBL.Clients.DialogManager.open(\n\t\t\t\"yesNo\",\n\t\t\t{\n\t\t\t\ttitle: \"Are you sure?\",\n\t\t\t\tquestion: `Your project will be set back to factory defaults. You will lose all customizations except the name of the project. Finsemble will then be restarted.`,\n\t\t\t\thideModalOnClose: true,\n\t\t\t\tshowNegativeButton: false,\n\t\t\t\taffirmativeResponseLabel: \"Reset Project\",\n\t\t\t},\n\t\t\t(err: any, response: { choice: string }) => {\n\t\t\t\tif (response.choice === \"affirmative\") {\n\t\t\t\t\tresetProject();\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\treturn sdServerInfo.enabled ? (\n\t\t<div className=\"config-container\">\n\t\t\t<div className=\"project-container\">\n\t\t\t\t<div className=\"nav-container\">\n\t\t\t\t\t<Navigation views={views}></Navigation>\n\n\t\t\t\t\t<div className=\"bottom-nav-wrapper\">\n\t\t\t\t\t\t<div className=\"nav-anchor-reset\">\n\t\t\t\t\t\t\t<div className=\"version-info\">{version && `Finsemble version ${version}`}</div>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tfashion=\"danger\"\n\t\t\t\t\t\t\t\ttext=\"Reset project\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tclickResetProjectButton();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"content-container\">\n\t\t\t\t\t<ContentHeader name={project.name} />\n\t\t\t\t\t<div className=\"view-container\">\n\t\t\t\t\t\t<CurrentView views={views} theme={theme}></CurrentView>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t) : (\n\t\t<></>\n\t);\n};\n"]}
1
+ {"version":3,"file":"SmartDesktopDesigner.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/SmartDesktopDesigner.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,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,EAAE,QAA4B,EAAE,EAAE;YAC1C,IAAI,QAAQ,CAAC,MAAM,KAAK,aAAa,EAAE;gBACtC,YAAY,EAAE,CAAC;aACf;QACF,CAAC,CACD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAC7B,6BAAK,SAAS,EAAC,kBAAkB;QAChC,6BAAK,SAAS,EAAC,mBAAmB;YACjC,6BAAK,SAAS,EAAC,eAAe;gBAC7B,oBAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAe;gBAEvC,6BAAK,SAAS,EAAC,oBAAoB;oBAClC,6BAAK,SAAS,EAAC,kBAAkB;wBAChC,6BAAK,SAAS,EAAC,cAAc,IAAE,OAAO,IAAI,qBAAqB,OAAO,EAAE,CAAO;wBAC/E,oBAAC,MAAM,IACN,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAC,eAAe,EACpB,OAAO,EAAE,GAAG,EAAE;gCACb,uBAAuB,EAAE,CAAC;4BAC3B,CAAC,GACA,CACG,CACD,CACD;YAEN,6BAAK,SAAS,EAAC,mBAAmB;gBACjC,oBAAC,aAAa,IAAC,IAAI,EAAE,OAAO,CAAC,IAAI,GAAI;gBACrC,6BAAK,SAAS,EAAC,gBAAgB;oBAC9B,oBAAC,WAAW,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAgB,CAClD,CACD,CACD,CACD,CACN,CAAC,CAAC,CAAC,CACH,yCAAK,CACL,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\n/* If you rename \"SmartDesktopDesigner\" to something else (it's been Maker UI, Jumpstart, and DesktopProjectEditor in the past), grep for the following terms (case insensitive):\n * \"SmartDesktop\", \"Smart Desktop\", \"SDD\", \"SDServer\", \"SMART_DESKTOP\"\n */\n\nimport React, { useState, useEffect, useRef } from \"react\";\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\nimport \"../../assets/css/finsemble.css\";\nimport \"./css/styles.css\";\nimport { Navigation } from \"./Navigation\";\nimport { CurrentView } from \"./CurrentView\";\nimport { getCSSVars } from \"./common/getCSSVars\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { ProjectSaveData } from \"../../types/smartDesktopDesignerTypes\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { FEA } from \"@finsemble/finsemble-api\";\nimport { ContentHeader } from \"./ContentHeader\";\nimport { Button } from \"../common/Button\";\n\ntype SDServerInfo = FEA.SDServerInfo;\n\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\nnew FloatingFocus();\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\n\nconst getDefaultTheme = () => {\n\tlet globalCssVars: any = {};\n\tconst docStyle = window.getComputedStyle(document.documentElement);\n\tgetCSSVars(document.styleSheets).forEach((varName: any) => {\n\t\tglobalCssVars[varName] = docStyle.getPropertyValue(varName).trim();\n\t});\n\n\t// In order to prevent the theme from affecting content of smartDesktopDesigner.tsx,\n\t// remove the sheet after reading variables\n\tconst themesheet = document.body.querySelector(\"#themesheet\");\n\tif (themesheet) {\n\t\tdocument.body.removeChild(themesheet);\n\t}\n\n\treturn globalCssVars;\n};\n\nlet themeConfig = {\n\tcurrentTheme: \"Default\",\n\tdefaultTheme: \"Default\",\n\tthemes: {\n\t\tDefault: getDefaultTheme(),\n\t},\n};\n\nexport type ThemeConfig = typeof themeConfig;\n\nexport type SmartDesktopDesignerProps = {\n\tviews: any[];\n\tgetConfig: typeof FSBL.Clients.ConfigClient.getValues;\n\tresetProject: typeof FSBL.Clients.SmartDesktopClient.prototype.resetProject;\n\tgetSDServerInfo: typeof FSBL.Clients.SmartDesktopClient.prototype.getSDServerInfo;\n\tgetProjectSettings: typeof FSBL.Clients.SmartDesktopClient.prototype.getProjectSettings;\n\tupdateProjectSettings?: typeof FSBL.Clients.SmartDesktopClient.prototype.updateProjectSettings;\n\tonThemeUpdated: typeof FSBL.Clients.SmartDesktopClient.onThemeUpdated;\n\tselectProjectPath?: typeof FSBL.Clients.SmartDesktopClient.prototype.selectProjectPath;\n\trestartFinsemble?: () => void;\n};\n\nexport const SmartDesktopDesigner = (props: SmartDesktopDesignerProps) => {\n\tconst dispatch = useDispatch();\n\n\tconst { views } = props;\n\tconst [theme, setTheme] = useState(themeConfig);\n\tconst [sdServerInfo, setSDServerInfo] = useState({ enabled: false, applicationRoot: \"\" } as SDServerInfo);\n\tconst [version, setVersion] = useState(\"\");\n\n\tconst project = useSelector((state: RootState) => state.smartDesktopDesigner.projectInfo);\n\n\tconst setProject = (value: ProjectSaveData) => {\n\t\tdispatch(SmartDesktopDesignerActions.set_project_info(value));\n\t};\n\n\tconst themeListenerRef = useRef((addListenerErr: any, { data }: { data: any }) => {\n\t\tconst newTheme = { ...themeConfig };\n\t\tnewTheme.themes.Default = { ...newTheme.themes.Default };\n\n\t\tfor (let [key, value] of Object.entries(data)) {\n\t\t\tnewTheme.themes.Default[key] = value;\n\t\t}\n\t\tsetTheme(newTheme);\n\t});\n\n\t// Similar to componentDidMount and componentDidUpdate:\n\tuseEffect(() => {\n\t\tprops.getConfig(null, (err: any, newConfig: any) => {\n\t\t\tif (err) {\n\t\t\t\tFSBL.Clients.Logger.system.error(\"SmartDesktopDesigner\", err);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// @todo: We should use a Client API for this, rather than relying on the config to look this way.\n\t\t\t// That change will be easier to do once the SDD is removed from the Seed.\n\t\t\tsetVersion(newConfig?.finsemble?.system?.FSBLVersion ?? \"\");\n\n\t\t\tprops.getProjectSettings().then((response) => {\n\t\t\t\tlet projectPath = project.path;\n\n\t\t\t\tif (response.settings?.path) {\n\t\t\t\t\tprojectPath = response.settings.path;\n\t\t\t\t}\n\n\t\t\t\tprops.getSDServerInfo().then((jsInfo) => {\n\t\t\t\t\tif (!jsInfo.enabled) {\n\t\t\t\t\t\tFSBL.Clients.Logger.system.error(\n\t\t\t\t\t\t\t\"Smart Desktop Designer started without the Smart Desktop Server being enabled. Check FEA configuration.\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tFSBL.Clients.Logger.system.log(`DPS application root: ${jsInfo.applicationRoot}`);\n\t\t\t\t\t}\n\t\t\t\t\tFSBL.Clients.Logger.system.log(`DPS info: ${JSON.stringify(jsInfo)}`);\n\t\t\t\t\tFSBL.Clients.Logger.system.log(`NewConfig info: ${JSON.stringify(newConfig)}`);\n\n\t\t\t\t\tsetProject({\n\t\t\t\t\t\t...project,\n\t\t\t\t\t\tname: jsInfo?.projectConfig?.name || \"\",\n\t\t\t\t\t\tpath: projectPath,\n\t\t\t\t\t\texport: {\n\t\t\t\t\t\t\t...project.export,\n\t\t\t\t\t\t\ttoolbarIcon: \"/assets/img/Finsemble_Toolbar_Icon.png\",\n\t\t\t\t\t\t\tinstallerIcon: \"/assets/img/installer_icon.ico\",\n\t\t\t\t\t\t\ttaskbarIcon: newConfig?.startup_app?.applicationIcon,\n\t\t\t\t\t\t\tsystemTrayIcon: newConfig?.finsemble?.systemTrayIcon,\n\t\t\t\t\t\t\tsplashScreenImage: newConfig?.splashScreenImage,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\n\t\t\t\t\t// This should be done last as its checked for initial rendering\n\t\t\t\t\t// Otherwise, inital values will be cached within states of sub components\n\t\t\t\t\t// \"Untitled project\" will show as project.name since it will be \"\", e.g.\n\t\t\t\t\tsetSDServerInfo(jsInfo);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\tconst removeHandler = props.onThemeUpdated(themeListenerRef.current);\n\t\treturn () => {\n\t\t\tremoveHandler();\n\t\t};\n\t}, []);\n\n\tconst clickResetProjectButton = () => {\n\t\tconst resetProject = async () => {\n\t\t\tconst [err] = await props.resetProject();\n\t\t\tif (err) alert(`Project failed to reset: ${err.message}`);\n\t\t};\n\t\tFSBL.Clients.DialogManager.open(\n\t\t\t\"yesNo\",\n\t\t\t{\n\t\t\t\ttitle: \"Are you sure?\",\n\t\t\t\tquestion: `Your project will be set back to factory defaults. You will lose all customizations except the name of the project. Finsemble will then be restarted.`,\n\t\t\t\thideModalOnClose: true,\n\t\t\t\tshowNegativeButton: false,\n\t\t\t\taffirmativeResponseLabel: \"Reset Project\",\n\t\t\t},\n\t\t\t(err: any, response: { choice: string }) => {\n\t\t\t\tif (response.choice === \"affirmative\") {\n\t\t\t\t\tresetProject();\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t};\n\n\treturn sdServerInfo.enabled ? (\n\t\t<div className=\"config-container\">\n\t\t\t<div className=\"project-container\">\n\t\t\t\t<div className=\"nav-container\">\n\t\t\t\t\t<Navigation views={views}></Navigation>\n\n\t\t\t\t\t<div className=\"bottom-nav-wrapper\">\n\t\t\t\t\t\t<div className=\"nav-anchor-reset\">\n\t\t\t\t\t\t\t<div className=\"version-info\">{version && `Finsemble version ${version}`}</div>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tfashion=\"danger\"\n\t\t\t\t\t\t\t\ttext=\"Reset project\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tclickResetProjectButton();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"content-container\">\n\t\t\t\t\t<ContentHeader name={project.name} />\n\t\t\t\t\t<div className=\"view-container\">\n\t\t\t\t\t\t<CurrentView views={views} theme={theme}></CurrentView>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t) : (\n\t\t<></>\n\t);\n};\n"]}
@@ -9,7 +9,7 @@ import { Header } from "../common/Header";
9
9
  import { FinsembleSelect } from "../common/FinsembleSelect";
10
10
  import { Button } from "../common/Button";
11
11
  import { Content } from "./Content";
12
- import { ApplicationList } from "./ApplicationList";
12
+ import { ItemList } from "./ItemList";
13
13
  import { SmartDesktopDesignerActions } from "../../actions/smartDesktopDesignerActions";
14
14
  const MENU_NAME_MAX_LENGTH = 50;
15
15
  const EMPTY_MENU_ERROR = {
@@ -76,7 +76,7 @@ export const Toolbar = (props) => {
76
76
  };
77
77
  useEffect(updateMenuList, []);
78
78
  const applicationListProps = {
79
- apps: Object.entries(menus).map(([key, value]) => {
79
+ items: Object.entries(menus).map(([key, value]) => {
80
80
  var _a;
81
81
  const menuObj = JSON.parse(JSON.stringify(value));
82
82
  menuObj.appId = key;
@@ -86,12 +86,12 @@ export const Toolbar = (props) => {
86
86
  }
87
87
  return menuObj;
88
88
  }),
89
- clickApp: (menuId) => {
89
+ clickItem: (menuId) => {
90
90
  setCurrentMenuID(menuId);
91
91
  setMenuName(menus[menuId].displayName);
92
92
  setSelectedApps(menus[menuId].applications);
93
93
  },
94
- deleteApp: removeMenuID,
94
+ deleteItem: removeMenuID,
95
95
  };
96
96
  const backFunction = () => {
97
97
  setCurrentMenuID("");
@@ -118,6 +118,6 @@ export const Toolbar = (props) => {
118
118
  React.createElement("br", null),
119
119
  "You are allowed a maximum of five Menus."),
120
120
  React.createElement(Button, { className: "icon-before-add", fashion: "primary", text: "Add", iconBefore: "plus", disabled: Object.keys(menus).length >= 5, onClick: addNewMenu }),
121
- React.createElement(ApplicationList, Object.assign({}, applicationListProps))))))));
121
+ React.createElement(ItemList, Object.assign({}, applicationListProps))))))));
122
122
  };
123
123
  //# sourceMappingURL=Toolbar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../src/components/smartDesktopDesigner/Toolbar.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;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S,EAAC,aAAa;;oBAE3B,+BAAM;+DAED;gBACN,oBAAC,MAAM,IACN,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,KAAK,EACV,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,EACxC,OAAO,EAAE,UAAU,GAClB;gBACF,oBAAC,eAAe,oBAAK,oBAAoB,EAAI,CACxC,CAEG,CACJ,CACP,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { View } from \"./View\";\n// import { Tab } from \"../common/Tab\";\nimport { Header } from \"../common/Header\";\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\nimport { Button } from \"../common/Button\";\nimport { Content } from \"./Content\";\nimport { ApplicationList } from \"./ApplicationList\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { MenuType, ProjectError } from \"../../types/smartDesktopDesignerTypes\";\n\nconst MENU_NAME_MAX_LENGTH = 50;\n\nexport type ToolbarProps = {\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\n\tgetMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;\n\taddMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;\n\tupdateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;\n\tdeleteMenu: (value: string) => Promise<{ err: any }>;\n};\n\nconst EMPTY_MENU_ERROR: ProjectError = {\n\tviewId: \"toolbar\",\n\tmessage: \"One or more of your app menus is empty\",\n};\n\nexport const Toolbar = (props: ToolbarProps) => {\n\tconst dispatch = useDispatch();\n\tconst [currentMenuID, setCurrentMenuID] = useState(\"\");\n\tconst [menuName, setMenuName] = useState(\"\");\n\tconst [selectedApps, setSelectedApps] = useState<string[]>([]);\n\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\n\n\tif (Object.values(menus).every((menu) => menu.applications.length > 0)) {\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\n\t} else {\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\n\t}\n\n\tfunction updateMenuList() {\n\t\t// Get the app list, so that you can add those apps to the menu\n\t\tprops.getApps().then((response: any) => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\n\t\t});\n\t\t// Get the menu list\n\t\tprops.getMenus().then((getMenusResponse: any) => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_menus(getMenusResponse.menus));\n\t\t});\n\t}\n\n\tconst updateMenuItem = () => {\n\t\tconst whenDone = () => {\n\t\t\tupdateMenuList();\n\t\t\tsetMenuName(\"\");\n\t\t\tsetCurrentMenuID(\"\");\n\t\t};\n\t\tif (currentMenuID == \"new\") {\n\t\t\tprops\n\t\t\t\t.addMenu({\n\t\t\t\t\tdisplayName: menuName,\n\t\t\t\t\tapplications: selectedApps,\n\t\t\t\t\tposition: -1,\n\t\t\t\t})\n\t\t\t\t.then(whenDone);\n\t\t} else {\n\t\t\tprops\n\t\t\t\t.updateMenu(currentMenuID, {\n\t\t\t\t\tdisplayName: menuName,\n\t\t\t\t\tapplications: selectedApps,\n\t\t\t\t\tposition: menus[currentMenuID].position,\n\t\t\t\t})\n\t\t\t\t.then(whenDone);\n\t\t}\n\t};\n\n\tconst removeMenuID = (id: string) => {\n\t\tprops.deleteMenu(id).then(({ err }: { err: string }) => {\n\t\t\tif (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t\tupdateMenuList();\n\t\t});\n\t};\n\n\tconst addNewMenu = () => {\n\t\tsetCurrentMenuID(\"new\");\n\t};\n\n\t/********* Lifecycle effects *********/\n\n\t// Call updateMenuList once the component has mounted\n\t// Can't call out of an effect, or it will cause an endless loop\n\tuseEffect(updateMenuList, []);\n\n\tconst applicationListProps = {\n\t\tapps: Object.entries(menus).map(([key, value]) => {\n\t\t\tconst menuObj = JSON.parse(JSON.stringify(value));\n\t\t\tmenuObj.appId = key;\n\t\t\tmenuObj.name = menuObj.name ?? menuObj.displayName;\n\t\t\tif (menuObj.applications.length === 0) {\n\t\t\t\tmenuObj.icons = \"warning\";\n\t\t\t}\n\t\t\treturn menuObj;\n\t\t}),\n\t\tclickApp: (menuId: string) => {\n\t\t\tsetCurrentMenuID(menuId);\n\t\t\tsetMenuName(menus[menuId].displayName);\n\t\t\tsetSelectedApps(menus[menuId].applications);\n\t\t},\n\t\tdeleteApp: removeMenuID,\n\t};\n\n\tconst backFunction = () => {\n\t\tsetCurrentMenuID(\"\");\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{currentMenuID ? (\n\t\t\t\t<View>\n\t\t\t\t\t<Header backFunction={backFunction}>Menus</Header>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t\t\t\t<label htmlFor=\"menu-name\">Name</label>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tid=\"menu-name\"\n\t\t\t\t\t\t\t\tvalue={menuName}\n\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t// This is the equivalent of using maxLength={MENU_NAME_MAX_LENGTH}\n\t\t\t\t\t\t\t\t\t// except that this way is testable with enzyme\n\t\t\t\t\t\t\t\t\tsetMenuName(e.target.value.substr(0, MENU_NAME_MAX_LENGTH));\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t\t\t\t<label htmlFor=\"menu-group\">Group contents</label>\n\t\t\t\t\t\t\t<FinsembleSelect\n\t\t\t\t\t\t\t\toptions={apps.map((app) => app.name)}\n\t\t\t\t\t\t\t\tvalues={apps.map((app) => app.appId)}\n\t\t\t\t\t\t\t\tselected={menus[currentMenuID]?.applications || []}\n\t\t\t\t\t\t\t\tupdateCallback={setSelectedApps}\n\t\t\t\t\t\t\t\tshowSearch={true}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"app-edit-actions\">\n\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={menuName.length <= 0} onClick={updateMenuItem} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Content>\n\t\t\t\t</View>\n\t\t\t) : (\n\t\t\t\t<View>\n\t\t\t\t\t<Header>Toolbar</Header>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t{/* <Tab> */}\n\t\t\t\t\t\t<div data-label=\"Menus\">\n\t\t\t\t\t\t\t<div className=\"frontmatter\">\n\t\t\t\t\t\t\t\tThis screen allows you to make menus that will appear on your Toolbar.\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\tYou are allowed a maximum of five Menus.\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"icon-before-add\"\n\t\t\t\t\t\t\t\tfashion=\"primary\"\n\t\t\t\t\t\t\t\ttext=\"Add\"\n\t\t\t\t\t\t\t\ticonBefore=\"plus\"\n\t\t\t\t\t\t\t\tdisabled={Object.keys(menus).length >= 5}\n\t\t\t\t\t\t\t\tonClick={addNewMenu}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ApplicationList {...applicationListProps} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/* </Tab> */}\n\t\t\t\t\t</Content>\n\t\t\t\t</View>\n\t\t\t)}\n\t\t</>\n\t);\n};\n"]}
1
+ {"version":3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M,EAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,IAAI,CAAC,EAAE,OAAO,EAAE,cAAc,GAAI,CAC9F,CACG,CACJ,CACP,CAAC,CAAC,CAAC,CACH,oBAAC,IAAI;QACJ,oBAAC,MAAM,kBAAiB;QACxB,oBAAC,OAAO;YAEP,2CAAgB,OAAO;gBACtB,6BAAK,SAAS,EAAC,aAAa;;oBAE3B,+BAAM;+DAED;gBACN,oBAAC,MAAM,IACN,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,KAAK,EACV,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,EACxC,OAAO,EAAE,UAAU,GAClB;gBACF,oBAAC,QAAQ,oBAAK,oBAAoB,EAAI,CACjC,CAEG,CACJ,CACP,CACC,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector, useDispatch } from \"../../store\";\nimport { View } from \"./View\";\n// import { Tab } from \"../common/Tab\";\nimport { Header } from \"../common/Header\";\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\nimport { Button } from \"../common/Button\";\nimport { Content } from \"./Content\";\nimport { ItemList, ItemListProps } from \"./ItemList\";\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\nimport { RootState } from \"../../reducers/rootReducer\";\nimport { MenuType, ProjectError } from \"../../types/smartDesktopDesignerTypes\";\n\nconst MENU_NAME_MAX_LENGTH = 50;\n\nexport type ToolbarProps = {\n\tgetApps: typeof FSBL.Clients.SmartDesktopClient.prototype.getApps;\n\tgetMenus: typeof FSBL.Clients.SmartDesktopClient.prototype.getMenus;\n\taddMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.addMenu;\n\tupdateMenu: typeof FSBL.Clients.SmartDesktopClient.prototype.updateMenu;\n\tdeleteMenu: (value: string) => Promise<{ err: any }>;\n};\n\nconst EMPTY_MENU_ERROR: ProjectError = {\n\tviewId: \"toolbar\",\n\tmessage: \"One or more of your app menus is empty\",\n};\n\nexport const Toolbar = (props: ToolbarProps) => {\n\tconst dispatch = useDispatch();\n\tconst [currentMenuID, setCurrentMenuID] = useState(\"\");\n\tconst [menuName, setMenuName] = useState(\"\");\n\tconst [selectedApps, setSelectedApps] = useState<string[]>([]);\n\n\tconst apps = useSelector((state: RootState) => state.smartDesktopDesigner.apps);\n\tconst menus = useSelector<MenuType>((state: RootState) => state.smartDesktopDesigner.menus);\n\n\tif (Object.values(menus).every((menu) => menu.applications.length > 0)) {\n\t\tdispatch(SmartDesktopDesignerActions.delete_project_error(EMPTY_MENU_ERROR));\n\t} else {\n\t\tdispatch(SmartDesktopDesignerActions.set_project_error(EMPTY_MENU_ERROR));\n\t}\n\n\tfunction updateMenuList() {\n\t\t// Get the app list, so that you can add those apps to the menu\n\t\tprops.getApps().then((response: any) => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_apps(response.apps));\n\t\t});\n\t\t// Get the menu list\n\t\tprops.getMenus().then((getMenusResponse: any) => {\n\t\t\tdispatch(SmartDesktopDesignerActions.update_menus(getMenusResponse.menus));\n\t\t});\n\t}\n\n\tconst updateMenuItem = () => {\n\t\tconst whenDone = () => {\n\t\t\tupdateMenuList();\n\t\t\tsetMenuName(\"\");\n\t\t\tsetCurrentMenuID(\"\");\n\t\t};\n\t\tif (currentMenuID == \"new\") {\n\t\t\tprops\n\t\t\t\t.addMenu({\n\t\t\t\t\tdisplayName: menuName,\n\t\t\t\t\tapplications: selectedApps,\n\t\t\t\t\tposition: -1,\n\t\t\t\t})\n\t\t\t\t.then(whenDone);\n\t\t} else {\n\t\t\tprops\n\t\t\t\t.updateMenu(currentMenuID, {\n\t\t\t\t\tdisplayName: menuName,\n\t\t\t\t\tapplications: selectedApps,\n\t\t\t\t\tposition: menus[currentMenuID].position,\n\t\t\t\t})\n\t\t\t\t.then(whenDone);\n\t\t}\n\t};\n\n\tconst removeMenuID = (id: string) => {\n\t\tprops.deleteMenu(id).then(({ err }: { err: string }) => {\n\t\t\tif (err) {\n\t\t\t\talert(err);\n\t\t\t}\n\t\t\tupdateMenuList();\n\t\t});\n\t};\n\n\tconst addNewMenu = () => {\n\t\tsetCurrentMenuID(\"new\");\n\t};\n\n\t/********* Lifecycle effects *********/\n\n\t// Call updateMenuList once the component has mounted\n\t// Can't call out of an effect, or it will cause an endless loop\n\tuseEffect(updateMenuList, []);\n\n\tconst applicationListProps: ItemListProps = {\n\t\titems: Object.entries(menus).map(([key, value]) => {\n\t\t\tconst menuObj = JSON.parse(JSON.stringify(value));\n\t\t\tmenuObj.appId = key;\n\t\t\tmenuObj.name = menuObj.name ?? menuObj.displayName;\n\t\t\tif (menuObj.applications.length === 0) {\n\t\t\t\tmenuObj.icons = \"warning\";\n\t\t\t}\n\t\t\treturn menuObj;\n\t\t}),\n\t\tclickItem: (menuId: string) => {\n\t\t\tsetCurrentMenuID(menuId);\n\t\t\tsetMenuName(menus[menuId].displayName);\n\t\t\tsetSelectedApps(menus[menuId].applications);\n\t\t},\n\t\tdeleteItem: removeMenuID,\n\t};\n\n\tconst backFunction = () => {\n\t\tsetCurrentMenuID(\"\");\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{currentMenuID ? (\n\t\t\t\t<View>\n\t\t\t\t\t<Header backFunction={backFunction}>Menus</Header>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t\t\t\t<label htmlFor=\"menu-name\">Name</label>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tid=\"menu-name\"\n\t\t\t\t\t\t\t\tvalue={menuName}\n\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t// This is the equivalent of using maxLength={MENU_NAME_MAX_LENGTH}\n\t\t\t\t\t\t\t\t\t// except that this way is testable with enzyme\n\t\t\t\t\t\t\t\t\tsetMenuName(e.target.value.substr(0, MENU_NAME_MAX_LENGTH));\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"app-edit-field\">\n\t\t\t\t\t\t\t<label htmlFor=\"menu-group\">Group contents</label>\n\t\t\t\t\t\t\t<FinsembleSelect\n\t\t\t\t\t\t\t\toptions={apps.map((app) => app.name)}\n\t\t\t\t\t\t\t\tvalues={apps.map((app) => app.appId)}\n\t\t\t\t\t\t\t\tselected={menus[currentMenuID]?.applications || []}\n\t\t\t\t\t\t\t\tupdateCallback={setSelectedApps}\n\t\t\t\t\t\t\t\tshowSearch={true}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"app-edit-actions\">\n\t\t\t\t\t\t\t<span></span>\n\t\t\t\t\t\t\t<Button fashion=\"secondary\" text=\"Save\" disabled={menuName.length <= 0} onClick={updateMenuItem} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Content>\n\t\t\t\t</View>\n\t\t\t) : (\n\t\t\t\t<View>\n\t\t\t\t\t<Header>Toolbar</Header>\n\t\t\t\t\t<Content>\n\t\t\t\t\t\t{/* <Tab> */}\n\t\t\t\t\t\t<div data-label=\"Menus\">\n\t\t\t\t\t\t\t<div className=\"frontmatter\">\n\t\t\t\t\t\t\t\tThis screen allows you to make menus that will appear on your Toolbar.\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\tYou are allowed a maximum of five Menus.\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"icon-before-add\"\n\t\t\t\t\t\t\t\tfashion=\"primary\"\n\t\t\t\t\t\t\t\ttext=\"Add\"\n\t\t\t\t\t\t\t\ticonBefore=\"plus\"\n\t\t\t\t\t\t\t\tdisabled={Object.keys(menus).length >= 5}\n\t\t\t\t\t\t\t\tonClick={addNewMenu}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ItemList {...applicationListProps} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/* </Tab> */}\n\t\t\t\t\t</Content>\n\t\t\t\t</View>\n\t\t\t)}\n\t\t</>\n\t);\n};\n"]}
@@ -4,6 +4,7 @@ import { Export } from "../Export";
4
4
  import { Themes } from "../Themes";
5
5
  import { Authentication } from "../Authentication";
6
6
  import { Toolbar } from "../Toolbar";
7
+ import { OptionalSettingsView } from "../OptionalSettingsView";
7
8
  const SmartDesktopClient = new FSBL.Clients.SmartDesktopClient();
8
9
  const getSDServerInfo = (cb) => {
9
10
  SmartDesktopClient.getSDServerInfo().then((info) => {
@@ -45,15 +46,32 @@ export default [
45
46
  getApps: () => SmartDesktopClient.getApps(),
46
47
  addApp: (appId, appConfig) => SmartDesktopClient.addApp(appId, appConfig),
47
48
  deleteApp: (appId) => SmartDesktopClient.deleteApp(appId),
49
+ updateApp: (appId, appConfig) => SmartDesktopClient.updateApp(appId, appConfig),
48
50
  getMenus: () => SmartDesktopClient.getMenus(),
49
51
  addMenu: (menuConfig) => SmartDesktopClient.addMenu(menuConfig),
50
52
  updateMenu: (menuId, menuConfig) => SmartDesktopClient.updateMenu(menuId, menuConfig),
51
53
  deleteMenu: (menuId) => SmartDesktopClient.deleteMenu(menuId),
54
+ getPreloads: () => SmartDesktopClient.getPreloads(),
52
55
  getAppConfigTemplate: () => SmartDesktopClient.getAppConfigTemplate(),
53
56
  isInboundInteropAuthorized: FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized,
54
57
  isOutboundInteropAuthorized: FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized,
55
58
  },
56
59
  },
60
+ {
61
+ id: "applications-optional",
62
+ icon: "code-block",
63
+ name: "Optional",
64
+ component: OptionalSettingsView,
65
+ props: {
66
+ getApps: SmartDesktopClient.getApps,
67
+ updateApp: SmartDesktopClient.updateApp,
68
+ getConfig: FSBL.Clients.ConfigClient.getValue.bind(FSBL.Clients.ConfigClient),
69
+ getPreloads: SmartDesktopClient.getPreloads,
70
+ addPreload: SmartDesktopClient.addPreload,
71
+ updatePreload: SmartDesktopClient.updatePreload,
72
+ deletePreload: SmartDesktopClient.deletePreload,
73
+ },
74
+ },
57
75
  ],
58
76
  },
59
77
  {
@@ -1 +1 @@
1
- {"version":3,"file":"views.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/common/views.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAqB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAe,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,MAAM,EAAc,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,OAAO,EAAgB,MAAM,YAAY,CAAC;AAInD,MAAM,kBAAkB,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;AAEjE,MAAM,eAAe,GAAG,CAAC,EAAO,EAAE,EAAE;IACnC,kBAAkB,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE;QACvD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,GAAQ,EAAE,SAAc,EAAE,EAAE;;YACtE,EAAE,iCACE,IAAI,KACP,MAAM,kCACF,IAAI,CAAC,MAAM,KACd,WAAW,EAAE,wCAAwC,EACrD,aAAa,EAAE,gCAAgC,EAC/C,WAAW,EAAE,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,0CAAE,eAAe,EACpD,cAAc,EAAE,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,0CAAE,cAAc,EACpD,iBAAiB,EAA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AAC;oBAC7E,kBAAkB,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,kBAAkB,EAAE;oBACjE,gBAAgB,EAAE,CAAC,WAAmB,EAAE,aAAiC,SAAS,EAAE,EAAE,CACrF,kBAAkB,CAAC,gBAAgB,CAAC,WAAW,IAAI,SAAS,EAAE,UAAU,CAAC;oBAC1E,qBAAqB,EAAE,CAAC,GAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,GAAG,CAAC;iBAClE;aACjB;SACD;KACD;CACoB,CAAC","sourcesContent":["import { GettingStarted } from \"../GettingStarted\";\nimport { Applications, ApplicationsProps } from \"../Applications\";\nimport { Export, ExportProps } from \"../Export\";\nimport { Themes, ThemeProps } from \"../Themes\";\nimport { AuthenticationProvider, MenuObjType, ViewSectionInfo } from \"../../../types/smartDesktopDesignerTypes\";\nimport { Authentication, AuthenticationProps } from \"../Authentication\";\nimport { services } from \"@finsemble/finsemble-core\";\nimport { Toolbar, ToolbarProps } from \"../Toolbar\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\n\nconst SmartDesktopClient = new FSBL.Clients.SmartDesktopClient();\n\nconst getSDServerInfo = (cb: any) => {\n\tSmartDesktopClient.getSDServerInfo().then((info: any) => {\n\t\tFSBL.Clients.ConfigClient.getValues(null, (err: any, newConfig: any) => {\n\t\t\tcb({\n\t\t\t\t...info,\n\t\t\t\texport: {\n\t\t\t\t\t...info.export,\n\t\t\t\t\ttoolbarIcon: \"/assets/img/Finsemble_Toolbar_Icon.png\",\n\t\t\t\t\tinstallerIcon: \"/assets/img/installer_icon.ico\",\n\t\t\t\t\ttaskbarIcon: newConfig?.startup_app?.applicationIcon,\n\t\t\t\t\tsystemTrayIcon: newConfig?.finsemble?.systemTrayIcon,\n\t\t\t\t\tsplashScreenImage: newConfig?.splashScreenImage,\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t});\n};\n\nfunction createCSRF() {\n\tconst epoch = new Date();\n\tlet id = epoch.getTime().toString(36);\n\tid = id + Math.floor(Math.random() * Math.pow(36, 2)).toString(36);\n\treturn id.toUpperCase();\n}\n\nexport default [\n\t{\n\t\tshowLabel: false,\n\t\tlabel: \"\",\n\t\tviews: [\n\t\t\t{\n\t\t\t\tid: \"getting-started\",\n\t\t\t\ticon: \"flag\",\n\t\t\t\tname: \"Start\",\n\t\t\t\tcomponent: GettingStarted,\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tshowLabel: true,\n\t\tlabel: \"Apps\",\n\t\tviews: [\n\t\t\t{\n\t\t\t\tid: \"applications\",\n\t\t\t\ticon: \"window\",\n\t\t\t\tname: \"Manage apps\",\n\t\t\t\tcomponent: Applications,\n\t\t\t\tprops: <ApplicationsProps>{\n\t\t\t\t\tgetApps: () => SmartDesktopClient.getApps(),\n\t\t\t\t\taddApp: (appId: string, appConfig: AppDefinition) => SmartDesktopClient.addApp(appId, appConfig),\n\t\t\t\t\tdeleteApp: (appId: string) => SmartDesktopClient.deleteApp(appId),\n\t\t\t\t\tgetMenus: () => SmartDesktopClient.getMenus(),\n\t\t\t\t\taddMenu: (menuConfig: MenuObjType) => SmartDesktopClient.addMenu(menuConfig),\n\t\t\t\t\tupdateMenu: (menuId: string, menuConfig: MenuObjType) => SmartDesktopClient.updateMenu(menuId, menuConfig),\n\t\t\t\t\tdeleteMenu: (menuId: string) => SmartDesktopClient.deleteMenu(menuId),\n\t\t\t\t\tgetAppConfigTemplate: () => SmartDesktopClient.getAppConfigTemplate(),\n\t\t\t\t\tisInboundInteropAuthorized: FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized,\n\t\t\t\t\tisOutboundInteropAuthorized: FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized,\n\t\t\t\t},\n\t\t\t},\n\t\t\t// {\n\t\t\t// \tid: \"applications-optional\",\n\t\t\t// \ticon: \"window\",\n\t\t\t// \tname: \"Optional\",\n\t\t\t// \tcomponent: Applications, // @todo - create correct component\n\t\t\t// \tprops: {},\n\t\t\t// },\n\t\t],\n\t},\n\t{\n\t\tshowLabel: true,\n\t\tlabel: \"Desktop Customization\",\n\t\tviews: [\n\t\t\t{\n\t\t\t\tid: \"themes\",\n\t\t\t\ticon: \"paint-roller\",\n\t\t\t\tname: \"Theme\",\n\t\t\t\tcomponent: Themes,\n\t\t\t\tprops: {\n\t\t\t\t\tgetSDServerInfo,\n\t\t\t\t\tupdateProjectSettings: (obj: any) => SmartDesktopClient.updateProjectSettings(obj),\n\t\t\t\t\tupdateThemes: (id: string, newValue: string) => {\n\t\t\t\t\t\tFSBL.Clients.SmartDesktopClient.updateThemeVariable(id, newValue);\n\t\t\t\t\t},\n\t\t\t\t\tareYouSure: (affirmativeCallback: Function) => {\n\t\t\t\t\t\tFSBL.Clients.DialogManager.open(\n\t\t\t\t\t\t\t\"yesNo\",\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: \"Change your theme?\",\n\t\t\t\t\t\t\t\tquestion: `Selecting this template will undo any custom theme changes. Would you like to proceed?`,\n\t\t\t\t\t\t\t\thideModalOnClose: true,\n\t\t\t\t\t\t\t\tshowNegativeButton: false,\n\t\t\t\t\t\t\t\taffirmativeResponseLabel: \"Yes\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: any, response: { choice: string }) => {\n\t\t\t\t\t\t\t\tif (response.choice === \"affirmative\") {\n\t\t\t\t\t\t\t\t\taffirmativeCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\tupdateSplashScreen: (file: File) => SmartDesktopClient.updateSplashScreen(file),\n\t\t\t\t\tupdateToolbarIcon: (file: File) => SmartDesktopClient.updateToolbarIcon(file),\n\t\t\t\t\tupdateTaskbarIcon: (file: File) => SmartDesktopClient.updateTaskbarIcon(file),\n\t\t\t\t\tupdateSystemTrayIcon: (file: File) => SmartDesktopClient.updateSystemTrayIcon(file),\n\t\t\t\t\tupdateInstallerIcon: (file: File) => SmartDesktopClient.updateInstallerIcon(file),\n\t\t\t\t} as ThemeProps,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"toolbar\",\n\t\t\t\ticon: \"toolbar\",\n\t\t\t\tname: \"Toolbar\",\n\t\t\t\tcomponent: Toolbar,\n\t\t\t\tprops: {\n\t\t\t\t\tgetApps: () => SmartDesktopClient.getApps(),\n\t\t\t\t\tgetMenus: () => SmartDesktopClient.getMenus(),\n\t\t\t\t\taddMenu: (menuConfig: MenuObjType) => SmartDesktopClient.addMenu(menuConfig),\n\t\t\t\t\tupdateMenu: (menuId: string, menuConfig: MenuObjType) => SmartDesktopClient.updateMenu(menuId, menuConfig),\n\t\t\t\t\tdeleteMenu: (menuId: string) => SmartDesktopClient.deleteMenu(menuId),\n\t\t\t\t} as ToolbarProps,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"authentication\",\n\t\t\t\ticon: \"key\",\n\t\t\t\tname: \"Authentication\",\n\t\t\t\tcomponent: Authentication,\n\t\t\t\tprops: (<AuthenticationProps>{\n\t\t\t\t\tgetAuthenticationProviders: () =>\n\t\t\t\t\t\tnew Promise<AuthenticationProvider[]>((resolve) => {\n\t\t\t\t\t\t\tSmartDesktopClient.getAuthenticationProviders().then((providers: AuthenticationProvider[]) => {\n\t\t\t\t\t\t\t\tresolve(providers);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}),\n\t\t\t\t\tsetAuthenticationProviders: (authenticationProviders: any) =>\n\t\t\t\t\t\tSmartDesktopClient.setAuthenticationProviders(authenticationProviders),\n\t\t\t\t\ttestAuthenticationProvider: (provider: AuthenticationProvider) =>\n\t\t\t\t\t\tnew Promise((resolve, reject) => {\n\t\t\t\t\t\t\tconst scopeMaybe = provider.scope ? `&scope=${provider.scope}` : \"\";\n\t\t\t\t\t\t\tconst nonceMaybe = provider.nonce ? `&nonce=${Math.random()}` : \"\";\n\t\t\t\t\t\t\tconst url = `${provider.authorization_endpoint}?client_id=${\n\t\t\t\t\t\t\t\tprovider.client_id\n\t\t\t\t\t\t\t}&response_type=token&redirect_uri=${\n\t\t\t\t\t\t\t\tprovider.redirect_uri\n\t\t\t\t\t\t\t}&state=${createCSRF()}${scopeMaybe}${nonceMaybe}`;\n\n\t\t\t\t\t\t\tFSBL.Clients.LauncherClient.spawn(\n\t\t\t\t\t\t\t\t\"authentication\",\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t\t\ttop: \"center\",\n\t\t\t\t\t\t\t\t\tleft: \"center\",\n\t\t\t\t\t\t\t\t\tcanGroup: false,\n\t\t\t\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\t\t\t\tcustomData: {\n\t\t\t\t\t\t\t\t\t\t\tforeign: {\n\t\t\t\t\t\t\t\t\t\t\t\tservices: {\n\t\t\t\t\t\t\t\t\t\t\t\t\twindowService: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowTabbing: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowSnapping: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowGrouping: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\tauthroizationUrl: url,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tFSBL.Clients.RouterClient.addListener(\"SDD-Auth-Test-Response\", (error: any, response: any) => {\n\t\t\t\t\t\t\t\tif (error || !response.data) {\n\t\t\t\t\t\t\t\t\treject(error || \"Empty error response from OAuth\");\n\t\t\t\t\t\t\t\t} else if (response.data.err) {\n\t\t\t\t\t\t\t\t\treject(response.data.err);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresolve(null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}),\n\t\t\t\t}) as AuthenticationProps,\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tshowLabel: true,\n\t\tlabel: \"Deploy\",\n\t\tviews: [\n\t\t\t{\n\t\t\t\tid: \"export\",\n\t\t\t\ticon: \"upload\",\n\t\t\t\tname: \"Finish\",\n\t\t\t\tcomponent: Export,\n\t\t\t\tprops: (<ExportProps>{\n\t\t\t\t\tprogressCheckInterval: 500,\n\t\t\t\t\tgetSDServerInfo,\n\t\t\t\t\tgetProjectConfig: () => SmartDesktopClient.projectConfig(),\n\t\t\t\t\tcreateProjectZip: (projectName: string, targetPath: string | undefined = undefined) =>\n\t\t\t\t\t\tSmartDesktopClient.createProjectZip(projectName || \"default\", targetPath),\n\t\t\t\t\tpublishToCosaicCloud: (uuid) => SmartDesktopClient.publishToCosaicCloud(uuid),\n\t\t\t\t\tgetPublishProgress: () => SmartDesktopClient.getPublishProgress(),\n\t\t\t\t\tcopyProjectFiles: (projectName: string, targetPath: string | undefined = undefined) =>\n\t\t\t\t\t\tSmartDesktopClient.copyProjectFiles(projectName || \"default\", targetPath),\n\t\t\t\t\tupdateProjectSettings: (obj: any) => SmartDesktopClient.updateProjectSettings(obj),\n\t\t\t\t}) as ExportProps,\n\t\t\t},\n\t\t],\n\t},\n] as ViewSectionInfo[];\n"]}
1
+ {"version":3,"file":"views.js","sourceRoot":"","sources":["../../../../src/components/smartDesktopDesigner/common/views.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAqB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAe,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,MA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E;oBAC1D,gBAAgB,EAAE,CAAC,WAAmB,EAAE,aAAiC,SAAS,EAAE,EAAE,CACrF,kBAAkB,CAAC,gBAAgB,CAAC,WAAW,IAAI,SAAS,EAAE,UAAU,CAAC;oBAC1E,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,IAAI,CAAC;oBAC7E,kBAAkB,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,kBAAkB,EAAE;oBACjE,gBAAgB,EAAE,CAAC,WAAmB,EAAE,aAAiC,SAAS,EAAE,EAAE,CACrF,kBAAkB,CAAC,gBAAgB,CAAC,WAAW,IAAI,SAAS,EAAE,UAAU,CAAC;oBAC1E,qBAAqB,EAAE,CAAC,GAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,GAAG,CAAC;iBAClE;aACjB;SACD;KACD;CACoB,CAAC","sourcesContent":["import { GettingStarted } from \"../GettingStarted\";\nimport { Applications, ApplicationsProps } from \"../Applications\";\nimport { Export, ExportProps } from \"../Export\";\nimport { Themes, ThemeProps } from \"../Themes\";\nimport { AuthenticationProvider, MenuObjType, ViewSectionInfo } from \"../../../types/smartDesktopDesignerTypes\";\nimport { Authentication, AuthenticationProps } from \"../Authentication\";\nimport { services } from \"@finsemble/finsemble-api\";\nimport { Toolbar, ToolbarProps } from \"../Toolbar\";\nimport { OptionalSettingsView, OptionalSettingsViewProps } from \"../OptionalSettingsView\";\n\ntype AppDefinition = services.Interop.types.AppDefinition;\n\nconst SmartDesktopClient = new FSBL.Clients.SmartDesktopClient();\n\nconst getSDServerInfo = (cb: any) => {\n\tSmartDesktopClient.getSDServerInfo().then((info: any) => {\n\t\tFSBL.Clients.ConfigClient.getValues(null, (err: any, newConfig: any) => {\n\t\t\tcb({\n\t\t\t\t...info,\n\t\t\t\texport: {\n\t\t\t\t\t...info.export,\n\t\t\t\t\ttoolbarIcon: \"/assets/img/Finsemble_Toolbar_Icon.png\",\n\t\t\t\t\tinstallerIcon: \"/assets/img/installer_icon.ico\",\n\t\t\t\t\ttaskbarIcon: newConfig?.startup_app?.applicationIcon,\n\t\t\t\t\tsystemTrayIcon: newConfig?.finsemble?.systemTrayIcon,\n\t\t\t\t\tsplashScreenImage: newConfig?.splashScreenImage,\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t});\n};\n\nfunction createCSRF() {\n\tconst epoch = new Date();\n\tlet id = epoch.getTime().toString(36);\n\tid = id + Math.floor(Math.random() * Math.pow(36, 2)).toString(36);\n\treturn id.toUpperCase();\n}\n\nexport default [\n\t{\n\t\tshowLabel: false,\n\t\tlabel: \"\",\n\t\tviews: [\n\t\t\t{\n\t\t\t\tid: \"getting-started\",\n\t\t\t\ticon: \"flag\",\n\t\t\t\tname: \"Start\",\n\t\t\t\tcomponent: GettingStarted,\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tshowLabel: true,\n\t\tlabel: \"Apps\",\n\t\tviews: [\n\t\t\t{\n\t\t\t\tid: \"applications\",\n\t\t\t\ticon: \"window\",\n\t\t\t\tname: \"Manage apps\",\n\t\t\t\tcomponent: Applications,\n\t\t\t\tprops: <ApplicationsProps>{\n\t\t\t\t\tgetApps: () => SmartDesktopClient.getApps(),\n\t\t\t\t\taddApp: (appId: string, appConfig: AppDefinition) => SmartDesktopClient.addApp(appId, appConfig),\n\t\t\t\t\tdeleteApp: (appId: string) => SmartDesktopClient.deleteApp(appId),\n\t\t\t\t\tupdateApp: (appId: string, appConfig: AppDefinition) => SmartDesktopClient.updateApp(appId, appConfig),\n\t\t\t\t\tgetMenus: () => SmartDesktopClient.getMenus(),\n\t\t\t\t\taddMenu: (menuConfig: MenuObjType) => SmartDesktopClient.addMenu(menuConfig),\n\t\t\t\t\tupdateMenu: (menuId: string, menuConfig: MenuObjType) => SmartDesktopClient.updateMenu(menuId, menuConfig),\n\t\t\t\t\tdeleteMenu: (menuId: string) => SmartDesktopClient.deleteMenu(menuId),\n\t\t\t\t\tgetPreloads: () => SmartDesktopClient.getPreloads(),\n\t\t\t\t\tgetAppConfigTemplate: () => SmartDesktopClient.getAppConfigTemplate(),\n\t\t\t\t\tisInboundInteropAuthorized: FSBL.Clients.SmartDesktopClient.isInboundInteropAuthorized,\n\t\t\t\t\tisOutboundInteropAuthorized: FSBL.Clients.SmartDesktopClient.isOutboundInteropAuthorized,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"applications-optional\",\n\t\t\t\ticon: \"code-block\",\n\t\t\t\tname: \"Optional\",\n\t\t\t\tcomponent: OptionalSettingsView,\n\t\t\t\tprops: <OptionalSettingsViewProps>{\n\t\t\t\t\tgetApps: SmartDesktopClient.getApps,\n\t\t\t\t\tupdateApp: SmartDesktopClient.updateApp,\n\t\t\t\t\tgetConfig: FSBL.Clients.ConfigClient.getValue.bind(FSBL.Clients.ConfigClient),\n\t\t\t\t\tgetPreloads: SmartDesktopClient.getPreloads,\n\t\t\t\t\taddPreload: SmartDesktopClient.addPreload,\n\t\t\t\t\tupdatePreload: SmartDesktopClient.updatePreload,\n\t\t\t\t\tdeletePreload: SmartDesktopClient.deletePreload,\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tshowLabel: true,\n\t\tlabel: \"Desktop Customization\",\n\t\tviews: [\n\t\t\t{\n\t\t\t\tid: \"themes\",\n\t\t\t\ticon: \"paint-roller\",\n\t\t\t\tname: \"Theme\",\n\t\t\t\tcomponent: Themes,\n\t\t\t\tprops: {\n\t\t\t\t\tgetSDServerInfo,\n\t\t\t\t\tupdateProjectSettings: (obj: any) => SmartDesktopClient.updateProjectSettings(obj),\n\t\t\t\t\tupdateThemes: (id: string, newValue: string) => {\n\t\t\t\t\t\tFSBL.Clients.SmartDesktopClient.updateThemeVariable(id, newValue);\n\t\t\t\t\t},\n\t\t\t\t\tareYouSure: (affirmativeCallback: Function) => {\n\t\t\t\t\t\tFSBL.Clients.DialogManager.open(\n\t\t\t\t\t\t\t\"yesNo\",\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: \"Change your theme?\",\n\t\t\t\t\t\t\t\tquestion: `Selecting this template will undo any custom theme changes. Would you like to proceed?`,\n\t\t\t\t\t\t\t\thideModalOnClose: true,\n\t\t\t\t\t\t\t\tshowNegativeButton: false,\n\t\t\t\t\t\t\t\taffirmativeResponseLabel: \"Yes\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: any, response: { choice: string }) => {\n\t\t\t\t\t\t\t\tif (response.choice === \"affirmative\") {\n\t\t\t\t\t\t\t\t\taffirmativeCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\tupdateSplashScreen: (file: File) => SmartDesktopClient.updateSplashScreen(file),\n\t\t\t\t\tupdateToolbarIcon: (file: File) => SmartDesktopClient.updateToolbarIcon(file),\n\t\t\t\t\tupdateTaskbarIcon: (file: File) => SmartDesktopClient.updateTaskbarIcon(file),\n\t\t\t\t\tupdateSystemTrayIcon: (file: File) => SmartDesktopClient.updateSystemTrayIcon(file),\n\t\t\t\t\tupdateInstallerIcon: (file: File) => SmartDesktopClient.updateInstallerIcon(file),\n\t\t\t\t} as ThemeProps,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"toolbar\",\n\t\t\t\ticon: \"toolbar\",\n\t\t\t\tname: \"Toolbar\",\n\t\t\t\tcomponent: Toolbar,\n\t\t\t\tprops: {\n\t\t\t\t\tgetApps: () => SmartDesktopClient.getApps(),\n\t\t\t\t\tgetMenus: () => SmartDesktopClient.getMenus(),\n\t\t\t\t\taddMenu: (menuConfig: MenuObjType) => SmartDesktopClient.addMenu(menuConfig),\n\t\t\t\t\tupdateMenu: (menuId: string, menuConfig: MenuObjType) => SmartDesktopClient.updateMenu(menuId, menuConfig),\n\t\t\t\t\tdeleteMenu: (menuId: string) => SmartDesktopClient.deleteMenu(menuId),\n\t\t\t\t} as ToolbarProps,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: \"authentication\",\n\t\t\t\ticon: \"key\",\n\t\t\t\tname: \"Authentication\",\n\t\t\t\tcomponent: Authentication,\n\t\t\t\tprops: (<AuthenticationProps>{\n\t\t\t\t\tgetAuthenticationProviders: () =>\n\t\t\t\t\t\tnew Promise<AuthenticationProvider[]>((resolve) => {\n\t\t\t\t\t\t\tSmartDesktopClient.getAuthenticationProviders().then((providers: AuthenticationProvider[]) => {\n\t\t\t\t\t\t\t\tresolve(providers);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}),\n\t\t\t\t\tsetAuthenticationProviders: (authenticationProviders: any) =>\n\t\t\t\t\t\tSmartDesktopClient.setAuthenticationProviders(authenticationProviders),\n\t\t\t\t\ttestAuthenticationProvider: (provider: AuthenticationProvider) =>\n\t\t\t\t\t\tnew Promise((resolve, reject) => {\n\t\t\t\t\t\t\tconst scopeMaybe = provider.scope ? `&scope=${provider.scope}` : \"\";\n\t\t\t\t\t\t\tconst nonceMaybe = provider.nonce ? `&nonce=${Math.random()}` : \"\";\n\t\t\t\t\t\t\tconst url = `${provider.authorization_endpoint}?client_id=${\n\t\t\t\t\t\t\t\tprovider.client_id\n\t\t\t\t\t\t\t}&response_type=token&redirect_uri=${\n\t\t\t\t\t\t\t\tprovider.redirect_uri\n\t\t\t\t\t\t\t}&state=${createCSRF()}${scopeMaybe}${nonceMaybe}`;\n\n\t\t\t\t\t\t\tFSBL.Clients.LauncherClient.spawn(\n\t\t\t\t\t\t\t\t\"authentication\",\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t\t\ttop: \"center\",\n\t\t\t\t\t\t\t\t\tleft: \"center\",\n\t\t\t\t\t\t\t\t\tcanGroup: false,\n\t\t\t\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\t\t\t\tcustomData: {\n\t\t\t\t\t\t\t\t\t\t\tforeign: {\n\t\t\t\t\t\t\t\t\t\t\t\tservices: {\n\t\t\t\t\t\t\t\t\t\t\t\t\twindowService: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowTabbing: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowSnapping: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowGrouping: false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\tauthroizationUrl: url,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t(err: any) => {\n\t\t\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tFSBL.Clients.RouterClient.addListener(\"SDD-Auth-Test-Response\", (error: any, response: any) => {\n\t\t\t\t\t\t\t\tif (error || !response.data) {\n\t\t\t\t\t\t\t\t\treject(error || \"Empty error response from OAuth\");\n\t\t\t\t\t\t\t\t} else if (response.data.err) {\n\t\t\t\t\t\t\t\t\treject(response.data.err);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresolve(null);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}),\n\t\t\t\t}) as AuthenticationProps,\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tshowLabel: true,\n\t\tlabel: \"Deploy\",\n\t\tviews: [\n\t\t\t{\n\t\t\t\tid: \"export\",\n\t\t\t\ticon: \"upload\",\n\t\t\t\tname: \"Finish\",\n\t\t\t\tcomponent: Export,\n\t\t\t\tprops: (<ExportProps>{\n\t\t\t\t\tprogressCheckInterval: 500,\n\t\t\t\t\tgetSDServerInfo,\n\t\t\t\t\tgetProjectConfig: () => SmartDesktopClient.projectConfig(),\n\t\t\t\t\tcreateProjectZip: (projectName: string, targetPath: string | undefined = undefined) =>\n\t\t\t\t\t\tSmartDesktopClient.createProjectZip(projectName || \"default\", targetPath),\n\t\t\t\t\tpublishToCosaicCloud: (uuid) => SmartDesktopClient.publishToCosaicCloud(uuid),\n\t\t\t\t\tgetPublishProgress: () => SmartDesktopClient.getPublishProgress(),\n\t\t\t\t\tcopyProjectFiles: (projectName: string, targetPath: string | undefined = undefined) =>\n\t\t\t\t\t\tSmartDesktopClient.copyProjectFiles(projectName || \"default\", targetPath),\n\t\t\t\t\tupdateProjectSettings: (obj: any) => SmartDesktopClient.updateProjectSettings(obj),\n\t\t\t\t}) as ExportProps,\n\t\t\t},\n\t\t],\n\t},\n] as ViewSectionInfo[];\n"]}
@@ -16,3 +16,6 @@
16
16
  .finsemble-icon-toolbar {
17
17
  color: #902e57;
18
18
  }
19
+ .finsemble-icon-code-block {
20
+ color: #5b606f;
21
+ }
@@ -1,5 +1,5 @@
1
1
  import { ApplicationsProps } from "../Applications";
2
- import { services } from "@finsemble/finsemble-core";
2
+ import { services } from "@finsemble/finsemble-api";
3
3
  import { ToolbarProps } from "../Toolbar";
4
4
  declare type AppDefinition = services.Interop.types.AppDefinition;
5
5
  export declare const default_apps: AppDefinition[];
@@ -36,7 +36,7 @@ export const default_apps = [
36
36
  },
37
37
  },
38
38
  component: {
39
- preload: ["https://salesdemo-dev.finsemble.com/components/chartiq/chartiq.js"],
39
+ preload: ["https://salesdemo-dev.finsemble.com/components/chartiq/chartiq.js", "zoom"],
40
40
  },
41
41
  },
42
42
  manifestType: "finsemble",
@@ -271,6 +271,13 @@ export const getApplicationsArgs = (init) => {
271
271
  resolve({ err: null });
272
272
  });
273
273
  },
274
+ updateApp: (appId, appConfig) => {
275
+ apps = apps.filter((app) => app.appId !== appId);
276
+ apps = [...apps, appConfig];
277
+ return new Promise((resolve) => {
278
+ resolve({ err: null });
279
+ });
280
+ },
274
281
  deleteApp: (appId) => {
275
282
  apps = apps.filter((app) => app.appId !== appId);
276
283
  return new Promise((resolve) => {
@@ -295,6 +302,21 @@ export const getApplicationsArgs = (init) => {
295
302
  menus = Object.assign(Object.assign({}, menus), { [menuId]: menuConfig });
296
303
  resolve({ err: null });
297
304
  }),
305
+ getPreloads: () => new Promise((resolve) => {
306
+ resolve({
307
+ err: null,
308
+ preloads: [
309
+ {
310
+ alias: "zoom",
311
+ url: "http://localhost:3375/build/preloads/zoom.js",
312
+ },
313
+ {
314
+ alias: "native-overrides",
315
+ url: "http://localhost:3375/build/preloads/nativeoverrides.js",
316
+ },
317
+ ],
318
+ });
319
+ }),
298
320
  isInboundInteropAuthorized: (sourceApp, targetApp) => new Promise((resolve) => {
299
321
  var _a, _b, _c;
300
322
  resolve(((_c = (_b = (_a = targetApp.manifest) === null || _a === void 0 ? void 0 : _a.interop) === null || _b === void 0 ? void 0 : _b.selectConnect) === null || _c === void 0 ? void 0 : _c.some((rule) => { var _a; return (_a = rule.authorize) === null || _a === void 0 ? void 0 : _a.some((app) => app.name === sourceApp.name); })) || false);