@everymatrix/general-slider-navigation 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/cjs/general-slider-navigation.cjs.entry.js +362 -0
  2. package/dist/cjs/general-slider-navigation.cjs.js +19 -0
  3. package/dist/cjs/index-3420513e.js +1282 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/collection/collection-manifest.json +12 -0
  7. package/dist/collection/components/general-slider-navigation/general-slider-navigation.css +282 -0
  8. package/dist/collection/components/general-slider-navigation/general-slider-navigation.js +586 -0
  9. package/dist/collection/index.js +1 -0
  10. package/dist/collection/utils/locale.utils.js +28 -0
  11. package/dist/collection/utils/utils.js +56 -0
  12. package/dist/components/general-slider-navigation.d.ts +11 -0
  13. package/dist/components/general-slider-navigation.js +398 -0
  14. package/dist/components/index.d.ts +26 -0
  15. package/dist/components/index.js +1 -0
  16. package/dist/esm/general-slider-navigation.entry.js +358 -0
  17. package/dist/esm/general-slider-navigation.js +17 -0
  18. package/dist/esm/index-22e4ccbc.js +1256 -0
  19. package/dist/esm/index.js +1 -0
  20. package/dist/esm/loader.js +17 -0
  21. package/dist/esm/polyfills/core-js.js +11 -0
  22. package/dist/esm/polyfills/css-shim.js +1 -0
  23. package/dist/esm/polyfills/dom.js +79 -0
  24. package/dist/esm/polyfills/es5-html-element.js +1 -0
  25. package/dist/esm/polyfills/index.js +34 -0
  26. package/dist/esm/polyfills/system.js +6 -0
  27. package/dist/general-slider-navigation/general-slider-navigation.esm.js +1 -0
  28. package/dist/general-slider-navigation/index.esm.js +0 -0
  29. package/dist/general-slider-navigation/p-b72fe935.js +1 -0
  30. package/dist/general-slider-navigation/p-c80bf480.entry.js +1 -0
  31. package/dist/index.cjs.js +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/stencil.config.js +22 -0
  34. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-slider-navigation/.stencil/packages/general-slider-navigation/stencil.config.d.ts +2 -0
  35. package/dist/types/components/general-slider-navigation/general-slider-navigation.d.ts +100 -0
  36. package/dist/types/components.d.ts +157 -0
  37. package/dist/types/index.d.ts +1 -0
  38. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  39. package/dist/types/utils/locale.utils.d.ts +1 -0
  40. package/dist/types/utils/utils.d.ts +10 -0
  41. package/loader/cdn.js +3 -0
  42. package/loader/index.cjs.js +3 -0
  43. package/loader/index.d.ts +12 -0
  44. package/loader/index.es2017.js +3 -0
  45. package/loader/index.js +4 -0
  46. package/loader/package.json +10 -0
  47. package/package.json +19 -0
