nextalys-carousel 0.0.61 → 0.0.63
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/{esm2015/common-types.js → esm2020/common-types.mjs} +0 -0
- package/{esm2015/lib/nxs-carousel/common-types.js → esm2020/lib/nxs-carousel/common-types.mjs} +0 -0
- package/esm2020/lib/nxs-carousel/nextalys-carousel-lib-nxs-carousel.mjs +5 -0
- package/esm2020/lib/nxs-carousel/nxs-carousel/carousel-events.mjs +5 -0
- package/esm2020/lib/nxs-carousel/nxs-carousel/nxs-carousel-dialog.component.mjs +51 -0
- package/esm2020/lib/nxs-carousel/nxs-carousel/nxs-carousel-types.mjs +2 -0
- package/esm2020/lib/nxs-carousel/nxs-carousel/nxs-carousel.component.mjs +256 -0
- package/esm2020/lib/nxs-carousel/nxs-carousel/nxs-carousel.module.mjs +68 -0
- package/esm2020/lib/nxs-carousel/nxs-carousel/swiper-directives.mjs +13 -0
- package/{esm2015/lib/nxs-carousel/public-api-carousel.js → esm2020/lib/nxs-carousel/public-api-carousel.mjs} +2 -1
- package/{esm2015/lib/nxs-carousel-mock/common-types.js → esm2020/lib/nxs-carousel-mock/common-types.mjs} +0 -0
- package/esm2020/lib/nxs-carousel-mock/nextalys-carousel-lib-nxs-carousel-mock.mjs +5 -0
- package/esm2020/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.component.mjs +44 -0
- package/esm2020/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.module.mjs +38 -0
- package/{esm2015/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-types.js → esm2020/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-types.mjs} +0 -0
- package/esm2020/lib/nxs-carousel-mock/nxs-carousel-mock/swiper-directives.mjs +13 -0
- package/{esm2015/lib/nxs-carousel-mock/public-api-carousel-mock.js → esm2020/lib/nxs-carousel-mock/public-api-carousel-mock.mjs} +2 -1
- package/{esm2015/nextalys-carousel.js → esm2020/nextalys-carousel.mjs} +0 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/nextalys-carousel-lib-nxs-carousel-mock.mjs +101 -0
- package/fesm2015/nextalys-carousel-lib-nxs-carousel-mock.mjs.map +1 -0
- package/fesm2015/nextalys-carousel-lib-nxs-carousel.mjs +395 -0
- package/fesm2015/nextalys-carousel-lib-nxs-carousel.mjs.map +1 -0
- package/fesm2015/{nextalys-carousel.js → nextalys-carousel.mjs} +1 -1
- package/fesm2015/nextalys-carousel.mjs.map +1 -0
- package/fesm2020/nextalys-carousel-lib-nxs-carousel-mock.mjs +101 -0
- package/fesm2020/nextalys-carousel-lib-nxs-carousel-mock.mjs.map +1 -0
- package/fesm2020/nextalys-carousel-lib-nxs-carousel.mjs +382 -0
- package/fesm2020/nextalys-carousel-lib-nxs-carousel.mjs.map +1 -0
- package/fesm2020/nextalys-carousel.mjs +14 -0
- package/fesm2020/nextalys-carousel.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/nxs-carousel/index.d.ts +6 -0
- package/lib/nxs-carousel/nextalys-carousel-lib-nxs-carousel.d.ts.map +1 -1
- package/lib/nxs-carousel/nxs-carousel/carousel-events.d.ts +12 -0
- package/lib/nxs-carousel/nxs-carousel/carousel-events.d.ts.map +1 -0
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel-dialog.component.d.ts +5 -7
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel-dialog.component.d.ts.map +1 -1
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel-types.d.ts +6 -0
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel-types.d.ts.map +1 -1
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel.component.d.ts +3 -0
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel.component.d.ts.map +1 -1
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel.module.d.ts +15 -0
- package/lib/nxs-carousel/nxs-carousel/nxs-carousel.module.d.ts.map +1 -1
- package/lib/nxs-carousel/nxs-carousel/swiper-directives.d.ts +3 -0
- package/lib/nxs-carousel/nxs-carousel/swiper-directives.d.ts.map +1 -1
- package/lib/nxs-carousel/public-api-carousel.d.ts +1 -0
- package/lib/nxs-carousel/public-api-carousel.d.ts.map +1 -1
- package/lib/nxs-carousel-mock/index.d.ts +6 -0
- package/lib/nxs-carousel-mock/nextalys-carousel-lib-nxs-carousel-mock.d.ts.map +1 -1
- package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.component.d.ts +3 -0
- package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.component.d.ts.map +1 -1
- package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.module.d.ts +7 -0
- package/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.module.d.ts.map +1 -1
- package/lib/nxs-carousel-mock/nxs-carousel-mock/swiper-directives.d.ts +3 -0
- package/lib/nxs-carousel-mock/nxs-carousel-mock/swiper-directives.d.ts.map +1 -1
- package/lib/nxs-carousel-mock/public-api-carousel-mock.d.ts +1 -0
- package/lib/nxs-carousel-mock/public-api-carousel-mock.d.ts.map +1 -1
- package/nextalys-carousel.d.ts.map +1 -1
- package/package.json +37 -9
- package/bundles/nextalys-carousel-lib-nxs-carousel-mock.umd.js +0 -103
- package/bundles/nextalys-carousel-lib-nxs-carousel-mock.umd.js.map +0 -1
- package/bundles/nextalys-carousel-lib-nxs-carousel-mock.umd.min.js +0 -2
- package/bundles/nextalys-carousel-lib-nxs-carousel-mock.umd.min.js.map +0 -1
- package/bundles/nextalys-carousel-lib-nxs-carousel.umd.js +0 -674
- package/bundles/nextalys-carousel-lib-nxs-carousel.umd.js.map +0 -1
- package/bundles/nextalys-carousel-lib-nxs-carousel.umd.min.js +0 -16
- package/bundles/nextalys-carousel-lib-nxs-carousel.umd.min.js.map +0 -1
- package/bundles/nextalys-carousel.umd.js +0 -25
- package/bundles/nextalys-carousel.umd.js.map +0 -1
- package/bundles/nextalys-carousel.umd.min.js +0 -2
- package/bundles/nextalys-carousel.umd.min.js.map +0 -1
- package/esm2015/lib/nxs-carousel/nextalys-carousel-lib-nxs-carousel.js +0 -8
- package/esm2015/lib/nxs-carousel/nxs-carousel/nxs-carousel-dialog.component.js +0 -33
- package/esm2015/lib/nxs-carousel/nxs-carousel/nxs-carousel-types.js +0 -2
- package/esm2015/lib/nxs-carousel/nxs-carousel/nxs-carousel.component.js +0 -253
- package/esm2015/lib/nxs-carousel/nxs-carousel/nxs-carousel.module.js +0 -41
- package/esm2015/lib/nxs-carousel/nxs-carousel/swiper-directives.js +0 -9
- package/esm2015/lib/nxs-carousel-mock/nextalys-carousel-lib-nxs-carousel-mock.js +0 -7
- package/esm2015/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.component.js +0 -37
- package/esm2015/lib/nxs-carousel-mock/nxs-carousel-mock/nxs-carousel-mock.module.js +0 -31
- package/esm2015/lib/nxs-carousel-mock/nxs-carousel-mock/swiper-directives.js +0 -9
- package/fesm2015/nextalys-carousel-lib-nxs-carousel-mock.js +0 -85
- package/fesm2015/nextalys-carousel-lib-nxs-carousel-mock.js.map +0 -1
- package/fesm2015/nextalys-carousel-lib-nxs-carousel.js +0 -333
- package/fesm2015/nextalys-carousel-lib-nxs-carousel.js.map +0 -1
- package/fesm2015/nextalys-carousel.js.map +0 -1
- package/lib/nxs-carousel/nextalys-carousel-lib-nxs-carousel.d.ts +0 -8
- package/lib/nxs-carousel/nextalys-carousel-lib-nxs-carousel.metadata.json +0 -1
- package/lib/nxs-carousel/package.json +0 -11
- package/lib/nxs-carousel-mock/nextalys-carousel-lib-nxs-carousel-mock.d.ts +0 -7
- package/lib/nxs-carousel-mock/nextalys-carousel-lib-nxs-carousel-mock.metadata.json +0 -1
- package/lib/nxs-carousel-mock/package.json +0 -11
- package/nextalys-carousel.d.ts +0 -5
- package/nextalys-carousel.metadata.json +0 -1
|
@@ -1,674 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('@angular/common'), require('nextalys-js-helpers/dist/events'), require('swiper'), require('@angular/material/button'), require('@angular/material/icon'), require('swiper/angular')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('nextalys-carousel/lib/nxs-carousel', ['exports', '@angular/core', '@angular/material/dialog', '@angular/common', 'nextalys-js-helpers/dist/events', 'swiper', '@angular/material/button', '@angular/material/icon', 'swiper/angular'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['nextalys-carousel'] = global['nextalys-carousel'] || {}, global['nextalys-carousel'].lib = global['nextalys-carousel'].lib || {}, global['nextalys-carousel'].lib['nxs-carousel'] = {}), global.ng.core, global.ng.material.dialog, global.ng.common, global.events, global.SwiperCore, global.ng.material.button, global.ng.material.icon, global.angular));
|
|
5
|
-
}(this, (function (exports, core, dialog, common, events, SwiperCore, button, icon, angular) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var SwiperCore__default = /*#__PURE__*/_interopDefaultLegacy(SwiperCore);
|
|
10
|
-
|
|
11
|
-
/*! *****************************************************************************
|
|
12
|
-
Copyright (c) Microsoft Corporation.
|
|
13
|
-
|
|
14
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
15
|
-
purpose with or without fee is hereby granted.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
18
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
19
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
20
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
21
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
22
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
23
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
24
|
-
***************************************************************************** */
|
|
25
|
-
/* global Reflect, Promise */
|
|
26
|
-
var extendStatics = function (d, b) {
|
|
27
|
-
extendStatics = Object.setPrototypeOf ||
|
|
28
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
29
|
-
function (d, b) { for (var p in b)
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
31
|
-
d[p] = b[p]; };
|
|
32
|
-
return extendStatics(d, b);
|
|
33
|
-
};
|
|
34
|
-
function __extends(d, b) {
|
|
35
|
-
if (typeof b !== "function" && b !== null)
|
|
36
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
37
|
-
extendStatics(d, b);
|
|
38
|
-
function __() { this.constructor = d; }
|
|
39
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
40
|
-
}
|
|
41
|
-
var __assign = function () {
|
|
42
|
-
__assign = Object.assign || function __assign(t) {
|
|
43
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
44
|
-
s = arguments[i];
|
|
45
|
-
for (var p in s)
|
|
46
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
47
|
-
t[p] = s[p];
|
|
48
|
-
}
|
|
49
|
-
return t;
|
|
50
|
-
};
|
|
51
|
-
return __assign.apply(this, arguments);
|
|
52
|
-
};
|
|
53
|
-
function __rest(s, e) {
|
|
54
|
-
var t = {};
|
|
55
|
-
for (var p in s)
|
|
56
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
57
|
-
t[p] = s[p];
|
|
58
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
59
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
60
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
61
|
-
t[p[i]] = s[p[i]];
|
|
62
|
-
}
|
|
63
|
-
return t;
|
|
64
|
-
}
|
|
65
|
-
function __decorate(decorators, target, key, desc) {
|
|
66
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
67
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
68
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
69
|
-
else
|
|
70
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
71
|
-
if (d = decorators[i])
|
|
72
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
73
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
74
|
-
}
|
|
75
|
-
function __param(paramIndex, decorator) {
|
|
76
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
77
|
-
}
|
|
78
|
-
function __metadata(metadataKey, metadataValue) {
|
|
79
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
80
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
81
|
-
}
|
|
82
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
83
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
84
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
85
|
-
function fulfilled(value) { try {
|
|
86
|
-
step(generator.next(value));
|
|
87
|
-
}
|
|
88
|
-
catch (e) {
|
|
89
|
-
reject(e);
|
|
90
|
-
} }
|
|
91
|
-
function rejected(value) { try {
|
|
92
|
-
step(generator["throw"](value));
|
|
93
|
-
}
|
|
94
|
-
catch (e) {
|
|
95
|
-
reject(e);
|
|
96
|
-
} }
|
|
97
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
98
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function __generator(thisArg, body) {
|
|
102
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
103
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
104
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
105
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
106
|
-
function step(op) {
|
|
107
|
-
if (f)
|
|
108
|
-
throw new TypeError("Generator is already executing.");
|
|
109
|
-
while (_)
|
|
110
|
-
try {
|
|
111
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
112
|
-
return t;
|
|
113
|
-
if (y = 0, t)
|
|
114
|
-
op = [op[0] & 2, t.value];
|
|
115
|
-
switch (op[0]) {
|
|
116
|
-
case 0:
|
|
117
|
-
case 1:
|
|
118
|
-
t = op;
|
|
119
|
-
break;
|
|
120
|
-
case 4:
|
|
121
|
-
_.label++;
|
|
122
|
-
return { value: op[1], done: false };
|
|
123
|
-
case 5:
|
|
124
|
-
_.label++;
|
|
125
|
-
y = op[1];
|
|
126
|
-
op = [0];
|
|
127
|
-
continue;
|
|
128
|
-
case 7:
|
|
129
|
-
op = _.ops.pop();
|
|
130
|
-
_.trys.pop();
|
|
131
|
-
continue;
|
|
132
|
-
default:
|
|
133
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
134
|
-
_ = 0;
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
138
|
-
_.label = op[1];
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
142
|
-
_.label = t[1];
|
|
143
|
-
t = op;
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
if (t && _.label < t[2]) {
|
|
147
|
-
_.label = t[2];
|
|
148
|
-
_.ops.push(op);
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
if (t[2])
|
|
152
|
-
_.ops.pop();
|
|
153
|
-
_.trys.pop();
|
|
154
|
-
continue;
|
|
155
|
-
}
|
|
156
|
-
op = body.call(thisArg, _);
|
|
157
|
-
}
|
|
158
|
-
catch (e) {
|
|
159
|
-
op = [6, e];
|
|
160
|
-
y = 0;
|
|
161
|
-
}
|
|
162
|
-
finally {
|
|
163
|
-
f = t = 0;
|
|
164
|
-
}
|
|
165
|
-
if (op[0] & 5)
|
|
166
|
-
throw op[1];
|
|
167
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
171
|
-
if (k2 === undefined)
|
|
172
|
-
k2 = k;
|
|
173
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
174
|
-
}) : (function (o, m, k, k2) {
|
|
175
|
-
if (k2 === undefined)
|
|
176
|
-
k2 = k;
|
|
177
|
-
o[k2] = m[k];
|
|
178
|
-
});
|
|
179
|
-
function __exportStar(m, o) {
|
|
180
|
-
for (var p in m)
|
|
181
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
182
|
-
__createBinding(o, m, p);
|
|
183
|
-
}
|
|
184
|
-
function __values(o) {
|
|
185
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
186
|
-
if (m)
|
|
187
|
-
return m.call(o);
|
|
188
|
-
if (o && typeof o.length === "number")
|
|
189
|
-
return {
|
|
190
|
-
next: function () {
|
|
191
|
-
if (o && i >= o.length)
|
|
192
|
-
o = void 0;
|
|
193
|
-
return { value: o && o[i++], done: !o };
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
197
|
-
}
|
|
198
|
-
function __read(o, n) {
|
|
199
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
200
|
-
if (!m)
|
|
201
|
-
return o;
|
|
202
|
-
var i = m.call(o), r, ar = [], e;
|
|
203
|
-
try {
|
|
204
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
205
|
-
ar.push(r.value);
|
|
206
|
-
}
|
|
207
|
-
catch (error) {
|
|
208
|
-
e = { error: error };
|
|
209
|
-
}
|
|
210
|
-
finally {
|
|
211
|
-
try {
|
|
212
|
-
if (r && !r.done && (m = i["return"]))
|
|
213
|
-
m.call(i);
|
|
214
|
-
}
|
|
215
|
-
finally {
|
|
216
|
-
if (e)
|
|
217
|
-
throw e.error;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return ar;
|
|
221
|
-
}
|
|
222
|
-
/** @deprecated */
|
|
223
|
-
function __spread() {
|
|
224
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
225
|
-
ar = ar.concat(__read(arguments[i]));
|
|
226
|
-
return ar;
|
|
227
|
-
}
|
|
228
|
-
/** @deprecated */
|
|
229
|
-
function __spreadArrays() {
|
|
230
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
231
|
-
s += arguments[i].length;
|
|
232
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
233
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
234
|
-
r[k] = a[j];
|
|
235
|
-
return r;
|
|
236
|
-
}
|
|
237
|
-
function __spreadArray(to, from, pack) {
|
|
238
|
-
if (pack || arguments.length === 2)
|
|
239
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
240
|
-
if (ar || !(i in from)) {
|
|
241
|
-
if (!ar)
|
|
242
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
243
|
-
ar[i] = from[i];
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
return to.concat(ar || from);
|
|
247
|
-
}
|
|
248
|
-
function __await(v) {
|
|
249
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
250
|
-
}
|
|
251
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
252
|
-
if (!Symbol.asyncIterator)
|
|
253
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
254
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
255
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
256
|
-
function verb(n) { if (g[n])
|
|
257
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
258
|
-
function resume(n, v) { try {
|
|
259
|
-
step(g[n](v));
|
|
260
|
-
}
|
|
261
|
-
catch (e) {
|
|
262
|
-
settle(q[0][3], e);
|
|
263
|
-
} }
|
|
264
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
265
|
-
function fulfill(value) { resume("next", value); }
|
|
266
|
-
function reject(value) { resume("throw", value); }
|
|
267
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
268
|
-
resume(q[0][0], q[0][1]); }
|
|
269
|
-
}
|
|
270
|
-
function __asyncDelegator(o) {
|
|
271
|
-
var i, p;
|
|
272
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
273
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
274
|
-
}
|
|
275
|
-
function __asyncValues(o) {
|
|
276
|
-
if (!Symbol.asyncIterator)
|
|
277
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
278
|
-
var m = o[Symbol.asyncIterator], i;
|
|
279
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
280
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
281
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
282
|
-
}
|
|
283
|
-
function __makeTemplateObject(cooked, raw) {
|
|
284
|
-
if (Object.defineProperty) {
|
|
285
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
cooked.raw = raw;
|
|
289
|
-
}
|
|
290
|
-
return cooked;
|
|
291
|
-
}
|
|
292
|
-
;
|
|
293
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
294
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
295
|
-
}) : function (o, v) {
|
|
296
|
-
o["default"] = v;
|
|
297
|
-
};
|
|
298
|
-
function __importStar(mod) {
|
|
299
|
-
if (mod && mod.__esModule)
|
|
300
|
-
return mod;
|
|
301
|
-
var result = {};
|
|
302
|
-
if (mod != null)
|
|
303
|
-
for (var k in mod)
|
|
304
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
305
|
-
__createBinding(result, mod, k);
|
|
306
|
-
__setModuleDefault(result, mod);
|
|
307
|
-
return result;
|
|
308
|
-
}
|
|
309
|
-
function __importDefault(mod) {
|
|
310
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
311
|
-
}
|
|
312
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
313
|
-
if (kind === "a" && !f)
|
|
314
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
315
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
316
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
317
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
318
|
-
}
|
|
319
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
320
|
-
if (kind === "m")
|
|
321
|
-
throw new TypeError("Private method is not writable");
|
|
322
|
-
if (kind === "a" && !f)
|
|
323
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
324
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
325
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
326
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
var NxsCarouselDialogComponent = /** @class */ (function () {
|
|
330
|
-
function NxsCarouselDialogComponent(data, dialogRef) {
|
|
331
|
-
this.data = data;
|
|
332
|
-
this.dialogRef = dialogRef;
|
|
333
|
-
this.wrapperClass = 'nxs-carousel-wrapper';
|
|
334
|
-
if (data.wrapperClass)
|
|
335
|
-
this.wrapperClass += ' ' + data.wrapperClass;
|
|
336
|
-
}
|
|
337
|
-
return NxsCarouselDialogComponent;
|
|
338
|
-
}());
|
|
339
|
-
NxsCarouselDialogComponent.decorators = [
|
|
340
|
-
{ type: core.Component, args: [{
|
|
341
|
-
selector: 'nxs-carousel-dialog',
|
|
342
|
-
template: "\n <div class=\"nxs-carousel-dialog-flex-wrapper\">\n <div class=\"nxs-carousel-dialog-header\">\n <button (click)=\"dialogRef.close()\" mat-icon-button><mat-icon>close</mat-icon></button>\n </div>\n <div [class]=\"wrapperClass\">\n <nxs-carousel [options]=\"data.options\" [images]=\"data.images\"></nxs-carousel>\n </div>\n</div>\n ",
|
|
343
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
344
|
-
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%}"]
|
|
345
|
-
},] }
|
|
346
|
-
];
|
|
347
|
-
NxsCarouselDialogComponent.ctorParameters = function () { return [
|
|
348
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] },
|
|
349
|
-
{ type: dialog.MatDialogRef }
|
|
350
|
-
]; };
|
|
351
|
-
|
|
352
|
-
var NxsSwiperTemplateDirective = /** @class */ (function () {
|
|
353
|
-
function NxsSwiperTemplateDirective() {
|
|
354
|
-
}
|
|
355
|
-
return NxsSwiperTemplateDirective;
|
|
356
|
-
}());
|
|
357
|
-
NxsSwiperTemplateDirective.decorators = [
|
|
358
|
-
{ type: core.Directive, args: [{
|
|
359
|
-
selector: '[nxsSwiperTemplate]',
|
|
360
|
-
},] }
|
|
361
|
-
];
|
|
362
|
-
|
|
363
|
-
var NxsCarouselModuleConfig = /** @class */ (function () {
|
|
364
|
-
function NxsCarouselModuleConfig() {
|
|
365
|
-
this.debug = false;
|
|
366
|
-
}
|
|
367
|
-
return NxsCarouselModuleConfig;
|
|
368
|
-
}());
|
|
369
|
-
|
|
370
|
-
// install Swiper modules
|
|
371
|
-
SwiperCore__default['default'].use([SwiperCore.Navigation, SwiperCore.Pagination, SwiperCore.Autoplay, SwiperCore.Lazy, SwiperCore.Thumbs]);
|
|
372
|
-
var NxsCarouselComponent = /** @class */ (function () {
|
|
373
|
-
function NxsCarouselComponent(matDialog, zone, platformId, config) {
|
|
374
|
-
this.matDialog = matDialog;
|
|
375
|
-
this.zone = zone;
|
|
376
|
-
this.platformId = platformId;
|
|
377
|
-
this.config = config;
|
|
378
|
-
this.lazy = true;
|
|
379
|
-
this.eventsCollector = new events.EventsCollector();
|
|
380
|
-
this.options = null;
|
|
381
|
-
this.thumbnailsOptions = null;
|
|
382
|
-
this.hasHtmlContent = false;
|
|
383
|
-
this.slidesCount = 0;
|
|
384
|
-
this.slideChange = new core.EventEmitter();
|
|
385
|
-
this.currentSlide = 0;
|
|
386
|
-
this.slideClick = new core.EventEmitter();
|
|
387
|
-
this.isBrowser = false;
|
|
388
|
-
if (!this.config)
|
|
389
|
-
this.config = { debug: false };
|
|
390
|
-
this.isBrowser = common.isPlatformBrowser(this.platformId);
|
|
391
|
-
this.log('constructor - isBrowser', this.isBrowser);
|
|
392
|
-
this.options = this.setDefaultOptions(undefined, false);
|
|
393
|
-
}
|
|
394
|
-
Object.defineProperty(NxsCarouselComponent.prototype, "setOptions", {
|
|
395
|
-
set: function (val) {
|
|
396
|
-
this.options = this.setDefaultOptions(val, false);
|
|
397
|
-
this.setThumbnailsOptions();
|
|
398
|
-
},
|
|
399
|
-
enumerable: false,
|
|
400
|
-
configurable: true
|
|
401
|
-
});
|
|
402
|
-
NxsCarouselComponent.prototype.log = function () {
|
|
403
|
-
var args = [];
|
|
404
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
405
|
-
args[_i] = arguments[_i];
|
|
406
|
-
}
|
|
407
|
-
if (!this.config.debug)
|
|
408
|
-
return;
|
|
409
|
-
console.log.apply(console, __spreadArray(['[NxsCarousel]'], __read(args)));
|
|
410
|
-
};
|
|
411
|
-
NxsCarouselComponent.prototype.destroy = function () {
|
|
412
|
-
var _a;
|
|
413
|
-
if (!this.isBrowser) {
|
|
414
|
-
return;
|
|
415
|
-
}
|
|
416
|
-
(_a = this.eventsCollector) === null || _a === void 0 ? void 0 : _a.unsubscribeAll();
|
|
417
|
-
};
|
|
418
|
-
NxsCarouselComponent.prototype.ngOnDestroy = function () {
|
|
419
|
-
this.destroy();
|
|
420
|
-
};
|
|
421
|
-
NxsCarouselComponent.prototype.ngAfterViewInit = function () {
|
|
422
|
-
// console.log('thi.contents', this.contents);
|
|
423
|
-
// this.initSlides();
|
|
424
|
-
// this.createSlider(true);
|
|
425
|
-
};
|
|
426
|
-
NxsCarouselComponent.prototype.getMainSliderHeight = function () {
|
|
427
|
-
if (!this.options)
|
|
428
|
-
return '';
|
|
429
|
-
if (this.options.nxsThumbnails && this.options.nxsThumbnails.show) {
|
|
430
|
-
if (this.options.nxsThumbnails.onMainSlider) {
|
|
431
|
-
return '100%';
|
|
432
|
-
}
|
|
433
|
-
else if (this.options.nxsThumbnails.percentHeight) {
|
|
434
|
-
return (100 - this.options.nxsThumbnails.percentHeight) + '%';
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
return '';
|
|
438
|
-
};
|
|
439
|
-
NxsCarouselComponent.prototype.setDefaultOptions = function (options, forDialog) {
|
|
440
|
-
var _a;
|
|
441
|
-
if (!options && forDialog) {
|
|
442
|
-
options = {
|
|
443
|
-
nxsShowNavigationBullets: true, loop: true, nxsThumbnails: { show: true }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: true,
|
|
444
|
-
lazy: this.lazy,
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
else if (!options) {
|
|
448
|
-
options = {
|
|
449
|
-
nxsShowNavigationBullets: true, loop: true,
|
|
450
|
-
nxsThumbnails: { show: false }, effect: 'slide', nxsShowNavigationArrows: true, nxsShowImagesCount: false, nxsCarouselDialogOptions: {},
|
|
451
|
-
lazy: this.lazy,
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
if (options.nxsCarouselDialogOptions) {
|
|
455
|
-
if (typeof options.nxsCarouselDialogOptions.nxsThumbnails === 'undefined')
|
|
456
|
-
options.nxsCarouselDialogOptions.nxsThumbnails = { show: false };
|
|
457
|
-
if (typeof options.nxsCarouselDialogOptions.effect === 'undefined')
|
|
458
|
-
options.nxsCarouselDialogOptions.effect = 'slide';
|
|
459
|
-
if (typeof options.nxsCarouselDialogOptions.nxsShowNavigationArrows === 'undefined')
|
|
460
|
-
options.nxsCarouselDialogOptions.nxsShowNavigationArrows = true;
|
|
461
|
-
if (!!((_a = options.nxsCarouselDialogOptions.nxsThumbnails) === null || _a === void 0 ? void 0 : _a.show)) {
|
|
462
|
-
if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight === 'undefined')
|
|
463
|
-
options.nxsCarouselDialogOptions.nxsThumbnails.percentHeight = 20;
|
|
464
|
-
if (typeof options.nxsCarouselDialogOptions.nxsThumbnails.perView === 'undefined')
|
|
465
|
-
options.nxsCarouselDialogOptions.nxsThumbnails.perView = 10;
|
|
466
|
-
options.nxsCarouselDialogOptions.nxsThumbnails.breakpoints = {
|
|
467
|
-
640: {
|
|
468
|
-
slidesPerView: 5,
|
|
469
|
-
},
|
|
470
|
-
768: {
|
|
471
|
-
slidesPerView: 7,
|
|
472
|
-
},
|
|
473
|
-
1024: {
|
|
474
|
-
slidesPerView: 8,
|
|
475
|
-
},
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
if (!options.nxsThumbnails)
|
|
480
|
-
options.nxsThumbnails = { show: false };
|
|
481
|
-
if (options.nxsThumbnails.show && typeof options.nxsThumbnails.percentHeight === 'undefined')
|
|
482
|
-
options.nxsThumbnails.percentHeight = 20;
|
|
483
|
-
if (options.nxsThumbnails.show && typeof options.nxsThumbnails.perView === 'undefined')
|
|
484
|
-
options.nxsThumbnails.perView = 10;
|
|
485
|
-
if (forDialog)
|
|
486
|
-
options.nxsfullscreenOnClick = false;
|
|
487
|
-
if (options.nxsThumbnails.onMainSlider)
|
|
488
|
-
options.nxsShowNavigationBullets = false;
|
|
489
|
-
if (typeof options.lazy === 'undefined')
|
|
490
|
-
options.lazy = true;
|
|
491
|
-
if (typeof options.navigation === 'undefined')
|
|
492
|
-
options.navigation = true;
|
|
493
|
-
if (typeof options.pagination === 'undefined')
|
|
494
|
-
options.pagination = { clickable: true };
|
|
495
|
-
if (options.nxsShowNavigationBullets === false) {
|
|
496
|
-
options.pagination = false;
|
|
497
|
-
}
|
|
498
|
-
// console.log("Log ~ file: nxs-carousel.component.ts ~ line 272 ~ NxsCarouselComponent ~ setDefaultOptions ~ options", options);
|
|
499
|
-
return options;
|
|
500
|
-
};
|
|
501
|
-
NxsCarouselComponent.prototype.setThumbnailsOptions = function () {
|
|
502
|
-
var _a, _b;
|
|
503
|
-
if (!!((_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.nxsThumbnails) === null || _b === void 0 ? void 0 : _b.show)) {
|
|
504
|
-
this.thumbnailsOptions = {
|
|
505
|
-
slidesPerView: this.options.nxsThumbnails.perView,
|
|
506
|
-
loop: false,
|
|
507
|
-
freeMode: true,
|
|
508
|
-
// watchSlidesVisibility: true,
|
|
509
|
-
watchSlidesProgress: true,
|
|
510
|
-
breakpoints: this.options.nxsThumbnails.breakpoints,
|
|
511
|
-
// spaceBetween: 10,
|
|
512
|
-
};
|
|
513
|
-
if (this.lazy) {
|
|
514
|
-
// Disable preloading of all images
|
|
515
|
-
this.thumbnailsOptions.preloadImages = false;
|
|
516
|
-
// Enable lazy loading
|
|
517
|
-
this.thumbnailsOptions.lazy = true;
|
|
518
|
-
}
|
|
519
|
-
// console.log("Log ~ file: nxs-carousel.component.ts ~ line 184 ~ NxsCarouselComponent ~ setThumbnailsOptions ~ this.thumbnailsOptions.lazy", this.thumbnailsOptions.lazy);
|
|
520
|
-
// this.thumbnailsSliderInstance = new Swiper(this.nxsThumbnailsSliderContainer.nativeElement, thumbnailsOptions);
|
|
521
|
-
// this.options.thumbs = { swiper: this.thumbnailsSliderInstance };
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
NxsCarouselComponent.prototype.showFullScreenCarousel = function (images, wrapperClass) {
|
|
525
|
-
this.options.nxsCarouselDialogOptions = this.setDefaultOptions(this.options.nxsCarouselDialogOptions, true);
|
|
526
|
-
var data = { images: images, wrapperClass: wrapperClass, options: this.options.nxsCarouselDialogOptions };
|
|
527
|
-
this.matDialog.open(NxsCarouselDialogComponent, {
|
|
528
|
-
data: data,
|
|
529
|
-
panelClass: 'nxs-carousel-dialog',
|
|
530
|
-
width: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.width : undefined,
|
|
531
|
-
height: !!this.options.nxsCarouselDialogSize ? this.options.nxsCarouselDialogSize.height : undefined,
|
|
532
|
-
disableClose: !this.options.nxsCarouselDialogExitable,
|
|
533
|
-
});
|
|
534
|
-
};
|
|
535
|
-
NxsCarouselComponent.prototype.goToSlide = function (index, speed) {
|
|
536
|
-
var _a;
|
|
537
|
-
(_a = this.swiperInstance) === null || _a === void 0 ? void 0 : _a.slideTo(index, speed);
|
|
538
|
-
};
|
|
539
|
-
NxsCarouselComponent.prototype.next = function () {
|
|
540
|
-
var _a;
|
|
541
|
-
(_a = this.swiperInstance) === null || _a === void 0 ? void 0 : _a.slideNext();
|
|
542
|
-
};
|
|
543
|
-
NxsCarouselComponent.prototype.previous = function () {
|
|
544
|
-
var _a;
|
|
545
|
-
(_a = this.swiperInstance) === null || _a === void 0 ? void 0 : _a.slidePrev();
|
|
546
|
-
};
|
|
547
|
-
NxsCarouselComponent.prototype.onSwiperThumbnails = function (instance) {
|
|
548
|
-
var _a, _b;
|
|
549
|
-
if ((_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.nxsThumbnails) === null || _b === void 0 ? void 0 : _b.show)
|
|
550
|
-
this.thumbnailsSwiperInstance = instance;
|
|
551
|
-
else
|
|
552
|
-
this.thumbnailsSwiperInstance = null;
|
|
553
|
-
// if (this.options?.nxsThumbnails?.show) {
|
|
554
|
-
// const optionsClone = MainHelpers.cloneObject(this.options);
|
|
555
|
-
// optionsClone.thumbs = { swiper: this.thumbnailsSwiperInstance };
|
|
556
|
-
// // this.options = optionsClone;
|
|
557
|
-
// // this.options = { ...this.options, thumbs: { swiper: this.thumbnailsSwiperInstance } };
|
|
558
|
-
// console.log("Log ~ file: nxs-carousel.component.ts ~ line 416 ~ NxsCarouselComponent ~ onSwiperThumbnails ~ this.options ", this.options);
|
|
559
|
-
// this.options.thumbs = { swiper: this.thumbnailsSwiperInstance };
|
|
560
|
-
// }
|
|
561
|
-
};
|
|
562
|
-
NxsCarouselComponent.prototype.onSwiper = function (instance) {
|
|
563
|
-
var _this = this;
|
|
564
|
-
this.log('swiper ready - instance', instance);
|
|
565
|
-
this.swiperInstance = instance;
|
|
566
|
-
this.swiperInstance.on('click', function (swiperInstance, evt) {
|
|
567
|
-
// console.log("Log ~ file: nxs-carousel.component.ts ~ line 392 ~ NxsCarouselComponent ~ this.swiperInstance.on ~ evt", evt);
|
|
568
|
-
var target = evt.target;
|
|
569
|
-
if (target.className.indexOf('nxs-carousel-button') !== -1 || target.className.indexOf('swiper-pagination') !== -1)
|
|
570
|
-
return;
|
|
571
|
-
_this.runInZone(function () {
|
|
572
|
-
_this.slideClick.next(evt);
|
|
573
|
-
if (_this.options.nxsfullscreenOnClick && _this.images && _this.images.length && !_this.hasHtmlContent) {
|
|
574
|
-
_this.showFullScreenCarousel(_this.images, 'fullscreen-carousel');
|
|
575
|
-
}
|
|
576
|
-
});
|
|
577
|
-
});
|
|
578
|
-
};
|
|
579
|
-
NxsCarouselComponent.prototype.runInZone = function (callback) {
|
|
580
|
-
var args = [];
|
|
581
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
582
|
-
args[_i - 1] = arguments[_i];
|
|
583
|
-
}
|
|
584
|
-
if (!this.zone) {
|
|
585
|
-
callback(args);
|
|
586
|
-
}
|
|
587
|
-
return this.zone.run(function () { return callback(args); });
|
|
588
|
-
};
|
|
589
|
-
NxsCarouselComponent.prototype.onSlideChange = function (instances) {
|
|
590
|
-
var _this = this;
|
|
591
|
-
// this.swiperInstance = instance;
|
|
592
|
-
// this.log('slide change - instance', instance);
|
|
593
|
-
this.runInZone(function () {
|
|
594
|
-
var _a;
|
|
595
|
-
_this.currentSlide = ((_a = _this.swiperInstance) === null || _a === void 0 ? void 0 : _a.realIndex) || 0;
|
|
596
|
-
_this.log('slide change - currentSlide', _this.currentSlide);
|
|
597
|
-
_this.slideChange.next(_this.currentSlide);
|
|
598
|
-
});
|
|
599
|
-
};
|
|
600
|
-
return NxsCarouselComponent;
|
|
601
|
-
}());
|
|
602
|
-
NxsCarouselComponent.decorators = [
|
|
603
|
-
{ type: core.Component, args: [{
|
|
604
|
-
selector: 'nxs-carousel',
|
|
605
|
-
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 <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\" />\n <div *ngIf=\"lazy\" class=\"swiper-lazy-preloader swiper-lazy-preloader-black\"></div>\n </ng-template>\n </swiper>\n</div>",
|
|
606
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
607
|
-
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:50%;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 #add8e6}nxs-carousel .swiper-container.nxs-slider-thumbnails-on-main-slider{top:-20%}nxs-carousel .nxs-image-counter{position:absolute;top:0;right:0;color:#fff;padding:4px;font-weight:700;z-index:10}"]
|
|
608
|
-
},] }
|
|
609
|
-
];
|
|
610
|
-
NxsCarouselComponent.ctorParameters = function () { return [
|
|
611
|
-
{ type: dialog.MatDialog },
|
|
612
|
-
{ type: core.NgZone },
|
|
613
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [core.PLATFORM_ID,] }] },
|
|
614
|
-
{ type: NxsCarouselModuleConfig, decorators: [{ type: core.Optional }] }
|
|
615
|
-
]; };
|
|
616
|
-
NxsCarouselComponent.propDecorators = {
|
|
617
|
-
contents: [{ type: core.ContentChildren, args: [NxsSwiperTemplateDirective, { read: core.TemplateRef },] }],
|
|
618
|
-
swiperComponent: [{ type: core.ViewChild, args: ['swiper', { static: false },] }],
|
|
619
|
-
lazy: [{ type: core.Input }],
|
|
620
|
-
images: [{ type: core.Input }],
|
|
621
|
-
setOptions: [{ type: core.Input, args: ['options',] }],
|
|
622
|
-
hasHtmlContent: [{ type: core.Input }],
|
|
623
|
-
slideChange: [{ type: core.Output }],
|
|
624
|
-
slideClick: [{ type: core.Output }]
|
|
625
|
-
};
|
|
626
|
-
|
|
627
|
-
var NxsCarouselModule = /** @class */ (function () {
|
|
628
|
-
function NxsCarouselModule() {
|
|
629
|
-
}
|
|
630
|
-
NxsCarouselModule.forRoot = function (config) {
|
|
631
|
-
return {
|
|
632
|
-
ngModule: NxsCarouselModule,
|
|
633
|
-
providers: [
|
|
634
|
-
{ provide: NxsCarouselModuleConfig, useValue: config },
|
|
635
|
-
]
|
|
636
|
-
};
|
|
637
|
-
};
|
|
638
|
-
return NxsCarouselModule;
|
|
639
|
-
}());
|
|
640
|
-
NxsCarouselModule.decorators = [
|
|
641
|
-
{ type: core.NgModule, args: [{
|
|
642
|
-
declarations: [
|
|
643
|
-
NxsCarouselComponent,
|
|
644
|
-
NxsCarouselDialogComponent,
|
|
645
|
-
NxsSwiperTemplateDirective,
|
|
646
|
-
],
|
|
647
|
-
imports: [
|
|
648
|
-
common.CommonModule,
|
|
649
|
-
icon.MatIconModule,
|
|
650
|
-
button.MatButtonModule,
|
|
651
|
-
dialog.MatDialogModule,
|
|
652
|
-
angular.SwiperModule,
|
|
653
|
-
],
|
|
654
|
-
exports: [
|
|
655
|
-
NxsCarouselComponent,
|
|
656
|
-
NxsSwiperTemplateDirective,
|
|
657
|
-
],
|
|
658
|
-
},] }
|
|
659
|
-
];
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Generated bundle index. Do not edit.
|
|
663
|
-
*/
|
|
664
|
-
|
|
665
|
-
exports.NxsCarouselComponent = NxsCarouselComponent;
|
|
666
|
-
exports.NxsCarouselModule = NxsCarouselModule;
|
|
667
|
-
exports.ɵa = NxsSwiperTemplateDirective;
|
|
668
|
-
exports.ɵb = NxsCarouselModuleConfig;
|
|
669
|
-
exports.ɵc = NxsCarouselDialogComponent;
|
|
670
|
-
|
|
671
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
672
|
-
|
|
673
|
-
})));
|
|
674
|
-
//# sourceMappingURL=nextalys-carousel-lib-nxs-carousel.umd.js.map
|