@progress/kendo-angular-scrollview 4.1.0 → 4.1.2

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.
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { __decorate, __metadata } from 'tslib';
6
- import { Input, Output, EventEmitter, ContentChild, TemplateRef, HostBinding, HostListener, Component, ElementRef, ApplicationRef, NgZone, NgModule } from '@angular/core';
6
+ import { Input, Output, EventEmitter, ContentChild, TemplateRef, ViewChild, ElementRef, HostBinding, HostListener, Component, NgZone, Renderer2, NgModule } from '@angular/core';
7
7
  import { trigger, state, style, transition, animate } from '@angular/animations';
8
8
  import { Keys, DraggableModule } from '@progress/kendo-angular-common';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
@@ -26,7 +26,7 @@ var packageMetadata = {
26
26
  name: '@progress/kendo-angular-scrollview',
27
27
  productName: 'Kendo UI for Angular',
28
28
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
29
- publishDate: 1626799822,
29
+ publishDate: 1637575183,
30
30
  version: '',
31
31
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
32
32
  };
@@ -189,12 +189,12 @@ var DataCollection = /** @class */ (function () {
189
189
  * ```
190
190
  */
191
191
  var ScrollViewComponent = /** @class */ (function () {
192
- function ScrollViewComponent(element, application, localization, ngZone) {
192
+ function ScrollViewComponent(element, localization, ngZone, renderer) {
193
193
  var _this = this;
194
194
  this.element = element;
195
- this.application = application;
196
195
  this.localization = localization;
197
196
  this.ngZone = ngZone;
197
+ this.renderer = renderer;
198
198
  /**
199
199
  * Provides the data source for the ScrollView ([see example]({% slug datasources_scrollview %})).
200
200
  */
@@ -233,9 +233,11 @@ var ScrollViewComponent = /** @class */ (function () {
233
233
  * Fires after the activeIndex has changed. Allows for two-way binding of the activeIndex property.
234
234
  */
235
235
  this.activeIndexChange = new EventEmitter();
236
+ this.scrollViewClass = true;
237
+ this.tabIndex = 1;
238
+ this.ariaLive = 'assertive';
236
239
  this.touchAction = 'pan-y pinch-zoom';
237
240
  this.animationState = null;
238
- this.transitionStyle = null;
239
241
  this.view = new DataCollection(function () {
240
242
  return new DataResultIterator(_this.data, _this.activeIndex, _this.endless, _this.pageIndex, _this.isRTL);
241
243
  });
@@ -259,20 +261,6 @@ var ScrollViewComponent = /** @class */ (function () {
259
261
  enumerable: true,
260
262
  configurable: true
261
263
  });
262
- Object.defineProperty(ScrollViewComponent.prototype, "widgetClass", {
263
- get: function () {
264
- return true;
265
- },
266
- enumerable: true,
267
- configurable: true
268
- });
269
- Object.defineProperty(ScrollViewComponent.prototype, "scrollViewClass", {
270
- get: function () {
271
- return true;
272
- },
273
- enumerable: true,
274
- configurable: true
275
- });
276
264
  Object.defineProperty(ScrollViewComponent.prototype, "scrollViewLightOverlayClass", {
277
265
  get: function () {
278
266
  return this.pagerOverlay === 'light';
@@ -297,16 +285,6 @@ var ScrollViewComponent = /** @class */ (function () {
297
285
  enumerable: true,
298
286
  configurable: true
299
287
  });
300
- Object.defineProperty(ScrollViewComponent.prototype, "tabIndex", {
301
- get: function () { return 1; },
302
- enumerable: true,
303
- configurable: true
304
- });
305
- Object.defineProperty(ScrollViewComponent.prototype, "ariaLive", {
306
- get: function () { return 'assertive'; },
307
- enumerable: true,
308
- configurable: true
309
- });
310
288
  Object.defineProperty(ScrollViewComponent.prototype, "dir", {
311
289
  get: function () {
312
290
  return this.direction;
@@ -342,9 +320,6 @@ var ScrollViewComponent = /** @class */ (function () {
342
320
  }
343
321
  }
344
322
  };
345
- /**
346
- * @hidden
347
- */
348
323
  ScrollViewComponent.prototype.ngOnChanges = function (_) {
349
324
  this.activeIndex = Math.max(Math.min(this.activeIndex, this.view.total - 1), 0);
350
325
  };
@@ -365,7 +340,6 @@ var ScrollViewComponent = /** @class */ (function () {
365
340
  */
366
341
  ScrollViewComponent.prototype.transitionEndHandler = function (e) {
367
342
  this.animationState = null;
368
- this.transitionStyle = null;
369
343
  if (e.toState === 'left' || e.toState === 'right') {
370
344
  if (this.pageIndex !== null) {
371
345
  this.activeIndex = this.pageIndex;
@@ -374,7 +348,6 @@ var ScrollViewComponent = /** @class */ (function () {
374
348
  this.activeIndex = this.index;
375
349
  this.activeIndexChange.emit(this.activeIndex);
376
350
  this.itemChanged.emit({ index: this.activeIndex, item: this.view.item(1) });
377
- this.application.tick();
378
351
  }
379
352
  };
380
353
  /**
@@ -387,13 +360,9 @@ var ScrollViewComponent = /** @class */ (function () {
387
360
  * @hidden
388
361
  */
389
362
  ScrollViewComponent.prototype.handleDrag = function (e) {
390
- var _this = this;
391
363
  var deltaX = e.pageX - this.initialTouchCoordinate;
392
364
  if (!this.animationState && !this.isDragForbidden(deltaX) && this.draggedInsideBounds(deltaX)) {
393
- // TO DO: refactor to apply style without triggering the change detection
394
- this.ngZone.run(function () {
395
- _this.transitionStyle = "translateX(" + deltaX + "px)";
396
- });
365
+ this.renderer.setStyle(this.itemWrapper.nativeElement, 'transform', "translateX(" + deltaX + "px)");
397
366
  }
398
367
  };
399
368
  /**
@@ -414,17 +383,17 @@ var ScrollViewComponent = /** @class */ (function () {
414
383
  _this.changeIndex(deltaX > 0 ? Dir.Prev : Dir.Next);
415
384
  }
416
385
  if (!_this.animate) {
417
- _this.transitionStyle = null;
386
+ _this.renderer.removeStyle(_this.itemWrapper.nativeElement, 'transform');
418
387
  _this.activeIndexChange.emit(_this.activeIndex);
419
388
  _this.itemChanged.emit({ index: _this.activeIndex, item: _this.view.item(1) });
420
389
  }
421
390
  }
422
- else if (Math.abs(deltaX) > 0) {
423
- if (_this.animate) {
391
+ else {
392
+ if (_this.animate && deltaX) {
424
393
  _this.animationState = 'center';
425
394
  }
426
395
  else {
427
- _this.transitionStyle = null;
396
+ _this.renderer.removeStyle(_this.itemWrapper.nativeElement, 'transform');
428
397
  }
429
398
  }
430
399
  });
@@ -611,15 +580,13 @@ var ScrollViewComponent = /** @class */ (function () {
611
580
  __metadata("design:type", TemplateRef)
612
581
  ], ScrollViewComponent.prototype, "itemTemplateRef", void 0);
613
582
  __decorate([
614
- HostBinding('class.k-widget'),
615
- __metadata("design:type", Boolean),
616
- __metadata("design:paramtypes", [])
617
- ], ScrollViewComponent.prototype, "widgetClass", null);
583
+ ViewChild('itemWrapper', { static: false }),
584
+ __metadata("design:type", ElementRef)
585
+ ], ScrollViewComponent.prototype, "itemWrapper", void 0);
618
586
  __decorate([
619
587
  HostBinding('class.k-scrollview'),
620
- __metadata("design:type", Boolean),
621
- __metadata("design:paramtypes", [])
622
- ], ScrollViewComponent.prototype, "scrollViewClass", null);
588
+ __metadata("design:type", Boolean)
589
+ ], ScrollViewComponent.prototype, "scrollViewClass", void 0);
623
590
  __decorate([
624
591
  HostBinding('class.k-scrollview-light'),
625
592
  __metadata("design:type", Boolean),
@@ -642,14 +609,12 @@ var ScrollViewComponent = /** @class */ (function () {
642
609
  ], ScrollViewComponent.prototype, "hostHeight", null);
643
610
  __decorate([
644
611
  HostBinding('attr.tabindex'),
645
- __metadata("design:type", Number),
646
- __metadata("design:paramtypes", [])
647
- ], ScrollViewComponent.prototype, "tabIndex", null);
612
+ __metadata("design:type", Number)
613
+ ], ScrollViewComponent.prototype, "tabIndex", void 0);
648
614
  __decorate([
649
615
  HostBinding('attr.aria-live'),
650
- __metadata("design:type", String),
651
- __metadata("design:paramtypes", [])
652
- ], ScrollViewComponent.prototype, "ariaLive", null);
616
+ __metadata("design:type", String)
617
+ ], ScrollViewComponent.prototype, "ariaLive", void 0);
653
618
  __decorate([
654
619
  HostBinding('attr.dir'),
655
620
  __metadata("design:type", String),
@@ -690,12 +655,12 @@ var ScrollViewComponent = /** @class */ (function () {
690
655
  }
691
656
  ],
692
657
  selector: 'kendo-scrollview',
693
- template: "\n <ul class='k-scrollview-wrap'\n [ngStyle]=\"{ transform: transitionStyle }\"\n [@animateTo]=\"animationState\"\n (@animateTo.done)=\"transitionEndHandler($event)\"\n kendoDraggable\n (kendoDrag)=\"handleDrag($event)\"\n (kendoPress)=\"handlePress($event)\"\n (kendoRelease)=\"handleRelease($event)\"\n >\n <li\n *ngFor=\"let item of view;let i=index\"\n [ngStyle]=\"inlineListItemStyles(i)\"\n [attr.aria-hidden]=\"i !== 1\"\n >\n <ng-template\n [ngTemplateOutlet]=\"itemTemplateRef\"\n [ngTemplateOutletContext]=\"{ item: item }\">\n </ng-template>\n </li>\n </ul>\n <div class='k-scrollview-elements'\n [ngStyle]=\"{'height': height}\"\n *ngIf=\"!isDataSourceEmpty && (pageable||arrows)\">\n\n <a class=\"k-scrollview-prev\"\n aria-label=\"previous\"\n *ngIf=\"arrows && displayLeftArrow()\"\n (click)=\"leftArrowClick()\">\n <span class=\"k-icon k-i-arrowhead-w\"></span>\n </a>\n <a class=\"k-scrollview-next\"\n aria-label=\"next\"\n *ngIf=\"arrows && displayRightArrow()\"\n (click)=\"rightArrowClick()\">\n <span class=\"k-icon k-i-arrowhead-e\"></span>\n </a>\n <kendo-scrollview-pager\n class='k-scrollview-nav-wrap'\n *ngIf=\"pageable\"\n (pagerIndexChange)=\"pageChange($event)\"\n [data]=\"data\"\n [activeIndex]=\"activeIndex\">\n </kendo-scrollview-pager>\n </div>\n "
658
+ template: "\n <ul class='k-scrollview-wrap'\n #itemWrapper\n [@animateTo]=\"animationState\"\n (@animateTo.done)=\"transitionEndHandler($event)\"\n kendoDraggable\n (kendoDrag)=\"handleDrag($event)\"\n (kendoPress)=\"handlePress($event)\"\n (kendoRelease)=\"handleRelease($event)\"\n >\n <li\n *ngFor=\"let item of view;let i=index\"\n [ngStyle]=\"inlineListItemStyles(i)\"\n [attr.aria-hidden]=\"i !== 1\"\n >\n <ng-template\n [ngTemplateOutlet]=\"itemTemplateRef\"\n [ngTemplateOutletContext]=\"{ item: item }\">\n </ng-template>\n </li>\n </ul>\n <div class='k-scrollview-elements'\n [ngStyle]=\"{'height': height}\"\n *ngIf=\"!isDataSourceEmpty && (pageable||arrows)\">\n\n <a class=\"k-scrollview-prev\"\n aria-label=\"previous\"\n *ngIf=\"arrows && displayLeftArrow()\"\n (click)=\"leftArrowClick()\">\n <span class=\"k-icon k-i-arrowhead-w\"></span>\n </a>\n <a class=\"k-scrollview-next\"\n aria-label=\"next\"\n *ngIf=\"arrows && displayRightArrow()\"\n (click)=\"rightArrowClick()\">\n <span class=\"k-icon k-i-arrowhead-e\"></span>\n </a>\n <kendo-scrollview-pager\n class='k-scrollview-nav-wrap'\n *ngIf=\"pageable\"\n (pagerIndexChange)=\"pageChange($event)\"\n [data]=\"data\"\n [activeIndex]=\"activeIndex\">\n </kendo-scrollview-pager>\n </div>\n "
694
659
  }),
695
660
  __metadata("design:paramtypes", [ElementRef,
696
- ApplicationRef,
697
661
  LocalizationService,
698
- NgZone])
662
+ NgZone,
663
+ Renderer2])
699
664
  ], ScrollViewComponent);
700
665
  return ScrollViewComponent;
701
666
  }());
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-scrollview',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1626799822,
14
+ publishDate: 1637575183,
15
15
  version: '',
16
16
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
17
17
  };
@@ -67,12 +67,12 @@ var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
67
67
  * ```
68
68
  */
69
69
  var ScrollViewComponent = /** @class */ (function () {
70
- function ScrollViewComponent(element, application, localization, ngZone) {
70
+ function ScrollViewComponent(element, localization, ngZone, renderer) {
71
71
  var _this = this;
72
72
  this.element = element;
73
- this.application = application;
74
73
  this.localization = localization;
75
74
  this.ngZone = ngZone;
75
+ this.renderer = renderer;
76
76
  /**
77
77
  * Provides the data source for the ScrollView ([see example]({% slug datasources_scrollview %})).
78
78
  */
@@ -111,9 +111,11 @@ var ScrollViewComponent = /** @class */ (function () {
111
111
  * Fires after the activeIndex has changed. Allows for two-way binding of the activeIndex property.
112
112
  */
113
113
  this.activeIndexChange = new core_1.EventEmitter();
114
+ this.scrollViewClass = true;
115
+ this.tabIndex = 1;
116
+ this.ariaLive = 'assertive';
114
117
  this.touchAction = 'pan-y pinch-zoom';
115
118
  this.animationState = null;
116
- this.transitionStyle = null;
117
119
  this.view = new data_collection_1.DataCollection(function () {
118
120
  return new data_collection_1.DataResultIterator(_this.data, _this.activeIndex, _this.endless, _this.pageIndex, _this.isRTL);
119
121
  });
@@ -137,20 +139,6 @@ var ScrollViewComponent = /** @class */ (function () {
137
139
  enumerable: true,
138
140
  configurable: true
139
141
  });
140
- Object.defineProperty(ScrollViewComponent.prototype, "widgetClass", {
141
- get: function () {
142
- return true;
143
- },
144
- enumerable: true,
145
- configurable: true
146
- });
147
- Object.defineProperty(ScrollViewComponent.prototype, "scrollViewClass", {
148
- get: function () {
149
- return true;
150
- },
151
- enumerable: true,
152
- configurable: true
153
- });
154
142
  Object.defineProperty(ScrollViewComponent.prototype, "scrollViewLightOverlayClass", {
155
143
  get: function () {
156
144
  return this.pagerOverlay === 'light';
@@ -175,16 +163,6 @@ var ScrollViewComponent = /** @class */ (function () {
175
163
  enumerable: true,
176
164
  configurable: true
177
165
  });
178
- Object.defineProperty(ScrollViewComponent.prototype, "tabIndex", {
179
- get: function () { return 1; },
180
- enumerable: true,
181
- configurable: true
182
- });
183
- Object.defineProperty(ScrollViewComponent.prototype, "ariaLive", {
184
- get: function () { return 'assertive'; },
185
- enumerable: true,
186
- configurable: true
187
- });
188
166
  Object.defineProperty(ScrollViewComponent.prototype, "dir", {
189
167
  get: function () {
190
168
  return this.direction;
@@ -220,9 +198,6 @@ var ScrollViewComponent = /** @class */ (function () {
220
198
  }
221
199
  }
222
200
  };
223
- /**
224
- * @hidden
225
- */
226
201
  ScrollViewComponent.prototype.ngOnChanges = function (_) {
227
202
  this.activeIndex = Math.max(Math.min(this.activeIndex, this.view.total - 1), 0);
228
203
  };
@@ -243,7 +218,6 @@ var ScrollViewComponent = /** @class */ (function () {
243
218
  */
244
219
  ScrollViewComponent.prototype.transitionEndHandler = function (e) {
245
220
  this.animationState = null;
246
- this.transitionStyle = null;
247
221
  if (e.toState === 'left' || e.toState === 'right') {
248
222
  if (this.pageIndex !== null) {
249
223
  this.activeIndex = this.pageIndex;
@@ -252,7 +226,6 @@ var ScrollViewComponent = /** @class */ (function () {
252
226
  this.activeIndex = this.index;
253
227
  this.activeIndexChange.emit(this.activeIndex);
254
228
  this.itemChanged.emit({ index: this.activeIndex, item: this.view.item(1) });
255
- this.application.tick();
256
229
  }
257
230
  };
258
231
  /**
@@ -265,13 +238,9 @@ var ScrollViewComponent = /** @class */ (function () {
265
238
  * @hidden
266
239
  */
267
240
  ScrollViewComponent.prototype.handleDrag = function (e) {
268
- var _this = this;
269
241
  var deltaX = e.pageX - this.initialTouchCoordinate;
270
242
  if (!this.animationState && !this.isDragForbidden(deltaX) && this.draggedInsideBounds(deltaX)) {
271
- // TO DO: refactor to apply style without triggering the change detection
272
- this.ngZone.run(function () {
273
- _this.transitionStyle = "translateX(" + deltaX + "px)";
274
- });
243
+ this.renderer.setStyle(this.itemWrapper.nativeElement, 'transform', "translateX(" + deltaX + "px)");
275
244
  }
276
245
  };
277
246
  /**
@@ -292,17 +261,17 @@ var ScrollViewComponent = /** @class */ (function () {
292
261
  _this.changeIndex(deltaX > 0 ? enums_1.Dir.Prev : enums_1.Dir.Next);
293
262
  }
294
263
  if (!_this.animate) {
295
- _this.transitionStyle = null;
264
+ _this.renderer.removeStyle(_this.itemWrapper.nativeElement, 'transform');
296
265
  _this.activeIndexChange.emit(_this.activeIndex);
297
266
  _this.itemChanged.emit({ index: _this.activeIndex, item: _this.view.item(1) });
298
267
  }
299
268
  }
300
- else if (Math.abs(deltaX) > 0) {
301
- if (_this.animate) {
269
+ else {
270
+ if (_this.animate && deltaX) {
302
271
  _this.animationState = 'center';
303
272
  }
304
273
  else {
305
- _this.transitionStyle = null;
274
+ _this.renderer.removeStyle(_this.itemWrapper.nativeElement, 'transform');
306
275
  }
307
276
  }
308
277
  });
@@ -489,15 +458,13 @@ var ScrollViewComponent = /** @class */ (function () {
489
458
  tslib_1.__metadata("design:type", core_1.TemplateRef)
490
459
  ], ScrollViewComponent.prototype, "itemTemplateRef", void 0);
491
460
  tslib_1.__decorate([
492
- core_1.HostBinding('class.k-widget'),
493
- tslib_1.__metadata("design:type", Boolean),
494
- tslib_1.__metadata("design:paramtypes", [])
495
- ], ScrollViewComponent.prototype, "widgetClass", null);
461
+ core_1.ViewChild('itemWrapper', { static: false }),
462
+ tslib_1.__metadata("design:type", core_1.ElementRef)
463
+ ], ScrollViewComponent.prototype, "itemWrapper", void 0);
496
464
  tslib_1.__decorate([
497
465
  core_1.HostBinding('class.k-scrollview'),
498
- tslib_1.__metadata("design:type", Boolean),
499
- tslib_1.__metadata("design:paramtypes", [])
500
- ], ScrollViewComponent.prototype, "scrollViewClass", null);
466
+ tslib_1.__metadata("design:type", Boolean)
467
+ ], ScrollViewComponent.prototype, "scrollViewClass", void 0);
501
468
  tslib_1.__decorate([
502
469
  core_1.HostBinding('class.k-scrollview-light'),
503
470
  tslib_1.__metadata("design:type", Boolean),
@@ -520,14 +487,12 @@ var ScrollViewComponent = /** @class */ (function () {
520
487
  ], ScrollViewComponent.prototype, "hostHeight", null);
521
488
  tslib_1.__decorate([
522
489
  core_1.HostBinding('attr.tabindex'),
523
- tslib_1.__metadata("design:type", Number),
524
- tslib_1.__metadata("design:paramtypes", [])
525
- ], ScrollViewComponent.prototype, "tabIndex", null);
490
+ tslib_1.__metadata("design:type", Number)
491
+ ], ScrollViewComponent.prototype, "tabIndex", void 0);
526
492
  tslib_1.__decorate([
527
493
  core_1.HostBinding('attr.aria-live'),
528
- tslib_1.__metadata("design:type", String),
529
- tslib_1.__metadata("design:paramtypes", [])
530
- ], ScrollViewComponent.prototype, "ariaLive", null);
494
+ tslib_1.__metadata("design:type", String)
495
+ ], ScrollViewComponent.prototype, "ariaLive", void 0);
531
496
  tslib_1.__decorate([
532
497
  core_1.HostBinding('attr.dir'),
533
498
  tslib_1.__metadata("design:type", String),
@@ -568,12 +533,12 @@ var ScrollViewComponent = /** @class */ (function () {
568
533
  }
569
534
  ],
570
535
  selector: 'kendo-scrollview',
571
- template: "\n <ul class='k-scrollview-wrap'\n [ngStyle]=\"{ transform: transitionStyle }\"\n [@animateTo]=\"animationState\"\n (@animateTo.done)=\"transitionEndHandler($event)\"\n kendoDraggable\n (kendoDrag)=\"handleDrag($event)\"\n (kendoPress)=\"handlePress($event)\"\n (kendoRelease)=\"handleRelease($event)\"\n >\n <li\n *ngFor=\"let item of view;let i=index\"\n [ngStyle]=\"inlineListItemStyles(i)\"\n [attr.aria-hidden]=\"i !== 1\"\n >\n <ng-template\n [ngTemplateOutlet]=\"itemTemplateRef\"\n [ngTemplateOutletContext]=\"{ item: item }\">\n </ng-template>\n </li>\n </ul>\n <div class='k-scrollview-elements'\n [ngStyle]=\"{'height': height}\"\n *ngIf=\"!isDataSourceEmpty && (pageable||arrows)\">\n\n <a class=\"k-scrollview-prev\"\n aria-label=\"previous\"\n *ngIf=\"arrows && displayLeftArrow()\"\n (click)=\"leftArrowClick()\">\n <span class=\"k-icon k-i-arrowhead-w\"></span>\n </a>\n <a class=\"k-scrollview-next\"\n aria-label=\"next\"\n *ngIf=\"arrows && displayRightArrow()\"\n (click)=\"rightArrowClick()\">\n <span class=\"k-icon k-i-arrowhead-e\"></span>\n </a>\n <kendo-scrollview-pager\n class='k-scrollview-nav-wrap'\n *ngIf=\"pageable\"\n (pagerIndexChange)=\"pageChange($event)\"\n [data]=\"data\"\n [activeIndex]=\"activeIndex\">\n </kendo-scrollview-pager>\n </div>\n "
536
+ template: "\n <ul class='k-scrollview-wrap'\n #itemWrapper\n [@animateTo]=\"animationState\"\n (@animateTo.done)=\"transitionEndHandler($event)\"\n kendoDraggable\n (kendoDrag)=\"handleDrag($event)\"\n (kendoPress)=\"handlePress($event)\"\n (kendoRelease)=\"handleRelease($event)\"\n >\n <li\n *ngFor=\"let item of view;let i=index\"\n [ngStyle]=\"inlineListItemStyles(i)\"\n [attr.aria-hidden]=\"i !== 1\"\n >\n <ng-template\n [ngTemplateOutlet]=\"itemTemplateRef\"\n [ngTemplateOutletContext]=\"{ item: item }\">\n </ng-template>\n </li>\n </ul>\n <div class='k-scrollview-elements'\n [ngStyle]=\"{'height': height}\"\n *ngIf=\"!isDataSourceEmpty && (pageable||arrows)\">\n\n <a class=\"k-scrollview-prev\"\n aria-label=\"previous\"\n *ngIf=\"arrows && displayLeftArrow()\"\n (click)=\"leftArrowClick()\">\n <span class=\"k-icon k-i-arrowhead-w\"></span>\n </a>\n <a class=\"k-scrollview-next\"\n aria-label=\"next\"\n *ngIf=\"arrows && displayRightArrow()\"\n (click)=\"rightArrowClick()\">\n <span class=\"k-icon k-i-arrowhead-e\"></span>\n </a>\n <kendo-scrollview-pager\n class='k-scrollview-nav-wrap'\n *ngIf=\"pageable\"\n (pagerIndexChange)=\"pageChange($event)\"\n [data]=\"data\"\n [activeIndex]=\"activeIndex\">\n </kendo-scrollview-pager>\n </div>\n "
572
537
  }),
573
538
  tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
574
- core_1.ApplicationRef,
575
539
  kendo_angular_l10n_1.LocalizationService,
576
- core_1.NgZone])
540
+ core_1.NgZone,
541
+ core_1.Renderer2])
577
542
  ], ScrollViewComponent);
578
543
  return ScrollViewComponent;
579
544
  }());
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- System.register("@progress/kendo-angular-scrollview",["tslib","@angular/common","@angular/core","@progress/kendo-angular-common","@angular/animations","@progress/kendo-licensing","@progress/kendo-angular-l10n"],function(o){var r,s,l,d,c,p,u;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){r=t(e)},function(e){s=t(e)},function(e){l=t(e)},function(e){d=t(e)},function(e){c=t(e)},function(e){p=t(e)},function(e){u=t(e)}],execute:function(){function i(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,a;n=[function(e,t){e.exports=l},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=n(0),o=n(0),a=(r.prototype.itemClass=function(e){return{"k-primary":e===this.activeIndex}},r.prototype.indexChange=function(e){this.pagerIndexChange.emit(e)},i.__decorate([a.Input(),i.__metadata("design:type",Number)],r.prototype,"activeIndex",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Array)],r.prototype,"data",void 0),i.__decorate([a.Output(),i.__metadata("design:type",o.EventEmitter)],r.prototype,"pagerIndexChange",void 0),i.__decorate([a.Component({selector:"kendo-scrollview-pager",template:'\n <ul class="k-scrollview-pageable k-scrollview-nav">\n <li class="k-button" *ngFor="let item of data; let i = index"\n [ngClass]="itemClass(i)"\n (click)="indexChange(i)">\n </li>\n </ul>\n '})],r));function r(){this.pagerIndexChange=new o.EventEmitter}t.ScrollViewPagerComponent=a},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),a=n(12),r=n(11),s=n(3),l=n(10),d=n(9),c=n(8),n=n(7),n=(Object.defineProperty(p.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){this.index=this._activeIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"widgetClass",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"scrollViewClass",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"scrollViewLightOverlayClass",{get:function(){return"light"===this.pagerOverlay},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"scrollViewDarkOverlayClass",{get:function(){return"dark"===this.pagerOverlay},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hostWidth",{get:function(){return this.width},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"hostHeight",{get:function(){return this.height},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"tabIndex",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"ariaLive",{get:function(){return"assertive"},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"direction",{get:function(){return this.localization.rtl?"rtl":"ltr"},enumerable:!0,configurable:!0}),p.prototype.keyDown=function(e){e.keyCode===s.Keys.ArrowLeft&&(this.isRTL?this.next():this.prev()),e.keyCode===s.Keys.ArrowRight&&(this.isRTL?this.prev():this.next())},p.prototype.ngOnChanges=function(e){this.activeIndex=Math.max(Math.min(this.activeIndex,this.view.total-1),0)},p.prototype.prev=function(){this.navigate(r.Dir.Prev)},p.prototype.next=function(){this.navigate(r.Dir.Next)},p.prototype.transitionEndHandler=function(e){this.animationState=null,this.transitionStyle=null,"left"!==e.toState&&"right"!==e.toState||(null!==this.pageIndex&&(this.activeIndex=this.pageIndex,this.pageIndex=null),this.activeIndex=this.index,this.activeIndexChange.emit(this.activeIndex),this.itemChanged.emit({index:this.activeIndex,item:this.view.item(1)}),this.application.tick())},p.prototype.handlePress=function(e){this.initialTouchCoordinate=e.pageX},p.prototype.handleDrag=function(e){var t=this,n=e.pageX-this.initialTouchCoordinate;this.animationState||this.isDragForbidden(n)||!this.draggedInsideBounds(n)||this.ngZone.run(function(){t.transitionStyle="translateX("+n+"px)"})},p.prototype.handleRelease=function(e){var t=this,n=e.pageX-this.initialTouchCoordinate;this.isDragForbidden(n)||this.ngZone.run(function(){t.draggedEnoughToNavigate(n)?(t.isRTL?t.changeIndex(n<0?r.Dir.Prev:r.Dir.Next):t.changeIndex(0<n?r.Dir.Prev:r.Dir.Next),t.animate||(t.transitionStyle=null,t.activeIndexChange.emit(t.activeIndex),t.itemChanged.emit({index:t.activeIndex,item:t.view.item(1)}))):0<Math.abs(n)&&(t.animate?t.animationState="center":t.transitionStyle=null)})},p.prototype.pageChange=function(e){this.animationState||this.activeIndex===e||(this.animate?(this.pageIndex=e,this.isRTL?this.animationState=this.pageIndex>this.index?"right":"left":this.animationState=this.pageIndex>this.index?"left":"right"):this.activeIndex=e)},p.prototype.inlineListItemStyles=function(e){return{height:this.height,transform:this.transforms[e],width:"100%"}},p.prototype.displayLeftArrow=function(){var e=this.isRTL?this.activeIndex+1<this.view.total:0<this.activeIndex;return(this.endless||e)&&0<this.view.total},p.prototype.leftArrowClick=function(){this.isRTL?this.next():this.prev()},p.prototype.displayRightArrow=function(){var e=this.isRTL?0<this.activeIndex:this.activeIndex+1<this.view.total;return(this.endless||e)&&0<this.view.total},p.prototype.rightArrowClick=function(){this.isRTL?this.prev():this.next()},p.prototype.draggedInsideBounds=function(e){return Math.abs(e)<=this.element.nativeElement.offsetWidth},p.prototype.draggedEnoughToNavigate=function(e){return Math.abs(e)>this.element.nativeElement.offsetWidth/2},p.prototype.isDragForbidden=function(e){var e=this.isRTL?e<0&&0!==e:0<e&&0!==e,e=0===this.activeIndex&&e||this.activeIndex===this.view.total-1&&!e;return!this.endless&&e},p.prototype.navigate=function(e){this.isDataSourceEmpty||this.animationState||(this.changeIndex(e),this.animate||(this.activeIndexChange.emit(this.activeIndex),this.itemChanged.emit({index:this.activeIndex,item:this.view.item(1)})))},p.prototype.changeIndex=function(e){e===r.Dir.Next&&this.view.canMoveNext()?(this.index=(this.index+1)%this.view.total,this.animate?this.animationState=this.isRTL?"right":"left":this.activeIndex=this.index):e===r.Dir.Prev&&this.view.canMovePrev()&&(this.index=0===this.index?this.view.total-1:this.index-1,this.animate?this.animationState=this.isRTL?"left":"right":this.activeIndex=this.index)},Object.defineProperty(p.prototype,"isRTL",{get:function(){return"rtl"===this.direction},enumerable:!0,configurable:!0}),i.__decorate([o.Input(),i.__metadata("design:type",Array)],p.prototype,"data",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Number),i.__metadata("design:paramtypes",[Number])],p.prototype,"activeIndex",null),i.__decorate([o.Input(),i.__metadata("design:type",String)],p.prototype,"width",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],p.prototype,"height",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],p.prototype,"endless",void 0),i.__decorate([o.Input(),i.__metadata("design:type",String)],p.prototype,"pagerOverlay",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],p.prototype,"animate",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],p.prototype,"pageable",void 0),i.__decorate([o.Input(),i.__metadata("design:type",Boolean)],p.prototype,"arrows",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],p.prototype,"itemChanged",void 0),i.__decorate([o.Output(),i.__metadata("design:type",o.EventEmitter)],p.prototype,"activeIndexChange",void 0),i.__decorate([o.ContentChild(o.TemplateRef,{static:!1}),i.__metadata("design:type",o.TemplateRef)],p.prototype,"itemTemplateRef",void 0),i.__decorate([o.HostBinding("class.k-widget"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"widgetClass",null),i.__decorate([o.HostBinding("class.k-scrollview"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"scrollViewClass",null),i.__decorate([o.HostBinding("class.k-scrollview-light"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"scrollViewLightOverlayClass",null),i.__decorate([o.HostBinding("class.k-scrollview-dark"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"scrollViewDarkOverlayClass",null),i.__decorate([o.HostBinding("style.width"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],p.prototype,"hostWidth",null),i.__decorate([o.HostBinding("style.height"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],p.prototype,"hostHeight",null),i.__decorate([o.HostBinding("attr.tabindex"),i.__metadata("design:type",Number),i.__metadata("design:paramtypes",[])],p.prototype,"tabIndex",null),i.__decorate([o.HostBinding("attr.aria-live"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],p.prototype,"ariaLive",null),i.__decorate([o.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],p.prototype,"dir",null),i.__decorate([o.HostBinding("style.touch-action"),i.__metadata("design:type",String)],p.prototype,"touchAction",void 0),i.__decorate([o.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],p.prototype,"keyDown",null),i.__decorate([o.Component({animations:[a.trigger("animateTo",[a.state("center, left, right",a.style({transform:"translateX(0)"})),a.transition("* => right",[a.animate("300ms ease-out",a.style({transform:"translateX(100%)"}))]),a.transition("* => left",[a.animate("300ms ease-out",a.style({transform:"translateX(-100%)"}))]),a.transition("* => center",[a.animate("300ms ease-out")])])],exportAs:"kendoScrollView",providers:[n.LocalizationService,{provide:n.L10N_PREFIX,useValue:"kendo.scrollview"}],selector:"kendo-scrollview",template:'\n <ul class=\'k-scrollview-wrap\'\n [ngStyle]="{ transform: transitionStyle }"\n [@animateTo]="animationState"\n (@animateTo.done)="transitionEndHandler($event)"\n kendoDraggable\n (kendoDrag)="handleDrag($event)"\n (kendoPress)="handlePress($event)"\n (kendoRelease)="handleRelease($event)"\n >\n <li\n *ngFor="let item of view;let i=index"\n [ngStyle]="inlineListItemStyles(i)"\n [attr.aria-hidden]="i !== 1"\n >\n <ng-template\n [ngTemplateOutlet]="itemTemplateRef"\n [ngTemplateOutletContext]="{ item: item }">\n </ng-template>\n </li>\n </ul>\n <div class=\'k-scrollview-elements\'\n [ngStyle]="{\'height\': height}"\n *ngIf="!isDataSourceEmpty && (pageable||arrows)">\n\n <a class="k-scrollview-prev"\n aria-label="previous"\n *ngIf="arrows && displayLeftArrow()"\n (click)="leftArrowClick()">\n <span class="k-icon k-i-arrowhead-w"></span>\n </a>\n <a class="k-scrollview-next"\n aria-label="next"\n *ngIf="arrows && displayRightArrow()"\n (click)="rightArrowClick()">\n <span class="k-icon k-i-arrowhead-e"></span>\n </a>\n <kendo-scrollview-pager\n class=\'k-scrollview-nav-wrap\'\n *ngIf="pageable"\n (pagerIndexChange)="pageChange($event)"\n [data]="data"\n [activeIndex]="activeIndex">\n </kendo-scrollview-pager>\n </div>\n '}),i.__metadata("design:paramtypes",[o.ElementRef,o.ApplicationRef,n.LocalizationService,o.NgZone])],p));function p(e,t,n,i){var a=this;this.element=e,this.application=t,this.localization=n,this.ngZone=i,this.data=[],this.endless=!1,this.pagerOverlay="none",this.animate=!0,this.pageable=!1,this.arrows=!1,this.itemChanged=new o.EventEmitter,this.activeIndexChange=new o.EventEmitter,this.touchAction="pan-y pinch-zoom",this.animationState=null,this.transitionStyle=null,this.view=new c.DataCollection(function(){return new c.DataResultIterator(a.data,a.activeIndex,a.endless,a.pageIndex,a.isRTL)}),this.isDataSourceEmpty=!1,this._activeIndex=0,this.index=0,this.pageIndex=null,this.transforms=["translateX(-100%)","translateX(0%)","translateX(100%)"],l.validatePackage(d.packageMetadata)}t.ScrollViewComponent=n},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=n(0),o=n(5),r=n(4),s=n(2),n=n(3),s=[r.ScrollViewComponent,s.ScrollViewPagerComponent],r=[r.ScrollViewComponent],n=i.__decorate([a.NgModule({declarations:[s],exports:[r],imports:[o.CommonModule,n.DraggableModule]})],function(){});t.ScrollViewModule=n},function(e,t){e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){if("function"==typeof Symbol&&Symbol.iterator)return Symbol.iterator;for(var e=Object.getOwnPropertyNames(Map.prototype),t=Map.prototype,n=0;n<e.length;++n){var i=e[n];if("entries"!==i&&"size"!==i&&t[i]===t.entries)return i}}(),a={},o=(Object.defineProperty(r.prototype,"data",{get:function(){var e=this.total,e=this.endless?[this.source[(this.index-1+e)%e],this.source[this.index%e],this.source[(this.index+1+e)%e]]:[a].concat(this.source,[a]).slice(this.index,this.index+3);return null!==this.pageIndex&&(e[this.pageIndex>this.index?2:0]=this.source[this.pageIndex]),this.rtl?e.reverse():e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"total",{get:function(){return this.source.length},enumerable:!0,configurable:!0}),r.prototype.canMoveNext=function(){return this.endless||this.index<this.total-1},r.prototype.canMovePrev=function(){return this.endless||0<this.index},r.prototype[i]=function(){return this.data[i]()},r);function r(e,t,n,i,a){this.rtl=!1,this.source=e||[],this.index=t||0,this.endless=n,this.pageIndex=i,this.rtl=a}t.DataResultIterator=o;Object.defineProperty(s.prototype,"length",{get:function(){return this.accessor().data.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"total",{get:function(){return this.accessor().total},enumerable:!0,configurable:!0}),s.prototype.item=function(e){return this.accessor().data[e]},s.prototype.canMoveNext=function(){return this.accessor().canMoveNext()},s.prototype.canMovePrev=function(){return this.accessor().canMovePrev()},s.prototype[Symbol.iterator]=function(){return this.accessor()[Symbol.iterator]()},o=s;function s(e){this.accessor=e}t.DataCollection=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-scrollview",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1626799822,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(t=t.Dir||(t.Dir={}))[t.Next=1]="Next",t[t.Prev=-1]="Prev"},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4);t.ScrollViewComponent=i.ScrollViewComponent;i=n(6);t.ScrollViewModule=i.ScrollViewModule;n=n(2);t.ScrollViewPagerComponent=n.ScrollViewPagerComponent,function(e){for(var t in e)o(t,e[t])}(t)}],a={},i.m=n,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=13)}}});
5
+ System.register("@progress/kendo-angular-scrollview",["tslib","@angular/common","@progress/kendo-angular-common","@angular/core","@angular/animations","@progress/kendo-licensing","@progress/kendo-angular-l10n"],function(r){var o,s,d,l,p,c,u;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){o=t(e)},function(e){s=t(e)},function(e){d=t(e)},function(e){l=t(e)},function(e){p=t(e)},function(e){c=t(e)},function(e){u=t(e)}],execute:function(){function i(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,a;n=[function(e,t){e.exports=l},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=n(0),r=n(0),a=(o.prototype.itemClass=function(e){return{"k-primary":e===this.activeIndex}},o.prototype.indexChange=function(e){this.pagerIndexChange.emit(e)},i.__decorate([a.Input(),i.__metadata("design:type",Number)],o.prototype,"activeIndex",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Array)],o.prototype,"data",void 0),i.__decorate([a.Output(),i.__metadata("design:type",r.EventEmitter)],o.prototype,"pagerIndexChange",void 0),i.__decorate([a.Component({selector:"kendo-scrollview-pager",template:'\n <ul class="k-scrollview-pageable k-scrollview-nav">\n <li class="k-button" *ngFor="let item of data; let i = index"\n [ngClass]="itemClass(i)"\n (click)="indexChange(i)">\n </li>\n </ul>\n '})],o));function o(){this.pagerIndexChange=new r.EventEmitter}t.ScrollViewPagerComponent=a},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),r=n(0),a=n(12),o=n(11),s=n(3),d=n(10),l=n(9),p=n(8),n=n(7),n=(Object.defineProperty(c.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(e){this.index=this._activeIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"scrollViewLightOverlayClass",{get:function(){return"light"===this.pagerOverlay},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"scrollViewDarkOverlayClass",{get:function(){return"dark"===this.pagerOverlay},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"hostWidth",{get:function(){return this.width},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"hostHeight",{get:function(){return this.height},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"direction",{get:function(){return this.localization.rtl?"rtl":"ltr"},enumerable:!0,configurable:!0}),c.prototype.keyDown=function(e){e.keyCode===s.Keys.ArrowLeft&&(this.isRTL?this.next():this.prev()),e.keyCode===s.Keys.ArrowRight&&(this.isRTL?this.prev():this.next())},c.prototype.ngOnChanges=function(e){this.activeIndex=Math.max(Math.min(this.activeIndex,this.view.total-1),0)},c.prototype.prev=function(){this.navigate(o.Dir.Prev)},c.prototype.next=function(){this.navigate(o.Dir.Next)},c.prototype.transitionEndHandler=function(e){this.animationState=null,"left"!==e.toState&&"right"!==e.toState||(null!==this.pageIndex&&(this.activeIndex=this.pageIndex,this.pageIndex=null),this.activeIndex=this.index,this.activeIndexChange.emit(this.activeIndex),this.itemChanged.emit({index:this.activeIndex,item:this.view.item(1)}))},c.prototype.handlePress=function(e){this.initialTouchCoordinate=e.pageX},c.prototype.handleDrag=function(e){e=e.pageX-this.initialTouchCoordinate;this.animationState||this.isDragForbidden(e)||!this.draggedInsideBounds(e)||this.renderer.setStyle(this.itemWrapper.nativeElement,"transform","translateX("+e+"px)")},c.prototype.handleRelease=function(e){var t=this,n=e.pageX-this.initialTouchCoordinate;this.isDragForbidden(n)||this.ngZone.run(function(){t.draggedEnoughToNavigate(n)?(t.isRTL?t.changeIndex(n<0?o.Dir.Prev:o.Dir.Next):t.changeIndex(0<n?o.Dir.Prev:o.Dir.Next),t.animate||(t.renderer.removeStyle(t.itemWrapper.nativeElement,"transform"),t.activeIndexChange.emit(t.activeIndex),t.itemChanged.emit({index:t.activeIndex,item:t.view.item(1)}))):t.animate&&n?t.animationState="center":t.renderer.removeStyle(t.itemWrapper.nativeElement,"transform")})},c.prototype.pageChange=function(e){this.animationState||this.activeIndex===e||(this.animate?(this.pageIndex=e,this.isRTL?this.animationState=this.pageIndex>this.index?"right":"left":this.animationState=this.pageIndex>this.index?"left":"right"):this.activeIndex=e)},c.prototype.inlineListItemStyles=function(e){return{height:this.height,transform:this.transforms[e],width:"100%"}},c.prototype.displayLeftArrow=function(){var e=this.isRTL?this.activeIndex+1<this.view.total:0<this.activeIndex;return(this.endless||e)&&0<this.view.total},c.prototype.leftArrowClick=function(){this.isRTL?this.next():this.prev()},c.prototype.displayRightArrow=function(){var e=this.isRTL?0<this.activeIndex:this.activeIndex+1<this.view.total;return(this.endless||e)&&0<this.view.total},c.prototype.rightArrowClick=function(){this.isRTL?this.prev():this.next()},c.prototype.draggedInsideBounds=function(e){return Math.abs(e)<=this.element.nativeElement.offsetWidth},c.prototype.draggedEnoughToNavigate=function(e){return Math.abs(e)>this.element.nativeElement.offsetWidth/2},c.prototype.isDragForbidden=function(e){var e=this.isRTL?e<0&&0!==e:0<e&&0!==e,e=0===this.activeIndex&&e||this.activeIndex===this.view.total-1&&!e;return!this.endless&&e},c.prototype.navigate=function(e){this.isDataSourceEmpty||this.animationState||(this.changeIndex(e),this.animate||(this.activeIndexChange.emit(this.activeIndex),this.itemChanged.emit({index:this.activeIndex,item:this.view.item(1)})))},c.prototype.changeIndex=function(e){e===o.Dir.Next&&this.view.canMoveNext()?(this.index=(this.index+1)%this.view.total,this.animate?this.animationState=this.isRTL?"right":"left":this.activeIndex=this.index):e===o.Dir.Prev&&this.view.canMovePrev()&&(this.index=0===this.index?this.view.total-1:this.index-1,this.animate?this.animationState=this.isRTL?"left":"right":this.activeIndex=this.index)},Object.defineProperty(c.prototype,"isRTL",{get:function(){return"rtl"===this.direction},enumerable:!0,configurable:!0}),i.__decorate([r.Input(),i.__metadata("design:type",Array)],c.prototype,"data",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Number),i.__metadata("design:paramtypes",[Number])],c.prototype,"activeIndex",null),i.__decorate([r.Input(),i.__metadata("design:type",String)],c.prototype,"width",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],c.prototype,"height",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],c.prototype,"endless",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],c.prototype,"pagerOverlay",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],c.prototype,"animate",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],c.prototype,"pageable",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],c.prototype,"arrows",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],c.prototype,"itemChanged",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],c.prototype,"activeIndexChange",void 0),i.__decorate([r.ContentChild(r.TemplateRef,{static:!1}),i.__metadata("design:type",r.TemplateRef)],c.prototype,"itemTemplateRef",void 0),i.__decorate([r.ViewChild("itemWrapper",{static:!1}),i.__metadata("design:type",r.ElementRef)],c.prototype,"itemWrapper",void 0),i.__decorate([r.HostBinding("class.k-scrollview"),i.__metadata("design:type",Boolean)],c.prototype,"scrollViewClass",void 0),i.__decorate([r.HostBinding("class.k-scrollview-light"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],c.prototype,"scrollViewLightOverlayClass",null),i.__decorate([r.HostBinding("class.k-scrollview-dark"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],c.prototype,"scrollViewDarkOverlayClass",null),i.__decorate([r.HostBinding("style.width"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],c.prototype,"hostWidth",null),i.__decorate([r.HostBinding("style.height"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],c.prototype,"hostHeight",null),i.__decorate([r.HostBinding("attr.tabindex"),i.__metadata("design:type",Number)],c.prototype,"tabIndex",void 0),i.__decorate([r.HostBinding("attr.aria-live"),i.__metadata("design:type",String)],c.prototype,"ariaLive",void 0),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String),i.__metadata("design:paramtypes",[])],c.prototype,"dir",null),i.__decorate([r.HostBinding("style.touch-action"),i.__metadata("design:type",String)],c.prototype,"touchAction",void 0),i.__decorate([r.HostListener("keydown",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],c.prototype,"keyDown",null),i.__decorate([r.Component({animations:[a.trigger("animateTo",[a.state("center, left, right",a.style({transform:"translateX(0)"})),a.transition("* => right",[a.animate("300ms ease-out",a.style({transform:"translateX(100%)"}))]),a.transition("* => left",[a.animate("300ms ease-out",a.style({transform:"translateX(-100%)"}))]),a.transition("* => center",[a.animate("300ms ease-out")])])],exportAs:"kendoScrollView",providers:[n.LocalizationService,{provide:n.L10N_PREFIX,useValue:"kendo.scrollview"}],selector:"kendo-scrollview",template:'\n <ul class=\'k-scrollview-wrap\'\n #itemWrapper\n [@animateTo]="animationState"\n (@animateTo.done)="transitionEndHandler($event)"\n kendoDraggable\n (kendoDrag)="handleDrag($event)"\n (kendoPress)="handlePress($event)"\n (kendoRelease)="handleRelease($event)"\n >\n <li\n *ngFor="let item of view;let i=index"\n [ngStyle]="inlineListItemStyles(i)"\n [attr.aria-hidden]="i !== 1"\n >\n <ng-template\n [ngTemplateOutlet]="itemTemplateRef"\n [ngTemplateOutletContext]="{ item: item }">\n </ng-template>\n </li>\n </ul>\n <div class=\'k-scrollview-elements\'\n [ngStyle]="{\'height\': height}"\n *ngIf="!isDataSourceEmpty && (pageable||arrows)">\n\n <a class="k-scrollview-prev"\n aria-label="previous"\n *ngIf="arrows && displayLeftArrow()"\n (click)="leftArrowClick()">\n <span class="k-icon k-i-arrowhead-w"></span>\n </a>\n <a class="k-scrollview-next"\n aria-label="next"\n *ngIf="arrows && displayRightArrow()"\n (click)="rightArrowClick()">\n <span class="k-icon k-i-arrowhead-e"></span>\n </a>\n <kendo-scrollview-pager\n class=\'k-scrollview-nav-wrap\'\n *ngIf="pageable"\n (pagerIndexChange)="pageChange($event)"\n [data]="data"\n [activeIndex]="activeIndex">\n </kendo-scrollview-pager>\n </div>\n '}),i.__metadata("design:paramtypes",[r.ElementRef,n.LocalizationService,r.NgZone,r.Renderer2])],c));function c(e,t,n,i){var a=this;this.element=e,this.localization=t,this.ngZone=n,this.renderer=i,this.data=[],this.endless=!1,this.pagerOverlay="none",this.animate=!0,this.pageable=!1,this.arrows=!1,this.itemChanged=new r.EventEmitter,this.activeIndexChange=new r.EventEmitter,this.scrollViewClass=!0,this.tabIndex=1,this.ariaLive="assertive",this.touchAction="pan-y pinch-zoom",this.animationState=null,this.view=new p.DataCollection(function(){return new p.DataResultIterator(a.data,a.activeIndex,a.endless,a.pageIndex,a.isRTL)}),this.isDataSourceEmpty=!1,this._activeIndex=0,this.index=0,this.pageIndex=null,this.transforms=["translateX(-100%)","translateX(0%)","translateX(100%)"],d.validatePackage(l.packageMetadata)}t.ScrollViewComponent=n},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=n(0),r=n(5),o=n(4),s=n(2),n=n(3),s=[o.ScrollViewComponent,s.ScrollViewPagerComponent],o=[o.ScrollViewComponent],n=i.__decorate([a.NgModule({declarations:[s],exports:[o],imports:[r.CommonModule,n.DraggableModule]})],d);function d(){}t.ScrollViewModule=n},function(e,t){e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){if("function"==typeof Symbol&&Symbol.iterator)return Symbol.iterator;for(var e=Object.getOwnPropertyNames(Map.prototype),t=Map.prototype,n=0;n<e.length;++n){var i=e[n];if("entries"!==i&&"size"!==i&&t[i]===t.entries)return i}}(),a={},r=(Object.defineProperty(o.prototype,"data",{get:function(){var e=this.total,e=this.endless?[this.source[(this.index-1+e)%e],this.source[this.index%e],this.source[(this.index+1+e)%e]]:[a].concat(this.source,[a]).slice(this.index,this.index+3);return null!==this.pageIndex&&(e[this.pageIndex>this.index?2:0]=this.source[this.pageIndex]),this.rtl?e.reverse():e},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"total",{get:function(){return this.source.length},enumerable:!0,configurable:!0}),o.prototype.canMoveNext=function(){return this.endless||this.index<this.total-1},o.prototype.canMovePrev=function(){return this.endless||0<this.index},o.prototype[i]=function(){return this.data[i]()},o);function o(e,t,n,i,a){this.rtl=!1,this.source=e||[],this.index=t||0,this.endless=n,this.pageIndex=i,this.rtl=a}t.DataResultIterator=r;Object.defineProperty(s.prototype,"length",{get:function(){return this.accessor().data.length},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"total",{get:function(){return this.accessor().total},enumerable:!0,configurable:!0}),s.prototype.item=function(e){return this.accessor().data[e]},s.prototype.canMoveNext=function(){return this.accessor().canMoveNext()},s.prototype.canMovePrev=function(){return this.accessor().canMovePrev()},s.prototype[Symbol.iterator]=function(){return this.accessor()[Symbol.iterator]()},r=s;function s(e){this.accessor=e}t.DataCollection=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-scrollview",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1637575183,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(t=t.Dir||(t.Dir={}))[t.Next=1]="Next",t[t.Prev=-1]="Prev"},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4);t.ScrollViewComponent=i.ScrollViewComponent;i=n(6);t.ScrollViewModule=i.ScrollViewModule;n=n(2);t.ScrollViewPagerComponent=n.ScrollViewPagerComponent,function(e){for(var t in e)r(t,e[t])}(t)}],a={},i.m=n,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=13)}}});
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A ScrollView Component for Angular",
4
4
  "author": "Progress",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
- "version": "4.1.0",
6
+ "version": "4.1.2",
7
7
  "main": "dist/npm/index.js",
8
8
  "module": "dist/fesm5/index.js",
9
9
  "es2015": "dist/fesm2015/index.js",
@@ -32,13 +32,13 @@
32
32
  "Angular"
33
33
  ],
34
34
  "peerDependencies": {
35
- "@angular/animations": "8 - 12",
36
- "@angular/common": "8 - 12",
37
- "@angular/core": "8 - 12",
35
+ "@angular/animations": "8 - 13",
36
+ "@angular/common": "8 - 13",
37
+ "@angular/core": "8 - 13",
38
38
  "@progress/kendo-angular-common": "^2.0.0",
39
39
  "@progress/kendo-angular-l10n": "^3.0.0",
40
40
  "@progress/kendo-licensing": "^1.0.2",
41
- "rxjs": "^6.4.0"
41
+ "rxjs": "^6.4.0 || ^7.0.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "@progress/kendo-schematics": "^1.0.0",
@@ -61,7 +61,7 @@
61
61
  "@progress/kendo-angular-e2e": "^2.2.0",
62
62
  "@progress/kendo-angular-jest-preset": "^2.0.0",
63
63
  "@progress/kendo-angular-l10n": "^3.0.0",
64
- "@progress/kendo-angular-tasks": "^18.0.8",
64
+ "@progress/kendo-angular-tasks": "^19.0.1",
65
65
  "@progress/kendo-licensing": "^1.0.2",
66
66
  "@progress/kendo-theme-bootstrap": "^4.27.0",
67
67
  "@progress/kendo-theme-default": "^4.29.0",