nextalys-carousel 0.0.80 → 0.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/fesm2022/nextalys-carousel.mjs +390 -2
  2. package/fesm2022/nextalys-carousel.mjs.map +1 -1
  3. package/{lib/nxs-carousel/nxs-carousel → nxs-carousel}/nxs-carousel-types.d.ts +9 -1
  4. package/nxs-carousel/nxs-carousel-types.d.ts.map +1 -0
  5. package/{lib/nxs-carousel/nxs-carousel → nxs-carousel}/nxs-carousel.component.d.ts +3 -3
  6. package/nxs-carousel/nxs-carousel.component.d.ts.map +1 -0
  7. package/nxs-carousel/swiper-directives.d.ts.map +1 -0
  8. package/package.json +1 -9
  9. package/public-api.d.ts +3 -1
  10. package/public-api.d.ts.map +1 -1
  11. package/common-types.d.ts +0 -10
  12. package/common-types.d.ts.map +0 -1
  13. package/fesm2022/nextalys-carousel-lib-nxs-carousel-mock.mjs +0 -65
  14. package/fesm2022/nextalys-carousel-lib-nxs-carousel-mock.mjs.map +0 -1
  15. package/fesm2022/nextalys-carousel-lib-nxs-carousel.mjs +0 -449
  16. package/fesm2022/nextalys-carousel-lib-nxs-carousel.mjs.map +0 -1
  17. package/lib/nxs-carousel/common-types.d.ts +0 -10
  18. package/lib/nxs-carousel/common-types.d.ts.map +0 -1
  19. package/lib/nxs-carousel/index.d.ts +0 -6
  20. package/lib/nxs-carousel/nextalys-carousel-lib-nxs-carousel.d.ts.map +0 -1
  21. package/lib/nxs-carousel/nxs-carousel/carousel-events.d.ts +0 -12
  22. package/lib/nxs-carousel/nxs-carousel/carousel-events.d.ts.map +0 -1
  23. package/lib/nxs-carousel/nxs-carousel/nxs-carousel-dialog.component.d.ts +0 -13
  24. package/lib/nxs-carousel/nxs-carousel/nxs-carousel-dialog.component.d.ts.map +0 -1
  25. package/lib/nxs-carousel/nxs-carousel/nxs-carousel-types.d.ts.map +0 -1
  26. package/lib/nxs-carousel/nxs-carousel/nxs-carousel.component.d.ts.map +0 -1
  27. package/lib/nxs-carousel/nxs-carousel/swiper-directives.d.ts +0 -6
  28. package/lib/nxs-carousel/nxs-carousel/swiper-directives.d.ts.map +0 -1
  29. package/lib/nxs-carousel/public-api-carousel.d.ts +0 -4
  30. package/lib/nxs-carousel/public-api-carousel.d.ts.map +0 -1
  31. package/lib/nxs-carousel-mock/common-types.d.ts +0 -10
  32. package/lib/nxs-carousel-mock/common-types.d.ts.map +0 -1
  33. package/lib/nxs-carousel-mock/index.d.ts +0 -6
  34. package/lib/nxs-carousel-mock/nextalys-carousel-lib-nxs-carousel-mock.d.ts.map +0 -1
  35. package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.component.d.ts +0 -22
  36. package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.component.d.ts.map +0 -1
  37. package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-types.d.ts +0 -2
  38. package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-types.d.ts.map +0 -1
  39. package/lib/nxs-carousel-mock/nxs-carousel-mock/swiper-directives.d.ts.map +0 -1
  40. package/lib/nxs-carousel-mock/public-api-carousel-mock.d.ts +0 -4
  41. package/lib/nxs-carousel-mock/public-api-carousel-mock.d.ts.map +0 -1
  42. /package/{lib/nxs-carousel-mock/nxs-carousel-mock → nxs-carousel}/swiper-directives.d.ts +0 -0
@@ -1,10 +1,398 @@
1
- import { InjectionToken } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, InjectionToken, EventEmitter, PLATFORM_ID, TemplateRef, Component, ViewEncapsulation, CUSTOM_ELEMENTS_SCHEMA, Inject, Optional, ContentChildren, Input, ViewChild, Output } from '@angular/core';
3
+ import * as i1 from '@angular/material/dialog';
4
+ import { MatDialogModule } from '@angular/material/dialog';
5
+ import * as i2 from '@angular/common';
6
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
7
+ import { EventsCollector } from 'nextalys-js-helpers/dist/events';
8
+ import { MatIconModule } from '@angular/material/icon';
9
+ import { MatButtonModule } from '@angular/material/button';
10
+ import { MainHelpers } from 'nextalys-js-helpers';
11
+
12
+ class NxsSwiperTemplateDirective {
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NxsSwiperTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
14
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: NxsSwiperTemplateDirective, isStandalone: true, selector: "[nxsSwiperTemplate]", ngImport: i0 });
15
+ }
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NxsSwiperTemplateDirective, decorators: [{
17
+ type: Directive,
18
+ args: [{
19
+ selector: '[nxsSwiperTemplate]',
20
+ standalone: true
21
+ }]
22
+ }] });
2
23
 
3
24
  class NxsCarouselModuleConfig {
4
25
  debug = false;
5
26
  }
6
27
  const NxsCarouselOptionsToken = new InjectionToken('NxsCarouselOptionsToken');
7
28
 
