@finsemble/finsemble-ui 6.6.1 → 7.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/package.json +18 -32
  2. package/react/assets/css/button.css +1 -1
  3. package/react/assets/css/favorites.css +0 -47
  4. package/react/assets/css/finsemble.css +3 -0
  5. package/react/assets/css/linkerWindow.css +13 -1
  6. package/react/assets/css/menus.css +2 -2
  7. package/react/assets/css/notificationsCenter.css +32 -1
  8. package/react/assets/css/shared/common.css +40 -0
  9. package/react/assets/css/userPreferences.css +17 -12
  10. package/react/assets/css/windowTitleBar.css +7 -0
  11. package/react/assets/icons/server.svg +26 -0
  12. package/react/components/common/ButtonIcon.js +1 -1
  13. package/react/components/common/ButtonIcon.js.map +1 -1
  14. package/react/components/common/ButtonRow.js +2 -2
  15. package/react/components/common/ButtonRow.js.map +1 -1
  16. package/react/components/common/Checkbox.js +1 -1
  17. package/react/components/common/Checkbox.js.map +1 -1
  18. package/react/components/common/ColorPicker.js +16 -15
  19. package/react/components/common/ColorPicker.js.map +1 -1
  20. package/react/components/common/ErrorBoundary.d.ts +16 -0
  21. package/react/components/common/ErrorBoundary.js +22 -0
  22. package/react/components/common/ErrorBoundary.js.map +1 -0
  23. package/react/components/common/FinsembleIcon.d.ts +3 -2
  24. package/react/components/common/FinsembleIcon.js +10 -3
  25. package/react/components/common/FinsembleIcon.js.map +1 -1
  26. package/react/components/common/FinsembleLink.d.ts +6 -0
  27. package/react/components/common/FinsembleLink.js +12 -0
  28. package/react/components/common/FinsembleLink.js.map +1 -0
  29. package/react/components/common/FinsembleToggle.d.ts +1 -2
  30. package/react/components/common/FinsembleToggle.js +2 -6
  31. package/react/components/common/FinsembleToggle.js.map +1 -1
  32. package/react/components/common/FinsembleToggleButtonBar.d.ts +13 -0
  33. package/react/components/common/FinsembleToggleButtonBar.js +44 -0
  34. package/react/components/common/FinsembleToggleButtonBar.js.map +1 -0
  35. package/react/components/common/InputTable.d.ts +3 -3
  36. package/react/components/common/InputTable.js +13 -13
  37. package/react/components/common/InputTable.js.map +1 -1
  38. package/react/components/common/Tab.js +33 -5
  39. package/react/components/common/Tab.js.map +1 -1
  40. package/react/components/common/css/FinsembleToggle.css +22 -0
  41. package/react/components/common/css/application-edit-page.css +10 -2
  42. package/react/components/common/css/tab.css +8 -8
  43. package/react/components/common/css/time-select.css +1 -1
  44. package/react/components/common/css/toggle.css +2 -10
  45. package/react/components/common/helpers.js +6 -1
  46. package/react/components/common/helpers.js.map +1 -1
  47. package/react/components/common/stories/ColorPicker.stories.js +6 -11
  48. package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
  49. package/react/components/common/stories/FinsembleToggle.stories.d.ts +1 -2
  50. package/react/components/common/stories/FinsembleToggle.stories.js +0 -7
  51. package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
  52. package/react/components/common/stories/FinsembleToggleButtonBar.stories.d.ts +14 -0
  53. package/react/components/common/stories/FinsembleToggleButtonBar.stories.js +97 -0
  54. package/react/components/common/stories/FinsembleToggleButtonBar.stories.js.map +1 -0
  55. package/react/components/common/stories/InputTable.stories.d.ts +4 -3
  56. package/react/components/common/stories/InputTable.stories.js +18 -8
  57. package/react/components/common/stories/InputTable.stories.js.map +1 -1
  58. package/react/components/common/tests/ButtonRow.spec.js +5 -0
  59. package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
  60. package/react/components/common/tests/FinsembleToggle.spec.js +1 -6
  61. package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
  62. package/react/components/common/tests/FinsembleToggleButtonBar.spec.d.ts +1 -0
  63. package/react/components/common/tests/FinsembleToggleButtonBar.spec.js +40 -0
  64. package/react/components/common/tests/FinsembleToggleButtonBar.spec.js.map +1 -0
  65. package/react/components/common/tests/InputTable.spec.js +3 -3
  66. package/react/components/common/tests/InputTable.spec.js.map +1 -1
  67. package/react/components/favorites/FavoriteMaker.js +1 -1
  68. package/react/components/favorites/FavoriteMaker.js.map +1 -1
  69. package/react/components/fdc3Resolver/ResolverContainer.js +4 -7
  70. package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
  71. package/react/components/icon/Icon.d.ts +1 -1
  72. package/react/components/icon/Icon.js +8 -1
  73. package/react/components/icon/Icon.js.map +1 -1
  74. package/react/components/legacyControls/FinsembleDnDContext.js +7 -7
  75. package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
  76. package/react/components/linker/remoteRedux.js +1 -0
  77. package/react/components/linker/remoteRedux.js.map +1 -1
  78. package/react/components/menu/MenuItem.js +1 -1
  79. package/react/components/menu/MenuItem.js.map +1 -1
  80. package/react/components/menu/MenuPortal.js +12 -21
  81. package/react/components/menu/MenuPortal.js.map +1 -1
  82. package/react/components/menu/MenuToggle.js +1 -1
  83. package/react/components/menu/MenuToggle.js.map +1 -1
  84. package/react/components/menu/keyboardNavigation.d.ts +1 -22
  85. package/react/components/menu/keyboardNavigation.js +110 -160
  86. package/react/components/menu/keyboardNavigation.js.map +1 -1
  87. package/react/components/notifications/components/drawer/DrawerControls.js +39 -25
  88. package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
  89. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +19 -6
  90. package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
  91. package/react/components/notifications/components/shared/CheckButton.js +19 -8
  92. package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
  93. package/react/components/notifications/components/shared/NotificationCardShell.js +2 -1
  94. package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
  95. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js +2 -1
  96. package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
  97. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js +2 -1
  98. package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
  99. package/react/components/notifications/components/views/CardView.js +5 -3
  100. package/react/components/notifications/components/views/CardView.js.map +1 -1
  101. package/react/components/notifications/components/views/ListView.js +3 -1
  102. package/react/components/notifications/components/views/ListView.js.map +1 -1
  103. package/react/components/notifications/types.d.ts +3 -0
  104. package/react/components/notifications/types.js.map +1 -1
  105. package/react/components/processMonitor/ProcessMonitor.js +4 -1
  106. package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
  107. package/react/components/processMonitor/components/ProcessStatistics.js +1 -3
  108. package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
  109. package/react/components/processMonitor/helpers.js +4 -3
  110. package/react/components/processMonitor/helpers.js.map +1 -1
  111. package/react/components/processMonitor/helpers.spec.js +7 -3
  112. package/react/components/processMonitor/helpers.spec.js.map +1 -1
  113. package/react/components/sdd/AddApp.d.ts +4 -3
  114. package/react/components/sdd/AddApp.js +132 -30
  115. package/react/components/sdd/AddApp.js.map +1 -1
  116. package/react/components/sdd/AppEditAccess.d.ts +4 -3
  117. package/react/components/sdd/AppEditAccess.js.map +1 -1
  118. package/react/components/sdd/AppEditPage.d.ts +4 -3
  119. package/react/components/sdd/AppEditPage.js +141 -116
  120. package/react/components/sdd/AppEditPage.js.map +1 -1
  121. package/react/components/sdd/Appearance.d.ts +2 -1
  122. package/react/components/sdd/Appearance.js +15 -7
  123. package/react/components/sdd/Appearance.js.map +1 -1
  124. package/react/components/sdd/Application.d.ts +5 -4
  125. package/react/components/sdd/Application.js +61 -42
  126. package/react/components/sdd/Application.js.map +1 -1
  127. package/react/components/sdd/Applications.d.ts +12 -11
  128. package/react/components/sdd/Applications.js +23 -4
  129. package/react/components/sdd/Applications.js.map +1 -1
  130. package/react/components/sdd/Authentication.js +1 -6
  131. package/react/components/sdd/Authentication.js.map +1 -1
  132. package/react/components/sdd/AuthenticationProviderConfig.js +5 -3
  133. package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -1
  134. package/react/components/sdd/EditPreload.d.ts +4 -3
  135. package/react/components/sdd/EditPreload.js +39 -22
  136. package/react/components/sdd/EditPreload.js.map +1 -1
  137. package/react/components/sdd/Export.d.ts +7 -6
  138. package/react/components/sdd/Export.js +3 -2
  139. package/react/components/sdd/Export.js.map +1 -1
  140. package/react/components/sdd/GettingStarted.js +3 -3
  141. package/react/components/sdd/GettingStarted.js.map +1 -1
  142. package/react/components/sdd/Navigation.js +28 -4
  143. package/react/components/sdd/Navigation.js.map +1 -1
  144. package/react/components/sdd/OptionalSettingsView.d.ts +6 -5
  145. package/react/components/sdd/OptionalSettingsView.js +2 -10
  146. package/react/components/sdd/OptionalSettingsView.js.map +1 -1
  147. package/react/components/sdd/ProjectErrors.js +1 -1
  148. package/react/components/sdd/ProjectErrors.js.map +1 -1
  149. package/react/components/sdd/Publish.js +2 -2
  150. package/react/components/sdd/Publish.js.map +1 -1
  151. package/react/components/sdd/SmartDesktopDesigner.d.ts +17 -16
  152. package/react/components/sdd/SmartDesktopDesigner.js +37 -34
  153. package/react/components/sdd/SmartDesktopDesigner.js.map +1 -1
  154. package/react/components/sdd/ThemePage.js +8 -5
  155. package/react/components/sdd/ThemePage.js.map +1 -1
  156. package/react/components/sdd/Themes.d.ts +2 -1
  157. package/react/components/sdd/Themes.js +2 -2
  158. package/react/components/sdd/Themes.js.map +1 -1
  159. package/react/components/sdd/Toolbar.d.ts +5 -4
  160. package/react/components/sdd/Toolbar.js +11 -9
  161. package/react/components/sdd/Toolbar.js.map +1 -1
  162. package/react/components/sdd/common/setPreloadDefaults.d.ts +1 -1
  163. package/react/components/sdd/common/setPreloadDefaults.js +5 -4
  164. package/react/components/sdd/common/setPreloadDefaults.js.map +1 -1
  165. package/react/components/sdd/common/views.js +7 -4
  166. package/react/components/sdd/common/views.js.map +1 -1
  167. package/react/components/sdd/css/addApp.css +52 -0
  168. package/react/components/sdd/css/applications.css +4 -24
  169. package/react/components/sdd/css/nav.css +3 -3
  170. package/react/components/sdd/fixtures/authenticationProps.js +15 -1
  171. package/react/components/sdd/fixtures/authenticationProps.js.map +1 -1
  172. package/react/components/sdd/fixtures/preloads.js +14 -12
  173. package/react/components/sdd/fixtures/preloads.js.map +1 -1
  174. package/react/components/sdd/smartDesktopClient.d.ts +163 -0
  175. package/react/components/sdd/smartDesktopClient.js +573 -0
  176. package/react/components/sdd/smartDesktopClient.js.map +1 -0
  177. package/react/components/sdd/smartDesktopClient.spec.d.ts +1 -0
  178. package/react/components/sdd/smartDesktopClient.spec.js +61 -0
  179. package/react/components/sdd/smartDesktopClient.spec.js.map +1 -0
  180. package/react/components/sdd/stories/AddApp.stories.d.ts +10 -0
  181. package/react/components/sdd/stories/AddApp.stories.js +18 -0
  182. package/react/components/sdd/stories/AddApp.stories.js.map +1 -0
  183. package/react/components/sdd/stories/AppEditPage.stories.d.ts +2 -0
  184. package/react/components/sdd/stories/AppEditPage.stories.js +2 -0
  185. package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -1
  186. package/react/components/sdd/stories/Appearance.stories.d.ts +1 -1
  187. package/react/components/sdd/stories/Appearance.stories.js +1 -0
  188. package/react/components/sdd/stories/Appearance.stories.js.map +1 -1
  189. package/react/components/sdd/stories/Authentication.stories.js +2 -16
  190. package/react/components/sdd/stories/Authentication.stories.js.map +1 -1
  191. package/react/components/sdd/stories/OptionalSettingsView.stories.js +1 -1
  192. package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -1
  193. package/react/components/sdd/stories/SmartDesktopDesigner.stories.d.ts +1 -1
  194. package/react/components/sdd/stories/SmartDesktopDesigner.stories.js +3 -0
  195. package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -1
  196. package/react/components/sdd/stories/Themes.stories.d.ts +1 -1
  197. package/react/components/sdd/stories/Themes.stories.js +1 -0
  198. package/react/components/sdd/stories/Themes.stories.js.map +1 -1
  199. package/react/components/sdd/tests/AddApp.spec.d.ts +1 -0
  200. package/react/components/sdd/tests/AddApp.spec.js +96 -0
  201. package/react/components/sdd/tests/AddApp.spec.js.map +1 -0
  202. package/react/components/sdd/tests/AppEditPage.spec.js +92 -23
  203. package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -1
  204. package/react/components/sdd/tests/Application.spec.js +411 -24
  205. package/react/components/sdd/tests/Application.spec.js.map +1 -1
  206. package/react/components/sdd/tests/Applications.spec.js +1 -45
  207. package/react/components/sdd/tests/Applications.spec.js.map +1 -1
  208. package/react/components/sdd/tests/Authentication.spec.js +1 -1
  209. package/react/components/sdd/tests/Authentication.spec.js.map +1 -1
  210. package/react/components/sdd/tests/EditPreload.spec.js +50 -7
  211. package/react/components/sdd/tests/EditPreload.spec.js.map +1 -1
  212. package/react/components/sdd/tests/Navigation.spec.js +2 -2
  213. package/react/components/sdd/tests/Navigation.spec.js.map +1 -1
  214. package/react/components/sdd/tests/OptionalSettingsView.spec.js +235 -0
  215. package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -1
  216. package/react/components/sdd/tests/ProjectErrors.spec.js +1 -1
  217. package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -1
  218. package/react/components/sdd/tests/SmartDesktopDesigner.spec.js +2 -2
  219. package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -1
  220. package/react/components/search/Search.js +1 -1
  221. package/react/components/search/Search.js.map +1 -1
  222. package/react/components/shared/DefaultDropdownButton.js +12 -1
  223. package/react/components/shared/DefaultDropdownButton.js.map +1 -1
  224. package/react/components/shared/tests/DefaultDropdownButton.spec.js +12 -0
  225. package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
  226. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +1 -16
  227. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +0 -4
  228. package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
  229. package/react/components/toolbar/DragHandle.stories.js.map +1 -1
  230. package/react/components/toolbar/ToolbarIcon.js +2 -2
  231. package/react/components/toolbar/ToolbarIcon.js.map +1 -1
  232. package/react/components/toolbar/ToolbarSection.d.ts +1 -9
  233. package/react/components/toolbar/ToolbarSection.js +3 -7
  234. package/react/components/toolbar/ToolbarSection.js.map +1 -1
  235. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +1 -1
  236. package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
  237. package/react/components/toolbar/dashbar/Dashbar.js +21 -12
  238. package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
  239. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js +1 -1
  240. package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
  241. package/react/components/userPreferences/components/ContentSection.js +1 -1
  242. package/react/components/userPreferences/components/ContentSection.js.map +1 -1
  243. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +4 -3
  244. package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
  245. package/react/components/userPreferences/components/general/ScheduledClose.js +12 -3
  246. package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -1
  247. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +1 -1
  248. package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
  249. package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +17 -2
  250. package/react/components/windowTitleBar/WindowTitleBarShell.js +160 -6
  251. package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
  252. package/react/components/windowTitleBar/components/left/LinkerButton.js +7 -1
  253. package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
  254. package/react/components/windowTitleBar/components/windowTitle.js +10 -2
  255. package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
  256. package/react/components/windowTitleBar/stores/windowTitleBarStore.js +11 -1
  257. package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
  258. package/react/reducers/rootReducer.d.ts +2 -2
  259. package/react/store.d.ts +4 -4
  260. package/react/tsconfig.tsbuildinfo +1 -0
  261. package/react/types/smartDesktopDesignerTypes.d.ts +3 -0
  262. package/react/types/smartDesktopDesignerTypes.js.map +1 -1
