@interopio/home-ui-react 1.4.2 → 2.0.0

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 (274) hide show
  1. package/LICENSE +21 -0
  2. package/{README.md → dist/README.md} +56 -56
  3. package/dist/common/sequelizer.d.ts +7 -0
  4. package/dist/common/types.d.ts +27 -0
  5. package/dist/common/utils.d.ts +2 -0
  6. package/dist/constants/alerts.d.ts +8 -0
  7. package/{constants → dist/constants}/defaults.d.ts +0 -1
  8. package/dist/constants/dialogs.d.ts +5 -0
  9. package/{constants → dist/constants}/itemTypes.d.ts +1 -0
  10. package/dist/constants/platformPrefs.d.ts +15 -0
  11. package/dist/constants/regex.d.ts +1 -0
  12. package/dist/constants/sections.d.ts +5 -0
  13. package/{constants → dist/constants}/storageKeys.d.ts +1 -2
  14. package/{decoders → dist/decoders}/base.d.ts +2 -1
  15. package/dist/decoders/config.d.ts +3 -0
  16. package/dist/decoders/layouts.d.ts +3 -0
  17. package/{decoders → dist/decoders}/platform.d.ts +3 -3
  18. package/dist/decoders/user.d.ts +3 -0
  19. package/dist/decoders/validation.d.ts +3 -0
  20. package/{executors → dist/executors}/applicationActions.d.ts +1 -1
  21. package/{executors → dist/executors}/layoutActions.d.ts +1 -1
  22. package/dist/executors/setupStepsActions.d.ts +3 -0
  23. package/dist/executors/types.d.ts +33 -0
  24. package/{executors → dist/executors}/workspaceActions.d.ts +1 -1
  25. package/{helpers → dist/helpers}/a11y.d.ts +0 -16
  26. package/dist/helpers/alerts.d.ts +9 -0
  27. package/{helpers → dist/helpers}/sort.d.ts +4 -4
  28. package/dist/hooks/index.d.ts +28 -0
  29. package/dist/hooks/useApplications.d.ts +2 -0
  30. package/{hooks → dist/hooks}/useExecuteApplicationAction.d.ts +1 -1
  31. package/dist/hooks/useExecuteLayoutAction.d.ts +5 -0
  32. package/{hooks → dist/hooks}/useExecuteWorkspaceAction.d.ts +1 -1
  33. package/dist/hooks/useFavorites.d.ts +8 -0
  34. package/dist/hooks/useFrameId.d.ts +1 -0
  35. package/{hooks → dist/hooks}/useInvokeInteropMethod.d.ts +1 -1
  36. package/dist/hooks/useIsLaunchpadPinned.d.ts +8 -0
  37. package/dist/hooks/useIsRunningInDesktopContainer.d.ts +1 -0
  38. package/dist/hooks/useLayouts.d.ts +5 -0
  39. package/{hooks → dist/hooks}/useNotifications.d.ts +1 -1
  40. package/dist/hooks/useNotificationsConfiguration.d.ts +3 -0
  41. package/dist/hooks/useOnIframeFocus.d.ts +6 -0
  42. package/dist/hooks/useOnOutsideClick.d.ts +9 -0
  43. package/{hooks → dist/hooks}/usePlatformWindow.d.ts +1 -1
  44. package/{hooks → dist/hooks}/useRestoreLayout.d.ts +1 -1
  45. package/{hooks → dist/hooks}/useRestoreWorkspace.d.ts +1 -2
  46. package/{hooks → dist/hooks}/useSearch.d.ts +1 -1
  47. package/dist/hooks/useStartApplication.d.ts +7 -0
  48. package/{hooks → dist/hooks}/useStorage.d.ts +2 -2
  49. package/dist/hooks/useUA.d.ts +2 -0
  50. package/dist/hooks/useWorkspaces.d.ts +2 -0
  51. package/dist/index.css +1 -0
  52. package/dist/index.d.ts +21 -0
  53. package/dist/index.js +61 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/index.mjs +14513 -0
  56. package/dist/index.mjs.map +1 -0
  57. package/{lib → dist/lib}/applications-section/applications-section.d.ts +1 -1
  58. package/dist/lib/applications-section/helpers.d.ts +5 -0
  59. package/dist/lib/applications-section/types.d.ts +9 -0
  60. package/{lib → dist/lib}/base-section/base-section-header.d.ts +2 -4
  61. package/dist/lib/base-section/base-section-item.d.ts +14 -0
  62. package/{lib → dist/lib}/base-section/base-section.d.ts +3 -3
  63. package/{lib → dist/lib}/base-section/helpers.d.ts +1 -1
  64. package/dist/lib/base-section/types.d.ts +20 -0
  65. package/dist/lib/base-section/useCollapsedSections.d.ts +4 -0
  66. package/dist/lib/context-menu/constants.d.ts +11 -0
  67. package/dist/lib/context-menu/context-menu.d.ts +11 -0
  68. package/dist/lib/context-menu/dropdown-button/dropdown-button.d.ts +20 -0
  69. package/{lib → dist/lib}/context-menu/types.d.ts +5 -1
  70. package/dist/lib/default-header-system-buttons/constants.d.ts +2 -0
  71. package/dist/lib/default-header-system-buttons/default-header-system-buttons.d.ts +2 -0
  72. package/dist/lib/default-header-system-buttons/default-header-system-menu.d.ts +2 -0
  73. package/{lib → dist/lib}/favorites-section/favorites-section.d.ts +1 -1
  74. package/dist/lib/favorites-section/helpers.d.ts +3 -0
  75. package/dist/lib/home-app-workspace/after-tabs.d.ts +3 -0
  76. package/dist/lib/home-app-workspace/constants.d.ts +2 -0
  77. package/{lib → dist/lib}/home-app-workspace/group-header-buttons.d.ts +1 -1
  78. package/dist/lib/home-app-workspace/home-app-workspace.d.ts +13 -0
  79. package/dist/lib/home-app-workspace/index.d.ts +1 -0
  80. package/dist/lib/home-app-workspace/launchpad-access.d.ts +7 -0
  81. package/{lib → dist/lib}/home-app-workspace/workspace-components-context.d.ts +3 -4
  82. package/dist/lib/icon-components/index.d.ts +4 -0
  83. package/dist/lib/icon-components/platform-setup/index.d.ts +4 -0
  84. package/{lib → dist/lib}/io-connect-home/auth0-login-home.d.ts +1 -1
  85. package/{lib → dist/lib}/io-connect-home/home-app.d.ts +1 -1
  86. package/{lib → dist/lib}/io-connect-home/io-connect-home.d.ts +1 -1
  87. package/{lib → dist/lib}/io-connect-home/no-login-home.d.ts +1 -1
  88. package/{lib → dist/lib}/io-connect-home/simple-login-home.d.ts +1 -1
  89. package/{lib → dist/lib}/io-connect-home/types.d.ts +54 -18
  90. package/{lib → dist/lib}/io-connect-home/useUser.d.ts +1 -1
  91. package/{lib → dist/lib}/io-connect-home-provider/helpers.d.ts +1 -1
  92. package/{lib → dist/lib}/io-connect-home-provider/io-connect-home-provider.d.ts +1 -1
  93. package/{lib → dist/lib}/io-connect-home-provider/types.d.ts +2 -2
  94. package/{lib/io-connect-browser-start-failed/io-connect-browser-start-failed.d.ts → dist/lib/io-init-error-screen/io-init-error-screen.d.ts} +1 -1
  95. package/dist/lib/launchpad/constants.d.ts +2 -0
  96. package/dist/lib/launchpad/helpers.d.ts +4 -0
  97. package/dist/lib/launchpad/launchpad-header.d.ts +7 -0
  98. package/dist/lib/launchpad/launchpad-pin-button.d.ts +5 -0
  99. package/dist/lib/launchpad/launchpad.context.d.ts +19 -0
  100. package/dist/lib/launchpad/launchpad.d.ts +11 -0
  101. package/dist/lib/launchpad/useIsLaunchpadCollapsed.d.ts +9 -0
  102. package/dist/lib/layouts-panel/active-layout.d.ts +2 -0
  103. package/dist/lib/layouts-panel/all-layouts.d.ts +2 -0
  104. package/dist/lib/layouts-panel/constants.d.ts +8 -0
  105. package/dist/lib/layouts-panel/create-layout-button.d.ts +2 -0
  106. package/dist/lib/layouts-panel/helpers.d.ts +3 -0
  107. package/dist/lib/layouts-panel/layouts-dropdown.d.ts +6 -0
  108. package/dist/lib/layouts-panel/layouts-list.d.ts +6 -0
  109. package/dist/lib/layouts-panel/save-layout-button.d.ts +5 -0
  110. package/dist/lib/layouts-panel/types.d.ts +8 -0
  111. package/dist/lib/layouts-panel/useIsLayoutsPanelOpen.d.ts +9 -0
  112. package/{lib → dist/lib}/login/auth0/auth0-login-page.d.ts +1 -2
  113. package/dist/lib/login/index.d.ts +3 -0
  114. package/dist/lib/login/login-heading.d.ts +1 -0
  115. package/{lib → dist/lib}/login/simple/reducers.d.ts +1 -1
  116. package/{lib → dist/lib}/login/simple/simple-login-form.d.ts +2 -2
  117. package/{lib → dist/lib}/login/simple/simple-login-page.d.ts +1 -1
  118. package/{lib → dist/lib}/login/types.d.ts +1 -5
  119. package/dist/lib/notifications-icon/notifications-badge.d.ts +2 -0
  120. package/{lib/notifications-panel → dist/lib/notifications-icon}/notifications-icon.d.ts +1 -1
  121. package/dist/lib/notifications-panels/notification-settings-panel.d.ts +9 -0
  122. package/dist/lib/notifications-panels/notifications-panel.d.ts +10 -0
  123. package/dist/lib/panels/launchpad/launchpad-button.d.ts +6 -0
  124. package/dist/lib/panels/launchpad/launchpad-panel.d.ts +2 -0
  125. package/dist/lib/panels/panel-with-toggle-button.d.ts +12 -0
  126. package/dist/lib/panels/panel-wrapper.d.ts +11 -0
  127. package/dist/lib/panels/types.d.ts +9 -0
  128. package/{lib → dist/lib}/platform-setup/constants.d.ts +1 -1
  129. package/{lib → dist/lib}/platform-setup/reducers.d.ts +2 -2
  130. package/{lib → dist/lib}/platform-setup/setup-steps-list.d.ts +1 -1
  131. package/{lib → dist/lib}/platform-setup/types.d.ts +4 -4
  132. package/dist/lib/profile-panel/profile-panel.d.ts +9 -0
  133. package/{lib → dist/lib}/search/search-bar/search-bar.d.ts +1 -0
  134. package/dist/lib/search/search-results-section/search-results-section.d.ts +5 -0
  135. package/{lib → dist/lib}/search/search-results-section/types.d.ts +3 -3
  136. package/dist/lib/search/search-results-section/useExecuteLayoutSearchResultAction.d.ts +2 -0
  137. package/dist/lib/search/search-results-section/useGenerateLayoutFromId.d.ts +2 -0
  138. package/dist/lib/search/search-results-section/useGetActionExecutor.d.ts +1 -0
  139. package/dist/lib/search/search-results-section/useSearchResultsSectionConfigs.d.ts +3 -0
  140. package/{lib → dist/lib}/section/helpers.d.ts +2 -2
  141. package/{lib → dist/lib}/section/section.d.ts +1 -1
  142. package/{lib → dist/lib}/section/types.d.ts +1 -1
  143. package/dist/lib/spinner/index.d.ts +1 -0
  144. package/dist/lib/system-menu/helpers.d.ts +3 -0
  145. package/dist/lib/system-menu/system-menu.d.ts +6 -0
  146. package/dist/lib/system-menu/types.d.ts +9 -0
  147. package/dist/lib/workspaces-section/constants.d.ts +3 -0
  148. package/{lib → dist/lib}/workspaces-section/helpers.d.ts +3 -3
  149. package/{lib → dist/lib}/workspaces-section/workspaces-section.d.ts +1 -1
  150. package/package.json +59 -41
  151. package/assets/fonts/nunito-regular-webfont.woff +0 -0
  152. package/assets/fonts/nunito-regular-webfont.woff2 +0 -0
  153. package/assets/fonts/nunito-semibold-webfont.woff +0 -0
  154. package/assets/fonts/nunito-semibold-webfont.woff2 +0 -0
  155. package/assets/io-connect-browser-logo.json +0 -5
  156. package/common/types.d.ts +0 -10
  157. package/decoders/config.d.ts +0 -3
  158. package/decoders/context-menu.d.ts +0 -3
  159. package/decoders/favorites.d.ts +0 -3
  160. package/decoders/layouts.d.ts +0 -3
  161. package/decoders/user.d.ts +0 -3
  162. package/decoders/validation.d.ts +0 -3
  163. package/executors/notificationsSort.d.ts +0 -7
  164. package/executors/setupStepsActions.d.ts +0 -3
  165. package/executors/types.d.ts +0 -26
  166. package/helpers/date.d.ts +0 -1
  167. package/helpers/string.d.ts +0 -1
  168. package/hooks/index.d.ts +0 -24
  169. package/hooks/useApplications.d.ts +0 -2
  170. package/hooks/useExecuteLayoutAction.d.ts +0 -2
  171. package/hooks/useFavoriteEntities.d.ts +0 -7
  172. package/hooks/useFrame.d.ts +0 -2
  173. package/hooks/useIsBrowserSupported.d.ts +0 -1
  174. package/hooks/useLayouts.d.ts +0 -2
  175. package/hooks/useNotificationsSort.d.ts +0 -5
  176. package/hooks/useStartApplication.d.ts +0 -4
  177. package/hooks/useUA.d.ts +0 -2
  178. package/hooks/useWorkspaces.d.ts +0 -2
  179. package/index.css +0 -1
  180. package/index.d.ts +0 -37
  181. package/index.js +0 -54
  182. package/index.js.map +0 -1
  183. package/index.mjs +0 -8638
  184. package/index.mjs.map +0 -1
  185. package/lib/applications-section/helpers.d.ts +0 -6
  186. package/lib/applications-section/types.d.ts +0 -4
  187. package/lib/base-section/base-section-item.d.ts +0 -13
  188. package/lib/base-section/types.d.ts +0 -29
  189. package/lib/browser-not-supported/additional-information.d.ts +0 -5
  190. package/lib/browser-not-supported/browser-not-supported.d.ts +0 -11
  191. package/lib/browser-not-supported/constants.d.ts +0 -6
  192. package/lib/button/button.d.ts +0 -7
  193. package/lib/button-group/button-group.d.ts +0 -8
  194. package/lib/context-menu/constants.d.ts +0 -3
  195. package/lib/context-menu/context-menu.d.ts +0 -10
  196. package/lib/context-menu/dropdown-button/dropdown-button.d.ts +0 -11
  197. package/lib/dialog/dialog.d.ts +0 -8
  198. package/lib/favorites-section/helpers.d.ts +0 -3
  199. package/lib/home-app-workspace/after-tabs.d.ts +0 -3
  200. package/lib/home-app-workspace/home-app-workspace.d.ts +0 -14
  201. package/lib/home-app-workspace/index.d.ts +0 -2
  202. package/lib/home-app-workspace/launchpad-access.d.ts +0 -6
  203. package/lib/home-app-workspace/workspace-logo.d.ts +0 -10
  204. package/lib/icon/icon.d.ts +0 -9
  205. package/lib/icon-components/google-chrome-icon.d.ts +0 -2
  206. package/lib/icon-components/index.d.ts +0 -7
  207. package/lib/icon-components/microsoft-edge-icon.d.ts +0 -2
  208. package/lib/icon-components/opera-icon.d.ts +0 -2
  209. package/lib/icon-components/platform-setup/index.d.ts +0 -4
  210. package/lib/img-icon/img-icon.d.ts +0 -8
  211. package/lib/launchpad/default-sections.d.ts +0 -2
  212. package/lib/launchpad/helpers.d.ts +0 -3
  213. package/lib/launchpad/launchpad.context.d.ts +0 -19
  214. package/lib/launchpad/launchpad.d.ts +0 -12
  215. package/lib/launchpad/types.d.ts +0 -16
  216. package/lib/layouts-panel/available-layouts.d.ts +0 -6
  217. package/lib/layouts-panel/constants.d.ts +0 -6
  218. package/lib/layouts-panel/helpers.d.ts +0 -4
  219. package/lib/layouts-panel/layout-actions.d.ts +0 -9
  220. package/lib/layouts-panel/layouts-notification.d.ts +0 -6
  221. package/lib/layouts-panel/types.d.ts +0 -20
  222. package/lib/login/index.d.ts +0 -4
  223. package/lib/login/login-heading.d.ts +0 -5
  224. package/lib/login/login-loader.d.ts +0 -5
  225. package/lib/logo/logo.d.ts +0 -2
  226. package/lib/notifications-panel/constants.d.ts +0 -9
  227. package/lib/notifications-panel/index.d.ts +0 -4
  228. package/lib/notifications-panel/notification.d.ts +0 -6
  229. package/lib/notifications-panel/notifications-badge.d.ts +0 -5
  230. package/lib/notifications-panel/notifications-panel.d.ts +0 -2
  231. package/lib/notifications-panel/types.d.ts +0 -7
  232. package/lib/panels/launchpad-slide-panel.d.ts +0 -10
  233. package/lib/panels/slide-panel.d.ts +0 -9
  234. package/lib/search/search-results-section/helpers.d.ts +0 -3
  235. package/lib/search/search-results-section/search-results-section.d.ts +0 -5
  236. package/lib/spinner/index.d.ts +0 -1
  237. package/lib/user-panel/settings-card.d.ts +0 -2
  238. package/lib/user-panel/support-card.d.ts +0 -11
  239. package/lib/user-panel/user-details-card.d.ts +0 -6
  240. package/lib/user-panel/user-panel-icon.d.ts +0 -6
  241. package/lib/user-panel/user-panel.d.ts +0 -7
  242. /package/{constants → dist/constants}/auth0LoginTypes.d.ts +0 -0
  243. /package/{constants → dist/constants}/modifierKeys.d.ts +0 -0
  244. /package/{constants → dist/constants}/sortOrder.d.ts +0 -0
  245. /package/{hooks → dist/hooks}/useApplicationsInstances.d.ts +0 -0
  246. /package/{hooks → dist/hooks}/useBeforeunload.d.ts +0 -0
  247. /package/{hooks → dist/hooks}/useExecuteLayoutOperationIfNotBlocked.d.ts +0 -0
  248. /package/{hooks → dist/hooks}/useIsHomeLoaded.d.ts +0 -0
  249. /package/{hooks → dist/hooks}/usePressedKeys.d.ts +0 -0
  250. /package/{hooks → dist/hooks}/useWorkspacesInstances.d.ts +0 -0
  251. /package/{lib → dist/lib}/home-app-workspace/no-logo.d.ts +0 -0
  252. /package/{lib → dist/lib}/home-app-workspace/types.d.ts +0 -0
  253. /package/{lib → dist/lib}/home-app-workspace/useAddWindowButtonVisible.d.ts +0 -0
  254. /package/{lib → dist/lib}/icon-components/platform-setup/browser-notifications-icon.d.ts +0 -0
  255. /package/{lib → dist/lib}/icon-components/platform-setup/popups-icon.d.ts +0 -0
  256. /package/{lib → dist/lib}/icon-components/platform-setup/pwa-install-icon.d.ts +0 -0
  257. /package/{lib → dist/lib}/icon-components/platform-setup/window-management-icon.d.ts +0 -0
  258. /package/{lib → dist/lib}/icon-components/reopen-prompt-icon.d.ts +0 -0
  259. /package/{lib → dist/lib}/icon-components/start-failed-icon.d.ts +0 -0
  260. /package/{lib → dist/lib}/icon-components/warning-icon.d.ts +0 -0
  261. /package/{lib → dist/lib}/info-card/info-card.d.ts +0 -0
  262. /package/{lib → dist/lib}/info-page-container/info-page-container.d.ts +0 -0
  263. /package/{lib → dist/lib}/io-connect-home-provider/constants.d.ts +0 -0
  264. /package/{lib → dist/lib}/layouts-panel/layouts-panel.d.ts +0 -0
  265. /package/{lib → dist/lib}/login/constants.d.ts +0 -0
  266. /package/{lib → dist/lib}/login/login-logo.d.ts +0 -0
  267. /package/{lib → dist/lib}/login/login-page-container.d.ts +0 -0
  268. /package/{lib → dist/lib}/platform-setup/platform-setup.d.ts +0 -0
  269. /package/{lib → dist/lib}/platform-setup/setup-steps.d.ts +0 -0
  270. /package/{lib → dist/lib}/platform-setup/use-edge-notifications-permission.d.ts +0 -0
  271. /package/{lib → dist/lib}/section/section.context.d.ts +0 -0
  272. /package/{lib → dist/lib}/spinner/spinner.d.ts +0 -0
  273. /package/{lib → dist/lib}/system-loader/system-loader.d.ts +0 -0
  274. /package/{lib → dist/lib}/workspaces-section/types.d.ts +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Tick42
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,57 +1,57 @@
1
- # @interopio/home-ui-react
2
-
3
- The `@interopio/home-ui-react` library offers React components and hooks for building a [Home App](https://docs.interop.io/browser/capabilities/home-app/overview/index.html) for **io.Connect Browser** projects.
4
-
5
- ![Using Home](https://docs.interop.io/browser/images/home/using-home.gif)
6
-
7
- ## Installation
8
-
9
- To install the `@interopio/home-ui-react` library in your project, execute the following command:
10
-
11
- ```cmd
12
- npm install @interopio/home-ui-react
13
- ```
14
-
15
- ## Usage
16
-
17
- The following example demonstrates initializing the `@interopio/home-ui-react` library with basic configuration:
18
-
19
- ```javascript
20
- import { IOConnectHome } from "@interopio/home-ui-react";
21
- import "@interopio/workspaces-ui-react/dist/styles/workspaces.css";
22
- import "@interopio/home-ui-react/src/index.css";
23
-
24
- const getConfig = () => {
25
- // Platform configuration.
26
- const platformConfig = {
27
- browserPlatform: {
28
- factory: IOBrowserPlatform,
29
- config: {
30
- // Required license key.
31
- licenseKey: "my-license-key",
32
- // Workspaces App configuration.
33
- workspaces: {
34
- src: "/",
35
- isFrame: true
36
- }
37
- }
38
- }
39
- };
40
-
41
- return platformConfig;
42
- };
43
-
44
- // Configuration for the `<IOConnectHome />` component.
45
- const config = {
46
- // Retrieve the platform configuration.
47
- getIOConnectConfig: getConfig
48
- };
49
-
50
- export function App() {
51
- return <IOConnectHome config={config} />
52
- };
53
-
54
- export default App;
55
- ```
56
-
1
+ # @interopio/home-ui-react
2
+
3
+ The `@interopio/home-ui-react` library offers React components and hooks for building a [Home App](https://docs.interop.io/browser/capabilities/home-app/overview/index.html) for **io.Connect Browser** projects.
4
+
5
+ ![Using Home](https://docs.interop.io/browser/images/home/using-home.gif)
6
+
7
+ ## Installation
8
+
9
+ To install the `@interopio/home-ui-react` library in your project, execute the following command:
10
+
11
+ ```cmd
12
+ npm install @interopio/home-ui-react
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ The following example demonstrates initializing the `@interopio/home-ui-react` library with basic configuration:
18
+
19
+ ```javascript
20
+ import { IOConnectHome } from "@interopio/home-ui-react";
21
+ import "@interopio/workspaces-ui-react/dist/styles/workspaces.css";
22
+ import "@interopio/home-ui-react/src/index.css";
23
+
24
+ const getConfig = () => {
25
+ // Platform configuration.
26
+ const platformConfig = {
27
+ browserPlatform: {
28
+ factory: IOBrowserPlatform,
29
+ config: {
30
+ // Required license key.
31
+ licenseKey: "my-license-key",
32
+ // Workspaces App configuration.
33
+ workspaces: {
34
+ src: "/",
35
+ isFrame: true
36
+ }
37
+ }
38
+ }
39
+ };
40
+
41
+ return platformConfig;
42
+ };
43
+
44
+ // Configuration for the `<IOConnectHome />` component.
45
+ const config = {
46
+ // Retrieve the platform configuration.
47
+ getIOConnectConfig: getConfig
48
+ };
49
+
50
+ export function App() {
51
+ return <IOConnectHome config={config} />
52
+ };
53
+
54
+ export default App;
55
+ ```
56
+
57
57
  For more details on using the library, see the [official documentation](https://docs.interop.io/browser/capabilities/home-app/library-features/index.html) of **io.Connect Browser**.
@@ -0,0 +1,7 @@
1
+ export declare class Sequelizer {
2
+ private readonly queue;
3
+ private isExecutingQueue;
4
+ enqueue<T>(action: () => Promise<T>): Promise<T>;
5
+ private executeQueue;
6
+ private intervalBreak;
7
+ }
@@ -0,0 +1,27 @@
1
+ import { HOME_ALERT_VARIANTS } from "../constants/alerts";
2
+ import { PLATFORM_PREFS_KEYS } from "../constants/platformPrefs";
3
+ import { SORT_ORDER } from "../constants/sortOrder";
4
+ import { LayoutSummary } from "../lib/layouts-panel/types";
5
+ import { SectionItemType } from "../lib/section/types";
6
+ export type Favorite = Omit<SectionItemType, "openInstances">;
7
+ export type SortOrder = (typeof SORT_ORDER)[keyof typeof SORT_ORDER];
8
+ export type SortCompareFunction<Type> = (a: Type, b: Type) => number;
9
+ export type DefaultSectionProps = {
10
+ isSectionCollapsible?: boolean;
11
+ sortOrder?: SortOrder;
12
+ };
13
+ export type PlatformPrefs = {
14
+ [PLATFORM_PREFS_KEYS.COLLAPSED_SECTIONS]?: string[];
15
+ [PLATFORM_PREFS_KEYS.CUSTOM_PREFS]?: any;
16
+ [PLATFORM_PREFS_KEYS.IS_LAUNCHPAD_COLLAPSED]?: boolean;
17
+ [PLATFORM_PREFS_KEYS.IS_LAUNCHPAD_PINNED]?: boolean;
18
+ [PLATFORM_PREFS_KEYS.IS_LAYOUTS_PANEL_OPEN]?: boolean;
19
+ [PLATFORM_PREFS_KEYS.FAVORITES]?: Favorite[];
20
+ [PLATFORM_PREFS_KEYS.LAYOUTS_SHOW_DELETE_PROMPT]?: boolean;
21
+ [PLATFORM_PREFS_KEYS.LAYOUTS_SHOW_UNSAVED_CHANGES_PROMPT]?: boolean;
22
+ [PLATFORM_PREFS_KEYS.WIDGET_ENABLE_FOR_EXTERNAL_APPS]?: boolean;
23
+ };
24
+ export type SetDefaultLayout = (layout: LayoutSummary) => Promise<void>;
25
+ export type SetActiveLayout = (layout: LayoutSummary | null) => void;
26
+ export type CloseLaunchpad = () => void;
27
+ export type HomeAlertVariant = (typeof HOME_ALERT_VARIANTS)[keyof typeof HOME_ALERT_VARIANTS];
@@ -0,0 +1,2 @@
1
+ export declare const extractErrorMessage: (error: any) => string;
2
+ export declare const checkIsDesktop: () => boolean;
@@ -0,0 +1,8 @@
1
+ export declare const HOME_ALERT_VARIANTS: {
2
+ readonly SUCCESS: "success";
3
+ readonly WARNING: "warning";
4
+ };
5
+ export declare const HOME_ALERT_TTL: {
6
+ readonly success: number;
7
+ readonly warning: number;
8
+ };
@@ -1,2 +1 @@
1
1
  export declare const DEFAULT_SYSTEM_LAYOUT = "Welcome";
2
- export declare const DEFAULT_DISPLAY_COUNT = 5;
@@ -0,0 +1,5 @@
1
+ export declare const DIALOG_TEMPLATE_NAMES: {
2
+ NO_INPUTS_CONFIRMATION_DIALOG: string;
3
+ SINGLE_CHECKBOX_DIALOG: string;
4
+ SINGLE_TEXT_INPUT_DIALOG: string;
5
+ };
@@ -2,4 +2,5 @@ export declare const ITEM_TYPES: {
2
2
  readonly APPLICATION: "application";
3
3
  readonly WORKSPACE: "workspace";
4
4
  readonly LAYOUT: "layout";
5
+ readonly ACTION_BUTTON: "action-button";
5
6
  };
@@ -0,0 +1,15 @@
1
+ import { PlatformPrefs } from "../common/types";
2
+ export declare const PLATFORM_PREFS_APP_NAME = "io-connect-platform";
3
+ export declare const PLATFORM_PREFS_CONTEXT_KEY = "___platform_prefs___";
4
+ export declare const PLATFORM_PREFS_KEYS: {
5
+ readonly CUSTOM_PREFS: "customPrefs";
6
+ readonly COLLAPSED_SECTIONS: "_launchpad_collapsedSections";
7
+ readonly FAVORITES: "_launchpad_favorites";
8
+ readonly IS_LAYOUTS_PANEL_OPEN: "_launchpad_isLayoutsPanelOpen";
9
+ readonly IS_LAUNCHPAD_COLLAPSED: "_launchpad_isCollapsed";
10
+ readonly IS_LAUNCHPAD_PINNED: "_launchpad_isPinned";
11
+ readonly LAYOUTS_SHOW_UNSAVED_CHANGES_PROMPT: "_layouts_showUnsavedChangesPrompt";
12
+ readonly LAYOUTS_SHOW_DELETE_PROMPT: "_layouts_showDeletePrompt";
13
+ readonly WIDGET_ENABLE_FOR_EXTERNAL_APPS: "_widget_enableForExternalApps";
14
+ };
15
+ export declare const DEFAULT_PLATFORM_PREFS: PlatformPrefs;
@@ -0,0 +1 @@
1
+ export declare const NON_EMPTY_STRING_REGEX_PATTERN = "(.|\\s)*\\S(.|\\s)*";
@@ -0,0 +1,5 @@
1
+ export declare const DEFAULT_SECTION_IDS: {
2
+ FAVORITES: string;
3
+ WORKSPACES: string;
4
+ APPLICATIONS: string;
5
+ };
@@ -1,6 +1,5 @@
1
- export declare const SELECTED_LAYOUT_SESSION_STORAGE_KEY = "interopio_home_ui_selected_layout";
2
1
  export declare const AUTH0_VALIDATION_ERROR_SESSION_STORAGE_KEY = "interopio_home_ui_auth0_validation_error";
3
- export declare const FAVORITE_ENTITIES_LOCAL_STORAGE_KEY = "interopio_home_ui_favorite_entities";
4
2
  export declare const USER_LOCAL_STORAGE_KEY = "interopio_home_ui_user";
5
3
  export declare const PLATFORM_WINDOW_SESSION_STORAGE_KEY = "interopio_home_ui_platform_window";
6
4
  export declare const PLATFORM_SETUP_LOCAL_STORAGE_KEY = "interopio_home_ui_platform_setup";
5
+ export declare const ACTIVE_LAYOUT_SESSION_STORAGE_KEY = "interopio_home_ui_active_layout";
@@ -1,4 +1,5 @@
1
- import { Decoder } from 'decoder-validate';
1
+ import { Decoder } from "decoder-validate";
2
2
  export declare const nonEmptyStringDecoder: Decoder<string>;
3
3
  export declare const nonNegativeNumberDecoder: Decoder<number>;
4
+ export declare const booleanDecoder: Decoder<boolean>;
4
5
  export declare const functionCheck: (input: any, propDescription: string) => Decoder<any>;
@@ -0,0 +1,3 @@
1
+ import { Decoder } from "decoder-validate";
2
+ import { IOConnectHomeConfig } from "../lib/io-connect-home/types";
3
+ export declare const ioConnectHomeConfigDecoder: Decoder<IOConnectHomeConfig>;
@@ -0,0 +1,3 @@
1
+ import { Decoder } from "decoder-validate";
2
+ import { LayoutSummary } from "../lib/layouts-panel/types";
3
+ export declare const layoutStorageValueDecoder: Decoder<LayoutSummary | null>;
@@ -1,5 +1,5 @@
1
- import { Decoder } from 'decoder-validate';
2
- import { PlatformWindow } from '../lib/home-app-workspace/types';
3
- import { PlatformSetupStatus } from '../lib/platform-setup/types';
1
+ import { Decoder } from "decoder-validate";
2
+ import { PlatformWindow } from "../lib/home-app-workspace/types";
3
+ import { PlatformSetupStatus } from "../lib/platform-setup/types";
4
4
  export declare const platformWindowStorageValueDecoder: Decoder<PlatformWindow | null>;
5
5
  export declare const platformSetupStorageValueDecoder: Decoder<PlatformSetupStatus | null>;
@@ -0,0 +1,3 @@
1
+ import { Decoder } from "decoder-validate";
2
+ import { User } from "../lib/io-connect-home/types";
3
+ export declare const userDecoder: Decoder<User>;
@@ -0,0 +1,3 @@
1
+ import { Decoder } from "decoder-validate";
2
+ import { Auth0ValidationError } from "../lib/io-connect-home/types";
3
+ export declare const auth0ValidationErrorDecoder: Decoder<Auth0ValidationError>;
@@ -1,4 +1,4 @@
1
- import { ApplicationActionExecutor } from './types';
1
+ import { ApplicationActionExecutor } from "./types";
2
2
  export declare const applicationActionExecutors: {
3
3
  [key: string]: ApplicationActionExecutor;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { LayoutActionExecutor } from './types';
1
+ import { LayoutActionExecutor } from "./types";
2
2
  export declare const layoutActionExecutors: {
3
3
  [key: string]: LayoutActionExecutor;
4
4
  };
@@ -0,0 +1,3 @@
1
+ import { SetupStepName } from "../lib/platform-setup/types";
2
+ import { SetupStepActionExecutor } from "./types";
3
+ export declare const setupStepsActionExecutors: Record<SetupStepName, SetupStepActionExecutor>;
@@ -0,0 +1,33 @@
1
+ import { SetStateAction } from "react";
2
+ import { IOConnectBrowser } from "@interopio/browser";
3
+ import { IOConnectDesktop } from "@interopio/desktop";
4
+ import { Layout } from "../lib/layouts-panel/types";
5
+ import { SectionItemType } from "../lib/section/types";
6
+ import { SetupStepReducerAction } from "../lib/platform-setup/types";
7
+ import { SetDefaultLayout, SetActiveLayout, CloseLaunchpad } from "../common/types";
8
+ type UpdateShowDeletePromptPref = (value: SetStateAction<boolean | undefined>) => Promise<void>;
9
+ export type LayoutActionExecutor = (config: {
10
+ io: IOConnectBrowser.API | IOConnectDesktop.API;
11
+ layout: Layout;
12
+ setActiveLayout: SetActiveLayout;
13
+ setDefaultLayout: SetDefaultLayout;
14
+ closeLaunchpad: CloseLaunchpad;
15
+ showDeletePromptPref: boolean | undefined;
16
+ updateShowDeletePromptPref: UpdateShowDeletePromptPref;
17
+ }) => Promise<void>;
18
+ export type ApplicationActionExecutor = (config: {
19
+ io: IOConnectBrowser.API | IOConnectDesktop.API;
20
+ item: SectionItemType;
21
+ frameId?: string;
22
+ }) => Promise<void>;
23
+ export type WorkspaceActionExecutor = (config: {
24
+ io: IOConnectBrowser.API | IOConnectDesktop.API;
25
+ item: SectionItemType;
26
+ removeFavorite: (item: SectionItemType) => Promise<void>;
27
+ }) => Promise<void>;
28
+ export type SetupStepActionExecutor = (config: {
29
+ handleDeferredStep: () => void;
30
+ handleOperationComplete: () => void;
31
+ dispatchAction: (action: SetupStepReducerAction) => void;
32
+ }) => void;
33
+ export {};
@@ -1,4 +1,4 @@
1
- import { WorkspaceActionExecutor } from './types';
1
+ import { WorkspaceActionExecutor } from "./types";
2
2
  export declare const workspaceActionExecutors: {
3
3
  [key: string]: WorkspaceActionExecutor;
4
4
  };
@@ -1,23 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export type ActivationEvent<T extends HTMLElement = HTMLElement> = React.KeyboardEvent<T> | React.MouseEvent<T>;
3
- /**
4
- * If a keypress is the equivalent of a mouse click event. This would be pressing ENTER or SPACEBAR.
5
- */
6
3
  export declare const isClickKeypress: (event: React.KeyboardEvent<HTMLElement>) => boolean;
7
4
  type handler = (event: ActivationEvent) => void;
8
- /**
9
- * Utility function to convert an `onClick` prop into a keyboard-accessible equivalent.
10
- *
11
- * To use, take an existing component like this:
12
- * `<div onClick={doSomething}></div>`
13
- *
14
- * and convert it to this:
15
- * `<div {...onClickA11y(doSomething)}></div>`
16
- *
17
- * This will add an onClick prop, and onKeyDown prop, and a tabIndex={0} (so that a keyboard-only user can reach the element)
18
- *
19
- * Make sure you also add a `role` and `aria-label` attribute for maximum accessibility!
20
- */
21
5
  export declare const onClickA11y: (clickHandler?: handler, keydownHandler?: handler) => {
22
6
  tabIndex?: undefined;
23
7
  onClick?: undefined;
@@ -0,0 +1,9 @@
1
+ import { IOConnectBrowser } from "@interopio/browser";
2
+ import { IOConnectDesktop } from "@interopio/desktop";
3
+ import { HomeAlertVariant } from "../common/types";
4
+ export declare const requestAlert: (config: {
5
+ io: IOConnectBrowser.API | IOConnectDesktop.API;
6
+ variant: HomeAlertVariant;
7
+ text: string;
8
+ error?: any;
9
+ }) => Promise<void>;
@@ -1,8 +1,8 @@
1
- import { FavoriteEntity, SortCompareFunction, SortOrder } from '../common/types';
2
- import { Workspace } from '../lib/workspaces-section/types';
1
+ import { Favorite, SortCompareFunction, SortOrder } from "../common/types";
2
+ import { Workspace } from "../lib/workspaces-section/types";
3
3
  export declare const collator: Intl.Collator;
4
- export declare const ascendingTitleCompare: SortCompareFunction<FavoriteEntity | Workspace>;
5
- export declare const descendingTitleCompare: SortCompareFunction<FavoriteEntity | Workspace>;
4
+ export declare const ascendingTitleCompare: SortCompareFunction<Favorite | Workspace>;
5
+ export declare const descendingTitleCompare: SortCompareFunction<Favorite | Workspace>;
6
6
  export declare const sortItems: <Type>(config: {
7
7
  items: Type[];
8
8
  sortOrder: SortOrder;
@@ -0,0 +1,28 @@
1
+ export * from "./useApplications";
2
+ export * from "./useApplicationsInstances";
3
+ export * from "./useBeforeunload";
4
+ export * from "./useExecuteApplicationAction";
5
+ export * from "./useExecuteLayoutAction";
6
+ export * from "./useExecuteLayoutOperationIfNotBlocked";
7
+ export * from "./useExecuteWorkspaceAction";
8
+ export * from "./useFavorites";
9
+ export * from "./useFrameId";
10
+ export * from "./useInvokeInteropMethod";
11
+ export * from "./useIsHomeLoaded";
12
+ export * from "./useIsLaunchpadPinned";
13
+ export * from "./useIsRunningInDesktopContainer";
14
+ export * from "./useLayouts";
15
+ export * from "./useNotifications";
16
+ export * from "./useNotificationsConfiguration";
17
+ export * from "./useOnIframeFocus";
18
+ export * from "./useOnOutsideClick";
19
+ export * from "./usePlatformWindow";
20
+ export * from "./usePressedKeys";
21
+ export * from "./useRestoreLayout";
22
+ export * from "./useRestoreWorkspace";
23
+ export * from "./useSearch";
24
+ export * from "./useStartApplication";
25
+ export * from "./useStorage";
26
+ export * from "./useUA";
27
+ export * from "./useWorkspaces";
28
+ export * from "./useWorkspacesInstances";
@@ -0,0 +1,2 @@
1
+ import { Application } from "../lib/applications-section/types";
2
+ export declare const useApplications: () => Application[];
@@ -1,2 +1,2 @@
1
- import { SectionItemType } from '../lib/section/types';
1
+ import { SectionItemType } from "../lib/section/types";
2
2
  export declare const useExecuteApplicationAction: () => (item: SectionItemType, actionName: string) => void;
@@ -0,0 +1,5 @@
1
+ import { Layout } from "../lib/layouts-panel/types";
2
+ export declare const useExecuteLayoutAction: () => (config: {
3
+ layout: Layout;
4
+ actionName: string;
5
+ }) => Promise<void>;
@@ -1,2 +1,2 @@
1
- import { SectionItemType } from '../lib/section/types';
1
+ import { SectionItemType } from "../lib/section/types";
2
2
  export declare const useExecuteWorkspaceAction: () => (item: SectionItemType, actionName: string) => void;
@@ -0,0 +1,8 @@
1
+ import { Favorite } from "../common/types";
2
+ import { SectionItemType } from "../lib/section/types";
3
+ export declare const useFavorites: () => {
4
+ favorites: Favorite[];
5
+ toggleFavorite: (item: SectionItemType) => Promise<void>;
6
+ removeFavorite: (item: SectionItemType) => Promise<void>;
7
+ isLoading: boolean;
8
+ };
@@ -0,0 +1 @@
1
+ export declare const useFrameId: () => string | undefined;
@@ -1,2 +1,2 @@
1
- import { IOConnectSearch } from '@interopio/search-api';
1
+ import { IOConnectSearch } from "@interopio/search-api";
2
2
  export declare const useInvokeInteropMethod: () => (action: IOConnectSearch.MainAction) => Promise<any>;
@@ -0,0 +1,8 @@
1
+ export declare const useIsLaunchpadPinned: () => {
2
+ error: {
3
+ message: string;
4
+ } | undefined;
5
+ isLaunchpadPinned: boolean | undefined;
6
+ isLoading: boolean;
7
+ toggle: () => Promise<void>;
8
+ };
@@ -0,0 +1 @@
1
+ export declare const useIsRunningInDesktopContainer: () => boolean;
@@ -0,0 +1,5 @@
1
+ import type { Layout } from "../lib/layouts-panel/types";
2
+ export declare const useLayouts: () => {
3
+ layouts: Layout[];
4
+ isInitialized: boolean;
5
+ };
@@ -1,2 +1,2 @@
1
- import { IOConnectBrowser } from '@interopio/browser';
1
+ import { IOConnectBrowser } from "@interopio/browser";
2
2
  export declare const useNotifications: () => IOConnectBrowser.Notifications.NotificationData[];
@@ -0,0 +1,3 @@
1
+ import { IOConnectBrowser } from "@interopio/browser";
2
+ import { IOConnectDesktop } from "@interopio/desktop";
3
+ export declare const useNotificationsConfiguration: () => IOConnectBrowser.Notifications.Configuration | IOConnectDesktop.Notifications.Configuration;
@@ -0,0 +1,6 @@
1
+ interface Config {
2
+ handler: (event: FocusEvent) => void;
3
+ skip?: boolean;
4
+ }
5
+ export declare const useOnIframeFocus: (config: Config) => void;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import { RefObject } from "react";
2
+ interface Config {
3
+ eventType: "click" | "mousedown" | "mouseup" | "touchstart" | "touchend";
4
+ handler: (event: MouseEvent | TouchEvent) => void;
5
+ ref: RefObject<HTMLElement> | RefObject<HTMLElement>[];
6
+ skip?: boolean;
7
+ }
8
+ export declare const useOnOutsideClick: (config: Config) => void;
9
+ export {};
@@ -1,4 +1,4 @@
1
- import { PlatformWindow } from '../lib/home-app-workspace/types';
1
+ import { PlatformWindow } from "../lib/home-app-workspace/types";
2
2
  export declare const usePlatformWindow: () => {
3
3
  isPlatformWindow: boolean;
4
4
  setPlatformWindow: (value: PlatformWindow | null) => void;
@@ -1,2 +1,2 @@
1
- import { LayoutSummary } from '../lib/layouts-panel/types';
1
+ import { LayoutSummary } from "../lib/layouts-panel/types";
2
2
  export declare const useRestoreLayout: () => (name: string, onSuccessfulLayoutRestore?: ((layout: LayoutSummary) => void) | undefined) => Promise<void>;
@@ -1,6 +1,5 @@
1
- import { IOConnectWorkspaces } from '@interopio/workspaces-api';
2
1
  export declare const useRestoreWorkspace: () => ({ id, modifier, reuseWorkspaceId }: {
3
2
  id: string;
4
3
  modifier?: string | null | undefined;
5
4
  reuseWorkspaceId?: string | undefined;
6
- }) => Promise<IOConnectWorkspaces.Workspace | undefined>;
5
+ }) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import { IOConnectSearch } from '@interopio/search-api';
1
+ import { IOConnectSearch } from "@interopio/search-api";
2
2
  export declare const useSearch: (searchTerm: string) => {
3
3
  resultsToRender: IOConnectSearch.QueryResult[];
4
4
  isLoading: boolean;
@@ -0,0 +1,7 @@
1
+ type StartApplicationConfig = {
2
+ id: string;
3
+ modifier: string | null;
4
+ title?: string;
5
+ };
6
+ export declare const useStartApplication: () => (config: StartApplicationConfig) => Promise<void>;
7
+ export {};
@@ -1,4 +1,4 @@
1
- import { Decoder } from 'decoder-validate';
2
- type StorageType = 'localStorage' | 'sessionStorage';
1
+ import { Decoder } from "decoder-validate";
2
+ type StorageType = "localStorage" | "sessionStorage";
3
3
  export declare const useStorage: <T>(type: StorageType, key: string, decoder: Decoder<T | null>) => readonly [T | null, (value: T | null) => void];
4
4
  export {};
@@ -0,0 +1,2 @@
1
+ export declare const useUA: () => import("ua-parser-js").IResult;
2
+ export declare const useBrowser: () => import("ua-parser-js").IBrowser;
@@ -0,0 +1,2 @@
1
+ import { Workspace } from "../lib/workspaces-section/types";
2
+ export declare const useWorkspaces: () => Workspace[];