ViewService reference
LoggerService reference
Tabs that should be initially opened in the tab view
Injector
instance of the TabViewComponent,
to be passed onto each tab, so that the dependency injection tree is not broken
Holds the tabs that are opened in the tab view, and allows them to be bound to HTML.
Holds the index of the currently selected tab.
Selected index initializes to 0
.
Closes the tab at the given index.
If the conditions for closing a tab are not met throws an Error
with the given message.
index of the tab that should be closed
when true
closes a tab even if it's cantBeClosed
attribute is set to true
the message that should be displayed if the conditions for closing a tab are not met
Closes the tab with the given index
.
Throws an error if the index
is invalid.
Throws an error if the tab has it's canBeClosed
property set to false
.
index of the tab that should be closed
when true
closes a tab even if it's cantBeClosed
attribute is set to true
Closes the tab with the given uniqueId
. Throws an error if the uniqueId
is invalid.
Throws an error if the tab has it's canBeClosed
property set to false
.
id of the tab that should be closed
when true
closes a tab even if it's cantBeClosed
attribute is set to true
the index of the currently selected tab
Transforms a tab uniqueId
into it's index.
Throws an error if no tab with the given uniqueId
exists.
id of the tab that we want to find index for
index of the tab with the given id
Initializes the tab if it wasn't initialized yet.
Creates a new {@link ComponentPortal} for the tab and provides the data for the tab under the NAE_TAB_DATA
injection token.
index of the tab that should be initialized
Adds a new tab into the correct position based on its order
property.
the tab that should be opened
whether the new tab should be switched to after it is created
the uniqueId
of the opened tab
Opens a new tab with the provided content.
content of the new tab
whether the newly opened tab should be switched to. Defaults to false
.
whether the opened tab already existing should be switched to existing one. Defaults to true
.
the tabUniqueId
of the newly opened tab
Switches to a tab with the given index
.
Throws an error if the index
is invalid.
index of the tab that should be switched to
Switches to a tab with the given uniqueId
.
Throws an error if the uniqueId
is invalid.
id of the tab that should be switched to
Generated using TypeDoc
Holds the logic for tab management in AbstractTabViewComponent. If you want to implement your own TabViewComponent, you might want to extend this class to hold your logic.