@@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AC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YAC5C,OAAO,EAAE,CAAC;SACV;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAKD,KAAK,CAAC,0BAA0B,CAAC,uBAA4B;QAC5D,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QACrD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,+CAA+C,EAAE,eAAe,CAAC,CAAC;QAEpF,MAAM,WAAW,GAAG,GAAG,eAAe,iBAAiB,CAAC;QAExD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,WAAW,EAAE;YACzC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACR,MAAM,EAAE,kBAAkB;gBAC1B,cAAc,EAAE,kBAAkB;aAClC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAC;SACjD,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;CACD,CAAC","sourcesContent":["import {\n\tAppDefinition,\n\tSelectConnectAppList,\n\tFEA,\n\tLogger,\n\tRouterClient,\n\tConfigClient,\n\tSystem,\n\tFEAGlobals,\n\tREST,\n\tDesktop,\n\tStandardErrorCallback,\n} from \"@finsemble/finsemble-api\";\n\ntype InstallerDescription = {\n\tname: string;\n\tversion?: string;\n\tauthors?: string;\n\tdescription?: string;\n};\n\nexport type CSS = { [key: string]: string };\n\nconst MAKER_TOPIC = \"SmartDesktopClient\";\nconst UI_CHANGE_TOPIC = \"Finsemble-ui-change\";\n\ntype AssetType = \"JS\" | \"CSS\" | \"JSON\" | \"Text\" | \"Image\" | \"GIF\" | \"Icon\";\n\nconst assetTests: Record<AssetType, { acceptedTypes: string[]; regex: RegExp }> = {\n\tImage: { acceptedTypes: [\"PNG\", \"JPEG\", \"JPG\"], regex: /\\.(jpe?g|png)$/i },\n\tGIF: { acceptedTypes: [\"GIF\"], regex: /\\.(gif)$/i },\n\tIcon: { acceptedTypes: [\"ICO\"], regex: /\\.(ico)$/i },\n\tJS: { acceptedTypes: [\"JS\"], regex: /\\.(js)$/i },\n\tJSON: { acceptedTypes: [\"JSON\"], regex: /\\.(json)$/i },\n\tCSS: { acceptedTypes: [\"CSS\"], regex: /\\.(css)$/i },\n\tText: { acceptedTypes: [\"TXT\"], regex: /\\.(txt)$/i },\n};\n\ntype Asset = {\n\ttype: AssetType[];\n\tfile: File;\n\ttargetPath: string;\n};\n\ntype AssetMeta = {\n\tkey: string;\n\tname: string;\n\ttype: string;\n\tsize: number;\n\ttargetPath: string | undefined;\n};\n\ntype MenuObjType = {\n\tdisplayName: string;\n\tapplications: string[];\n\tposition: number;\n};\ntype MenuType = {\n\t[key: string]: MenuObjType;\n};\n\ntype ProjectSettings = {\n\tname: string;\n\tpath?: string;\n\tversion?: string;\n\tauthors?: string;\n\tdescription?: string;\n};\n\ntype preloadUsageType = \"launchable\" | \"all\" | \"none\";\ntype PreloadDetail = {\n\turl: string;\n\tautoload: preloadUsageType;\n};\ntype PreloadMap = {\n\t[alias: string]: PreloadDetail;\n};\n\n/**\n * Determines if a SelectConnect `authorize` rule exists on a foreign app\n * for this app.\n *\n * @param sourceApp FDC3 AppD definition for the app we're working on\n * @param targetApp FDC3 AppD definition for the app we want to connect to\n * @param contextType Optional context type to defined the rule\n * @returns true if there is a matching rule\n */\nconst isInteropAuthorized = (sourceApp: AppDefinition, targetApp: AppDefinition, contextType?: string): boolean => {\n\tconst rules = targetApp.manifest?.interop?.selectConnect || [];\n\n\t// Find all authorized apps for any rules that match this context type\n\tconst allowedApps: SelectConnectAppList[] = rules.flatMap((rule) => {\n\t\tif (!contextType || (rule.contextType && rule.contextType !== contextType)) return [];\n\t\treturn rule.authorize ?? [];\n\t});\n\n\treturn allowedApps.some((rule) => rule.name === sourceApp.name);\n};\n\n/**\n * Arranges an array of words for display to end user\n * \"apples\"\n * \"apples or oranges\"\n * \"apples, oranges, or bananas\"\n */\nconst prettyList = (words: string[]): string => {\n\tconst { length } = words;\n\tif (length === 0) return \"\";\n\tif (length === 1) return words[0];\n\tif (length === 2) return `${words[0]} or ${words[1]}`;\n\treturn `${words.slice(0, length - 2).join(\", \")} or ${words[length - 1]}`;\n};\n\n/**\n *\n * Test Driver Example (can paste into component console)\n *\n window.smartDesktopClientDriver = async function makerClientDriver() {\n\t{\n\t\tlet { err, apps } = await SmartDesktopClient.getApps();\n\t\tLogger.log(\"getApps\", err ? err : \"ok\" , apps);\n\t}\n\t{\n\t\tlet { err, config } = await SmartDesktopClient.getAppConfig(\"Rates\");\n\t\tLogger.log(\"getAppConfig\", err ? err : \"ok\" , config);\n\t}\n\t{\n\t\tlet { config } = await SmartDesktopClient.getAppConfigTemplate();\n\t\tlet { err } = await SmartDesktopClient.addApp(\"testApp1\", config);\n\t\tLogger.log(\"addApp\", err ? err : \"ok\" );\n\t}\n\t{\n\t\tlet { err } = await SmartDesktopClient.deleteApp(\"testApp1\");\n\t\tLogger.log(\"deleteApp\", err ? err : \"ok\" );\n\t}\n\t{\n\t\tLogger.log(\"updateTheme\", err ? err : \"ok\" );\n\t\tlet { err } = await SmartDesktopClient.updateInstallerDescription({ name: \"sample installer name\", version: \"V0.0.0\", authors: \"M. Smith\", description: \"sample installer descriptions\" });\n\t\tLogger.log(\"updateInstallerDescription\", err ? err : \"ok\" );\n\t}\n\t{\n\t\tlet blob = await fetch(\"http://localhost:3375/assets/img/test.png\").then(r => r.blob());\n\t\tvar file = new File([blob], \"foo.png\");\n\t\tlet { err } = await SmartDesktopClient.updateToolbarIcon(file);\n\t\tconsole.log(\"updateToolbarIcon\", err ? err : \"ok\" );\n\t}\n\t{\n\t\tlet blob = await fetch(\"http://localhost:3375/assets/img/test.png\").then(r => r.blob());\n\t\tvar file = new File([blob], \"foo.png\");\n\t\tlet { err } = await SmartDesktopClient.updateTaskbarIcon(file);\n\t\tconsole.log(\"updateTaskbarIcon\", err ? err : \"ok\" );\n\t}\n\t{\n\t\tlet blob = await fetch(\"http://localhost:3375/assets/img/test.png\").then(r => r.blob());\n\t\tvar file = new File([blob], \"foo.png\");\n\t\tlet { err } = await SmartDesktopClient.updateSystemTrayIcon(file);\n\t\tconsole.log(\"updateSystemTrayIcon\", err ? err : \"ok\" );\n\t}\n\t{\n\t\tlet blob = await fetch(\"http://localhost:3375/assets/img/test.ico\").then(r => r.blob());\n\t\tvar file = new File([blob], \"foo.ico\");\n\t\tlet { err } = await SmartDesktopClient.updateInstallerIcon(file);\n\t\tconsole.log(\"updateInstallerIcon\", err ? err : \"ok\" );\n\t}\n\t{\n\t\tlet blob = await fetch(\"http://localhost:3375/assets/img/install-spinner.gif\").then(r => r.blob());\n\t\tvar file = new File([blob], \"foo.gif\");\n\t\tlet { err } = await SmartDesktopClient.updateInstallerGraphic(file);\n\t\tconsole.log(\"updateInstallerGraphic\", err ? err : \"ok\" );\n\t}\n\t{\n\t\tlet blob = await fetch(\"http://localhost:3375/assets/img/test.svg\").then(r => r.blob());\n\t\tvar file = new File([blob], \"foo.svg\");\n\t\tlet { err } = await SmartDesktopClient.updateSplashScreen(file);\n\t\tconsole.log(\"updateSplashScreen\", err ? err : \"ok\" );\n\t}\n\t{\n\t\tlet { err } = await SmartDesktopClient.updateTheme({ cssSampleData: 1 });\n\t\tconsole.log(\"updateTheme\", err ? err : \"ok\" );\n\t}\n\t{\n\t \tlet { err } = await SmartDesktopClient.createProjectZip(\"testApp\", \"~/Downloads/\");\n\t\tLogger.log(\"createProjectZip\", err ? err : \"ok\" );\n\t}\n\t{\n\t\t<input type=\"file\" onChange={(e) => {\n\t\t\tconst file = e.target.files?.[0];\n\n\t\t\tlet { err } = await SmartDesktopClient.uploadAssets([\n\t\t\t\t{\n\t\t\t\t\tfile,\n\t\t\t\t\ttype: AssetType.Image,\n\t\t\t\t\ttargetPath: 'image.png',\n\t\t\t\t}\n\t\t\t], (progress) => {\n\t\t\t\t// ...\n\t\t\t});\n\n\t\t\tLogger.log(\"uploadAssets\", err ? err : \"ok\" );\n\t\t}} />\n\t}\n}\n */\nexport const SmartDesktopClient = {\n\tgetSDServerInfo: async (): Promise<FEA.SDServerInfo> => await System.getSDServerInfo(),\n\n\t/**\n\t * Confirm the Smart Desktop Server is enabled. This should be true before constructing and using a client.\n\t *\n\t * @static\n\t * @returns {Promise<Boolean>}\n\t */\n\tasync isEnabled(): Promise<Boolean> {\n\t\tconst { enabled } = await System.getSDServerInfo();\n\t\treturn enabled;\n\t},\n\n\t/**\n\t * Get the smart desktop server base URL.\n\t *\n\t * @static\n\t * @returns {Promise<Boolean>}\n\t */\n\tasync applicationRoot(): Promise<string | null> {\n\t\tconst { applicationRoot } = await System.getSDServerInfo();\n\t\treturn applicationRoot ? applicationRoot : null;\n\t},\n\n\t/**\n\t *\n\t */\n\tasync projectConfig(): Promise<FEA.ProjectConfig | null> {\n\t\tconst { projectConfig } = await System.getSDServerInfo();\n\t\treturn projectConfig ? projectConfig : null;\n\t},\n\n\t/**\n\t * Get list of all AppD applications\n\t *\n\t * @returns {Promise<{ err:any, data:any}>}\n\t *\n\t * @example\n\t * let { err, apps } = await SmartDesktopClient.getApps();\n\t */\n\tasync getApps(): Promise<{ err: any; apps: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.getApps\");\n\t\tconst { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getApps`, {});\n\t\tLogger.system.log(\"SmartDesktopClient.getApps result\", err ? err : \"successful\", response);\n\t\treturn { err, apps: response?.data.applications ?? [] };\n\t},\n\n\t/**\n\t * Get list of all Menus\n\t *\n\t * @returns {Promise<{ err:any, data:any}>}\n\t *\n\t * @example\n\t * let { err, menus } = await SmartDesktopClient.getMenus();\n\t */\n\tasync getMenus(): Promise<{ err: any; menus: MenuType }> {\n\t\tLogger.system.log(\"ConfigClient getValue 'finsemble.toolbarMenus'\");\n\t\tconst { err, data } = await ConfigClient.getValue({ field: \"finsemble.toolbarMenus\" });\n\t\tLogger.system.log(\"finsemble.toolbarMenus result\", err ? err : \"successful\", data);\n\t\treturn { err, menus: data };\n\t},\n\n\t/**\n\t * Get the config.extensions.preloads object (from appd.json), which includes all registered\n\t * preloads and their details\n\t */\n\tasync getPreloads(): Promise<{ err: any; data: PreloadMap }> {\n\t\tLogger.system.log(\"SmartDesktopClient.getPreloads\");\n\t\tconst { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getPreloads`, {});\n\t\tLogger.system.log(\"SmartDesktopClient.getPreloads result\", err ? err : \"successful\", response);\n\t\treturn { err, data: response?.data.preloads ?? {} };\n\t},\n\n\t/**\n\t * Get config for the specified AppD app.\n\t *\n\t * @example\n\t * let { err, config } = await SmartDesktopClient.getAppConfig(\"testApp\");\n\t */\n\tasync getAppConfig(appId: string): Promise<{ err: any; config: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.getAppConfig\", appId);\n\t\tconst { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getAppConfig`, { appId });\n\t\tLogger.system.log(\"SmartDesktopClient.getAppConfig result\", err ? err : \"successful\", response);\n\t\treturn { err, config: response?.data ?? {} };\n\t},\n\n\t/**\n\t * Helper function returning a AppD config template with Finsemble component in manifest property.\n\t *\n\t * @returns {Promise<{ config: any }>}\n\t *\n\t * @example\n\t * let { config } = await SmartDesktopClient.getAppConfigTemplate();\n\t */\n\tasync getAppConfigTemplate(): Promise<{ config: AppDefinition }> {\n\t\tLogger.system.log(\"SmartDesktopClient.getAppConfigTemplate\");\n\t\tconst manifestJson = {\n\t\t\twindow: {\n\t\t\t\t// url: \"$applicationRoot/components/welcome/welcome.html\",\n\t\t\t\turl: \"\",\n\t\t\t\twidth: 1280,\n\t\t\t\theight: 600,\n\t\t\t},\n\t\t\tforeign: {\n\t\t\t\tcomponents: {\n\t\t\t\t\t\"App Launcher\": {\n\t\t\t\t\t\tlaunchableByUser: true,\n\t\t\t\t\t},\n\t\t\t\t\t\"Window Manager\": {\n\t\t\t\t\t\tpersistWindowState: true,\n\t\t\t\t\t\tFSBLHeader: true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\tconst appdConfigTemplate = {\n\t\t\tappId: \"123\",\n\t\t\tname: \"\",\n\t\t\tmanifest: manifestJson,\n\t\t\tmanifestType: \"finsemble\",\n\t\t\tversion: \"1\",\n\t\t};\n\t\tLogger.system.log(\"SmartDesktopClient.getAppConfigTemplate result\", appdConfigTemplate);\n\t\treturn { config: appdConfigTemplate };\n\t},\n\n\t/**\n\t * Add AppD application, which will modify Finsemble config and invoke REST API to persist the change\n\t *\n\t * @example\n\t * let { err } = await SmartDesktopClient.addApp(\"testApp\", config);\n\t */\n\tasync addApp(appId: string, appConfig: AppDefinition): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.addApp\", appId, appConfig);\n\t\tconst { err } = await RouterClient.query(`${MAKER_TOPIC}.addApp`, { appId, appConfig });\n\t\tLogger.system.log(\"SmartDesktopClient.addApp result\", err ? err : \"successful\");\n\t\treturn { err };\n\t},\n\n\tasync addMenu(menuConfig: MenuObjType): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.addMenu\");\n\t\tconst { err } = await RouterClient.query(`${MAKER_TOPIC}.addMenu`, { menuConfig });\n\t\tawait this.syncMenuConfig();\n\t\tLogger.system.log(\"SmartDesktopClient.addMenu result\", err ? err : \"successful\");\n\t\treturn { err };\n\t},\n\n\tasync syncMenuConfig() {\n\t\tLogger.system.log(\"SmartDesktopClient.syncMenuConfig\");\n\t\tconst { response } = await RouterClient.query(`${MAKER_TOPIC}.getMenus`, {});\n\t\tawait ConfigClient.setValue({\n\t\t\tfield: \"finsemble.toolbarMenus\",\n\t\t\tvalue: response?.data?.menus || {},\n\t\t});\n\t\tLogger.system.log(\"SmartDesktopClient.syncMenuConfig completed\");\n\t},\n\n\tasync updateMenu(menuId: string, menuConfig: MenuObjType): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.updateMenu\", menuId, menuConfig);\n\t\tconst { err } = await RouterClient.query(`${MAKER_TOPIC}.updateMenu`, { menuId, menuConfig });\n\t\tawait this.syncMenuConfig();\n\t\tLogger.system.log(\"SmartDesktopClient.updateMenu result\", err ? err : \"successful\");\n\t\treturn { err };\n\t},\n\n\t/**\n\t * Add AppD application, which will modify Finsemble config and invoke REST API to persist the change\n\t *\n\t * @example\n\t * let { err } = await SmartDesktopClient.updateApp(\"testApp\", config);\n\t */\n\tasync updateApp(appId: string, appConfig: AppDefinition): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.updateApp\", appId, appConfig);\n\t\tconst { err } = await RouterClient.query(`${MAKER_TOPIC}.updateApp`, { appId, appConfig });\n\t\tLogger.system.log(\"SmartDesktopClient.updateApp result\", err ? err : \"successful\");\n\t\treturn { err };\n\t},\n\n\t/**\n\t * Create/updates the preload with the specific preload alias\n\t */\n\tasync savePreload(oldAlias: string | null, newAlias: string, detail: PreloadDetail): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.savePreload\");\n\t\tconst { err } = await RouterClient.query(`${MAKER_TOPIC}.savePreload`, { oldAlias, newAlias, detail });\n\t\tLogger.system.log(\"SmartDesktopClient.savePreload result\", err ? err : \"successful\");\n\t\tconst { response } = await RouterClient.query(`${MAKER_TOPIC}.getPreloads`, {});\n\t\tif (!err && response.data) {\n\t\t\tawait ConfigClient.setValue({\n\t\t\t\tfield: \"finsemble.extensions.preloads\",\n\t\t\t\tvalue: response.data.preloads,\n\t\t\t});\n\t\t}\n\t\treturn { err };\n\t},\n\n\t/**\n\t * Remove AppD application, which will modify Finsemble config and invoke REST API to persist the change\n\t *\n\t * @example\n\t * let { err } = await SmartDesktopClient.deleteApp(\"testApp\");\n\t */\n\tasync deleteApp(appId: string): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.deleteApp\", appId);\n\t\tconst { err } = await RouterClient.query(`${MAKER_TOPIC}.deleteApp`, { appId });\n\t\tLogger.system.log(\"SmartDesktopClient.deleteApp result\", err ? err : \"successful\");\n\t\treturn { err };\n\t},\n\n\tasync deleteMenu(menuId: string): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.deleteMenu\", menuId);\n\t\tconst { err } = await RouterClient.query(`${MAKER_TOPIC}.deleteMenu`, { menuId });\n\t\tawait this.syncMenuConfig();\n\t\tLogger.system.log(\"SmartDesktopClient.deleteMenu result\", err ? err : \"successful\");\n\t\treturn { err };\n\t},\n\n\t/**\n\t * Remove a given preload from the registry in the config\n\t */\n\tasync deletePreload(alias: string): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.deletePreload\");\n\t\tconst { err } = await RouterClient.query(`${MAKER_TOPIC}.deletePreload`, { alias });\n\t\tLogger.system.log(\"SmartDesktopClient.deletePreload result\", err ? err : \"successful\");\n\t\tconst { response } = await RouterClient.query(`${MAKER_TOPIC}.getPreloads`, {});\n\t\tif (!err && response.data) {\n\t\t\tawait ConfigClient.setValue({\n\t\t\t\tfield: \"finsemble.extensions.preloads\",\n\t\t\t\tvalue: response.data.preloads,\n\t\t\t});\n\t\t}\n\t\treturn { err };\n\t},\n\n\t/**\n\t * Update the theme of all components and invoke REST API to persist the change in Finsemble's theme.css file\n\t *\n\t * @example\n\t * let { err } = await SmartDesktopClient.updateTheme(cssData);\n\t */\n\tasync updateTheme(theme: CSS): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient.updateTheme\", theme);\n\t\tconst { err } = await RouterClient.query(`${MAKER_TOPIC}.updateTheme`, { theme });\n\t\tLogger.system.log(\"SmartDesktopClient.updateTheme result\", err ? err : \"successful\");\n\t\treturn { err };\n\t},\n\n\t/**\n\t * Get the theme from the REST API\n\t *\n\t * @returns {Promise<{ err, theme }>}\n\t * @memberOf SmartDesktopClient\n\t *\n\t * @example\n\t * let { err, theme } = await SmartDesktopClient.getTheme(cssData);\n\t */\n\tasync getTheme(): Promise<{ err: any; theme?: Record<string, string> }> {\n\t\tLogger.system.log(\"SmartDesktopClient.getTheme\");\n\t\tconst { err, response } = await RouterClient.query(`${MAKER_TOPIC}.getTheme`, {});\n\t\tLogger.system.log(\"SmartDesktopClient.getTheme result\", err ? err : \"successful\");\n\t\treturn { err, theme: response?.data };\n\t},\n\n\t/**\n\t * Add handler listening for theme updates\n\t *\n\t * @returns When called, unsubscribes the handler\n\t */\n\tonThemeUpdated(themeUpdatedHandler: StandardErrorCallback<any>): Function {\n\t\tRouterClient.addListener(`${UI_CHANGE_TOPIC}.themeUpdate`, themeUpdatedHandler);\n\t\tLogger.system.log(\"SmartDesktopClient.onThemeUpdated\", themeUpdatedHandler);\n\t\treturn () => RouterClient.removeListener(`${UI_CHANGE_TOPIC}.themeUpdate`, themeUpdatedHandler);\n\t},\n\n\t/**\n\t * Post a file to the smart desktop server\n\t *\n\t * @example\n\t * ...\n\t */\n\tasync uploadAssets(assets: Asset[], progress: Function): Promise<{ err: string | null; paths: string[] }> {\n\t\tLogger.system.log(\"SmartDesktopClient.uploadAssets\", assets);\n\n\t\tconst applicationRoot = await this.applicationRoot();\n\n\t\t// Returns a string of accepted file types if the asset does not match a known type\n\t\tconst getAcceptedTypes = (asset: Asset): string[] => {\n\t\t\tlet acceptedTypes: string[] = [];\n\t\t\tlet valid = false;\n\t\t\tObject.entries(assetTests).forEach(([key, value]) => {\n\t\t\t\tif (asset.type.includes(key as AssetType)) {\n\t\t\t\t\tif (value.regex.test(asset.file.name)) valid = true;\n\t\t\t\t\tacceptedTypes = acceptedTypes.concat(value.acceptedTypes);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn valid ? [] : acceptedTypes;\n\t\t};\n\n\t\treturn new Promise((resolve) => {\n\t\t\tconst endpointURL = `${applicationRoot}/project/assets`;\n\n\t\t\tconst data = new FormData();\n\n\t\t\tconst assetMeta: AssetMeta[] = [];\n\n\t\t\tfor (let index = 0; index < assets.length; index++) {\n\t\t\t\tconst asset = assets[index];\n\n\t\t\t\tconst meta = {\n\t\t\t\t\tkey: `file-${index}`,\n\t\t\t\t\tname: asset.file.name,\n\t\t\t\t\ttype: asset.file.type,\n\t\t\t\t\tsize: asset.file.size,\n\t\t\t\t\ttargetPath: asset.targetPath,\n\t\t\t\t};\n\n\t\t\t\tconst acceptedTypes: string[] = getAcceptedTypes(asset);\n\n\t\t\t\tif (acceptedTypes.length) {\n\t\t\t\t\tconst error = `File must be of type ${prettyList(acceptedTypes)}`;\n\t\t\t\t\tLogger.system.log(\"SmartDesktopClient.uploadAssets wrong image type\", error);\n\t\t\t\t\treturn resolve({ err: error, paths: [] });\n\t\t\t\t} else {\n\t\t\t\t\tLogger.system.log(\"SmartDesktopClient.uploadAssets append\", meta.key, asset.file);\n\t\t\t\t\tdata.append(meta.key, asset.file);\n\t\t\t\t\tassetMeta.push(meta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdata.append(\"assets\", JSON.stringify(assetMeta));\n\n\t\t\tvar xhr = new XMLHttpRequest();\n\n\t\t\tLogger.system.log(\"SmartDesktopClient.uploadAssets put\", data, endpointURL);\n\t\t\txhr.open(\"PUT\", endpointURL, true);\n\n\t\t\txhr.addEventListener(\"progress\", (e) => {\n\t\t\t\tprogress(Math.round((e.loaded / e.total) * 100));\n\t\t\t});\n\n\t\t\t// xhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n\t\t\txhr.onreadystatechange = () => {\n\t\t\t\t// Call a function when the state changes.\n\t\t\t\tif (xhr.readyState === XMLHttpRequest.DONE) {\n\t\t\t\t\tprogress(100);\n\n\t\t\t\t\tif (xhr.status !== 200) {\n\t\t\t\t\t\tLogger.system.log(\"SmartDesktopClient.uploadAssets Failed Response\", xhr.response);\n\t\t\t\t\t\tresolve({ err: `Got response code: ${xhr.status}`, paths: [] });\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst response = JSON.parse(xhr.response);\n\n\t\t\t\t\t\t\tLogger.system.log(\"SmartDesktopClient.uploadAssets Response\", xhr.response);\n\n\t\t\t\t\t\t\tresolve({ err: null, paths: response.paths });\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tresolve({ err: \"Couldn't parse response\", paths: [] });\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tLogger.system.log(\"SmartDesktopClient.uploadAssets send\", data);\n\t\t\txhr.send(data);\n\t\t});\n\t},\n\n\t/**\n\t * Post images to the smart desktop server\n\t *\n\t * @example\n\t * ...\n\t */\n\tasync uploadImages(files: File[], progress: Function): Promise<{ err: any; paths: string[] }> {\n\t\treturn this.uploadAssets(\n\t\t\tfiles.map(\n\t\t\t\t(file) =>\n\t\t\t\t\t({\n\t\t\t\t\t\tfile,\n\t\t\t\t\t\ttype: [\"Image\", \"GIF\"],\n\t\t\t\t\t} as Asset)\n\t\t\t),\n\t\t\tprogress\n\t\t);\n\t},\n\n\t/**\n\t * Post an image to the smart desktop server\n\t *\n\t * @example\n\t * ...\n\t */\n\tasync uploadImage(file: File, progress: Function): Promise<{ err: any; path: string }> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.uploadImages([file], progress)\n\t\t\t\t.then((response: { err: any; paths: string[] }) => {\n\t\t\t\t\tresolve({ err: response.err, path: response.paths[0] });\n\t\t\t\t})\n\t\t\t\t.catch(reject);\n\t\t});\n\t},\n\n\t/**\n\t * Update installer description by using REST API to persist the change\n\t *\n\t * @example\n\t * let { err } = await SmartDesktopClient.updateInstallerDescription(installerDescription);\n\t */\n\tasync updateInstallerDescription(installerDescription: InstallerDescription): Promise<{ err: any }> {\n\t\tLogger.system.log(\"SmartDesktopClient updateInstallerDescription\", installerDescription);\n\t\tconst { err } = await REST.httpPatch(`/project/installer`, installerDescription);\n\t\tLogger.system.log(\"SmartDesktopClient.updateInstallerDescription Response\", err ? err : \"successful\");\n\t\treturn { err };\n\t},\n\n\t/**\n\t * Update installer description by using REST API to persist the change\n\t *\n\t * @example\n\t * let { err } = await SmartDesktopClient.updateInstallerDescription(installerDescription);\n\t */\n\tasync updateProjectSettings(settings: ProjectSettings): Promise<{ err: any }> {\n\t\tconst { err } = await REST.httpPatch(`/project/settings`, settings);\n\t\treturn { err };\n\t},\n\n\t/**\n\t * Get project settings\n\t *\n\t * @example\n\t * let { settings, err } = await SmartDesktopClient.getProjectSettings();\n\t */\n\tasync getProjectSettings(): Promise<{\n\t\tsettings: ProjectSettings;\n\t\terr: any;\n\t}> {\n\t\tconst response = await REST.httpGet(`/project/settings`);\n\n\t\treturn response.getData;\n\t},\n\n\t/**\n\t * Helper function -- progress descriptor for updating files\n\t *\n\t */\n\tprogressIndicator(progress: any) {\n\t\tLogger.system.log(\"SmartDesktopClient.progressIndicator Console-Only\", progress);\n\t\tconsole.log(\"Console-Only Progress Indicator:\", progress);\n\t},\n\n\t/**\n\t * Update Finsemble toolbar icon file and transmit correspond ui-changed message so UI will pick up change\n\t *\n\t * @returns {Promise<{ err: any }>}\n\t */\n\tasync updateToolbarIcon(imageFile: File): Promise<{ err: string | null; path: string }> {\n\t\tconst TARGET_FILE = \"assets/img/Finsemble_Toolbar_Icon.png\";\n\t\tLogger.system.log(\"SmartDesktopClient.updateToolbarIcon\", TARGET_FILE, imageFile);\n\n\t\tconst { err, paths } = await this.uploadAssets(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfile: imageFile,\n\t\t\t\t\ttype: [\"Image\", \"GIF\"],\n\t\t\t\t\ttargetPath: TARGET_FILE,\n\t\t\t\t},\n\t\t\t],\n\t\t\tthis.progressIndicator\n\t\t);\n\n\t\tif (!err) {\n\t\t\t// transmit change notification so Finsemble can dynamically update (see toolbar)\n\t\t\tRouterClient.transmit(\"Finsemble-ui-change.toolbarIconUpdate\", {});\n\t\t}\n\n\t\tLogger.system.log(\"SmartDesktopClient.updateToolbarIcon result\", err ? err : \"successful\");\n\t\treturn { err, path: paths[0] };\n\t},\n\n\t/**\n\t * Update Finsemble taskbar icon file and transmit correspond ui-changed message so UI will pick up change\n\t *\n\t */\n\tasync updateTaskbarIcon(imageFile: File): Promise<{ err: string | null; path: string }> {\n\t\tconst TARGET_FILE = \"assets/img/Finsemble_Taskbar_Icon.png\";\n\t\tLogger.system.log(\"SmartDesktopClient.updateTaskbarIcon\", imageFile);\n\n\t\tconst { err, paths } = await this.uploadAssets(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfile: imageFile,\n\t\t\t\t\ttype: [\"Image\"],\n\t\t\t\t\ttargetPath: TARGET_FILE,\n\t\t\t\t},\n\t\t\t],\n\t\t\tthis.progressIndicator\n\t\t);\n\n\t\tif (!err) {\n\t\t\t// transmit notification so Finsemble can dynamically update (e.g. toolbar, taskbar)\n\t\t\tRouterClient.transmit(\"Finsemble-ui-change.taskbarIconUpdate\", {});\n\t\t}\n\n\t\tLogger.system.log(\"SmartDesktopClient.updateTaskbarIcon result\", err ? err : \"successful\");\n\t\treturn { err, path: paths[0] };\n\t},\n\n\t/**\n\t * Update system tray icon file and refresh config entry to trigger notification\n\t *\n\t */\n\tasync updateSystemTrayIcon(imageFile: File): Promise<{ err: string | null; path: string }> {\n\t\tconst TARGET_FILE = \"assets/img/Finsemble_SystemTray_Icon.png\";\n\t\tLogger.system.log(\"SmartDesktopClient.updateSystemTrayIcon\", imageFile);\n\n\t\tconst { err: error1, paths } = await this.uploadAssets(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfile: imageFile,\n\t\t\t\t\ttype: [\"Image\"],\n\t\t\t\t\ttargetPath: TARGET_FILE,\n\t\t\t\t},\n\t\t\t],\n\t\t\tthis.progressIndicator\n\t\t);\n\n\t\t// since the icon URL is kept in config, refresh the config entry using the current value to trigger a notification\n\t\tconst { err: error2 } = await RouterClient.query(`${MAKER_TOPIC}.refreshSystemTrayIconConfig`, {});\n\n\t\tLogger.system.log(\n\t\t\t\"SmartDesktopClient.updateSystemTrayIcon result\",\n\t\t\terror1 || error2 ? { error1, error2 } : \"successful\"\n\t\t);\n\t\t// Jumping through typescript hoops due to CallbackError type\n\t\tconst error = error1 || error2 || null;\n\t\treturn { err: error ? error.toString() : null, path: paths[0] };\n\t},\n\n\t/**\n\t * Update the installer Icon file -- the change will not be picked up until the installer is built\n\t *\n\t */\n\tasync updateInstallerIcon(iconFile: File): Promise<{ err: string | null; path: string }> {\n\t\tconst TARGET_FILE = \"assets/img/installer_icon.ico\";\n\t\tLogger.system.log(\"SmartDesktopClient.updateInstallerIcon\", iconFile);\n\n\t\tconst { err, paths } = await this.uploadAssets(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfile: iconFile,\n\t\t\t\t\ttype: [\"Icon\"],\n\t\t\t\t\ttargetPath: TARGET_FILE,\n\t\t\t\t},\n\t\t\t],\n\t\t\tthis.progressIndicator\n\t\t);\n\n\t\tLogger.system.log(\"SmartDesktopClient.updateSystemTrayIcon result\", err ? err : \"successful\");\n\t\treturn { err, path: paths[0] };\n\t},\n\n\t/**\n\t * Update the installer graphic file -- the change will not be picked up until the installer is built\n\t */\n\tasync updateInstallerGraphic(gifFile: File): Promise<{ err: string | null; path: string }> {\n\t\tconst TARGET_FILE = \"assets/img/installer_spinner.gif\";\n\t\tLogger.system.log(\"SmartDesktopClient.updateInstallerGraphic\", gifFile);\n\n\t\tconst { err, paths } = await this.uploadAssets(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfile: gifFile,\n\t\t\t\t\ttype: [\"Image\", \"GIF\"],\n\t\t\t\t\ttargetPath: TARGET_FILE,\n\t\t\t\t},\n\t\t\t],\n\t\t\tthis.progressIndicator\n\t\t);\n\n\t\tLogger.system.log(\"SmartDesktopClient.updateInstallerGraphic result\", err ? err : \"successful\");\n\t\treturn { err, path: paths[0] };\n\t},\n\n\t/**\n\t * Update the splash screen image file -- the change will not be picked up until Finsemble/FEA is restarted\n\t */\n\tasync updateSplashScreen(svgFile: File): Promise<{ err: string | null; path: string }> {\n\t\tconst TARGET_FILE = \"assets/img/FinsembleSplash.png\";\n\t\tLogger.system.log(\"SmartDesktopClient.updateSplashScreen\", svgFile);\n\n\t\tconst { err, paths } = await this.uploadAssets(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tfile: svgFile,\n\t\t\t\t\ttype: [\"Image\", \"GIF\"],\n\t\t\t\t\ttargetPath: TARGET_FILE,\n\t\t\t\t},\n\t\t\t],\n\t\t\tthis.progressIndicator\n\t\t);\n\n\t\tLogger.system.log(\"SmartDesktopClient.updateSplashScreen result\", err ? err : \"successful\");\n\t\treturn { err, path: paths[0] };\n\t},\n\n\t/**\n\t * Helper function to update a single theme variable within Finsemble's theme\n\t */\n\tasync updateThemeVariable(varName: string, varValue: string): Promise<{ err: any }> {\n\t\tconst theme: CSS = {};\n\t\ttheme[varName] = varValue;\n\t\tLogger.system.log(\"SmartDesktopClient.updateThemeVariable\", theme);\n\t\treturn this.updateTheme(theme);\n\t},\n\n\t/**\n\t * Save a .zip file of the project with `appName` to the local filesystem at `targetPath`\n\t * @example\n\t * let { err } = await SmartDesktopClient.createProjectZip(\"testApp\", \"~/Downloads/\");\n\t */\n\tasync createProjectZip(appName: string, targetPath: string | undefined = undefined): Promise<string> {\n\t\tconst applicationRoot = await this.applicationRoot();\n\t\tLogger.system.log(\"SmartDesktopClient.createProjectZip\", applicationRoot);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst onTargetPath = (targetPathInner: string) => {\n\t\t\t\tconst endpointURL = `${applicationRoot}/project/${appName}/zip?targetPath=${encodeURIComponent(\n\t\t\t\t\ttargetPathInner\n\t\t\t\t)}`;\n\n\t\t\t\tLogger.system.log(endpointURL);\n\n\t\t\t\tfetch(endpointURL)\n\t\t\t\t\t.then((response) => response.json())\n\t\t\t\t\t.then((data) => {\n\t\t\t\t\t\tresolve(data.file);\n\t\t\t\t\t})\n\t\t\t\t\t.catch(reject);\n\t\t\t};\n\n\t\t\tif (targetPath) {\n\t\t\t\tonTargetPath(targetPath);\n\t\t\t} else {\n\t\t\t\tFEAGlobals.finsembleWindow.showNativeOpenDialog(\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle: \"Select an output directory\",\n\t\t\t\t\t\tbuttonLabel: \"Save .zip file\",\n\t\t\t\t\t\tproperties: [\"openDirectory\"],\n\t\t\t\t\t},\n\t\t\t\t\t(err: any, response: any) => {\n\t\t\t\t\t\tif (response?.[0]?.filePaths?.length > 0) {\n\t\t\t\t\t\t\tonTargetPath(response?.[0]?.filePaths[0]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treject(\"No file selected\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n\t * Copy project assets/config to target dir\n\t *\n\t * @example\n\t * let { err } = await SmartDesktopClient.createProjectZip(\"testApp\", \"~/Downloads/\");\n\t */\n\tasync copyProjectFiles(\n\t\tappName: string,\n\t\ttargetPath: string | undefined = undefined // allow passing manually specified targetPath\n\t): Promise<\n\t\t{\n\t\t\tsource: string;\n\t\t\ttarget: string;\n\t\t}[]\n\t> {\n\t\tconst applicationRoot = await this.applicationRoot();\n\t\tLogger.system.log(\"SmartDesktopClient.createProjectZip\", applicationRoot);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// callback to forward targetPath to the server REST API endpoint\n\t\t\t// regardless of whether targetPath is manually specified or retrieved via showNativeOpenDialog\n\t\t\tconst onTargetPath = (selectedTargetPath: any) => {\n\t\t\t\tconst endpointURL = `${applicationRoot}/project/${appName}/copy?targetPath=${encodeURIComponent(\n\t\t\t\t\tselectedTargetPath\n\t\t\t\t)}`;\n\n\t\t\t\tLogger.system.debug(`copyProjectFiles: copying ${selectedTargetPath}, ${endpointURL}`);\n\n\t\t\t\tfetch(endpointURL)\n\t\t\t\t\t.then((response) => response.json())\n\t\t\t\t\t.then((data) => {\n\t\t\t\t\t\tif (data.error) {\n\t\t\t\t\t\t\treject(data.error);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresolve(data.files);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.catch(reject);\n\t\t\t};\n\n\t\t\tif (targetPath) {\n\t\t\t\t// we've manually specified a targetPath\n\t\t\t\tonTargetPath(targetPath);\n\t\t\t} else {\n\t\t\t\t// Open a native file selection dialog and relay the selected file to our callback\n\t\t\t\tFEAGlobals.finsembleWindow.showNativeOpenDialog(\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle: \"Select Seed Project\",\n\t\t\t\t\t\tbuttonLabel: \"Copy to Seed Project\",\n\t\t\t\t\t\tproperties: [\"openDirectory\"],\n\t\t\t\t\t},\n\t\t\t\t\t(err: any, response: any) => {\n\t\t\t\t\t\tif (response?.[0]?.filePaths?.length > 0) {\n\t\t\t\t\t\t\tonTargetPath(response?.[0]?.filePaths[0]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treject(\"No file selected\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n\t * Change the path of the current project in smartDesktops.json\n\t *\n\t * @param appName name of app to zip\n\t * @param [targetPath] output path for zip file\n\t *\n\t * @example\n\t * let { err } = await SmartDesktopClient.createProjectZip(\"testApp\", \"~/Downloads/\");\n\t */\n\tasync selectProjectPath(): Promise<string> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tFEAGlobals.finsembleWindow.showNativeOpenDialog(\n\t\t\t\t{\n\t\t\t\t\ttitle: \"Select Seed Project\",\n\t\t\t\t\tbuttonLabel: \"Select Seed Project\",\n\t\t\t\t\tproperties: [\"openDirectory\"],\n\t\t\t\t},\n\t\t\t\t(err: any, response: any) => {\n\t\t\t\t\tif (response?.[0]?.filePaths?.length > 0) {\n\t\t\t\t\t\tconst path = response?.[0]?.filePaths[0];\n\t\t\t\t\t\tLogger.system.log(\"SmartDesktopClient.selectProjectPath\", path);\n\t\t\t\t\t\tresolve(path);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treject(\"No file selected\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t},\n\n\t/**\n\t * checkValidProjectName\n\t */\n\tcheckValidProjectName(name: string) {\n\t\treturn /^[a-zA-Z0-9 \\-_.]{1,}$/.test(name) && /[a-zA-Z0-9]{1,}/.test(name);\n\t},\n\n\t/**\n\t * Check an arbitrary string to see if it is a valid url\n\t * The only checks for validity are:\n\t * * if the string begins with \"http://\" or \"https://\"\n\t *\n\t * @param url - the potential URL\n\t */\n\tcheckValidURL(url: string) {\n\t\tif (url.length === 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn /^https?:\\/\\/[^\\s]+$/.test(url);\n\t},\n\n\tasync isInboundInteropAuthorized(\n\t\tsourceApp: AppDefinition,\n\t\ttargetApp: AppDefinition,\n\t\tcontextType?: string\n\t): Promise<boolean> {\n\t\treturn isInteropAuthorized(sourceApp, targetApp, contextType);\n\t},\n\n\tasync isOutboundInteropAuthorized(\n\t\tsourceApp: AppDefinition,\n\t\ttargetApp: AppDefinition,\n\t\tcontextType?: string\n\t): Promise<boolean> {\n\t\treturn isInteropAuthorized(targetApp, sourceApp, contextType);\n\t},\n\n\t/**\n\t * Publish `.zip` file to the Cosaic Cloud\n\t *\n\t * @returns {Promise}\n\t *\n\t * @example\n\t * let { err } = await SmartDesktopClient.publishToCosaicCloud();\n\t */\n\tasync publishToCosaicCloud(uuid?: string): Promise<FEA.DeployInfo> {\n\t\tconst applicationRoot = await this.applicationRoot();\n\t\tLogger.system.log(\"SmartDesktopClient.publishToCosaicCloud\", applicationRoot);\n\n\t\treturn new Promise(async (resolve, reject) => {\n\t\t\tconst endpointURL = `${applicationRoot}/project/publish/cosaicCloud?uuid=${encodeURIComponent(uuid || \"\")}`;\n\n\t\t\tconst response = await fetch(endpointURL, {\n\t\t\t\tmethod: \"PUT\",\n\t\t\t});\n\n\t\t\t// We get json data back whether it's a 200 or 500 response\n\t\t\tconst data = await response.json();\n\t\t\tif (response.ok) {\n\t\t\t\tresolve(data);\n\t\t\t} else {\n\t\t\t\treject(data);\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n\t * Get the progress of a publish request\n\t *\n\t * @returns {Promise}\n\t *\n\t */\n\tasync getPublishProgress(): Promise<FEA.Progress> {\n\t\tconst applicationRoot = await this.applicationRoot();\n\t\tLogger.system.log(\"SmartDesktopClient.getPublishProgress\", applicationRoot);\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst endpointURL = `${applicationRoot}/project/publish/progress`;\n\n\t\t\tfetch(endpointURL)\n\t\t\t\t.then((response) => response.json())\n\t\t\t\t.then((data) => {\n\t\t\t\t\tresolve(data);\n\t\t\t\t})\n\t\t\t\t.catch(reject);\n\t\t});\n\t},\n\n\t/**\n\t * Resets the current project to factory defaults. Once complete, Finsemble is restarted\n\t * so that the changes can take effect.\n\t */\n\tasync resetProject(): Promise<[Error | null, any]> {\n\t\tconst applicationRoot = await this.applicationRoot();\n\t\tLogger.system.log(\"SmartDesktopClient.resetProject\", applicationRoot);\n\n\t\tconst endpointURL = `${applicationRoot}/project/reset`;\n\n\t\tconst response = await fetch(endpointURL, {\n\t\t\tmethod: \"PUT\",\n\t\t});\n\n\t\tconst data = await response.json();\n\t\tconst error = response.ok ? null : new Error(data.message);\n\t\tresponse.ok && Desktop.restartApplication();\n\t\treturn [error, data];\n\t},\n\n\t/**\n\t * Saves the auth providers to config.json\n\t */\n\tasync getAuthenticationProviders(): Promise<any[]> {\n\t\tconst applicationRoot = await this.applicationRoot();\n\t\tLogger.system.log(\"SmartDesktopClient.getAuthenticationProviders\", applicationRoot);\n\n\t\tconst endpointURL = `${applicationRoot}/authentication`;\n\n\t\tconst response = await fetch(endpointURL, {\n\t\t\tmethod: \"get\",\n\t\t\theaders: {\n\t\t\t\tAccept: \"application/json\",\n\t\t\t},\n\t\t});\n\n\t\tconst data = await response.json();\n\n\t\tif (!data || !Array.isArray(data.providers)) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn data.providers;\n\t},\n\n\t/**\n\t * Saves the auth providers to config.json\n\t */\n\tasync setAuthenticationProviders(authenticationProviders: any): Promise<Error | null> {\n\t\tconst applicationRoot = await this.applicationRoot();\n\t\tLogger.system.log(\"SmartDesktopClient.setAuthenticationProviders\", applicationRoot);\n\n\t\tconst endpointURL = `${applicationRoot}/authentication`;\n\n\t\tconst response = await fetch(endpointURL, {\n\t\t\tmethod: \"PUT\",\n\t\t\theaders: {\n\t\t\t\tAccept: \"application/json\",\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t\tbody: JSON.stringify({ authenticationProviders }),\n\t\t});\n\n\t\tconst data = await response.json();\n\t\treturn response.ok ? null : new Error(data.message);\n\t},\n};\n"]}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,61 @@
1
+ import { describe, it } from "mocha";
2
+ import { expect } from "chai";
3
+ import { SmartDesktopClient } from "./smartDesktopClient";
4
+ describe("SmartDesktopClient", () => {
5
+ describe("checkValidProjectName", () => {
6
+ const validNames = ["My Project", "kebab-case", "snake_case", "what.case.is.this..."];
7
+ validNames.forEach((name) => {
8
+ it(`valid project name: ${name}`, () => {
9
+ expect(SmartDesktopClient.checkValidProjectName(name)).to.be.true;
10
+ });
11
+ });
12
+ const invalidNames = [
13
+ "I have, a, comma",
14
+ "What!?",
15
+ "",
16
+ "My (Test) Desktop",
17
+ "My [bracket] Desktop",
18
+ "My {braces} Desktop",
19
+ "My? Smart! Desktop",
20
+ "${unicode_sample}",
21
+ " ",
22
+ " ",
23
+ ".",
24
+ "......",
25
+ ];
26
+ invalidNames.forEach((name) => {
27
+ it(`invalid project name: ${name}`, () => {
28
+ expect(SmartDesktopClient.checkValidProjectName(name), name).to.be.false;
29
+ });
30
+ });
31
+ });
32
+ describe("checkValidURL", () => {
33
+ const valid = [
34
+ "",
35
+ "http://www.cosaic.io/",
36
+ "https://www.cosaic.io/",
37
+ "http://a",
38
+ "https://a",
39
+ ];
40
+ valid.forEach((url) => {
41
+ it(`valid url: "${url}"`, () => {
42
+ expect(SmartDesktopClient.checkValidURL(url)).to.be.true;
43
+ });
44
+ });
45
+ const invalid = [
46
+ "http://",
47
+ "https://",
48
+ "file:///C:/Users/",
49
+ "www.google.com",
50
+ "This is not a URL; it's a sentence!?",
51
+ " ",
52
+ " http://www.google.com",
53
+ ];
54
+ invalid.forEach((url) => {
55
+ it(`invalid url: "${url}"`, () => {
56
+ expect(SmartDesktopClient.checkValidURL(url)).to.be.false;
57
+ });
58
+ });
59
+ });
60
+ });
61
+ //# sourceMappingURL=smartDesktopClient.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smartDesktopClient.spec.js","sourceRoot":"","sources":["../../../src/components/sdd/smartDesktopClient.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAM9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IACnC,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;QACtC,MAAM,UAAU,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;QACtF,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC3B,EAAE,CAAC,uBAAuB,IAAI,EAAE,EAAE,GAAG,EAAE;gBACtC,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YACnE,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,MAAM,YAAY,GAAG;YACpB,kBAAkB;YAClB,QAAQ;YACR,EAAE;YACF,mBAAmB;YACnB,sBAAsB;YACtB,q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,CAAC","sourcesContent":["import { describe, it } from \"mocha\";\nimport { expect } from \"chai\";\n\n// This test case belongs in packages/api\n// However, the infrastructure to run test cases doesn't currently exist in packages/api. So, this file will live in packages/ui\n// until infrastructure is added to packages/api.\n\nimport { SmartDesktopClient } from \"./smartDesktopClient\";\n\ndescribe(\"SmartDesktopClient\", () => {\n\tdescribe(\"checkValidProjectName\", () => {\n\t\tconst validNames = [\"My Project\", \"kebab-case\", \"snake_case\", \"what.case.is.this...\"];\n\t\tvalidNames.forEach((name) => {\n\t\t\tit(`valid project name: ${name}`, () => {\n\t\t\t\texpect(SmartDesktopClient.checkValidProjectName(name)).to.be.true;\n\t\t\t});\n\t\t});\n\n\t\tconst invalidNames = [\n\t\t\t\"I have, a, comma\",\n\t\t\t\"What!?\",\n\t\t\t\"\",\n\t\t\t\"My (Test) Desktop\",\n\t\t\t\"My [bracket] Desktop\",\n\t\t\t\"My {braces} Desktop\",\n\t\t\t\"My? Smart! Desktop\",\n\t\t\t\"${unicode_sample}\",\n\t\t\t\" \",\n\t\t\t\" \",\n\t\t\t\".\",\n\t\t\t\"......\",\n\t\t];\n\t\tinvalidNames.forEach((name) => {\n\t\t\tit(`invalid project name: ${name}`, () => {\n\t\t\t\texpect(SmartDesktopClient.checkValidProjectName(name), name).to.be.false;\n\t\t\t});\n\t\t});\n\t});\n\n\tdescribe(\"checkValidURL\", () => {\n\t\tconst valid = [\n\t\t\t\"\", // empty string\n\t\t\t\"http://www.cosaic.io/\", // good URL\n\t\t\t\"https://www.cosaic.io/\", // good URL\n\t\t\t\"http://a\", // http protocol + anything\n\t\t\t\"https://a\", // https protocol + anything\n\t\t];\n\t\tvalid.forEach((url) => {\n\t\t\tit(`valid url: \"${url}\"`, () => {\n\t\t\t\texpect(SmartDesktopClient.checkValidURL(url)).to.be.true;\n\t\t\t});\n\t\t});\n\n\t\tconst invalid = [\n\t\t\t\"http://\", // http protocol, but no other characters\n\t\t\t\"https://\", // https protocol, but no other characters\n\t\t\t\"file:///C:/Users/\", // unsupported protocol\n\t\t\t\"www.google.com\", // no protocol\n\t\t\t\"This is not a URL; it's a sentence!?\", // not even remotely a URL\n\t\t\t\" \", // spaces\n\t\t\t\" http://www.google.com\", // leading spaces\n\t\t];\n\t\tinvalid.forEach((url) => {\n\t\t\tit(`invalid url: \"${url}\"`, () => {\n\t\t\t\texpect(SmartDesktopClient.checkValidURL(url)).to.be.false;\n\t\t\t});\n\t\t});\n\t});\n});\n"]}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { AddAppProps } from "../AddApp";
3
+ import "../../../assets/css/finsemble.css";
4
+ import "../../common/css/styles.css";
5
+ declare const _default: {
6
+ title: string;
7
+ component: (props: AddAppProps) => JSX.Element;
8
+ };
9
+ export default _default;
10
+ export declare const Page: import("@storybook/react").Story<AddAppProps>;
@@ -0,0 +1,18 @@
1
+ import { createStory } from "../../common/helpers";
2
+ import { AddApp } from "../AddApp";
3
+ import "../../../assets/css/finsemble.css";
4
+ import "../../common/css/styles.css";
5
+ import { action } from "@storybook/addon-actions";
6
+ export default {
7
+ title: "Smart Desktop Designer/AddApp",
8
+ component: AddApp,
9
+ };
10
+ export const Page = createStory(AddApp, {
11
+ checkValidURL: () => true,
12
+ addAppByUrl: action("addAppByUrl"),
13
+ addAppByPath: action("addAppByPath"),
14
+ addAppCitrix: action("addAppCitrix"),
15
+ close: action("close"),
16
+ show: true,
17
+ });
18
+ //# sourceMappingURL=AddApp.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddApp.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/AddApp.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAe,MAAM,WAAW,CAAC;AAChD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACd,KAAK,EAAE,+BAA+B;IACtC,SAAS,EAAE,MAAM;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAc,MAAM,EAAE;IACpD,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI;IACzB,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;IACtB,IAAI,EAAE,IAAI;CACV,CAAC,CAAC","sourcesContent":["import { createStory } from \"../../common/helpers\";\nimport { AddApp, AddAppProps } from \"../AddApp\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { action } from \"@storybook/addon-actions\";\n\nexport default {\n\ttitle: \"Smart Desktop Designer/AddApp\",\n\tcomponent: AddApp,\n};\n\nexport const Page = createStory<AddAppProps>(AddApp, {\n\tcheckValidURL: () => true,\n\taddAppByUrl: action(\"addAppByUrl\"),\n\taddAppByPath: action(\"addAppByPath\"),\n\taddAppCitrix: action(\"addAppCitrix\"),\n\tclose: action(\"close\"),\n\tshow: true,\n});\n"]}
@@ -10,4 +10,6 @@ export default _default;
10
10
  export declare const Page: import("@storybook/react").Story<AppEditPageProps>;
