@open-rlb/ng-bootstrap 3.3.19 → 3.3.20

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.
@@ -5173,6 +5173,24 @@ class PaginationItemComponent {
5173
5173
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'disabled', transform: booleanAttribute });
5174
5174
  this.active = input(false, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), alias: 'active', transform: booleanAttribute });
5175
5175
  this.cssClass = input('', { ...(ngDevMode ? { debugName: "cssClass" } : /* istanbul ignore next */ {}), alias: 'class' });
5176
+ this.itemClick = output();
5177
+ }
5178
+ onActivate(event) {
5179
+ if (this.disabled()) {
5180
+ event.preventDefault();
5181
+ return;
5182
+ }
5183
+ this.itemClick.emit();
5184
+ }
5185
+ onKeydown(event) {
5186
+ if (event.key !== 'Enter' && event.key !== ' ' && event.key !== 'Spacebar') {
5187
+ return;
5188
+ }
5189
+ event.preventDefault();
5190
+ if (this.disabled()) {
5191
+ return;
5192
+ }
5193
+ this.itemClick.emit();
5176
5194
  }
5177
5195
  ngOnInit() {
5178
5196
  const templateView = this.viewContainerRef.createEmbeddedView(this.template());
@@ -5180,7 +5198,7 @@ class PaginationItemComponent {
5180
5198
  this.viewContainerRef.element.nativeElement.remove();
5181
5199
  }
5182
5200
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: PaginationItemComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
5183
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: PaginationItemComponent, isStandalone: true, selector: "rlb-pagination-item", inputs: { isIcon: { classPropertyName: "isIcon", publicName: "isIcon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, isSignal: true }], ngImport: i0, template: `
5201
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: PaginationItemComponent, isStandalone: true, selector: "rlb-pagination-item", inputs: { isIcon: { classPropertyName: "isIcon", publicName: "isIcon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, cssClass: { classPropertyName: "cssClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, isSignal: true }], ngImport: i0, template: `
5184
5202
  <ng-template #template>
5185
5203
  <li
5186
5204
  class="page-item {{ cssClass() }}"
@@ -5189,7 +5207,13 @@ class PaginationItemComponent {
5189
5207
  >
5190
5208
  <a
5191
5209
  class="page-link d-block"
5210
+ role="button"
5211
+ [attr.tabindex]="disabled() ? -1 : 0"
5212
+ [attr.aria-disabled]="disabled() ? true : null"
5213
+ [attr.aria-current]="active() ? 'page' : null"
5192
5214
  [style.cursor]="disabled() ? 'default' : 'pointer'"
5215
+ (click)="onActivate($event)"
5216
+ (keydown)="onKeydown($event)"
5193
5217
  >
5194
5218
  <ng-container *ngTemplateOutlet="content"></ng-container>
5195
5219
  </a>
@@ -5211,7 +5235,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
5211
5235
  >
5212
5236
  <a
5213
5237
  class="page-link d-block"
5238
+ role="button"
5239
+ [attr.tabindex]="disabled() ? -1 : 0"
5240
+ [attr.aria-disabled]="disabled() ? true : null"
5241
+ [attr.aria-current]="active() ? 'page' : null"
5214
5242
  [style.cursor]="disabled() ? 'default' : 'pointer'"
5243
+ (click)="onActivate($event)"
5244
+ (keydown)="onKeydown($event)"
5215
5245
  >
5216
5246
  <ng-container *ngTemplateOutlet="content"></ng-container>
5217
5247
  </a>
@@ -5222,7 +5252,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
5222
5252
  changeDetection: ChangeDetectionStrategy.OnPush,
5223
5253
  imports: [NgTemplateOutlet],
5224
5254
  }]
5225
- }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { template: [{ type: i0.ViewChild, args: ['template', { isSignal: true }] }], isIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "isIcon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5255
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { template: [{ type: i0.ViewChild, args: ['template', { isSignal: true }] }], isIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "isIcon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], cssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
5226
5256
 
5227
5257
  class PaginationComponent {
5228
5258
  constructor(viewContainerRef) {