@everymatrix/general-footer-template 1.76.10 → 1.76.12

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.
@@ -115,6 +115,10 @@ const normalizeRepeaterContent = (data) => {
115
115
  categoryTitle: 'test',
116
116
  content: 'test'
117
117
  },
118
+ customCSS: {
119
+ categoryTitle: 'test',
120
+ content: 'test'
121
+ },
118
122
  download: {
119
123
  categoryTitle: 'test',
120
124
  content: 'test'
@@ -209,6 +213,7 @@ const normalizeRepeaterContent = (data) => {
209
213
  repeaterResponse.repeaters.downloadApp.content = data.downloadInfos.imageArea || [];
210
214
  repeaterResponse.wysiwyg.downloadApp.content = data.downloadInfos.downloadDescription || '';
211
215
  repeaterResponse.wysiwyg.copyright.content = data.copyright;
216
+ repeaterResponse.wysiwyg.customCSS.content = data.customCSS;
212
217
  repeaterResponse.wysiwyg["license-description"].content = data.licenseDesc;
213
218
  return repeaterResponse;
214
219
  };
@@ -293,6 +298,7 @@ const GeneralFooterTemplate = class {
293
298
  this.postMessageEvent = 'NavigateTo';
294
299
  this.clientStyling = '';
295
300
  this.clientStylingUrl = '';
301
+ this.customCss = undefined;
296
302
  this.translationUrl = '';
297
303
  this.clockFormat = 'HH:MM:ss';
298
304
  this.timeZone = '';
@@ -337,6 +343,9 @@ const GeneralFooterTemplate = class {
337
343
  setClientStyling(this.stylingContainer, this.clientStyling);
338
344
  if (this.clientStylingUrl)
339
345
  setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
346
+ this.customCss = this.footerContent.wysiwyg.customCSS.content;
347
+ if (this.customCss)
348
+ setClientStyling(this.hostEl.shadowRoot, this.customCss);
340
349
  }
341
350
  }
342
351
  render() {
@@ -353,6 +362,7 @@ const GeneralFooterTemplate = class {
353
362
  return (index.h("footer", { class: "FooterContainer", ref: el => this.stylingContainer = el }, index.h("div", { class: "FooterGrid customStyle" }, footerSections)));
354
363
  }
355
364
  }
365
+ get hostEl() { return index.getElement(this); }
356
366
  };
357
367
  GeneralFooterTemplate.style = GeneralFooterTemplateStyle0;
