@interopio/home-ui-react 1.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 (127) hide show
  1. package/README.md +312 -0
  2. package/assets/fonts/nunito-regular-webfont.woff +0 -0
  3. package/assets/fonts/nunito-regular-webfont.woff2 +0 -0
  4. package/assets/fonts/nunito-semibold-webfont.woff +0 -0
  5. package/assets/fonts/nunito-semibold-webfont.woff2 +0 -0
  6. package/assets/glue-logo.json +5 -0
  7. package/common/types.d.ts +2 -0
  8. package/constants/contextMenuActions.d.ts +15 -0
  9. package/constants/defaults.d.ts +2 -0
  10. package/constants/itemTypes.d.ts +5 -0
  11. package/constants/modifierKeys.d.ts +4 -0
  12. package/constants/storageKeys.d.ts +3 -0
  13. package/decoders/base.d.ts +2 -0
  14. package/decoders/context-menu.d.ts +3 -0
  15. package/decoders/favorites.d.ts +3 -0
  16. package/decoders/layouts.d.ts +3 -0
  17. package/executors/applicationActions.d.ts +6 -0
  18. package/executors/workspaceActions.d.ts +5 -0
  19. package/helpers/a11y.d.ts +39 -0
  20. package/helpers/date.d.ts +1 -0
  21. package/helpers/string.d.ts +1 -0
  22. package/hooks/index.d.ts +15 -0
  23. package/hooks/useApplications.d.ts +2 -0
  24. package/hooks/useApplicationsInstances.d.ts +3 -0
  25. package/hooks/useExecuteApplicationAction.d.ts +2 -0
  26. package/hooks/useExecuteWorkspaceAction.d.ts +2 -0
  27. package/hooks/useFavoriteEntities.d.ts +6 -0
  28. package/hooks/useFrame.d.ts +2 -0
  29. package/hooks/useInvokeInteropMethod.d.ts +2 -0
  30. package/hooks/usePressedKeys.d.ts +1 -0
  31. package/hooks/useRestoreWorkspace.d.ts +2 -0
  32. package/hooks/useSearch.d.ts +5 -0
  33. package/hooks/useStartApplication.d.ts +1 -0
  34. package/hooks/useStorage.d.ts +4 -0
  35. package/hooks/useUA.d.ts +2 -0
  36. package/hooks/useWorkspaces.d.ts +2 -0
  37. package/hooks/useWorkspacesInstances.d.ts +3 -0
  38. package/images/initial-setup.gif +0 -0
  39. package/images/manual-permissions.gif +0 -0
  40. package/images/using-home.gif +0 -0
  41. package/index.css +1 -0
  42. package/index.d.ts +33 -0
  43. package/index.js +43 -0
  44. package/index.js.map +1 -0
  45. package/index.mjs +7092 -0
  46. package/index.mjs.map +1 -0
  47. package/lib/applications-section/applications-section.d.ts +3 -0
  48. package/lib/applications-section/applications-section.helpers.d.ts +5 -0
  49. package/lib/base-section/base-section-header.d.ts +8 -0
  50. package/lib/base-section/base-section-item.d.ts +13 -0
  51. package/lib/base-section/base-section.d.ts +15 -0
  52. package/lib/base-section/base-section.helpers.d.ts +2 -0
  53. package/lib/base-section/base-section.types.d.ts +19 -0
  54. package/lib/button/button.d.ts +7 -0
  55. package/lib/button-group/button-group.d.ts +8 -0
  56. package/lib/context-menu/context-menu-types.d.ts +9 -0
  57. package/lib/context-menu/context-menu.d.ts +10 -0
  58. package/lib/context-menu/dropdown-button/dropdown-button.d.ts +12 -0
  59. package/lib/favorites-section/favorites-section.d.ts +3 -0
  60. package/lib/favorites-section/favorites-section.helpers.d.ts +3 -0
  61. package/lib/glue42-home-provider/constants.d.ts +1 -0
  62. package/lib/glue42-home-provider/glue42-home-provider.d.ts +15 -0
  63. package/lib/glue42-home-provider/helpers.d.ts +2 -0
  64. package/lib/glue42-home-provider/types.d.ts +4 -0
  65. package/lib/icon/icon.d.ts +9 -0
  66. package/lib/icon-components/browser-notifications-icon.d.ts +3 -0
  67. package/lib/icon-components/index.d.ts +4 -0
  68. package/lib/icon-components/reopen-prompt-icon.d.ts +3 -0
  69. package/lib/icon-components/warning-icon.d.ts +3 -0
  70. package/lib/icon-components/window-placement-icon.d.ts +3 -0
  71. package/lib/img-icon/img-icon.d.ts +8 -0
  72. package/lib/launchpad/features/profile-settings/profile-settings.d.ts +9 -0
  73. package/lib/launchpad/features/profile-settings/user-profile-modal.d.ts +10 -0
  74. package/lib/launchpad/launchpad.context.d.ts +12 -0
  75. package/lib/launchpad/launchpad.d.ts +14 -0
  76. package/lib/layout-settings/constants.d.ts +2 -0
  77. package/lib/layout-settings/index.d.ts +2 -0
  78. package/lib/layout-settings/layout-actions.d.ts +8 -0
  79. package/lib/layout-settings/layout-item.d.ts +9 -0
  80. package/lib/layout-settings/layout-notification.d.ts +7 -0
  81. package/lib/layout-settings/layout-settings-container.d.ts +3 -0
  82. package/lib/layout-settings/layout-settings.d.ts +12 -0
  83. package/lib/layout-settings/layout-startup.d.ts +2 -0
  84. package/lib/layout-settings/layout-types.d.ts +30 -0
  85. package/lib/login/constants.d.ts +1 -0
  86. package/lib/login/index.d.ts +3 -0
  87. package/lib/login/login-auth0.d.ts +6 -0
  88. package/lib/login/login-form.d.ts +11 -0
  89. package/lib/login/login-heading.d.ts +6 -0
  90. package/lib/login/login-loader.d.ts +3 -0
  91. package/lib/login/login-logo.d.ts +7 -0
  92. package/lib/login/login.d.ts +8 -0
  93. package/lib/login/reducers.d.ts +3 -0
  94. package/lib/login/types.d.ts +16 -0
  95. package/lib/modal/modal.d.ts +9 -0
  96. package/lib/notifications-panel/index.d.ts +1 -0
  97. package/lib/notifications-panel/notification-toast.d.ts +17 -0
  98. package/lib/notifications-panel/notifications-modal.d.ts +4 -0
  99. package/lib/notifications-panel/notifications-panel.d.ts +3 -0
  100. package/lib/notifications-panel/useNotificationsSort.d.ts +13 -0
  101. package/lib/panels/launchpad-slide-panel.d.ts +12 -0
  102. package/lib/panels/slide-panel.d.ts +9 -0
  103. package/lib/permissions-setup/constants.d.ts +5 -0
  104. package/lib/permissions-setup/permissions-card.d.ts +10 -0
  105. package/lib/permissions-setup/permissions-list.d.ts +8 -0
  106. package/lib/permissions-setup/permissions-setup-flow.d.ts +8 -0
  107. package/lib/permissions-setup/permissions-setup.d.ts +13 -0
  108. package/lib/permissions-setup/permissions-steps.d.ts +8 -0
  109. package/lib/permissions-setup/something-went-wrong.d.ts +6 -0
  110. package/lib/permissions-setup/types.d.ts +14 -0
  111. package/lib/permissions-setup/unsuccessful-setup.d.ts +7 -0
  112. package/lib/permissions-setup/use-edge-notifications-permission.d.ts +6 -0
  113. package/lib/profile-details-card/profile-details-card.d.ts +8 -0
  114. package/lib/search/search-bar/search-bar.d.ts +8 -0
  115. package/lib/search/search-results-section/search-results-section.d.ts +6 -0
  116. package/lib/search/search-results-section/search-results-section.helpers.d.ts +3 -0
  117. package/lib/search/search-results-section/search-results-section.types.d.ts +8 -0
  118. package/lib/section/section.context.d.ts +11 -0
  119. package/lib/section/section.d.ts +12 -0
  120. package/lib/section/section.helpers.d.ts +3 -0
  121. package/lib/section/section.types.d.ts +8 -0
  122. package/lib/settings-card/settings-card.d.ts +3 -0
  123. package/lib/support-card/support-card.d.ts +9 -0
  124. package/lib/workspaces-section/workspaces-section.d.ts +3 -0
  125. package/lib/workspaces-section/workspaces-section.helpers.d.ts +5 -0
  126. package/lib/workspaces-section/workspaces-section.types.d.ts +4 -0
  127. package/package.json +45 -0
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ interface PermissionsSetupProps {
3
+ components?: {
4
+ Logo?: React.ComponentType<{
5
+ className?: string;
6
+ }>;
7
+ };
8
+ settings?: {
9
+ edgeNotificationsPermissionTimeout?: number;
10
+ };
11
+ }
12
+ export declare const PermissionsSetup: ({ components: { Logo }, settings }: PermissionsSetupProps) => JSX.Element;
13
+ export default PermissionsSetup;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface PermissionStepsProps {
3
+ settings: {
4
+ edgeNotificationsPermissionTimeout: number;
5
+ };
6
+ }
7
+ export declare const PermissionSteps: ({ settings }: PermissionStepsProps) => JSX.Element;
8
+ export default PermissionSteps;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface SomethingWentWrongProps {
3
+ onReopenPromptClick: () => void;
4
+ }
5
+ export declare const SomethingWentWrong: ({ onReopenPromptClick }: SomethingWentWrongProps) => JSX.Element;
6
+ export {};
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { PERMISSION_NAMES } from '../glue42-home-provider/constants';
3
+ export interface PermissionStep {
4
+ heading: string;
5
+ description: string;
6
+ guidelines: Record<string, string>;
7
+ label: string;
8
+ Image?: React.ComponentType;
9
+ openPermissionsPrompt: (options: {
10
+ handleDeferredPermission: () => void;
11
+ handlePermissionsPromptClose: () => void;
12
+ }) => void;
13
+ }
14
+ export type PermissionNames = (typeof PERMISSION_NAMES)[number];
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import type { PermissionNames } from './types';
3
+ interface UnsuccessfulSetupProps {
4
+ deniedPermissionName?: PermissionNames;
5
+ }
6
+ export declare const UnsuccessfulSetup: ({ deniedPermissionName }: UnsuccessfulSetupProps) => JSX.Element;
7
+ export default UnsuccessfulSetup;
@@ -0,0 +1,6 @@
1
+ export declare const useEdgeNotificationsPermission: ({ edgeNotificationsPermissionTimeout, isNotificationsPermissionPromptOpen, }: {
2
+ edgeNotificationsPermissionTimeout: number;
3
+ isNotificationsPermissionPromptOpen: boolean;
4
+ }) => {
5
+ hasEdgeNotificationsPermissionError: boolean;
6
+ };
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ export interface ProfileDetailsCardProps {
3
+ user?: {
4
+ name?: string;
5
+ };
6
+ }
7
+ export declare const ProfileDetailsCard: FC<ProfileDetailsCardProps>;
8
+ export default ProfileDetailsCard;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface SearchBarProps {
3
+ onSearch: (e: React.ChangeEvent<HTMLInputElement>) => void;
4
+ searchTerm: string;
5
+ onClear: () => void;
6
+ }
7
+ export declare const SearchBar: import("react").ForwardRefExoticComponent<SearchBarProps & import("react").RefAttributes<HTMLInputElement>>;
8
+ export default SearchBar;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface SearchResultsProps {
3
+ searchTerm: string;
4
+ }
5
+ export declare function SearchResults(props: SearchResultsProps): JSX.Element;
6
+ export default SearchResults;
@@ -0,0 +1,3 @@
1
+ import { Glue42Search } from '@glue42/search-api';
2
+ import type { SearchResultsSectionType } from './search-results-section.types';
3
+ export declare const getSearchResultsSectionConfigs: (results: Glue42Search.QueryResult[]) => SearchResultsSectionType[];
@@ -0,0 +1,8 @@
1
+ import type { Glue42Search } from '@glue42/search-api';
2
+ import type { BaseSectionItemType, BaseSectionType } from '../../base-section/base-section.types';
3
+ import { SearchResultsContextMenuAction } from '../../context-menu/context-menu-types';
4
+ export interface SearchResultsSectionItemType extends BaseSectionItemType {
5
+ mainAction?: Glue42Search.MainAction;
6
+ contextMenuActions?: SearchResultsContextMenuAction[];
7
+ }
8
+ export type SearchResultsSectionType = BaseSectionType<SearchResultsSectionItemType>;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ interface SectionProviderProps {
3
+ children: React.ReactNode;
4
+ }
5
+ interface ClickDataState {
6
+ itemName: string;
7
+ selectedContextMenuActionName?: string;
8
+ }
9
+ export declare const useSection: () => [ClickDataState | null, import("react").Dispatch<import("react").SetStateAction<ClickDataState | null>>];
10
+ export declare const SectionProvider: ({ children }: SectionProviderProps) => JSX.Element;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import type { SectionItemType, SectionType } from './section.types';
3
+ interface SectionProps {
4
+ config: SectionType;
5
+ onItemClick?: (params: {
6
+ item: SectionItemType;
7
+ modifier: string | null;
8
+ selectedContextMenuActionName?: string;
9
+ }) => void;
10
+ }
11
+ export declare const Section: ({ config, onItemClick }: SectionProps) => JSX.Element;
12
+ export default Section;
@@ -0,0 +1,3 @@
1
+ import type { SectionItemType, SectionType } from './section.types';
2
+ export declare const getItemName: (item: SectionItemType) => string;
3
+ export declare const getClickedItem: (items: SectionType['items'], clickedItemName: string) => SectionItemType | undefined;
@@ -0,0 +1,8 @@
1
+ import type { BaseSectionItemType, BaseSectionType } from '../base-section/base-section.types';
2
+ export type SectionItemType = BaseSectionItemType;
3
+ export type SectionType = BaseSectionType<SectionItemType>;
4
+ export type SectionItemClickedType = {
5
+ item: SectionItemType;
6
+ modifier: string | null;
7
+ selectedContextMenuActionName?: string;
8
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const SettingsCard: () => JSX.Element;
3
+ export default SettingsCard;
@@ -0,0 +1,9 @@
1
+ import { FC, HTMLProps } from 'react';
2
+ export interface SupportCardProps {
3
+ title?: string;
4
+ description?: string;
5
+ links?: HTMLProps<HTMLAnchorElement>[];
6
+ onLogout?: () => void;
7
+ }
8
+ export declare const SupportCard: FC<SupportCardProps>;
9
+ export default SupportCard;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const WorkspacesSection: () => JSX.Element;
3
+ export default WorkspacesSection;
@@ -0,0 +1,5 @@
1
+ import type { SectionType } from '../section/section.types';
2
+ import type { Workspace } from './workspaces-section.types';
3
+ export declare const getWorkspacesSectionConfig: (workspaces: Workspace[], runningInstances: {
4
+ [appName: string]: string[];
5
+ }) => SectionType;
@@ -0,0 +1,4 @@
1
+ export interface Workspace {
2
+ id: string;
3
+ title: string;
4
+ }
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@interopio/home-ui-react",
3
+ "description": "React components for building a Home App for io.Connect Browser.",
4
+ "version": "1.0.0",
5
+ "main": "./index.js",
6
+ "module": "./index.mjs",
7
+ "types": "./index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./index.mjs",
11
+ "require": "./index.js"
12
+ },
13
+ "./index.css": {
14
+ "import": "./index.css",
15
+ "require": "./index.css"
16
+ }
17
+ },
18
+ "peerDependencies": {
19
+ "react": "18",
20
+ "react-dom": "18",
21
+ "@glue42/web": "2",
22
+ "@glue42/workspaces-api": "1",
23
+ "@glue42/react-hooks": "2",
24
+ "@glue42/search-api": "1",
25
+ "@glue42/desktop": "5"
26
+ },
27
+ "peerDependenciesMeta": {
28
+ "react-dom": {
29
+ "optional": true
30
+ },
31
+ "react": {
32
+ "optional": true
33
+ }
34
+ },
35
+ "homepage": "https://interop.io/",
36
+ "author": {
37
+ "name": "Interop.IO",
38
+ "url": "https://interop.io/"
39
+ },
40
+ "license": "MIT",
41
+ "publishConfig": {
42
+ "registry": "https://registry.npmjs.org",
43
+ "access": "public"
44
+ }
45
+ }