UNPKG

@progress/kendo-angular-treelist

Version:

Kendo UI TreeList for Angular - Display hierarchical data in an Angular tree grid view that supports sorting, filtering, paging, and much more.

62 lines (61 loc) 3.17 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Component, HostBinding, Input } from '@angular/core'; import { isPresent } from '../../utils'; import * as i0 from "@angular/core"; /** * Represents the Kendo UI TreeListSpacer component for Angular. * Use this component to add extra white space between Pager inner elements or to customize the spacer width. * You can also use it in any flex container within the TreeList. [See example](slug:toolbartemplate_treelist#toc-defining-the-spacing-between-toolbar-elements). * * @example * ```html * <kendo-treelist [data]="data" [fetchChildren]="fetchChildren" [hasChildren]="hasChildren"> * <ng-template kendoTreeListToolbarTemplate> * <kendo-treelist-spacer></kendo-treelist-spacer> * <button type="button" kendoTreeListExcelCommand [svgIcon]="fileExcelIcon"> Export to Excel </button> * <kendo-treelist-spacer></kendo-treelist-spacer> * </ng-template> * <kendo-treelist-column field="ProductName" title="Product Name"></kendo-treelist-column> * </kendo-treelist> * ``` */ export class TreeListSpacerComponent { hostClass = true; get sizedClass() { return isPresent(this.width); } get flexBasisStyle() { return this.width; } /** * Specifies the width of the TreeListSpacer. * Accepts string values for the [CSS `flex-basis` property](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis). * * If not set, the TreeListSpacer takes all available space. */ width; static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TreeListSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: TreeListSpacerComponent, isStandalone: true, selector: "kendo-treelist-spacer", inputs: { width: "width" }, host: { properties: { "class.k-spacer": "this.hostClass", "class.k-spacer-sized": "this.sizedClass", "style.flexBasis": "this.flexBasisStyle" } }, ngImport: i0, template: ``, isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TreeListSpacerComponent, decorators: [{ type: Component, args: [{ selector: 'kendo-treelist-spacer', template: ``, standalone: true }] }], propDecorators: { hostClass: [{ type: HostBinding, args: ['class.k-spacer'] }], sizedClass: [{ type: HostBinding, args: ['class.k-spacer-sized'] }], flexBasisStyle: [{ type: HostBinding, args: ['style.flexBasis'] }], width: [{ type: Input }] } });