@progress/kendo-angular-pager 17.0.0-develop.8 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +26 -17
  2. package/directives.d.ts +2 -1
  3. package/{esm2020 → esm2022}/directives.mjs +3 -1
  4. package/{esm2020 → esm2022}/index.mjs +3 -0
  5. package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
  6. package/{esm2020 → esm2022}/pager/focusable.directive.mjs +11 -5
  7. package/{esm2020 → esm2022}/pager/localization/custom-messages.component.mjs +10 -9
  8. package/{esm2020 → esm2022}/pager/localization/localized-messages.directive.mjs +10 -9
  9. package/esm2022/pager/localization/messages.mjs +100 -0
  10. package/{esm2020 → esm2022}/pager/navigation.service.mjs +10 -8
  11. package/{esm2020 → esm2022}/pager/pager-context.service.mjs +8 -6
  12. package/{esm2020 → esm2022}/pager/pager-element.component.mjs +24 -16
  13. package/{esm2020 → esm2022}/pager/pager-info.component.mjs +9 -12
  14. package/{esm2020 → esm2022}/pager/pager-input.component.mjs +57 -53
  15. package/{esm2020 → esm2022}/pager/pager-next-buttons.component.mjs +26 -22
  16. package/{esm2020 → esm2022}/pager/pager-numeric-buttons.component.mjs +24 -15
  17. package/{esm2020 → esm2022}/pager/pager-page-sizes.component.mjs +30 -26
  18. package/{esm2020 → esm2022}/pager/pager-prev-buttons.component.mjs +31 -23
  19. package/{esm2020 → esm2022}/pager/pager-template.directive.mjs +13 -12
  20. package/{esm2020 → esm2022}/pager/pager.component.mjs +224 -161
  21. package/esm2022/pager/pager.module.mjs +65 -0
  22. package/{esm2020 → esm2022}/pager/pagesizechange-event.mjs +4 -0
  23. package/{esm2020 → esm2022}/pager/preventable-event.mjs +1 -3
  24. package/esm2022/pager/spacer.component.mjs +49 -0
  25. package/{esm2020 → esm2022}/util.mjs +11 -7
  26. package/{fesm2020 → fesm2022}/progress-kendo-angular-pager.mjs +639 -404
  27. package/index.d.ts +3 -0
  28. package/package.json +15 -21
  29. package/pager/common/pager-size.d.ts +1 -1
  30. package/pager/common/pager-type.d.ts +3 -3
  31. package/pager/focusable.directive.d.ts +1 -1
  32. package/pager/localization/custom-messages.component.d.ts +1 -1
  33. package/pager/localization/localized-messages.directive.d.ts +1 -1
  34. package/pager/localization/messages.d.ts +12 -1
  35. package/pager/pager-context.service.d.ts +3 -1
  36. package/pager/pager-info.component.d.ts +2 -3
  37. package/pager/pager-input.component.d.ts +1 -1
  38. package/pager/pager-next-buttons.component.d.ts +1 -1
  39. package/pager/pager-numeric-buttons.component.d.ts +1 -1
  40. package/pager/pager-page-sizes.component.d.ts +5 -5
  41. package/pager/pager-prev-buttons.component.d.ts +1 -1
  42. package/pager/pager-template.directive.d.ts +9 -9
  43. package/pager/pager.component.d.ts +30 -11
  44. package/pager/pager.module.d.ts +22 -2
  45. package/pager/spacer.component.d.ts +24 -0
  46. package/schematics/ngAdd/index.js +7 -7
  47. package/util.d.ts +4 -0
  48. package/esm2020/pager/localization/messages.mjs +0 -43
  49. package/esm2020/pager/pager.module.mjs +0 -45
  50. package/fesm2015/progress-kendo-angular-pager.mjs +0 -1991
  51. /package/{esm2020 → esm2022}/pager/change-event-args.interface.mjs +0 -0
  52. /package/{esm2020 → esm2022}/pager/common/constants.mjs +0 -0
  53. /package/{esm2020 → esm2022}/pager/common/pager-classes.mjs +0 -0
  54. /package/{esm2020 → esm2022}/pager/common/pager-size.mjs +0 -0
  55. /package/{esm2020 → esm2022}/pager/common/pager-type.mjs +0 -0
  56. /package/{esm2020 → esm2022}/pager/pagesize-item.interface.mjs +0 -0
  57. /package/{esm2020 → esm2022}/progress-kendo-angular-pager.mjs +0 -0
