nextalys-carousel 0.0.68 → 0.0.69
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/esm2022/common-types.mjs +4 -0
- package/esm2022/lib/nxs-carousel/common-types.mjs +4 -0
- package/esm2022/lib/nxs-carousel/nxs-carousel/carousel-events.mjs +5 -0
- package/{esm2020 → esm2022}/lib/nxs-carousel/nxs-carousel/nxs-carousel-dialog.component.mjs +11 -9
- package/esm2022/lib/nxs-carousel/nxs-carousel/nxs-carousel.component.mjs +288 -0
- package/esm2022/lib/nxs-carousel/nxs-carousel/nxs-carousel.module.mjs +75 -0
- package/{esm2020 → esm2022}/lib/nxs-carousel/nxs-carousel/swiper-directives.mjs +4 -4
- package/esm2022/lib/nxs-carousel-mock/common-types.mjs +4 -0
- package/esm2022/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.component.mjs +45 -0
- package/{esm2020 → esm2022}/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.module.mjs +7 -7
- package/{esm2020 → esm2022}/lib/nxs-carousel-mock/nxs-carousel-mock/swiper-directives.mjs +4 -4
- package/{fesm2015 → fesm2022}/nextalys-carousel-lib-nxs-carousel-mock.mjs +23 -24
- package/{fesm2020 → fesm2022}/nextalys-carousel-lib-nxs-carousel-mock.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/nextalys-carousel-lib-nxs-carousel.mjs +75 -53
- package/fesm2022/nextalys-carousel-lib-nxs-carousel.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/nextalys-carousel.mjs +3 -3
- package/{fesm2020 → fesm2022}/nextalys-carousel.mjs.map +1 -1
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel-dialog.component.d.ts +1 -1
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel.component.d.ts +2 -2
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel.component.d.ts.map +1 -1
- package/lib/nxs-carousel/nxs-carousel/swiper-directives.d.ts +1 -1
- package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.component.d.ts +1 -1
- package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-types.d.ts +1 -1
- package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-types.d.ts.map +1 -1
- package/lib/nxs-carousel-mock/nxs-carousel-mock/swiper-directives.d.ts +1 -1
- package/package.json +11 -21
- package/esm2020/common-types.mjs +0 -6
- package/esm2020/lib/nxs-carousel/common-types.mjs +0 -6
- package/esm2020/lib/nxs-carousel/nxs-carousel/carousel-events.mjs +0 -5
- package/esm2020/lib/nxs-carousel/nxs-carousel/nxs-carousel.component.mjs +0 -266
- package/esm2020/lib/nxs-carousel/nxs-carousel/nxs-carousel.module.mjs +0 -75
- package/esm2020/lib/nxs-carousel-mock/common-types.mjs +0 -6
- package/esm2020/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.component.mjs +0 -44
- package/fesm2015/nextalys-carousel-lib-nxs-carousel-mock.mjs.map +0 -1
- package/fesm2015/nextalys-carousel-lib-nxs-carousel.mjs +0 -412
- package/fesm2015/nextalys-carousel-lib-nxs-carousel.mjs.map +0 -1
- package/fesm2015/nextalys-carousel.mjs.map +0 -1
- package/fesm2020/nextalys-carousel-lib-nxs-carousel-mock.mjs +0 -101
- package/fesm2020/nextalys-carousel-lib-nxs-carousel.mjs.map +0 -1
- package/fesm2020/nextalys-carousel.mjs +0 -14
- /package/{esm2020 → esm2022}/lib/nxs-carousel/nextalys-carousel-lib-nxs-carousel.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/nxs-carousel/nxs-carousel/nxs-carousel-types.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/nxs-carousel/public-api-carousel.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/nxs-carousel-mock/nextalys-carousel-lib-nxs-carousel-mock.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-types.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/nxs-carousel-mock/public-api-carousel-mock.mjs +0 -0
- /package/{esm2020 → esm2022}/nextalys-carousel.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { NxsCarouselDialogComponent } from './nxs-carousel-dialog.component';
|
|
4
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
5
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
-
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
7
|
-
import { NxsCarouselComponent } from './nxs-carousel.component';
|
|
8
|
-
import { SwiperModule } from 'swiper/angular';
|
|
9
|
-
import { NxsSwiperTemplateDirective } from './swiper-directives';
|
|
10
|
-
import { NxsCarouselModuleConfig } from '../common-types';
|
|
11
|
-
import { CarouselEvents } from './carousel-events';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "@angular/material/dialog";
|
|
14
|
-
export class NxsCarouselModule {
|
|
15
|
-
constructor(matDialog) {
|
|
16
|
-
NxsCarouselModule.subscribeToOpenDialog(matDialog);
|
|
17
|
-
}
|
|
18
|
-
static subscribeToOpenDialog(matDialog) {
|
|
19
|
-
if (this.openDialogSubscribed) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
this.openDialogSubscribed = true;
|
|
23
|
-
CarouselEvents.openCarouselDialog.subscribe((data) => {
|
|
24
|
-
if (NxsCarouselDialogComponent.dialogOpened) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
matDialog.open(NxsCarouselDialogComponent, data);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
static forRoot(config) {
|
|
31
|
-
return {
|
|
32
|
-
ngModule: NxsCarouselModule,
|
|
33
|
-
providers: [
|
|
34
|
-
{ provide: NxsCarouselModuleConfig, useValue: config },
|
|
35
|
-
],
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
NxsCarouselModule.openDialogSubscribed = false;
|
|
40
|
-
NxsCarouselModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselModule, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
41
|
-
NxsCarouselModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselModule, declarations: [NxsCarouselComponent,
|
|
42
|
-
NxsCarouselDialogComponent,
|
|
43
|
-
NxsSwiperTemplateDirective], imports: [CommonModule,
|
|
44
|
-
MatIconModule,
|
|
45
|
-
MatButtonModule,
|
|
46
|
-
MatDialogModule,
|
|
47
|
-
SwiperModule], exports: [NxsCarouselComponent,
|
|
48
|
-
NxsSwiperTemplateDirective] });
|
|
49
|
-
NxsCarouselModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselModule, imports: [CommonModule,
|
|
50
|
-
MatIconModule,
|
|
51
|
-
MatButtonModule,
|
|
52
|
-
MatDialogModule,
|
|
53
|
-
SwiperModule] });
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselModule, decorators: [{
|
|
55
|
-
type: NgModule,
|
|
56
|
-
args: [{
|
|
57
|
-
declarations: [
|
|
58
|
-
NxsCarouselComponent,
|
|
59
|
-
NxsCarouselDialogComponent,
|
|
60
|
-
NxsSwiperTemplateDirective,
|
|
61
|
-
],
|
|
62
|
-
imports: [
|
|
63
|
-
CommonModule,
|
|
64
|
-
MatIconModule,
|
|
65
|
-
MatButtonModule,
|
|
66
|
-
MatDialogModule,
|
|
67
|
-
SwiperModule,
|
|
68
|
-
],
|
|
69
|
-
exports: [
|
|
70
|
-
NxsCarouselComponent,
|
|
71
|
-
NxsSwiperTemplateDirective,
|
|
72
|
-
],
|
|
73
|
-
}]
|
|
74
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnhzLWNhcm91c2VsLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYi9ueHMtY2Fyb3VzZWwvbnhzLWNhcm91c2VsLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUF1QixNQUFNLGVBQWUsQ0FBQztBQUM5RCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLDBCQUEwQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDN0UsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzNELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUN2RCxPQUFPLEVBQUUsU0FBUyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ3RFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ2hFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUM5QyxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUNqRSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7OztBQW9CbkQsTUFBTSxPQUFPLGlCQUFpQjtJQUUxQixZQUNJLFNBQW9C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AgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLm9wZW5EaWFsb2dTdWJzY3JpYmVkID0gdHJ1ZTtcbiAgICAgICAgQ2Fyb3VzZWxFdmVudHMub3BlbkNhcm91c2VsRGlhbG9nLnN1YnNjcmliZSgoZGF0YSkgPT4ge1xuICAgICAgICAgICAgaWYgKE54c0Nhcm91c2VsRGlhbG9nQ29tcG9uZW50LmRpYWxvZ09wZW5lZCkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG1hdERpYWxvZy5vcGVuKE54c0Nhcm91c2VsRGlhbG9nQ29tcG9uZW50LCBkYXRhKTtcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIHB1YmxpYyBzdGF0aWMgZm9yUm9vdChjb25maWc/OiBOeHNDYXJvdXNlbE1vZHVsZUNvbmZpZyk6IE1vZHVsZVdpdGhQcm92aWRlcnM8TnhzQ2Fyb3VzZWxNb2R1bGU+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIG5nTW9kdWxlOiBOeHNDYXJvdXNlbE1vZHVsZSxcbiAgICAgICAgICAgIHByb3ZpZGVyczogW1xuICAgICAgICAgICAgICAgIHsgcHJvdmlkZTogTnhzQ2Fyb3VzZWxNb2R1bGVDb25maWcsIHVzZVZhbHVlOiBjb25maWcgfSxcbiAgICAgICAgICAgIF0sXG4gICAgICAgIH07XG4gICAgfVxufSJdfQ==
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export class NxsCarouselModuleConfig {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.debug = false;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLXR5cGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vbGliL2NvbW1vbi10eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLQSxNQUFNLE9BQU8sdUJBQXVCO0lBQXBDO1FBQ0ksVUFBSyxHQUFhLEtBQUssQ0FBQztJQUM1QixDQUFDO0NBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJcbmV4cG9ydCBpbnRlcmZhY2UgTnhzQ2Fyb3VzZWxJbWFnZSB7XG4gICAgYWx0Pzogc3RyaW5nO1xuICAgIHNyYzogc3RyaW5nO1xufVxuZXhwb3J0IGNsYXNzIE54c0Nhcm91c2VsTW9kdWxlQ29uZmlnIHtcbiAgICBkZWJ1Zz86IGJvb2xlYW4gPSBmYWxzZTtcbn0iXX0=
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Component, ViewEncapsulation, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class NxsCarouselComponent {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.lazy = true;
|
|
6
|
-
this.options = null;
|
|
7
|
-
this.hasHtmlContent = false;
|
|
8
|
-
this.slidesCount = 0;
|
|
9
|
-
this.slideChange = new EventEmitter();
|
|
10
|
-
this.currentSlide = 0;
|
|
11
|
-
this.slideClick = new EventEmitter();
|
|
12
|
-
this.isBrowser = false;
|
|
13
|
-
}
|
|
14
|
-
goToSlide(index, speed) {
|
|
15
|
-
}
|
|
16
|
-
next() {
|
|
17
|
-
}
|
|
18
|
-
previous() {
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
NxsCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
NxsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: NxsCarouselComponent, selector: "nxs-carousel", inputs: { lazy: "lazy", images: "images", options: "options", hasHtmlContent: "hasHtmlContent" }, outputs: { slideChange: "slideChange", slideClick: "slideClick" }, ngImport: i0, template: '<div style="height:70px;width:100%;"></div>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselComponent, decorators: [{
|
|
24
|
-
type: Component,
|
|
25
|
-
args: [{
|
|
26
|
-
selector: 'nxs-carousel',
|
|
27
|
-
template: '<div style="height:70px;width:100%;"></div>',
|
|
28
|
-
// styleUrls: ['./nxs-carousel.component.scss'],
|
|
29
|
-
encapsulation: ViewEncapsulation.None,
|
|
30
|
-
}]
|
|
31
|
-
}], ctorParameters: function () { return []; }, propDecorators: { lazy: [{
|
|
32
|
-
type: Input
|
|
33
|
-
}], images: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}], options: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}], hasHtmlContent: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}], slideChange: [{
|
|
40
|
-
type: Output
|
|
41
|
-
}], slideClick: [{
|
|
42
|
-
type: Output
|
|
43
|
-
}] } });
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnhzLWNhcm91c2VsLW1vY2suY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGliL254cy1jYXJvdXNlbC1tb2NrL254cy1jYXJvdXNlbC1tb2NrLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLGlCQUFpQixFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQVMxRixNQUFNLE9BQU8sb0JBQW9CO0lBaUI3QjtRQWZBLFNBQUksR0FBRyxJQUFJLENBQUM7UUFJWixZQUFPLEdBQXVCLElBQUks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SB7XG4gICAgfVxufVxuIl19
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextalys-carousel-lib-nxs-carousel-mock.mjs","sources":["../../lib/nxs-carousel-mock/nxs-carousel-mock.component.ts","../../lib/common-types.ts","../../lib/nxs-carousel-mock/swiper-directives.ts","../../lib/nxs-carousel-mock/nxs-carousel-mock.module.ts","../../lib/nextalys-carousel-lib-nxs-carousel-mock.ts"],"sourcesContent":["import { Component, ViewEncapsulation, Input, Output, EventEmitter } from '@angular/core';\nimport { NxsCarouselImage } from '../common-types';\nimport { NxsCarouselOptions } from './nxs-carousel-types';\n@Component({\n selector: 'nxs-carousel',\n template: '<div style=\"height:70px;width:100%;\"></div>',\n // styleUrls: ['./nxs-carousel.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class NxsCarouselComponent {\n @Input()\n lazy = true;\n @Input()\n public images: NxsCarouselImage[];\n @Input()\n options: NxsCarouselOptions = null;\n @Input()\n hasHtmlContent = false;\n slidesCount: number = 0;\n @Output()\n slideChange = new EventEmitter<number>();\n public currentSlide = 0;\n @Output()\n slideClick = new EventEmitter<MouseEvent | TouchEvent | PointerEvent>();\n isBrowser = false;\n\n constructor(\n ) {\n\n }\n goToSlide(index: number, speed?: number) {\n }\n next() {\n }\n previous() {\n }\n}\n","\nexport interface NxsCarouselImage {\n alt?: string;\n src: string;\n}\nexport class NxsCarouselModuleConfig {\n debug?: boolean = false;\n}","import { Directive } from \"@angular/core\";\n\n@Directive({\n selector: '[nxsSwiperTemplate]',\n})\nexport class NxsSwiperTemplateDirective { }\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { NxsCarouselModuleConfig } from '../common-types';\nimport { NxsCarouselComponent } from './nxs-carousel-mock.component';\nimport { NxsSwiperTemplateDirective } from './swiper-directives';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n declarations: [\n NxsCarouselComponent,\n NxsSwiperTemplateDirective,\n ],\n exports: [\n NxsCarouselComponent,\n NxsSwiperTemplateDirective,\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-carousel-mock';\n"],"names":[],"mappings":";;;;MASa,oBAAoB,CAAA;AAiB7B,IAAA,WAAA,GAAA;AAfA,QAAA,IAAI,CAAA,IAAA,GAAG,IAAI,CAAC;AAIZ,QAAA,IAAO,CAAA,OAAA,GAAuB,IAAI,CAAC;AAEnC,QAAA,IAAc,CAAA,cAAA,GAAG,KAAK,CAAC;AACvB,QAAA,IAAW,CAAA,WAAA,GAAW,CAAC,CAAC;AAExB,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAU,CAAC;AAClC,QAAA,IAAY,CAAA,YAAA,GAAG,CAAC,CAAC;AAExB,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAA0C,CAAC;AACxE,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;KAKjB;IACD,SAAS,CAAC,KAAa,EAAE,KAAc,EAAA;KACtC;IACD,IAAI,GAAA;KACH;IACD,QAAQ,GAAA;KACP;;iHA1BQ,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,yNAJnB,6CAA6C,EAAA,QAAA,EAAA,IAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;2FAI9C,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS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UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,iBARtB,oBAAoB;QACpB,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAJ1B,YAAY,CAAA,EAAA,OAAA,EAAA,CAOZ,oBAAoB;QACpB,0BAA0B,CAAA,EAAA,CAAA,CAAA;AAGrB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAXtB,YAAY,CAAA,EAAA,CAAA,CAAA;2FAWP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAb7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;AACf,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,oBAAoB;wBACpB,0BAA0B;AAC7B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,oBAAoB;wBACpB,0BAA0B;AAC7B,qBAAA;iBACJ,CAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -1,412 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, EventEmitter, PLATFORM_ID, TemplateRef, Component, ViewEncapsulation, Inject, Optional, ContentChildren, ViewChild, Input, Output, NgModule } from '@angular/core';
|
|
3
|
-
import * as i3 from '@angular/common';
|
|
4
|
-
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
5
|
-
import { EventsCollector } from 'nextalys-js-helpers/dist/events';
|
|
6
|
-
import SwiperCore, { Navigation, Pagination, Autoplay, Lazy, Thumbs } from 'swiper';
|
|
7
|
-
import { NxsEvent } from 'nextalys-js-helpers';
|
|
8
|
-
import * as i1 from '@angular/material/dialog';
|
|
9
|
-
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
10
|
-
import * as i4 from 'swiper/angular';
|
|
11
|
-
import { SwiperModule } from 'swiper/angular';
|
|
12
|
-
import * as i2 from '@angular/material/icon';
|
|
13
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
14
|
-
import * as i3$1 from '@angular/material/button';
|
|
15
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
16
|
-
|
|
17
|
-
class NxsSwiperTemplateDirective {
|
|
18
|
-
}
|
|
19
|
-
NxsSwiperTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsSwiperTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
-
NxsSwiperTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.5", type: NxsSwiperTemplateDirective, selector: "[nxsSwiperTemplate]", ngImport: i0 });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsSwiperTemplateDirective, decorators: [{
|
|
22
|
-
type: Directive,
|
|
23
|
-
args: [{
|
|
24
|
-
selector: '[nxsSwiperTemplate]',
|
|
25
|
-
}]
|
|
26
|
-
}] });
|
|
27
|
-
|
|
28
|
-
class CarouselEvents {
|
|
29
|
-
}
|
|
30
|
-
CarouselEvents.openCarouselDialog = new NxsEvent();
|
|
31
|
-
|
|
32
|
-
class NxsCarouselModuleConfig {
|
|
33
|
-
constructor() {
|
|
34
|
-
this.debug = false;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// install Swiper modules
|
|
39
|
-
SwiperCore.use([Navigation, Pagination, Autoplay, Lazy, Thumbs]);
|
|
40
|
-
class NxsCarouselComponent {
|
|
41
|
-
constructor(matDialog, zone, platformId, config) {
|
|
42
|
-
this.matDialog = matDialog;
|
|
43
|
-
this.zone = zone;
|
|
44
|
-
this.platformId = platformId;
|
|
45
|
-
this.config = config;
|
|
46
|
-
this.swiperReady = false;
|
|
47
|
-
this.lazy = true;
|
|
48
|
-
this.eventsCollector = new EventsCollector();
|
|
49
|
-
this.options = null;
|
|
50
|
-
this.thumbnailsOptions = null;
|
|
51
|
-
this.hasHtmlContent = false;
|
|
52
|
-
this.slidesCount = 0;
|
|
53
|
-
this.slideChange = new EventEmitter();
|
|
54
|
-
this.currentSlide = 0;
|
|
55
|
-
this.slideClick = new EventEmitter();
|
|
56
|
-
this.isBrowser = false;
|
|
57
|
-
if (!this.config)
|
|
58
|
-
this.config = { debug: false };
|
|
59
|
-
this.isBrowser = isPlatformBrowser(this.platformId);
|
|
60
|
-
this.log('constructor - isBrowser', this.isBrowser);
|
|
61
|
-
this.options = this.setDefaultOptions(undefined, false);
|
|
62
|
-
}
|
|
63
|
-
set setOptions(val) {
|
|
64
|
-
this.options = this.setDefaultOptions(val, false);
|
|
65
|
-
this.setThumbnailsOptions();
|
|
66
|
-
}
|
|
67
|
-
log(...args) {
|
|
68
|
-
if (!this.config.debug)
|
|
69
|
-
return;
|
|
70
|
-
console.log('[NxsCarousel]', ...args);
|
|
71
|
-
}
|
|
72
|
-
destroy() {
|
|
73
|
-
var _a;
|
|
74
|
-
if (!this.isBrowser) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
(_a = this.eventsCollector) === null || _a === void 0 ? void 0 : _a.unsubscribeAll();
|
|
78
|
-
}
|
|
79
|
-
ngOnDestroy() {
|
|
80
|
-
this.destroy();
|
|
81
|
-
}
|
|
82
|
-
ngAfterViewInit() {
|
|
83
|
-
// console.log('thi.contents', this.contents);
|
|
84
|
-
// this.initSlides();
|
|
85
|
-
// this.createSlider(true);
|
|
86
|
-
}
|
|
87
|
-
getMainSliderHeight() {
|
|
88
|
-
if (!this.options)
|
|
89
|
-
return '';
|
|
90
|
-
if (this.options.nxsThumbnails && this.options.nxsThumbnails.show) {
|
|
91
|
-
if (this.options.nxsThumbnails.onMainSlider) {
|
|
92
|
-
return '100%';
|
|
93
|
-
}
|
|
94
|
-
else if (this.options.nxsThumbnails.percentHeight) {
|
|
95
|
-
return (100 - this.options.nxsThumbnails.percentHeight) + '%';
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return '';
|
|
99
|
-
}
|
|
100
|
-
setDefaultOptions(options, forDialog) {
|
|
101
|
-
var _a;
|
|
102
|
-
if (!options && forDialog) {
|
|
103
|
-
options = {
|
|
104
|
-
nxsShowNavigationBullets: true, loop: true, nxsThumbnails: { show: true }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: true,
|
|
105
|
-
lazy: this.lazy,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
else if (!options) {
|
|
109
|
-
options = {
|
|
110
|
-
nxsShowNavigationBullets: true, loop: true,
|
|
111
|
-
nxsThumbnails: { show: false }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: false, nxsCarouselDialogOptions: {},
|
|
112
|
-
lazy: this.lazy,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
if (options.nxsCarouselDialogOptions) {
|
|
116
|
-
if (typeof options.nxsCarouselDialogOptions.nxsThumbnails === 'undefined')
|
|
117
|
-
options.nxsCarouselDialogOptions.nxsThumbnails = { show: false };
|
|
118
|
-
if (typeof options.nxsCarouselDialogOptions.effect === 'undefined')
|
|
119
|
-
options.nxsCarouselDialogOptions.effect = 'slide';
|
|
120
|
-
if (typeof options.nxsCarouselDialogOptions.nxsShowNavigationArrows === 'undefined')
|
|
121
|
-
options.nxsCarouselDialogOptions.nxsShowNavigationArrows = true;
|
|
122
|
-
if (!!((_a = options.nxsCarouselDialogOptions.nxsThumbnails) === null || _a === void 0 ? void 0 : _a.show)) {
|
|
123
|
-
if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight === 'undefined')
|
|
124
|
-
options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight = 20;
|
|
125
|
-
if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.perView === 'undefined')
|
|
126
|
-
options.nxsCarouselDialogOptions.nxsThumbnails.perView = 10;
|
|
127
|
-
options.nxsCarouselDialogOptions.nxsThumbnails.breakpoints = {
|
|
128
|
-
640: {
|
|
129
|
-
slidesPerView: 5,
|
|
130
|
-
},
|
|
131
|
-
768: {
|
|
132
|
-
slidesPerView: 7,
|
|
133
|
-
},
|
|
134
|
-
1024: {
|
|
135
|
-
slidesPerView: 8,
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (!options.nxsThumbnails)
|
|
141
|
-
options.nxsThumbnails = { show: false };
|
|
142
|
-
if (options.nxsThumbnails.show && typeof options.nxsThumbnails.percentHeight === 'undefined')
|
|
143
|
-
options.nxsThumbnails.percentHeight = 20;
|
|
144
|
-
if (options.nxsThumbnails.show && typeof options.nxsThumbnails.perView === 'undefined')
|
|
145
|
-
options.nxsThumbnails.perView = 10;
|
|
146
|
-
if (forDialog)
|
|
147
|
-
options.nxsfullscreenOnClick = false;
|
|
148
|
-
if (options.nxsThumbnails.onMainSlider)
|
|
149
|
-
options.nxsShowNavigationBullets = false;
|
|
150
|
-
if (typeof options.lazy === 'undefined')
|
|
151
|
-
options.lazy = true;
|
|
152
|
-
if (typeof options.navigation === 'undefined')
|
|
153
|
-
options.navigation = true;
|
|
154
|
-
if (typeof options.pagination === 'undefined')
|
|
155
|
-
options.pagination = { clickable: true };
|
|
156
|
-
if (options.nxsShowNavigationBullets === false) {
|
|
157
|
-
options.pagination = false;
|
|
158
|
-
}
|
|
159
|
-
// console.log("Log ~ file: nxs-carousel.component.ts ~ line 272 ~ NxsCarouselComponent ~ setDefaultOptions ~ options", options);
|
|
160
|
-
return options;
|
|
161
|
-
}
|
|
162
|
-
setThumbnailsOptions() {
|
|
163
|
-
var _a, _b;
|
|
164
|
-
if (!!((_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.nxsThumbnails) === null || _b === void 0 ? void 0 : _b.show)) {
|
|
165
|
-
this.thumbnailsOptions = {
|
|
166
|
-
slidesPerView: this.options.nxsThumbnails.perView,
|
|
167
|
-
loop: false,
|
|
168
|
-
freeMode: true,
|
|
169
|
-
// watchSlidesVisibility: true,
|
|
170
|
-
watchSlidesProgress: true,
|
|
171
|
-
breakpoints: this.options.nxsThumbnails.breakpoints,
|
|
172
|
-
// spaceBetween: 10,
|
|
173
|
-
};
|
|
174
|
-
if (this.lazy) {
|
|
175
|
-
// Disable preloading of all images
|
|
176
|
-
this.thumbnailsOptions.preloadImages = false;
|
|
177
|
-
// Enable lazy loading
|
|
178
|
-
this.thumbnailsOptions.lazy = true;
|
|
179
|
-
}
|
|
180
|
-
// console.log("Log ~ file: nxs-carousel.component.ts ~ line 184 ~ NxsCarouselComponent ~ setThumbnailsOptions ~ this.thumbnailsOptions.lazy", this.thumbnailsOptions.lazy);
|
|
181
|
-
// this.thumbnailsSliderInstance = new Swiper(this.nxsThumbnailsSliderContainer.nativeElement, thumbnailsOptions);
|
|
182
|
-
// this.options.thumbs = { swiper: this.thumbnailsSliderInstance };
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
showFullScreenCarousel(images, wrapperClass) {
|
|
186
|
-
var _a;
|
|
187
|
-
this.options.nxsCarouselDialogOptions = this.setDefaultOptions(this.options.nxsCarouselDialogOptions, true);
|
|
188
|
-
const data = { images, wrapperClass, options: this.options.nxsCarouselDialogOptions };
|
|
189
|
-
(_a = CarouselEvents.openCarouselDialog) === null || _a === void 0 ? void 0 : _a.emit({
|
|
190
|
-
data,
|
|
191
|
-
panelClass: 'nxs-carousel-dialog',
|
|
192
|
-
width: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.width : undefined,
|
|
193
|
-
height: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.height : undefined,
|
|
194
|
-
disableClose: !this.options.nxsCarouselDialogExitable,
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
goToSlide(index, speed) {
|
|
198
|
-
var _a;
|
|
199
|
-
(_a = this.swiperInstance) === null || _a === void 0 ? void 0 : _a.slideTo(index, speed);
|
|
200
|
-
}
|
|
201
|
-
next() {
|
|
202
|
-
var _a;
|
|
203
|
-
(_a = this.swiperInstance) === null || _a === void 0 ? void 0 : _a.slideNext();
|
|
204
|
-
}
|
|
205
|
-
previous() {
|
|
206
|
-
var _a;
|
|
207
|
-
(_a = this.swiperInstance) === null || _a === void 0 ? void 0 : _a.slidePrev();
|
|
208
|
-
}
|
|
209
|
-
onSwiperThumbnails(instance) {
|
|
210
|
-
var _a, _b;
|
|
211
|
-
if ((_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.nxsThumbnails) === null || _b === void 0 ? void 0 : _b.show)
|
|
212
|
-
this.thumbnailsSwiperInstance = instance;
|
|
213
|
-
else
|
|
214
|
-
this.thumbnailsSwiperInstance = null;
|
|
215
|
-
// if (this.options?.nxsThumbnails?.show) {
|
|
216
|
-
// const optionsClone = MainHelpers.cloneObject(this.options);
|
|
217
|
-
// optionsClone.thumbs = { swiper: this.thumbnailsSwiperInstance };
|
|
218
|
-
// // this.options = optionsClone;
|
|
219
|
-
// // this.options = { ...this.options, thumbs: { swiper: this.thumbnailsSwiperInstance } };
|
|
220
|
-
// console.log("Log ~ file: nxs-carousel.component.ts ~ line 416 ~ NxsCarouselComponent ~ onSwiperThumbnails ~ this.options ", this.options);
|
|
221
|
-
// this.options.thumbs = { swiper: this.thumbnailsSwiperInstance };
|
|
222
|
-
// }
|
|
223
|
-
}
|
|
224
|
-
onSwiper(instance) {
|
|
225
|
-
this.log('swiper ready - instance', instance);
|
|
226
|
-
this.swiperInstance = instance;
|
|
227
|
-
this.swiperInstance.on('click', (swiperInstance, evt) => {
|
|
228
|
-
// console.log("Log ~ file: nxs-carousel.component.ts ~ line 392 ~ NxsCarouselComponent ~ this.swiperInstance.on ~ evt", evt);
|
|
229
|
-
const target = evt.target;
|
|
230
|
-
if (target.className.indexOf('nxs-carousel-button') !== -1 || target.className.indexOf('swiper-pagination') !== -1)
|
|
231
|
-
return;
|
|
232
|
-
this.runInZone(() => {
|
|
233
|
-
this.slideClick.next(evt);
|
|
234
|
-
if (this.options.nxsfullscreenOnClick && this.images && this.images.length && !this.hasHtmlContent) {
|
|
235
|
-
this.showFullScreenCarousel(this.images, 'fullscreen-carousel');
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
});
|
|
239
|
-
this.swiperReady = true;
|
|
240
|
-
}
|
|
241
|
-
runInZone(callback, ...args) {
|
|
242
|
-
if (!this.zone) {
|
|
243
|
-
callback(args);
|
|
244
|
-
}
|
|
245
|
-
return this.zone.run(() => callback(args));
|
|
246
|
-
}
|
|
247
|
-
onSlideChange(instances) {
|
|
248
|
-
if (!this.swiperReady) {
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
if (!this.swiperInstance && (instances === null || instances === void 0 ? void 0 : instances.length)) {
|
|
252
|
-
this.swiperInstance = instances[0];
|
|
253
|
-
}
|
|
254
|
-
// console.log("Log ~ file: nxs-carousel.component.ts:252 ~ NxsCarouselComponent ~ onSlideChange ~ instances:", instances);
|
|
255
|
-
// this.swiperInstance = instance;
|
|
256
|
-
// this.log('slide change - instance', instance);
|
|
257
|
-
this.runInZone(() => {
|
|
258
|
-
var _a;
|
|
259
|
-
this.currentSlide = ((_a = this.swiperInstance) === null || _a === void 0 ? void 0 : _a.realIndex) || 0;
|
|
260
|
-
// console.log("Log ~ file: nxs-carousel.component.ts:256 ~ NxsCarouselComponent ~ this.runInZone ~ this.swiperInstance?.realIndex:", this.swiperInstance);
|
|
261
|
-
this.log('slide change - currentSlide', this.currentSlide);
|
|
262
|
-
this.slideChange.next(this.currentSlide);
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
NxsCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselComponent, deps: [{ token: i1.MatDialog }, { token: i0.NgZone }, { token: PLATFORM_ID }, { token: NxsCarouselModuleConfig, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
267
|
-
NxsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: NxsCarouselComponent, 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: "swiperComponent", first: true, predicate: ["swiper"], 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 [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 <ng-template [ngTemplateOutlet]=\"slide\" [ngTemplateOutletContext]=\"{\n $implicit: slide\n }\"></ng-template>\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}\"\n [attr.data-src]=\"lazy ? slideImage.src : null\" [src]=\"lazy ? null : slideImage.src\"\n [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 <ng-container *ngIf=\"images && options.nxsShowImagesCount\">\n <div class=\"nxs-image-counter\">\n {{currentSlide+1}} / {{images.length}}\n </div>\n </ng-container>\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: ["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{height:100%}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%;-o-object-fit:cover;object-fit:cover;width:100%;-o-object-position:center;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: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.SwiperComponent, selector: "swiper, [swiper]", inputs: ["enabled", "on", "direction", "touchEventsTarget", "initialSlide", "speed", "cssMode", "updateOnWindowResize", "resizeObserver", "nested", "focusableElements", "width", "height", "preventInteractionOnTransition", "userAgent", "url", "edgeSwipeDetection", "edgeSwipeThreshold", "freeMode", "autoHeight", "setWrapperSize", "virtualTranslate", "effect", "breakpoints", "spaceBetween", "slidesPerView", "maxBackfaceHiddenSlides", "grid", "slidesPerGroup", "slidesPerGroupSkip", "centeredSlides", "centeredSlidesBounds", "slidesOffsetBefore", "slidesOffsetAfter", "normalizeSlideIndex", "centerInsufficientSlides", "watchOverflow", "roundLengths", "touchRatio", "touchAngle", "simulateTouch", "shortSwipes", "longSwipes", "longSwipesRatio", "longSwipesMs", "followFinger", "allowTouchMove", "threshold", "touchMoveStopPropagation", "touchStartPreventDefault", "touchStartForcePreventDefault", "touchReleaseOnEdges", "uniqueNavElements", "resistance", "resistanceRatio", "watchSlidesProgress", "grabCursor", "preventClicks", "preventClicksPropagation", "slideToClickedSlide", "preloadImages", "updateOnImagesReady", "loop", "loopAdditionalSlides", "loopedSlides", "loopFillGroupWithBlank", "loopPreventsSlide", "rewind", "allowSlidePrev", "allowSlideNext", "swipeHandler", "noSwiping", "noSwipingClass", "noSwipingSelector", "passiveListeners", "containerModifierClass", "slideClass", "slideBlankClass", "slideActiveClass", "slideDuplicateActiveClass", "slideVisibleClass", "slideDuplicateClass", "slideNextClass", "slideDuplicateNextClass", "slidePrevClass", "slideDuplicatePrevClass", "wrapperClass", "runCallbacksOnInit", "observeParents", "observeSlideChildren", "a11y", "autoplay", "controller", "coverflowEffect", "cubeEffect", "fadeEffect", "flipEffect", "creativeEffect", "cardsEffect", "hashNavigation", "history", "keyboard", "lazy", "mousewheel", "parallax", "thumbs", "zoom", "class", "id", "navigation", "pagination", "scrollbar", "virtual", "config"], outputs: ["_beforeBreakpoint", "_containerClasses", "_slideClass", "_swiper", "activeIndexChange", "afterInit", "autoplay", "autoplayStart", "autoplayStop", "autoplayPause", "autoplayResume", "beforeDestroy", "beforeInit", "beforeLoopFix", "beforeResize", "beforeSlideChangeStart", "beforeTransitionStart", "breakpoint", "changeDirection", "click", "doubleTap", "doubleClick", "destroy", "fromEdge", "hashChange", "hashSet", "imagesReady", "init", "keyPress", "lazyImageLoad", "lazyImageReady", "loopFix", "momentumBounce", "navigationHide", "navigationShow", "observerUpdate", "orientationchange", "paginationHide", "paginationRender", "paginationShow", "paginationUpdate", "progress", "reachBeginning", "reachEnd", "realIndexChange", "resize", "scroll", "scrollbarDragEnd", "scrollbarDragMove", "scrollbarDragStart", "setTransition", "setTranslate", "slideChange", "slideChangeTransitionEnd", "slideChangeTransitionStart", "slideNextTransitionEnd", "slideNextTransitionStart", "slidePrevTransitionEnd", "slidePrevTransitionStart", "slideResetTransitionStart", "slideResetTransitionEnd", "sliderMove", "sliderFirstMove", "slidesLengthChange", "slidesGridLengthChange", "snapGridLengthChange", "snapIndexChange", "tap", "toEdge", "touchEnd", "touchMove", "touchMoveOpposite", "touchStart", "transitionEnd", "transitionStart", "update", "zoomChange", "swiper", "lock", "unlock"] }, { kind: "directive", type: i4.SwiperSlideDirective, selector: "ng-template[swiperSlide]", inputs: ["virtualIndex", "class", "ngClass", "data-swiper-autoplay", "zoom"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselComponent, decorators: [{
|
|
269
|
-
type: Component,
|
|
270
|
-
args: [{ selector: 'nxs-carousel', encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"options\"\n [ngClass]=\"{'swiper-container':true,'nxs-slider-with-thumbnails':!!options.nxsThumbnails && options.nxsThumbnails.show}\"\n [style.height]=\"getMainSliderHeight()\">\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 <ng-template [ngTemplateOutlet]=\"slide\" [ngTemplateOutletContext]=\"{\n $implicit: slide\n }\"></ng-template>\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}\"\n [attr.data-src]=\"lazy ? slideImage.src : null\" [src]=\"lazy ? null : slideImage.src\"\n [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 <ng-container *ngIf=\"images && options.nxsShowImagesCount\">\n <div class=\"nxs-image-counter\">\n {{currentSlide+1}} / {{images.length}}\n </div>\n </ng-container>\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: ["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{height:100%}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%;-o-object-fit:cover;object-fit:cover;width:100%;-o-object-position:center;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"] }]
|
|
271
|
-
}], ctorParameters: function () {
|
|
272
|
-
return [{ type: i1.MatDialog }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
273
|
-
type: Inject,
|
|
274
|
-
args: [PLATFORM_ID]
|
|
275
|
-
}] }, { type: NxsCarouselModuleConfig, decorators: [{
|
|
276
|
-
type: Optional
|
|
277
|
-
}] }];
|
|
278
|
-
}, propDecorators: { contents: [{
|
|
279
|
-
type: ContentChildren,
|
|
280
|
-
args: [NxsSwiperTemplateDirective, { read: TemplateRef }]
|
|
281
|
-
}], swiperComponent: [{
|
|
282
|
-
type: ViewChild,
|
|
283
|
-
args: ['swiper', { static: false }]
|
|
284
|
-
}], lazy: [{
|
|
285
|
-
type: Input
|
|
286
|
-
}], images: [{
|
|
287
|
-
type: Input
|
|
288
|
-
}], setOptions: [{
|
|
289
|
-
type: Input,
|
|
290
|
-
args: ['options']
|
|
291
|
-
}], hasHtmlContent: [{
|
|
292
|
-
type: Input
|
|
293
|
-
}], slideChange: [{
|
|
294
|
-
type: Output
|
|
295
|
-
}], slideClick: [{
|
|
296
|
-
type: Output
|
|
297
|
-
}] } });
|
|
298
|
-
|
|
299
|
-
class NxsCarouselDialogComponent {
|
|
300
|
-
constructor(data, dialogRef) {
|
|
301
|
-
this.data = data;
|
|
302
|
-
this.dialogRef = dialogRef;
|
|
303
|
-
this.wrapperClass = 'nxs-carousel-wrapper';
|
|
304
|
-
if (data.wrapperClass)
|
|
305
|
-
this.wrapperClass += ' ' + data.wrapperClass;
|
|
306
|
-
this.dialogRef.afterOpened().subscribe(() => {
|
|
307
|
-
NxsCarouselDialogComponent.dialogOpened = true;
|
|
308
|
-
});
|
|
309
|
-
this.dialogRef.afterClosed().subscribe(() => {
|
|
310
|
-
NxsCarouselDialogComponent.dialogOpened = false;
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
NxsCarouselDialogComponent.dialogOpened = false;
|
|
315
|
-
NxsCarouselDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
316
|
-
NxsCarouselDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.5", type: NxsCarouselDialogComponent, selector: "nxs-carousel-dialog", ngImport: i0, template: `
|
|
317
|
-
<div class="nxs-carousel-dialog-flex-wrapper">
|
|
318
|
-
<div class="nxs-carousel-dialog-header">
|
|
319
|
-
<button (click)="dialogRef.close()" mat-icon-button><mat-icon>close</mat-icon></button>
|
|
320
|
-
</div>
|
|
321
|
-
<div [class]="wrapperClass">
|
|
322
|
-
<nxs-carousel [options]="data.options" [images]="data.images"></nxs-carousel>
|
|
323
|
-
</div>
|
|
324
|
-
</div>
|
|
325
|
-
`, isInline: true, 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%}\n"], dependencies: [{ kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: NxsCarouselComponent, selector: "nxs-carousel", inputs: ["lazy", "images", "options", "hasHtmlContent"], outputs: ["slideChange", "slideClick"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselDialogComponent, decorators: [{
|
|
327
|
-
type: Component,
|
|
328
|
-
args: [{ selector: 'nxs-carousel-dialog', template: `
|
|
329
|
-
<div class="nxs-carousel-dialog-flex-wrapper">
|
|
330
|
-
<div class="nxs-carousel-dialog-header">
|
|
331
|
-
<button (click)="dialogRef.close()" mat-icon-button><mat-icon>close</mat-icon></button>
|
|
332
|
-
</div>
|
|
333
|
-
<div [class]="wrapperClass">
|
|
334
|
-
<nxs-carousel [options]="data.options" [images]="data.images"></nxs-carousel>
|
|
335
|
-
</div>
|
|
336
|
-
</div>
|
|
337
|
-
`, encapsulation: ViewEncapsulation.None, 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%}\n"] }]
|
|
338
|
-
}], ctorParameters: function () {
|
|
339
|
-
return [{ type: undefined, decorators: [{
|
|
340
|
-
type: Inject,
|
|
341
|
-
args: [MAT_DIALOG_DATA]
|
|
342
|
-
}] }, { type: i1.MatDialogRef }];
|
|
343
|
-
} });
|
|
344
|
-
|
|
345
|
-
class NxsCarouselModule {
|
|
346
|
-
constructor(matDialog) {
|
|
347
|
-
NxsCarouselModule.subscribeToOpenDialog(matDialog);
|
|
348
|
-
}
|
|
349
|
-
static subscribeToOpenDialog(matDialog) {
|
|
350
|
-
if (this.openDialogSubscribed) {
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
this.openDialogSubscribed = true;
|
|
354
|
-
CarouselEvents.openCarouselDialog.subscribe((data) => {
|
|
355
|
-
if (NxsCarouselDialogComponent.dialogOpened) {
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
|
-
matDialog.open(NxsCarouselDialogComponent, data);
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
static forRoot(config) {
|
|
362
|
-
return {
|
|
363
|
-
ngModule: NxsCarouselModule,
|
|
364
|
-
providers: [
|
|
365
|
-
{ provide: NxsCarouselModuleConfig, useValue: config },
|
|
366
|
-
],
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
NxsCarouselModule.openDialogSubscribed = false;
|
|
371
|
-
NxsCarouselModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselModule, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
372
|
-
NxsCarouselModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselModule, declarations: [NxsCarouselComponent,
|
|
373
|
-
NxsCarouselDialogComponent,
|
|
374
|
-
NxsSwiperTemplateDirective], imports: [CommonModule,
|
|
375
|
-
MatIconModule,
|
|
376
|
-
MatButtonModule,
|
|
377
|
-
MatDialogModule,
|
|
378
|
-
SwiperModule], exports: [NxsCarouselComponent,
|
|
379
|
-
NxsSwiperTemplateDirective] });
|
|
380
|
-
NxsCarouselModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselModule, imports: [CommonModule,
|
|
381
|
-
MatIconModule,
|
|
382
|
-
MatButtonModule,
|
|
383
|
-
MatDialogModule,
|
|
384
|
-
SwiperModule] });
|
|
385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.5", ngImport: i0, type: NxsCarouselModule, decorators: [{
|
|
386
|
-
type: NgModule,
|
|
387
|
-
args: [{
|
|
388
|
-
declarations: [
|
|
389
|
-
NxsCarouselComponent,
|
|
390
|
-
NxsCarouselDialogComponent,
|
|
391
|
-
NxsSwiperTemplateDirective,
|
|
392
|
-
],
|
|
393
|
-
imports: [
|
|
394
|
-
CommonModule,
|
|
395
|
-
MatIconModule,
|
|
396
|
-
MatButtonModule,
|
|
397
|
-
MatDialogModule,
|
|
398
|
-
SwiperModule,
|
|
399
|
-
],
|
|
400
|
-
exports: [
|
|
401
|
-
NxsCarouselComponent,
|
|
402
|
-
NxsSwiperTemplateDirective,
|
|
403
|
-
],
|
|
404
|
-
}]
|
|
405
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* Generated bundle index. Do not edit.
|
|
409
|
-
*/
|
|
410
|
-
|
|
411
|
-
export { NxsCarouselComponent, NxsCarouselModule, NxsSwiperTemplateDirective };
|
|
412
|
-
//# sourceMappingURL=nextalys-carousel-lib-nxs-carousel.mjs.map
|