@colijnit/corecomponents_v12 12.0.65 → 12.0.66

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('@angular/platform-browser'), require('rxjs'), require('rxjs/operators'), require('@syncfusion/ej2-angular-splitbuttons'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js'), require('@angular/animations'), require('@syncfusion/ej2-angular-popups'), require('@syncfusion/ej2-angular-kanban'), require('@syncfusion/ej2-angular-richtexteditor'), require('@angular/forms'), require('@syncfusion/ej2-angular-schedule'), require('@syncfusion/ej2-angular-navigations'), require('@syncfusion/ej2-angular-buttons'), require('@syncfusion/ej2-angular-dropdowns'), require('@syncfusion/ej2-angular-grids'), require('@syncfusion/ej2-base'), require('@syncfusion/ej2-angular-calendars'), require('@syncfusion/ej2-angular-inputs'), require('@syncfusion/ej2-angular-pivotview'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/drag-drop'), require('@angular/cdk/scrolling')) :
3
- typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/common', '@angular/common/http', '@angular/platform-browser', 'rxjs', 'rxjs/operators', '@syncfusion/ej2-angular-splitbuttons', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js', '@angular/animations', '@syncfusion/ej2-angular-popups', '@syncfusion/ej2-angular-kanban', '@syncfusion/ej2-angular-richtexteditor', '@angular/forms', '@syncfusion/ej2-angular-schedule', '@syncfusion/ej2-angular-navigations', '@syncfusion/ej2-angular-buttons', '@syncfusion/ej2-angular-dropdowns', '@syncfusion/ej2-angular-grids', '@syncfusion/ej2-base', '@syncfusion/ej2-angular-calendars', '@syncfusion/ej2-angular-inputs', '@syncfusion/ej2-angular-pivotview', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/drag-drop', '@angular/cdk/scrolling'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.common, global.ng.common.http, global.ng.platformBrowser, global.rxjs, global.rxjs.operators, global.ej2AngularSplitbuttons, global.three, global.CSS3DRenderer, global.TWEEN, global.ng.animations, global.ej2AngularPopups, global.ej2AngularKanban, global.ej2AngularRichtexteditor, global.ng.forms, global.ej2AngularSchedule, global.ej2AngularNavigations, global.ej2AngularButtons, global.ej2AngularDropdowns, global.ej2AngularGrids, global.ej2Base, global.ej2AngularCalendars, global.ej2AngularInputs, global.ej2AngularPivotview, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.dragDrop, global.ng.cdk.scrolling));
5
- })(this, (function (exports, core, common, http, platformBrowser, rxjs, operators, ej2AngularSplitbuttons, three, CSS3DRenderer, TWEEN, animations, ej2AngularPopups, ej2AngularKanban, ej2AngularRichtexteditor, forms, ej2AngularSchedule, ej2AngularNavigations, ej2AngularButtons, ej2AngularDropdowns, ej2AngularGrids, ej2Base, ej2AngularCalendars, ej2AngularInputs, ej2AngularPivotview, overlay, portal, dragDrop, scrolling) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('@angular/platform-browser'), require('rxjs'), require('rxjs/operators'), require('@syncfusion/ej2-angular-splitbuttons'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js'), require('hammerjs'), require('@angular/animations'), require('@syncfusion/ej2-angular-popups'), require('@syncfusion/ej2-angular-kanban'), require('@syncfusion/ej2-angular-richtexteditor'), require('@angular/forms'), require('@syncfusion/ej2-angular-schedule'), require('@syncfusion/ej2-angular-navigations'), require('@syncfusion/ej2-angular-buttons'), require('@syncfusion/ej2-angular-dropdowns'), require('@syncfusion/ej2-angular-grids'), require('@syncfusion/ej2-base'), require('@syncfusion/ej2-angular-calendars'), require('@syncfusion/ej2-angular-inputs'), require('@syncfusion/ej2-angular-pivotview'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/drag-drop'), require('@angular/cdk/scrolling')) :
3
+ typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/common', '@angular/common/http', '@angular/platform-browser', 'rxjs', 'rxjs/operators', '@syncfusion/ej2-angular-splitbuttons', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js', 'hammerjs', '@angular/animations', '@syncfusion/ej2-angular-popups', '@syncfusion/ej2-angular-kanban', '@syncfusion/ej2-angular-richtexteditor', '@angular/forms', '@syncfusion/ej2-angular-schedule', '@syncfusion/ej2-angular-navigations', '@syncfusion/ej2-angular-buttons', '@syncfusion/ej2-angular-dropdowns', '@syncfusion/ej2-angular-grids', '@syncfusion/ej2-base', '@syncfusion/ej2-angular-calendars', '@syncfusion/ej2-angular-inputs', '@syncfusion/ej2-angular-pivotview', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/drag-drop', '@angular/cdk/scrolling'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.common, global.ng.common.http, global.ng.platformBrowser, global.rxjs, global.rxjs.operators, global.ej2AngularSplitbuttons, global.three, global.CSS3DRenderer, global.TWEEN, null, global.ng.animations, global.ej2AngularPopups, global.ej2AngularKanban, global.ej2AngularRichtexteditor, global.ng.forms, global.ej2AngularSchedule, global.ej2AngularNavigations, global.ej2AngularButtons, global.ej2AngularDropdowns, global.ej2AngularGrids, global.ej2Base, global.ej2AngularCalendars, global.ej2AngularInputs, global.ej2AngularPivotview, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.dragDrop, global.ng.cdk.scrolling));
5
+ })(this, (function (exports, core, common, http, platformBrowser, rxjs, operators, ej2AngularSplitbuttons, three, CSS3DRenderer, TWEEN, hammerjs, animations, ej2AngularPopups, ej2AngularKanban, ej2AngularRichtexteditor, forms, ej2AngularSchedule, ej2AngularNavigations, ej2AngularButtons, ej2AngularDropdowns, ej2AngularGrids, ej2Base, ej2AngularCalendars, ej2AngularInputs, ej2AngularPivotview, overlay, portal, dragDrop, scrolling) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -3489,6 +3489,177 @@
3489
3489
  },] }
