@interopio/home-ui-react 4.3.0 → 4.4.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.
package/dist/index.d.ts CHANGED
@@ -1,29 +1,22 @@
1
1
  import { Auth0ProviderOptions } from '@auth0/auth0-react';
2
2
  import { default as default_2 } from 'react';
3
- import { IconProps } from '@interopio/components-react';
3
+ import { HomeContextMenuAction } from '@interopio/components-react';
4
4
  import { IOActivePanelRenderer } from '@interopio/components-react';
5
5
  import { IOConnectInitSettings } from '@interopio/react-hooks';
6
6
  import { IODownloadManager } from '@interopio/components-react';
7
+ import { IOLaunchpad } from '@interopio/components-react';
7
8
  import { IONotifications } from '@interopio/components-react';
8
9
  import { IOPreferencesBrowser } from '@interopio/components-react';
9
10
  import { IOPreferencesDesktop } from '@interopio/components-react';
10
11
  import { IOProfile } from '@interopio/components-react';
11
12
  import { JSX as JSX_2 } from 'react/jsx-runtime';
12
13
  import { PlatformPrefsProvider } from '@interopio/components-react';
13
- import { SetStateAction } from 'react';
14
14
  import { usePlatformPref } from '@interopio/components-react';
15
15
  import { usePlatformPrefs } from '@interopio/components-react';
16
16
  import { User as User_2 } from '@auth0/auth0-react';
17
17
  import { WorkspacesProps } from '@interopio/workspaces-ui-react';
18
18
 
19
- export declare function ApplicationsSection(props: ApplicationsSectionProps): JSX_2.Element;
20
-
21
- declare type ApplicationsSectionProps = {
22
- isFolderCollapsible?: boolean;
23
- folderIconGetters?: {
24
- [key: string]: (isOpen: boolean) => string;
25
- };
26
- } & DefaultSectionProps;
19
+ export declare const ApplicationsSection: typeof IOLaunchpad.ApplicationsSection;
27
20
 
