nextalys-carousel 0.0.50 → 0.0.53
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.
- package/README.md +0 -0
- package/bundles/nextalys-carousel.umd.js +437 -344
- package/bundles/nextalys-carousel.umd.js.map +1 -1
- package/bundles/nextalys-carousel.umd.min.js +2 -2
- package/bundles/nextalys-carousel.umd.min.js.map +1 -1
- package/esm2015/lib/nxs-carousel/nxs-carousel-dialog.component.js +15 -19
- package/esm2015/lib/nxs-carousel/nxs-carousel-types.js +1 -1
- package/esm2015/lib/nxs-carousel/nxs-carousel.component.js +43 -71
- package/esm2015/lib/nxs-carousel/nxs-carousel.module.js +22 -25
- package/esm2015/nextalys-carousel.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/fesm2015/nextalys-carousel.js +76 -106
- package/fesm2015/nextalys-carousel.js.map +1 -1
- package/lib/nxs-carousel/nxs-carousel-dialog.component.d.ts +1 -0
- package/lib/nxs-carousel/nxs-carousel-dialog.component.d.ts.map +1 -0
- package/lib/nxs-carousel/nxs-carousel-types.d.ts +1 -0
- package/lib/nxs-carousel/nxs-carousel-types.d.ts.map +1 -0
- package/lib/nxs-carousel/nxs-carousel.component.d.ts +2 -0
- package/lib/nxs-carousel/nxs-carousel.component.d.ts.map +1 -0
- package/lib/nxs-carousel/nxs-carousel.module.d.ts +1 -0
- package/lib/nxs-carousel/nxs-carousel.module.d.ts.map +1 -0
- package/nextalys-carousel.d.ts +1 -0
- package/nextalys-carousel.d.ts.map +1 -0
- package/nextalys-carousel.metadata.json +1 -1
- package/package.json +4 -6
- package/public-api.d.ts +1 -0
- package/public-api.d.ts.map +1 -0
- package/esm5/lib/nxs-carousel/nxs-carousel-dialog.component.js +0 -29
- package/esm5/lib/nxs-carousel/nxs-carousel-types.js +0 -8
- package/esm5/lib/nxs-carousel/nxs-carousel.component.js +0 -394
- package/esm5/lib/nxs-carousel/nxs-carousel.module.js +0 -45
- package/esm5/nextalys-carousel.js +0 -6
- package/esm5/public-api.js +0 -4
- package/fesm5/nextalys-carousel.js +0 -467
- package/fesm5/nextalys-carousel.js.map +0 -1
|
@@ -1,467 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param, __metadata, __spread, __values, __awaiter, __generator } from 'tslib';
|
|
2
|
-
import { Inject, Component, ViewEncapsulation, EventEmitter, NgZone, PLATFORM_ID, Optional, ViewChild, ElementRef, Input, Output, NgModule } from '@angular/core';
|
|
3
|
-
import { MAT_DIALOG_DATA, MatDialogRef, MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
4
|
-
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
5
|
-
import { EventsCollector } from 'nextalys-js-helpers/dist/events';
|
|
6
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
7
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
-
import { ObserversModule } from '@angular/cdk/observers';
|
|
9
|
-
|
|
10
|
-
var NxsCarouselModuleConfig = /** @class */ (function () {
|
|
11
|
-
function NxsCarouselModuleConfig() {
|
|
12
|
-
this.debug = false;
|
|
13
|
-
}
|
|
14
|
-
return NxsCarouselModuleConfig;
|
|
15
|
-
}());
|
|
16
|
-
|
|
17
|
-
var NxsCarouselDialogComponent = /** @class */ (function () {
|
|
18
|
-
function NxsCarouselDialogComponent(data, dialogRef) {
|
|
19
|
-
this.data = data;
|
|
20
|
-
this.dialogRef = dialogRef;
|
|
21
|
-
this.wrapperClass = 'nxs-carousel-wrapper';
|
|
22
|
-
if (data.wrapperClass)
|
|
23
|
-
this.wrapperClass += ' ' + data.wrapperClass;
|
|
24
|
-
}
|
|
25
|
-
NxsCarouselDialogComponent.ctorParameters = function () { return [
|
|
26
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] },
|
|
27
|
-
{ type: MatDialogRef }
|
|
28
|
-
]; };
|
|
29
|
-
NxsCarouselDialogComponent = __decorate([
|
|
30
|
-
Component({
|
|
31
|
-
selector: 'nxs-carousel-dialog',
|
|
32
|
-
template: "\n <div class=\"nxs-carousel-dialog-flex-wrapper\">\n <div class=\"nxs-carousel-dialog-header\">\n <button (click)=\"dialogRef.close()\" mat-icon-button><mat-icon>close</mat-icon></button>\n </div>\n <div [class]=\"wrapperClass\">\n <nxs-carousel [options]=\"data.options\" [images]=\"data.images\"></nxs-carousel>\n </div>\n</div>\n ",
|
|
33
|
-
encapsulation: ViewEncapsulation.None,
|
|
34
|
-
styles: [".nxs-carousel-dialog{max-width:98vw!important;width:98vw;height:98vh}.nxs-carousel-dialog .nxs-carousel-dialog-flex-wrapper{display:flex;height:100%;flex-direction:column}.nxs-carousel-dialog .nxs-carousel-dialog-flex-wrapper .nxs-carousel-wrapper{flex:auto}.nxs-carousel-dialog .nxs-carousel-dialog-header{position:relative;display:flex;justify-content:flex-end;padding-bottom:8px}.nxs-carousel-dialog mat-dialog-container{padding:20px}.nxs-carousel-dialog .nxs-carousel-wrapper{width:100%;margin:auto;height:100%}"]
|
|
35
|
-
}),
|
|
36
|
-
__param(0, Inject(MAT_DIALOG_DATA)),
|
|
37
|
-
__metadata("design:paramtypes", [Object, MatDialogRef])
|
|
38
|
-
], NxsCarouselDialogComponent);
|
|
39
|
-
return NxsCarouselDialogComponent;
|
|
40
|
-
}());
|
|
41
|
-
|
|
42
|
-
var NxsCarouselComponent = /** @class */ (function () {
|
|
43
|
-
function NxsCarouselComponent(matDialog, zone, platformId, config) {
|
|
44
|
-
this.matDialog = matDialog;
|
|
45
|
-
this.zone = zone;
|
|
46
|
-
this.platformId = platformId;
|
|
47
|
-
this.config = config;
|
|
48
|
-
this.mutationObserver = null;
|
|
49
|
-
this.recreateSliderSubscribed = false;
|
|
50
|
-
this.eventsCollector = new EventsCollector();
|
|
51
|
-
this.options = {};
|
|
52
|
-
this.hasHtmlContent = false;
|
|
53
|
-
this.slidesCount = 0;
|
|
54
|
-
this.slideChange = new EventEmitter();
|
|
55
|
-
this.currentSlide = 0;
|
|
56
|
-
this.slideClick = new EventEmitter();
|
|
57
|
-
this.isBrowser = false;
|
|
58
|
-
if (!this.config)
|
|
59
|
-
this.config = { debug: false };
|
|
60
|
-
this.isBrowser = isPlatformBrowser(this.platformId);
|
|
61
|
-
this.log('constructor - isBrowser', this.isBrowser);
|
|
62
|
-
this.options = this.setDefaultOptions(undefined, false);
|
|
63
|
-
}
|
|
64
|
-
Object.defineProperty(NxsCarouselComponent.prototype, "setOptions", {
|
|
65
|
-
set: function (val) {
|
|
66
|
-
this.options = this.setDefaultOptions(val, false);
|
|
67
|
-
},
|
|
68
|
-
enumerable: true,
|
|
69
|
-
configurable: true
|
|
70
|
-
});
|
|
71
|
-
Object.defineProperty(NxsCarouselComponent.prototype, "setImages", {
|
|
72
|
-
set: function (val) {
|
|
73
|
-
this.images = val;
|
|
74
|
-
this.initSlides();
|
|
75
|
-
this.createSlider(true);
|
|
76
|
-
},
|
|
77
|
-
enumerable: true,
|
|
78
|
-
configurable: true
|
|
79
|
-
});
|
|
80
|
-
NxsCarouselComponent.prototype.log = function () {
|
|
81
|
-
var args = [];
|
|
82
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
83
|
-
args[_i] = arguments[_i];
|
|
84
|
-
}
|
|
85
|
-
if (!this.config.debug)
|
|
86
|
-
return;
|
|
87
|
-
console.log.apply(console, __spread(['[NxsCarousel]'], args));
|
|
88
|
-
};
|
|
89
|
-
NxsCarouselComponent.prototype.onContentChange = function (changes) {
|
|
90
|
-
// console.log("Log: NxsCarouselComponent -> onContentChange -> changes", changes);
|
|
91
|
-
// changes.forEach(change => console.log(change.target));
|
|
92
|
-
};
|
|
93
|
-
NxsCarouselComponent.prototype.initSlides = function () {
|
|
94
|
-
var _this = this;
|
|
95
|
-
if (!this.isBrowser) {
|
|
96
|
-
this.log('prevent initSlides on platform server');
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
if (!this.nxsSlidesWrapper) {
|
|
100
|
-
this.log('can not initSlides : nxsSlidesWrapper is not defined !');
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
this.log('initSlides begins');
|
|
104
|
-
this.zone.runOutsideAngular(function () {
|
|
105
|
-
if (!_this.hasHtmlContent && _this.images) {
|
|
106
|
-
_this.nxsSlidesWrapper.nativeElement.innerHTML = '';
|
|
107
|
-
for (var i = 0; i < _this.images.length; i++) {
|
|
108
|
-
var div = document.createElement('div');
|
|
109
|
-
div.className = 'swiper-slide';
|
|
110
|
-
div.style.backgroundImage = 'url(' + _this.images[i].src + ')';
|
|
111
|
-
if (_this.options.nxsCarouselImageBackgroundSize)
|
|
112
|
-
div.style.backgroundSize = _this.options.nxsCarouselImageBackgroundSize;
|
|
113
|
-
_this.nxsSlidesWrapper.nativeElement.appendChild(div);
|
|
114
|
-
}
|
|
115
|
-
_this.slidesCount = _this.images.length;
|
|
116
|
-
if (!!_this.options.nxsThumbnails && _this.options.nxsThumbnails.show) {
|
|
117
|
-
_this.nxsThumbnailsSlidesWrapper.nativeElement.innerHTML = '';
|
|
118
|
-
for (var i = 0; i < _this.images.length; i++) {
|
|
119
|
-
var div = document.createElement('div');
|
|
120
|
-
div.className = 'swiper-slide';
|
|
121
|
-
div.style.backgroundImage = 'url(' + _this.images[i].src + ')';
|
|
122
|
-
_this.nxsThumbnailsSlidesWrapper.nativeElement.appendChild(div);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
_this.log('initSlides - images are defined - slides count => ', _this.slidesCount);
|
|
126
|
-
}
|
|
127
|
-
else if (_this.hasHtmlContent) {
|
|
128
|
-
_this.log('initSlides - html content - slides length => ', _this.nxsSlidesWrapper.nativeElement.children.length);
|
|
129
|
-
for (var i = 0; i < _this.nxsSlidesWrapper.nativeElement.children.length; i++) {
|
|
130
|
-
var child = _this.nxsSlidesWrapper.nativeElement.children[i];
|
|
131
|
-
if (!child.className)
|
|
132
|
-
child.className = 'swiper-slide';
|
|
133
|
-
else if (child.className.indexOf('swiper-slide') === -1) {
|
|
134
|
-
child.className += ' swiper-slide';
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
_this.slidesCount = _this.nxsSlidesWrapper.nativeElement.children.length;
|
|
138
|
-
_this.log('initSlides - html content - slides count => ', _this.slidesCount);
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
};
|
|
142
|
-
NxsCarouselComponent.prototype.ngOnDestroy = function () {
|
|
143
|
-
if (!this.isBrowser) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
this.eventsCollector.unsubscribeAll();
|
|
147
|
-
if (this.mutationObserver)
|
|
148
|
-
this.mutationObserver.disconnect();
|
|
149
|
-
if (this.sliderInstance)
|
|
150
|
-
this.sliderInstance.destroy();
|
|
151
|
-
};
|
|
152
|
-
NxsCarouselComponent.prototype.subscribeToSlideChanged = function () {
|
|
153
|
-
var _this = this;
|
|
154
|
-
if (!this.hasHtmlContent) {
|
|
155
|
-
this.log('subscribeToSlideChanged cannot be subscribed : has no html content');
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
if (!this.nxsSlidesWrapper || !this.nxsSlidesWrapper.nativeElement) {
|
|
159
|
-
this.log('subscribeToSlideChanged error : nxsSlidesWrapper is not defined');
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
if (typeof MutationObserver === 'undefined') {
|
|
163
|
-
this.log('cannot use mutation observer');
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
if (this.mutationObserver)
|
|
167
|
-
this.mutationObserver.disconnect();
|
|
168
|
-
this.log('subscribe to mutation observer');
|
|
169
|
-
this.mutationObserver = new MutationObserver(function (mutationsList) {
|
|
170
|
-
var e_1, _a;
|
|
171
|
-
// console.log("Log: NxsCarouselComponent -> subscribeToSlideChanged -> mutationsList", mutationsList);
|
|
172
|
-
// console.log("Log: NxsCarouselComponent -> subscribeToSlideChanged -> MutationObserver");
|
|
173
|
-
_this.log('mutation observer - html content has changed');
|
|
174
|
-
if (mutationsList.length === 0)
|
|
175
|
-
return;
|
|
176
|
-
var mustUpdate = false;
|
|
177
|
-
try {
|
|
178
|
-
for (var mutationsList_1 = __values(mutationsList), mutationsList_1_1 = mutationsList_1.next(); !mutationsList_1_1.done; mutationsList_1_1 = mutationsList_1.next()) {
|
|
179
|
-
var mutation = mutationsList_1_1.value;
|
|
180
|
-
if (mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0) {
|
|
181
|
-
mustUpdate = true;
|
|
182
|
-
break;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
187
|
-
finally {
|
|
188
|
-
try {
|
|
189
|
-
if (mutationsList_1_1 && !mutationsList_1_1.done && (_a = mutationsList_1.return)) _a.call(mutationsList_1);
|
|
190
|
-
}
|
|
191
|
-
finally { if (e_1) throw e_1.error; }
|
|
192
|
-
}
|
|
193
|
-
if (mustUpdate) {
|
|
194
|
-
_this.initSlides();
|
|
195
|
-
_this.createSlider(true);
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
this.mutationObserver.observe(this.nxsSlidesWrapper.nativeElement, { childList: true, attributes: false, });
|
|
199
|
-
};
|
|
200
|
-
NxsCarouselComponent.prototype.ngAfterViewInit = function () {
|
|
201
|
-
this.initSlides();
|
|
202
|
-
this.createSlider(true);
|
|
203
|
-
};
|
|
204
|
-
NxsCarouselComponent.prototype.getMainSliderHeight = function () {
|
|
205
|
-
if (!this.options)
|
|
206
|
-
return '';
|
|
207
|
-
if (this.options.nxsThumbnails && this.options.nxsThumbnails.show) {
|
|
208
|
-
if (this.options.nxsThumbnails.onMainSlider) {
|
|
209
|
-
return '100%';
|
|
210
|
-
}
|
|
211
|
-
else if (this.options.nxsThumbnails.percentHeight) {
|
|
212
|
-
return (100 - this.options.nxsThumbnails.percentHeight) + '%';
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
return '';
|
|
216
|
-
};
|
|
217
|
-
NxsCarouselComponent.prototype.setDefaultOptions = function (options, forDialog) {
|
|
218
|
-
if (!options && forDialog) {
|
|
219
|
-
options = { nxsShowNavigationBullets: true, loop: true, nxsThumbnails: { show: true }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: true };
|
|
220
|
-
}
|
|
221
|
-
else if (!options)
|
|
222
|
-
options = { nxsShowNavigationBullets: true, loop: true, nxsThumbnails: { show: false }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: false, nxsCarouselDialogOptions: {} };
|
|
223
|
-
if (options.nxsCarouselDialogOptions) {
|
|
224
|
-
if (typeof options.nxsCarouselDialogOptions.nxsThumbnails === 'undefined')
|
|
225
|
-
options.nxsCarouselDialogOptions.nxsThumbnails = { show: false };
|
|
226
|
-
if (typeof options.nxsCarouselDialogOptions.effect === 'undefined')
|
|
227
|
-
options.nxsCarouselDialogOptions.effect = 'slide';
|
|
228
|
-
if (typeof options.nxsCarouselDialogOptions.nxsShowNavigationArrows === 'undefined')
|
|
229
|
-
options.nxsCarouselDialogOptions.nxsShowNavigationArrows = true;
|
|
230
|
-
if (options.nxsCarouselDialogOptions.nxsThumbnails.show) {
|
|
231
|
-
if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight === 'undefined')
|
|
232
|
-
options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight = 20;
|
|
233
|
-
if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.perView === 'undefined')
|
|
234
|
-
options.nxsCarouselDialogOptions.nxsThumbnails.perView = 10;
|
|
235
|
-
options.nxsCarouselDialogOptions.nxsThumbnails.breakpoints = {
|
|
236
|
-
640: {
|
|
237
|
-
slidesPerView: 5,
|
|
238
|
-
},
|
|
239
|
-
768: {
|
|
240
|
-
slidesPerView: 7,
|
|
241
|
-
},
|
|
242
|
-
1024: {
|
|
243
|
-
slidesPerView: 8,
|
|
244
|
-
},
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
if (typeof options.nxsThumbnails === 'undefined')
|
|
249
|
-
options.nxsThumbnails = { show: false };
|
|
250
|
-
if (options.nxsThumbnails.show && typeof options.nxsThumbnails.percentHeight === 'undefined')
|
|
251
|
-
options.nxsThumbnails.percentHeight = 20;
|
|
252
|
-
if (options.nxsThumbnails.show && typeof options.nxsThumbnails.perView === 'undefined')
|
|
253
|
-
options.nxsThumbnails.perView = 10;
|
|
254
|
-
if (forDialog)
|
|
255
|
-
options.nxsfullscreenOnClick = false;
|
|
256
|
-
if (options.nxsThumbnails.onMainSlider)
|
|
257
|
-
options.nxsShowNavigationBullets = false;
|
|
258
|
-
return options;
|
|
259
|
-
};
|
|
260
|
-
NxsCarouselComponent.prototype.showFullScreenCarousel = function (images, wrapperClass) {
|
|
261
|
-
this.options.nxsCarouselDialogOptions = this.setDefaultOptions(this.options.nxsCarouselDialogOptions, true);
|
|
262
|
-
var data = { images: images, wrapperClass: wrapperClass, options: this.options.nxsCarouselDialogOptions };
|
|
263
|
-
this.matDialog.open(NxsCarouselDialogComponent, {
|
|
264
|
-
data: data,
|
|
265
|
-
panelClass: 'nxs-carousel-dialog',
|
|
266
|
-
width: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.width : undefined,
|
|
267
|
-
height: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.height : undefined,
|
|
268
|
-
disableClose: !this.options.nxsCarouselDialogExitable,
|
|
269
|
-
});
|
|
270
|
-
};
|
|
271
|
-
NxsCarouselComponent.prototype.createSlider = function (forceRecreate) {
|
|
272
|
-
var _this = this;
|
|
273
|
-
if (!this.isBrowser) {
|
|
274
|
-
this.log('prevent createSlider : platform is server');
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
if (!this.nxsSliderContainer) {
|
|
278
|
-
this.log('can not createSlider : nxsSliderContainer is not defined !');
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
this.log('createSlider', this.nxsSliderContainer.nativeElement);
|
|
282
|
-
if (this.slidesCount === 0) {
|
|
283
|
-
this.log('can not createSlider : slidesCount === 0');
|
|
284
|
-
this.subscribeToSlideChanged();
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
if (this.sliderInstance && !forceRecreate) {
|
|
288
|
-
this.log('can re create slider => slider is already created.');
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
this.zone.runOutsideAngular(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
292
|
-
var _a, Swiper, thumbnailsOptions;
|
|
293
|
-
var _this = this;
|
|
294
|
-
return __generator(this, function (_b) {
|
|
295
|
-
switch (_b.label) {
|
|
296
|
-
case 0:
|
|
297
|
-
if (this.sliderInstance)
|
|
298
|
-
this.sliderInstance.destroy();
|
|
299
|
-
this.options.pagination = {
|
|
300
|
-
el: '.nxs-carousel-pagination',
|
|
301
|
-
clickable: true,
|
|
302
|
-
type: 'bullets',
|
|
303
|
-
};
|
|
304
|
-
this.options.navigation = {
|
|
305
|
-
nextEl: '.nxs-carousel-button-next',
|
|
306
|
-
prevEl: '.nxs-carousel-button-prev',
|
|
307
|
-
};
|
|
308
|
-
if (!!this.swiperLibrary) return [3 /*break*/, 2];
|
|
309
|
-
_a = this;
|
|
310
|
-
return [4 /*yield*/, import('swiper')];
|
|
311
|
-
case 1:
|
|
312
|
-
_a.swiperLibrary = _b.sent();
|
|
313
|
-
_b.label = 2;
|
|
314
|
-
case 2:
|
|
315
|
-
Swiper = this.swiperLibrary.default;
|
|
316
|
-
if (!!this.options.nxsThumbnails && this.options.nxsThumbnails.show) {
|
|
317
|
-
thumbnailsOptions = {
|
|
318
|
-
slidesPerView: this.options.nxsThumbnails.perView,
|
|
319
|
-
loop: false,
|
|
320
|
-
freeMode: true,
|
|
321
|
-
watchSlidesVisibility: true,
|
|
322
|
-
watchSlidesProgress: true,
|
|
323
|
-
breakpoints: this.options.nxsThumbnails.breakpoints,
|
|
324
|
-
};
|
|
325
|
-
this.thumbnailsSliderInstance = new Swiper(this.nxsThumbnailsSliderContainer.nativeElement, thumbnailsOptions);
|
|
326
|
-
this.options.thumbs = { swiper: this.thumbnailsSliderInstance };
|
|
327
|
-
}
|
|
328
|
-
this.sliderInstance = new Swiper(this.nxsSliderContainer.nativeElement, this.options);
|
|
329
|
-
this.log('sliderInstance has been created', this.sliderInstance);
|
|
330
|
-
this.sliderInstance.on('slideChange', function () {
|
|
331
|
-
_this.zone.run(function () {
|
|
332
|
-
_this.currentSlide = _this.sliderInstance.realIndex;
|
|
333
|
-
_this.log("slideChange", _this.currentSlide);
|
|
334
|
-
_this.slideChange.next(_this.currentSlide);
|
|
335
|
-
});
|
|
336
|
-
});
|
|
337
|
-
this.sliderInstance.on('click', function (evt) {
|
|
338
|
-
var target = evt.target;
|
|
339
|
-
if (target.className.indexOf('nxs-carousel-button') !== -1 || target.className.indexOf('swiper-pagination') !== -1)
|
|
340
|
-
return;
|
|
341
|
-
_this.zone.run(function () {
|
|
342
|
-
_this.slideClick.next(evt);
|
|
343
|
-
if (_this.options.nxsfullscreenOnClick && _this.images && _this.images.length && !_this.hasHtmlContent) {
|
|
344
|
-
_this.showFullScreenCarousel(_this.images, 'fullscreen-carousel');
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
});
|
|
348
|
-
this.subscribeToSlideChanged();
|
|
349
|
-
return [2 /*return*/];
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
}); });
|
|
353
|
-
};
|
|
354
|
-
NxsCarouselComponent.prototype.goToSlide = function (index, speed) {
|
|
355
|
-
if (!this.sliderInstance)
|
|
356
|
-
return;
|
|
357
|
-
this.sliderInstance.slideTo(index, speed);
|
|
358
|
-
};
|
|
359
|
-
NxsCarouselComponent.prototype.next = function () {
|
|
360
|
-
if (!this.sliderInstance)
|
|
361
|
-
return;
|
|
362
|
-
this.sliderInstance.slideNext();
|
|
363
|
-
};
|
|
364
|
-
NxsCarouselComponent.prototype.previous = function () {
|
|
365
|
-
if (!this.sliderInstance)
|
|
366
|
-
return;
|
|
367
|
-
this.sliderInstance.slidePrev();
|
|
368
|
-
};
|
|
369
|
-
NxsCarouselComponent.ctorParameters = function () { return [
|
|
370
|
-
{ type: MatDialog },
|
|
371
|
-
{ type: NgZone },
|
|
372
|
-
{ type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
|
|
373
|
-
{ type: NxsCarouselModuleConfig, decorators: [{ type: Optional }] }
|
|
374
|
-
]; };
|
|
375
|
-
__decorate([
|
|
376
|
-
ViewChild('nxsSliderContainer', { static: true }),
|
|
377
|
-
__metadata("design:type", ElementRef)
|
|
378
|
-
], NxsCarouselComponent.prototype, "nxsSliderContainer", void 0);
|
|
379
|
-
__decorate([
|
|
380
|
-
ViewChild('nxsSlidesWrapper', { static: true }),
|
|
381
|
-
__metadata("design:type", ElementRef)
|
|
382
|
-
], NxsCarouselComponent.prototype, "nxsSlidesWrapper", void 0);
|
|
383
|
-
__decorate([
|
|
384
|
-
ViewChild('nxsThumbnailsSliderContainer', { static: true }),
|
|
385
|
-
__metadata("design:type", ElementRef)
|
|
386
|
-
], NxsCarouselComponent.prototype, "nxsThumbnailsSliderContainer", void 0);
|
|
387
|
-
__decorate([
|
|
388
|
-
ViewChild('nxsThumbnailsSlidesWrapper', { static: true }),
|
|
389
|
-
__metadata("design:type", ElementRef)
|
|
390
|
-
], NxsCarouselComponent.prototype, "nxsThumbnailsSlidesWrapper", void 0);
|
|
391
|
-
__decorate([
|
|
392
|
-
Input('options'),
|
|
393
|
-
__metadata("design:type", Object),
|
|
394
|
-
__metadata("design:paramtypes", [Object])
|
|
395
|
-
], NxsCarouselComponent.prototype, "setOptions", null);
|
|
396
|
-
__decorate([
|
|
397
|
-
Input('images'),
|
|
398
|
-
__metadata("design:type", Array),
|
|
399
|
-
__metadata("design:paramtypes", [Array])
|
|
400
|
-
], NxsCarouselComponent.prototype, "setImages", null);
|
|
401
|
-
__decorate([
|
|
402
|
-
Input(),
|
|
403
|
-
__metadata("design:type", Object)
|
|
404
|
-
], NxsCarouselComponent.prototype, "hasHtmlContent", void 0);
|
|
405
|
-
__decorate([
|
|
406
|
-
Output(),
|
|
407
|
-
__metadata("design:type", Object)
|
|
408
|
-
], NxsCarouselComponent.prototype, "slideChange", void 0);
|
|
409
|
-
__decorate([
|
|
410
|
-
Output(),
|
|
411
|
-
__metadata("design:type", Object)
|
|
412
|
-
], NxsCarouselComponent.prototype, "slideClick", void 0);
|
|
413
|
-
NxsCarouselComponent = __decorate([
|
|
414
|
-
Component({
|
|
415
|
-
selector: 'nxs-carousel',
|
|
416
|
-
template: "<div #nxsSliderContainer\n \u00A0[ngClass]=\"{'swiper-container':true,'nxs-slider-with-thumbnails':!!options.nxsThumbnails && options.nxsThumbnails.show}\"\n [style.height]=\"getMainSliderHeight()\">\n <div class=\"swiper-wrapper\" #nxsSlidesWrapper>\n <ng-content>\n\n </ng-content>\n </div>\n <!-- (cdkObserveContent)=\"onContentChange($event)\" -->\n <!-- If we need pagination -->\n <div class=\"swiper-pagination nxs-carousel-pagination\"\n [style.display]=\"slidesCount>0 && options && options.nxsShowNavigationBullets ? '':'none'\"></div>\n\n <!-- If we need navigation buttons -->\n <ng-container *ngIf=\"options.nxsShowNavigationArrows\">\n <div class=\"nxs-carousel-button-prev swiper-button-prev\"></div>\n <div class=\"nxs-carousel-button-next swiper-button-next\"></div>\n </ng-container>\n\n <ng-container *ngIf=\"images && options.nxsShowImagesCount\">\n <div class=\"nxs-image-counter\">\n {{currentSlide+1}} / {{images.length}}\n </div>\n </ng-container>\n\n</div>\n\n<div #nxsThumbnailsSliderContainer\n [style.display]=\"(images && !!options.nxsThumbnails && options.nxsThumbnails.show) ?'':'none'\"\n [style.height]=\"(!!options.nxsThumbnails && options.nxsThumbnails.show && !!options.nxsThumbnails.percentHeight) ? (options.nxsThumbnails.percentHeight + '%'):''\"\n [style.top]=\"(!!options.nxsThumbnails && options.nxsThumbnails.show && !!options.nxsThumbnails.percentHeight && options.nxsThumbnails.onMainSlider) ? ('-' + (options.nxsThumbnails.percentHeight) + '%'):''\"\n [ngClass]=\"{'swiper-container':true, 'nxs-slider-thumbnails-container':true,'nxs-slider-thumbnails-on-main-slider':options.nxsThumbnails && options.nxsThumbnails.onMainSlider}\">\n <div class=\"swiper-wrapper\" #nxsThumbnailsSlidesWrapper>\n\n </div>\n\n</div>",
|
|
417
|
-
encapsulation: ViewEncapsulation.None,
|
|
418
|
-
styles: ["nxs-carousel{display:block;height:100%;position:relative;--swiper-navigation-color:white;--swiper-theme-color:white}nxs-carousel .swiper-container{width:100%;display:block;position:relative;height:100%}nxs-carousel .swiper-container .swiper-wrapper .swiper-slide{height:100%;position:relative;width:100%;min-height:50px;background-size:cover;background-position:center;background-repeat:no-repeat}nxs-carousel .swiper-container.nxs-slider-with-thumbnails{height:80%}nxs-carousel .swiper-container.nxs-slider-thumbnails-container{height:20%;background:0 0;padding:6px 0}nxs-carousel .swiper-container.nxs-slider-thumbnails-container .swiper-slide{cursor:pointer;border-radius:6px;margin:0 6px;border:2px solid transparent}nxs-carousel .swiper-container.nxs-slider-thumbnails-container .swiper-slide.swiper-slide-thumb-active{border:2px solid #add8e6}nxs-carousel .swiper-container.nxs-slider-thumbnails-on-main-slider{top:-20%}nxs-carousel .nxs-image-counter{position:absolute;top:0;right:0;color:#fff;padding:4px;font-weight:700;z-index:10}"]
|
|
419
|
-
}),
|
|
420
|
-
__param(2, Inject(PLATFORM_ID)),
|
|
421
|
-
__param(3, Optional()),
|
|
422
|
-
__metadata("design:paramtypes", [MatDialog,
|
|
423
|
-
NgZone, Object, NxsCarouselModuleConfig])
|
|
424
|
-
], NxsCarouselComponent);
|
|
425
|
-
return NxsCarouselComponent;
|
|
426
|
-
}());
|
|
427
|
-
|
|
428
|
-
var NxsCarouselModule = /** @class */ (function () {
|
|
429
|
-
function NxsCarouselModule() {
|
|
430
|
-
}
|
|
431
|
-
NxsCarouselModule_1 = NxsCarouselModule;
|
|
432
|
-
NxsCarouselModule.forRoot = function (config) {
|
|
433
|
-
return {
|
|
434
|
-
ngModule: NxsCarouselModule_1,
|
|
435
|
-
providers: [
|
|
436
|
-
{ provide: NxsCarouselModuleConfig, useValue: config },
|
|
437
|
-
]
|
|
438
|
-
};
|
|
439
|
-
};
|
|
440
|
-
var NxsCarouselModule_1;
|
|
441
|
-
NxsCarouselModule = NxsCarouselModule_1 = __decorate([
|
|
442
|
-
NgModule({
|
|
443
|
-
declarations: [
|
|
444
|
-
NxsCarouselComponent,
|
|
445
|
-
NxsCarouselDialogComponent,
|
|
446
|
-
],
|
|
447
|
-
imports: [
|
|
448
|
-
CommonModule,
|
|
449
|
-
MatIconModule,
|
|
450
|
-
MatButtonModule,
|
|
451
|
-
MatDialogModule,
|
|
452
|
-
ObserversModule,
|
|
453
|
-
],
|
|
454
|
-
exports: [
|
|
455
|
-
NxsCarouselComponent,
|
|
456
|
-
],
|
|
457
|
-
})
|
|
458
|
-
], NxsCarouselModule);
|
|
459
|
-
return NxsCarouselModule;
|
|
460
|
-
}());
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* Generated bundle index. Do not edit.
|
|
464
|
-
*/
|
|
465
|
-
|
|
466
|
-
export { NxsCarouselComponent, NxsCarouselModule, NxsCarouselModuleConfig, NxsCarouselDialogComponent as ɵa };
|
|
467
|
-
//# sourceMappingURL=nextalys-carousel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextalys-carousel.js","sources":["ng://nextalys-carousel/lib/nxs-carousel/nxs-carousel-types.ts","ng://nextalys-carousel/lib/nxs-carousel/nxs-carousel-dialog.component.ts","ng://nextalys-carousel/lib/nxs-carousel/nxs-carousel.component.ts","ng://nextalys-carousel/lib/nxs-carousel/nxs-carousel.module.ts","ng://nextalys-carousel/nextalys-carousel.ts"],"sourcesContent":["export interface NxsCarouselImage {\n alt?: string;\n src: string;\n}\nexport interface SwiperInstance {\n realIndex: number;\n activeIndex: number;\n on: (evt: 'slideChange' | 'click', cb: (data: any) => void) => void;\n destroy: (deleteInstance?: boolean, cleanStyles?: boolean) => void;\n slideTo: (index: number, speed?: number, runCallbacks?: boolean) => void;\n slideNext: (speed?: number, runCallbacks?: boolean) => void;\n slidePrev: (speed?: number, runCallbacks?: boolean) => void;\n}\nexport interface NxsCarouselOptions {\n watchSlidesVisibility?: boolean;\n watchSlidesProgress?: boolean;\n freeMode?: boolean;\n effect?: \"slide\" | \"fade\" | \"cube\" | \"coverflow\" | \"flip\";\n autoplay?: { delay: number; stopOnLastSlide?: boolean; disableOnInteraction?: boolean; reverseDirection?: boolean; waitForTransition?: boolean };\n roundLengths?: boolean;\n init?: boolean;\n initialSlide?: number;\n updateOnWindowResize?: boolean;\n direction?: 'horizontal' | 'vertical';\n slidesPerView?: number | 'auto';\n centeredSlides?: boolean;\n centeredSlidesBounds?: boolean;\n loop?: boolean;\n coverflowEffect?: {\n rotate: number;\n stretch: number;\n depth?: number;\n modifier?: number;\n slideShadows?: boolean;\n };\n pagination?: {\n el: string;\n clickable: boolean;\n type?: \"bullets\" | \"fraction\" | \"progressbar\" | \"custom\";\n };\n navigation?: {\n nextEl: string;\n prevEl: string;\n };\n spaceBetween?: number;\n breakpoints?: {\n [size: number]: {\n spaceBetween?: number;\n slidesPerView: number | 'auto';\n };\n };\n thumbs?: { swiper: SwiperInstance };\n nxsShowNavigationBullets?: boolean;\n nxsShowNavigationArrows?: boolean;\n nxsThumbnails?: {\n show: boolean; onMainSlider?: boolean; percentHeight?: number; perView?: number; breakpoints?: {\n [size: number]: {\n spaceBetween?: number;\n slidesPerView: number | 'auto';\n };\n };\n };\n nxsShowImagesCount?: boolean;\n nxsfullscreenOnClick?: boolean;\n /**\n * background mode : cover, contain, auto, etc...\n * default => cover\n */\n nxsCarouselImageBackgroundSize?: string;\n nxsCarouselDialogOptions?: NxsCarouselOptions;\n nxsCarouselDialogExitable?: boolean;\n nxsCarouselDialogSize?: { width: string; height: string; };\n}\nexport class NxsCarouselModuleConfig {\n debug?: boolean = false;\n}","import { Component, Inject, ViewEncapsulation } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { NxsCarouselImage, NxsCarouselOptions } from './nxs-carousel-types';\n\nexport interface NxsCarouselDialogData {\n images: NxsCarouselImage[];\n options?: NxsCarouselOptions;\n wrapperClass?: string;\n}\n@Component({\n selector: 'nxs-carousel-dialog',\n template: `\n <div class=\"nxs-carousel-dialog-flex-wrapper\">\n <div class=\"nxs-carousel-dialog-header\">\n <button (click)=\"dialogRef.close()\" mat-icon-button><mat-icon>close</mat-icon></button>\n </div>\n <div [class]=\"wrapperClass\">\n <nxs-carousel [options]=\"data.options\" [images]=\"data.images\"></nxs-carousel>\n </div>\n</div>\n `,\n styleUrls: ['./nxs-carousel-dialog.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxsCarouselDialogComponent {\n public wrapperClass: string = 'nxs-carousel-wrapper';\n constructor(\n @Inject(MAT_DIALOG_DATA) public data: NxsCarouselDialogData,\n public dialogRef: MatDialogRef<NxsCarouselDialogComponent>,\n ) {\n if (data.wrapperClass)\n this.wrapperClass += ' ' + data.wrapperClass;\n }\n\n}\n","import { Component, ViewEncapsulation, Input, ViewChild, ElementRef, Output, EventEmitter, PLATFORM_ID, Inject, Optional, NgZone, SimpleChanges } from '@angular/core';\nimport { NxsCarouselOptions, NxsCarouselImage, SwiperInstance, NxsCarouselModuleConfig } from './nxs-carousel-types';\nimport { NxsCarouselDialogData, NxsCarouselDialogComponent } from './nxs-carousel-dialog.component';\nimport { MatDialog } from '@angular/material/dialog';\nimport { isPlatformBrowser } from '@angular/common';\nimport { EventsCollector } from 'nextalys-js-helpers/dist/events';\n@Component({\n selector: 'nxs-carousel',\n templateUrl: './nxs-carousel.component.html',\n styleUrls: ['./nxs-carousel.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxsCarouselComponent {\n private mutationObserver: MutationObserver | null = null;\n recreateSliderSubscribed = false;\n private eventsCollector = new EventsCollector();\n public images: NxsCarouselImage[];\n\n @ViewChild('nxsSliderContainer', { static: true })\n nxsSliderContainer: ElementRef<HTMLDivElement>;\n\n @ViewChild('nxsSlidesWrapper', { static: true })\n nxsSlidesWrapper: ElementRef<HTMLDivElement>;\n\n //thumbnails\n @ViewChild('nxsThumbnailsSliderContainer', { static: true })\n nxsThumbnailsSliderContainer: ElementRef<HTMLDivElement>;\n @ViewChild('nxsThumbnailsSlidesWrapper', { static: true })\n nxsThumbnailsSlidesWrapper: ElementRef<HTMLDivElement>;\n options: NxsCarouselOptions = {};\n @Input('options')\n set setOptions(val: NxsCarouselOptions) {\n this.options = this.setDefaultOptions(val, false);\n }\n @Input('images')\n set setImages(val: NxsCarouselImage[]) {\n this.images = val;\n this.initSlides();\n this.createSlider(true);\n }\n @Input()\n hasHtmlContent = false;\n slidesCount: number = 0;\n public sliderInstance: SwiperInstance;\n public thumbnailsSliderInstance: SwiperInstance;\n\n @Output()\n slideChange = new EventEmitter<number>();\n public currentSlide = 0;\n @Output()\n slideClick = new EventEmitter<MouseEvent>();\n isBrowser = false;\n private swiperLibrary: any;\n\n constructor(\n private matDialog: MatDialog,\n private zone: NgZone,\n @Inject(PLATFORM_ID) private platformId: any,\n @Optional() private config?: NxsCarouselModuleConfig,\n ) {\n if (!this.config)\n this.config = { debug: false };\n this.isBrowser = isPlatformBrowser(this.platformId);\n this.log('constructor - isBrowser', this.isBrowser);\n this.options = this.setDefaultOptions(undefined, false);\n }\n private log(...args: any[]) {\n if (!this.config.debug)\n return;\n console.log('[NxsCarousel]', ...args);\n }\n\n onContentChange(changes: MutationRecord[]) {\n // console.log(\"Log: NxsCarouselComponent -> onContentChange -> changes\", changes);\n // changes.forEach(change => console.log(change.target));\n }\n initSlides() {\n if (!this.isBrowser) {\n this.log('prevent initSlides on platform server');\n return;\n }\n if (!this.nxsSlidesWrapper) {\n this.log('can not initSlides : nxsSlidesWrapper is not defined !');\n return;\n }\n this.log('initSlides begins');\n this.zone.runOutsideAngular(() => {\n if (!this.hasHtmlContent && this.images) {\n this.nxsSlidesWrapper.nativeElement.innerHTML = '';\n for (let i = 0; i < this.images.length; i++) {\n const div = document.createElement('div');\n div.className = 'swiper-slide';\n div.style.backgroundImage = 'url(' + this.images[i].src + ')';\n if (this.options.nxsCarouselImageBackgroundSize)\n div.style.backgroundSize = this.options.nxsCarouselImageBackgroundSize;\n this.nxsSlidesWrapper.nativeElement.appendChild(div);\n }\n this.slidesCount = this.images.length;\n if (!!this.options.nxsThumbnails && this.options.nxsThumbnails.show) {\n this.nxsThumbnailsSlidesWrapper.nativeElement.innerHTML = '';\n for (let i = 0; i < this.images.length; i++) {\n const div = document.createElement('div');\n div.className = 'swiper-slide';\n div.style.backgroundImage = 'url(' + this.images[i].src + ')';\n this.nxsThumbnailsSlidesWrapper.nativeElement.appendChild(div);\n }\n }\n this.log('initSlides - images are defined - slides count => ', this.slidesCount);\n }\n else if (this.hasHtmlContent) {\n this.log('initSlides - html content - slides length => ', this.nxsSlidesWrapper.nativeElement.children.length);\n for (let i = 0; i < this.nxsSlidesWrapper.nativeElement.children.length; i++) {\n const child = this.nxsSlidesWrapper.nativeElement.children[i];\n if (!child.className)\n child.className = 'swiper-slide';\n else if (child.className.indexOf('swiper-slide') === -1) {\n child.className += ' swiper-slide';\n }\n }\n this.slidesCount = this.nxsSlidesWrapper.nativeElement.children.length;\n this.log('initSlides - html content - slides count => ', this.slidesCount);\n }\n });\n\n }\n ngOnDestroy(): void {\n if (!this.isBrowser) {\n return;\n }\n this.eventsCollector.unsubscribeAll();\n if (this.mutationObserver)\n this.mutationObserver.disconnect();\n if (this.sliderInstance)\n this.sliderInstance.destroy();\n }\n private subscribeToSlideChanged() {\n if (!this.hasHtmlContent) {\n this.log('subscribeToSlideChanged cannot be subscribed : has no html content');\n return;\n }\n if (!this.nxsSlidesWrapper || !this.nxsSlidesWrapper.nativeElement) {\n this.log('subscribeToSlideChanged error : nxsSlidesWrapper is not defined');\n return;\n }\n if (typeof MutationObserver === 'undefined') {\n this.log('cannot use mutation observer');\n return;\n }\n\n if (this.mutationObserver)\n this.mutationObserver.disconnect();\n\n this.log('subscribe to mutation observer');\n this.mutationObserver = new MutationObserver((mutationsList) => {\n // console.log(\"Log: NxsCarouselComponent -> subscribeToSlideChanged -> mutationsList\", mutationsList);\n // console.log(\"Log: NxsCarouselComponent -> subscribeToSlideChanged -> MutationObserver\");\n this.log('mutation observer - html content has changed');\n if (mutationsList.length === 0)\n return;\n let mustUpdate = false;\n for (const mutation of mutationsList) {\n if (mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0) {\n mustUpdate = true;\n break;\n }\n }\n if (mustUpdate) {\n this.initSlides();\n this.createSlider(true);\n }\n\n });\n this.mutationObserver.observe(this.nxsSlidesWrapper.nativeElement, { childList: true, attributes: false, });\n }\n ngAfterViewInit(): void {\n this.initSlides();\n this.createSlider(true);\n }\n getMainSliderHeight() {\n if (!this.options)\n return '';\n if (this.options.nxsThumbnails && this.options.nxsThumbnails.show) {\n if (this.options.nxsThumbnails.onMainSlider) {\n return '100%';\n }\n else if (this.options.nxsThumbnails.percentHeight) {\n return (100 - this.options.nxsThumbnails.percentHeight) + '%';\n }\n }\n return '';\n }\n private setDefaultOptions(options: NxsCarouselOptions, forDialog: boolean) {\n if (!options && forDialog) {\n options = { nxsShowNavigationBullets: true, loop: true, nxsThumbnails: { show: true }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: true }\n }\n else if (!options)\n options = { nxsShowNavigationBullets: true, loop: true, nxsThumbnails: { show: false }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: false, nxsCarouselDialogOptions: {} }\n if (options.nxsCarouselDialogOptions) {\n if (typeof options.nxsCarouselDialogOptions.nxsThumbnails === 'undefined')\n options.nxsCarouselDialogOptions.nxsThumbnails = { show: false };\n if (typeof options.nxsCarouselDialogOptions.effect === 'undefined')\n options.nxsCarouselDialogOptions.effect = 'slide';\n if (typeof options.nxsCarouselDialogOptions.nxsShowNavigationArrows === 'undefined')\n options.nxsCarouselDialogOptions.nxsShowNavigationArrows = true;\n\n if (options.nxsCarouselDialogOptions.nxsThumbnails.show) {\n if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight === 'undefined')\n options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight = 20;\n if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.perView === 'undefined')\n options.nxsCarouselDialogOptions.nxsThumbnails.perView = 10;\n options.nxsCarouselDialogOptions.nxsThumbnails.breakpoints = {\n 640: {\n slidesPerView: 5,\n },\n 768: {\n slidesPerView: 7,\n },\n 1024: {\n slidesPerView: 8,\n },\n };\n }\n }\n if (typeof options.nxsThumbnails === 'undefined')\n options.nxsThumbnails = { show: false };\n\n\n if (options.nxsThumbnails.show && typeof options.nxsThumbnails.percentHeight === 'undefined')\n options.nxsThumbnails.percentHeight = 20;\n\n if (options.nxsThumbnails.show && typeof options.nxsThumbnails.perView === 'undefined')\n options.nxsThumbnails.perView = 10;\n\n\n if (forDialog)\n options.nxsfullscreenOnClick = false;\n if (options.nxsThumbnails.onMainSlider)\n options.nxsShowNavigationBullets = false;\n return options;\n }\n public showFullScreenCarousel(images: NxsCarouselImage[], wrapperClass?: string) {\n this.options.nxsCarouselDialogOptions = this.setDefaultOptions(this.options.nxsCarouselDialogOptions, true);\n const data: NxsCarouselDialogData = { images, wrapperClass, options: this.options.nxsCarouselDialogOptions };\n this.matDialog.open(NxsCarouselDialogComponent, {\n data,\n panelClass: 'nxs-carousel-dialog',\n width: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.width : undefined,\n height: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.height : undefined,\n disableClose: !this.options.nxsCarouselDialogExitable,\n });\n }\n private createSlider(forceRecreate: boolean) {\n if (!this.isBrowser) {\n this.log('prevent createSlider : platform is server');\n return;\n }\n if (!this.nxsSliderContainer) {\n this.log('can not createSlider : nxsSliderContainer is not defined !');\n return;\n }\n this.log('createSlider', this.nxsSliderContainer.nativeElement);\n if (this.slidesCount === 0) {\n this.log('can not createSlider : slidesCount === 0');\n this.subscribeToSlideChanged();\n return;\n }\n if (this.sliderInstance && !forceRecreate) {\n this.log('can re create slider => slider is already created.');\n return;\n }\n this.zone.runOutsideAngular(async () => {\n if (this.sliderInstance)\n this.sliderInstance.destroy();\n this.options.pagination = {\n el: '.nxs-carousel-pagination',\n clickable: true,\n type: 'bullets',\n };\n this.options.navigation = {\n nextEl: '.nxs-carousel-button-next',\n prevEl: '.nxs-carousel-button-prev',\n };\n if (!this.swiperLibrary)\n this.swiperLibrary = await import(\"swiper\");\n const Swiper = this.swiperLibrary.default;\n if (!!this.options.nxsThumbnails && this.options.nxsThumbnails.show) {\n const thumbnailsOptions: NxsCarouselOptions = {\n slidesPerView: this.options.nxsThumbnails.perView,\n loop: false,\n freeMode: true,\n watchSlidesVisibility: true,\n watchSlidesProgress: true,\n breakpoints: this.options.nxsThumbnails.breakpoints,\n // spaceBetween: 10,\n };\n this.thumbnailsSliderInstance = new Swiper(this.nxsThumbnailsSliderContainer.nativeElement, thumbnailsOptions);\n this.options.thumbs = { swiper: this.thumbnailsSliderInstance };\n }\n this.sliderInstance = new Swiper(this.nxsSliderContainer.nativeElement, this.options);\n this.log('sliderInstance has been created', this.sliderInstance);\n this.sliderInstance.on('slideChange', () => {\n this.zone.run(() => {\n this.currentSlide = this.sliderInstance.realIndex;\n this.log(\"slideChange\", this.currentSlide);\n this.slideChange.next(this.currentSlide);\n });\n });\n this.sliderInstance.on('click', (evt: MouseEvent) => {\n const target = evt.target as HTMLElement;\n if (target.className.indexOf('nxs-carousel-button') !== -1 || target.className.indexOf('swiper-pagination') !== -1)\n return;\n this.zone.run(() => {\n this.slideClick.next(evt);\n if (this.options.nxsfullscreenOnClick && this.images && this.images.length && !this.hasHtmlContent) {\n this.showFullScreenCarousel(this.images, 'fullscreen-carousel');\n }\n });\n\n });\n this.subscribeToSlideChanged();\n });\n }\n\n goToSlide(index: number, speed?: number) {\n if (!this.sliderInstance)\n return;\n this.sliderInstance.slideTo(index, speed);\n }\n next() {\n if (!this.sliderInstance)\n return;\n this.sliderInstance.slideNext();\n }\n previous() {\n if (!this.sliderInstance)\n return;\n this.sliderInstance.slidePrev();\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NxsCarouselDialogComponent } from './nxs-carousel-dialog.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { NxsCarouselComponent } from './nxs-carousel.component';\nimport { NxsCarouselModuleConfig } from './nxs-carousel-types';\nimport { ObserversModule } from '@angular/cdk/observers';\n\n@NgModule({\n declarations: [\n NxsCarouselComponent,\n NxsCarouselDialogComponent,\n ],\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatDialogModule,\n ObserversModule,\n ],\n exports: [\n NxsCarouselComponent,\n ],\n})\nexport class NxsCarouselModule {\n public static forRoot(config?: NxsCarouselModuleConfig): ModuleWithProviders<NxsCarouselModule> {\n return {\n ngModule: NxsCarouselModule,\n providers: [\n { provide: NxsCarouselModuleConfig, useValue: config },\n ]\n };\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {NxsCarouselDialogComponent as ɵa} from './lib/nxs-carousel/nxs-carousel-dialog.component';"],"names":[],"mappings":";;;;;;;;;;IAyEA;QACI,UAAK,GAAa,KAAK,CAAC;KAC3B;IAAD,8BAAC;AAAD,CAAC;;;ICjDG,oCACoC,IAA2B,EACpD,SAAmD;QAD1B,SAAI,GAAJ,IAAI,CAAuB;QACpD,cAAS,GAAT,SAAS,CAA0C;QAHvD,iBAAY,GAAW,sBAAsB,CAAC;QAKjD,IAAI,IAAI,CAAC,YAAY;YACjB,IAAI,CAAC,YAAY,IAAI,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC;KACpD;;gDALI,MAAM,SAAC,eAAe;gBACL,YAAY;;IAJzB,0BAA0B;QAftC,SAAS,CAAC;YACP,QAAQ,EAAE,qBAAqB;YAC/B,QAAQ,EAAE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