UNPKG

devextreme-angular

Version:

Angular UI and visualization components based on DevExtreme widgets

718 lines (596 loc) 27.5 kB
/*! * 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 */ import { TransferState, ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges } from '@angular/core'; import PivotGridDataSource from 'devextreme/ui/pivot_grid/data_source'; import { PivotGridDataFieldArea, CellClickEvent, CellPreparedEvent, ContentReadyEvent, ContextMenuPreparingEvent, DisposingEvent, ExportingEvent, InitializedEvent, OptionChangedEvent, PivotGridRowHeaderLayout, PivotGridTotalDisplayMode } from 'devextreme/ui/pivot_grid'; import { PivotGridDataSourceOptions } from 'devextreme/ui/pivot_grid/data_source'; import { ApplyChangesMode, HeaderFilterSearchConfig, StateStoreType } from 'devextreme/common/grids'; import { FieldChooserLayout, ScrollMode, Mode } from 'devextreme/common'; import DxPivotGrid from 'devextreme/ui/pivot_grid'; import { DxComponent, DxTemplateHost, NestedOptionHost, IterableDifferHelper, WatcherHelper } from 'devextreme-angular/core'; import type * as DxPivotGridTypes from "devextreme/ui/pivot_grid_types"; import * as i0 from "@angular/core"; import * as i1 from "devextreme-angular/ui/nested"; import * as i2 from "devextreme-angular/ui/pivot-grid/nested"; import * as i3 from "devextreme-angular/core"; /** * The PivotGrid is a UI component that allows you to display and analyze multi-dimensional data from a local storage or an OLAP cube. */ export declare class DxPivotGridComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck { private _watcherHelper; private _idh; instance: DxPivotGrid; /** * Allows users to expand/collapse all header items within the same header level. Ignored if the PivotGridDataSource&apos;s paginate property is true. */ get allowExpandAll(): boolean; set allowExpandAll(value: boolean); /** * Allows a user to filter fields by selecting or deselecting values in the popup menu. */ get allowFiltering(): boolean; set allowFiltering(value: boolean); /** * Allows an end user to change sorting properties. */ get allowSorting(): boolean; set allowSorting(value: boolean); /** * Allows users to sort the pivot grid by summary values instead of field values. Ignored if the PivotGridDataSource&apos;s paginate property is true. */ get allowSortingBySummary(): boolean; set allowSortingBySummary(value: boolean); /** * Specifies the area to which data field headers must belong. */ get dataFieldArea(): PivotGridDataFieldArea; set dataFieldArea(value: PivotGridDataFieldArea); /** * Binds the UI component to data. */ get dataSource(): Array<any> | null | PivotGridDataSource | PivotGridDataSourceOptions; set dataSource(value: Array<any> | null | PivotGridDataSource | PivotGridDataSourceOptions); /** * Specifies whether the UI component responds to user interaction. */ get disabled(): boolean; set disabled(value: boolean); /** * Specifies the global attributes to be attached to the UI component&apos;s container element. */ get elementAttr(): Record<string, any>; set elementAttr(value: Record<string, any>); /** * Specifies whether HTML tags are displayed as plain text or applied to cell values. */ get encodeHtml(): boolean; set encodeHtml(value: boolean); /** * Configures client-side exporting. */ get export(): { enabled?: boolean; }; set export(value: { enabled?: boolean; }); /** * The Field Chooser configuration properties. */ get fieldChooser(): { allowSearch?: boolean; applyChangesMode?: ApplyChangesMode; enabled?: boolean; height?: number; layout?: FieldChooserLayout; searchTimeout?: number; texts?: { allFields?: string; columnFields?: string; dataFields?: string; filterFields?: string; rowFields?: string; }; title?: string; width?: number; }; set fieldChooser(value: { allowSearch?: boolean; applyChangesMode?: ApplyChangesMode; enabled?: boolean; height?: number; layout?: FieldChooserLayout; searchTimeout?: number; texts?: { allFields?: string; columnFields?: string; dataFields?: string; filterFields?: string; rowFields?: string; }; title?: string; width?: number; }); /** * Configures the field panel. */ get fieldPanel(): { allowFieldDragging?: boolean; showColumnFields?: boolean; showDataFields?: boolean; showFilterFields?: boolean; showRowFields?: boolean; texts?: { columnFieldArea?: string; dataFieldArea?: string; filterFieldArea?: string; rowFieldArea?: string; }; visible?: boolean; }; set fieldPanel(value: { allowFieldDragging?: boolean; showColumnFields?: boolean; showDataFields?: boolean; showFilterFields?: boolean; showRowFields?: boolean; texts?: { columnFieldArea?: string; dataFieldArea?: string; filterFieldArea?: string; rowFieldArea?: string; }; visible?: boolean; }); /** * Configures the header filter feature. */ get headerFilter(): { allowSearch?: boolean; allowSelectAll?: boolean; height?: number; search?: HeaderFilterSearchConfig; searchTimeout?: number; showRelevantValues?: boolean; texts?: { cancel?: string; emptyValue?: string; ok?: string; }; width?: number; }; set headerFilter(value: { allowSearch?: boolean; allowSelectAll?: boolean; height?: number; search?: HeaderFilterSearchConfig; searchTimeout?: number; showRelevantValues?: boolean; texts?: { cancel?: string; emptyValue?: string; ok?: string; }; width?: number; }); /** * Specifies the UI component&apos;s height. */ get height(): (() => number | string) | number | string | undefined; set height(value: (() => number | string) | number | string | undefined); /** * Specifies whether or not to hide rows and columns with no data. */ get hideEmptySummaryCells(): boolean; set hideEmptySummaryCells(value: boolean); /** * Specifies text for a hint that appears when a user pauses on the UI component. */ get hint(): string | undefined; set hint(value: string | undefined); /** * Specifies properties configuring the load panel. */ get loadPanel(): { enabled?: boolean; height?: number; indicatorSrc?: string; shading?: boolean; shadingColor?: string; showIndicator?: boolean; showPane?: boolean; text?: string; width?: number; }; set loadPanel(value: { enabled?: boolean; height?: number; indicatorSrc?: string; shading?: boolean; shadingColor?: string; showIndicator?: boolean; showPane?: boolean; text?: string; width?: number; }); /** * Specifies the layout of items in the row header. */ get rowHeaderLayout(): PivotGridRowHeaderLayout; set rowHeaderLayout(value: PivotGridRowHeaderLayout); /** * Switches the UI component to a right-to-left representation. */ get rtlEnabled(): boolean; set rtlEnabled(value: boolean); /** * A configuration object specifying scrolling properties. */ get scrolling(): { mode?: ScrollMode; useNative?: boolean | Mode; }; set scrolling(value: { mode?: ScrollMode; useNative?: boolean | Mode; }); /** * Specifies whether the outer borders of the grid are visible or not. */ get showBorders(): boolean; set showBorders(value: boolean); /** * Specifies whether to display the Grand Total column. */ get showColumnGrandTotals(): boolean; set showColumnGrandTotals(value: boolean); /** * Specifies whether to display the Total columns. */ get showColumnTotals(): boolean; set showColumnTotals(value: boolean); /** * Specifies whether to display the Grand Total row. */ get showRowGrandTotals(): boolean; set showRowGrandTotals(value: boolean); /** * Specifies whether to display the Total rows. Applies only if rowHeaderLayout is &apos;standard&apos;. */ get showRowTotals(): boolean; set showRowTotals(value: boolean); /** * Specifies where to show the total rows or columns. */ get showTotalsPrior(): PivotGridTotalDisplayMode; set showTotalsPrior(value: PivotGridTotalDisplayMode); /** * A configuration object specifying properties related to state storing. */ get stateStoring(): { customLoad?: Function; customSave?: ((state: any) => void); enabled?: boolean; savingTimeout?: number; storageKey?: string; type?: StateStoreType; }; set stateStoring(value: { customLoad?: Function; customSave?: ((state: any) => void); enabled?: boolean; savingTimeout?: number; storageKey?: string; type?: StateStoreType; }); /** * Specifies the number of the element when the Tab key is used for navigating. */ get tabIndex(): number; set tabIndex(value: number); /** * Strings that can be changed or localized in the PivotGrid UI component. */ get texts(): { collapseAll?: string; dataNotAvailable?: string; expandAll?: string; exportToExcel?: string; grandTotal?: string; noData?: string; removeAllSorting?: string; showFieldChooser?: string; sortColumnBySummary?: string; sortRowBySummary?: string; total?: string; }; set texts(value: { collapseAll?: string; dataNotAvailable?: string; expandAll?: string; exportToExcel?: string; grandTotal?: string; noData?: string; removeAllSorting?: string; showFieldChooser?: string; sortColumnBySummary?: string; sortRowBySummary?: string; total?: string; }); /** * Specifies whether the UI component is visible. */ get visible(): boolean; set visible(value: boolean); /** * Specifies the UI component&apos;s width. */ get width(): (() => number | string) | number | string | undefined; set width(value: (() => number | string) | number | string | undefined); /** * Specifies whether long text in header items should be wrapped. */ get wordWrapEnabled(): boolean; set wordWrapEnabled(value: boolean); /** * A function that is executed when a pivot grid cell is clicked or tapped. */ onCellClick: EventEmitter<CellClickEvent>; /** * A function that is executed after a pivot grid cell is created. */ onCellPrepared: EventEmitter<CellPreparedEvent>; /** * A function that is executed when the UI component is rendered and each time the component is repainted. */ onContentReady: EventEmitter<ContentReadyEvent>; /** * A function that is executed before the context menu is rendered. */ onContextMenuPreparing: EventEmitter<ContextMenuPreparingEvent>; /** * A function that is executed before the UI component is disposed of. */ onDisposing: EventEmitter<DisposingEvent>; /** * A function that is executed before data is exported. */ onExporting: EventEmitter<ExportingEvent>; /** * A function used in JavaScript frameworks to save the UI component instance. */ onInitialized: EventEmitter<InitializedEvent>; /** * A function that is executed after a UI component property is changed. */ onOptionChanged: EventEmitter<OptionChangedEvent>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ allowExpandAllChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ allowFilteringChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ allowSortingChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ allowSortingBySummaryChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ dataFieldAreaChange: EventEmitter<PivotGridDataFieldArea>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ dataSourceChange: EventEmitter<Array<any> | null | PivotGridDataSource | PivotGridDataSourceOptions>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ disabledChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ elementAttrChange: EventEmitter<Record<string, any>>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ encodeHtmlChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ exportChange: EventEmitter<{ enabled?: boolean; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ fieldChooserChange: EventEmitter<{ allowSearch?: boolean; applyChangesMode?: ApplyChangesMode; enabled?: boolean; height?: number; layout?: FieldChooserLayout; searchTimeout?: number; texts?: { allFields?: string; columnFields?: string; dataFields?: string; filterFields?: string; rowFields?: string; }; title?: string; width?: number; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ fieldPanelChange: EventEmitter<{ allowFieldDragging?: boolean; showColumnFields?: boolean; showDataFields?: boolean; showFilterFields?: boolean; showRowFields?: boolean; texts?: { columnFieldArea?: string; dataFieldArea?: string; filterFieldArea?: string; rowFieldArea?: string; }; visible?: boolean; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ headerFilterChange: EventEmitter<{ allowSearch?: boolean; allowSelectAll?: boolean; height?: number; search?: HeaderFilterSearchConfig; searchTimeout?: number; showRelevantValues?: boolean; texts?: { cancel?: string; emptyValue?: string; ok?: string; }; width?: number; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ heightChange: EventEmitter<(() => number | string) | number | string | undefined>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ hideEmptySummaryCellsChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ hintChange: EventEmitter<string | undefined>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ loadPanelChange: EventEmitter<{ enabled?: boolean; height?: number; indicatorSrc?: string; shading?: boolean; shadingColor?: string; showIndicator?: boolean; showPane?: boolean; text?: string; width?: number; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ rowHeaderLayoutChange: EventEmitter<PivotGridRowHeaderLayout>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ rtlEnabledChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ scrollingChange: EventEmitter<{ mode?: ScrollMode; useNative?: boolean | Mode; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showBordersChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showColumnGrandTotalsChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showColumnTotalsChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showRowGrandTotalsChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showRowTotalsChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ showTotalsPriorChange: EventEmitter<PivotGridTotalDisplayMode>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ stateStoringChange: EventEmitter<{ customLoad?: Function; customSave?: ((state: any) => void); enabled?: boolean; savingTimeout?: number; storageKey?: string; type?: StateStoreType; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ tabIndexChange: EventEmitter<number>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ textsChange: EventEmitter<{ collapseAll?: string; dataNotAvailable?: string; expandAll?: string; exportToExcel?: string; grandTotal?: string; noData?: string; removeAllSorting?: string; showFieldChooser?: string; sortColumnBySummary?: string; sortRowBySummary?: string; total?: string; }>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ visibleChange: EventEmitter<boolean>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ widthChange: EventEmitter<(() => number | string) | number | string | undefined>; /** * This member supports the internal infrastructure and is not intended to be used directly from your code. */ wordWrapEnabledChange: EventEmitter<boolean>; constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any); protected _createInstance(element: any, options: any): DxPivotGrid; ngOnDestroy(): void; ngOnChanges(changes: SimpleChanges): void; setupChanges(prop: string, changes: SimpleChanges): void; ngDoCheck(): void; _setOption(name: string, value: any): void; static ɵfac: i0.ɵɵFactoryDeclaration<DxPivotGridComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DxPivotGridComponent, "dx-pivot-grid", never, { "allowExpandAll": { "alias": "allowExpandAll"; "required": false; }; "allowFiltering": { "alias": "allowFiltering"; "required": false; }; "allowSorting": { "alias": "allowSorting"; "required": false; }; "allowSortingBySummary": { "alias": "allowSortingBySummary"; "required": false; }; "dataFieldArea": { "alias": "dataFieldArea"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "elementAttr": { "alias": "elementAttr"; "required": false; }; "encodeHtml": { "alias": "encodeHtml"; "required": false; }; "export": { "alias": "export"; "required": false; }; "fieldChooser": { "alias": "fieldChooser"; "required": false; }; "fieldPanel": { "alias": "fieldPanel"; "required": false; }; "headerFilter": { "alias": "headerFilter"; "required": false; }; "height": { "alias": "height"; "required": false; }; "hideEmptySummaryCells": { "alias": "hideEmptySummaryCells"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "loadPanel": { "alias": "loadPanel"; "required": false; }; "rowHeaderLayout": { "alias": "rowHeaderLayout"; "required": false; }; "rtlEnabled": { "alias": "rtlEnabled"; "required": false; }; "scrolling": { "alias": "scrolling"; "required": false; }; "showBorders": { "alias": "showBorders"; "required": false; }; "showColumnGrandTotals": { "alias": "showColumnGrandTotals"; "required": false; }; "showColumnTotals": { "alias": "showColumnTotals"; "required": false; }; "showRowGrandTotals": { "alias": "showRowGrandTotals"; "required": false; }; "showRowTotals": { "alias": "showRowTotals"; "required": false; }; "showTotalsPrior": { "alias": "showTotalsPrior"; "required": false; }; "stateStoring": { "alias": "stateStoring"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "texts": { "alias": "texts"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "width": { "alias": "width"; "required": false; }; "wordWrapEnabled": { "alias": "wordWrapEnabled"; "required": false; }; }, { "onCellClick": "onCellClick"; "onCellPrepared": "onCellPrepared"; "onContentReady": "onContentReady"; "onContextMenuPreparing": "onContextMenuPreparing"; "onDisposing": "onDisposing"; "onExporting": "onExporting"; "onInitialized": "onInitialized"; "onOptionChanged": "onOptionChanged"; "allowExpandAllChange": "allowExpandAllChange"; "allowFilteringChange": "allowFilteringChange"; "allowSortingChange": "allowSortingChange"; "allowSortingBySummaryChange": "allowSortingBySummaryChange"; "dataFieldAreaChange": "dataFieldAreaChange"; "dataSourceChange": "dataSourceChange"; "disabledChange": "disabledChange"; "elementAttrChange": "elementAttrChange"; "encodeHtmlChange": "encodeHtmlChange"; "exportChange": "exportChange"; "fieldChooserChange": "fieldChooserChange"; "fieldPanelChange": "fieldPanelChange"; "headerFilterChange": "headerFilterChange"; "heightChange": "heightChange"; "hideEmptySummaryCellsChange": "hideEmptySummaryCellsChange"; "hintChange": "hintChange"; "loadPanelChange": "loadPanelChange"; "rowHeaderLayoutChange": "rowHeaderLayoutChange"; "rtlEnabledChange": "rtlEnabledChange"; "scrollingChange": "scrollingChange"; "showBordersChange": "showBordersChange"; "showColumnGrandTotalsChange": "showColumnGrandTotalsChange"; "showColumnTotalsChange": "showColumnTotalsChange"; "showRowGrandTotalsChange": "showRowGrandTotalsChange"; "showRowTotalsChange": "showRowTotalsChange"; "showTotalsPriorChange": "showTotalsPriorChange"; "stateStoringChange": "stateStoringChange"; "tabIndexChange": "tabIndexChange"; "textsChange": "textsChange"; "visibleChange": "visibleChange"; "widthChange": "widthChange"; "wordWrapEnabledChange": "wordWrapEnabledChange"; }, never, never, false, never>; } export declare class DxPivotGridModule { static ɵfac: i0.ɵɵFactoryDeclaration<DxPivotGridModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<DxPivotGridModule, [typeof DxPivotGridComponent], [typeof i1.DxoExportModule, typeof i1.DxoFieldChooserModule, typeof i1.DxoTextsModule, typeof i1.DxoFieldPanelModule, typeof i1.DxoHeaderFilterModule, typeof i1.DxoSearchModule, typeof i1.DxoLoadPanelModule, typeof i1.DxoScrollingModule, typeof i1.DxoStateStoringModule, typeof i2.DxoPivotGridExportModule, typeof i2.DxoPivotGridFieldChooserModule, typeof i2.DxoPivotGridFieldChooserTextsModule, typeof i2.DxoPivotGridFieldPanelModule, typeof i2.DxoPivotGridFieldPanelTextsModule, typeof i2.DxoPivotGridHeaderFilterModule, typeof i2.DxoPivotGridHeaderFilterTextsModule, typeof i2.DxoPivotGridLoadPanelModule, typeof i2.DxoPivotGridPivotGridTextsModule, typeof i2.DxoPivotGridScrollingModule, typeof i2.DxoPivotGridSearchModule, typeof i2.DxoPivotGridStateStoringModule, typeof i2.DxoPivotGridTextsModule, typeof i3.DxIntegrationModule, typeof i3.DxTemplateModule], [typeof DxPivotGridComponent, typeof i1.DxoExportModule, typeof i1.DxoFieldChooserModule, typeof i1.DxoTextsModule, typeof i1.DxoFieldPanelModule, typeof i1.DxoHeaderFilterModule, typeof i1.DxoSearchModule, typeof i1.DxoLoadPanelModule, typeof i1.DxoScrollingModule, typeof i1.DxoStateStoringModule, typeof i2.DxoPivotGridExportModule, typeof i2.DxoPivotGridFieldChooserModule, typeof i2.DxoPivotGridFieldChooserTextsModule, typeof i2.DxoPivotGridFieldPanelModule, typeof i2.DxoPivotGridFieldPanelTextsModule, typeof i2.DxoPivotGridHeaderFilterModule, typeof i2.DxoPivotGridHeaderFilterTextsModule, typeof i2.DxoPivotGridLoadPanelModule, typeof i2.DxoPivotGridPivotGridTextsModule, typeof i2.DxoPivotGridScrollingModule, typeof i2.DxoPivotGridSearchModule, typeof i2.DxoPivotGridStateStoringModule, typeof i2.DxoPivotGridTextsModule, typeof i3.DxTemplateModule]>; static ɵinj: i0.ɵɵInjectorDeclaration<DxPivotGridModule>; } export { DxPivotGridTypes };