@fiftyone/spaces¶
Hooks¶
usePanel¶
-
@fiftyone/spaces.
usePanel
(name, predicate)¶ - Arguments
name (SpaceNodeType) –
predicate (( panel : PluginComponentRegistration )) –
- Return type
Union<
undefined
,
plugins.fiftyone.spaces.PluginComponentRegistration()
>
usePanelContext¶
-
@fiftyone/spaces.
usePanelContext
()¶ - Return type
plugins.fiftyone.spaces.PanelContextType()
usePanelLoading¶
-
@fiftyone/spaces.
usePanelLoading
(id)¶ - Arguments
id (string) –
- Return type
[
boolean
,
( loading : boolean , id : string )
]
Get and set loading state of a panel
Note: id is optional if hook is used within the component of a panel.
usePanelState¶
-
@fiftyone/spaces.
usePanelState
(defaultState, id, local, scope)¶ - Arguments
defaultState (T) –
id (string) –
local (boolean) –
scope (string) –
- Return type
Array<
Union<
undefined
,
plugins.fiftyone.spaces.T()
,
SetterOrUpdater < T >
>
>
Get and set state of a panel
Note: id is optional if hook is used within the component of a panel.
usePanelStateByIdCallback¶
-
@fiftyone/spaces.
usePanelStateByIdCallback
(callback, local, scope)¶ - Arguments
callback (( panelId : string , panelState : T , args : )) –
local (boolean) –
scope () –
Returns a function that will run the callback that was passed when calling this hook. Useful for accessing Recoil state in response to events.
usePanelStateCallback¶
-
@fiftyone/spaces.
usePanelStateCallback
(callback, local, scope)¶ - Arguments
callback (( panelState : T )) –
local (boolean) –
scope (string) –
Can only be used within a panel component
@fiftyone/spaces.
panelStateCallback
()¶
- Arguments
args ([ ]) –
- Return type
Promise < void >
<
void
>
Returns a function that will run the callback that was passed when calling this hook. Useful for accessing Recoil state in response to events.
usePanelStateLazy¶
-
@fiftyone/spaces.
usePanelStateLazy
(local, scope)¶ - Arguments
local (boolean) –
scope (string) –
Lazily read panel state on demand
Returns
a state resolver function which return promise that resolves to the current state of a panel
@fiftyone/spaces.
panelStateLazy
()¶
- Return type
Promise < any >
<
any
>
usePanelStatePartial¶
-
@fiftyone/spaces.
usePanelStatePartial
(key, defaultState, local, scope)¶ - Arguments
key (string) –
defaultState (T) –
local (boolean) –
scope (string) –
- Return type
Array<
any
>
Get partial state of current panel (i.e. property of an object state)
- Should only be used within a panel component whose state is an object or
an array
usePanelTabAutoPosition¶
usePanelTitle¶
-
@fiftyone/spaces.
usePanelTitle
(id)¶ - Arguments
id (string) –
- Return type
readonly
Get and set title of a panel
Note: id is optional if hook is used within the component of a panel.
usePanels¶
-
@fiftyone/spaces.
usePanels
(predicate)¶ - Arguments
predicate (( panel : PluginComponentRegistration )) –
- Return type
Array<
plugins.fiftyone.spaces.PluginComponentRegistration()
<
Any
>
>
Hook to get all panels registered in the app, optionally filtered by a predicate.
usePanelsState¶
-
@fiftyone/spaces.
usePanelsState
()¶ - Return type
[
plugins.fiftyone.spaces.PanelsStateObject()
,
( newPanelsState : PanelsStateObject )
]
Get and set multiple panels state
useReactivePanel¶
-
@fiftyone/spaces.
useReactivePanel
(name)¶ - Arguments
name (SpaceNodeType) –
- Return type
Union<
undefined
,
plugins.fiftyone.spaces.PluginComponentRegistration()
>
useSetPanelCloseEffect¶
-
@fiftyone/spaces.
useSetPanelCloseEffect
(panelId)¶ - Arguments
panelId () –
useSetPanelStateById¶
-
@fiftyone/spaces.
useSetPanelStateById
(local, scope)¶ - Arguments
local (boolean) –
scope () –
Returns a function that will run the callback that was passed when calling this hook. Useful for accessing Recoil state in response to events.
Functions¶
SpacesRoot¶
-
@fiftyone/spaces.
SpacesRoot
(props)¶ - Arguments
props (SpacesRootProps) –
- Return type
Element
getNodes¶
-
@fiftyone/spaces.
getNodes
(node)¶ - Arguments
node (default) –
- Return type
Array<
plugins.fiftyone.spaces.SpaceNode()
>
Types¶
-
class
@fiftyone/spaces.
AddPanelButtonProps
()¶
AddPanelButtonProps¶
Name |
Type |
Description |
---|---|---|
AddPanelButtonProps.node |
|
|
AddPanelButtonProps.spaceId |
|
-
class
@fiftyone/spaces.
AddPanelItemProps
()¶
AddPanelItemProps¶
Name |
Type |
Description |
---|---|---|
AddPanelItemProps.Icon |
|
|
AddPanelItemProps.label |
|
|
AddPanelItemProps.name |
|
|
AddPanelItemProps.node |
|
|
AddPanelItemProps.onClick |
|
|
AddPanelItemProps.spaceId |
|
-
class
@fiftyone/spaces.
PanelIconProps
()¶
PanelIconProps¶
Name |
Type |
Description |
---|---|---|
PanelIconProps.name |
|
-
class
@fiftyone/spaces.
PanelProps
()¶
PanelProps¶
Name |
Type |
Description |
---|---|---|
PanelProps.isModalPanel |
|
|
PanelProps.node |
|
|
PanelProps.spaceId |
|
-
class
@fiftyone/spaces.
PanelStateParameter
()¶
PanelStateParameter¶
Name |
Type |
Description |
---|---|---|
PanelStateParameter.local |
|
|
PanelStateParameter.panelId |
|
|
PanelStateParameter.scope |
|
-
class
@fiftyone/spaces.
PanelStatePartialParameter
()¶
PanelTabProps¶
Name |
Type |
Description |
---|---|---|
PanelTabProps.active |
|
|
PanelTabProps.node |
|
|
PanelTabProps.spaceId |
|
-
class
@fiftyone/spaces.
PanelsCloseEffect
()¶
SpaceNodeJSON¶
Name |
Type |
Description |
---|---|---|
SpaceNodeJSON.activeChild |
||
SpaceNodeJSON.children |
|
|
SpaceNodeJSON.id |
||
SpaceNodeJSON.layout |
||
SpaceNodeJSON.pinned |
||
SpaceNodeJSON.sizes |
|
|
SpaceNodeJSON.type |
-
class
@fiftyone/spaces.
SpaceNodeType
()¶
SpaceProps¶
Name |
Type |
Description |
---|---|---|
SpaceProps.archetype |
|
|
SpaceProps.id |
|
|
SpaceProps.node |
|
-
class
@fiftyone/spaces.
SpacesRootProps
()¶
SpacesRootProps¶
Name |
Type |
Description |
---|---|---|
SpacesRootProps.defaultState |
|
|
SpacesRootProps.id |
|
-
class
@fiftyone/spaces.
SplitPanelButtonProps
()¶
SplitPanelButtonProps¶
Name |
Type |
Description |
---|---|---|
SplitPanelButtonProps.layout |
|
|
SplitPanelButtonProps.node |
|
|
SplitPanelButtonProps.spaceId |
|