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