28
21
  declare const AUTH0_LOGIN_TYPES: {
29
22
  readonly POPUP: "popup";
@@ -49,36 +42,6 @@ export declare type Auth0ValidationError = {
49
42
  message: string;
50
43
  };
51
44
 
52
- declare interface BaseSectionItemType {
53
- description?: string;
54
- icon?: IconProps["variant"];
55
- iconSrc?: string;
56
- id: string;
57
- openInstances?: number;
58
- contextMenuActions?: ContextMenuAction[];
59
- title: string;
60
- type: string;
61
- tooltip?: string;
62
- className?: string;
63
- }
64
-
65
- declare type BaseSectionType<Item extends BaseSectionItemType> = {
66
- id: string;
67
- items: (Item | BaseSectionType<Item>)[];
68
- title: string;
69
- isCollapsible?: boolean;
70
- getIcon?: (isOpen: boolean) => string;
71
- };
72
-
73
- declare interface ContextMenuAction {
74
- name: string;
75
- displayName?: string;
76
- icon?: IconProps["variant"];
77
- iconSrc?: string;
78
- disabled?: boolean;
79
- separatorAfter?: boolean;
80
- }
81
-
82
45
  export declare interface CustomLoginConfig {
83
46
  type: "custom";
84
47
  onLogout: () => void;
@@ -90,14 +53,7 @@ export declare interface CustomUser {
90
53
  username: string;
91
54
  }
92
55
 
93
- declare type DefaultSectionProps = {
94
- isSectionCollapsible?: boolean;
95
- sortOrder?: SortOrder;
96
- };
97
-
98
- declare type Favorite = Omit<SectionItemType, "openInstances">;
99
-
100
- export declare const FavoritesSection: (props: DefaultSectionProps) => JSX_2.Element | null;
56
+ export declare const FavoritesSection: typeof IOLaunchpad.FavoritesSection;
101
57
 
102
58
  export { IOActivePanelRenderer }
103
59
 
@@ -138,7 +94,7 @@ export { IOPreferencesDesktop }
138
94
 
139
95
  export { IOProfile }
140
96
 
141
- export declare const Launchpad: (props: LaunchpadProps) => JSX_2.Element;
97
+ export declare const Launchpad: typeof IOLaunchpad.Panel;
142
98
 
143
99
  export declare const LaunchpadAccess: ({ Button }: LaunchpadAccessProps) => JSX_2.Element;
144
100
 
@@ -146,73 +102,28 @@ export declare interface LaunchpadAccessProps {
146
102
  Button?: React.ComponentType<PanelButtonProps>;
147
103
  }
148
104
 
149
- export declare const LaunchpadBody: ({ className }: LaunchpadBodyProps) => JSX_2.Element;
150
-
151
- declare interface LaunchpadBodyProps {
152
- className?: string;
153
- }
105
+ export declare const LaunchpadBody: typeof IOLaunchpad.Body;
154
106
 
155
- export declare interface LaunchpadComponents {
156
- header?: LaunchpadHeaderComponents;
157
- sections?: LaunchpadSection[];
158
- }
107
+ export declare type LaunchpadComponents = IOLaunchpad.LaunchpadComponents;
159
108
 
160
109
  export declare interface LaunchpadConfig {
161
- components?: LaunchpadComponents;
162
- settings?: LaunchpadSettings;
163
- }
164
-
165
- export declare const LaunchpadContentsContainer: ({ settings, components, isOpen, onClose, windowManagementPermissionState, children, className, ...rest }: LaunchpadContentsContainerProps) => JSX_2.Element;
166
-
167
- declare interface LaunchpadContentsContainerProps extends React.HTMLAttributes<HTMLDivElement> {
168
- settings?: LaunchpadSettings;
169
- components?: LaunchpadComponents;
170
- isOpen?: boolean;
171
- onClose?: () => void;
172
- windowManagementPermissionState?: PermissionState;
110
+ components?: IOLaunchpad.LaunchpadComponents;
111
+ settings?: IOLaunchpad.LaunchpadSettings;
173
112
  }
174
113
 
175
- export declare const LaunchpadHeader: ({ className }: LaunchpadHeaderProps) => JSX_2.Element | null;
114
+ export declare const LaunchpadContentsContainer: typeof IOLaunchpad.ContentsContainer;
176
115
 
177
- export declare interface LaunchpadHeaderComponents {
178
- BeforeSearch?: default_2.ComponentType | null;
179
- AfterSearch?: default_2.ComponentType | null;
180
- }
181
-
182
- declare interface LaunchpadHeaderProps {
183
- className?: string;
184
- }
185
-
186
- export declare interface LaunchpadHeaderSettings {
187
- showHeader?: boolean;
188
- showSearch?: boolean;
189
- }
116
+ export declare const LaunchpadHeader: typeof IOLaunchpad.Header;
190
117
 
191
- export declare type LaunchpadMode = "pinned" | "default";
118
+ export declare type LaunchpadHeaderComponents = IOLaunchpad.LaunchpadHeaderComponents;
192
119
 
193
- export declare const LaunchpadPinButton: ({ className }: LaunchpadPinButtonProps) => JSX_2.Element;
120
+ export declare type LaunchpadHeaderSettings = IOLaunchpad.LaunchpadHeaderSettings;
194
121
 
195
- declare interface LaunchpadPinButtonProps {
196
- className?: string;
197
- }
198
-
199
- export declare interface LaunchpadProps extends React.HTMLProps<HTMLDivElement> {
200
- isOpen?: boolean;
201
- onClose?: () => void;
202
- settings?: LaunchpadSettings;
203
- components?: LaunchpadComponents;
204
- windowManagementPermissionState?: PermissionState;
205
- }
122
+ export declare const LaunchpadPinButton: typeof IOLaunchpad.PinButton;
206
123
 
207
- export declare interface LaunchpadSection {
208
- Component: default_2.ComponentType;
209
- placementId: string;
210
- }
124
+ export declare type LaunchpadSection = IOLaunchpad.LaunchpadSection;
211
125
 
212
- export declare interface LaunchpadSettings {
213
- header?: LaunchpadHeaderSettings;
214
- mode?: LaunchpadMode;
215
- }
126
+ export declare type LaunchpadSettings = IOLaunchpad.LaunchpadSettings;
216
127
 
217
128
  export declare type LoginConfig = Auth0LoginConfig | SimpleLoginConfig | CustomLoginConfig;
218
129
 
@@ -257,7 +168,9 @@ declare interface PanelButtonProps {
257
168
 
258
169
  declare type PanelPosition = "left" | "right";
259
170
 
260
- declare interface PanelProps {
171
+ export declare type PanelProps = IOLaunchpad.PanelProps;
172
+
173
+ declare interface PanelProps_2 {
261
174
  isOpen: boolean;
262
175
  onClose: () => void;
263
176
  }
@@ -266,7 +179,7 @@ export declare const PanelWithToggleButton: (props: PanelWithToggleButtonProps)
266
179
 
267
180
  export declare interface PanelWithToggleButtonProps {
268
181
  Button: React.ComponentType<PanelButtonProps>;
269
- Panel: React.ComponentType<PanelProps>;
182
+ Panel: React.ComponentType<PanelProps_2>;
270
183
  panelWrapperClassName?: string;
271
184
  pinned?: boolean;
272
185
  position?: PanelPosition;
@@ -287,26 +200,15 @@ declare interface ProfilePanelProps {
287
200
  title?: string;
288
201
  }
289
202
 
290
- export declare const Section: ({ config, onItemClick }: SectionProps) => JSX_2.Element;
203
+ export declare const Section: typeof IOLaunchpad.Section;
291
204
 
292
- export declare type SectionItemClickedType = {
293
- item: SectionItemType;
294
- modifier: string | null;
295
- selectedContextMenuActionName?: string;
296
- };
205
+ export declare type SectionItemClickedType = IOLaunchpad.SectionItemClickedType;
297
206
 
298
- export declare type SectionItemType = BaseSectionItemType;
207
+ export declare type SectionItemType = IOLaunchpad.SectionItemType;
299
208
 
300
- export declare interface SectionProps {
301
- config: SectionType;
302
- onItemClick?: (params: {
303
- item: SectionItemType;
304
- modifier: string | null;
305
- selectedContextMenuActionName?: string;
306
- }) => void;
307
- }
209
+ export declare type SectionProps = IOLaunchpad.SectionProps;
308
210
 
309
- export declare type SectionType = BaseSectionType<SectionItemType>;
211
+ export declare type SectionType = IOLaunchpad.SectionType;
310
212
 
311
213
  export declare interface SetupFlowComponents {
312
214
  Logo?: default_2.ComponentType;
@@ -330,14 +232,6 @@ export declare interface SimpleLoginConfig {
330
232
  components?: LoginPageComponents;
331
233
  }
332
234
 
333
- declare const SORT_ORDER: {
334
- readonly ASCENDING: "ascending";
335
- readonly DESCENDING: "descending";
336
- readonly DISABLED: "disabled";
337
- };
338
-
339
- declare type SortOrder = (typeof SORT_ORDER)[keyof typeof SORT_ORDER];
340
-
341
235
  export declare const SystemLoader: ({ Logo, text }: SystemLoaderProps) => JSX_2.Element;
342
236
 
343
237
  export declare interface SystemLoaderProps {
@@ -347,7 +241,7 @@ export declare interface SystemLoaderProps {
347
241
 
348
242
  export declare const SystemMenu: ({ actions, panelWrapperClassName }: SystemMenuProps) => JSX_2.Element;
349
243
 
350
- declare type SystemMenuAction = ContextMenuAction & {
244
+ declare type SystemMenuAction = HomeContextMenuAction & {
351
245
  onClick: (openPanel: (Panel: SystemMenuPanel) => void) => void;
352
246
  };
353
247
 
@@ -361,21 +255,9 @@ export declare interface SystemMenuProps {
361
255
  panelWrapperClassName?: string;
362
256
  }
363
257
 
364
- export declare const useFavorites: () => {
365
- favorites: Favorite[];
366
- toggleFavorite: (item: SectionItemType) => Promise<void>;
367
- removeFavorite: (item: SectionItemType) => Promise<void>;
368
- isLoading: boolean;
369
- };
258
+ export declare const useFavorites: typeof IOLaunchpad.useFavorites;
370
259
 
371
- export declare const useIsLaunchpadCollapsed: () => {
372
- error: {
373
- message: string;
374
- } | undefined;
375
- isLaunchpadCollapsed: boolean | undefined;
376
- setIsLaunchpadCollapsed: (value: SetStateAction<boolean | undefined>) => Promise<void>;
377
- isLoading: boolean;
378
- };
260
+ export declare const useIsLaunchpadCollapsed: typeof IOLaunchpad.useIsLaunchpadCollapsed;
379
261
 
380
262
  export { usePlatformPref }
381
263
 
@@ -415,6 +297,6 @@ export declare interface WorkspacesConfig {
415
297
  components?: WorkspacesProps["components"];
416
298
  }
417
299
 
418
- export declare const WorkspacesSection: (props: DefaultSectionProps) => JSX_2.Element;
300
+ export declare const WorkspacesSection: typeof IOLaunchpad.WorkspacesSection;
419
301
 
420
302
  export { }