11
11
  export declare const PageWithIconURL: import("@storybook/react").Story<AppEditPageProps>;
12
12
  export declare const NativePage: import("@storybook/react").Story<AppEditPageProps>;
13
+ export declare const AssimilationPage: import("@storybook/react").Story<AppEditPageProps>;
14
+ export declare const CitrixPage: import("@storybook/react").Story<AppEditPageProps>;
13
15
  export declare const EmptyPage: import("@storybook/react").Story<AppEditPageProps>;
@@ -31,5 +31,7 @@ const defaultProps = {
31
31
  export const Page = createStory(AppEditPage, defaultProps);
32
32
  export const PageWithIconURL = createStory(AppEditPage, Object.assign(Object.assign({}, defaultProps), { appData: Object.assign(Object.assign({}, defaultAppData), { iconURL: "https://assets.finsemble.com/components/fdc3-workbench/fdc3-icon-256.png" }) }));
33
33
  export const NativePage = createStory(AppEditPage, Object.assign(Object.assign({}, defaultProps), { startingAppType: "native", startingNativePath: "test.exe", appData: defaultAppData }));
34
+ export const AssimilationPage = createStory(AppEditPage, Object.assign(Object.assign({}, defaultProps), { startingAppType: "assimilation", startingNativePath: "test.exe", appData: defaultAppData }));
35
+ export const CitrixPage = createStory(AppEditPage, Object.assign(Object.assign({}, defaultProps), { startingAppType: "Citrix", appData: Object.assign(Object.assign({}, defaultAppData), { alias: "My Citrix App" }) }));
34
36
  export const EmptyPage = createStory(AppEditPage, Object.assign(Object.assign({}, defaultProps), { startingDisplayName: "", startingWindowURL: "", validateURL: (s) => !s.includes("invalid") }));
35
37
  //# sourceMappingURL=AppEditPage.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppEditPage.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/AppEditPage.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACd,KAAK,EAAE,oCAAoC;IAC3C,SAAS,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,oBAAoB,GAAG,GAAkB,EAAE,CAChD,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;IACvB,OAAO,CAAC,IAAI,CAAC,CAAC;AACf,CAAC,CAAC,CAAC;AAEJ,MAAM,uBAAuB,GAAG,GAA2B,EAAE,CAC5D,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;IACvB,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEJ,MAAM,YAAY,GAAG;IACpB,mBAAmB,EAAE,MAAM;IAC3B,eAAe,EAAE,KAAK;IACtB,iBAAiB,EAAE,uBAAuB;IAC1C,kBAAkB,EAAE,EAAE;IACtB,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI;IACvB,mBAAmB,EAAE,MAAM,CAAC,oBAAoB,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC1B,0BAA0B,EAAE,oBAAoB;IAChD,2BAA2B,EAAE,oBAAoB;IACjD,MAAM,EAAE,uBAAuB;IAC/B,gBAAgB,EAAE,EAAE;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAmB,WAAW,EAAE,YAAY,CAAC,CAAC;AAE7E,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAmB,WAAW,kCACpE,YAAY,KACf,OAAO,kCACH,cAAc,KACjB,OAAO,EAAE,0EAA0E,OAEnF,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAmB,WAAW,kCAC/D,YAAY,KACf,eAAe,EAAE,QAAQ,EACzB,kBAAkB,EAAE,UAAU,EAC9B,OAAO,EAAE,cAAc,IACtB,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAmB,WAAW,kCAC9D,YAAY,KACf,mBAAmB,EAAE,EAAE,EACvB,iBAAiB,EAAE,EAAE,EACrB,WAAW,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IACjD,CAAC","sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport React from \"react\"; // This must be imported, or storybook will choke on this page\nimport { AppEditPage, AppEditPageProps, defaultAppData } from \"../AppEditPage\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { createStory } from \"../../common/helpers\";\nimport { action } from \"@storybook/addon-actions\";\n\nexport default {\n\ttitle: \"Smart Desktop Designer/AppEditPage\",\n\tcomponent: AppEditPage,\n};\n\nconst resolvePromiseAsTrue = (): Promise<true> =>\n\tnew Promise((resolve) => {\n\t\tresolve(true);\n\t});\n\nconst resolvePromiseErrorNull = (): Promise<{ err: null }> =>\n\tnew Promise((resolve) => {\n\t\tresolve({ err: null });\n\t});\n\nconst defaultProps = {\n\tstartingDisplayName: \"Test\",\n\tstartingAppType: \"web\",\n\tstartingWindowURL: \"http://www.google.com\",\n\tstartingNativePath: \"\",\n\tappData: defaultAppData,\n\tvalidateURL: () => true,\n\tremoveApplicationFn: action(\"Remove application\"),\n\tcancelFn: action(\"Cancel\"),\n\tsubmitFn: action(\"Submit\"),\n\tisInboundInteropAuthorized: resolvePromiseAsTrue,\n\tisOutboundInteropAuthorized: resolvePromiseAsTrue,\n\taddApp: resolvePromiseErrorNull,\n\tpreloadAliasList: [],\n};\n\nexport const Page = createStory<AppEditPageProps>(AppEditPage, defaultProps);\n\nexport const PageWithIconURL = createStory<AppEditPageProps>(AppEditPage, {\n\t...defaultProps,\n\tappData: {\n\t\t...defaultAppData,\n\t\ticonURL: \"https://assets.finsemble.com/components/fdc3-workbench/fdc3-icon-256.png\",\n\t},\n});\n\nexport const NativePage = createStory<AppEditPageProps>(AppEditPage, {\n\t...defaultProps,\n\tstartingAppType: \"native\",\n\tstartingNativePath: \"test.exe\",\n\tappData: defaultAppData,\n});\n\nexport const EmptyPage = createStory<AppEditPageProps>(AppEditPage, {\n\t...defaultProps,\n\tstartingDisplayName: \"\",\n\tstartingWindowURL: \"\",\n\tvalidateURL: (s: string) => !s.includes(\"invalid\"),\n});\n"]}
1
+ {"version":3,"file":"AppEditPage.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/AppEditPage.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,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AAM,UAAU,GAAG,WAAW,CAAmB,WAAW,kCAC/D,YAAY,KACf,eAAe,EAAE,QAAQ,EACzB,kBAAkB,EAAE,UAAU,EAC9B,OAAO,EAAE,cAAc,IACtB,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAmB,WAAW,kCACrE,YAAY,KACf,eAAe,EAAE,cAAc,EAC/B,kBAAkB,EAAE,UAAU,EAC9B,OAAO,EAAE,cAAc,IACtB,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAmB,WAAW,kCAC/D,YAAY,KACf,eAAe,EAAE,QAAQ,EACzB,OAAO,kCACH,cAAc,KACjB,KAAK,EAAE,eAAe,OAEtB,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAmB,WAAW,kCAC9D,YAAY,KACf,mBAAmB,EAAE,EAAE,EACvB,iBAAiB,EAAE,EAAE,EACrB,WAAW,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IACjD,CAAC","sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport React from \"react\"; // This must be imported, or storybook will choke on this page\nimport { AppEditPage, AppEditPageProps, defaultAppData } from \"../AppEditPage\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { createStory } from \"../../common/helpers\";\nimport { action } from \"@storybook/addon-actions\";\n\nexport default {\n\ttitle: \"Smart Desktop Designer/AppEditPage\",\n\tcomponent: AppEditPage,\n};\n\nconst resolvePromiseAsTrue = (): Promise<true> =>\n\tnew Promise((resolve) => {\n\t\tresolve(true);\n\t});\n\nconst resolvePromiseErrorNull = (): Promise<{ err: null }> =>\n\tnew Promise((resolve) => {\n\t\tresolve({ err: null });\n\t});\n\nconst defaultProps = {\n\tstartingDisplayName: \"Test\",\n\tstartingAppType: \"web\",\n\tstartingWindowURL: \"http://www.google.com\",\n\tstartingNativePath: \"\",\n\tappData: defaultAppData,\n\tvalidateURL: () => true,\n\tremoveApplicationFn: action(\"Remove application\"),\n\tcancelFn: action(\"Cancel\"),\n\tsubmitFn: action(\"Submit\"),\n\tisInboundInteropAuthorized: resolvePromiseAsTrue,\n\tisOutboundInteropAuthorized: resolvePromiseAsTrue,\n\taddApp: resolvePromiseErrorNull,\n\tpreloadAliasList: [],\n};\n\nexport const Page = createStory<AppEditPageProps>(AppEditPage, defaultProps);\n\nexport const PageWithIconURL = createStory<AppEditPageProps>(AppEditPage, {\n\t...defaultProps,\n\tappData: {\n\t\t...defaultAppData,\n\t\ticonURL: \"https://assets.finsemble.com/components/fdc3-workbench/fdc3-icon-256.png\",\n\t},\n});\n\nexport const NativePage = createStory<AppEditPageProps>(AppEditPage, {\n\t...defaultProps,\n\tstartingAppType: \"native\",\n\tstartingNativePath: \"test.exe\",\n\tappData: defaultAppData,\n});\n\nexport const AssimilationPage = createStory<AppEditPageProps>(AppEditPage, {\n\t...defaultProps,\n\tstartingAppType: \"assimilation\",\n\tstartingNativePath: \"test.exe\",\n\tappData: defaultAppData,\n});\n\nexport const CitrixPage = createStory<AppEditPageProps>(AppEditPage, {\n\t...defaultProps,\n\tstartingAppType: \"Citrix\",\n\tappData: {\n\t\t...defaultAppData,\n\t\talias: \"My Citrix App\",\n\t},\n});\n\nexport const EmptyPage = createStory<AppEditPageProps>(AppEditPage, {\n\t...defaultProps,\n\tstartingDisplayName: \"\",\n\tstartingWindowURL: \"\",\n\tvalidateURL: (s: string) => !s.includes(\"invalid\"),\n});\n"]}
@@ -4,7 +4,7 @@ import "../../../assets/css/finsemble.css";
4
4
  import "../../common/css/styles.css";