package/README.md CHANGED
@@ -1,33 +1,42 @@
1
- <a href="https://www.telerik.com/kendo-angular-ui/" target="_blank">
1
+ <a href="https://www.telerik.com/kendo-angular-ui/components/pager" target="_blank">
2
2
  <img width="631" src="https://www.telerik.com/kendo-angular-ui/npm-banner.svg">
3
3
  </a>
4
4
 
5
5
  ## Kendo UI for Angular Pager Component
6
6
 
7
- > **Important**
8
- > * This package is part of [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pager)&mdash;a commercial library.
9
- > * You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Angular My License page](https://www.telerik.com/kendo-angular-ui/my-license?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pager).
10
- > * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pager) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pager). Doing so indicates that you [accept the Kendo UI for Angular License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pager).
11
- > * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular dev team!
12
- >
13
- > [Start using Kendo UI for Angular](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-npm-pager) and speed up your development process!
7
+ > * This package is part of the [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/)&mdash;a commercial UI library.
8
+ > * You must [install a license key](https://www.telerik.com/kendo-angular-ui/my-license) when adding the package to your project. To receive a license key, either [purchase a license](https://www.telerik.com/purchase/kendo-ui) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui).
9
+ > * The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular team!
14
10
 
15
- Kendo UI for Angular is a commercial UI library designed and built for developing business applications with Angular. Every UI component in the Kendo UI for Angular suite has been built from the ground-up specifically for Angular.
11
+ The Kendo UI for Angular Pager component enables you to split a set of data into pages, providing a flexible and intuitive UI.
12
+
13
+ ## Key Features
14
+
15
+ Among the many features which the Kendo UI for Angular Pager delivers are:
16
+
17
+ * Pager Settings and Types&mdash;The Pager component features multiple settings to customize the paging UI. [Read more about the available settings configurations of the Pager...](https://www.telerik.com/kendo-angular-ui/components/pager/settings)
18
+ * Pager Appearance&mdash;You can change the size of the Pager or fully customize its appearance by mixing custom components and built-in pager elements by using the built-in Pager template. Read more about the [Pager template](https://www.telerik.com/kendo-angular-ui/components/pager/template) and the [built-in sizing options...](https://www.telerik.com/kendo-angular-ui/components/pager/appearance)
19
+ * Responsive Design&mdash;The Pager supports responsive web-design by adapting its layout based on the set width or the available screen size. [Read more about the adaptive layout of the Pager...](https://www.telerik.com/kendo-angular-ui/components/pager/responsive)
20
+ * Globalization&mdash;The Kendo UI for Angular Pager supports globalization to ensure that it can fit well in any application, no matter what languages and locales need to be supported. Additionally, the Pager supports rendering in a right-to-left (RTL) direction. [Read more about the globalization of the Pager...](https://www.telerik.com/kendo-angular-ui/components/pager/globalization)
21
+ * Keyboard Navigation&mdash;The Pager supports a number of keyboard shortcuts which alow users to accomplish various commands. [Read more about the keyboard navigation of the Pager...](https://www.telerik.com/kendo-angular-ui/components/pager/keyboard-navigation)
22
+ * Accessibility&mdash;The Kendo UI for Angular Pager component is [WCAG 2.2 AA](https://www.w3.org/TR/WCAG22/) and [Section 508](http://www.section508.gov/) compliant. The component also follows the [WAI-ARIA best practices](https://www.w3.org/WAI/ARIA/apg/) for implementing the keyboard navigation for its component role, and is tested against the popular screen readers. [Read more about the accessibility of the Pager...](https://www.telerik.com/kendo-angular-ui/components/pager/accessibility)
23
+
24
+ ## Support Options
25
+
26
+ For any issues you might encounter while working with the Kendo UI for Angular Pager, you have the following support channels available:
27
+
28
+ * Industry-leading technical support&mdash;Kendo UI for Angular paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use the [dedicated Kendo UI for Angular support system](https://www.telerik.com/account/support-center/contact-us/technical-support).
29
+ * Product forums&mdash;The [Kendo UI for Angular forums](https://www.telerik.com/forums/kendo-angular-ui) are part of the free support you can get from the community and from the Kendo UI for Angular team.
30
+ * Feedback portal&mdash;The [Kendo UI for Angular feedback portal](https://feedback.telerik.com/kendo-angular-ui) is where you can request and vote for new features to be added.
16
31
 
17
32
  ## Resources
18
33
 
19
- * [Get Started with Kendo UI for Angular (requires trial registration)](https://www.telerik.com/kendo-angular-ui/getting-started)
34
+ * [Getting Started with Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/getting-started)
35
+ * [Getting Started with the Kendo UI for Angular Pager](https://www.telerik.com/kendo-angular-ui/components/pager/installation/getting-started)
20
36
  * [Demos, documentation, and component reference](https://www.telerik.com/kendo-angular-ui/components)
21
37
  * [Blogs](http://www.telerik.com/blogs/kendo-ui)
22
38
  * [Kendo UI for Angular pricing and licensing](https://www.telerik.com/purchase/kendo-ui)
23
39
 
24
- ## Questions and Feedback
25
-
26
- * [Official Forums](https://www.telerik.com/forums/kendo-angular-ui)
27
- * [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
28
- * [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
29
- * [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
30
-
31
40
  *Copyright © 2024 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
32
41
 
33
42
  *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
package/directives.d.ts CHANGED
@@ -12,7 +12,8 @@ import { PagerPageSizesComponent } from './pager/pager-page-sizes.component';
12
12
  import { PagerPrevButtonsComponent } from './pager/pager-prev-buttons.component';
13
13
  import { PagerTemplateDirective } from './pager/pager-template.directive';
14
14
  import { PagerComponent } from './pager/pager.component';
15
+ import { PagerSpacerComponent } from './pager/spacer.component';
15
16
  /**
16
17
  * Utility array that contains all `@progress/kendo-angular-pager` related components and directives
17
18
  */
18
- export declare const KENDO_PAGER: readonly [typeof CustomMessagesComponent, typeof PagerFocusableDirective, typeof PagerInfoComponent, typeof PagerInputComponent, typeof PagerNextButtonsComponent, typeof PagerNumericButtonsComponent, typeof PagerPageSizesComponent, typeof PagerPrevButtonsComponent, typeof PagerTemplateDirective, typeof PagerComponent];
19
+ export declare const KENDO_PAGER: readonly [typeof CustomMessagesComponent, typeof PagerFocusableDirective, typeof PagerInfoComponent, typeof PagerInputComponent, typeof PagerNextButtonsComponent, typeof PagerNumericButtonsComponent, typeof PagerPageSizesComponent, typeof PagerPrevButtonsComponent, typeof PagerTemplateDirective, typeof PagerComponent, typeof PagerSpacerComponent];
@@ -12,6 +12,7 @@ import { PagerPageSizesComponent } from './pager/pager-page-sizes.component';
12
12
  import { PagerPrevButtonsComponent } from './pager/pager-prev-buttons.component';
13
13
  import { PagerTemplateDirective } from './pager/pager-template.directive';
14
14
  import { PagerComponent } from './pager/pager.component';
15
+ import { PagerSpacerComponent } from './pager/spacer.component';
15
16
  /**
16
17
  * Utility array that contains all `@progress/kendo-angular-pager` related components and directives
17
18
  */
@@ -25,5 +26,6 @@ export const KENDO_PAGER = [
25
26
  PagerPageSizesComponent,
26
27
  PagerPrevButtonsComponent,
27
28
  PagerTemplateDirective,
28
- PagerComponent
29
+ PagerComponent,
30
+ PagerSpacerComponent
29
31
  ];
@@ -15,4 +15,7 @@ export { PagerInfoComponent } from './pager/pager-info.component';
15
15
  export { PagerFocusableDirective } from './pager/focusable.directive';
16
16
  export { PagerComponent } from './pager/pager.component';
17
17
  export { PagerModule } from './pager/pager.module';
18
+ export { PagerNavigationService } from './pager/navigation.service';
19
+ export { PagerContextService } from './pager/pager-context.service';
20
+ export { PagerSpacerComponent } from './pager/spacer.component';
18
21
  export * from './directives';
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-pager',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1729170185,
13
- version: '17.0.0-develop.8',
12
+ publishDate: 1731414064,
13
+ version: '17.0.0',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -9,16 +9,22 @@ import { PagerNavigationService } from './navigation.service';
9
9
  import * as i0 from "@angular/core";
10
10
  import * as i1 from "./navigation.service";
11
11
  /**
12
- * Place the directive on custom focusable elements in the [`kendoDataPagerTemplate`]({% slug api_pager_pagertemplatedirective %}) to include them in the built-in Pager keyboard navigation.
12
+ * Place the directive on custom focusable elements in the [`kendoPagerTemplate`]({% slug api_pager_pagertemplatedirective %}) to include them in the built-in Pager keyboard navigation.
13
13
  */
14
14
  export class PagerFocusableDirective {
15
+ navigationService;
16
+ element;
17
+ renderer;
18
+ subscriptions = new Subscription();
15
19
  constructor(navigationService, element, renderer) {
16
20
  this.navigationService = navigationService;
17
21
  this.element = element;
18
22
  this.renderer = renderer;
19
- this.subscriptions = new Subscription();
20
23
  }
21
24
  ngOnInit() {
25
+ if (!(this.nativeElement instanceof HTMLElement)) {
26
+ return;
27
+ }
22
28
  this.subscriptions.add(this.navigationService.innerNavigationChange.subscribe(this.innerNavigationChange.bind(this)));
23
29
  }
24
30
  ngOnDestroy() {
@@ -40,10 +46,10 @@ export class PagerFocusableDirective {
40
46
  this.renderer.setAttribute(el, 'tabindex', index);
41
47
  });
42
48
  }
49
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PagerFocusableDirective, deps: [{ token: i1.PagerNavigationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
50
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: PagerFocusableDirective, isStandalone: true, selector: "[kendoPagerFocusable]", exportAs: ["kendoPagerFocusable"], ngImport: i0 });
43
51
  }
44
- PagerFocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PagerFocusableDirective, deps: [{ token: i1.PagerNavigationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
45
- PagerFocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: PagerFocusableDirective, isStandalone: true, selector: "[kendoPagerFocusable]", exportAs: ["kendoPagerFocusable"], ngImport: i0 });
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PagerFocusableDirective, decorators: [{
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PagerFocusableDirective, decorators: [{
47
53
  type: Directive,
48
54
  args: [{
49
55
  selector: '[kendoPagerFocusable]',
@@ -12,6 +12,7 @@ import * as i1 from "@progress/kendo-angular-l10n";
12
12
  * ([see example]({% slug pager_globalization %}#toc-messages)).
13
13
  */
14
14
  export class CustomMessagesComponent extends Messages {
15
+ service;
15
16
  constructor(service) {
16
17
  super();
17
18
  this.service = service;
@@ -19,15 +20,15 @@ export class CustomMessagesComponent extends Messages {
19
20
  get override() {
20
21
  return true;
21
22
  }
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
24
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-datapager-messages, kendo-pager-messages", providers: [
25
+ {
26
+ provide: Messages,
27
+ useExisting: forwardRef(() => CustomMessagesComponent)
28
+ }
29
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
22
30
  }
23
- CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
24
- CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-datapager-messages", providers: [
25
- {
26
- provide: Messages,
27
- useExisting: forwardRef(() => CustomMessagesComponent)
28
- }
29
- ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
31
32
  type: Component,
32
33
  args: [{
33
34
  providers: [
@@ -36,7 +37,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
36
37
  useExisting: forwardRef(() => CustomMessagesComponent)
37
38
  }
38
39
  ],
39
- selector: 'kendo-datapager-messages',
40
+ selector: 'kendo-datapager-messages, kendo-pager-messages',
40
41
  template: ``,
41
42
  standalone: true
42
43
  }]
@@ -11,19 +11,20 @@ import * as i1 from "@progress/kendo-angular-l10n";
11
11
  * @hidden
12
12
  */
13
13
  export class LocalizedMessagesDirective extends Messages {
14
+ service;
14
15
  constructor(service) {
15
16
  super();
16
17
  this.service = service;
17
18
  }
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
20
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoPagerLocalizedMessages]", providers: [
21
+ {
22
+ provide: Messages,
23
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
24
+ }
25
+ ], usesInheritance: true, ngImport: i0 });
18
26
  }
19
- LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
20
- LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoDataPagerLocalizedMessages]", providers: [
21
- {
22
- provide: Messages,
23
- useExisting: forwardRef(() => LocalizedMessagesDirective)
24
- }
25
- ], usesInheritance: true, ngImport: i0 });
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
27
28
  type: Directive,
28
29
  args: [{
29
30
  providers: [
@@ -32,7 +33,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
32
33
  useExisting: forwardRef(() => LocalizedMessagesDirective)
33
34
  }
34
35
  ],
35
- selector: '[kendoDataPagerLocalizedMessages]',
36
+ selector: '[kendoPagerLocalizedMessages]',
36
37
  standalone: true
37
38
  }]
38
39
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
@@ -0,0 +1,100 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive, Input } from '@angular/core';
6
+ import { ComponentMessages } from '@progress/kendo-angular-l10n';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * @hidden
10
+ */
11
+ export class Messages extends ComponentMessages {
12
+ /**
13
+ * The label of the pager. Follows the pattern **Page navigation, page {currentPage} of {totalPages}** by default.
14
+ * Тhe default label text when the current page is 1, and the total number of pages is 10 will be
15
+ * **Page navigation, page 1 of 10**.
16
+ *
17
+ * The message consists of several parts - the current page number, the total number of pages, and a localizable string.
18
+ * To allow for reordering its parts, the `ariaLabel` input accepts a string with placeholders for the current page
19
+ * and total number of pages. The `{currentPage}` and `{totalPages}` placeholders will be replaced
20
+ * internally with the respective actual values.
21
+ */
22
+ ariaLabel;
23
+ /**
24
+ * The label for the **First page** button.
25
+ */
26
+ firstPage;
27
+ /**
28
+ * The label for the **Last page** button.
29
+ */
30
+ lastPage;
31
+ /**
32
+ * The label for the **Previous page** button.
33
+ */
34
+ previousPage;
35
+ /**
36
+ * The label for the **Next page** button.
37
+ */
38
+ nextPage;
39
+ /**
40
+ * The label displayed before the pager input.
41
+ */
42
+ page;
43
+ /**
44
+ * The title attribute of the page number input element.
45
+ */
46
+ pageNumberInputTitle;
47
+ /**
48
+ * The label displayed after the page-size selector.
49
+ */
50
+ itemsPerPage;
51
+ /**
52
+ * The label before the total-page number.
53
+ */
54
+ of;
55
+ /**
56
+ * The label after the total-page number.
57
+ */
58
+ items;
59
+ /**
60
+ * The text of the title and aria-label attributes applied to the page chooser.
61
+ */
62
+ selectPage;
63
+ /**
64
+ * The text of the aria-label attribute applied to the input element for entering the page number."
65
+ */
66
+ inputLabel;
67
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
68
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: Messages, selector: "kendoPagerMessages", inputs: { ariaLabel: "ariaLabel", firstPage: "firstPage", lastPage: "lastPage", previousPage: "previousPage", nextPage: "nextPage", page: "page", pageNumberInputTitle: "pageNumberInputTitle", itemsPerPage: "itemsPerPage", of: "of", items: "items", selectPage: "selectPage", inputLabel: "inputLabel" }, usesInheritance: true, ngImport: i0 });
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, decorators: [{
71
+ type: Directive,
72
+ args: [{
73
+ // eslint-disable-next-line @angular-eslint/directive-selector
74
+ selector: 'kendoPagerMessages'
75
+ }]
76
+ }], propDecorators: { ariaLabel: [{
77
+ type: Input
78
+ }], firstPage: [{
79
+ type: Input
80
+ }], lastPage: [{
81
+ type: Input
82
+ }], previousPage: [{
83
+ type: Input
84
+ }], nextPage: [{
85
+ type: Input
86
+ }], page: [{
87
+ type: Input
88
+ }], pageNumberInputTitle: [{
89
+ type: Input
90
+ }], itemsPerPage: [{
91
+ type: Input
92
+ }], of: [{
93
+ type: Input
94
+ }], items: [{
95
+ type: Input
96
+ }], selectPage: [{
97
+ type: Input
98
+ }], inputLabel: [{
99
+ type: Input
100
+ }] } });
@@ -3,15 +3,14 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Subject } from "rxjs";
6
- import { getAllFocusableChildren } from "../util";
6
+ import { focusableSelector, getAllFocusableChildren } from "../util";
7
+ import { isFocusable } from "@progress/kendo-angular-common";
7
8
  /**
8
9
  * @hidden
9
10
  */
10
11
  export class PagerNavigationService {
11
- constructor() {
12
- this.isNavigable = false;
13
- this.innerNavigationChange = new Subject();
14
- }
12
+ isNavigable = false;
13
+ innerNavigationChange = new Subject();
15
14
  toggleInnerNavigation(value) {
16
15
  this.innerNavigationChange.next(value);
17
16
  }
@@ -30,8 +29,11 @@ export class PagerNavigationService {
30
29
  }
31
30
  getFirstAndLastFocusable(wrapper) {
32
31
  const all = getAllFocusableChildren(wrapper);
33
- const firstFocusable = all.length > 0 ? all[0] : parent;
34
- const lastFocusable = all.length > 0 ? all[all.length - 1] : parent;
35
- return [firstFocusable, lastFocusable];
32
+ const firstFocusable = all.length > 0 ? all[0] : wrapper;
33
+ const lastFocusable = all.length > 0 ? all[all.length - 1] : wrapper;
34
+ return [
35
+ isFocusable(firstFocusable) ? firstFocusable : firstFocusable.querySelector(focusableSelector),
36
+ isFocusable(lastFocusable) ? lastFocusable : lastFocusable.querySelector(focusableSelector)
37
+ ];
36
38
  }
37
39
  }
@@ -7,11 +7,13 @@ import { Subject } from "rxjs";
7
7
  * @hidden
8
8
  */
9
9
  export class PagerContextService {
10
- constructor() {
11
- this.changes = new Subject();
12
- this.pageChange = new Subject();
13
- this.pageSizeChange = new Subject();
14
- }
10
+ total;
11
+ skip;
12
+ pageSize;
13
+ localization;
14
+ changes = new Subject();
15
+ pageChange = new Subject();
16
+ pageSizeChange = new Subject();
15
17
  get currentPage() {
16
18
  return this.skip / this.pageSize;
17
19
  }
@@ -29,7 +31,7 @@ export class PagerContextService {
29
31
  }
30
32
  nextPage() {
31
33
  const nextPage = this.currentPage + 1;
32
- if (nextPage * this.pageSize <= this.total) {
34
+ if (nextPage * this.pageSize < this.total) {
33
35
  this.changePage(nextPage);
34
36
  }
35
37
  }
@@ -13,18 +13,16 @@ import * as i2 from "./pager-context.service";
13
13
  * @hidden
14
14
  */
15
15
  export class PagerElementComponent {
16
- constructor(localization, pagerContext, cd) {
17
- this.localization = localization;
18
- this.pagerContext = pagerContext;
19
- this.cd = cd;
20
- this.total = this.pagerContext.total;
21
- this.skip = this.pagerContext.skip;
22
- this.pageSize = this.pagerContext.pageSize;
23
- this.caretAltLeftIcon = caretAltLeftIcon;
24
- this.caretAltToLeftIcon = caretAltToLeftIcon;
25
- this.caretAltRightIcon = caretAltRightIcon;
26
- this.caretAltToRightIcon = caretAltToRightIcon;
27
- }
16
+ localization;
17
+ pagerContext;
18
+ cd;
19
+ total;
20
+ skip;
21
+ pageSize;
22
+ caretAltLeftIcon = caretAltLeftIcon;
23
+ caretAltToLeftIcon = caretAltToLeftIcon;
24
+ caretAltRightIcon = caretAltRightIcon;
25
+ caretAltToRightIcon = caretAltToRightIcon;
28
26
  /**
29
27
  * @hidden
30
28
  *
@@ -45,6 +43,15 @@ export class PagerElementComponent {
45
43
  get totalPages() {
46
44
  return Math.ceil((this.total || 0) / this.pageSize);
47
45
  }
46
+ subscriptions;
47
+ constructor(localization, pagerContext, cd) {
48
+ this.localization = localization;
49
+ this.pagerContext = pagerContext;
50
+ this.cd = cd;
51
+ this.total = pagerContext.total;
52
+ this.skip = pagerContext.skip;
53
+ this.pageSize = pagerContext.pageSize;
54
+ }
48
55
  /**
49
56
  * @hidden
50
57
  *
@@ -54,7 +61,8 @@ export class PagerElementComponent {
54
61
  * @memberOf PagerElementComponent
55
62
  */
56
63
  textFor(key) {
57
- return this.localization.get(key);
64
+ const isPagerLocalization = this.localization.prefix === 'kendo.pager';
65
+ return this.localization.get(isPagerLocalization ? key : `pager${key[0].toLocaleUpperCase()}${key.slice(1)}`);
58
66
  }
59
67
  /**
60
68
  * @hidden
@@ -93,10 +101,10 @@ export class PagerElementComponent {
93
101
  get nextArrowSVGIcons() {
94
102
  return !this.localization.rtl ? [this.caretAltRightIcon, this.caretAltToRightIcon] : [this.caretAltLeftIcon, this.caretAltToLeftIcon];
95
103
  }
104
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PagerElementComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PagerContextService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
105
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PagerElementComponent, selector: "kendo-pager-element", ngImport: i0, template: ``, isInline: true });
96
106
  }
97
- PagerElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PagerElementComponent, deps: [{ token: i1.LocalizationService }, { token: i2.PagerContextService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
98
- PagerElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PagerElementComponent, selector: "kendo-pager-element", ngImport: i0, template: ``, isInline: true });
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PagerElementComponent, decorators: [{
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PagerElementComponent, decorators: [{
100
108
  type: Component,
101
109
  args: [{
102
110
  selector: 'kendo-pager-element',
@@ -14,10 +14,6 @@ import * as i2 from "./pager-context.service";
14
14
  * Displays information about the current page and the total number of records ([see example]({% slug pager_settings %})).
15
15
  */
16
16
  export class PagerInfoComponent extends PagerElementComponent {
17
- constructor(localization, cd, pagerContext) {
18
- super(localization, pagerContext, cd);
19
- this.pagerContext = pagerContext;
20
- }
21
17
  /**
22
18
  * @hidden
23
19
  *
@@ -47,8 +43,9 @@ export class PagerInfoComponent extends PagerElementComponent {
47
43
  * @type {boolean}
48
44
  * @memberOf PagerInfoComponent
49
45
  */
50
- get classes() {
51
- return true;
46
+ hostClass = true;
47
+ constructor(localization, cd, pagerContext) {
48
+ super(localization, pagerContext, cd);
52
49
  }
53
50
  onChanges({ total, skip, pageSize }) {
54
51
  this.total = total;
@@ -56,18 +53,18 @@ export class PagerInfoComponent extends PagerElementComponent {
56
53
  this.pageSize = pageSize;
57
54
  this.cd.markForCheck();
58
55
  }
56
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PagerInfoComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.PagerContextService }], target: i0.ɵɵFactoryTarget.Component });
57
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PagerInfoComponent, isStandalone: true, selector: "kendo-datapager-info, kendo-pager-info", host: { properties: { "class.k-pager-info": "this.hostClass" } }, usesInheritance: true, ngImport: i0, template: `{{currentPageText}} - {{maxItems}} {{textFor('of')}} {{total}} {{textFor('items')}}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
59
58
  }
60
- PagerInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PagerInfoComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.PagerContextService }], target: i0.ɵɵFactoryTarget.Component });
61
- PagerInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PagerInfoComponent, isStandalone: true, selector: "kendo-datapager-info", host: { properties: { "class.k-pager-info": "this.classes" } }, usesInheritance: true, ngImport: i0, template: `{{currentPageText}} - {{maxItems}} {{textFor('of')}} {{total}} {{textFor('items')}}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PagerInfoComponent, decorators: [{
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PagerInfoComponent, decorators: [{
63
60
  type: Component,
64
61
  args: [{
65
62
  changeDetection: ChangeDetectionStrategy.OnPush,
66
- selector: 'kendo-datapager-info',
63
+ selector: 'kendo-datapager-info, kendo-pager-info',
67
64
  template: `{{currentPageText}} - {{maxItems}} {{textFor('of')}} {{total}} {{textFor('items')}}`,
68
65
  standalone: true
69
66
  }]
70
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i2.PagerContextService }]; }, propDecorators: { classes: [{
67
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i2.PagerContextService }]; }, propDecorators: { hostClass: [{
71
68
  type: HostBinding,
72
- args: ["class.k-pager-info"]
69
+ args: ['class.k-pager-info']
73
70
  }] } });