358
368
 
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["custom-content-section.cjs",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list.cjs",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock.cjs",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template.cjs",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2.cjs",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
22
+ return index.bootstrapLazy([["custom-content-section.cjs",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list.cjs",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock.cjs",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template.cjs",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"customCss":[513,"custom-css"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2.cjs",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"loading":[1],"imgLoaded":[32]},null,{"src":["onSrcChange"],"loading":["onLoadingChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["custom-content-section.cjs",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list.cjs",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock.cjs",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template.cjs",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2.cjs",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
11
+ return index.bootstrapLazy([["custom-content-section.cjs",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list.cjs",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock.cjs",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template.cjs",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"customCss":[513,"custom-css"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2.cjs",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"loading":[1],"imgLoaded":[32]},null,{"src":["onSrcChange"],"loading":["onLoadingChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -10,59 +10,140 @@ const UiImageStyle0 = uiImageCss;
10
10
  const UiImage = class {
11
11
  constructor(hostRef) {
12
12
  index.registerInstance(this, hostRef);
13
+ this.hasStarted = false;
13
14
  this.src = undefined;
14
15
  this.width = undefined;
15
16
  this.height = undefined;
16
17
  this.alt = undefined;
17
18
  this.styles = undefined;
18
19
  this.detectDistance = '200px';
20
+ this.loading = 'lazy';
19
21
  this.imgLoaded = false;
20
- this.shouldLoad = false;
21
22
  }
22
- handleSrc() {
23
- if (!this.shouldLoad) {
23
+ onSrcChange() {
24
+ if (this.loading === 'eager')
24
25
  return;
26
+ this.imgLoaded = false;
27
+ this.hasStarted = false;
28
+ if (typeof window === 'undefined' || !('IntersectionObserver' in window)) {
29
+ this.beginLoad();
25
30
  }
26
- const preloadedImage = new Image();
27
- preloadedImage.onload = () => {
28
- if (this.image) {
29
- this.image.src = this.src;
30
- this.imgLoaded = true;
31
- preloadedImage.onload = null;
31
+ }
32
+ onLoadingChange(newVal, oldVal) {
33
+ if (newVal === oldVal)
34
+ return;
35
+ this.cleanupObserver();
36
+ this.detachImgHandlers();
37
+ if (newVal === 'eager') {
38
+ if (this.imgEl && this.src) {
39
+ this.imgEl.src = this.src;
32
40
  }
33
- };
34
- preloadedImage.src = this.src;
41
+ this.hasStarted = true;
42
+ }
43
+ else {
44
+ this.imgLoaded = false;
45
+ this.hasStarted = false;
46
+ this.setupObserver();
47
+ }
35
48
  }
36
49
  componentDidLoad() {
37
- if ('IntersectionObserver' in window) {
38
- this.el.__uxComponent = this;
39
- if (!window.EMUxObserver) {
40
- window.EMUxObserver = new IntersectionObserver((entries) => {
41
- entries.forEach(entry => {
42
- if (entry.isIntersecting) {
43
- const comp = entry.target.__uxComponent;
44
- if (comp) {
45
- comp.shouldLoad = true;
46
- comp.handleSrc();
47
- }
48
- window.EMUxObserver.unobserve(entry.target);
49
- }
50
- });
51
- }, { rootMargin: this.detectDistance });
50
+ if (this.loading === 'eager')
51
+ return;
52
+ this.setupObserver();
53
+ }
54
+ disconnectedCallback() {
55
+ this.cleanupObserver();
56
+ this.detachImgHandlers();
57
+ }
58
+ canUseIO() {
59
+ return typeof window !== 'undefined' && 'IntersectionObserver' in window;
60
+ }
61
+ setupObserver() {
62
+ if (this.loading === 'eager')
63
+ return;
64
+ if (!this.canUseIO()) {
65
+ this.beginLoad();
66
+ return;
67
+ }
68
+ this.io = new IntersectionObserver((entries) => {
69
+ var _a;
70
+ for (const entry of entries) {
71
+ if (entry.isIntersecting) {
72
+ this.beginLoad();
73
+ (_a = this.io) === null || _a === void 0 ? void 0 : _a.unobserve(entry.target);
74
+ this.cleanupObserver();
75
+ break;
76
+ }
52
77
  }
53
- window.EMUxObserver.observe(this.el);
78
+ }, { root: null, rootMargin: this.detectDistance, threshold: 0 });
79
+ this.io.observe(this.el);
80
+ }
81
+ cleanupObserver() {
82
+ var _a;
83
+ (_a = this.io) === null || _a === void 0 ? void 0 : _a.disconnect();
84
+ this.io = undefined;
85
+ }
86
+ wireOnceHandlers() {
87
+ if (!this.imgEl)
88
+ return;
89
+ this.detachImgHandlers();
90
+ this._onLoad = () => {
91
+ var _a;
92
+ if (this.currentSrc && ((_a = this.imgEl) === null || _a === void 0 ? void 0 : _a.currentSrc) && !this.imgEl.currentSrc.includes(this.currentSrc))
93
+ return;
94
+ this.imgLoaded = true;
95
+ };
96
+ this._onError = () => {
97
+ console.error('Load image failed:', this.src);
98
+ };
99
+ this.imgEl.addEventListener('load', this._onLoad, { once: true });
100
+ this.imgEl.addEventListener('error', this._onError, { once: true });
101
+ }
102
+ detachImgHandlers() {
103
+ if (!this.imgEl)
104
+ return;
105
+ if (this._onLoad)
106
+ this.imgEl.removeEventListener('load', this._onLoad);
107
+ if (this._onError)
108
+ this.imgEl.removeEventListener('error', this._onError);
109
+ this._onLoad = undefined;
110
+ this._onError = undefined;
111
+ }
112
+ beginLoad() {
113
+ if (this.hasStarted)
114
+ return;
115
+ if (!this.imgEl)
116
+ return;
117
+ if (!this.src)
118
+ return;
119
+ this.hasStarted = true;
120
+ this.wireOnceHandlers();
121
+ if (this.imgEl.complete && this.imgEl.naturalWidth > 0) {
122
+ this.imgLoaded = true;
123
+ return;
54
124
  }
55
- else {
56
- this.shouldLoad = true;
57
- this.handleSrc();
125
+ this.currentSrc = this.src;
126
+ this.imgEl.src = this.src;
127
+ if (this.imgEl.complete && this.imgEl.naturalWidth > 0) {
128
+ this.imgLoaded = true;
58
129
  }
59
130
  }
131
+ get showSkeleton() {
132
+ return this.loading !== 'eager' && !this.imgLoaded;
133
+ }
134
+ renderEager() {
135
+ return (index.h(index.Host, { class: "HostContainer" }, index.h("img", { src: this.src, decoding: "async", style: this.styles, class: "UiContainer Visible", alt: this.alt, width: this.width, height: this.height, loading: "eager" })));
136
+ }
137
+ renderLazy() {
138
+ return (index.h(index.Host, { class: "HostContainer", "aria-busy": !this.imgLoaded ? 'true' : 'false' }, this.showSkeleton && (index.h("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" })), index.h("img", { ref: (el) => (this.imgEl = el), src: undefined, decoding: "async", style: this.styles, class: `UiContainer ${this.imgLoaded ? 'Visible' : 'Hidden'}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" })));
139
+ }
60
140
  render() {
61
- return (index.h(index.Host, { key: 'f506ba73852f257ad80bf59ca177d2065a5f365e', class: "HostContainer" }, !this.imgLoaded && (index.h("ui-skeleton", { key: '564ebfab701f827ddc2debccb7615926dbc9e876', class: "UiContainer", structure: "image", width: "100%", height: "100%" })), index.h("img", { key: '2188ca4494c10587f064acc5459ffc468948f497', ref: (el) => (this.image = el), src: this.shouldLoad ? this.src : undefined, onLoad: () => (this.imgLoaded = true), style: this.styles, class: `UiContainer ${this.imgLoaded ? 'Visible' : 'Hidden'}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" })));
141
+ return this.loading === 'eager' ? this.renderEager() : this.renderLazy();
62
142
  }
63
143
  get el() { return index.getElement(this); }
64
144
  static get watchers() { return {
65
- "src": ["handleSrc"]
145
+ "src": ["onSrcChange"],
146
+ "loading": ["onLoadingChange"]
66
147
  }; }
67
148
  };
68
149
  UiImage.style = UiImageStyle0;
@@ -21,6 +21,7 @@ export class GeneralFooterTemplate {
21
21
  this.postMessageEvent = 'NavigateTo';
22
22
  this.clientStyling = '';
23
23
  this.clientStylingUrl = '';
24
+ this.customCss = undefined;
24
25
  this.translationUrl = '';
25
26
  this.clockFormat = 'HH:MM:ss';
26
27
  this.timeZone = '';
@@ -65,6 +66,9 @@ export class GeneralFooterTemplate {
65
66
  setClientStyling(this.stylingContainer, this.clientStyling);
66
67
  if (this.clientStylingUrl)
67
68
  setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
69
+ this.customCss = this.footerContent.wysiwyg.customCSS.content;
70
+ if (this.customCss)
71
+ setClientStyling(this.hostEl.shadowRoot, this.customCss);
68
72
  }
69
73
  }
70
74
  render() {
@@ -305,6 +309,23 @@ export class GeneralFooterTemplate {
305
309
  "reflect": true,
306
310
  "defaultValue": "''"
307
311
  },
312
+ "customCss": {
313
+ "type": "string",
314
+ "mutable": false,
315
+ "complexType": {
316
+ "original": "string",
317
+ "resolved": "string",
318
+ "references": {}
319
+ },
320
+ "required": true,
321
+ "optional": false,
322
+ "docs": {
323
+ "tags": [],
324
+ "text": "styling set by operator in CMS"
325
+ },
326
+ "attribute": "custom-css",
327
+ "reflect": true
328
+ },
308
329
  "translationUrl": {
309
330
  "type": "string",
310
331
  "mutable": false,
@@ -383,4 +404,5 @@ export class GeneralFooterTemplate {
383
404
  "hasErrors": {}
384
405
  };
385
406
  }
407
+ static get elementRef() { return "hostEl"; }
386
408
  }
@@ -116,6 +116,10 @@ export const normalizeRepeaterContent = (data) => {
116
116
  categoryTitle: 'test',
117
117
  content: 'test'
118
118
  },
119
+ customCSS: {
120
+ categoryTitle: 'test',
121
+ content: 'test'
122
+ },
119
123
  download: {
120
124
  categoryTitle: 'test',
121
125
  content: 'test'
@@ -210,6 +214,7 @@ export const normalizeRepeaterContent = (data) => {
210
214
  repeaterResponse.repeaters.downloadApp.content = data.downloadInfos.imageArea || [];
211
215
  repeaterResponse.wysiwyg.downloadApp.content = data.downloadInfos.downloadDescription || '';
212
216
  repeaterResponse.wysiwyg.copyright.content = data.copyright;
217
+ repeaterResponse.wysiwyg.customCSS.content = data.customCSS;
213
218
  repeaterResponse.wysiwyg["license-description"].content = data.licenseDesc;
214
219
  return repeaterResponse;
215
220
  };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-83985f06.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-83985f06.js';
2
2
 
3
3
  /**
4
4
  * custom rules for component types
@@ -111,6 +111,10 @@ const normalizeRepeaterContent = (data) => {
111
111
  categoryTitle: 'test',
112
112
  content: 'test'
113
113
  },
114
+ customCSS: {
115
+ categoryTitle: 'test',
116
+ content: 'test'
117
+ },
114
118
  download: {
115
119
  categoryTitle: 'test',
116
120
  content: 'test'
@@ -205,6 +209,7 @@ const normalizeRepeaterContent = (data) => {
205
209
  repeaterResponse.repeaters.downloadApp.content = data.downloadInfos.imageArea || [];
206
210
  repeaterResponse.wysiwyg.downloadApp.content = data.downloadInfos.downloadDescription || '';
207
211
  repeaterResponse.wysiwyg.copyright.content = data.copyright;
212
+ repeaterResponse.wysiwyg.customCSS.content = data.customCSS;
208
213
  repeaterResponse.wysiwyg["license-description"].content = data.licenseDesc;
209
214
  return repeaterResponse;
210
215
  };
@@ -289,6 +294,7 @@ const GeneralFooterTemplate = class {
289
294
  this.postMessageEvent = 'NavigateTo';
290
295
  this.clientStyling = '';
291
296
  this.clientStylingUrl = '';
297
+ this.customCss = undefined;
292
298
  this.translationUrl = '';
293
299
  this.clockFormat = 'HH:MM:ss';
294
300
  this.timeZone = '';
@@ -333,6 +339,9 @@ const GeneralFooterTemplate = class {
333
339
  setClientStyling(this.stylingContainer, this.clientStyling);
334
340
  if (this.clientStylingUrl)
335
341
  setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
342
+ this.customCss = this.footerContent.wysiwyg.customCSS.content;
343
+ if (this.customCss)
344
+ setClientStyling(this.hostEl.shadowRoot, this.customCss);
336
345
  }
337
346
  }
338
347
  render() {
@@ -349,6 +358,7 @@ const GeneralFooterTemplate = class {
349
358
  return (h("footer", { class: "FooterContainer", ref: el => this.stylingContainer = el }, h("div", { class: "FooterGrid customStyle" }, footerSections)));
350
359
  }
351
360
  }
361
+ get hostEl() { return getElement(this); }
352
362
  };
353
363
  GeneralFooterTemplate.style = GeneralFooterTemplateStyle0;
354
364
 
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["custom-content-section",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]],["image-list",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
19
+ return bootstrapLazy([["custom-content-section",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"customCss":[513,"custom-css"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"loading":[1],"imgLoaded":[32]},null,{"src":["onSrcChange"],"loading":["onLoadingChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]],["image-list",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
20
20
  });
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["custom-content-section",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]],["image-list",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
8
+ return bootstrapLazy([["custom-content-section",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"customCss":[513,"custom-css"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"loading":[1],"imgLoaded":[32]},null,{"src":["onSrcChange"],"loading":["onLoadingChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]],["image-list",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -6,59 +6,140 @@ const UiImageStyle0 = uiImageCss;
6
6
  const UiImage = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
+ this.hasStarted = false;
9
10
  this.src = undefined;
10
11
  this.width = undefined;
11
12
  this.height = undefined;
12
13
  this.alt = undefined;
13
14
  this.styles = undefined;
14
15
  this.detectDistance = '200px';
16
+ this.loading = 'lazy';
15
17
  this.imgLoaded = false;
16
- this.shouldLoad = false;
17
18
  }
18
- handleSrc() {
19
- if (!this.shouldLoad) {
19
+ onSrcChange() {
20
+ if (this.loading === 'eager')
20
21
  return;
22
+ this.imgLoaded = false;
23
+ this.hasStarted = false;
24
+ if (typeof window === 'undefined' || !('IntersectionObserver' in window)) {
25
+ this.beginLoad();
21
26
  }
22
- const preloadedImage = new Image();
23
- preloadedImage.onload = () => {
24
- if (this.image) {
25
- this.image.src = this.src;
26
- this.imgLoaded = true;
27
- preloadedImage.onload = null;
27
+ }
28
+ onLoadingChange(newVal, oldVal) {
29
+ if (newVal === oldVal)
30
+ return;
31
+ this.cleanupObserver();
32
+ this.detachImgHandlers();
33
+ if (newVal === 'eager') {
34
+ if (this.imgEl && this.src) {
35
+ this.imgEl.src = this.src;
28
36
  }
29
- };
30
- preloadedImage.src = this.src;
37
+ this.hasStarted = true;
38
+ }
39
+ else {
40
+ this.imgLoaded = false;
41
+ this.hasStarted = false;
42
+ this.setupObserver();
43
+ }
31
44
  }
32
45
  componentDidLoad() {
33
- if ('IntersectionObserver' in window) {
34
- this.el.__uxComponent = this;
35
- if (!window.EMUxObserver) {
36
- window.EMUxObserver = new IntersectionObserver((entries) => {
37
- entries.forEach(entry => {
38
- if (entry.isIntersecting) {
39
- const comp = entry.target.__uxComponent;
40
- if (comp) {
41
- comp.shouldLoad = true;
42
- comp.handleSrc();
43
- }
44
- window.EMUxObserver.unobserve(entry.target);
45
- }
46
- });
47
- }, { rootMargin: this.detectDistance });
46
+ if (this.loading === 'eager')
47
+ return;
48
+ this.setupObserver();
49
+ }
50
+ disconnectedCallback() {
51
+ this.cleanupObserver();
52
+ this.detachImgHandlers();
53
+ }
54
+ canUseIO() {
55
+ return typeof window !== 'undefined' && 'IntersectionObserver' in window;
56
+ }
57
+ setupObserver() {
58
+ if (this.loading === 'eager')
59
+ return;
60
+ if (!this.canUseIO()) {
61
+ this.beginLoad();
62
+ return;
63
+ }
64
+ this.io = new IntersectionObserver((entries) => {
65
+ var _a;
66
+ for (const entry of entries) {
67
+ if (entry.isIntersecting) {
68
+ this.beginLoad();
69
+ (_a = this.io) === null || _a === void 0 ? void 0 : _a.unobserve(entry.target);
70
+ this.cleanupObserver();
71
+ break;
72
+ }
48
73
  }
49
- window.EMUxObserver.observe(this.el);
74
+ }, { root: null, rootMargin: this.detectDistance, threshold: 0 });
75
+ this.io.observe(this.el);
76
+ }
77
+ cleanupObserver() {
78
+ var _a;
79
+ (_a = this.io) === null || _a === void 0 ? void 0 : _a.disconnect();
80
+ this.io = undefined;
81
+ }
82
+ wireOnceHandlers() {
83
+ if (!this.imgEl)
84
+ return;
85
+ this.detachImgHandlers();
86
+ this._onLoad = () => {
87
+ var _a;
88
+ if (this.currentSrc && ((_a = this.imgEl) === null || _a === void 0 ? void 0 : _a.currentSrc) && !this.imgEl.currentSrc.includes(this.currentSrc))
89
+ return;
90
+ this.imgLoaded = true;
91
+ };
92
+ this._onError = () => {
93
+ console.error('Load image failed:', this.src);
94
+ };
95
+ this.imgEl.addEventListener('load', this._onLoad, { once: true });
96
+ this.imgEl.addEventListener('error', this._onError, { once: true });
97
+ }
98
+ detachImgHandlers() {
99
+ if (!this.imgEl)
100
+ return;
101
+ if (this._onLoad)
102
+ this.imgEl.removeEventListener('load', this._onLoad);
103
+ if (this._onError)
104
+ this.imgEl.removeEventListener('error', this._onError);
105
+ this._onLoad = undefined;
106
+ this._onError = undefined;
107
+ }
108
+ beginLoad() {
109
+ if (this.hasStarted)
110
+ return;
111
+ if (!this.imgEl)
112
+ return;
113
+ if (!this.src)
114
+ return;
115
+ this.hasStarted = true;
116
+ this.wireOnceHandlers();
117
+ if (this.imgEl.complete && this.imgEl.naturalWidth > 0) {
118
+ this.imgLoaded = true;
119
+ return;
50
120
  }
51
- else {
52
- this.shouldLoad = true;
53
- this.handleSrc();
121
+ this.currentSrc = this.src;
122
+ this.imgEl.src = this.src;
123
+ if (this.imgEl.complete && this.imgEl.naturalWidth > 0) {
124
+ this.imgLoaded = true;
54
125
  }
55
126
  }
127
+ get showSkeleton() {
128
+ return this.loading !== 'eager' && !this.imgLoaded;
129
+ }
130
+ renderEager() {
131
+ return (h(Host, { class: "HostContainer" }, h("img", { src: this.src, decoding: "async", style: this.styles, class: "UiContainer Visible", alt: this.alt, width: this.width, height: this.height, loading: "eager" })));
132
+ }
133
+ renderLazy() {
134
+ return (h(Host, { class: "HostContainer", "aria-busy": !this.imgLoaded ? 'true' : 'false' }, this.showSkeleton && (h("ui-skeleton", { class: "UiContainer", structure: "image", width: "100%", height: "100%" })), h("img", { ref: (el) => (this.imgEl = el), src: undefined, decoding: "async", style: this.styles, class: `UiContainer ${this.imgLoaded ? 'Visible' : 'Hidden'}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" })));
135
+ }
56
136
  render() {
57
- return (h(Host, { key: 'f506ba73852f257ad80bf59ca177d2065a5f365e', class: "HostContainer" }, !this.imgLoaded && (h("ui-skeleton", { key: '564ebfab701f827ddc2debccb7615926dbc9e876', class: "UiContainer", structure: "image", width: "100%", height: "100%" })), h("img", { key: '2188ca4494c10587f064acc5459ffc468948f497', ref: (el) => (this.image = el), src: this.shouldLoad ? this.src : undefined, onLoad: () => (this.imgLoaded = true), style: this.styles, class: `UiContainer ${this.imgLoaded ? 'Visible' : 'Hidden'}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" })));
137
+ return this.loading === 'eager' ? this.renderEager() : this.renderLazy();
58
138
  }
59
139
  get el() { return getElement(this); }
60
140
  static get watchers() { return {
61
- "src": ["handleSrc"]
141
+ "src": ["onSrcChange"],
142
+ "loading": ["onLoadingChange"]
62
143
  }; }
63
144
  };
64
145
  UiImage.style = UiImageStyle0;
@@ -1 +1 @@
1
- import{r as e,h as n}from"./index-83985f06.js";const t={downloadApp:{component:"custom-content-section"},"link-section":{component:"link-section-list"},copyright:{component:"custom-content-section"},download:{component:"custom-content-section"},helpLinks:{component:"image-list"},"license-description":{component:"custom-content-section"},licenses:{component:"image-list"},payment:{component:"image-list"},social:{component:"image-list"},sponsors:{component:"image-list"},vendors:{component:"image-list"},clock:{component:"custom-clock"}},o=class{constructor(n){e(this,n),this.platform=(()=>{const e=(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(e)return"PC"===e?"dk":"iPad"===e||"iPhone"===e?"ios":"mtWeb"})(),this.MANDATORY_FIELDS=["endpoint","language","sections"],this.language=void 0,this.sections=void 0,this.endpoint=void 0,this.env="stage",this.userRoles="everyone",this.userid=void 0,this.session=void 0,this.baseUrl=void 0,this.navigateViaEvent="false",this.postMessageEvent="NavigateTo",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.clockFormat="HH:MM:ss",this.timeZone="",this.mbSource=void 0,this.hasErrors=!1}validateMandatoryFields(){this.MANDATORY_FIELDS.forEach((e=>{this[e]||(console.error(`Mandatory parameter ${e} not received`),this.hasErrors=!0)}))}componentWillLoad(){this.sectionsList=this.sections.split(",").map((e=>e.trim()));const e=new URL(`${this.endpoint}/${this.language}/footer-raw-data`);return e.searchParams.append("env",this.env),e.searchParams.append("device",this.platform),e.searchParams.append("userRoles",this.userRoles),this.validateMandatoryFields(),fetch(e.href).then((e=>e.json())).then((e=>{0===Object.keys(e).length?this.hasErrors=!0:this.footerContent=(e=>{const n={repeaters:{vendors:{categoryTitle:e.gameVendorsLinksTitle,content:[]},"link-section":{categoryTitle:e.helpLinksTitle,content:[]},helpLinks:{categoryTitle:e.helpLinksTitle,content:[]},licenses:{categoryTitle:e.licensesLinksTitle,content:[]},sponsors:{categoryTitle:e.sponsorsLinksTitle,content:[]},payment:{categoryTitle:e.paymentLinksTitle,content:[]},social:{categoryTitle:e.socialLinksTitle,content:[]},downloadApp:{categoryTitle:e.downloadAppLinksTitle,content:[]}},wysiwyg:{copyright:{categoryTitle:"test",content:"test"},download:{categoryTitle:"test",content:"test"},downloadApp:{categoryTitle:"test",content:"test"},"license-description":{categoryTitle:"test",content:"test"}}},t={helpLinks:{repeaterName:"helpLinksRepeater",isExternalLink:"helpLinkType",image:"helpLinkImage",title:"helpLinkTitle",url:"helpLinkUrl",target:"target"},"link-section":{repeaterName:"helpLinksRepeater",isExternalLink:"helpLinkType",linkCategory:"helpLinkCategory",image:"helpLinkImage",title:"helpLinkTitle",url:"helpLinkUrl",target:"target"},social:{repeaterName:"socialLinksRepeater",isExternalLink:"isExternalLink",image:"socialLinkImage",title:"socialLinkTitle",url:"socialLinkUrl",target:"target"},vendors:{repeaterName:"gameVendorsRepeater",isExternalLink:"isExternalLink",image:"gameVendorImage",title:"gameVendorTitle",url:"gameVendorUrl",target:"target"},licenses:{repeaterName:"licensesRepeater",isExternalLink:"isExternalLink",image:"licenseImage",title:"licenseTitle",url:"licenseUrl",target:"target"},payment:{repeaterName:"paymentMethodsRepeater",isExternalLink:"isExternalLink",image:"paymentMethodImage",title:"paymentTitle",url:"paymentMethodUrl",target:"target"},sponsors:{repeaterName:"sponsorsRepeater",isExternalLink:"isExternalLink",image:"sponsorImage",title:"sponsorTitle",url:"sponsorUrl",target:"target"}};return Object.entries(n.repeaters).forEach((n=>{var o,i,r;t[n[0]]&&e[null===(o=t[n[0]])||void 0===o?void 0:o.repeaterName]&&(n[1].content=null===(r=e[null===(i=t[n[0]])||void 0===i?void 0:i.repeaterName])||void 0===r?void 0:r.map((e=>{var o,i,r,a,s,l;return{isExternalLink:null!==(o=e[t[n[0]].isExternalLink])&&void 0!==o?o:null,linkCategory:null!==(i=e[t[n[0]].linkCategory])&&void 0!==i?i:null,image:null!==(r=e[t[n[0]].image])&&void 0!==r?r:null,title:null!==(a=e[t[n[0]].title])&&void 0!==a?a:null,url:null!==(s=e[t[n[0]].url])&&void 0!==s?s:null,target:null!==(l=e[t[n[0]].target])&&void 0!==l?l:null}})))})),n.repeaters.downloadApp.content=e.downloadInfos.imageArea||[],n.wysiwyg.downloadApp.content=e.downloadInfos.downloadDescription||"",n.wysiwyg.copyright.content=e.copyright,n.wysiwyg["license-description"].content=e.licenseDesc,n})(e)}))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){null!=window.emMessageBus?function(e,n){if(window.emMessageBus){const t=document.createElement("style");window.emMessageBus.subscribe(n,(n=>{t.innerHTML=n,e&&e.appendChild(t)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&function(e,n){if(e){const t=document.createElement("style");t.innerHTML=n,e.appendChild(t)}}(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&function(e,n){const t=new URL(n);fetch(t.href).then((e=>e.text())).then((n=>{const t=document.createElement("style");t.innerHTML=n,e&&e.appendChild(t)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}(this.stylingContainer,this.clientStylingUrl))}render(){if(this.hasErrors)return n("div",null,"There was an error while bootstraping the widget");{const e=this.sectionsList.map(((e,o)=>{const i=t[e].component,r=this.footerContent.repeaters.hasOwnProperty(e),a=this.footerContent.wysiwyg.hasOwnProperty(e);return n(i,{class:`${e} FooterSectionContainer FooterSectionContainer${o+1}`,userid:this.userid,session:this.session,"base-url":this.baseUrl,language:this.language,"navigate-via-event":this.navigateViaEvent,"post-message-event":this.postMessageEvent,ruleset:t[e],repeaterContent:r?this.footerContent.repeaters[e]:null,customContent:a?this.footerContent.wysiwyg[e].content:null,"translation-url":this.translationUrl,"clock-format":this.clockFormat,"time-zone":this.timeZone})}));return n("footer",{class:"FooterContainer",ref:e=>this.stylingContainer=e},n("div",{class:"FooterGrid customStyle"},e))}}};o.style=':host {\n display: block;\n}\n\n/* $-background-primary: #14202d; */\n* {\n font-family: sans-serif;\n}\n\nhtml,\nbody {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\n.FooterSectionContainer {\n color: var(--emw--footer-typography, var(--emw--color-thpography, #fff));\n padding: 15px 20px 0;\n}\n\n/* // FOOTER CONTAINER - only serves to be read as a container */\n.FooterContainer {\n container-type: inline-size;\n container-name: footerContainer;\n}\n\n.FooterGrid {\n background-color: var(--emw--footer-color-bg, var(--emw--color-background, #0E1511));\n display: grid;\n grid-template-rows: repeat(9, auto);\n grid-template-areas: "one" "two" "three" "four" "five" "six" "seven";\n}\n\n.FooterSectionContainer1 {\n position: relative;\n grid-area: one;\n}\n\n.FooterSectionContainer2 {\n position: relative;\n grid-area: two;\n}\n\n.FooterSectionContainer3 {\n position: relative;\n grid-area: three;\n}\n\n.FooterSectionContainer4 {\n position: relative;\n grid-area: four;\n}\n\n.FooterSectionContainer5 {\n grid-area: five;\n}\n\n.FooterSectionContainer6 {\n padding-top: 22px;\n grid-area: six;\n}\n\n.FooterSectionContainer7 {\n grid-area: seven;\n}\n\n/* // remove paddings */\n.FooterSectionContainer7 div {\n padding: 0;\n}\n\n@container (max-width: 750px) {\n .FooterSectionContainer3:after,\n .FooterSectionContainer2:after {\n position: absolute;\n content: "";\n height: 1px;\n width: 90%;\n background-color: var(--emw--color-gray-100, #444);\n }\n .FooterSectionContainer5 {\n grid-area: five;\n background-color: var(--emw--color-background-secondary, #060706);\n padding: 30px 0;\n font-size: var(--emw--font-size-medium, 16px);\n min-height: var(--emw--size-medium-plus, 100px);\n justify-self: center;\n }\n}\n/* // STYLES FOR TABLET / DESKTOP */\n@container (min-width: 750px) {\n .FooterGrid {\n background: var(--emw--footer-color-bg, var(--emw--color-background, #0E1511));\n display: grid;\n border-top: 5px solid var(--emw--footer-color-primary, var(--emw--color-primary, #22B04E));\n grid-template-rows: repeat(5, auto);\n grid-template-columns: 1fr 1fr 1fr 1fr;\n grid-template-areas: "one two two two" "one three three three" "one four four four" "one five five five" "one six six six" "seven seven seven seven" "eight eight eight eight" "nine nine nine nine";\n }\n .FooterSectionContainer1 {\n padding: 30px 40px;\n grid-area: one;\n background: var(--emw--color-background, #000000);\n }\n .FooterSectionContainer2 {\n grid-area: two;\n min-height: var(--emw--size-4x-medium, 500px);\n }\n .FooterSectionContainer3 {\n grid-area: three;\n }\n .FooterSectionContainer4 {\n grid-area: four;\n }\n .FooterSectionContainer5 {\n grid-area: five;\n background-color: var(--emw--color-background-secondary, #091217);\n padding: var(--emw--spacing-x-large, 30px) 0;\n font-size: var(--emw--font-size-medium, 16px);\n min-height: var(--emw--size-medium-plus, 100px);\n }\n .FooterSectionContainer6 {\n grid-area: six;\n padding: 0;\n }\n .FooterSectionContainer7 {\n grid-area: seven;\n padding: 0;\n }\n /* // remove paddings */\n .FooterSectionContainer5 .CustomContentSectionWrapper {\n padding: 0;\n }\n .FooterSectionContainer5 .CustomContentSectionWrapper div {\n display: flex;\n flex-direction: left;\n align-items: center;\n padding-left: var(--emw--spacing-large, 20px);\n }\n .FooterSectionContainer5 .CustomContentSectionWrapper div p {\n margin: var(--emw--spacing-2x-small, 5px);\n text-align: center;\n }\n .FooterSectionContainer6 .CustomContentSectionWrapper div p {\n text-align: center;\n }\n .FooterSectionContainer6 .ImageListWrapper {\n padding: 0;\n }\n .FooterSectionContainer6 .ImageListWrapper {\n padding: 0;\n }\n .FooterSectionContainer7 .CustomContentSectionWrapper {\n padding: 0;\n padding-bottom: var(--emw--spacing-large, 22px);\n font-size: var(--emw--font-size-small, 14px);\n }\n}';export{o as general_footer_template}
1
+ import{r as e,h as n,g as t}from"./index-83985f06.js";const o={downloadApp:{component:"custom-content-section"},"link-section":{component:"link-section-list"},copyright:{component:"custom-content-section"},download:{component:"custom-content-section"},helpLinks:{component:"image-list"},"license-description":{component:"custom-content-section"},licenses:{component:"image-list"},payment:{component:"image-list"},social:{component:"image-list"},sponsors:{component:"image-list"},vendors:{component:"image-list"},clock:{component:"custom-clock"}};function i(e,n){if(e){const t=document.createElement("style");t.innerHTML=n,e.appendChild(t)}}const r=class{constructor(n){e(this,n),this.platform=(()=>{const e=(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(e)return"PC"===e?"dk":"iPad"===e||"iPhone"===e?"ios":"mtWeb"})(),this.MANDATORY_FIELDS=["endpoint","language","sections"],this.language=void 0,this.sections=void 0,this.endpoint=void 0,this.env="stage",this.userRoles="everyone",this.userid=void 0,this.session=void 0,this.baseUrl=void 0,this.navigateViaEvent="false",this.postMessageEvent="NavigateTo",this.clientStyling="",this.clientStylingUrl="",this.customCss=void 0,this.translationUrl="",this.clockFormat="HH:MM:ss",this.timeZone="",this.mbSource=void 0,this.hasErrors=!1}validateMandatoryFields(){this.MANDATORY_FIELDS.forEach((e=>{this[e]||(console.error(`Mandatory parameter ${e} not received`),this.hasErrors=!0)}))}componentWillLoad(){this.sectionsList=this.sections.split(",").map((e=>e.trim()));const e=new URL(`${this.endpoint}/${this.language}/footer-raw-data`);return e.searchParams.append("env",this.env),e.searchParams.append("device",this.platform),e.searchParams.append("userRoles",this.userRoles),this.validateMandatoryFields(),fetch(e.href).then((e=>e.json())).then((e=>{0===Object.keys(e).length?this.hasErrors=!0:this.footerContent=(e=>{const n={repeaters:{vendors:{categoryTitle:e.gameVendorsLinksTitle,content:[]},"link-section":{categoryTitle:e.helpLinksTitle,content:[]},helpLinks:{categoryTitle:e.helpLinksTitle,content:[]},licenses:{categoryTitle:e.licensesLinksTitle,content:[]},sponsors:{categoryTitle:e.sponsorsLinksTitle,content:[]},payment:{categoryTitle:e.paymentLinksTitle,content:[]},social:{categoryTitle:e.socialLinksTitle,content:[]},downloadApp:{categoryTitle:e.downloadAppLinksTitle,content:[]}},wysiwyg:{copyright:{categoryTitle:"test",content:"test"},customCSS:{categoryTitle:"test",content:"test"},download:{categoryTitle:"test",content:"test"},downloadApp:{categoryTitle:"test",content:"test"},"license-description":{categoryTitle:"test",content:"test"}}},t={helpLinks:{repeaterName:"helpLinksRepeater",isExternalLink:"helpLinkType",image:"helpLinkImage",title:"helpLinkTitle",url:"helpLinkUrl",target:"target"},"link-section":{repeaterName:"helpLinksRepeater",isExternalLink:"helpLinkType",linkCategory:"helpLinkCategory",image:"helpLinkImage",title:"helpLinkTitle",url:"helpLinkUrl",target:"target"},social:{repeaterName:"socialLinksRepeater",isExternalLink:"isExternalLink",image:"socialLinkImage",title:"socialLinkTitle",url:"socialLinkUrl",target:"target"},vendors:{repeaterName:"gameVendorsRepeater",isExternalLink:"isExternalLink",image:"gameVendorImage",title:"gameVendorTitle",url:"gameVendorUrl",target:"target"},licenses:{repeaterName:"licensesRepeater",isExternalLink:"isExternalLink",image:"licenseImage",title:"licenseTitle",url:"licenseUrl",target:"target"},payment:{repeaterName:"paymentMethodsRepeater",isExternalLink:"isExternalLink",image:"paymentMethodImage",title:"paymentTitle",url:"paymentMethodUrl",target:"target"},sponsors:{repeaterName:"sponsorsRepeater",isExternalLink:"isExternalLink",image:"sponsorImage",title:"sponsorTitle",url:"sponsorUrl",target:"target"}};return Object.entries(n.repeaters).forEach((n=>{var o,i,r;t[n[0]]&&e[null===(o=t[n[0]])||void 0===o?void 0:o.repeaterName]&&(n[1].content=null===(r=e[null===(i=t[n[0]])||void 0===i?void 0:i.repeaterName])||void 0===r?void 0:r.map((e=>{var o,i,r,a,s,l;return{isExternalLink:null!==(o=e[t[n[0]].isExternalLink])&&void 0!==o?o:null,linkCategory:null!==(i=e[t[n[0]].linkCategory])&&void 0!==i?i:null,image:null!==(r=e[t[n[0]].image])&&void 0!==r?r:null,title:null!==(a=e[t[n[0]].title])&&void 0!==a?a:null,url:null!==(s=e[t[n[0]].url])&&void 0!==s?s:null,target:null!==(l=e[t[n[0]].target])&&void 0!==l?l:null}})))})),n.repeaters.downloadApp.content=e.downloadInfos.imageArea||[],n.wysiwyg.downloadApp.content=e.downloadInfos.downloadDescription||"",n.wysiwyg.copyright.content=e.copyright,n.wysiwyg.customCSS.content=e.customCSS,n.wysiwyg["license-description"].content=e.licenseDesc,n})(e)}))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){null!=window.emMessageBus?function(e,n){if(window.emMessageBus){const t=document.createElement("style");window.emMessageBus.subscribe(n,(n=>{t.innerHTML=n,e&&e.appendChild(t)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&i(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&function(e,n){const t=new URL(n);fetch(t.href).then((e=>e.text())).then((n=>{const t=document.createElement("style");t.innerHTML=n,e&&e.appendChild(t)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}(this.stylingContainer,this.clientStylingUrl),this.customCss=this.footerContent.wysiwyg.customCSS.content,this.customCss&&i(this.hostEl.shadowRoot,this.customCss))}render(){if(this.hasErrors)return n("div",null,"There was an error while bootstraping the widget");{const e=this.sectionsList.map(((e,t)=>{const i=o[e].component,r=this.footerContent.repeaters.hasOwnProperty(e),a=this.footerContent.wysiwyg.hasOwnProperty(e);return n(i,{class:`${e} FooterSectionContainer FooterSectionContainer${t+1}`,userid:this.userid,session:this.session,"base-url":this.baseUrl,language:this.language,"navigate-via-event":this.navigateViaEvent,"post-message-event":this.postMessageEvent,ruleset:o[e],repeaterContent:r?this.footerContent.repeaters[e]:null,customContent:a?this.footerContent.wysiwyg[e].content:null,"translation-url":this.translationUrl,"clock-format":this.clockFormat,"time-zone":this.timeZone})}));return n("footer",{class:"FooterContainer",ref:e=>this.stylingContainer=e},n("div",{class:"FooterGrid customStyle"},e))}}get hostEl(){return t(this)}};r.style=':host {\n display: block;\n}\n\n/* $-background-primary: #14202d; */\n* {\n font-family: sans-serif;\n}\n\nhtml,\nbody {\n margin: 0;\n padding: 0;\n font-family: inherit;\n}\n\n.FooterSectionContainer {\n color: var(--emw--footer-typography, var(--emw--color-thpography, #fff));\n padding: 15px 20px 0;\n}\n\n/* // FOOTER CONTAINER - only serves to be read as a container */\n.FooterContainer {\n container-type: inline-size;\n container-name: footerContainer;\n}\n\n.FooterGrid {\n background-color: var(--emw--footer-color-bg, var(--emw--color-background, #0E1511));\n display: grid;\n grid-template-rows: repeat(9, auto);\n grid-template-areas: "one" "two" "three" "four" "five" "six" "seven";\n}\n\n.FooterSectionContainer1 {\n position: relative;\n grid-area: one;\n}\n\n.FooterSectionContainer2 {\n position: relative;\n grid-area: two;\n}\n\n.FooterSectionContainer3 {\n position: relative;\n grid-area: three;\n}\n\n.FooterSectionContainer4 {\n position: relative;\n grid-area: four;\n}\n\n.FooterSectionContainer5 {\n grid-area: five;\n}\n\n.FooterSectionContainer6 {\n padding-top: 22px;\n grid-area: six;\n}\n\n.FooterSectionContainer7 {\n grid-area: seven;\n}\n\n/* // remove paddings */\n.FooterSectionContainer7 div {\n padding: 0;\n}\n\n@container (max-width: 750px) {\n .FooterSectionContainer3:after,\n .FooterSectionContainer2:after {\n position: absolute;\n content: "";\n height: 1px;\n width: 90%;\n background-color: var(--emw--color-gray-100, #444);\n }\n .FooterSectionContainer5 {\n grid-area: five;\n background-color: var(--emw--color-background-secondary, #060706);\n padding: 30px 0;\n font-size: var(--emw--font-size-medium, 16px);\n min-height: var(--emw--size-medium-plus, 100px);\n justify-self: center;\n }\n}\n/* // STYLES FOR TABLET / DESKTOP */\n@container (min-width: 750px) {\n .FooterGrid {\n background: var(--emw--footer-color-bg, var(--emw--color-background, #0E1511));\n display: grid;\n border-top: 5px solid var(--emw--footer-color-primary, var(--emw--color-primary, #22B04E));\n grid-template-rows: repeat(5, auto);\n grid-template-columns: 1fr 1fr 1fr 1fr;\n grid-template-areas: "one two two two" "one three three three" "one four four four" "one five five five" "one six six six" "seven seven seven seven" "eight eight eight eight" "nine nine nine nine";\n }\n .FooterSectionContainer1 {\n padding: 30px 40px;\n grid-area: one;\n background: var(--emw--color-background, #000000);\n }\n .FooterSectionContainer2 {\n grid-area: two;\n min-height: var(--emw--size-4x-medium, 500px);\n }\n .FooterSectionContainer3 {\n grid-area: three;\n }\n .FooterSectionContainer4 {\n grid-area: four;\n }\n .FooterSectionContainer5 {\n grid-area: five;\n background-color: var(--emw--color-background-secondary, #091217);\n padding: var(--emw--spacing-x-large, 30px) 0;\n font-size: var(--emw--font-size-medium, 16px);\n min-height: var(--emw--size-medium-plus, 100px);\n }\n .FooterSectionContainer6 {\n grid-area: six;\n padding: 0;\n }\n .FooterSectionContainer7 {\n grid-area: seven;\n padding: 0;\n }\n /* // remove paddings */\n .FooterSectionContainer5 .CustomContentSectionWrapper {\n padding: 0;\n }\n .FooterSectionContainer5 .CustomContentSectionWrapper div {\n display: flex;\n flex-direction: left;\n align-items: center;\n padding-left: var(--emw--spacing-large, 20px);\n }\n .FooterSectionContainer5 .CustomContentSectionWrapper div p {\n margin: var(--emw--spacing-2x-small, 5px);\n text-align: center;\n }\n .FooterSectionContainer6 .CustomContentSectionWrapper div p {\n text-align: center;\n }\n .FooterSectionContainer6 .ImageListWrapper {\n padding: 0;\n }\n .FooterSectionContainer6 .ImageListWrapper {\n padding: 0;\n }\n .FooterSectionContainer7 .CustomContentSectionWrapper {\n padding: 0;\n padding-bottom: var(--emw--spacing-large, 22px);\n font-size: var(--emw--font-size-small, 14px);\n }\n}';export{r as general_footer_template}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./index-83985f06.js";export{s as setNonce}from"./index-83985f06.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((async e=>(await n(),t([["custom-content-section",[[2,"custom-content-section",{customContent:[1,"custom-content"],repeaterContent:[8,"repeater-content"],navigateViaEvent:[516,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{repeaterContent:[8,"repeater-content"],baseUrl:[513,"base-url"],language:[513],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{clockFormat:[513,"clock-format"],timeZone:[513,"time-zone"],translationUrl:[513,"translation-url"],language:[513],timeString:[32]},null,{translationUrl:["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{language:[513],sections:[513],endpoint:[513],env:[513],userRoles:[513,"user-roles"],userid:[513],session:[513],baseUrl:[513,"base-url"],navigateViaEvent:[513,"navigate-via-event"],postMessageEvent:[513,"post-message-event"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],clockFormat:[513,"clock-format"],timeZone:[513,"time-zone"],mbSource:[513,"mb-source"],hasErrors:[32]}]]],["ui-image_2",[[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],styles:[8],detectDistance:[1,"detect-distance"],imgLoaded:[32],shouldLoad:[32]},null,{src:["handleSrc"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]],["image-list",[[2,"image-list",{repeaterContent:[8,"repeater-content"],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]]],e))));
1
+ import{p as e,b as t}from"./index-83985f06.js";export{s as setNonce}from"./index-83985f06.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((async e=>(await n(),t([["custom-content-section",[[2,"custom-content-section",{customContent:[1,"custom-content"],repeaterContent:[8,"repeater-content"],navigateViaEvent:[516,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{repeaterContent:[8,"repeater-content"],baseUrl:[513,"base-url"],language:[513],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{clockFormat:[513,"clock-format"],timeZone:[513,"time-zone"],translationUrl:[513,"translation-url"],language:[513],timeString:[32]},null,{translationUrl:["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{language:[513],sections:[513],endpoint:[513],env:[513],userRoles:[513,"user-roles"],userid:[513],session:[513],baseUrl:[513,"base-url"],navigateViaEvent:[513,"navigate-via-event"],postMessageEvent:[513,"post-message-event"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],customCss:[513,"custom-css"],translationUrl:[513,"translation-url"],clockFormat:[513,"clock-format"],timeZone:[513,"time-zone"],mbSource:[513,"mb-source"],hasErrors:[32]}]]],["ui-image_2",[[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],styles:[8],detectDistance:[1,"detect-distance"],loading:[1],imgLoaded:[32]},null,{src:["onSrcChange"],loading:["onLoadingChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]],["image-list",[[2,"image-list",{repeaterContent:[8,"repeater-content"],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]]],e))));
@@ -1 +1 @@
1
- import{r as e,h as t,H as i,g as s}from"./index-83985f06.js";const n=class{constructor(t){e(this,t),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const e=new Image;e.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,e.onload=null)},e.src=this.src}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const t=e.target.__uxComponent;t&&(t.shouldLoad=!0,t.handleSrc()),window.EMUxObserver.unobserve(e.target)}}))}),{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return t(i,{key:"f506ba73852f257ad80bf59ca177d2065a5f365e",class:"HostContainer"},!this.imgLoaded&&t("ui-skeleton",{key:"564ebfab701f827ddc2debccb7615926dbc9e876",class:"UiContainer",structure:"image",width:"100%",height:"100%"}),t("img",{key:"2188ca4494c10587f064acc5459ffc468948f497",ref:e=>this.image=e,src:this.shouldLoad?this.src:void 0,onLoad:()=>this.imgLoaded=!0,style:this.styles,class:"UiContainer "+(this.imgLoaded?"Visible":"Hidden"),alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}get el(){return s(this)}static get watchers(){return{src:["handleSrc"]}}};n.style=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}";const r=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,i)=>t("div",{key:i,class:"Text "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(i,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},t("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};r.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{n as ui_image,r as ui_skeleton}
1
+ import{r as e,h as t,H as i,g as s}from"./index-83985f06.js";const n=class{constructor(t){e(this,t),this.hasStarted=!1,this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.loading="lazy",this.imgLoaded=!1}onSrcChange(){"eager"!==this.loading&&(this.imgLoaded=!1,this.hasStarted=!1,"undefined"!=typeof window&&"IntersectionObserver"in window||this.beginLoad())}onLoadingChange(e,t){e!==t&&(this.cleanupObserver(),this.detachImgHandlers(),"eager"===e?(this.imgEl&&this.src&&(this.imgEl.src=this.src),this.hasStarted=!0):(this.imgLoaded=!1,this.hasStarted=!1,this.setupObserver()))}componentDidLoad(){"eager"!==this.loading&&this.setupObserver()}disconnectedCallback(){this.cleanupObserver(),this.detachImgHandlers()}canUseIO(){return"undefined"!=typeof window&&"IntersectionObserver"in window}setupObserver(){"eager"!==this.loading&&(this.canUseIO()?(this.io=new IntersectionObserver((e=>{var t;for(const i of e)if(i.isIntersecting){this.beginLoad(),null===(t=this.io)||void 0===t||t.unobserve(i.target),this.cleanupObserver();break}}),{root:null,rootMargin:this.detectDistance,threshold:0}),this.io.observe(this.el)):this.beginLoad())}cleanupObserver(){var e;null===(e=this.io)||void 0===e||e.disconnect(),this.io=void 0}wireOnceHandlers(){this.imgEl&&(this.detachImgHandlers(),this._onLoad=()=>{var e;this.currentSrc&&(null===(e=this.imgEl)||void 0===e?void 0:e.currentSrc)&&!this.imgEl.currentSrc.includes(this.currentSrc)||(this.imgLoaded=!0)},this._onError=()=>{console.error("Load image failed:",this.src)},this.imgEl.addEventListener("load",this._onLoad,{once:!0}),this.imgEl.addEventListener("error",this._onError,{once:!0}))}detachImgHandlers(){this.imgEl&&(this._onLoad&&this.imgEl.removeEventListener("load",this._onLoad),this._onError&&this.imgEl.removeEventListener("error",this._onError),this._onLoad=void 0,this._onError=void 0)}beginLoad(){this.hasStarted||this.imgEl&&this.src&&(this.hasStarted=!0,this.wireOnceHandlers(),this.imgEl.complete&&this.imgEl.naturalWidth>0?this.imgLoaded=!0:(this.currentSrc=this.src,this.imgEl.src=this.src,this.imgEl.complete&&this.imgEl.naturalWidth>0&&(this.imgLoaded=!0)))}get showSkeleton(){return"eager"!==this.loading&&!this.imgLoaded}renderEager(){return t(i,{class:"HostContainer"},t("img",{src:this.src,decoding:"async",style:this.styles,class:"UiContainer Visible",alt:this.alt,width:this.width,height:this.height,loading:"eager"}))}renderLazy(){return t(i,{class:"HostContainer","aria-busy":this.imgLoaded?"false":"true"},this.showSkeleton&&t("ui-skeleton",{class:"UiContainer",structure:"image",width:"100%",height:"100%"}),t("img",{ref:e=>this.imgEl=e,src:void 0,decoding:"async",style:this.styles,class:"UiContainer "+(this.imgLoaded?"Visible":"Hidden"),alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}render(){return"eager"===this.loading?this.renderEager():this.renderLazy()}get el(){return s(this)}static get watchers(){return{src:["onSrcChange"],loading:["onLoadingChange"]}}};n.style=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}";const r=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,i)=>t("div",{key:i,class:"Text "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(i,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},t("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};r.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{n as ui_image,r as ui_skeleton}
@@ -1,5 +1,6 @@
1
1
  import "../../../../../../dist/packages/stencil/ui-image/dist/types/index";
2
2
  export declare class GeneralFooterTemplate {
3
+ hostEl: HTMLElement;
3
4
  /**
4
5
  * the language of the footer
5
6
  */
@@ -48,6 +49,10 @@ export declare class GeneralFooterTemplate {
48
49
  * custom styling by href
49
50
  */
50
51
  clientStylingUrl: string;
52
+ /**
53
+ * styling set by operator in CMS
54
+ */
55
+ customCss: string;
51
56
  /**
52
57
  * custom translation by href
53
58
  */
@@ -59,6 +59,10 @@ export namespace Components {
59
59
  * clockformat
60
60
  */
61
61
  "clockFormat": string;
62
+ /**
63
+ * styling set by operator in CMS
64
+ */
65
+ "customCss": string;
62
66
  /**
63
67
  * endpoint for data retrieval
64
68
  */
@@ -238,6 +242,10 @@ declare namespace LocalJSX {
238
242
  * clockformat
239
243
  */
240
244
  "clockFormat"?: string;
245
+ /**
246
+ * styling set by operator in CMS
247
+ */
248
+ "customCss": string;
241
249
  /**
242
250
  * endpoint for data retrieval
243
251
  */
@@ -82,6 +82,10 @@ export declare const normalizeRepeaterContent: (data: any) => {
82
82
  categoryTitle: string;
83
83
  content: string;
84
84
  };
85
+ customCSS: {
86
+ categoryTitle: string;
87
+ content: string;
88
+ };
85
89
  download: {
86
90
  categoryTitle: string;
87
91
  content: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-footer-template",
3
- "version": "1.76.10",
3
+ "version": "1.76.12",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",