5
5
  declare const _default: {
6
6
  title: string;
7
- component: ({ startTheme, darkTheme, lightTheme, updateThemes, areYouSure, baseURL, toolbarIcon, taskbarIcon, installerIcon, systemTrayIcon, splashScreenImage, setToolbarIcon, setTaskbarIcon, setInstallerIcon, setSystemTrayIcon, setSplashScreenImage, setIconsChanged, updateSplashScreen, updateToolbarIcon, updateTaskbarIcon, updateSystemTrayIcon, updateInstallerIcon, }: AppearanceProps) => JSX.Element;
7
+ component: ({ startTheme, darkTheme, lightTheme, updateTheme, updateThemes, areYouSure, baseURL, toolbarIcon, taskbarIcon, installerIcon, systemTrayIcon, splashScreenImage, setToolbarIcon, setTaskbarIcon, setInstallerIcon, setSystemTrayIcon, setSplashScreenImage, setIconsChanged, updateSplashScreen, updateToolbarIcon, updateTaskbarIcon, updateSystemTrayIcon, updateInstallerIcon, }: AppearanceProps) => JSX.Element;
8
8
  };
9
9
  export default _default;
10
10
  export declare const Page: import("@storybook/react").Story<AppearanceProps>;
@@ -11,6 +11,7 @@ export const Page = createStory(Appearance, {
11
11
  startTheme: darkTheme,
12
12
  darkTheme,
13
13
  lightTheme,
14
+ updateTheme: (theme) => { },
14
15
  updateThemes: () => {
15
16
  },
16
17
  areYouSure: (cb) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Appearance.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/Appearance.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAC;AAC5D,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE5D,eAAe;IACd,KAAK,EAAE,mCAAmC;IAC1C,SAAS,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAkB,UAAU,EAAE;IAC5D,UAAU,EAAE,SAAS;IACrB,SAAS;IACT,UAAU;IACV,YAAY,EAAE,GAAG,EAAE;IAEnB,CAAC;IACD,UAAU,EAAE,CAAC,EAAc,EAAE,EAAE;QAC9B,EAAE,EAAE,CAAC;IACN,CAAC;IACD,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,EAAE;IACrB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,gBAAgB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC1B,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC3B,oBAAoB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC9B,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,kBAAkB,EAAE,cAAc;IAClC,iBAAiB,EAAE,cAAc;IACjC,iBAAiB,EAAE,cAAc;IACjC,oBAAoB,EAAE,cAAc;IACpC,mBAAmB,EAAE,cAAc;CACnC,CAAC,CAAC","sourcesContent":["import { createStory, uploadFunction } from \"../../common/helpers\";\nimport { Appearance, AppearanceProps } from \"../Appearance\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { darkTheme, lightTheme } from \"../themeDefinitions\";\n\nexport default {\n\ttitle: \"Smart Desktop Designer/Appearance\",\n\tcomponent: Appearance,\n};\n\nexport const Page = createStory<AppearanceProps>(Appearance, {\n\tstartTheme: darkTheme,\n\tdarkTheme,\n\tlightTheme,\n\tupdateThemes: () => {\n\t\t// console.log(`ID: ${id}, Theme: ${newValue}`);\n\t},\n\tareYouSure: (cb: () => void) => {\n\t\tcb();\n\t},\n\tbaseURL: \"\",\n\ttoolbarIcon: \"\",\n\ttaskbarIcon: \"\",\n\tinstallerIcon: \"\",\n\tsystemTrayIcon: \"\",\n\tsplashScreenImage: \"\",\n\tsetToolbarIcon: () => {},\n\tsetTaskbarIcon: () => {},\n\tsetInstallerIcon: () => {},\n\tsetSystemTrayIcon: () => {},\n\tsetSplashScreenImage: () => {},\n\tsetIconsChanged: () => {},\n\tupdateSplashScreen: uploadFunction,\n\tupdateToolbarIcon: uploadFunction,\n\tupdateTaskbarIcon: uploadFunction,\n\tupdateSystemTrayIcon: uploadFunction,\n\tupdateInstallerIcon: uploadFunction,\n});\n"]}
