File

src/ui/breadcrumbs/smart-mdi-breacrumb-navigation.component.ts

Description

A component used to show the navigation trail within a MDI tab.

Implements

OnInit DoCheck OnDestroy IBreadCrumbComponent

Metadata

Index

Properties
Methods
Inputs
Accessors

Constructor

constructor(serviceAdapter: SmartServiceAdapter, viewManager: SmartViewManagerService, breadcrumbRegistry: SmartBreadcrumbRegistryService, router: Router, smartConfig: SmartConfig, logger: SmartLoggerService)
Parameters :
Name Type Optional
serviceAdapter SmartServiceAdapter No
viewManager SmartViewManagerService No
breadcrumbRegistry SmartBreadcrumbRegistryService No
router Router No
smartConfig SmartConfig No
logger SmartLoggerService No

Inputs

disabled
Type : boolean

Determines whether the breadcrumb component is disabled

mdiTab
Type : SmartTab

The tab that the MDI Breadcrumb instance is loaded on.

Methods

navigate
navigate(breadcrumb: MDIBreadCrumb)

Navigates the SmartTab to the route represented by the given breadcrumb.

Parameters :
Name Type Optional
breadcrumb MDIBreadCrumb No
Returns : any

Properties

breadcrumbs
Type : MDIBreadCrumb[]
Default value : []

The breadcrumbs that are currently being displayed.

Public smartConfig
Type : SmartConfig

Accessors

mdiTab
getmdiTab()
Returns : SmartTab
setmdiTab(value: SmartTab)

The tab that the MDI Breadcrumb instance is loaded on.

Parameters :
Name Type Optional
value SmartTab No
Returns : void
inUpdateMode
getinUpdateMode()
Returns : boolean
<!--
**************************************************************************
* 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-breadcrumb-navigation.component.html
    Purpose     : Template for Smart Mdi Breadcrumb Navigation.
    Author(s)   : Radu Nicoara
    Created     : Dec 07, 2017
--------------------------------------------------------------------------
-->
@if (smartConfig.showSingleBreadcrumb !== false || breadcrumbs.length > 1) {
<nav
	class="d-flex align-items-center smart-breadcrumb-navigation"
	[ngClass]="{ disabled: disabled || inUpdateMode }"
>
	<ol class="breadcrumb m-0 p-0 bg-transparent">
		@for (item of breadcrumbs; track item; let i = $index; let last = $last)
		{
		<li class="breadcrumb-item">
			<a
				class="smart-breadcrumb-label"
				[ngClass]="{
					disabled: disabled || inUpdateMode,
					'is-last': last
				}"
				(click)="navigate(item)"
			>
				{{ item.label }}
			</a>
			@if (!last) {
			<span class="breadcrumb-separator">/</span>
			}
		</li>
		}
	</ol>
</nav>
}

./smart-mdi-breadcrumb-navigation.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-breadcrumb-navigation.component.css
    Purpose     : Styles for Smart Mdi Breadcrumb Navigation.
    Author(s)   : Radu Nicoara
    Created     : Dec 07, 2017
  ----------------------------------------------------------------------*/

/* Kendo-styled MDI breadcrumb navigation using Bootstrap utilities + Kendo variables */
.smart-breadcrumb-navigation {
    font-family: var(--kendo-font-family, inherit);
    font-size: var(--kendo-font-size, 0.875rem);
    line-height: var(--kendo-line-height, 1.5);
}

.smart-breadcrumb-navigation .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--kendo-spacing-1, 0.25rem);
}

.smart-breadcrumb-navigation .breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--kendo-spacing-1, 0.25rem);
}

.smart-breadcrumb-navigation .smart-breadcrumb-label {
    color: var(--kendo-color-primary, #0d6efd);
    text-decoration: none;
    cursor: pointer;
    padding: var(--kendo-spacing-1, 0.25rem) var(--kendo-spacing-2, 0.5rem);
    border-radius: var(--kendo-border-radius-md, 0.375rem);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.smart-breadcrumb-navigation .smart-breadcrumb-label:hover {
    color: var(--kendo-color-primary-hover, #0c64e4);
    text-decoration: none;
}

.smart-breadcrumb-navigation .smart-breadcrumb-label:focus {
    outline: 2px solid var(--kendo-color-primary-emphasis, rgba(13, 110, 253, 0.4));
    outline-offset: 2px;
}

.smart-breadcrumb-navigation .smart-breadcrumb-label.disabled {
    color: var(--kendo-color-subtle, #596169);
    cursor: default;
    pointer-events: none;
}

.smart-breadcrumb-navigation .smart-breadcrumb-label.is-last {
    color: var(--kendo-color-on-app-surface, #212529);
    cursor: default;
    font-weight: var(--kendo-font-weight-semibold, 600);
}

.smart-breadcrumb-navigation .breadcrumb-separator {
    color: var(--kendo-color-subtle, #596169);
    font-size: var(--kendo-font-size-sm, 0.75rem);
    user-select: none;
}

.smart-breadcrumb-navigation.disabled {
    opacity: 0.6;
    pointer-events: none;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""