@@ -0,0 +1,362 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-3420513e.js');
6
+
7
+ const DEFAULT_LANGUAGE = 'en';
8
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu'];
9
+ const TRANSLATIONS = {
10
+ en: {
11
+ error: 'Error',
12
+ noResults: 'Loading, please wait ...',
13
+ },
14
+ hu: {
15
+ error: 'Error',
16
+ noResults: 'Loading, please wait ...',
17
+ },
18
+ ro: {
19
+ error: 'Eroare',
20
+ noResults: 'Loading, please wait ...',
21
+ },
22
+ fr: {
23
+ error: 'Error',
24
+ noResults: 'Loading, please wait ...',
25
+ },
26
+ ar: {
27
+ error: 'خطأ',
28
+ noResults: 'Loading, please wait ...',
29
+ }
30
+ };
31
+ const translate = (key, customLang) => {
32
+ const lang = customLang;
33
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
34
+ };
35
+
36
+ /**
37
+ * @name isMobile
38
+ * @description A method that returns if the browser used to access the app is from a mobile device or not
39
+ * @param {String} userAgent window.navigator.userAgent
40
+ * @returns {Boolean} true or false
41
+ */
42
+ const isMobile = (userAgent) => {
43
+ return !!(userAgent.toLowerCase().match(/android/i) ||
44
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
45
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
46
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
47
+ };
48
+ const getDevice = () => {
49
+ let userAgent = window.navigator.userAgent;
50
+ if (userAgent.toLowerCase().match(/android/i)) {
51
+ return 'Android';
52
+ }
53
+ if (userAgent.toLowerCase().match(/iphone/i)) {
54
+ return 'iPhone';
55
+ }
56
+ if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
57
+ return 'iPad';
58
+ }
59
+ return 'PC';
60
+ };
61
+ const getDevicePlatform = () => {
62
+ const device = getDevice();
63
+ if (device) {
64
+ if (device === 'PC') {
65
+ return 'dk';
66
+ }
67
+ else if (device === 'iPad' || device === 'iPhone') {
68
+ return 'ios';
69
+ }
70
+ else {
71
+ return 'mtWeb';
72
+ }
73
+ }
74
+ };
75
+ function checkDeviceType() {
76
+ const userAgent = navigator.userAgent.toLowerCase();
77
+ const width = screen.availWidth;
78
+ const height = screen.availHeight;
79
+ if (userAgent.includes('iphone')) {
80
+ return 'mobile';
81
+ }
82
+ if (userAgent.includes('android')) {
83
+ if (height > width && width < 800) {
84
+ return 'mobile';
85
+ }
86
+ if (width > height && height < 800) {
87
+ return 'tablet';
88
+ }
89
+ }
90
+ return 'desktop';
91
+ }
92
+
93
+ const generalSliderNavigationCss = ":host {\n display: block;\n}\n\n.PageError {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.PageError.TitleError {\n color: red;\n}\n\nmain {\n width: 100%;\n overflow: hidden;\n}\n\n.SliderItemsWrapper {\n display: flex;\n flex-direction: row;\n width: 100%;\n}\n\n.SliderWrapperContent {\n display: flex;\n justify-content: center;\n flex-direction: row;\n width: 100%;\n}\n\n.SliderItems {\n display: flex;\n transition: transform 0.4s ease-in-out;\n transform: translateX(0px);\n}\n\n.SliderItem {\n flex: 0 0 auto;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n border-radius: 5px;\n user-select: none;\n}\n\n.GridContainer {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: 1fr 1fr;\n gap: 0px 0px;\n margin: auto;\n width: 220px;\n height: 320px;\n border-radius: 5px;\n margin-bottom: 20px;\n background: var(--emfe-w-color-secondary, #FD2839);\n cursor: pointer;\n}\n.GridContainer .SliderImage {\n grid-area: 1/1/2/2;\n}\n.GridContainer .SliderImage img {\n object-fit: cover;\n height: 320px;\n width: 220px;\n border-radius: 5px;\n}\n.GridContainer .SliderContent {\n grid-area: 1/1/3/2;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: baseline;\n gap: 5px;\n margin-left: 20px;\n margin-bottom: 20px;\n}\n.GridContainer .SliderContent .DividerElement {\n background: var(--emfe-w-color-secondary, #FD2839);\n height: 3px;\n width: 60px;\n}\n.GridContainer .SliderContent .Title {\n font-size: 22px;\n font-weight: 400;\n text-transform: uppercase;\n color: var(--emfe-w-color-white, #FFFFFF);\n}\n\n.GridItems {\n display: grid;\n grid-template-columns: 49vw 49vw;\n grid-template-rows: auto auto;\n place-content: unset;\n gap: 2vw;\n margin: 0;\n width: 100vw;\n}\n\n.GridContainerMobile {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: 1fr 1fr;\n gap: 0px 0px;\n margin: auto;\n width: 49vw;\n height: 240px;\n border-radius: 15px;\n background: var(--emfe-w-color-secondary, #FD2839);\n cursor: pointer;\n}\n.GridContainerMobile .SliderImage {\n grid-area: 1/1/2/2;\n}\n.GridContainerMobile .SliderImage img {\n width: 49vw;\n object-fit: cover;\n height: 240px;\n border-radius: 5px;\n}\n.GridContainerMobile .SliderContent {\n grid-area: 1/1/3/2;\n display: flex;\n flex-flow: column;\n justify-content: flex-end;\n align-items: baseline;\n gap: 5px;\n margin-left: 20px;\n margin-bottom: 20px;\n}\n.GridContainerMobile .SliderContent .DividerElement {\n background: var(--emfe-w-color-secondary, #FD2839);\n height: 3px;\n width: 60px;\n}\n.GridContainerMobile .SliderContent .Title {\n font-size: 22px;\n font-weight: 400;\n text-transform: uppercase;\n color: var(--emfe-w-color-white, #FFFFFF);\n}\n\n.GridContainerMobile:nth-last-child(1):nth-child(odd) {\n display: grid;\n gap: 0px 0px;\n margin: auto;\n width: 100vw;\n}\n.GridContainerMobile:nth-last-child(1):nth-child(odd) .SliderImage {\n grid-area: 1/1/2/2;\n}\n.GridContainerMobile:nth-last-child(1):nth-child(odd) .SliderImage img {\n width: 100vw;\n object-fit: cover;\n height: 240px;\n border-radius: 5px;\n}\n\n.SliderNavButton {\n border: 0px;\n width: 45px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.SliderNavButton svg {\n width: 40px;\n stroke: var(--emfe-w-color-secondary, #FD2839);\n}\n\n.DisabledArrow svg {\n opacity: 0.2;\n stroke: var(--emfe-w-color-secondary, #FD2839);\n pointer-events: none;\n}\n\n@container (max-width: 475px) {\n .SliderItem {\n display: grid;\n grid-template-columns: repeat(auto-fill, max(250px, 1fr));\n color: var(--emfe-w-color-secondary, #FD2839);\n border-radius: 5px;\n user-select: none;\n }\n\n .GridContainer {\n display: grid;\n grid-template-columns: repeat(auto-fill, max(250px, 1fr));\n gap: 10px;\n margin: auto;\n width: 90%;\n height: 220px;\n border-radius: 5px;\n background: var(--emfe-w-color-secondary, #FD2839);\n cursor: pointer;\n }\n .GridContainer .SliderImage {\n grid-area: 1/1/2/2;\n }\n .GridContainer .SliderImage img {\n object-fit: cover;\n height: 220px;\n width: 100%;\n border-radius: 5px;\n }\n .GridContainer .SliderContent {\n grid-area: 1/1/3/2;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: flex-end;\n align-items: baseline;\n gap: 5px;\n margin-left: 20px;\n margin-bottom: 40px;\n }\n .GridContainer .SliderContent .DividerElement {\n background: var(--emfe-w-color-secondary, #FD2839);\n height: 3px;\n width: 60px;\n }\n .GridContainer .SliderContent .Title {\n font-size: 16px;\n font-weight: 400;\n text-transform: uppercase;\n color: var(--emfe-w-color-white, #FFFFFF);\n }\n\n .GridItems {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: auto auto auto auto;\n gap: 2cqw;\n width: 100cqw;\n justify-items: stretch;\n }\n\n .GridContainerMobile {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: 1fr 1fr;\n gap: 0px 0px;\n margin: auto;\n height: 200px;\n border-radius: 15px;\n background: white;\n cursor: pointer;\n }\n .GridContainerMobile .SliderImage {\n grid-area: 1/1/2/2;\n }\n .GridContainerMobile .SliderImage img {\n object-fit: cover;\n height: 200px;\n border-radius: 5px;\n }\n .GridContainerMobile .SliderContent {\n grid-area: 1/1/3/2;\n display: flex;\n flex-flow: column;\n justify-content: flex-end;\n align-items: baseline;\n gap: 5px;\n margin-left: 20px;\n margin-bottom: 20px;\n }\n .GridContainerMobile .SliderContent .DividerElement {\n background: var(--emfe-w-color-secondary, #FD2839);\n height: 3px;\n width: 60px;\n }\n .GridContainerMobile .SliderContent .Title {\n font-size: 22px;\n font-weight: 400;\n text-transform: uppercase;\n color: var(--emfe-w-color-white, #FFFFFF);\n }\n}";
94
+
95
+ const GeneralSliderNavigation = class {
96
+ constructor(hostRef) {
97
+ index.registerInstance(this, hostRef);
98
+ /**
99
+ * Client custom styling via inline style
100
+ */
101
+ this.clientStyling = '';
102
+ /**
103
+ * Client custom styling via url
104
+ */
105
+ this.clientStylingUrl = '';
106
+ /**
107
+ * CMS Endpoint stage
108
+ */
109
+ this.cmsEnv = 'stage';
110
+ /**
111
+ * Language of the widget
112
+ */
113
+ this.language = 'en';
114
+ /**
115
+ * User roles
116
+ */
117
+ this.userRoles = 'everyone';
118
+ /**
119
+ * Show slider navigate arrows
120
+ */
121
+ this.showSliderArrows = true;
122
+ /**
123
+ * Show slider navigate arrows on mobile
124
+ */
125
+ this.showSliderArrowsMobile = true;
126
+ /**
127
+ * You will see a fixed grid without a slider when using a mobile device.
128
+ */
129
+ this.showMobileGrid = false;
130
+ /**
131
+ * Set if you want to have a slider on mobile device.
132
+ */
133
+ this.showNavigationSliderMobile = true;
134
+ /**
135
+ * Set if you want to have a slider on desktop.
136
+ */
137
+ this.showNavigationSliderDesktop = true;
138
+ /**
139
+ * Specify the number of items you would like to be displayed on desktop.
140
+ */
141
+ this.itemsPerPageDesktop = 3;
142
+ /**
143
+ * Specify the number of items you would like to be displayed on mobile devices.
144
+ */
145
+ this.itemsPerPageMobile = 2;
146
+ this.isLoading = true;
147
+ this.limitStylingAppends = false;
148
+ this.hasErrors = false;
149
+ this.device = '';
150
+ this.activeIndex = 0;
151
+ this.sliderMenuElementWidth = 0;
152
+ this.userAgent = window.navigator.userAgent;
153
+ this.isMobile = isMobile(this.userAgent);
154
+ this.allElementsWidth = 0;
155
+ this.xDown = null;
156
+ this.yDown = null;
157
+ this.resizeHandler = () => {
158
+ this.calculateSliderWidth();
159
+ };
160
+ this.orientationChangeHandler = () => {
161
+ setTimeout(() => {
162
+ this.calculateSliderWidth();
163
+ }, 10);
164
+ };
165
+ this.navigationTo = (url, type, isExternal) => {
166
+ if (isExternal) { // if link is external, inform FE
167
+ window.postMessage({ type: 'ExternalLinkNavigation', externalUrl: url, target: isExternal, linkType: type }, window.location.href);
168
+ }
169
+ else { // if link is internal, inform FE
170
+ window.postMessage({ type: 'LinkNavigation', navUrl: url, target: isExternal }, window.location.href);
171
+ }
172
+ };
173
+ this.setImage = (image) => {
174
+ let source = '';
175
+ this.device = checkDeviceType();
176
+ switch (this.device) {
177
+ case 'mobile':
178
+ source = image.srcMobile;
179
+ break;
180
+ case 'tablet':
181
+ source = image.srcTablet;
182
+ break;
183
+ case 'desktop':
184
+ source = image.srcDesktop;
185
+ break;
186
+ }
187
+ return source;
188
+ };
189
+ this.setClientStyling = () => {
190
+ let sheet = document.createElement('style');
191
+ sheet.innerHTML = this.clientStyling;
192
+ this.stylingContainer.prepend(sheet);
193
+ };
194
+ this.setClientStylingURL = () => {
195
+ let url = new URL(this.clientStylingUrl);
196
+ let cssFile = document.createElement('style');
197
+ fetch(url.href)
198
+ .then((res) => res.text())
199
+ .then((data) => {
200
+ cssFile.innerHTML = data;
201
+ setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
202
+ })
203
+ .catch((err) => {
204
+ console.log('error ', err);
205
+ });
206
+ };
207
+ }
208
+ watchEndpoint(newValue, oldValue) {
209
+ if (newValue && newValue != oldValue && this.cmsEndpoint) {
210
+ this.getGeneralSliderNavigation().then((GeneralSliderNavigation) => {
211
+ this.sliderData = GeneralSliderNavigation;
212
+ });
213
+ }
214
+ }
215
+ connectedCallback() {
216
+ window.screen.orientation.addEventListener('change', this.orientationChangeHandler);
217
+ }
218
+ componentWillLoad() {
219
+ if (this.cmsEndpoint && this.language) {
220
+ return this.getGeneralSliderNavigation().then((GeneralSliderNavigation) => {
221
+ this.sliderData = GeneralSliderNavigation;
222
+ });
223
+ }
224
+ }
225
+ componentDidLoad() {
226
+ window.addEventListener('resize', this.resizeHandler);
227
+ }
228
+ componentDidRender() {
229
+ this.el.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: true });
230
+ this.el.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: true });
231
+ // start custom styling area
232
+ if (!this.limitStylingAppends && this.stylingContainer) {
233
+ if (this.clientStyling)
234
+ this.setClientStyling();
235
+ this.limitStylingAppends = true;
236
+ }
237
+ // end custom styling area
238
+ }
239
+ componentDidUpdate() {
240
+ this.calculateSliderWidth();
241
+ }
242
+ disconnectedCallback() {
243
+ this.el.removeEventListener('touchstart', this.handleTouchStart);
244
+ this.el.removeEventListener('touchmove', this.handleTouchMove);
245
+ window.screen.orientation.removeEventListener('change', this.orientationChangeHandler);
246
+ window.removeEventListener('resize', this.resizeHandler);
247
+ }
248
+ getGeneralSliderNavigation() {
249
+ let url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
250
+ url.searchParams.append('env', this.cmsEnv);
251
+ url.searchParams.append('userRoles', this.userRoles);
252
+ url.searchParams.append('device', getDevicePlatform());
253
+ return new Promise((resolve, reject) => {
254
+ this.isLoading = true;
255
+ fetch(url.href)
256
+ .then((res) => res.json())
257
+ .then((menuSliderData) => {
258
+ resolve(menuSliderData.banners);
259
+ })
260
+ .catch((err) => {
261
+ console.error(err);
262
+ this.hasErrors = true;
263
+ reject(err);
264
+ }).finally(() => {
265
+ this.isLoading = false;
266
+ });
267
+ });
268
+ }
269
+ handleTouchStart(evt) {
270
+ const firstTouch = this.getTouches(evt)[0];
271
+ this.xDown = firstTouch.clientX;
272
+ this.yDown = firstTouch.clientY;
273
+ }
274
+ handleTouchMove(evt) {
275
+ if (!this.xDown || !this.yDown)
276
+ return;
277
+ let xUp = evt.touches[0].clientX;
278
+ let yUp = evt.touches[0].clientY;
279
+ let xDiff = this.xDown - xUp;
280
+ let yDiff = this.yDown - yUp;
281
+ if (Math.abs(xDiff) > Math.abs(yDiff)) {
282
+ if (xDiff > 0) {
283
+ this.move(1);
284
+ }
285
+ else {
286
+ this.move(-1);
287
+ }
288
+ }
289
+ this.xDown = null;
290
+ this.yDown = null;
291
+ }
292
+ ;
293
+ calculateSliderWidth() {
294
+ if (!this.sliderMenuElement)
295
+ return;
296
+ this.sliderMenuElementWidth = this.sliderMenuElement.clientWidth;
297
+ }
298
+ ;
299
+ getTouches(evt) {
300
+ return evt.touches || evt.originalEvent.touches;
301
+ }
302
+ setActive(index) {
303
+ const maxLength = Math.ceil(this.sliderData.length / (!this.isMobile ? this.itemsPerPageDesktop : this.itemsPerPageMobile));
304
+ if (index >= 0) {
305
+ if (index >= maxLength - 1) {
306
+ this.activeIndex = maxLength - 1;
307
+ }
308
+ else {
309
+ this.activeIndex = index;
310
+ }
311
+ }
312
+ else {
313
+ this.activeIndex = 0;
314
+ }
315
+ }
316
+ move(direction) {
317
+ this.setActive(this.activeIndex + direction);
318
+ }
319
+ ;
320
+ goTo(index) {
321
+ let diff = this.activeIndex - index;
322
+ if (diff > 0) {
323
+ for (let i = 0; i < diff; i++) {
324
+ this.move(-1);
325
+ }
326
+ }
327
+ else {
328
+ for (let i = 0; i > diff; i--) {
329
+ this.move(1);
330
+ }
331
+ }
332
+ }
333
+ render() {
334
+ const styles = {
335
+ transform: `translate(${(+this.sliderMenuElementWidth * this.activeIndex) * -1}px, 0px)`
336
+ };
337
+ const itemStyleDesktop = {
338
+ width: `${this.sliderMenuElementWidth / Math.ceil(this.itemsPerPageDesktop)}px`
339
+ };
340
+ const itemStyleMobile = {
341
+ width: `${this.sliderMenuElementWidth / this.itemsPerPageMobile}px`
342
+ };
343
+ if (this.hasErrors) {
344
+ return (index.h("div", { class: "PageError" }, index.h("div", { class: "TitleError" }, translate('error', this.language))));
345
+ }
346
+ if (!this.isLoading) {
347
+ return (index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "SliderWrapper" }, index.h("div", { class: "SliderWrapperContent", ref: (el) => this.slider = el }, ((this.showSliderArrows && !this.isMobile) || (this.showSliderArrowsMobile && this.isMobile)) &&
348
+ index.h("div", { class: this.activeIndex === 0 ? 'SliderNavButton DisabledArrow' : 'SliderNavButton', onClick: () => this.move(-1) }, index.h("svg", { fill: "none", stroke: "var(--emfe-w-color-secondary, #FD2839)", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 19l-7-7 7-7" }))), this.showNavigationSliderMobile && this.isMobile ? (index.h("main", null, index.h("div", { style: styles, ref: (el) => this.sliderMenuElement = el, class: "SliderItems" }, this.sliderData.map((data) => index.h("div", { class: "SliderItem", style: itemStyleMobile }, index.h("div", { class: "GridContainer", onClick: () => data.externalLink ? this.navigationTo(data.url, data.targetType, data.externalLink) : this.navigationTo(data.url, data.targetType, false) }, index.h("div", { class: "SliderImage" }, index.h("img", { src: this.setImage(data.image), alt: data.title })), index.h("div", { class: "SliderContent" }, index.h("div", { class: "DividerElement" }), index.h("div", { class: "Title" }, data.title)))))))) : (this.showNavigationSliderDesktop && !this.isMobile &&
349
+ index.h("main", null, index.h("div", { class: "SliderItems", style: styles, ref: (el) => this.sliderMenuElement = el }, index.h("div", { class: "SliderItemsWrapper" }, this.sliderData.map((data) => index.h("div", { class: "SliderItem", style: itemStyleDesktop }, index.h("div", { class: "GridContainer", onClick: () => data.externalLink ? this.navigationTo(data.url, data.targetType, data.externalLink) : this.navigationTo(data.url, data.targetType, false) }, index.h("div", { class: "SliderImage" }, index.h("img", { src: this.setImage(data.image), alt: data.title })), index.h("div", { class: "SliderContent" }, index.h("div", { class: "DividerElement" }), index.h("div", { class: "Title" }, data.title))))))))), ((this.showSliderArrows && !this.isMobile) || (this.showSliderArrowsMobile && this.isMobile)) &&
350
+ index.h("div", { class: this.activeIndex === Math.ceil(this.sliderData.length / (!this.isMobile ? this.itemsPerPageDesktop : this.itemsPerPageMobile)) - 1 ? ' SliderNavButton DisabledArrow disabled' : 'SliderNavButton', onClick: () => this.move(1) }, index.h("svg", { fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 5l7 7-7 7" }))))), (this.showMobileGrid && this.isMobile) &&
351
+ index.h("main", { class: "GridItems GridMobile" }, this.sliderData.map((dataMobile) => index.h("div", { class: "GridContainerMobile", onClick: () => dataMobile.externalLink ? this.navigationTo(dataMobile.url, dataMobile.targetType, dataMobile.externalLink) : this.navigationTo(dataMobile.url, dataMobile.targetType, false) }, index.h("div", { class: "SliderImage" }, index.h("img", { src: this.setImage(dataMobile.image), alt: dataMobile.title })), index.h("div", { class: "SliderContent" }, index.h("div", { class: "DividerElement" }), index.h("div", { class: "Title" }, dataMobile.title)))))));
352
+ }
353
+ }
354
+ get el() { return index.getElement(this); }
355
+ static get watchers() { return {
356
+ "cmsEndpoint": ["watchEndpoint"],
357
+ "language": ["watchEndpoint"]
358
+ }; }
359
+ };
360
+ GeneralSliderNavigation.style = generalSliderNavigationCss;
361
+
362
+ exports.general_slider_navigation = GeneralSliderNavigation;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-3420513e.js');
4
+
5
+ /*
6
+ Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
7
+ */
8
+ const patchBrowser = () => {
9
+ const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('general-slider-navigation.cjs.js', document.baseURI).href));
10
+ const opts = {};
11
+ if (importMeta !== '') {
12
+ opts.resourcesUrl = new URL('.', importMeta).href;
13
+ }
14
+ return index.promiseResolve(opts);
15
+ };
16
+
17
+ patchBrowser().then(options => {
18
+ return index.bootstrapLazy([["general-slider-navigation.cjs",[[1,"general-slider-navigation",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"cmsEndpoint":[513,"cms-endpoint"],"cmsEnv":[513,"cms-env"],"language":[513],"userRoles":[513,"user-roles"],"showSliderArrows":[516,"show-slider-arrows"],"showSliderArrowsMobile":[516,"show-slider-arrows-mobile"],"showMobileGrid":[516,"show-mobile-grid"],"showNavigationSliderMobile":[516,"show-navigation-slider-mobile"],"showNavigationSliderDesktop":[516,"show-navigation-slider-desktop"],"itemsPerPageDesktop":[514,"items-per-page-desktop"],"itemsPerPageMobile":[514,"items-per-page-mobile"],"externalLinkActive":[1540,"external-link-active"],"internalLinkActive":[1540,"internal-link-active"],"isLoading":[32],"limitStylingAppends":[32],"hasErrors":[32],"device":[32],"activeIndex":[32],"sliderMenuElementWidth":[32]}]]]], options);
19
+ });