UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

553 lines (473 loc) 19 kB
import * as i0 from '@angular/core'; import { PLATFORM_ID, Component, Inject, Input, Output, ContentChildren, NgModule } from '@angular/core'; import DxSplitter from 'devextreme/ui/splitter'; import * as i1 from 'devextreme-angular/core'; import { DxComponent, DxTemplateHost, WatcherHelper, NestedOptionHost, IterableDifferHelper, DxIntegrationModule, DxTemplateModule } from 'devextreme-angular/core'; import { DxiItemComponent, DxiItemModule, DxoSplitterModule } from 'devextreme-angular/ui/nested'; import { DxiSplitterItemComponent, DxiSplitterItemModule } from 'devextreme-angular/ui/splitter/nested'; /*! * devextreme-angular * Version: 24.2.6 * Build date: Mon Mar 17 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file in the root of the project for details. * * https://github.com/DevExpress/devextreme-angular */ /* tslint:disable:max-line-length */ /** * Splitter is a UI component that allows you to divide a page or section into multiple adjustable panes. */ class DxSplitterComponent extends DxComponent { _watcherHelper; _idh; instance = null; /** * Specifies whether to allow the Splitter to take focus and allow keyboard navigation. */ get allowKeyboardNavigation() { return this._getOption('allowKeyboardNavigation'); } set allowKeyboardNavigation(value) { this._setOption('allowKeyboardNavigation', value); } /** * Binds the UI component to data. */ get dataSource() { return this._getOption('dataSource'); } set dataSource(value) { this._setOption('dataSource', value); } /** * Specifies whether the UI component responds to user interaction. */ get disabled() { return this._getOption('disabled'); } set disabled(value) { this._setOption('disabled', value); } /** * Specifies the global attributes to be attached to the UI component's container element. */ get elementAttr() { return this._getOption('elementAttr'); } set elementAttr(value) { this._setOption('elementAttr', value); } /** * Specifies the UI component's height. */ get height() { return this._getOption('height'); } set height(value) { this._setOption('height', value); } /** * Specifies whether the UI component changes its state when a user pauses on it. */ get hoverStateEnabled() { return this._getOption('hoverStateEnabled'); } set hoverStateEnabled(value) { this._setOption('hoverStateEnabled', value); } /** * An array of items (panes) displayed by the UI component. */ get items() { return this._getOption('items'); } set items(value) { this._setOption('items', value); } /** * Specifies a custom template for items. */ get itemTemplate() { return this._getOption('itemTemplate'); } set itemTemplate(value) { this._setOption('itemTemplate', value); } /** * Specifies item orientation (layout). */ get orientation() { return this._getOption('orientation'); } set orientation(value) { this._setOption('orientation', value); } /** * Switches the UI component to a right-to-left representation. */ get rtlEnabled() { return this._getOption('rtlEnabled'); } set rtlEnabled(value) { this._setOption('rtlEnabled', value); } /** * Specifies the size of a separator bar in pixels. */ get separatorSize() { return this._getOption('separatorSize'); } set separatorSize(value) { this._setOption('separatorSize', value); } /** * Specifies whether the UI component is visible. */ get visible() { return this._getOption('visible'); } set visible(value) { this._setOption('visible', value); } /** * Specifies the UI component's width. */ get width() { return this._getOption('width'); } set width(value) { this._setOption('width', value); } /** * A function that is executed when the UI component is rendered and each time the component is repainted. */ onContentReady; /** * A function that is executed before the UI component is disposed of. */ onDisposing; /** * A function used to save the UI component instance. */ onInitialized; /** * A function that is executed when an item (pane) is clicked or tapped. */ onItemClick; /** * A function that is executed after an item (pane) is collapsed. */ onItemCollapsed; /** * A function that is executed when an item (pane) is right-clicked or pressed. */ onItemContextMenu; /** * A function that is executed after an item (pane) is expanded. */ onItemExpanded; /** * A function that is executed after an item (pane) is rendered. */ onItemRendered; /** * A function that is executed after a UI component property is changed. */ onOptionChanged; /** * A function that is executed each time an item (pane) is resized by one pixel. */ onResize; /** * A function that is called when resizing ends. */ onResizeEnd; /** * A function that is called when resizing starts. */ onResizeStart; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ allowKeyboardNavigationChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ dataSourceChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ disabledChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ elementAttrChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ heightChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ hoverStateEnabledChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ itemsChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ itemTemplateChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ orientationChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ rtlEnabledChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ separatorSizeChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ visibleChange; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ widthChange; get itemsChildren() { return this._getOption('items'); } set itemsChildren(value) { this._setChildren('items', value, 'DxiSplitterItemComponent'); } get itemsLegacyChildren() { return this._getOption('items'); } set itemsLegacyChildren(value) { this._setChildren('items', value, 'DxiItemComponent'); } constructor(elementRef, ngZone, templateHost, _watcherHelper, _idh, optionHost, transferState, platformId) { super(elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId); this._watcherHelper = _watcherHelper; this._idh = _idh; this._createEventEmitters([ { subscribe: 'contentReady', emit: 'onContentReady' }, { subscribe: 'disposing', emit: 'onDisposing' }, { subscribe: 'initialized', emit: 'onInitialized' }, { subscribe: 'itemClick', emit: 'onItemClick' }, { subscribe: 'itemCollapsed', emit: 'onItemCollapsed' }, { subscribe: 'itemContextMenu', emit: 'onItemContextMenu' }, { subscribe: 'itemExpanded', emit: 'onItemExpanded' }, { subscribe: 'itemRendered', emit: 'onItemRendered' }, { subscribe: 'optionChanged', emit: 'onOptionChanged' }, { subscribe: 'resize', emit: 'onResize' }, { subscribe: 'resizeEnd', emit: 'onResizeEnd' }, { subscribe: 'resizeStart', emit: 'onResizeStart' }, { emit: 'allowKeyboardNavigationChange' }, { emit: 'dataSourceChange' }, { emit: 'disabledChange' }, { emit: 'elementAttrChange' }, { emit: 'heightChange' }, { emit: 'hoverStateEnabledChange' }, { emit: 'itemsChange' }, { emit: 'itemTemplateChange' }, { emit: 'orientationChange' }, { emit: 'rtlEnabledChange' }, { emit: 'separatorSizeChange' }, { emit: 'visibleChange' }, { emit: 'widthChange' } ]); this._idh.setHost(this); optionHost.setHost(this); } _createInstance(element, options) { return new DxSplitter(element, options); } ngOnDestroy() { this._destroyWidget(); } ngOnChanges(changes) { super.ngOnChanges(changes); this.setupChanges('dataSource', changes); this.setupChanges('items', changes); } setupChanges(prop, changes) { if (!(prop in this._optionsToUpdate)) { this._idh.setup(prop, changes); } } ngDoCheck() { this._idh.doCheck('dataSource'); this._idh.doCheck('items'); this._watcherHelper.checkWatchers(); super.ngDoCheck(); super.clearChangedOptions(); } _setOption(name, value) { let isSetup = this._idh.setupSingle(name, value); let isChanged = this._idh.getChanges(name, value) !== null; if (isSetup || isChanged) { super._setOption(name, value); } } /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DxSplitterComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.DxTemplateHost }, { token: i1.WatcherHelper }, { token: i1.IterableDifferHelper }, { token: i1.NestedOptionHost }, { token: i0.TransferState }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DxSplitterComponent, selector: "dx-splitter", inputs: { allowKeyboardNavigation: "allowKeyboardNavigation", dataSource: "dataSource", disabled: "disabled", elementAttr: "elementAttr", height: "height", hoverStateEnabled: "hoverStateEnabled", items: "items", itemTemplate: "itemTemplate", orientation: "orientation", rtlEnabled: "rtlEnabled", separatorSize: "separatorSize", visible: "visible", width: "width" }, outputs: { onContentReady: "onContentReady", onDisposing: "onDisposing", onInitialized: "onInitialized", onItemClick: "onItemClick", onItemCollapsed: "onItemCollapsed", onItemContextMenu: "onItemContextMenu", onItemExpanded: "onItemExpanded", onItemRendered: "onItemRendered", onOptionChanged: "onOptionChanged", onResize: "onResize", onResizeEnd: "onResizeEnd", onResizeStart: "onResizeStart", allowKeyboardNavigationChange: "allowKeyboardNavigationChange", dataSourceChange: "dataSourceChange", disabledChange: "disabledChange", elementAttrChange: "elementAttrChange", heightChange: "heightChange", hoverStateEnabledChange: "hoverStateEnabledChange", itemsChange: "itemsChange", itemTemplateChange: "itemTemplateChange", orientationChange: "orientationChange", rtlEnabledChange: "rtlEnabledChange", separatorSizeChange: "separatorSizeChange", visibleChange: "visibleChange", widthChange: "widthChange" }, host: { attributes: { "ngSkipHydration": "true" } }, providers: [ DxTemplateHost, WatcherHelper, NestedOptionHost, IterableDifferHelper ], queries: [{ propertyName: "itemsChildren", predicate: DxiSplitterItemComponent }, { propertyName: "itemsLegacyChildren", predicate: DxiItemComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DxSplitterComponent, decorators: [{ type: Component, args: [{ selector: 'dx-splitter', template: '', host: { ngSkipHydration: 'true' }, providers: [ DxTemplateHost, WatcherHelper, NestedOptionHost, IterableDifferHelper ] }] }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.DxTemplateHost }, { type: i1.WatcherHelper }, { type: i1.IterableDifferHelper }, { type: i1.NestedOptionHost }, { type: i0.TransferState }, { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID] }] }], propDecorators: { allowKeyboardNavigation: [{ type: Input }], dataSource: [{ type: Input }], disabled: [{ type: Input }], elementAttr: [{ type: Input }], height: [{ type: Input }], hoverStateEnabled: [{ type: Input }], items: [{ type: Input }], itemTemplate: [{ type: Input }], orientation: [{ type: Input }], rtlEnabled: [{ type: Input }], separatorSize: [{ type: Input }], visible: [{ type: Input }], width: [{ type: Input }], onContentReady: [{ type: Output }], onDisposing: [{ type: Output }], onInitialized: [{ type: Output }], onItemClick: [{ type: Output }], onItemCollapsed: [{ type: Output }], onItemContextMenu: [{ type: Output }], onItemExpanded: [{ type: Output }], onItemRendered: [{ type: Output }], onOptionChanged: [{ type: Output }], onResize: [{ type: Output }], onResizeEnd: [{ type: Output }], onResizeStart: [{ type: Output }], allowKeyboardNavigationChange: [{ type: Output }], dataSourceChange: [{ type: Output }], disabledChange: [{ type: Output }], elementAttrChange: [{ type: Output }], heightChange: [{ type: Output }], hoverStateEnabledChange: [{ type: Output }], itemsChange: [{ type: Output }], itemTemplateChange: [{ type: Output }], orientationChange: [{ type: Output }], rtlEnabledChange: [{ type: Output }], separatorSizeChange: [{ type: Output }], visibleChange: [{ type: Output }], widthChange: [{ type: Output }], itemsChildren: [{ type: ContentChildren, args: [DxiSplitterItemComponent] }], itemsLegacyChildren: [{ type: ContentChildren, args: [DxiItemComponent] }] } }); class DxSplitterModule { /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DxSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: DxSplitterModule, declarations: [DxSplitterComponent], imports: [DxiItemModule, DxoSplitterModule, DxiSplitterItemModule, DxIntegrationModule, DxTemplateModule], exports: [DxSplitterComponent, DxiItemModule, DxoSplitterModule, DxiSplitterItemModule, DxTemplateModule] }); /** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DxSplitterModule, imports: [DxiItemModule, DxoSplitterModule, DxiSplitterItemModule, DxIntegrationModule, DxTemplateModule, DxiItemModule, DxoSplitterModule, DxiSplitterItemModule, DxTemplateModule] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DxSplitterModule, decorators: [{ type: NgModule, args: [{ imports: [ DxiItemModule, DxoSplitterModule, DxiSplitterItemModule, DxIntegrationModule, DxTemplateModule ], declarations: [ DxSplitterComponent ], exports: [ DxSplitterComponent, DxiItemModule, DxoSplitterModule, DxiSplitterItemModule, DxTemplateModule ] }] }] }); /** * Generated bundle index. Do not edit. */ export { DxSplitterComponent, DxSplitterModule }; //# sourceMappingURL=devextreme-angular-ui-splitter.mjs.map