1
+ {"version":3,"file":"Appearance.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/Appearance.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAC;AAC5D,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG5D,eAAe;IACd,KAAK,EAAE,mCAAmC;IAC1C,SAAS,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAkB,UAAU,EAAE;IAC5D,UAAU,EAAE,SAAS;IACrB,SAAS;IACT,UAAU;IACV,WAAW,EAAE,CAAC,KAAkB,EAAE,EAAE,GAAE,CAAC;IACvC,YAAY,EAAE,GAAG,EAAE;IAEnB,CAAC;IACD,UAAU,EAAE,CAAC,EAAc,EAAE,EAAE;QAC9B,EAAE,EAAE,CAAC;IACN,CAAC;IACD,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,EAAE;IACrB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,gBAAgB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC1B,iBAAiB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC3B,oBAAoB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC9B,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,kBAAkB,EAAE,cAAc;IAClC,iBAAiB,EAAE,cAAc;IACjC,iBAAiB,EAAE,cAAc;IACjC,oBAAoB,EAAE,cAAc;IACpC,mBAAmB,EAAE,cAAc;CACnC,CAAC,CAAC","sourcesContent":["import { createStory, uploadFunction } from \"../../common/helpers\";\nimport { Appearance, AppearanceProps } from \"../Appearance\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { darkTheme, lightTheme } from \"../themeDefinitions\";\nimport { ThemeBundle } from \"../ThemePage\";\n\nexport default {\n\ttitle: \"Smart Desktop Designer/Appearance\",\n\tcomponent: Appearance,\n};\n\nexport const Page = createStory<AppearanceProps>(Appearance, {\n\tstartTheme: darkTheme,\n\tdarkTheme,\n\tlightTheme,\n\tupdateTheme: (theme: ThemeBundle) => {},\n\tupdateThemes: () => {\n\t\t// console.log(`ID: ${id}, Theme: ${newValue}`);\n\t},\n\tareYouSure: (cb: () => void) => {\n\t\tcb();\n\t},\n\tbaseURL: \"\",\n\ttoolbarIcon: \"\",\n\ttaskbarIcon: \"\",\n\tinstallerIcon: \"\",\n\tsystemTrayIcon: \"\",\n\tsplashScreenImage: \"\",\n\tsetToolbarIcon: () => {},\n\tsetTaskbarIcon: () => {},\n\tsetInstallerIcon: () => {},\n\tsetSystemTrayIcon: () => {},\n\tsetSplashScreenImage: () => {},\n\tsetIconsChanged: () => {},\n\tupdateSplashScreen: uploadFunction,\n\tupdateToolbarIcon: uploadFunction,\n\tupdateTaskbarIcon: uploadFunction,\n\tupdateSystemTrayIcon: uploadFunction,\n\tupdateInstallerIcon: uploadFunction,\n});\n"]}
@@ -5,7 +5,6 @@ import "../../common/css/styles.css";
5
5
  import { FinsembleProvider } from "../../FinsembleProvider";
