src/ui/mdi/smart-mdi.component.ts
A Component used for MDI-style navigation of SCL apps.
AfterViewInit
OnInit
OnDestroy
| changeDetection | ChangeDetectionStrategy.Eager |
| selector | smart-mdi |
| styleUrls | ./smart-mdi.component.css |
| templateUrl | ./smart-mdi.component.html |
| viewProviders |
|
Properties |
Methods |
Inputs |
Outputs |
Accessors |
constructor(router: Router, location: Location, serviceAdapter: SmartServiceAdapter, registry: SmartMdiRegistryService, smartConfig: SmartConfig, viewManager: SmartViewManagerService, locationStrategy: LocationStrategy, changeDetector: ChangeDetectorRef, windowTitle: SmartWindowTitleService, logger: SmartLoggerService)
|
|||||||||||||||||||||||||||||||||
|
Parameters :
|
| disableKeyboardControls |
Type : boolean
|
|
If set to false, will disable keyboard controls for the MDI interface. |
| tabClosed |
Type : EventEmitter<SmartTab>
|
|
Fires when a SmartTab is closed. |
| tabOpened |
Type : EventEmitter<SmartTab>
|
|
Fires when a SmartTab is opened. |
| closeAll |
closeAll()
|
|
Closes all opened tabs
Returns :
void
|
| closeTab | ||||||
closeTab(tab: SmartTab)
|
||||||
|
Closes and discards the given SmartTab.
Parameters :
Returns :
void
|
| showForm | ||||||||||||||||||||
showForm(formName: string, paramMap: any, sameTab: unknown, routeParams: any)
|
||||||||||||||||||||
|
Shows the given form, using the given parameter map. If a tab is already showing the given form, that tab will be selected instead of a new one being opened.
Parameters :
Returns :
void
|
| switchTab | ||||||
switchTab(tab: SmartTab)
|
||||||
|
Switches to the given SmartTab.
Parameters :
Returns :
void
|
| tabSelected | ||||||
tabSelected(event: SelectEvent)
|
||||||
|
Called by the TabStripComponent when a tab is selected.
Parameters :
Returns :
void
|
| currentTab |
Type : SmartTab
|
|
The currently selected SmartTab. |
| tabStrip |
Type : TabStripComponent
|
Decorators :
@ViewChild(TabStripComponent)
|
|
The underlying TabStripComponent. |
| authenticated | ||||||||
getauthenticated()
|
||||||||
|
Returns the authenticated state.
Returns :
boolean
|
||||||||
setauthenticated(value: boolean)
|
||||||||
|
Sets the authenticated state.
Parameters :
Returns :
void
|
| activeTabs | ||||||||
getactiveTabs()
|
||||||||
|
Returns the currently opened tabs.
Returns :
SmartTab[]
|
||||||||
setactiveTabs(value: SmartTab[])
|
||||||||
|
Sets the currently opened tabs.
Parameters :
Returns :
void
|
| breadcrumbNavigation | ||||||||
getbreadcrumbNavigation()
|
||||||||
|
Returns whether tabs should display a breadcrumb trail.
Returns :
boolean
|
||||||||
setbreadcrumbNavigation(value: boolean)
|
||||||||
|
Sets whether tabs should display a breadcrumb trail.
Parameters :
Returns :
void
|
| mdiInterface | ||||||||
getmdiInterface()
|
||||||||
|
Returns the MDI interface state.
Returns :
boolean
|
||||||||
setmdiInterface(value: boolean)
|
||||||||
|
Sets the MDI interface state.
Parameters :
Returns :
void
|
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**************************************************************************
--------------------------------------------------------------------------
File : smart-mdi.component.html
Purpose : Template for Smart Mdi.
Author(s) : Radu Nicoara
Created : Dec 07, 2017
--------------------------------------------------------------------------
-->
@if (_authenticatedSignal() && _activeTabsSignal().length > 0) {
<kendo-tabstrip [keepTabContent]="true" (tabSelect)="tabSelected($event)">
@for (tab of _activeTabsSignal(); track tab) {
<kendo-tabstrip-tab [selected]="tab.selected">
<ng-template kendoTabTitle>
@if (tab.canGoBack && !!tab.title) {
<span [ngClass]="{ disabled: tab.inUpdateMode}" (click)="tab.navigateBack()">← </span>
}
<span>{{tab.title}}</span>
<span (click)="closeTab(tab)"> ×</span>
</ng-template>
<ng-template kendoTabContent>
<smart-tab [tab]="tab" [breadcrumbNavigation]="_breadcrumbNavigationSignal()"></smart-tab>
</ng-template>
</kendo-tabstrip-tab>
}
</kendo-tabstrip>
}
@if (_mdiInterfaceSignal()) {
<router-outlet name="smart-mdi-tab"></router-outlet>
}
./smart-mdi.component.css
/**********************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") - *
* www.consultingwerk.com and other contributors as listed *
* below. All Rights Reserved. *
* *
* Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY *
* KIND, either express or implied. *
* *
* Contributors: *
* *
**********************************************************************/
/*------------------------------------------------------------------------
File : smart-mdi.component.css
Purpose : Styles for Smart Mdi.
Author(s) : Radu Nicoara
Created : Dec 07, 2017
----------------------------------------------------------------------*/
.smart-tab-header {
cursor: pointer !important
}
::ng-deep span.disabled {
color: lightgray !important;
cursor: default !important;
}
::ng-deep .k-tabstrip>.k-content {
border-color: rgba(0, 0, 0, .08) !important;
}