Skip to content

Commit

Permalink
CardView: Implement PagerView
Browse files Browse the repository at this point in the history
  • Loading branch information
Alyar committed Dec 15, 2024
1 parent 26def52 commit ea4919a
Show file tree
Hide file tree
Showing 17 changed files with 960 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,21 @@ exports[`common initial render should be successfull 1`] = `
class="dx-cardview-headers"
>
<div
class="dx-sortable"
class="dx-cardview-header-item"
>
A
<div
class="dx-cardview-header-item"
aria-label="Close"
class="dx-widget dx-button dx-button-mode-text dx-button-normal dx-button-has-icon dx-cardview-header-item-button"
role="button"
tabindex="0"
>
A
<div
aria-label="Close"
class="dx-widget dx-button dx-button-mode-text dx-button-normal dx-button-has-icon dx-cardview-header-item-button"
role="button"
tabindex="0"
class="dx-button-content"
>
<div
class="dx-button-content"
>
<i
class="dx-icon dx-icon-close"
/>
</div>
<i
class="dx-icon dx-icon-close"
/>
</div>
</div>
</div>
Expand Down Expand Up @@ -292,50 +288,7 @@ exports[`common initial render should be successfull 1`] = `
/>
</div>
<div
aria-label="Page navigation"
class="dx-widget dx-pagination"
role="navigation"
>
<div
class="dx-page-sizes"
>
<div
aria-label="Items per page: 5"
class="dx-page-size dx-first-child"
role="button"
tabindex="0"
>
5
</div>
<div
aria-label="Items per page: 10"
class="dx-page-size"
role="button"
tabindex="0"
>
10
</div>
</div>
<div
class="dx-pages"
style="visibility: hidden;"
>
<div
class="dx-page-indexes"
>
<div
aria-current="page"
aria-label="Page 1"
class="dx-page dx-selection"
role="button"
tabindex="0"
>
1
</div>
</div>
</div>
</div>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { combined } from '@ts/core/reactive/index';
import { ColumnsChooserView } from '@ts/grids/new/grid_core/columns_chooser/view';
import { View } from '@ts/grids/new/grid_core/core/view';
import { FilterPanelView } from '@ts/grids/new/grid_core/filtering/filter_panel/filter_panel';
import { PagerView } from '@ts/grids/new/grid_core/pager';
import { PagerView } from '@ts/grids/new/grid_core/pager/view';
import { ToolbarView } from '@ts/grids/new/grid_core/toolbar/view';
import type { ComponentType } from 'inferno';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Subscribable } from '@ts/core/reactive/index';
import { ColumnsChooserView } from '@ts/grids/new/grid_core/columns_chooser/view';
import { View } from '@ts/grids/new/grid_core/core/view_old';
import { FilterPanelView } from '@ts/grids/new/grid_core/filtering/filter_panel/filter_panel';
import { PagerView } from '@ts/grids/new/grid_core/pager';
import { PagerView } from '@ts/grids/new/grid_core/pager/view';
import { ToolbarView } from '@ts/grids/new/grid_core/toolbar/view';
import type { InfernoNode } from 'inferno';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { WidgetOptions } from '@js/ui/widget/ui.widget';
import * as columnsController from './columns_controller';
import * as dataController from './data_controller';
import { filterPanel } from './filtering';
import * as pager from './pager';
import type { SearchProperties } from './search/types';
import * as toolbar from './toolbar';
import type { GridCoreNew } from './widget';
Expand All @@ -16,6 +17,7 @@ export type Options =
& WidgetOptions<GridCoreNew>
& dataController.Options
& toolbar.Options
& pager.Options
& columnsController.Options
& filterPanel.Options
& SearchProperties
Expand All @@ -27,6 +29,7 @@ export const defaultOptions = {
...dataController.defaultOptions,
...columnsController.defaultOptions,
...toolbar.defaultOptions,
...pager.defaultOptions,
...filterPanel.defaultOptions,
searchText: '',
} satisfies Options;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import type { defaultOptions, Options } from '../options';
import type { Options } from '../options';
import { defaultOptions } from '../options';
import { OptionsControllerMock as OptionsControllerBaseMock } from './options_controller_base.mock';

export class OptionsControllerMock extends OptionsControllerBaseMock<
Options, typeof defaultOptions
> {}
> {
constructor(options: Options) {
super(options, defaultOptions);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ export class OptionsControllerMock<
TDefaultProps extends TProps,
> extends OptionsController<TProps, TDefaultProps> {
private readonly componentMock: Component<TProps>;
constructor(options: TProps) {
constructor(options: TProps, defaultOptions: TDefaultProps) {
const componentMock = new Component(options);
super(componentMock);
this.defaults = defaultOptions;
this.componentMock = componentMock;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class OptionsController<TProps, TDefaultProps extends TProps = TProps> {

private readonly props: SubsGetsUpd<TProps>;

private readonly defaults: TDefaultProps;
protected defaults: TDefaultProps;

public static dependencies = [Component];

Expand Down
36 changes: 0 additions & 36 deletions packages/devextreme/js/__internal/grids/new/grid_core/pager.tsx

This file was deleted.

Loading

0 comments on commit ea4919a

Please sign in to comment.