3490
3490
  ];
3491
3491
 
3492
+ var CarouselComponent = /** @class */ (function () {
3493
+ function CarouselComponent() {
3494
+ var _this = this;
3495
+ this.canNavigateLeft = false;
3496
+ this.canNavigateRight = false;
3497
+ this.activeIndex = 0;
3498
+ this.ro = new ResizeObserver(function (entries) {
3499
+ _this._checkNavigationButtons();
3500
+ });
3501
+ this._disableButtons = false;
3502
+ }
3503
+ Object.defineProperty(CarouselComponent.prototype, "containerChild", {
3504
+ set: function (child) {
3505
+ if (child) {
3506
+ this.container = child;
3507
+ this._checkNavigationButtons();
3508
+ this.ro.observe(this.container.nativeElement);
3509
+ }
3510
+ },
3511
+ enumerable: false,
3512
+ configurable: true
3513
+ });
3514
+ Object.defineProperty(CarouselComponent.prototype, "contentChildren", {
3515
+ set: function (content) {
3516
+ if (content) {
3517
+ this.carouselItems = content.toArray();
3518
+ }
3519
+ this._checkNavigationButtons();
3520
+ },
3521
+ enumerable: false,
3522
+ configurable: true
3523
+ });
3524
+ CarouselComponent.prototype.showClass = function () {
3525
+ return true;
3526
+ };
3527
+ CarouselComponent.prototype.ngOnDestroy = function () {
3528
+ for (var i = this.carouselItems.length - 1; i >= 0; i--) {
3529
+ this.carouselItems[i] = undefined;
3530
+ }
3531
+ this.container = undefined;
3532
+ };
3533
+ CarouselComponent.prototype.handlePress = function (event) {
3534
+ console.log(event);
3535
+ };
3536
+ CarouselComponent.prototype.handleSwipe = function (event) {
3537
+ var x = Math.abs(event.deltaX) > 40 ? (event.deltaX > 0 ? 'right' : 'left') : '';
3538
+ var y = Math.abs(event.deltaY) > 40 ? (event.deltaY > 0 ? 'down' : 'up') : '';
3539
+ console.log(x + " " + y);
3540
+ };
3541
+ CarouselComponent.prototype.handleButtonLeftClick = function () {
3542
+ return __awaiter(this, void 0, void 0, function () {
3543
+ return __generator(this, function (_a) {
3544
+ this._navigate();
3545
+ return [2 /*return*/];
3546
+ });
3547
+ });
3548
+ };
3549
+ CarouselComponent.prototype.handleButtonRightClick = function () {
3550
+ return __awaiter(this, void 0, void 0, function () {
3551
+ return __generator(this, function (_a) {
3552
+ this._navigate(true);
3553
+ return [2 /*return*/];
3554
+ });
3555
+ });
3556
+ };
3557
+ CarouselComponent.prototype._navigate = function (right) {
3558
+ if (right === void 0) { right = false; }
3559
+ return __awaiter(this, void 0, void 0, function () {
3560
+ var wantedIndex, left;
3561
+ return __generator(this, function (_a) {
3562
+ switch (_a.label) {
3563
+ case 0:
3564
+ if (this._disableButtons) {
3565
+ return [2 /*return*/];
3566
+ }
3567
+ this._disableButtons = true;
3568
+ wantedIndex = this.activeIndex + (right ? 1 : -1);
3569
+ left = this._getLeftPositionFromActiveItem(wantedIndex);
3570
+ if (!(left !== null)) return [3 /*break*/, 2];
3571
+ return [4 /*yield*/, this._scrollWrapper(left)];
3572
+ case 1:
3573
+ if (_a.sent()) {
3574
+ this.activeIndex = wantedIndex;
3575
+ }
3576
+ _a.label = 2;
3577
+ case 2:
3578
+ this._checkNavigationButtons();
3579
+ this._disableButtons = false;
3580
+ return [2 /*return*/];
3581
+ }
3582
+ });
3583
+ });
3584
+ };
3585
+ CarouselComponent.prototype._checkNavigationButtons = function () {
3586
+ if (this.container && this.container.nativeElement) {
3587
+ this.canNavigateLeft = this.container.nativeElement.scrollLeft > 0;
3588
+ this.canNavigateRight = this.container.nativeElement.scrollLeft + this.container.nativeElement.clientWidth < this.container.nativeElement.scrollWidth;
3589
+ }
3590
+ };
3591
+ CarouselComponent.prototype._getLeftPositionFromActiveItem = function (index) {
3592
+ var element = this.carouselItems[index];
3593
+ return element ? element.nativeElement.offsetLeft : null;
3594
+ };
3595
+ CarouselComponent.prototype._scrollWrapper = function (left) {
3596
+ return __awaiter(this, void 0, void 0, function () {
3597
+ var _this = this;
3598
+ return __generator(this, function (_a) {
3599
+ return [2 /*return*/, new Promise(function (resolve) {
3600
+ if (_this.container && _this.container.nativeElement) {
3601
+ var oldScroll_1 = _this.container.nativeElement.scrollLeft;
3602
+ _this.container.nativeElement.scrollLeft = left;
3603
+ setTimeout(function () {
3604
+ return resolve(oldScroll_1 !== _this.container.nativeElement.scrollLeft);
3605
+ }, 400);
3606
+ }
3607
+ else {
3608
+ return resolve(false);
3609
+ }
3610
+ })];
3611
+ });
3612
+ });
3613
+ };
3614
+ return CarouselComponent;
3615
+ }());
3616
+ CarouselComponent.decorators = [
3617
+ { type: core.Component, args: [{
3618
+ selector: 'co-carousel',
3619
+ template: "\n <div class=\"carousel-wrapper\" #container (swipeleft)=\"handleButtonRightClick()\" (swiperight)=\"handleButtonLeftClick()\">\n <ng-content></ng-content>\n </div>\n <div class=\"carousel-navigate-button left\">\n <div class=\"carousel-navigate-button-wrapper\" *ngIf=\"canNavigateLeft\" (click)=\"handleButtonLeftClick()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 512\">\n <path\n d=\"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z\"></path>\n </svg>\n </div>\n </div>\n <div class=\"carousel-navigate-button right\">\n <div class=\"carousel-navigate-button-wrapper\" *ngIf=\"canNavigateRight\" (click)=\"handleButtonRightClick()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 512\">\n <path\n d=\"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z\"></path>\n </svg>\n </div>\n </div>\n ",
3620
+ encapsulation: core.ViewEncapsulation.None
3621
+ },] }
3622
+ ];
3623
+ CarouselComponent.propDecorators = {
3624
+ containerChild: [{ type: core.ViewChild, args: ['container', { read: core.ElementRef },] }],
3625
+ contentChildren: [{ type: core.ContentChildren, args: ['carouselItem', { read: core.ElementRef, descendants: true },] }],
3626
+ showClass: [{ type: core.HostBinding, args: ['class.co-carousel',] }]
3627
+ };
3628
+
3629
+ var CarouselHammerConfig = /** @class */ (function (_super) {
3630
+ __extends(CarouselHammerConfig, _super);
3631
+ function CarouselHammerConfig() {
3632
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
3633
+ _this.overrides = {
3634
+ swipe: { direction: Hammer.DIRECTION_HORIZONTAL },
3635
+ };
3636
+ return _this;
3637
+ }
3638
+ return CarouselHammerConfig;
3639
+ }(platformBrowser.HammerGestureConfig));
3640
+ var CarouselModule = /** @class */ (function () {
3641
+ function CarouselModule() {
3642
+ }
3643
+ return CarouselModule;
3644
+ }());
3645
+ CarouselModule.decorators = [
3646
+ { type: core.NgModule, args: [{
3647
+ imports: [
3648
+ common.CommonModule,
3649
+ platformBrowser.HammerModule
3650
+ ],
3651
+ declarations: [
3652
+ CarouselComponent
3653
+ ],
3654
+ exports: [
3655
+ CarouselComponent
3656
+ ],
3657
+ providers: [
3658
+ { provide: platformBrowser.HAMMER_GESTURE_CONFIG, useClass: CarouselHammerConfig },
3659
+ ]
3660
+ },] }
3661
+ ];
3662
+
3492
3663
  function showHideDialogAnimation(name) {
3493
3664
  return window.innerWidth > 700 ?
3494
3665
  animations.trigger(name, [
@@ -11242,6 +11413,9 @@
11242
11413
  exports.CardModule = CardModule;
11243
11414
  exports.Carousel3dComponent = Carousel3dComponent;
11244
11415
  exports.Carousel3dModule = Carousel3dModule;
11416
+ exports.CarouselComponent = CarouselComponent;
11417
+ exports.CarouselHammerConfig = CarouselHammerConfig;
11418
+ exports.CarouselModule = CarouselModule;
11245
11419
  exports.ClickoutsideModule = ClickoutsideModule;
11246
11420
  exports.CoDialogComponent = CoDialogComponent;
11247
11421
  exports.CoDialogModule = CoDialogModule;