diff --git a/packages/devextreme-angular/src/common/grids/index.ts b/packages/devextreme-angular/src/common/grids/index.ts index 361c09678876..df82c809f91b 100644 --- a/packages/devextreme-angular/src/common/grids/index.ts +++ b/packages/devextreme-angular/src/common/grids/index.ts @@ -46,8 +46,6 @@ export { NewRowInfo, NewRowPosition, Pager, - PagerDisplayMode, - PagerPageSize, PagingBase, RowDragging, RowDraggingTemplateData, diff --git a/packages/devextreme-angular/src/ui/data-grid/nested/pager.ts b/packages/devextreme-angular/src/ui/data-grid/nested/pager.ts index 34e4ecc6ada0..601e683189ba 100644 --- a/packages/devextreme-angular/src/ui/data-grid/nested/pager.ts +++ b/packages/devextreme-angular/src/ui/data-grid/nested/pager.ts @@ -14,7 +14,7 @@ import { -import { Mode, PagerAllPagesMode, PagerDisplayMode } from 'devextreme/common'; +import { Mode, PagerDisplayMode, PagerPageSize } from 'devextreme/common'; import { NestedOptionHost, @@ -30,10 +30,10 @@ import { NestedOption } from 'devextreme-angular/core'; }) export class DxoDataGridPagerComponent extends NestedOption implements OnDestroy, OnInit { @Input() - get allowedPageSizes(): string | Array { + get allowedPageSizes(): Mode | Array { return this._getOption('allowedPageSizes'); } - set allowedPageSizes(value: string | Array) { + set allowedPageSizes(value: Mode | Array) { this._setOption('allowedPageSizes', value); } diff --git a/packages/devextreme-angular/src/ui/nested/base/pager.ts b/packages/devextreme-angular/src/ui/nested/base/pager.ts index c19ff8df6113..f530d345e02e 100644 --- a/packages/devextreme-angular/src/ui/nested/base/pager.ts +++ b/packages/devextreme-angular/src/ui/nested/base/pager.ts @@ -5,16 +5,16 @@ import { Component, } from '@angular/core'; -import { Mode, PagerAllPagesMode, PagerDisplayMode } from 'devextreme/common'; +import { Mode, PagerDisplayMode, PagerPageSize } from 'devextreme/common'; @Component({ template: '' }) export abstract class DxoPager extends NestedOption { - get allowedPageSizes(): string | Array { + get allowedPageSizes(): Mode | Array { return this._getOption('allowedPageSizes'); } - set allowedPageSizes(value: string | Array) { + set allowedPageSizes(value: Mode | Array) { this._setOption('allowedPageSizes', value); } diff --git a/packages/devextreme-angular/src/ui/tree-list/nested/pager.ts b/packages/devextreme-angular/src/ui/tree-list/nested/pager.ts index de8e045316a7..b8a214bfba5d 100644 --- a/packages/devextreme-angular/src/ui/tree-list/nested/pager.ts +++ b/packages/devextreme-angular/src/ui/tree-list/nested/pager.ts @@ -14,7 +14,7 @@ import { -import { Mode, PagerAllPagesMode, PagerDisplayMode } from 'devextreme/common'; +import { Mode, PagerDisplayMode, PagerPageSize } from 'devextreme/common'; import { NestedOptionHost, @@ -30,10 +30,10 @@ import { NestedOption } from 'devextreme-angular/core'; }) export class DxoTreeListPagerComponent extends NestedOption implements OnDestroy, OnInit { @Input() - get allowedPageSizes(): string | Array { + get allowedPageSizes(): Mode | Array { return this._getOption('allowedPageSizes'); } - set allowedPageSizes(value: string | Array) { + set allowedPageSizes(value: Mode | Array) { this._setOption('allowedPageSizes', value); } diff --git a/packages/devextreme-react/src/common/grids.ts b/packages/devextreme-react/src/common/grids.ts index 6ccb67c5afa2..4b5dacb77e6c 100644 --- a/packages/devextreme-react/src/common/grids.ts +++ b/packages/devextreme-react/src/common/grids.ts @@ -46,8 +46,6 @@ export { NewRowInfo, NewRowPosition, Pager, - PagerDisplayMode, - PagerPageSize, PagingBase, RowDragging, RowDraggingTemplateData, diff --git a/packages/devextreme-react/src/data-grid.ts b/packages/devextreme-react/src/data-grid.ts index 1d7d72ca00d8..5a7a242e658d 100644 --- a/packages/devextreme-react/src/data-grid.ts +++ b/packages/devextreme-react/src/data-grid.ts @@ -1953,7 +1953,7 @@ const OperationDescriptions: typeof _componentOperationDescriptions & IElementDe // owners: // DataGrid type IPagerProps = React.PropsWithChildren<{ - allowedPageSizes?: Array | "auto"; + allowedPageSizes?: Array | "auto"; displayMode?: "adaptive" | "compact" | "full"; infoText?: string; label?: string; diff --git a/packages/devextreme-react/src/tree-list.ts b/packages/devextreme-react/src/tree-list.ts index eee95966cf15..801eea1f7bcc 100644 --- a/packages/devextreme-react/src/tree-list.ts +++ b/packages/devextreme-react/src/tree-list.ts @@ -1658,7 +1658,7 @@ const OperationDescriptions: typeof _componentOperationDescriptions & IElementDe // owners: // TreeList type IPagerProps = React.PropsWithChildren<{ - allowedPageSizes?: Array | "auto"; + allowedPageSizes?: Array | "auto"; displayMode?: "adaptive" | "compact" | "full"; infoText?: string; label?: string; diff --git a/packages/devextreme-vue/src/common/grids.ts b/packages/devextreme-vue/src/common/grids.ts index 6ccb67c5afa2..4b5dacb77e6c 100644 --- a/packages/devextreme-vue/src/common/grids.ts +++ b/packages/devextreme-vue/src/common/grids.ts @@ -46,8 +46,6 @@ export { NewRowInfo, NewRowPosition, Pager, - PagerDisplayMode, - PagerPageSize, PagingBase, RowDragging, RowDraggingTemplateData, diff --git a/packages/devextreme/js/common.d.ts b/packages/devextreme/js/common.d.ts index 1cd52fed13d5..b23ccfc11090 100644 --- a/packages/devextreme/js/common.d.ts +++ b/packages/devextreme/js/common.d.ts @@ -854,7 +854,7 @@ export type PagerAllPagesMode = 'all'; * @public * @namespace DevExpress.ui.dxPager */ -export type PagerPageSize = PagerAllPagesMode & 'auto'; +export type PagerPageSize = 'all' | 'auto'; /** * @docid diff --git a/packages/devextreme/js/common/grids.d.ts b/packages/devextreme/js/common/grids.d.ts index 7a5fe012ea13..af38ff8a9b2b 100644 --- a/packages/devextreme/js/common/grids.d.ts +++ b/packages/devextreme/js/common/grids.d.ts @@ -12,8 +12,7 @@ import { Sortable, SortOrder, ValidationRule, - PagerDisplayMode as PagerDisplayModeType, - PagerPageSize as PagerPageSizeType, + PagerPageSize, BasePagerOptions, } from '../common'; @@ -73,20 +72,6 @@ import { } from '../ui/widget/ui.widget'; import { PositionConfig } from '../animation/position'; -/** - * @docid - * @public - * @namespace DevExpress.common.grids - */ -export type PagerDisplayMode = PagerDisplayModeType; - -/** - * @docid - * @public - * @namespace DevExpress.common.grids - */ -export type PagerPageSize = PagerPageSizeType; - /** * @docid * @hidden @@ -2471,11 +2456,17 @@ export type NewRowPosition = 'first' | 'last' | 'pageBottom' | 'pageTop' | 'view * @namespace DevExpress.common.grids */ export type Pager = BasePagerOptions & { - /** + /** + * @docid + * @default "auto" + */ + allowedPageSizes?: Array<(number | PagerPageSize)> | Mode; + + /** * @docid * @default "auto" */ - visible?: boolean | Mode; + visible?: boolean | Mode; }; /** diff --git a/packages/devextreme/ts/dx.all.d.ts b/packages/devextreme/ts/dx.all.d.ts index e2ad22a2cbb5..0eb7e3639746 100644 --- a/packages/devextreme/ts/dx.all.d.ts +++ b/packages/devextreme/ts/dx.all.d.ts @@ -4257,19 +4257,18 @@ declare module DevExpress.common.grids { * [descr:Pager] */ export type Pager = DevExpress.ui.BasePagerOptions & { + /** + * [descr:Pager.allowedPageSizes] + */ + allowedPageSizes?: + | Array + | Mode; + /** * [descr:Pager.visible] */ visible?: boolean | Mode; }; - /** - * [descr:PagerDisplayMode] - */ - export type PagerDisplayMode = DevExpress.ui.dxPager.PagerDisplayMode; - /** - * [descr:PagerPageSize] - */ - export type PagerPageSize = DevExpress.ui.dxPager.PagerPageSize; /** * [descr:PagingBase] * @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution. @@ -30976,7 +30975,7 @@ declare module DevExpress.ui.dxOverlay { declare module DevExpress.ui.dxPager { export type PagerAllPagesMode = 'all'; export type PagerDisplayMode = 'adaptive' | 'compact' | 'full'; - export type PagerPageSize = PagerAllPagesMode & 'auto'; + export type PagerPageSize = 'all' | 'auto'; } declare module DevExpress.ui.dxPivotGrid { export type Cell = dxPivotGridPivotGridCell;