29
+ // install Swiper modules
30
+ // SwiperCore.use([Navigation, Pagination, Autoplay, Lazy, Thumbs]);
31
+ class NxsCarouselComponent {
32
+ matDialog;
33
+ zone;
34
+ platformId;
35
+ config;
36
+ swiperReady = false;
37
+ contents;
38
+ lazy = true;
39
+ eventsCollector = new EventsCollector();
40
+ images;
41
+ options = null;
42
+ thumbnailsOptions = null;
43
+ set setOptions(val) {
44
+ this.options = this.setDefaultOptions(val, false);
45
+ this.setThumbnailsOptions();
46
+ }
47
+ hasHtmlContent = false;
48
+ thumbnailsSwiperInstance;
49
+ swiperInstance;
50
+ swiperRef;
51
+ slidesCount = 0;
52
+ slideChange = new EventEmitter();
53
+ currentSlide = 0;
54
+ slideClick = new EventEmitter();
55
+ isBrowser = false;
56
+ static openDialogSubscribed = false;
57
+ static instanceCount = 0;
58
+ instanceId = 0;
59
+ constructor(matDialog, zone, platformId, config) {
60
+ this.matDialog = matDialog;
61
+ this.zone = zone;
62
+ this.platformId = platformId;
63
+ this.config = config;
64
+ NxsCarouselComponent.instanceCount++;
65
+ this.instanceId = NxsCarouselComponent.instanceCount;
66
+ if (!this.config)
67
+ this.config = { debug: false };
68
+ this.isBrowser = isPlatformBrowser(this.platformId);
69
+ this.log('constructor - isBrowser', this.isBrowser);
70
+ this.options = this.setDefaultOptions(undefined, false);
71
+ // NxsCarouselComponent.subscribeToOpenDialog(matDialog);
72
+ }
73
+ // static subscribeToOpenDialog(matDialog: MatDialog) {
74
+ // if (this.openDialogSubscribed) {
75
+ // return;
76
+ // }
77
+ // this.openDialogSubscribed = true;
78
+ // CarouselEvents.openCarouselDialog.subscribe((data) => {
79
+ // if (NxsCarouselDialogComponent.dialogOpened) {
80
+ // return;
81
+ // }
82
+ // matDialog.open(NxsCarouselDialogComponent, data);
83
+ // });
84
+ // }
85
+ log(...args) {
86
+ if (!this.config?.debug)
87
+ return;
88
+ console.log('[NxsCarousel - instance ' + this.instanceId + ']', ...args);
89
+ }
90
+ destroy() {
91
+ if (!this.isBrowser) {
92
+ return;
93
+ }
94
+ this.eventsCollector?.unsubscribeAll();
95
+ this.timeoutIds?.forEach(id => {
96
+ try {
97
+ clearTimeout(id);
98
+ }
99
+ catch (error) {
100
+ console.log("on destroy - clear timeout ERROR ", error);
101
+ }
102
+ });
103
+ this.timeoutIds = [];
104
+ }
105
+ ngOnDestroy() {
106
+ this.destroy();
107
+ }
108
+ ngAfterViewInit() {
109
+ if (!this.swiperRef?.nativeElement) {
110
+ return;
111
+ }
112
+ this.initSwiper();
113
+ // console.log("Log ~ NxsCarouselComponent ~ ngAfterViewInit ~ setTimeout ~ this.swiperInstance:", this.swiperInstance);
114
+ // setTimeout(() => {
115
+ // this.swiperInstance = this.swiperRef.nativeElement.swiper;
116
+ // console.log("Log ~ NxsCarouselComponent ~ ngAfterViewInit ~ setTimeout ~ this.swiperInstance:", this.swiperInstance);
117
+ // });
118
+ }
119
+ async initSwiper() {
120
+ this.log('init swiper');
121
+ // this.swiperInstance = this.swiperRef.nativeElement.swiper;
122
+ // console.log("Log ~ NxsCarouselComponent ~ ngAfterViewInit ~ this.swiperInstance:", this.swiperInstance);
123
+ // console.log('thi.contents', this.contents);
124
+ // this.initSlides();
125
+ await MainHelpers.waitForBoolValueSeconds(() => !!this.swiperRef?.nativeElement, 15, 200);
126
+ // this.createSlider(true);
127
+ this.log('swiperRef', this.swiperRef?.nativeElement);
128
+ this.log('options', this.options);
129
+ if (!this.swiperRef?.nativeElement) {
130
+ return;
131
+ }
132
+ Object.assign(this.swiperRef.nativeElement, this.options);
133
+ this.swiperRef.nativeElement?.initialize();
134
+ this.swiperInstance = this.swiperRef?.nativeElement?.swiper;
135
+ this.onSwiper();
136
+ }
137
+ getMainSliderHeight() {
138
+ if (!this.options)
139
+ return '';
140
+ if (this.options.nxsThumbnails && this.options.nxsThumbnails.show) {
141
+ if (this.options.nxsThumbnails.onMainSlider) {
142
+ return '100%';
143
+ }
144
+ else if (this.options.nxsThumbnails.percentHeight) {
145
+ return (100 - this.options.nxsThumbnails.percentHeight) + '%';
146
+ }
147
+ }
148
+ return '';
149
+ }
150
+ setDefaultOptions(options, forDialog) {
151
+ if (!options && forDialog) {
152
+ options = {
153
+ nxsShowNavigationBullets: true, loop: true, nxsThumbnails: { show: true }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: true,
154
+ lazy: this.lazy,
155
+ };
156
+ }
157
+ else if (!options) {
158
+ options = {
159
+ nxsShowNavigationBullets: true, loop: true,
160
+ nxsThumbnails: { show: false }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: false, nxsCarouselDialogOptions: {},
161
+ lazy: this.lazy,
162
+ };
163
+ }
164
+ if (options.nxsCarouselDialogOptions) {
165
+ if (typeof options.nxsCarouselDialogOptions.nxsThumbnails === 'undefined')
166
+ options.nxsCarouselDialogOptions.nxsThumbnails = { show: false };
167
+ if (typeof options.nxsCarouselDialogOptions.effect === 'undefined')
168
+ options.nxsCarouselDialogOptions.effect = 'slide';
169
+ if (typeof options.nxsCarouselDialogOptions.nxsShowNavigationArrows === 'undefined')
170
+ options.nxsCarouselDialogOptions.nxsShowNavigationArrows = true;
171
+ if (!!options.nxsCarouselDialogOptions.nxsThumbnails?.show) {
172
+ if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight === 'undefined')
173
+ options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight = 20;
174
+ if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.perView === 'undefined')
175
+ options.nxsCarouselDialogOptions.nxsThumbnails.perView = 10;
176
+ options.nxsCarouselDialogOptions.nxsThumbnails.breakpoints = {
177
+ 640: {
178
+ slidesPerView: 5,
179
+ },
180
+ 768: {
181
+ slidesPerView: 7,
182
+ },
183
+ 1024: {
184
+ slidesPerView: 8,
185
+ },
186
+ };
187
+ }
188
+ }
189
+ if (!options.nxsThumbnails)
190
+ options.nxsThumbnails = { show: false };
191
+ if (options.nxsThumbnails.show && typeof options.nxsThumbnails.percentHeight === 'undefined')
192
+ options.nxsThumbnails.percentHeight = 20;
193
+ if (options.nxsThumbnails.show && typeof options.nxsThumbnails.perView === 'undefined')
194
+ options.nxsThumbnails.perView = 10;
195
+ if (forDialog)
196
+ options.nxsfullscreenOnClick = false;
197
+ if (options.nxsThumbnails.onMainSlider)
198
+ options.nxsShowNavigationBullets = false;
199
+ if (typeof options.lazy === 'undefined')
200
+ options.lazy = true;
201
+ if (typeof options.navigation === 'undefined')
202
+ options.navigation = true;
203
+ if (typeof options.pagination === 'undefined')
204
+ options.pagination = { clickable: true };
205
+ if (options.nxsShowNavigationBullets === false) {
206
+ options.pagination = false;
207
+ }
208
+ // console.log("Log ~ file: nxs-carousel.component.ts ~ line 272 ~ NxsCarouselComponent ~ setDefaultOptions ~ options", options);
209
+ return options;
210
+ }
211
+ setThumbnailsOptions() {
212
+ if (!!this.options?.nxsThumbnails?.show) {
213
+ this.thumbnailsOptions = {
214
+ slidesPerView: this.options.nxsThumbnails.perView,
215
+ loop: false,
216
+ freeMode: true,
217
+ // watchSlidesVisibility: true,
218
+ watchSlidesProgress: true,
219
+ breakpoints: this.options.nxsThumbnails.breakpoints,
220
+ // spaceBetween: 10,
221
+ };
222
+ if (this.lazy) {
223
+ // Disable preloading of all images
224
+ // this.thumbnailsOptions.preloadImages = false;
225
+ // Enable lazy loading
226
+ this.thumbnailsOptions.lazy = true;
227
+ }
228
+ // console.log("Log ~ file: nxs-carousel.component.ts ~ line 184 ~ NxsCarouselComponent ~ setThumbnailsOptions ~ this.thumbnailsOptions.lazy", this.thumbnailsOptions.lazy);
229
+ // this.thumbnailsSliderInstance = new Swiper(this.nxsThumbnailsSliderContainer.nativeElement, thumbnailsOptions);
230
+ // this.options.thumbs = { swiper: this.thumbnailsSliderInstance };
231
+ }
232
+ }
233
+ // public showFullScreenCarousel(images: NxsCarouselImage[], wrapperClass?: string) {
234
+ // this.options.nxsCarouselDialogOptions = this.setDefaultOptions(this.options.nxsCarouselDialogOptions, true);
235
+ // const data: NxsCarouselDialogData = { images, wrapperClass, options: this.options.nxsCarouselDialogOptions };
236
+ // CarouselEvents.openCarouselDialog?.emit({
237
+ // data,
238
+ // panelClass: 'nxs-carousel-dialog',
239
+ // width: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.width : undefined,
240
+ // height: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.height : undefined,
241
+ // disableClose: !this.options.nxsCarouselDialogExitable,
242
+ // });
243
+ // }
244
+ goToSlide(index, speed) {
245
+ this.swiperInstance?.slideTo(index, speed);
246
+ }
247
+ next() {
248
+ this.swiperInstance?.slideNext();
249
+ }
250
+ previous() {
251
+ this.swiperInstance?.slidePrev();
252
+ }
253
+ onSwiperThumbnails(instance) {
254
+ if (this.options?.nxsThumbnails?.show)
255
+ this.thumbnailsSwiperInstance = instance;
256
+ else
257
+ this.thumbnailsSwiperInstance = null;
258
+ // if (this.options?.nxsThumbnails?.show) {
259
+ // const optionsClone = MainHelpers.cloneObject(this.options);
260
+ // optionsClone.thumbs = { swiper: this.thumbnailsSwiperInstance };
261
+ // // this.options = optionsClone;
262
+ // // this.options = { ...this.options, thumbs: { swiper: this.thumbnailsSwiperInstance } };
263
+ // console.log("Log ~ file: nxs-carousel.component.ts ~ line 416 ~ NxsCarouselComponent ~ onSwiperThumbnails ~ this.options ", this.options);
264
+ // this.options.thumbs = { swiper: this.thumbnailsSwiperInstance };
265
+ // }
266
+ }
267
+ timeoutIds = [];
268
+ getSlidesCount() {
269
+ if (!this.swiperInstance?.slides?.length) {
270
+ return 0;
271
+ }
272
+ //TODO: gérer le loop ici
273
+ // if (this.swiperInstance?.lo) {
274
+ // return (this.swiperInstance?.slides?.length || 0) - 2;
275
+ // }
276
+ // const isLoopActive = !!this.swiperInstance?.params?.loop;
277
+ // if (isLoopActive) {
278
+ // return (this.swiperInstance?.slides?.length || 0) - (this.swiperInstance?.loopedSlides || 0) * 2;
279
+ // }
280
+ return this.swiperInstance?.slides?.length || 0;
281
+ }
282
+ onSwiper() {
283
+ this.log('swiper ready - instance', this.swiperInstance);
284
+ if (!this.isBrowser) {
285
+ this.log('not browser - return');
286
+ return;
287
+ }
288
+ // this.swiperInstance = instance;
289
+ this.swiperInstance?.on('click', (swiperInstance, evt) => {
290
+ // console.log("Log ~ file: nxs-carousel.component.ts ~ line 392 ~ NxsCarouselComponent ~ this.swiperInstance.on ~ evt", evt);
291
+ const target = evt.target;
292
+ // console.log("Log ~ NxsCarouselComponent ~ onSwiper ~ target:", target);
293
+ if (target.className.indexOf('nxs-carousel-button') !== -1 || target.className.indexOf('swiper-pagination') !== -1
294
+ || target.className.indexOf('swiper-button-next') !== -1 || target.className.indexOf('swiper-button-prev') !== -1
295
+ || target.tagName === 'SWIPER-CONTAINER') {
296
+ return;
297
+ }
298
+ this.runInZone(() => {
299
+ this.slideClick.next(evt);
300
+ // if (this.options.nxsfullscreenOnClick && this.images && this.images.length && !this.hasHtmlContent) {
301
+ // this.showFullScreenCarousel(this.images, 'fullscreen-carousel');
302
+ // }
303
+ });
304
+ });
305
+ const tId = setTimeout(() => {
306
+ this.slidesCount = this.getSlidesCount();
307
+ });
308
+ this.timeoutIds.push(tId);
309
+ this.swiperInstance?.on('slideChange', () => {
310
+ this.onSlideChange([this.swiperInstance]);
311
+ });
312
+ this.swiperReady = true;
313
+ // $('.swiper-container').on('keydown keyup', function(e){
314
+ // if (e.keyCode==9) $('.swiper-container')[0].scrollLeft = 0;
315
+ // })
316
+ // console.log("Log ~ file: nxs-carousel.component.ts:254 ~ NxsCarouselComponent ~ this.swiperInstance.el.addEventListener ~ this.swiperInstance.el:", this.swiperInstance.el);
317
+ // this.swiperInstance.el.addEventListener('keydown', (evt) => {
318
+ // if (evt.keyCode === 9) {
319
+ // // evt.preventDefault();
320
+ // // this.swiperInstance.el.scrollLeft = 0;
321
+ // // this.swiperInstance.el.querySelectorAll('.swiper-wrapper')[0].scrollLeft = 0;
322
+ // // $('.swiper-container')[0].scrollLeft = 0;
323
+ // }
324
+ // });
325
+ // document.querySelectorAll()
326
+ }
327
+ runOutZone(callback, ...args) {
328
+ if (!this.zone) {
329
+ callback(args);
330
+ }
331
+ return this.zone.runOutsideAngular(() => callback(args));
332
+ }
333
+ runInZone(callback, ...args) {
334
+ if (!this.zone) {
335
+ callback(args);
336
+ }
337
+ return this.zone.run(() => callback(args));
338
+ }
339
+ onSlideChange(instances) {
340
+ if (!this.swiperReady) {
341
+ return;
342
+ }
343
+ if (!this.swiperInstance && instances?.length) {
344
+ this.swiperInstance = instances[0];
345
+ }
346
+ // console.log("Log ~ file: nxs-carousel.component.ts:252 ~ NxsCarouselComponent ~ onSlideChange ~ instances:", instances);
347
+ // this.swiperInstance = instance;
348
+ // this.log('slide change - instance', instance);
349
+ this.runInZone(() => {
350
+ this.currentSlide = this.swiperInstance?.realIndex || 0;
351
+ // console.log("Log ~ file: nxs-carousel.component.ts:256 ~ NxsCarouselComponent ~ this.runInZone ~ this.swiperInstance?.realIndex:", this.swiperInstance);
352
+ this.log('slide change - currentSlide', this.currentSlide);
353
+ this.slideChange.next(this.currentSlide);
354
+ });
355
+ }
356
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NxsCarouselComponent, deps: [{ token: i1.MatDialog }, { token: i0.NgZone }, { token: PLATFORM_ID }, { token: NxsCarouselOptionsToken, optional: true }], target: i0.ɵɵFactoryTarget.Component });
357
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: NxsCarouselComponent, isStandalone: true, selector: "nxs-carousel", inputs: { lazy: "lazy", images: "images", setOptions: ["options", "setOptions"], hasHtmlContent: "hasHtmlContent" }, outputs: { slideChange: "slideChange", slideClick: "slideClick" }, queries: [{ propertyName: "contents", predicate: NxsSwiperTemplateDirective, read: TemplateRef }], viewQueries: [{ propertyName: "swiperRef", first: true, predicate: ["swiperRef"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"options\"\n [ngClass]=\"{'swiper-container':true,'nxs-slider-with-thumbnails':!!options.nxsThumbnails && options.nxsThumbnails.show}\"\n [style.height]=\"getMainSliderHeight()\">\n <swiper-container init=\"false\" #swiperRef>\n @if(hasHtmlContent){\n @for( slide of contents; track $index){\n <swiper-slide>\n <ng-template [ngTemplateOutlet]=\"slide\" [ngTemplateOutletContext]=\"{\n $implicit: slide\n }\"></ng-template>\n </swiper-slide>\n }\n }@else if(images?.length){\n @for( slideImage of images; track $index){\n <swiper-slide>\n <img [ngClass]=\"{'nxs-image-slide':true,'swiper-lazy':lazy}\" [attr.loading]=\"lazy ? 'lazy' : null\"\n [src]=\"slideImage.src\" [attr.alt]=\"slideImage.alt\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </swiper-slide>\n }\n }\n </swiper-container>\n <!-- <swiper [config]=\"options\" (swiper)=\"onSwiper($event)\" (slideChange)=\"onSlideChange($event)\"\n [thumbs]=\"{ swiper: thumbnailsSwiperInstance }\">\n <ng-container *ngIf=\"hasHtmlContent\">\n <ng-template *ngFor=\"let slide of contents\" swiperSlide>\n <swiper-slide>\n <ng-template [ngTemplateOutlet]=\"slide\" [ngTemplateOutletContext]=\"{\n $implicit: slide\n }\"></ng-template>\n </swiper-slide>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!hasHtmlContent && images?.length\">\n <ng-template swiperSlide *ngFor=\"let slideImage of images\">\n <img [ngClass]=\"{'nxs-image-slide':true,'swiper-lazy':lazy}\" [attr.loading]=\"lazy ? 'lazy' : null\"\n [src]=\"slideImage.src\" [attr.alt]=\"slideImage.alt\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </ng-template>\n </ng-container>\n </swiper> -->\n @if(options?.nxsShowImagesCount){\n <div class=\"nxs-image-counter\">\n {{currentSlide+1}} / {{slidesCount}}\n </div>\n }\n</div>\n\n<!-- <div *ngIf=\"thumbnailsOptions && images?.length\"\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 <swiper [config]=\"thumbnailsOptions\" (swiper)=\"onSwiperThumbnails($event)\">\n <ng-template swiperSlide *ngFor=\"let slideImage of images\">\n <img [ngClass]=\"{'nxs-image-slide':true,'swiper-lazy':lazy}\" [attr.data-src]=\"lazy ? slideImage.src : null\"\n [src]=\"lazy ? null : slideImage.src\" [attr.alt]=\"slideImage.alt\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </ng-template>\n </swiper>\n</div> -->", styles: [":root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d :is(.swiper-slide,.swiper-cube-shadow){transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:\"\";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d :is(.swiper-slide-shadow,.swiper-slide-shadow-left,.swiper-slide-shadow-right,.swiper-slide-shadow-top,.swiper-slide-shadow-bottom){position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}:is(.swiper:not(.swiper-watch-progress),.swiper-watch-progress .swiper-slide-visible) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:root{--swiper-navigation-size: 44px}.swiper-button-prev,.swiper-button-next{position:absolute;width:var(--swiper-navigation-size);height:var(--swiper-navigation-size);z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color, var(--swiper-theme-color))}:is(.swiper-button-prev,.swiper-button-next).swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}:is(.swiper-button-prev,.swiper-button-next).swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled :is(.swiper-button-prev,.swiper-button-next){display:none!important}:is(.swiper-button-prev,.swiper-button-next) svg{width:100%;height:100%;object-fit:contain;transform-origin:center;fill:currentColor;pointer-events:none}.swiper-button-lock{display:none}.swiper-button-prev,.swiper-button-next{top:var(--swiper-navigation-top-offset, 50%);margin-top:calc(0px - var(--swiper-navigation-size) / 2)}.swiper-button-prev{left:var(--swiper-navigation-sides-offset, 4px);right:auto}.swiper-button-prev .swiper-navigation-icon{transform:rotate(180deg)}.swiper-button-next{right:var(--swiper-navigation-sides-offset, 4px);left:auto}.swiper-horizontal .swiper-button-prev,.swiper-horizontal .swiper-button-next,.swiper-horizontal~.swiper-button-prev,.swiper-horizontal~.swiper-button-next{top:var(--swiper-navigation-top-offset, 50%);margin-top:calc(0px - var(--swiper-navigation-size) / 2);margin-left:0}.swiper-horizontal .swiper-button-prev,.swiper-horizontal~.swiper-button-prev,.swiper-horizontal.swiper-rtl .swiper-button-next,.swiper-horizontal.swiper-rtl~.swiper-button-next{left:var(--swiper-navigation-sides-offset, 4px);right:auto}.swiper-horizontal .swiper-button-next,.swiper-horizontal~.swiper-button-next,.swiper-horizontal.swiper-rtl .swiper-button-prev,.swiper-horizontal.swiper-rtl~.swiper-button-prev{right:var(--swiper-navigation-sides-offset, 4px);left:auto}:is(.swiper-horizontal .swiper-button-prev,.swiper-horizontal~.swiper-button-prev,.swiper-horizontal.swiper-rtl .swiper-button-next,.swiper-horizontal.swiper-rtl~.swiper-button-next) .swiper-navigation-icon{transform:rotate(180deg)}.swiper-horizontal:is(.swiper-rtl .swiper-button-prev,.swiper-rtl~.swiper-button-prev) .swiper-navigation-icon{transform:rotate(0)}.swiper-vertical .swiper-button-prev,.swiper-vertical .swiper-button-next,.swiper-vertical~.swiper-button-prev,.swiper-vertical~.swiper-button-next{left:var(--swiper-navigation-top-offset, 50%);right:auto;margin-left:calc(0px - var(--swiper-navigation-size) / 2);margin-top:0}.swiper-vertical .swiper-button-prev,.swiper-vertical~.swiper-button-prev{top:var(--swiper-navigation-sides-offset, 4px);bottom:auto}:is(.swiper-vertical .swiper-button-prev,.swiper-vertical~.swiper-button-prev) .swiper-navigation-icon{transform:rotate(-90deg)}.swiper-vertical .swiper-button-next,.swiper-vertical~.swiper-button-next{bottom:var(--swiper-navigation-sides-offset, 4px);top:auto}:is(.swiper-vertical .swiper-button-next,.swiper-vertical~.swiper-button-next) .swiper-navigation-icon{transform:rotate(90deg)}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom, 8px);top:var(--swiper-pagination-top, auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic :is(.swiper-pagination-bullet-active,.swiper-pagination-bullet-active-main){transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius, 50%);background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right, 8px);left:var(--swiper-pagination-left, auto);top:50%;transform:translate3d(0,-50%,0)}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets) .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets) .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{left:50%;transform:translate(-50%);white-space:nowrap}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color, inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, .25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size, 4px);left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size, 4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}nxs-carousel{display:block;height:100%;position:relative;--swiper-navigation-color: #fff;--swiper-pagination-color: #fff;--swiper-theme-color: #fff}nxs-carousel swiper-container{width:100%;height:100%;display:block;position:relative}nxs-carousel swiper-container .swiper-wrapper .swiper-slide{height:100%;position:relative;width:auto;min-height:50px;background-size:cover;background-position:center;background-repeat:no-repeat}nxs-carousel swiper-container .nxs-image-slide{height:100%;object-fit:cover;width:100%;object-position:center}nxs-carousel swiper-container.nxs-slider-with-thumbnails{height:80%}nxs-carousel swiper-container.nxs-slider-thumbnails-container{height:20%;background:transparent;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 lightblue}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}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatDialogModule }], encapsulation: i0.ViewEncapsulation.None });
358
+ }
359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NxsCarouselComponent, decorators: [{
360
+ type: Component,
361
+ args: [{ selector: 'nxs-carousel', encapsulation: ViewEncapsulation.None, standalone: true, imports: [
362
+ CommonModule,
363
+ MatIconModule,
364
+ MatButtonModule,
365
+ MatDialogModule,
366
+ ], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<div *ngIf=\"options\"\n [ngClass]=\"{'swiper-container':true,'nxs-slider-with-thumbnails':!!options.nxsThumbnails && options.nxsThumbnails.show}\"\n [style.height]=\"getMainSliderHeight()\">\n <swiper-container init=\"false\" #swiperRef>\n @if(hasHtmlContent){\n @for( slide of contents; track $index){\n <swiper-slide>\n <ng-template [ngTemplateOutlet]=\"slide\" [ngTemplateOutletContext]=\"{\n $implicit: slide\n }\"></ng-template>\n </swiper-slide>\n }\n }@else if(images?.length){\n @for( slideImage of images; track $index){\n <swiper-slide>\n <img [ngClass]=\"{'nxs-image-slide':true,'swiper-lazy':lazy}\" [attr.loading]=\"lazy ? 'lazy' : null\"\n [src]=\"slideImage.src\" [attr.alt]=\"slideImage.alt\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </swiper-slide>\n }\n }\n </swiper-container>\n <!-- <swiper [config]=\"options\" (swiper)=\"onSwiper($event)\" (slideChange)=\"onSlideChange($event)\"\n [thumbs]=\"{ swiper: thumbnailsSwiperInstance }\">\n <ng-container *ngIf=\"hasHtmlContent\">\n <ng-template *ngFor=\"let slide of contents\" swiperSlide>\n <swiper-slide>\n <ng-template [ngTemplateOutlet]=\"slide\" [ngTemplateOutletContext]=\"{\n $implicit: slide\n }\"></ng-template>\n </swiper-slide>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!hasHtmlContent && images?.length\">\n <ng-template swiperSlide *ngFor=\"let slideImage of images\">\n <img [ngClass]=\"{'nxs-image-slide':true,'swiper-lazy':lazy}\" [attr.loading]=\"lazy ? 'lazy' : null\"\n [src]=\"slideImage.src\" [attr.alt]=\"slideImage.alt\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </ng-template>\n </ng-container>\n </swiper> -->\n @if(options?.nxsShowImagesCount){\n <div class=\"nxs-image-counter\">\n {{currentSlide+1}} / {{slidesCount}}\n </div>\n }\n</div>\n\n<!-- <div *ngIf=\"thumbnailsOptions && images?.length\"\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 <swiper [config]=\"thumbnailsOptions\" (swiper)=\"onSwiperThumbnails($event)\">\n <ng-template swiperSlide *ngFor=\"let slideImage of images\">\n <img [ngClass]=\"{'nxs-image-slide':true,'swiper-lazy':lazy}\" [attr.data-src]=\"lazy ? slideImage.src : null\"\n [src]=\"lazy ? null : slideImage.src\" [attr.alt]=\"slideImage.alt\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </ng-template>\n </swiper>\n</div> -->", styles: [":root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d :is(.swiper-slide,.swiper-cube-shadow){transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:\"\";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d :is(.swiper-slide-shadow,.swiper-slide-shadow-left,.swiper-slide-shadow-right,.swiper-slide-shadow-top,.swiper-slide-shadow-bottom){position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}:is(.swiper:not(.swiper-watch-progress),.swiper-watch-progress .swiper-slide-visible) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:root{--swiper-navigation-size: 44px}.swiper-button-prev,.swiper-button-next{position:absolute;width:var(--swiper-navigation-size);height:var(--swiper-navigation-size);z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color, var(--swiper-theme-color))}:is(.swiper-button-prev,.swiper-button-next).swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}:is(.swiper-button-prev,.swiper-button-next).swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled :is(.swiper-button-prev,.swiper-button-next){display:none!important}:is(.swiper-button-prev,.swiper-button-next) svg{width:100%;height:100%;object-fit:contain;transform-origin:center;fill:currentColor;pointer-events:none}.swiper-button-lock{display:none}.swiper-button-prev,.swiper-button-next{top:var(--swiper-navigation-top-offset, 50%);margin-top:calc(0px - var(--swiper-navigation-size) / 2)}.swiper-button-prev{left:var(--swiper-navigation-sides-offset, 4px);right:auto}.swiper-button-prev .swiper-navigation-icon{transform:rotate(180deg)}.swiper-button-next{right:var(--swiper-navigation-sides-offset, 4px);left:auto}.swiper-horizontal .swiper-button-prev,.swiper-horizontal .swiper-button-next,.swiper-horizontal~.swiper-button-prev,.swiper-horizontal~.swiper-button-next{top:var(--swiper-navigation-top-offset, 50%);margin-top:calc(0px - var(--swiper-navigation-size) / 2);margin-left:0}.swiper-horizontal .swiper-button-prev,.swiper-horizontal~.swiper-button-prev,.swiper-horizontal.swiper-rtl .swiper-button-next,.swiper-horizontal.swiper-rtl~.swiper-button-next{left:var(--swiper-navigation-sides-offset, 4px);right:auto}.swiper-horizontal .swiper-button-next,.swiper-horizontal~.swiper-button-next,.swiper-horizontal.swiper-rtl .swiper-button-prev,.swiper-horizontal.swiper-rtl~.swiper-button-prev{right:var(--swiper-navigation-sides-offset, 4px);left:auto}:is(.swiper-horizontal .swiper-button-prev,.swiper-horizontal~.swiper-button-prev,.swiper-horizontal.swiper-rtl .swiper-button-next,.swiper-horizontal.swiper-rtl~.swiper-button-next) .swiper-navigation-icon{transform:rotate(180deg)}.swiper-horizontal:is(.swiper-rtl .swiper-button-prev,.swiper-rtl~.swiper-button-prev) .swiper-navigation-icon{transform:rotate(0)}.swiper-vertical .swiper-button-prev,.swiper-vertical .swiper-button-next,.swiper-vertical~.swiper-button-prev,.swiper-vertical~.swiper-button-next{left:var(--swiper-navigation-top-offset, 50%);right:auto;margin-left:calc(0px - var(--swiper-navigation-size) / 2);margin-top:0}.swiper-vertical .swiper-button-prev,.swiper-vertical~.swiper-button-prev{top:var(--swiper-navigation-sides-offset, 4px);bottom:auto}:is(.swiper-vertical .swiper-button-prev,.swiper-vertical~.swiper-button-prev) .swiper-navigation-icon{transform:rotate(-90deg)}.swiper-vertical .swiper-button-next,.swiper-vertical~.swiper-button-next{bottom:var(--swiper-navigation-sides-offset, 4px);top:auto}:is(.swiper-vertical .swiper-button-next,.swiper-vertical~.swiper-button-next) .swiper-navigation-icon{transform:rotate(90deg)}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom, 8px);top:var(--swiper-pagination-top, auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic :is(.swiper-pagination-bullet-active,.swiper-pagination-bullet-active-main){transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius, 50%);background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right, 8px);left:var(--swiper-pagination-left, auto);top:50%;transform:translate3d(0,-50%,0)}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets) .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets) .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{left:50%;transform:translate(-50%);white-space:nowrap}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color, inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, .25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size, 4px);left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size, 4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}nxs-carousel{display:block;height:100%;position:relative;--swiper-navigation-color: #fff;--swiper-pagination-color: #fff;--swiper-theme-color: #fff}nxs-carousel swiper-container{width:100%;height:100%;display:block;position:relative}nxs-carousel swiper-container .swiper-wrapper .swiper-slide{height:100%;position:relative;width:auto;min-height:50px;background-size:cover;background-position:center;background-repeat:no-repeat}nxs-carousel swiper-container .nxs-image-slide{height:100%;object-fit:cover;width:100%;object-position:center}nxs-carousel swiper-container.nxs-slider-with-thumbnails{height:80%}nxs-carousel swiper-container.nxs-slider-thumbnails-container{height:20%;background:transparent;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 lightblue}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}\n"] }]
367
+ }], ctorParameters: () => [{ type: i1.MatDialog }, { type: i0.NgZone }, { type: undefined, decorators: [{
368
+ type: Inject,
369
+ args: [PLATFORM_ID]
370
+ }] }, { type: NxsCarouselModuleConfig, decorators: [{
371
+ type: Optional
372
+ }, {
373
+ type: Inject,
374
+ args: [NxsCarouselOptionsToken]
375
+ }] }], propDecorators: { contents: [{
376
+ type: ContentChildren,
377
+ args: [NxsSwiperTemplateDirective, { read: TemplateRef }]
378
+ }], lazy: [{
379
+ type: Input
380
+ }], images: [{
381
+ type: Input
382
+ }], setOptions: [{
383
+ type: Input,
384
+ args: ['options']
385
+ }], hasHtmlContent: [{
386
+ type: Input
387
+ }], swiperRef: [{
388
+ type: ViewChild,
389
+ args: ['swiperRef']
390
+ }], slideChange: [{
391
+ type: Output
392
+ }], slideClick: [{
393
+ type: Output
394
+ }] } });
395
+
8
396
  // export * from './lib/nxs-carousel/nxs-carousel.component';
9
397
  // export * from './lib/nxs-carousel/nxs-carousel.module';
10
398
  // export * from './lib/nxs-carousel/nxs-carousel-types';
@@ -13,5 +401,5 @@ const NxsCarouselOptionsToken = new InjectionToken('NxsCarouselOptionsToken');
13
401
  * Generated bundle index. Do not edit.
14
402
  */
15
403
 
16
- export { NxsCarouselModuleConfig, NxsCarouselOptionsToken };
404
+ export { NxsCarouselComponent, NxsCarouselModuleConfig, NxsCarouselOptionsToken, NxsSwiperTemplateDirective };
17
405
  //# sourceMappingURL=nextalys-carousel.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"nextalys-carousel.mjs","sources":["../../lib/common-types.ts","../../lib/public-api.ts","../../lib/nextalys-carousel.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport interface NxsCarouselImage {\n alt?: string;\n src: string;\n}\nexport class NxsCarouselModuleConfig {\n debug?: boolean = false;\n}\n\nexport const NxsCarouselOptionsToken = new InjectionToken<NxsCarouselModuleConfig>('NxsCarouselOptionsToken');","// export * from './lib/nxs-carousel/nxs-carousel.component';\n// export * from './lib/nxs-carousel/nxs-carousel.module';\n// export * from './lib/nxs-carousel/nxs-carousel-types';\nexport * from './common-types';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;MAMa,uBAAuB,CAAA;IAChC,KAAK,GAAa,KAAK;AAC1B;MAEY,uBAAuB,GAAG,IAAI,cAAc,CAA0B,yBAAyB;;ACV5G;AACA;AACA;;ACFA;;AAEG;;;;"}
1
+ {"version":3,"file":"nextalys-carousel.mjs","sources":["../../lib/nxs-carousel/swiper-directives.ts","../../lib/nxs-carousel/nxs-carousel-types.ts","../../lib/nxs-carousel/nxs-carousel.component.ts","../../lib/nxs-carousel/nxs-carousel.component.html","../../lib/public-api.ts","../../lib/nextalys-carousel.ts"],"sourcesContent":["import { Directive } from \"@angular/core\";\n\n@Directive({\n selector: '[nxsSwiperTemplate]',\n standalone: true\n})\nexport class NxsSwiperTemplateDirective { }\n","import { SwiperOptions } from \"swiper/types\";\nimport { InjectionToken } from \"@angular/core\";\n\nexport interface NxsCarouselOptionsLazy extends SwiperOptions {\n lazy?: boolean;\n}\nexport interface NxsCarouselOptions extends NxsCarouselOptionsLazy {\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}\n\n\nexport interface NxsCarouselDialogData {\n images: NxsCarouselImage[];\n options?: NxsCarouselOptions;\n wrapperClass?: string;\n}\n\n\nexport interface NxsCarouselImage {\n alt?: string;\n src: string;\n}\nexport class NxsCarouselModuleConfig {\n debug?: boolean = false;\n}\n\nexport const NxsCarouselOptionsToken: InjectionToken<NxsCarouselModuleConfig> = new InjectionToken<NxsCarouselModuleConfig>('NxsCarouselOptionsToken');\n","import { Component, ViewEncapsulation, Input, ViewChild, Output, EventEmitter, PLATFORM_ID, Inject, Optional, NgZone, ContentChildren, TemplateRef, InjectionToken, CUSTOM_ELEMENTS_SCHEMA, ElementRef } from '@angular/core';\nimport { NxsCarouselDialogData, NxsCarouselOptions, NxsCarouselOptionsLazy } from './nxs-carousel-types';\nimport { MatDialog, MatDialogModule } from '@angular/material/dialog';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport { EventsCollector } from 'nextalys-js-helpers/dist/events';\n// import Swiper core and required modules\n// import SwiperCore, { Navigation, Pagination, Autoplay, Lazy, Swiper, SwiperOptions, Thumbs } from 'swiper';\n//Virtual,Scrollbar,A11y\n// import { SwiperComponent } from 'swiper/angular';\nimport { NxsSwiperTemplateDirective } from './swiper-directives';\nimport { NxsCarouselImage, NxsCarouselModuleConfig, NxsCarouselOptionsToken } from './nxs-carousel-types';\n// import { CarouselEvents } from './carousel-events';\n// import { NxsCarouselDialogComponent } from './nxs-carousel-dialog.component';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { Swiper, SwiperOptions } from 'swiper/types';\nimport { SwiperContainer } from 'swiper/element';\nimport { MainHelpers } from 'nextalys-js-helpers';\n\n// install Swiper modules\n// SwiperCore.use([Navigation, Pagination, Autoplay, Lazy, Thumbs]);\n@Component({\n selector: 'nxs-carousel',\n templateUrl: './nxs-carousel.component.html',\n styleUrls: ['./nxs-carousel.component.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatDialogModule,\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NxsCarouselComponent {\n private swiperReady = false;\n @ContentChildren(NxsSwiperTemplateDirective, { read: TemplateRef })\n contents!: TemplateRef<HTMLElement>[];\n @Input()\n lazy = true;\n private eventsCollector = new EventsCollector();\n\n @Input()\n public images: NxsCarouselImage[];\n options: NxsCarouselOptions = null;\n thumbnailsOptions: NxsCarouselOptionsLazy = null;\n @Input('options')\n set setOptions(val: NxsCarouselOptions) {\n this.options = this.setDefaultOptions(val, false);\n this.setThumbnailsOptions();\n }\n @Input()\n hasHtmlContent = false;\n thumbnailsSwiperInstance: Swiper;\n private swiperInstance: Swiper;\n\n @ViewChild('swiperRef') swiperRef!: ElementRef<SwiperContainer>;\n\n slidesCount = 0;\n\n\n @Output()\n slideChange = new EventEmitter<number>();\n public currentSlide = 0;\n @Output()\n slideClick = new EventEmitter<MouseEvent | TouchEvent | PointerEvent>();\n isBrowser = false;\n static openDialogSubscribed = false;\n static instanceCount = 0;\n instanceId = 0;\n constructor(\n private matDialog: MatDialog,\n private zone: NgZone,\n @Inject(PLATFORM_ID) private platformId: any,\n @Optional() @Inject(NxsCarouselOptionsToken) private config?: NxsCarouselModuleConfig,\n\n ) {\n NxsCarouselComponent.instanceCount++;\n this.instanceId = NxsCarouselComponent.instanceCount;\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 // NxsCarouselComponent.subscribeToOpenDialog(matDialog);\n\n }\n // static subscribeToOpenDialog(matDialog: MatDialog) {\n // if (this.openDialogSubscribed) {\n // return;\n // }\n // this.openDialogSubscribed = true;\n // CarouselEvents.openCarouselDialog.subscribe((data) => {\n // if (NxsCarouselDialogComponent.dialogOpened) {\n // return;\n // }\n // matDialog.open(NxsCarouselDialogComponent, data);\n // });\n // }\n\n private log(...args: any[]) {\n if (!this.config?.debug)\n return;\n console.log('[NxsCarousel - instance ' + this.instanceId + ']', ...args);\n }\n private destroy() {\n if (!this.isBrowser) {\n return;\n }\n this.eventsCollector?.unsubscribeAll();\n this.timeoutIds?.forEach(id => {\n try {\n clearTimeout(id);\n } catch (error) {\n console.log(\"on destroy - clear timeout ERROR \", error);\n }\n });\n this.timeoutIds = [];\n }\n ngOnDestroy(): void {\n this.destroy();\n }\n ngAfterViewInit(): void {\n if (!this.swiperRef?.nativeElement) {\n return;\n }\n this.initSwiper();\n\n // console.log(\"Log ~ NxsCarouselComponent ~ ngAfterViewInit ~ setTimeout ~ this.swiperInstance:\", this.swiperInstance);\n\n // setTimeout(() => {\n // this.swiperInstance = this.swiperRef.nativeElement.swiper;\n // console.log(\"Log ~ NxsCarouselComponent ~ ngAfterViewInit ~ setTimeout ~ this.swiperInstance:\", this.swiperInstance);\n\n // });\n\n }\n private async initSwiper() {\n this.log('init swiper');\n // this.swiperInstance = this.swiperRef.nativeElement.swiper;\n // console.log(\"Log ~ NxsCarouselComponent ~ ngAfterViewInit ~ this.swiperInstance:\", this.swiperInstance);\n // console.log('thi.contents', this.contents);\n // this.initSlides();\n await MainHelpers.waitForBoolValueSeconds(() => !!this.swiperRef?.nativeElement, 15, 200);\n // this.createSlider(true);\n this.log('swiperRef', this.swiperRef?.nativeElement);\n this.log('options', this.options);\n if (!this.swiperRef?.nativeElement) {\n return;\n }\n Object.assign(this.swiperRef.nativeElement, this.options);\n this.swiperRef.nativeElement?.initialize();\n this.swiperInstance = this.swiperRef?.nativeElement?.swiper;\n this.onSwiper();\n\n }\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 = {\n nxsShowNavigationBullets: true, loop: true, nxsThumbnails: { show: true }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: true,\n lazy: this.lazy,\n };\n }\n else if (!options) {\n options = {\n nxsShowNavigationBullets: true, loop: true,\n nxsThumbnails: { show: false }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: false, nxsCarouselDialogOptions: {},\n lazy: this.lazy,\n };\n }\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 (!options.nxsThumbnails)\n options.nxsThumbnails = { show: false };\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\n if (typeof options.lazy === 'undefined')\n options.lazy = true;\n\n if (typeof options.navigation === 'undefined')\n options.navigation = true;\n if (typeof options.pagination === 'undefined')\n options.pagination = { clickable: true };\n\n if (options.nxsShowNavigationBullets === false) {\n options.pagination = false;\n }\n // console.log(\"Log ~ file: nxs-carousel.component.ts ~ line 272 ~ NxsCarouselComponent ~ setDefaultOptions ~ options\", options);\n\n return options;\n }\n\n private setThumbnailsOptions() {\n if (!!this.options?.nxsThumbnails?.show) {\n this.thumbnailsOptions = {\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 if (this.lazy) {\n // Disable preloading of all images\n // this.thumbnailsOptions.preloadImages = false;\n // Enable lazy loading\n this.thumbnailsOptions.lazy = true;\n }\n // console.log(\"Log ~ file: nxs-carousel.component.ts ~ line 184 ~ NxsCarouselComponent ~ setThumbnailsOptions ~ this.thumbnailsOptions.lazy\", this.thumbnailsOptions.lazy);\n\n // this.thumbnailsSliderInstance = new Swiper(this.nxsThumbnailsSliderContainer.nativeElement, thumbnailsOptions);\n // this.options.thumbs = { swiper: this.thumbnailsSliderInstance };\n }\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 // CarouselEvents.openCarouselDialog?.emit({\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 goToSlide(index: number, speed?: number) {\n this.swiperInstance?.slideTo(index, speed);\n }\n next() {\n this.swiperInstance?.slideNext();\n }\n previous() {\n this.swiperInstance?.slidePrev();\n }\n onSwiperThumbnails(instance: Swiper) {\n if (this.options?.nxsThumbnails?.show)\n this.thumbnailsSwiperInstance = instance;\n else\n this.thumbnailsSwiperInstance = null;\n\n // if (this.options?.nxsThumbnails?.show) {\n // const optionsClone = MainHelpers.cloneObject(this.options);\n // optionsClone.thumbs = { swiper: this.thumbnailsSwiperInstance };\n // // this.options = optionsClone;\n // // this.options = { ...this.options, thumbs: { swiper: this.thumbnailsSwiperInstance } };\n // console.log(\"Log ~ file: nxs-carousel.component.ts ~ line 416 ~ NxsCarouselComponent ~ onSwiperThumbnails ~ this.options \", this.options);\n // this.options.thumbs = { swiper: this.thumbnailsSwiperInstance };\n // }\n }\n\n timeoutIds: number[] = [];\n private getSlidesCount(): number {\n if (!this.swiperInstance?.slides?.length) {\n return 0;\n }\n //TODO: gérer le loop ici\n // if (this.swiperInstance?.lo) {\n // return (this.swiperInstance?.slides?.length || 0) - 2;\n // }\n\n // const isLoopActive = !!this.swiperInstance?.params?.loop;\n // if (isLoopActive) {\n // return (this.swiperInstance?.slides?.length || 0) - (this.swiperInstance?.loopedSlides || 0) * 2;\n // }\n\n return this.swiperInstance?.slides?.length || 0;\n }\n\n private onSwiper() {\n this.log('swiper ready - instance', this.swiperInstance);\n\n if (!this.isBrowser) {\n this.log('not browser - return');\n return;\n }\n // this.swiperInstance = instance;\n this.swiperInstance?.on('click', (swiperInstance, evt) => {\n // console.log(\"Log ~ file: nxs-carousel.component.ts ~ line 392 ~ NxsCarouselComponent ~ this.swiperInstance.on ~ evt\", evt);\n const target = evt.target as HTMLElement;\n // console.log(\"Log ~ NxsCarouselComponent ~ onSwiper ~ target:\", target);\n if (target.className.indexOf('nxs-carousel-button') !== -1 || target.className.indexOf('swiper-pagination') !== -1\n || target.className.indexOf('swiper-button-next') !== -1 || target.className.indexOf('swiper-button-prev') !== -1\n || target.tagName === 'SWIPER-CONTAINER') {\n return;\n }\n this.runInZone(() => {\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 const tId = setTimeout(() => {\n this.slidesCount = this.getSlidesCount();\n });\n this.timeoutIds.push(tId);\n\n\n this.swiperInstance?.on('slideChange', () => {\n this.onSlideChange([this.swiperInstance]);\n });\n this.swiperReady = true;\n\n // $('.swiper-container').on('keydown keyup', function(e){\n // if (e.keyCode==9) $('.swiper-container')[0].scrollLeft = 0;\n // })\n // console.log(\"Log ~ file: nxs-carousel.component.ts:254 ~ NxsCarouselComponent ~ this.swiperInstance.el.addEventListener ~ this.swiperInstance.el:\", this.swiperInstance.el);\n\n // this.swiperInstance.el.addEventListener('keydown', (evt) => {\n\n // if (evt.keyCode === 9) {\n // // evt.preventDefault();\n // // this.swiperInstance.el.scrollLeft = 0;\n\n // // this.swiperInstance.el.querySelectorAll('.swiper-wrapper')[0].scrollLeft = 0;\n // // $('.swiper-container')[0].scrollLeft = 0;\n // }\n // });\n // document.querySelectorAll()\n }\n\n private runOutZone<T extends (...args: any[]) => void>(callback: T, ...args: any[]) {\n if (!this.zone) {\n callback(args);\n }\n return this.zone.runOutsideAngular(() => callback(args));\n }\n private runInZone<T extends (...args: any[]) => void>(callback: T, ...args: any[]) {\n if (!this.zone) {\n callback(args);\n }\n return this.zone.run(() => callback(args));\n }\n\n private onSlideChange(instances: Swiper[]) {\n if (!this.swiperReady) {\n return;\n }\n if (!this.swiperInstance && instances?.length) {\n this.swiperInstance = instances[0];\n }\n // console.log(\"Log ~ file: nxs-carousel.component.ts:252 ~ NxsCarouselComponent ~ onSlideChange ~ instances:\", instances);\n // this.swiperInstance = instance;\n // this.log('slide change - instance', instance);\n this.runInZone(() => {\n this.currentSlide = this.swiperInstance?.realIndex || 0;\n // console.log(\"Log ~ file: nxs-carousel.component.ts:256 ~ NxsCarouselComponent ~ this.runInZone ~ this.swiperInstance?.realIndex:\", this.swiperInstance);\n this.log('slide change - currentSlide', this.currentSlide);\n this.slideChange.next(this.currentSlide);\n });\n }\n}\n","<div *ngIf=\"options\"\n [ngClass]=\"{'swiper-container':true,'nxs-slider-with-thumbnails':!!options.nxsThumbnails && options.nxsThumbnails.show}\"\n [style.height]=\"getMainSliderHeight()\">\n <swiper-container init=\"false\" #swiperRef>\n @if(hasHtmlContent){\n @for( slide of contents; track $index){\n <swiper-slide>\n <ng-template [ngTemplateOutlet]=\"slide\" [ngTemplateOutletContext]=\"{\n $implicit: slide\n }\"></ng-template>\n </swiper-slide>\n }\n }@else if(images?.length){\n @for( slideImage of images; track $index){\n <swiper-slide>\n <img [ngClass]=\"{'nxs-image-slide':true,'swiper-lazy':lazy}\" [attr.loading]=\"lazy ? 'lazy' : null\"\n [src]=\"slideImage.src\" [attr.alt]=\"slideImage.alt\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </swiper-slide>\n }\n }\n </swiper-container>\n <!-- <swiper [config]=\"options\" (swiper)=\"onSwiper($event)\" (slideChange)=\"onSlideChange($event)\"\n [thumbs]=\"{ swiper: thumbnailsSwiperInstance }\">\n <ng-container *ngIf=\"hasHtmlContent\">\n <ng-template *ngFor=\"let slide of contents\" swiperSlide>\n <swiper-slide>\n <ng-template [ngTemplateOutlet]=\"slide\" [ngTemplateOutletContext]=\"{\n $implicit: slide\n }\"></ng-template>\n </swiper-slide>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!hasHtmlContent && images?.length\">\n <ng-template swiperSlide *ngFor=\"let slideImage of images\">\n <img [ngClass]=\"{'nxs-image-slide':true,'swiper-lazy':lazy}\" [attr.loading]=\"lazy ? 'lazy' : null\"\n [src]=\"slideImage.src\" [attr.alt]=\"slideImage.alt\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </ng-template>\n </ng-container>\n </swiper> -->\n @if(options?.nxsShowImagesCount){\n <div class=\"nxs-image-counter\">\n {{currentSlide+1}} / {{slidesCount}}\n </div>\n }\n</div>\n\n<!-- <div *ngIf=\"thumbnailsOptions && images?.length\"\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 <swiper [config]=\"thumbnailsOptions\" (swiper)=\"onSwiperThumbnails($event)\">\n <ng-template swiperSlide *ngFor=\"let slideImage of images\">\n <img [ngClass]=\"{'nxs-image-slide':true,'swiper-lazy':lazy}\" [attr.data-src]=\"lazy ? slideImage.src : null\"\n [src]=\"lazy ? null : slideImage.src\" [attr.alt]=\"slideImage.alt\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </ng-template>\n </swiper>\n</div> -->","// export * from './lib/nxs-carousel/nxs-carousel.component';\n// export * from './lib/nxs-carousel/nxs-carousel.module';\n// export * from './lib/nxs-carousel/nxs-carousel-types';\nexport * from './nxs-carousel/nxs-carousel.component';\nexport * from './nxs-carousel/nxs-carousel-types';\nexport * from './nxs-carousel/swiper-directives';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAMa,0BAA0B,CAAA;uGAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EA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AAC,WAAW;gBAMtB,WAAW,EAAA,CAAA;sBADV;gBAID,UAAU,EAAA,CAAA;sBADT;;;AEjEL;AACA;AACA;;ACFA;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { SwiperOptions } from "swiper/types";
2
- import { NxsCarouselImage } from "../common-types";
2
+ import { InjectionToken } from "@angular/core";
3
3
  export interface NxsCarouselOptionsLazy extends SwiperOptions {
4
4
  lazy?: boolean;
5
5
  }
@@ -37,4 +37,12 @@ export interface NxsCarouselDialogData {
37
37
  options?: NxsCarouselOptions;
38
38
  wrapperClass?: string;
39
39
  }
40
+ export interface NxsCarouselImage {
41
+ alt?: string;
42
+ src: string;
43
+ }
44
+ export declare class NxsCarouselModuleConfig {
45
+ debug?: boolean;
46
+ }
47
+ export declare const NxsCarouselOptionsToken: InjectionToken<NxsCarouselModuleConfig>;
40
48
  //# sourceMappingURL=nxs-carousel-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nxs-carousel-types.d.ts","sourceRoot":"","sources":["../../lib/nxs-carousel/nxs-carousel-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IACzD,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AACD,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;IAC9D,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,aAAa,CAAC,EAAE;QACZ,IAAI,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE;YAC3F,CAAC,IAAI,EAAE,MAAM,GAAG;gBACZ,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;aAClC,CAAC;SACL,CAAC;KACL,CAAC;IACF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,wBAAwB,CAAC,EAAE,kBAAkB,CAAC;IAC9C,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,qBAAqB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;KAAE,CAAC;CAC9D;AAGD,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD,MAAM,WAAW,gBAAgB;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACf;AACD,qBAAa,uBAAuB;IAChC,KAAK,CAAC,EAAE,OAAO,CAAS;CAC3B;AAED,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAAC,uBAAuB,CAA0E,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter, NgZone, TemplateRef, ElementRef } from '@angular/core';
2
2
  import { NxsCarouselOptions, NxsCarouselOptionsLazy } from './nxs-carousel-types';
3
3
  import { MatDialog } from '@angular/material/dialog';
4
- import { NxsCarouselImage, NxsCarouselModuleConfig } from '../common-types';
4
+ import { NxsCarouselImage, NxsCarouselModuleConfig } from './nxs-carousel-types';
5
5
  import { Swiper } from 'swiper/types';
6
6
  import { SwiperContainer } from 'swiper/element';
7
7
  import * as i0 from "@angular/core";
@@ -28,8 +28,9 @@ export declare class NxsCarouselComponent {
28
28
  slideClick: EventEmitter<MouseEvent | TouchEvent | PointerEvent>;
29
29
  isBrowser: boolean;
30
30
  static openDialogSubscribed: boolean;
31
+ static instanceCount: number;
32
+ instanceId: number;
31
33
  constructor(matDialog: MatDialog, zone: NgZone, platformId: any, config?: NxsCarouselModuleConfig);
32
- static subscribeToOpenDialog(matDialog: MatDialog): void;
33
34
  private log;
34
35
  private destroy;
35
36
  ngOnDestroy(): void;
@@ -38,7 +39,6 @@ export declare class NxsCarouselComponent {
38
39
  getMainSliderHeight(): string;
39
40
  private setDefaultOptions;
40
41
  private setThumbnailsOptions;
41
- showFullScreenCarousel(images: NxsCarouselImage[], wrapperClass?: string): void;
42
42
  goToSlide(index: number, speed?: number): void;
43
43
  next(): void;
44
44
  previous(): void;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nxs-carousel.component.d.ts","sourceRoot":"","sources":["../../lib/nxs-carousel/nxs-carousel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0D,YAAY,EAAiC,MAAM,EAAmB,WAAW,EAA0C,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9N,OAAO,EAAyB,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACzG,OAAO,EAAE,SAAS,EAAmB,MAAM,0BAA0B,CAAC;AAQtE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAA2B,MAAM,sBAAsB,CAAC;AAK1G,OAAO,EAAE,MAAM,EAAiB,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;;AAKjD,qBAca,oBAAoB;IAqCzB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,IAAI;IACS,OAAO,CAAC,UAAU;IACM,OAAO,CAAC,MAAM,CAAC;IAvChE,OAAO,CAAC,WAAW,CAAS;IAE5B,QAAQ,EAAG,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC;IAEtC,IAAI,UAAQ;IACZ,OAAO,CAAC,eAAe,CAAyB;IAGzC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAClC,OAAO,EAAE,kBAAkB,CAAQ;IACn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