6
6
  import React from "react";
7
7
  import { default_authentication_props } from "../fixtures/authenticationProps";
8
- import { AuthenticationType } from "../../../types/smartDesktopDesignerTypes";
9
8
  export default {
10
9
  title: "Views/Authentication",
11
10
  component: Authentication,
@@ -17,23 +16,10 @@ const Template = (args) => {
17
16
  };
18
17
  export const Page = Template.bind({});
19
18
  Page.args = Object.assign({}, default_authentication_props);
20
- const getAuthenticationProviders = () => new Promise((resolve) => {
21
- resolve([
22
- {
23
- name: "Custom",
24
- enabled: true,
25
- type: AuthenticationType.OAUTH2,
26
- client_id: "",
27
- secret: null,
28
- redirect_uri: "",
29
- nonce: false,
30
- },
31
- ]);
32
- });
33
19
  export const OneSelected = Template.bind({});
34
- OneSelected.args = Object.assign(Object.assign({}, default_authentication_props), { getAuthenticationProviders });
20
+ OneSelected.args = Object.assign({}, default_authentication_props);
35
21
  export const AuthError = Template.bind({});
36
- AuthError.args = Object.assign(Object.assign({}, default_authentication_props), { getAuthenticationProviders, testAuthenticationProvider: () => new Promise((resolve, reject) => {
22
+ AuthError.args = Object.assign(Object.assign({}, default_authentication_props), { testAuthenticationProvider: () => new Promise((resolve, reject) => {
37
23
  reject("Invalid auth config");
38
24
  }) });
39
25
  //# sourceMappingURL=Authentication.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Authentication.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/Authentication.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AACxE,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAA0B,MAAM,0CAA0C,CAAC;AAEtG,eAAe;IACd,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,cAAc;CACzB,CAAC;AAEF,MAAM,QAAQ,GAA+B,CAAC,IAAyB,EAAE,EAAE;IAC1E,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,OAAO,CACN,oBAAC,iBAAiB;QACjB,oBAAC,cAAc,oBAAK,IAAI,EAAI,CACT,CACpB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,qBAAQ,4BAA4B,CAAE,CAAC;AAEhD,MAAM,0BAA0B,GAAG,GAAsC,EAAE,CAC1E,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;IACvB,OAAO,CAAC;QACP;YACC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,kBAAkB,CAAC,MAAM;YAC/B,SAAS,EAAE,EAAE;YACb,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,EAAE;YAChB,KAAK,EAAE,KAAK;SACZ;KACD,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,mCACZ,4BAA4B,KAC/B,0BAA0B,GAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,mCACV,4BAA4B,KAC/B,0BAA0B,EAC1B,0BAA0B,EAAE,GAAG,EAAE,CAChC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC/B,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAC/B,CAAC,CAAC,GACH,CAAC","sourcesContent":["import { initFSBL } from \"../../common/helpers\";\nimport { Authentication, AuthenticationProps } from \"../Authentication\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { FinsembleProvider } from \"../../FinsembleProvider\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport React from \"react\";\nimport { default_authentication_props } from \"../fixtures/authenticationProps\";\nimport { AuthenticationType, AuthenticationProvider } from \"../../../types/smartDesktopDesignerTypes\";\n\nexport default {\n\ttitle: \"Views/Authentication\",\n\tcomponent: Authentication,\n};\n\nconst Template: Story<AuthenticationProps> = (args: AuthenticationProps) => {\n\tinitFSBL(window);\n\n\treturn (\n\t\t<FinsembleProvider>\n\t\t\t<Authentication {...args} />\n\t\t</FinsembleProvider>\n\t);\n};\n\nexport const Page = Template.bind({});\nPage.args = { ...default_authentication_props };\n\nconst getAuthenticationProviders = (): Promise<AuthenticationProvider[]> =>\n\tnew Promise((resolve) => {\n\t\tresolve([\n\t\t\t{\n\t\t\t\tname: \"Custom\",\n\t\t\t\tenabled: true,\n\t\t\t\ttype: AuthenticationType.OAUTH2,\n\t\t\t\tclient_id: \"\",\n\t\t\t\tsecret: null,\n\t\t\t\tredirect_uri: \"\",\n\t\t\t\tnonce: false,\n\t\t\t},\n\t\t]);\n\t});\n\nexport const OneSelected = Template.bind({});\nOneSelected.args = {\n\t...default_authentication_props,\n\tgetAuthenticationProviders,\n};\n\nexport const AuthError = Template.bind({});\nAuthError.args = {\n\t...default_authentication_props,\n\tgetAuthenticationProviders,\n\ttestAuthenticationProvider: () =>\n\t\tnew Promise((resolve, reject) => {\n\t\t\treject(\"Invalid auth config\");\n\t\t}),\n};\n"]}
1
+ {"version":3,"file":"Authentication.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/Authentication.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AACxE,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAE/E,eAAe;IACd,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,cAAc;CACzB,CAAC;AAEF,MAAM,QAAQ,GAA+B,CAAC,IAAyB,EAAE,EAAE;IAC1E,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,OAAO,CACN,oBAAC,iBAAiB;QACjB,oBAAC,cAAc,oBAAK,IAAI,EAAI,CACT,CACpB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,qBAAQ,4BAA4B,CAAE,CAAC;AAEhD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,qBACZ,4BAA4B,CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,mCACV,4BAA4B,KAC/B,0BAA0B,EAAE,GAAG,EAAE,CAChC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC/B,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAC/B,CAAC,CAAC,GACH,CAAC","sourcesContent":["import { initFSBL } from \"../../common/helpers\";\nimport { Authentication, AuthenticationProps } from \"../Authentication\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { FinsembleProvider } from \"../../FinsembleProvider\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport React from \"react\";\nimport { default_authentication_props } from \"../fixtures/authenticationProps\";\n\nexport default {\n\ttitle: \"Views/Authentication\",\n\tcomponent: Authentication,\n};\n\nconst Template: Story<AuthenticationProps> = (args: AuthenticationProps) => {\n\tinitFSBL(window);\n\n\treturn (\n\t\t<FinsembleProvider>\n\t\t\t<Authentication {...args} />\n\t\t</FinsembleProvider>\n\t);\n};\n\nexport const Page = Template.bind({});\nPage.args = { ...default_authentication_props };\n\nexport const OneSelected = Template.bind({});\nOneSelected.args = {\n\t...default_authentication_props,\n};\n\nexport const AuthError = Template.bind({});\nAuthError.args = {\n\t...default_authentication_props,\n\ttestAuthenticationProvider: () =>\n\t\tnew Promise((resolve, reject) => {\n\t\t\treject(\"Invalid auth config\");\n\t\t}),\n};\n"]}
@@ -23,5 +23,5 @@ Default.args.getApps = args.getApps;
23
23
  export const Empty = Template.bind({});
24
24
  Empty.args = getEmptyPreloadsArgs();
25
25
  const args2 = getApplicationsArgs("empty");
26
- Default.args.getApps = args2.getApps;
26
+ Empty.args.getApps = args2.getApps;
27
27
  //# sourceMappingURL=OptionalSettingsView.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OptionalSettingsView.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/OptionalSettingsView.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAA6B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AAGrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE7E,eAAe;IACd,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,oBAAoB;CAC/B,CAAC;AAEF,MAAM,QAAQ,GAAqC,CAAC,IAA+B,EAAE,EAAE;IACtF,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,OAAO,CACN,oBAAC,iBAAiB,IAAC,KAAK,EAAE,WAAW,EAAE;QACtC,oBAAC,oBAAoB,oBAAK,IAAI,EAAI,CACf,CACpB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG,eAAe,EAAE,CAAC;AAEjC,MAAM,IAAI,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;AAC5C,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;AAEpC,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,oBAAoB,EAAE,CAAC;AAEpC,MAAM,KAAK,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC3C,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC","sourcesContent":["import React from \"react\";\nimport { OptionalSettingsView, OptionalSettingsViewProps } from \"../OptionalSettingsView\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { Story } from \"@storybook/react/types-6-0\";\n\nimport { FinsembleProvider } from \"../../FinsembleProvider\";\nimport { initFSBL } from \"../../common/helpers\";\nimport { createStore } from \"../../../store\";\nimport { getApplicationsArgs } from \"../fixtures/apps\";\nimport { getPreloadsArgs, getEmptyPreloadsArgs } from \"../fixtures/preloads\";\n\nexport default {\n\ttitle: \"Views/OptionalSettingsView\",\n\tcomponent: OptionalSettingsView,\n};\n\nconst Template: Story<OptionalSettingsViewProps> = (args: OptionalSettingsViewProps) => {\n\tinitFSBL(window);\n\n\treturn (\n\t\t<FinsembleProvider store={createStore()}>\n\t\t\t<OptionalSettingsView {...args} />\n\t\t</FinsembleProvider>\n\t);\n};\n\nexport const Default = Template.bind({});\nDefault.args = getPreloadsArgs();\n\nconst args = getApplicationsArgs(\"default\");\nDefault.args.getApps = args.getApps;\n\nexport const Empty = Template.bind({});\nEmpty.args = getEmptyPreloadsArgs();\n\nconst args2 = getApplicationsArgs(\"empty\");\nDefault.args.getApps = args2.getApps;\n"]}
1
+ {"version":3,"file":"OptionalSettingsView.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/OptionalSettingsView.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAA6B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AAGrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE7E,eAAe;IACd,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,oBAAoB;CAC/B,CAAC;AAEF,MAAM,QAAQ,GAAqC,CAAC,IAA+B,EAAE,EAAE;IACtF,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,OAAO,CACN,oBAAC,iBAAiB,IAAC,KAAK,EAAE,WAAW,EAAE;QACtC,oBAAC,oBAAoB,oBAAK,IAAI,EAAI,CACf,CACpB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG,eAAe,EAAE,CAAC;AAEjC,MAAM,IAAI,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;AAC5C,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;AAEpC,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG,oBAAoB,EAAE,CAAC;AAEpC,MAAM,KAAK,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC3C,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC","sourcesContent":["import React from \"react\";\nimport { OptionalSettingsView, OptionalSettingsViewProps } from \"../OptionalSettingsView\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { Story } from \"@storybook/react/types-6-0\";\n\nimport { FinsembleProvider } from \"../../FinsembleProvider\";\nimport { initFSBL } from \"../../common/helpers\";\nimport { createStore } from \"../../../store\";\nimport { getApplicationsArgs } from \"../fixtures/apps\";\nimport { getPreloadsArgs, getEmptyPreloadsArgs } from \"../fixtures/preloads\";\n\nexport default {\n\ttitle: \"Views/OptionalSettingsView\",\n\tcomponent: OptionalSettingsView,\n};\n\nconst Template: Story<OptionalSettingsViewProps> = (args: OptionalSettingsViewProps) => {\n\tinitFSBL(window);\n\n\treturn (\n\t\t<FinsembleProvider store={createStore()}>\n\t\t\t<OptionalSettingsView {...args} />\n\t\t</FinsembleProvider>\n\t);\n};\n\nexport const Default = Template.bind({});\nDefault.args = getPreloadsArgs();\n\nconst args = getApplicationsArgs(\"default\");\nDefault.args.getApps = args.getApps;\n\nexport const Empty = Template.bind({});\nEmpty.args = getEmptyPreloadsArgs();\n\nconst args2 = getApplicationsArgs(\"empty\");\nEmpty.args.getApps = args2.getApps;\n"]}
@@ -4,7 +4,7 @@ import "../../../assets/css/finsemble.css";
4
4
  import "../../common/css/styles.css";
5
5
  declare const _default: {
6
6
  title: string;
7
- component: (props: SmartDesktopDesignerProps) => JSX.Element;
7
+ component: ({ views, getConfig, getTheme, resetProject, getSDServerInfo, getProjectSettings, updateProjectSettings, onThemeUpdated, selectProjectPath, restartFinsemble, setDefaults, }: SmartDesktopDesignerProps) => JSX.Element;
8
8
  };
9
9
  export default _default;
10
10
  export declare const DefaultSDD: import("@storybook/react").Story<SmartDesktopDesignerProps>;
@@ -5,6 +5,9 @@ import { createStory } from "../../common/helpers";
5
5
  import views from "../fixtures/views";
6
6
  const DEFAULT_PROPS = {
7
7
  views,
8
+ getTheme: () => new Promise((resolve) => {
9
+ resolve({ err: null, theme: {} });
10
+ }),
8
11
  getConfig: (params, callback) => new Promise(() => {
9
12
  callback(null, {
10
13
  finsemble: {
@@ -1 +1 @@
1
- {"version":3,"file":"SmartDesktopDesigner.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/SmartDesktopDesigner.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA6B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAKtC,MAAM,aAAa,GAAG;IACrB,KAAK;IACL,SAAS,EAAE,CAAC,MAAW,EAAE,QAAa,EAAE,EAAE,CACzC,IAAI,OAAO,CAAoC,GAAG,EAAE;QACnD,QAAQ,CAAC,IAAI,EAAE;YACd,SAAS,EAAE;gBACV,MAAM,EAAE;oBACP,WAAW,EAAE,MAAM;iBACnB;aACD;SACD,CAAC,CAAC;IACJ,CAAC,CAAC;IACH,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,CAAsB,GAAG,EAAE,GAAE,CAAC,CAAC;IAC9D,eAAe,EAAE,GAAG,EAAE,CACrB,IAAI,OAAO,CAAe,CAAC,OAAO,EAAE,EAAE;QACrC,OAAO,CAAC;YACP,OAAO,EAAE,IAAI;YACb,eAAe,EAAE,mBAAmB;YACpC,aAAa,EAAE,EAAE;SACD,CAAC,CAAC;IACpB,CAAC,CAAC;IACH,kBAAkB,EAAE,GAAG,EAAE,CACxB,IAAI,OAAO,CASR,CAAC,OAAO,EAAE,EAAE;QACd,OAAO,CAAC;YACP,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,0FAA0F;aAChG;YACD,GAAG,EAAE,IAAI;SACT,CAAC,CAAC;IACJ,CAAC,CAAC;IACH,qBAAqB,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,CAAe,GAAG,EAAE,GAAE,CAAC,CAAC;IAChE,cAAc,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC;IAC9B,iBAAiB,EAAE,GAAG,EAAE,CACvB,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;QAC/B,OAAO,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC;IACH,gBAAgB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC1B,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,CAAM,GAAG,EAAE,GAAE,CAAC,CAAC;CAC7C,CAAC;AAEF,eAAe;IACd,KAAK,EAAE,mCAAmC;IAC1C,SAAS,EAAE,oBAAoB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA4B,oBAAoB,oBAAO,aAAa,EAAG,CAAC","sourcesContent":["import { SmartDesktopDesigner, SmartDesktopDesignerProps } from \"../SmartDesktopDesigner\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { createStory } from \"../../common/helpers\";\nimport views from \"../fixtures/views\";\nimport { FEA } from \"@finsemble/finsemble-api\";\n\ntype SDServerInfo = FEA.SDServerInfo;\n\nconst DEFAULT_PROPS = {\n\tviews,\n\tgetConfig: (params: any, callback: any) =>\n\t\tnew Promise<{ data: any; err: string | null }>(() => {\n\t\t\tcallback(null, {\n\t\t\t\tfinsemble: {\n\t\t\t\t\tsystem: {\n\t\t\t\t\t\tFSBLVersion: \"test\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}),\n\tresetProject: () => new Promise<[Error | null, any]>(() => {}),\n\tgetSDServerInfo: () =>\n\t\tnew Promise<SDServerInfo>((resolve) => {\n\t\t\tresolve({\n\t\t\t\tenabled: true,\n\t\t\t\tapplicationRoot: \"http://localhost/\",\n\t\t\t\tprojectConfig: {},\n\t\t\t} as SDServerInfo);\n\t\t}),\n\tgetProjectSettings: () =>\n\t\tnew Promise<{\n\t\t\tsettings: {\n\t\t\t\tname: string;\n\t\t\t\tpath?: string;\n\t\t\t\tversion?: string;\n\t\t\t\tauthors?: string;\n\t\t\t\tdescription?: string;\n\t\t\t};\n\t\t\terr: any;\n\t\t}>((resolve) => {\n\t\t\tresolve({\n\t\t\t\tsettings: {\n\t\t\t\t\tname: \"default\",\n\t\t\t\t\tpath: \"/Users/administrator/Library/Application Support/Electron/smartDesktops/projects/default\",\n\t\t\t\t},\n\t\t\t\terr: null,\n\t\t\t});\n\t\t}),\n\tupdateProjectSettings: () => new Promise<{ err: any }>(() => {}),\n\tonThemeUpdated: () => () => {},\n\tselectProjectPath: () =>\n\t\tnew Promise<string>((resolve) => {\n\t\t\tresolve(\"/tmp\");\n\t\t}),\n\trestartFinsemble: () => {},\n\tsetDefaults: () => new Promise<any>(() => {}),\n};\n\nexport default {\n\ttitle: \"Components/Smart Desktop Designer\",\n\tcomponent: SmartDesktopDesigner,\n};\n\nexport const DefaultSDD = createStory<SmartDesktopDesignerProps>(SmartDesktopDesigner, { ...DEFAULT_PROPS });\n"]}
1
+ {"version":3,"file":"SmartDesktopDesigner.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/SmartDesktopDesigner.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA6B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAKtC,MAAM,aAAa,GAAG;IACrB,KAAK;IACL,QAAQ,EAAE,GAAG,EAAE,CACd,IAAI,OAAO,CAA+C,CAA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AI,OAAO,CAAM,GAAG,EAAE,GAAE,CAAC,CAAC;CAC7C,CAAC;AAEF,eAAe;IACd,KAAK,EAAE,mCAAmC;IAC1C,SAAS,EAAE,oBAAoB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA4B,oBAAoB,oBAAO,aAAa,EAAG,CAAC","sourcesContent":["import { SmartDesktopDesigner, SmartDesktopDesignerProps } from \"../SmartDesktopDesigner\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { createStory } from \"../../common/helpers\";\nimport views from \"../fixtures/views\";\nimport { FEA } from \"@finsemble/finsemble-api\";\n\ntype SDServerInfo = FEA.SDServerInfo;\n\nconst DEFAULT_PROPS = {\n\tviews,\n\tgetTheme: () =>\n\t\tnew Promise<{ err: any; theme?: Record<string, string> }>((resolve) => {\n\t\t\tresolve({ err: null, theme: {} });\n\t\t}),\n\tgetConfig: (params: any, callback: any) =>\n\t\tnew Promise<{ data: any; err: string | null }>(() => {\n\t\t\tcallback(null, {\n\t\t\t\tfinsemble: {\n\t\t\t\t\tsystem: {\n\t\t\t\t\t\tFSBLVersion: \"test\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}),\n\tresetProject: () => new Promise<[Error | null, any]>(() => {}),\n\tgetSDServerInfo: () =>\n\t\tnew Promise<SDServerInfo>((resolve) => {\n\t\t\tresolve({\n\t\t\t\tenabled: true,\n\t\t\t\tapplicationRoot: \"http://localhost/\",\n\t\t\t\tprojectConfig: {},\n\t\t\t} as SDServerInfo);\n\t\t}),\n\tgetProjectSettings: () =>\n\t\tnew Promise<{\n\t\t\tsettings: {\n\t\t\t\tname: string;\n\t\t\t\tpath?: string;\n\t\t\t\tversion?: string;\n\t\t\t\tauthors?: string;\n\t\t\t\tdescription?: string;\n\t\t\t};\n\t\t\terr: any;\n\t\t}>((resolve) => {\n\t\t\tresolve({\n\t\t\t\tsettings: {\n\t\t\t\t\tname: \"default\",\n\t\t\t\t\tpath: \"/Users/administrator/Library/Application Support/Electron/smartDesktops/projects/default\",\n\t\t\t\t},\n\t\t\t\terr: null,\n\t\t\t});\n\t\t}),\n\tupdateProjectSettings: () => new Promise<{ err: any }>(() => {}),\n\tonThemeUpdated: () => () => {},\n\tselectProjectPath: () =>\n\t\tnew Promise<string>((resolve) => {\n\t\t\tresolve(\"/tmp\");\n\t\t}),\n\trestartFinsemble: () => {},\n\tsetDefaults: () => new Promise<any>(() => {}),\n};\n\nexport default {\n\ttitle: \"Components/Smart Desktop Designer\",\n\tcomponent: SmartDesktopDesigner,\n};\n\nexport const DefaultSDD = createStory<SmartDesktopDesignerProps>(SmartDesktopDesigner, { ...DEFAULT_PROPS });\n"]}
@@ -4,7 +4,7 @@ import "../../../assets/css/finsemble.css";
4
4
  import "../../common/css/styles.css";
5
5
  declare const _default: {
6
6
  title: string;
7
- component: ({ getSDServerInfo, updateProjectSettings, areYouSure, updateThemes, updateSplashScreen, updateToolbarIcon, updateTaskbarIcon, updateSystemTrayIcon, updateInstallerIcon, theme, }: ThemeProps) => JSX.Element;
7
+ component: ({ getSDServerInfo, updateProjectSettings, areYouSure, updateTheme, updateThemes, updateSplashScreen, updateToolbarIcon, updateTaskbarIcon, updateSystemTrayIcon, updateInstallerIcon, theme, }: ThemeProps) => JSX.Element;
8
8
  };
9
9
  export default _default;
10
10
  export declare const Page: import("@storybook/react").Story<ThemeProps>;
@@ -42,6 +42,7 @@ export const Page = createStory(Themes, {
42
42
  areYouSure: (cb) => {
43
43
  cb();
44
44
  },
45
+ updateTheme: () => { },
45
46
  updateThemes: action("updateTheme"),
46
47
  theme: {
47
48
  themes: {
@@ -1 +1 @@
1
- {"version":3,"file":"Themes.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/Themes.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,WAAW,CAAC;AAC/C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;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C;IACD,YAAY,EAAE,MAAM,CAAC,aAAa,CAAC;IACnC,KAAK,EAAE;QACN,MAAM,EAAE;YACP,OAAO,EAAE,SAAS;SAClB;KACD;CACD,CAAC,CAAC","sourcesContent":["import { Themes, ThemeProps } from \"../Themes\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { action } from \"@storybook/addon-actions\";\nimport { darkTheme } from \"../themeDefinitions\";\nimport { createStory } from \"../../common/helpers\";\n\nexport default {\n\ttitle: \"Views/Themes\",\n\tcomponent: Themes,\n};\n\nexport const Page = createStory<ThemeProps>(Themes, {\n\tgetSDServerInfo: (cb: Function) => {\n\t\tcb({\n\t\t\tapplicationRoot: \"\",\n\t\t\tname: \"\",\n\t\t\tuser: {\n\t\t\t\tfirstName: \"\",\n\t\t\t\tlastName: \"\",\n\t\t\t\tcompany: \"\",\n\t\t\t\temail: \"\",\n\t\t\t},\n\t\t\texport: {\n\t\t\t\tauthor: \"\",\n\t\t\t\tcompanyName: \"\",\n\t\t\t\tdescription: \"\",\n\t\t\t\ttoolbarIcon: \"\",\n\t\t\t\tinstallerIcon: \"\",\n\t\t\t\ttaskbarIcon: \"\",\n\t\t\t\tsystemTrayIcon: \"\",\n\t\t\t\tsplashScreenImage: \"\",\n\t\t\t},\n\t\t});\n\t},\n\tupdateProjectSettings: () =>\n\t\tnew Promise((resolve) => {\n\t\t\tresolve({ err: undefined });\n\t\t}),\n\tupdateSplashScreen: action(\"updateSplashScreen\"),\n\tupdateToolbarIcon: action(\"updateToolbarIcon\"),\n\tupdateTaskbarIcon: action(\"updateTaskbarIcon\"),\n\tupdateSystemTrayIcon: action(\"updateSystemTrayIcon\"),\n\tupdateInstallerIcon: action(\"updateInstallerIcon\"),\n\tareYouSure: (cb: Function) => {\n\t\tcb();\n\t},\n\tupdateThemes: action(\"updateTheme\"),\n\ttheme: {\n\t\tthemes: {\n\t\t\tDefault: darkTheme,\n\t\t},\n\t},\n});\n"]}
1
+ {"version":3,"file":"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AAC;IAC9C,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,UAAU,EAAE,CAAC,EAAY,EAAE,EAAE;QAC5B,EAAE,EAAE,CAAC;IACN,CAAC;IACD,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC,aAAa,CAAC;IACnC,KAAK,EAAE;QACN,MAAM,EAAE;YACP,OAAO,EAAE,SAAS;SAClB;KACD;CACD,CAAC,CAAC","sourcesContent":["import { Themes, ThemeProps } from \"../Themes\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { action } from \"@storybook/addon-actions\";\nimport { darkTheme } from \"../themeDefinitions\";\nimport { createStory } from \"../../common/helpers\";\n\nexport default {\n\ttitle: \"Views/Themes\",\n\tcomponent: Themes,\n};\n\nexport const Page = createStory<ThemeProps>(Themes, {\n\tgetSDServerInfo: (cb: Function) => {\n\t\tcb({\n\t\t\tapplicationRoot: \"\",\n\t\t\tname: \"\",\n\t\t\tuser: {\n\t\t\t\tfirstName: \"\",\n\t\t\t\tlastName: \"\",\n\t\t\t\tcompany: \"\",\n\t\t\t\temail: \"\",\n\t\t\t},\n\t\t\texport: {\n\t\t\t\tauthor: \"\",\n\t\t\t\tcompanyName: \"\",\n\t\t\t\tdescription: \"\",\n\t\t\t\ttoolbarIcon: \"\",\n\t\t\t\tinstallerIcon: \"\",\n\t\t\t\ttaskbarIcon: \"\",\n\t\t\t\tsystemTrayIcon: \"\",\n\t\t\t\tsplashScreenImage: \"\",\n\t\t\t},\n\t\t});\n\t},\n\tupdateProjectSettings: () =>\n\t\tnew Promise((resolve) => {\n\t\t\tresolve({ err: undefined });\n\t\t}),\n\tupdateSplashScreen: action(\"updateSplashScreen\"),\n\tupdateToolbarIcon: action(\"updateToolbarIcon\"),\n\tupdateTaskbarIcon: action(\"updateTaskbarIcon\"),\n\tupdateSystemTrayIcon: action(\"updateSystemTrayIcon\"),\n\tupdateInstallerIcon: action(\"updateInstallerIcon\"),\n\tareYouSure: (cb: Function) => {\n\t\tcb();\n\t},\n\tupdateTheme: () => {},\n\tupdateThemes: action(\"updateTheme\"),\n\ttheme: {\n\t\tthemes: {\n\t\t\tDefault: darkTheme,\n\t\t},\n\t},\n});\n"]}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,96 @@
1
+ import * as React from "react";
2
+ import { mount } from "enzyme";
3
+ import { afterEach, describe, it } from "mocha";
4
+ import { expect } from "chai";
5
+ import { Page } from "../stories/AddApp.stories";
6
+ import { accessibilityAssessor } from "./a11y_helper";
7
+ import { waitTick } from "../sdd_helpers";
8
+ import sinon from "sinon";
9
+ import addons, { mockChannel } from "@storybook/addons";
10
+ addons.setChannel(mockChannel());
11
+ const QUICK_ADD_APP_URL = ".quick-add-app #app-url", QUICK_ADD_APP_BUTTON = ".save-button-container button", SECTION_TOGGLE_BUTTON = ".finsembleToggle [role='radio']", FILE_INPUT_BUTTON = ".file-input-container [type='file']", WEB_APP_NAME = "#url-app-name", NATIVE_APP_NAME = "#path-app-name", CITRIX_ALIAS = "#app-citrix", CITRIX_DISPLAY_NAME = "#citrix-display-name";
12
+ describe("<AddApp/>", () => {
13
+ afterEach(() => {
14
+ sinon.restore();
15
+ });
16
+ it("should pass accessibility scans", async () => {
17
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
18
+ expect(await accessibilityAssessor(wrapper)).to.be.true;
19
+ });
20
+ it("should add a web app", async () => {
21
+ const functionSpy = sinon.spy(Page.args, "addAppByUrl");
22
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
23
+ wrapper.find(QUICK_ADD_APP_URL).simulate("change", {
24
+ target: {
25
+ value: "http://www.facebook.com",
26
+ },
27
+ });
28
+ wrapper.find(QUICK_ADD_APP_BUTTON).simulate("click");
29
+ await waitTick();
30
+ wrapper.update();
31
+ expect(functionSpy.calledOnce).to.be.true;
32
+ expect(functionSpy.args[0]).to.deep.equal(["http://www.facebook.com", "Facebook"]);
33
+ });
34
+ it("if you add a URL, the App name should pre-fill with a generated name", async () => {
35
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
36
+ wrapper.find(QUICK_ADD_APP_URL).simulate("change", {
37
+ target: {
38
+ value: "http://www.google.com",
39
+ },
40
+ });
41
+ expect(wrapper.find("#url-app-name").prop("value"), "Pre-filled generated name").to.equal("Google");
42
+ expect(wrapper.find(QUICK_ADD_APP_BUTTON).prop("disabled"), "Save button should be enabled").to.be.false;
43
+ });
44
+ it("if you add a URL without an auto-name, the App name should be empty", async () => {
45
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
46
+ wrapper.find(QUICK_ADD_APP_URL).simulate("change", {
47
+ target: {
48
+ value: "http://www.cnn.com",
49
+ },
50
+ });
51
+ expect(wrapper.find("#url-app-name").prop("value"), "Pre-filled generated name").to.equal("");
52
+ expect(wrapper.find(QUICK_ADD_APP_BUTTON).prop("disabled"), "Save button should be disabled").to.be.true;
53
+ });
54
+ it('Toggling "Path" should display the Path\'s section', async () => {
55
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
56
+ wrapper.find(SECTION_TOGGLE_BUTTON).at(1).simulate("click");
57
+ expect(wrapper.find(FILE_INPUT_BUTTON).exists(), "File input button is present").to.be.true;
58
+ expect(wrapper.find(NATIVE_APP_NAME).exists(), "App name field for path is present").to.be.true;
59
+ });
60
+ it('Toggling "Web" should display the Web\'s section', async () => {
61
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
62
+ wrapper.find(SECTION_TOGGLE_BUTTON).at(0).simulate("click");
63
+ expect(wrapper.find(QUICK_ADD_APP_URL).exists(), "URL field is present").to.be.true;
64
+ expect(wrapper.find(WEB_APP_NAME).exists(), "App name field for web is present").to.be.true;
65
+ });
66
+ it('Toggling "Citrix" should display the Citrix\'s section', async () => {
67
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
68
+ wrapper.find(SECTION_TOGGLE_BUTTON).at(2).simulate("click");
69
+ expect(wrapper.find(CITRIX_ALIAS).exists(), "Citrix alias field is present").to.be.true;
70
+ expect(wrapper.find(CITRIX_DISPLAY_NAME).exists(), "Citrix display name field is present").to.be.true;
71
+ });
72
+ it("App names should not be shared between sections", async () => {
73
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
74
+ wrapper.find(WEB_APP_NAME).simulate("change", {
75
+ target: {
76
+ value: "New name",
77
+ },
78
+ });
79
+ wrapper.find(SECTION_TOGGLE_BUTTON).at(1).simulate("click");
80
+ expect(wrapper.find(NATIVE_APP_NAME).prop("value")).to.be.empty;
81
+ });
82
+ it("Save button enabled state should be specific to visible section", async () => {
83
+ const wrapper = mount(React.createElement(Page, Object.assign({}, Page.args)));
84
+ wrapper.find(QUICK_ADD_APP_URL).simulate("change", {
85
+ target: {
86
+ value: "http://www.facebook.com",
87
+ },
88
+ });
89
+ expect(wrapper.find(QUICK_ADD_APP_BUTTON).prop("disabled")).to.be.false;
90
+ wrapper.find(SECTION_TOGGLE_BUTTON).at(1).simulate("click");
91
+ expect(wrapper.find(QUICK_ADD_APP_BUTTON).prop("disabled")).to.be.true;
92
+ wrapper.find(SECTION_TOGGLE_BUTTON).at(0).simulate("click");
93
+ expect(wrapper.find(QUICK_ADD_APP_BUTTON).prop("disabled")).to.be.false;
94
+ });
95
+ });
96
+ //# sourceMappingURL=AddApp.spec.js.map