Groupinterface
An object describing a group type workspace box
Properties (27)
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| allowDrop⚓︎ | boolean | x | x | Indicates if dropping windows inside this box is allowed |
| allowDropBottom⚓︎ | boolean | x | x | Controls the users ability to drop windows in the bottom zone of the group |
| allowDropHeader⚓︎ | boolean | x | x | Controls the users ability to drop windows in header zone of the group |
| allowDropLeft⚓︎ | boolean | x | x | Controls the users ability to drop windows in the left zone of the group |
| allowDropRight⚓︎ | boolean | x | x | Controls the users ability to drop windows in the right zone of the group |
| allowDropTop⚓︎ | boolean | x | x | Controls the users ability to drop windows in the top zone of the group |
| allowExtract⚓︎ | boolean | x | x | Controls the users ability to extract windows from the group |
| allowReorder⚓︎ | boolean | x | x | Controls the users ability to reorder windows in the group |
| children⚓︎ | WorkspaceElement[] | x | A collection containing the immediate children of this box |
|
| frame⚓︎ | Frame | x | An object representing the frame containing this box |
|
| frameId⚓︎ | string | x | The unique string identifier of the frame containing this box |
|
| height⚓︎ | number | x | x | Returns the current height of the box, can be undefined if the API is used with old versions of Enterprise or Core |
| id⚓︎ | string | x | An unique string identifier of this box |
|
| isMaximized⚓︎ | boolean | x | x | Returns whether or not the box is maximized |
| maxHeight⚓︎ | number | x | x | Returns the maximum height of the box, calculated by the size constraints of the elements inside it |
| maxWidth⚓︎ | number | x | x | Returns the maximum width of the box, calculated by the size constraints of the elements inside it |
| minHeight⚓︎ | number | x | x | Returns the minimum height of the box, calculated by the size constraints of the elements inside it |
| minWidth⚓︎ | number | x | x | Returns the minimum width of the box, calculated by the size constraints of the elements inside it |
| parent⚓︎ | Workspace | WorkspaceBox | x | An object representing this box's parent |
|
| positionIndex⚓︎ | number | x | An number representing the positing of this box relative to it's siblings |
|
| showAddWindowButton⚓︎ | boolean | x | x | Controls the visibility of the add window buttons (the ones with the plus icon) located in the group header |
| showEjectButton⚓︎ | boolean | x | x | Controls the visibility of the eject button located in the group header |
| showMaximizeButton⚓︎ | boolean | x | x | Controls the visibility of the maximize/restore button located in the group header |
| type⚓︎ | "group" | x | x | |
| width⚓︎ | number | x | x | Returns the current width of the box, can be undefined if the API is used with old versions of Enterprise or Core |
| workspace⚓︎ | Workspace | x | An object representing the workspace containing this box |
|
| workspaceId⚓︎ | string | x | The unique string identifier of the workspace containing this box |
13 Methods
addColumn()⚓︎
(definition?: BoxDefinition | BoxBuilder) => Promise<Column>
Adds a new column box to this box.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| definition⚓︎ | BoxDefinition | BoxBuilder | x | An object describing the type of the requested builder, alongside other settings. |
addGroup()⚓︎
(definition?: BoxDefinition | BoxBuilder) => Promise<Group>
Adds a new group box to this box.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| definition⚓︎ | BoxDefinition | BoxBuilder | x | An object describing the type of the requested builder, alongside other settings. |
addRow()⚓︎
(definition?: BoxDefinition | BoxBuilder) => Promise<Row>
Adds a new row box to this box.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| definition⚓︎ | BoxDefinition | BoxBuilder | x | An object describing the type of the requested builder, alongside other settings. |
addWindow()⚓︎
(definition: WorkspaceWindowDefinition) => Promise<WorkspaceWindow>
Opens a new window inside this box and loads it's content.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| definition⚓︎ | WorkspaceWindowDefinition | An object describing the requested window. |
bundleToColumn()⚓︎
() => Promise<void>
Changes the parent of the group to a new column that is added in the place of the group
bundleToRow()⚓︎
() => Promise<void>
Changes the parent of the group to a new row that is added in the place of the group
lock()⚓︎
(config?: GroupLockConfig | ((config: GroupLockConfig) => GroupLockConfig)) => Promise<void>
Locks the group using a provided config object, which restricts various modification functionalities of the group
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| config⚓︎ | GroupLockConfig | ((config: GroupLockConfig) => GroupLockConfig) | x | This can be either an object or a function. When the object is provided, it overrides all other lock properties. When a function is provided, it will be called with the current lock settings and it should return a lock config, which will override the current settings. The function is recommended in all cases where overriding of the settings is not desired. |
onLockConfigurationChanged()⚓︎
(callback: (config: GroupLockConfig) => void) => Promise<Unsubscribe>
Notifies when a change in the lock configuration of the group has been made
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| callback⚓︎ | (config: GroupLockConfig) => void | Callback function to handle the event. Receives the new lock configuration as a parameter |
removeChild()⚓︎
(predicate: (child: WorkspaceElement) => boolean) => Promise<void>
Removes the first immediate child of this box which satisfies the predicate.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| predicate⚓︎ | (child: WorkspaceElement) => boolean | A filtering function (predicate) called for immediate child of this box. |
setSize()⚓︎
(sizeConfig: ElementResizeConfig) => Promise<void>
Sets a new size for the group
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| sizeConfig⚓︎ | ElementResizeConfig | A config object which should be the new size of the group. |