@everymatrix/general-footer-template 1.62.0 → 1.62.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 (40) hide show
  1. package/dist/cjs/custom-content-section.cjs.entry.js +31 -32
  2. package/dist/cjs/general-footer-template.cjs.js +1 -1
  3. package/dist/cjs/image-list.cjs.entry.js +2 -27
  4. package/dist/cjs/link-section-list.cjs.entry.js +3 -28
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/ui-image_2.cjs.entry.js +8 -10
  7. package/dist/collection/components/custom-content-section/custom-content-section.js +1 -2
  8. package/dist/collection/components/general-footer-template/general-footer-template.js +1 -1
  9. package/dist/collection/components/image-list/image-list.js +2 -32
  10. package/dist/collection/components/link-section-list/link-section-list.js +4 -33
  11. package/dist/esm/custom-content-section.entry.js +31 -32
  12. package/dist/esm/general-footer-template.js +1 -1
  13. package/dist/esm/image-list.entry.js +3 -28
  14. package/dist/esm/link-section-list.entry.js +4 -29
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/ui-image_2.entry.js +9 -11
  17. package/dist/general-footer-template/general-footer-template.esm.js +1 -1
  18. package/dist/general-footer-template/p-1535f1fd.entry.js +1 -0
  19. package/dist/general-footer-template/p-3f9e0e81.entry.js +1 -0
  20. package/dist/general-footer-template/p-9c2e6761.entry.js +1 -0
  21. package/dist/general-footer-template/{p-0656ba47.entry.js → p-b09d1ead.entry.js} +2 -2
  22. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.d.ts +2 -0
  23. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.dev.d.ts +2 -0
  24. package/dist/types/components/custom-content-section/custom-content-section.d.ts +0 -1
  25. package/dist/types/components/general-footer-template/general-footer-template.d.ts +1 -1
  26. package/dist/types/components/image-list/image-list.d.ts +0 -8
  27. package/dist/types/components/link-section-list/link-section-list.d.ts +1 -8
  28. package/package.json +1 -1
  29. package/dist/general-footer-template/p-99c0545b.entry.js +0 -1
  30. package/dist/general-footer-template/p-d6f0d5e4.entry.js +0 -1
  31. package/dist/general-footer-template/p-fef8e428.entry.js +0 -1
  32. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.d.ts +0 -2
  33. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.dev.d.ts +0 -2
  34. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-footer-template/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  35. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/storybook/main.d.ts +0 -0
  36. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/storybook/preview.d.ts +0 -0
  37. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-footer-template/.stencil/tools/plugins/index.d.ts +0 -0
  38. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-footer-template/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  39. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-footer-template/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  40. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-footer-template/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -3331,7 +3331,7 @@ function filter$1(test, node, recurse = true, limit = Infinity) {
3331
3331
  function find(test, nodes, recurse, limit) {
3332
3332
  const result = [];
3333
3333
  /** Stack of the arrays we are looking at. */
3334
- const nodeStack = [nodes];
3334
+ const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
3335
3335
  /** Stack of the indices within the arrays. */
3336
3336
  const indexStack = [0];
3337
3337
  for (;;) {
@@ -3385,20 +3385,19 @@ function findOneChild(test, nodes) {
3385
3385
  * @returns The first node that passes `test`.
3386
3386
  */
3387
3387
  function findOne(test, nodes, recurse = true) {
3388
- let elem = null;
3389
- for (let i = 0; i < nodes.length && !elem; i++) {
3390
- const node = nodes[i];
3391
- if (!isTag(node)) {
3392
- continue;
3393
- }
3394
- else if (test(node)) {
3395
- elem = node;
3388
+ const searchedNodes = Array.isArray(nodes) ? nodes : [nodes];
3389
+ for (let i = 0; i < searchedNodes.length; i++) {
3390
+ const node = searchedNodes[i];
3391
+ if (isTag(node) && test(node)) {
3392
+ return node;
3396
3393
  }
3397
- else if (recurse && node.children.length > 0) {
3398
- elem = findOne(test, node.children, true);
3394
+ if (recurse && hasChildren(node) && node.children.length > 0) {
3395
+ const found = findOne(test, node.children, true);
3396
+ if (found)
3397
+ return found;
3399
3398
  }
3400
3399
  }
3401
- return elem;
3400
+ return null;
3402
3401
  }
3403
3402
  /**
3404
3403
  * Checks if a tree of nodes contains at least one node passing a test.
@@ -3409,8 +3408,8 @@ function findOne(test, nodes, recurse = true) {
3409
3408
  * @returns Whether a tree of nodes contains at least one node passing the test.
3410
3409
  */
3411
3410
  function existsOne(test, nodes) {
3412
- return nodes.some((checked) => isTag(checked) &&
3413
- (test(checked) || existsOne(test, checked.children)));
3411
+ return (Array.isArray(nodes) ? nodes : [nodes]).some((node) => (isTag(node) && test(node)) ||
3412
+ (hasChildren(node) && existsOne(test, node.children)));
3414
3413
  }
3415
3414
  /**
3416
3415
  * Search an array of nodes and their children for elements passing a test function.
@@ -3424,7 +3423,7 @@ function existsOne(test, nodes) {
3424
3423
  */
3425
3424
  function findAll(test, nodes) {
3426
3425
  const result = [];
3427
- const nodeStack = [nodes];
3426
+ const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
3428
3427
  const indexStack = [0];
3429
3428
  for (;;) {
3430
3429
  if (indexStack[0] >= nodeStack[0].length) {
@@ -3438,11 +3437,9 @@ function findAll(test, nodes) {
3438
3437
  continue;
3439
3438
  }
3440
3439
  const elem = nodeStack[0][indexStack[0]++];
3441
- if (!isTag(elem))
3442
- continue;
3443
- if (test(elem))
3440
+ if (isTag(elem) && test(elem))
3444
3441
  result.push(elem);
3445
- if (elem.children.length > 0) {
3442
+ if (hasChildren(elem) && elem.children.length > 0) {
3446
3443
  indexStack.unshift(0);
3447
3444
  nodeStack.unshift(elem.children);
3448
3445
  }
@@ -3572,6 +3569,19 @@ function getElementById(id, nodes, recurse = true) {
3572
3569
  function getElementsByTagName(tagName, nodes, recurse = true, limit = Infinity) {
3573
3570
  return filter$1(Checks["tag_name"](tagName), nodes, recurse, limit);
3574
3571
  }
3572
+ /**
3573
+ * Returns all nodes with the supplied `className`.
3574
+ *
3575
+ * @category Legacy Query Functions
3576
+ * @param className Class name to search for.
3577
+ * @param nodes Nodes to search through.
3578
+ * @param recurse Also consider child nodes.
3579
+ * @param limit Maximum number of nodes to return.
3580
+ * @returns All nodes with the supplied `className`.
3581
+ */
3582
+ function getElementsByClassName(className, nodes, recurse = true, limit = Infinity) {
3583
+ return filter$1(getAttribCheck("class", className), nodes, recurse, limit);
3584
+ }
3575
3585
  /**
3576
3586
  * Returns all nodes with the supplied `type`.
3577
3587
  *
@@ -3939,6 +3949,7 @@ const index = /*#__PURE__*/Object.freeze({
3939
3949
  getElements: getElements,
3940
3950
  getElementById: getElementById,
3941
3951
  getElementsByTagName: getElementsByTagName,
3952
+ getElementsByClassName: getElementsByClassName,
3942
3953
  getElementsByTagType: getElementsByTagType,
3943
3954
  removeSubsets: removeSubsets,
3944
3955
  get DocumentPosition () { return DocumentPosition; },
@@ -5410,34 +5421,22 @@ class Declaration$4 extends Node$3 {
5410
5421
  var declaration = Declaration$4;
5411
5422
  Declaration$4.default = Declaration$4;
5412
5423
 
5413
- // This alphabet uses `A-Za-z0-9_-` symbols.
5414
- // The order of characters is optimized for better gzip and brotli compression.
5415
- // References to the same file (works both for gzip and brotli):
5416
- // `'use`, `andom`, and `rict'`
5417
- // References to the brotli default dictionary:
5418
- // `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
5419
5424
  let urlAlphabet =
5420
5425
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
5421
-
5422
5426
  let customAlphabet = (alphabet, defaultSize = 21) => {
5423
5427
  return (size = defaultSize) => {
5424
5428
  let id = '';
5425
- // A compact alternative for `for (var i = 0; i < step; i++)`.
5426
5429
  let i = size | 0;
5427
5430
  while (i--) {
5428
- // `| 0` is more compact and faster than `Math.floor()`.
5429
5431
  id += alphabet[(Math.random() * alphabet.length) | 0];
5430
5432
  }
5431
5433
  return id
5432
5434
  }
5433
5435
  };
5434
-
5435
5436
  let nanoid$1 = (size = 21) => {
5436
5437
  let id = '';
5437
- // A compact alternative for `for (var i = 0; i < step; i++)`.
5438
5438
  let i = size | 0;
5439
5439
  while (i--) {
5440
- // `| 0` is more compact and faster than `Math.floor()`.
5441
5440
  id += urlAlphabet[(Math.random() * 64) | 0];
5442
5441
  }
5443
5442
  return id
@@ -9550,7 +9549,7 @@ const CustomContentSection = class {
9550
9549
  a: ['href', 'target', 'rel']
9551
9550
  }
9552
9551
  });
9553
- return index$2.h("div", { key: '9990a716f474932b66644b13ec3ef378302dfaeb', class: "CustomContentSectionContainer" }, index$2.h("div", { key: '0ff21f48796f21dee167a686e3e346896a56cf71', class: "CustomContentSectionWrapper" }, index$2.h("div", { key: '6b8be4492fdb7f8c3b07545089a2e4dd47a1d8c8', class: "CustomContentSectionContent", innerHTML: clean }), this.repeaterContent ? index$2.h("image-list", { style: { width: "100%" }, repeaterContent: this.repeaterContent ? this.repeaterContent : null, "navigate-via-event": this.navigateViaEvent, "post-message-event": this.postMessageEvent }) : ''));
9552
+ return index$2.h("div", { key: 'a4613d65e38bb44dacda6d6d1df9a3cf32845167', class: "CustomContentSectionContainer" }, index$2.h("div", { key: 'f6704f1e13d3a5dd188318cad51babdd8af8b2f1', class: "CustomContentSectionWrapper" }, index$2.h("div", { key: 'e818696e2ef290f92905adbac46fdd9f5ddf3e6c', class: "CustomContentSectionContent", innerHTML: clean }), this.repeaterContent ? index$2.h("image-list", { style: { width: "100%" }, repeaterContent: this.repeaterContent ? this.repeaterContent : null, "navigate-via-event": this.navigateViaEvent, "post-message-event": this.postMessageEvent }) : ''));
9554
9553
  }
9555
9554
  };
9556
9555
  CustomContentSection.style = CustomContentSectionStyle0;
@@ -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"],"skeletonLoading":[32]}]]],["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],"imgClass":[1,"img-class"],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[1],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"skeletonLoading":[32]}]]]], 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"],"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":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[1],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},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;
@@ -13,41 +13,16 @@ const ImageList = class {
13
13
  this.navigateLink = (url, target, externalLink) => {
14
14
  window.postMessage({ type: this.postMessageEvent, path: url, url, target, externalLink }, window.location.href);
15
15
  };
16
- this.onImageLoad = () => {
17
- this.removeLoadingState();
18
- this.cleanupListeners();
19
- };
20
16
  this.repeaterContent = undefined;
21
17
  this.navigateViaEvent = false;
22
18
  this.postMessageEvent = '';
23
- this.skeletonLoading = true;
24
- }
25
- componentDidLoad() {
26
- this.initImageListeners();
27
- }
28
- initImageListeners() {
29
- if (!this.imgRef)
30
- return;
31
- if (this.imgRef.complete) {
32
- this.onImageLoad();
33
- return;
34
- }
35
- this.imgRef.addEventListener('load', this.onImageLoad);
36
- }
37
- removeLoadingState() {
38
- this.skeletonLoading = false;
39
- }
40
- cleanupListeners() {
41
- var _a;
42
- (_a = this.imgRef) === null || _a === void 0 ? void 0 : _a.removeEventListener('load', this.onImageLoad);
43
19
  }
44
20
  render() {
45
21
  var _a, _b, _c, _d;
46
- return ((_a = this.repeaterContent) === null || _a === void 0 ? void 0 : _a.content.length) > 0 && index.h("div", { key: '36827a44dd3782bf173681efcf7a5592582efb32', class: "ImageListContainer" }, index.h("div", { key: 'd94522bf3aeafd30b56b63182854d11b44c74e65', class: "ImageListWrapper" }, index.h("div", { key: '11c2ab05764b80fa01322a30952f97646a8130c8', class: "ImageListSectionTitle" }, (_b = this.repeaterContent) === null || _b === void 0 ? void 0 : _b.categoryTitle), index.h("div", { key: 'eb0b8f03cf1c69095243ce42c99e86b74003cd01', class: "ImageListLineup" }, (_d = (_c = this.repeaterContent) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.map(repeater => {
47
- return (index.h("div", { class: 'ImageListIcon' }, this.navigateViaEvent === true ? (index.h("div", { class: 'ImageListIcon', style: { cursor: 'pointer' }, onClick: () => this.navigateLink(repeater === null || repeater === void 0 ? void 0 : repeater.url, repeater === null || repeater === void 0 ? void 0 : repeater.target, repeater === null || repeater === void 0 ? void 0 : repeater.isExternalLink) }, index.h("div", { class: "ContainerImage" }, index.h("ui-image", { src: repeater === null || repeater === void 0 ? void 0 : repeater.image, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (index.h("div", { class: "SkeletonWrapper" }, index.h("ui-skeleton", { structure: "rectangle", rows: "1", width: "100%", height: "100%" })))), index.h("p", null, repeater === null || repeater === void 0 ? void 0 : repeater.title))) : (index.h("a", { href: (repeater === null || repeater === void 0 ? void 0 : repeater.url) || 'javascript:void(0)', target: (repeater === null || repeater === void 0 ? void 0 : repeater.target) || '_parent' }, index.h("div", { class: "ContainerImage" }, this.skeletonLoading && (index.h("div", { class: "SkeletonWrapper" }, index.h("ui-skeleton", { structure: "rectangle", rows: "1", width: "100%", height: "100%" }))), index.h("div", { class: "ImageListPositioner" }, index.h("ui-image", { src: repeater === null || repeater === void 0 ? void 0 : repeater.image, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }))), index.h("p", null, repeater === null || repeater === void 0 ? void 0 : repeater.title)))));
22
+ return ((_a = this.repeaterContent) === null || _a === void 0 ? void 0 : _a.content.length) > 0 && index.h("div", { key: 'e7604ed1dcace3e2bd67c74e677e5c849c9c8407', class: "ImageListContainer" }, index.h("div", { key: '985672261fcfeac501d1182f5ab9f20e82307cc7', class: "ImageListWrapper" }, index.h("div", { key: '29b903e7bd639b8eb782d5aa6b646098ceee1ced', class: "ImageListSectionTitle" }, (_b = this.repeaterContent) === null || _b === void 0 ? void 0 : _b.categoryTitle), index.h("div", { key: '6cf6da5d3480a5f6d25c9d106e143dbb222e3b74', class: "ImageListLineup" }, (_d = (_c = this.repeaterContent) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.map(repeater => {
23
+ return (index.h("div", { class: 'ImageListIcon' }, this.navigateViaEvent === true ? (index.h("div", { class: 'ImageListIcon', style: { cursor: 'pointer' }, onClick: () => this.navigateLink(repeater === null || repeater === void 0 ? void 0 : repeater.url, repeater === null || repeater === void 0 ? void 0 : repeater.target, repeater === null || repeater === void 0 ? void 0 : repeater.isExternalLink) }, index.h("div", { class: "ContainerImage" }, index.h("ui-image", { src: repeater === null || repeater === void 0 ? void 0 : repeater.image, alt: "icon" })), index.h("p", null, repeater === null || repeater === void 0 ? void 0 : repeater.title))) : (index.h("a", { href: (repeater === null || repeater === void 0 ? void 0 : repeater.url) || 'javascript:void(0)', target: (repeater === null || repeater === void 0 ? void 0 : repeater.target) || '_parent' }, index.h("div", { class: "ContainerImage" }, index.h("div", { class: "ImageListPositioner" }, index.h("ui-image", { src: repeater === null || repeater === void 0 ? void 0 : repeater.image, alt: "icon" }))), index.h("p", null, repeater === null || repeater === void 0 ? void 0 : repeater.title)))));
48
24
  }))));
49
25
  }
50
- get el() { return index.getElement(this); }
51
26
  };
52
27
  ImageList.style = ImageListStyle0;
53
28
 
@@ -10,35 +10,11 @@ const LinkSectionListStyle0 = linkSectionListCss;
10
10
  const LinkSectionList = class {
11
11
  constructor(hostRef) {
12
12
  index.registerInstance(this, hostRef);
13
- this.onImageLoad = () => {
14
- this.removeLoadingState();
15
- this.cleanupListeners();
16
- };
17
13
  this.repeaterContent = undefined;
18
14
  this.baseUrl = undefined;
19
15
  this.language = undefined;
20
16
  this.navigateViaEvent = false;
21
17
  this.postMessageEvent = '';
22
- this.skeletonLoading = true;
23
- }
24
- componentDidLoad() {
25
- this.initImageListeners();
26
- }
27
- initImageListeners() {
28
- if (!this.imgRef)
29
- return;
30
- if (this.imgRef.complete) {
31
- this.onImageLoad();
32
- return;
33
- }
34
- this.imgRef.addEventListener('load', this.onImageLoad);
35
- }
36
- removeLoadingState() {
37
- this.skeletonLoading = false;
38
- }
39
- cleanupListeners() {
40
- var _a;
41
- (_a = this.imgRef) === null || _a === void 0 ? void 0 : _a.removeEventListener('load', this.onImageLoad);
42
18
  }
43
19
  navigateLink(link) {
44
20
  window.postMessage({ type: this.postMessageEvent, path: link.linkUrl, url: link.linkUrl, target: link.target, externalLink: link.externalLink }, window.location.href);
@@ -72,15 +48,14 @@ const LinkSectionList = class {
72
48
  }
73
49
  return obj;
74
50
  }, []);
75
- return index.h("div", { class: "LinkSectionListContainer" }, index.h("div", { class: "LinkSectionListWrapper" }, this.repeaterContent.categoryTitle && index.h("h2", { class: "LinkSectionListTitle" }, this.repeaterContent.categoryTitle), linkSections.map(category => index.h("ul", null, category.categoryTitle && index.h("p", null, category.categoryTitle), category.links.map(link => index.h("li", { class: "LinkSectionListLink", key: link.linkName }, this.navigateViaEvent === true ? (index.h("span", null, link.linkName && link.icon ? (index.h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, index.h("div", { class: "ContainerImage" }, index.h("img", { class: "LinkSectionIcon", src: link.icon, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (index.h("div", { class: "SkeletonWrapper" }, index.h("ui-skeleton", { structure: "text", rows: "1", width: "100%", height: "100%" })))), index.h("span", { class: '' }, link.linkName, " "))) :
51
+ return index.h("div", { class: "LinkSectionListContainer" }, index.h("div", { class: "LinkSectionListWrapper" }, this.repeaterContent.categoryTitle && index.h("h2", { class: "LinkSectionListTitle" }, this.repeaterContent.categoryTitle), linkSections.map(category => index.h("ul", null, category.categoryTitle && index.h("p", null, category.categoryTitle), category.links.map(link => index.h("li", { class: "LinkSectionListLink", key: link.linkName }, this.navigateViaEvent === true ? (index.h("span", null, link.linkName && link.icon ? (index.h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, index.h("div", { class: "ContainerImage" }, index.h("ui-image", { class: "LinkSectionIcon", src: link.icon, alt: "icon" })), index.h("span", { class: '' }, link.linkName, " "))) :
76
52
  link.linkName ?
77
53
  index.h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, index.h("span", null, link.linkName, " "))
78
54
  :
79
- index.h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, index.h("div", { class: "ContainerImage" }, index.h("img", { class: "LinkSectionIcon", src: link.icon, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (index.h("div", { class: "SkeletonWrapper" }, index.h("ui-skeleton", { structure: "text", rows: "1", width: "100%", height: "100%" }))))))) : (index.h("a", { class: "LinkSectionListLink", href: link.externalLink ? link.linkUrl : `${this.baseUrl}/${this.language}${link.linkUrl}`, target: link.target || '_blank' }, link.linkName && link.icon ? (index.h("span", { class: "LinkSectionListLinkText" }, index.h("div", { class: "ContainerImage" }, index.h("img", { class: "LinkSectionIcon", src: link.icon, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (index.h("div", { class: "SkeletonWrapper" }, index.h("ui-skeleton", { structure: "text", rows: "1", width: "100%", height: "100%" })))), index.h("span", null, link.linkName))) :
55
+ index.h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, index.h("div", { class: "ContainerImage" }, index.h("ui-image", { class: "LinkSectionIcon", src: link.icon, alt: "icon" }))))) : (index.h("a", { class: "LinkSectionListLink", href: link.externalLink ? link.linkUrl : `${this.baseUrl}/${this.language}${link.linkUrl}`, target: link.target || '_blank' }, link.linkName && link.icon ? (index.h("span", { class: "LinkSectionListLinkText" }, index.h("div", { class: "ContainerImage" }, index.h("ui-image", { class: "LinkSectionIcon", src: link.icon, alt: "icon" })), index.h("span", null, link.linkName))) :
80
56
  link.linkName ? (index.h("span", { class: "LinkSectionListLinkText" }, index.h("span", null, link.linkName))) :
81
- index.h("span", { class: "LinkSectionListLinkText" }, index.h("div", { class: "ContainerImage" }, index.h("img", { class: "LinkSectionIcon", src: link.icon, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (index.h("div", { class: "SkeletonWrapper" }, index.h("ui-skeleton", { structure: "text", rows: "1", width: "100%", height: "100%" })))))))))))));
57
+ index.h("span", { class: "LinkSectionListLinkText" }, index.h("div", { class: "ContainerImage" }, index.h("ui-image", { class: "LinkSectionIcon", src: link.icon, alt: "icon" })))))))))));
82
58
  }
83
- get el() { return index.getElement(this); }
84
59
  };
85
60
  LinkSectionList.style = LinkSectionListStyle0;
86
61
 
@@ -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"],"skeletonLoading":[32]}]]],["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],"imgClass":[1,"img-class"],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[1],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"skeletonLoading":[32]}]]]], 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"],"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":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[1],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},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;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4f1d0ebb.js');
6
6
 
7
- const uiImageCss = ":host{display:block}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;transition:opacity 0.5s ease-in-out}";
7
+ const uiImageCss = ".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;transition:opacity 0.5s ease-in-out}";
8
8
  const UiImageStyle0 = uiImageCss;
9
9
 
10
10
  const UiImage = class {
@@ -14,7 +14,6 @@ const UiImage = class {
14
14
  this.width = undefined;
15
15
  this.height = undefined;
16
16
  this.alt = undefined;
17
- this.imgClass = '';
18
17
  this.styles = undefined;
19
18
  this.detectDistance = '200px';
20
19
  this.imgLoaded = false;
@@ -24,15 +23,14 @@ const UiImage = class {
24
23
  if (!this.shouldLoad) {
25
24
  return;
26
25
  }
27
- const tempImage = new Image();
28
- tempImage.src = this.src;
29
- tempImage.onload = () => {
26
+ const preloadedImage = new Image();
27
+ preloadedImage.onload = () => {
30
28
  if (this.image) {
31
29
  this.image.src = this.src;
32
30
  this.imgLoaded = true;
33
- this.el.dispatchEvent(new CustomEvent('load', { bubbles: true }));
34
31
  }
35
32
  };
33
+ preloadedImage.src = this.src;
36
34
  }
37
35
  componentDidLoad() {
38
36
  if ('IntersectionObserver' in window) {
@@ -59,7 +57,7 @@ const UiImage = class {
59
57
  }
60
58
  }
61
59
  render() {
62
- return (index.h("img", { key: '2bb4dc391fc2f753514103e91c0abf065de3236a', ref: el => (this.image = el), style: this.styles, class: `${this.imgClass} ${this.imgLoaded ? 'Visible' : 'Hidden'}`, alt: this.alt, width: this.width, height: this.height, loading: "lazy" }));
60
+ return (index.h(index.Host, { key: '527318220c6b48375943e897fe0e53e0f33e67ed', class: "HostContainer" }, !this.imgLoaded && (index.h("ui-skeleton", { key: 'e5c49a781ff2fac5c796cb6a3f8d334dce7be35b', class: "UiContainer", structure: "image", width: "100%", height: "100%" })), index.h("img", { key: '09dfbf8f52c2c899246590790f2780a84bdeefc3', 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" })));
63
61
  }
64
62
  get el() { return index.getElement(this); }
65
63
  static get watchers() { return {
@@ -68,7 +66,7 @@ const UiImage = class {
68
66
  };
69
67
  UiImage.style = UiImageStyle0;
70
68
 
71
- const uiSkeletonCss = ":host{display:block;--emw-skeleton-rectangle-background:#c2c2c2;--emw-skeleton-circle-background:#c2c2c2;--emw-skeleton-text-background:#c2c2c2;--emw-skeleton-title-background:#c2c2c2;--emw-skeleton-image-background:#c2c2c2;--emw-skeleton-logo-background:#c2c2c2;--emw-skeleton-primary-color:#e0e0e0;--emw-skeleton-secondary-color:#f0f0f0}.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, 2px)}.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, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.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, 5px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 250px);height:var(--emw-skeleton-image-height, 200px);border-radius:var(--emw-skeleton-image-border-radius, 10px)}.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, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";
69
+ const uiSkeletonCss = ":host{display:block;--emw-skeleton-rectangle-background:#c2c2c2;--emw-skeleton-circle-background:#c2c2c2;--emw-skeleton-text-background:#c2c2c2;--emw-skeleton-title-background:#c2c2c2;--emw-skeleton-image-background:#c2c2c2;--emw-skeleton-logo-background:#c2c2c2;--emw-skeleton-primary-color:#e0e0e0;--emw-skeleton-secondary-color:#f0f0f0}.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, 2px)}.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, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.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, 5px);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, inherit)}.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, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";
72
70
  const UiSkeletonStyle0 = uiSkeletonCss;
73
71
 
74
72
  const UiSkeleton = class {
@@ -116,7 +114,7 @@ const UiSkeleton = class {
116
114
  return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: "Logo " + (this.animation ? 'Skeleton' : '') })));
117
115
  }
118
116
  renderImage() {
119
- return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: "Image " + (this.animation ? 'Skeleton' : '') })));
117
+ return (index.h("div", { class: "Image " + (this.animation ? 'Skeleton' : '') }));
120
118
  }
121
119
  renderTitle() {
122
120
  return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: "Title " + (this.animation ? 'Skeleton' : '') })));
@@ -226,7 +224,7 @@ const UiSkeleton = class {
226
224
  default:
227
225
  styleBlock = '';
228
226
  }
229
- return (index.h(index.Host, { key: '0641e666452d2172c26ed238d236c2ca3db9f8ed' }, index.h("style", { key: '285fb8210d32aff7f99005627fdecf36f66e82a4' }, styleBlock), this.handleStructure(this.structure)));
227
+ return (index.h(index.Host, { key: '3bb792a149db7fe732d5cbfa092cdb4d6ca0689e' }, index.h("style", { key: 'a4607599b60659f385ae2660513e38b383739674' }, styleBlock), this.handleStructure(this.structure)));
230
228
  }
231
229
  static get watchers() { return {
232
230
  "structure": ["handleStructureChange"]
@@ -1,6 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
2
  import sanitizeHtml from "sanitize-html";
3
- import "../../../../../ui-skeleton/dist/types/index";
4
3
  export class CustomContentSection {
5
4
  constructor() {
6
5
  this.customContent = undefined;
@@ -16,7 +15,7 @@ export class CustomContentSection {
16
15
  a: ['href', 'target', 'rel']
17
16
  }
18
17
  });
19
- return h("div", { key: '9990a716f474932b66644b13ec3ef378302dfaeb', class: "CustomContentSectionContainer" }, h("div", { key: '0ff21f48796f21dee167a686e3e346896a56cf71', class: "CustomContentSectionWrapper" }, h("div", { key: '6b8be4492fdb7f8c3b07545089a2e4dd47a1d8c8', class: "CustomContentSectionContent", innerHTML: clean }), this.repeaterContent ? h("image-list", { style: { width: "100%" }, repeaterContent: this.repeaterContent ? this.repeaterContent : null, "navigate-via-event": this.navigateViaEvent, "post-message-event": this.postMessageEvent }) : ''));
18
+ return h("div", { key: 'a4613d65e38bb44dacda6d6d1df9a3cf32845167', class: "CustomContentSectionContainer" }, h("div", { key: 'f6704f1e13d3a5dd188318cad51babdd8af8b2f1', class: "CustomContentSectionWrapper" }, h("div", { key: 'e818696e2ef290f92905adbac46fdd9f5ddf3e6c', class: "CustomContentSectionContent", innerHTML: clean }), this.repeaterContent ? h("image-list", { style: { width: "100%" }, repeaterContent: this.repeaterContent ? this.repeaterContent : null, "navigate-via-event": this.navigateViaEvent, "post-message-event": this.postMessageEvent }) : ''));
20
19
  }
21
20
  static get is() { return "custom-content-section"; }
22
21
  static get encapsulation() { return "scoped"; }
@@ -1,7 +1,7 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { componentRules, normalizeRepeaterContent, getDevicePlatform } from "../../utils/utils";
3
3
  import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
4
- import "../../../../../ui-skeleton/dist/types/index";
4
+ import "../../../../../ui-image/dist/types/index";
5
5
  export class GeneralFooterTemplate {
6
6
  constructor() {
7
7
  this.platform = getDevicePlatform();
@@ -5,38 +5,14 @@ export class ImageList {
5
5
  this.navigateLink = (url, target, externalLink) => {
6
6
  window.postMessage({ type: this.postMessageEvent, path: url, url, target, externalLink }, window.location.href);
7
7
  };
8
- this.onImageLoad = () => {
9
- this.removeLoadingState();
10
- this.cleanupListeners();
11
- };
12
8
  this.repeaterContent = undefined;
13
9
  this.navigateViaEvent = false;
14
10
  this.postMessageEvent = '';
15
- this.skeletonLoading = true;
16
- }
17
- componentDidLoad() {
18
- this.initImageListeners();
19
- }
20
- initImageListeners() {
21
- if (!this.imgRef)
22
- return;
23
- if (this.imgRef.complete) {
24
- this.onImageLoad();
25
- return;
26
- }
27
- this.imgRef.addEventListener('load', this.onImageLoad);
28
- }
29
- removeLoadingState() {
30
- this.skeletonLoading = false;
31
- }
32
- cleanupListeners() {
33
- var _a;
34
- (_a = this.imgRef) === null || _a === void 0 ? void 0 : _a.removeEventListener('load', this.onImageLoad);
35
11
  }
36
12
  render() {
37
13
  var _a, _b, _c, _d;
38
- return ((_a = this.repeaterContent) === null || _a === void 0 ? void 0 : _a.content.length) > 0 && h("div", { key: '36827a44dd3782bf173681efcf7a5592582efb32', class: "ImageListContainer" }, h("div", { key: 'd94522bf3aeafd30b56b63182854d11b44c74e65', class: "ImageListWrapper" }, h("div", { key: '11c2ab05764b80fa01322a30952f97646a8130c8', class: "ImageListSectionTitle" }, (_b = this.repeaterContent) === null || _b === void 0 ? void 0 : _b.categoryTitle), h("div", { key: 'eb0b8f03cf1c69095243ce42c99e86b74003cd01', class: "ImageListLineup" }, (_d = (_c = this.repeaterContent) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.map(repeater => {
39
- return (h("div", { class: 'ImageListIcon' }, this.navigateViaEvent === true ? (h("div", { class: 'ImageListIcon', style: { cursor: 'pointer' }, onClick: () => this.navigateLink(repeater === null || repeater === void 0 ? void 0 : repeater.url, repeater === null || repeater === void 0 ? void 0 : repeater.target, repeater === null || repeater === void 0 ? void 0 : repeater.isExternalLink) }, h("div", { class: "ContainerImage" }, h("ui-image", { src: repeater === null || repeater === void 0 ? void 0 : repeater.image, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (h("div", { class: "SkeletonWrapper" }, h("ui-skeleton", { structure: "rectangle", rows: "1", width: "100%", height: "100%" })))), h("p", null, repeater === null || repeater === void 0 ? void 0 : repeater.title))) : (h("a", { href: (repeater === null || repeater === void 0 ? void 0 : repeater.url) || 'javascript:void(0)', target: (repeater === null || repeater === void 0 ? void 0 : repeater.target) || '_parent' }, h("div", { class: "ContainerImage" }, this.skeletonLoading && (h("div", { class: "SkeletonWrapper" }, h("ui-skeleton", { structure: "rectangle", rows: "1", width: "100%", height: "100%" }))), h("div", { class: "ImageListPositioner" }, h("ui-image", { src: repeater === null || repeater === void 0 ? void 0 : repeater.image, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }))), h("p", null, repeater === null || repeater === void 0 ? void 0 : repeater.title)))));
14
+ return ((_a = this.repeaterContent) === null || _a === void 0 ? void 0 : _a.content.length) > 0 && h("div", { key: 'e7604ed1dcace3e2bd67c74e677e5c849c9c8407', class: "ImageListContainer" }, h("div", { key: '985672261fcfeac501d1182f5ab9f20e82307cc7', class: "ImageListWrapper" }, h("div", { key: '29b903e7bd639b8eb782d5aa6b646098ceee1ced', class: "ImageListSectionTitle" }, (_b = this.repeaterContent) === null || _b === void 0 ? void 0 : _b.categoryTitle), h("div", { key: '6cf6da5d3480a5f6d25c9d106e143dbb222e3b74', class: "ImageListLineup" }, (_d = (_c = this.repeaterContent) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.map(repeater => {
15
+ return (h("div", { class: 'ImageListIcon' }, this.navigateViaEvent === true ? (h("div", { class: 'ImageListIcon', style: { cursor: 'pointer' }, onClick: () => this.navigateLink(repeater === null || repeater === void 0 ? void 0 : repeater.url, repeater === null || repeater === void 0 ? void 0 : repeater.target, repeater === null || repeater === void 0 ? void 0 : repeater.isExternalLink) }, h("div", { class: "ContainerImage" }, h("ui-image", { src: repeater === null || repeater === void 0 ? void 0 : repeater.image, alt: "icon" })), h("p", null, repeater === null || repeater === void 0 ? void 0 : repeater.title))) : (h("a", { href: (repeater === null || repeater === void 0 ? void 0 : repeater.url) || 'javascript:void(0)', target: (repeater === null || repeater === void 0 ? void 0 : repeater.target) || '_parent' }, h("div", { class: "ContainerImage" }, h("div", { class: "ImageListPositioner" }, h("ui-image", { src: repeater === null || repeater === void 0 ? void 0 : repeater.image, alt: "icon" }))), h("p", null, repeater === null || repeater === void 0 ? void 0 : repeater.title)))));
40
16
  }))));
41
17
  }
42
18
  static get is() { return "image-list"; }
@@ -108,10 +84,4 @@ export class ImageList {
108
84
  }
109
85
  };
110
86
  }
111
- static get states() {
112
- return {
113
- "skeletonLoading": {}
114
- };
115
- }
116
- static get elementRef() { return "el"; }
117
87
  }
@@ -1,35 +1,12 @@
1
1
  import { h } from "@stencil/core";
2
+ import "../../../../../ui-image/dist/types/index";
2
3
  export class LinkSectionList {
3
4
  constructor() {
4
- this.onImageLoad = () => {
5
- this.removeLoadingState();
6
- this.cleanupListeners();
7
- };
8
5
  this.repeaterContent = undefined;
9
6
  this.baseUrl = undefined;
10
7
  this.language = undefined;
11
8
  this.navigateViaEvent = false;
12
9
  this.postMessageEvent = '';
13
- this.skeletonLoading = true;
14
- }
15
- componentDidLoad() {
16
- this.initImageListeners();
17
- }
18
- initImageListeners() {
19
- if (!this.imgRef)
20
- return;
21
- if (this.imgRef.complete) {
22
- this.onImageLoad();
23
- return;
24
- }
25
- this.imgRef.addEventListener('load', this.onImageLoad);
26
- }
27
- removeLoadingState() {
28
- this.skeletonLoading = false;
29
- }
30
- cleanupListeners() {
31
- var _a;
32
- (_a = this.imgRef) === null || _a === void 0 ? void 0 : _a.removeEventListener('load', this.onImageLoad);
33
10
  }
34
11
  navigateLink(link) {
35
12
  window.postMessage({ type: this.postMessageEvent, path: link.linkUrl, url: link.linkUrl, target: link.target, externalLink: link.externalLink }, window.location.href);
@@ -63,13 +40,13 @@ export class LinkSectionList {
63
40
  }
64
41
  return obj;
65
42
  }, []);
66
- return h("div", { class: "LinkSectionListContainer" }, h("div", { class: "LinkSectionListWrapper" }, this.repeaterContent.categoryTitle && h("h2", { class: "LinkSectionListTitle" }, this.repeaterContent.categoryTitle), linkSections.map(category => h("ul", null, category.categoryTitle && h("p", null, category.categoryTitle), category.links.map(link => h("li", { class: "LinkSectionListLink", key: link.linkName }, this.navigateViaEvent === true ? (h("span", null, link.linkName && link.icon ? (h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, h("div", { class: "ContainerImage" }, h("img", { class: "LinkSectionIcon", src: link.icon, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (h("div", { class: "SkeletonWrapper" }, h("ui-skeleton", { structure: "text", rows: "1", width: "100%", height: "100%" })))), h("span", { class: '' }, link.linkName, " "))) :
43
+ return h("div", { class: "LinkSectionListContainer" }, h("div", { class: "LinkSectionListWrapper" }, this.repeaterContent.categoryTitle && h("h2", { class: "LinkSectionListTitle" }, this.repeaterContent.categoryTitle), linkSections.map(category => h("ul", null, category.categoryTitle && h("p", null, category.categoryTitle), category.links.map(link => h("li", { class: "LinkSectionListLink", key: link.linkName }, this.navigateViaEvent === true ? (h("span", null, link.linkName && link.icon ? (h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, h("div", { class: "ContainerImage" }, h("ui-image", { class: "LinkSectionIcon", src: link.icon, alt: "icon" })), h("span", { class: '' }, link.linkName, " "))) :
67
44
  link.linkName ?
68
45
  h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, h("span", null, link.linkName, " "))
69
46
  :
70
- h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, h("div", { class: "ContainerImage" }, h("img", { class: "LinkSectionIcon", src: link.icon, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (h("div", { class: "SkeletonWrapper" }, h("ui-skeleton", { structure: "text", rows: "1", width: "100%", height: "100%" }))))))) : (h("a", { class: "LinkSectionListLink", href: link.externalLink ? link.linkUrl : `${this.baseUrl}/${this.language}${link.linkUrl}`, target: link.target || '_blank' }, link.linkName && link.icon ? (h("span", { class: "LinkSectionListLinkText" }, h("div", { class: "ContainerImage" }, h("img", { class: "LinkSectionIcon", src: link.icon, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (h("div", { class: "SkeletonWrapper" }, h("ui-skeleton", { structure: "text", rows: "1", width: "100%", height: "100%" })))), h("span", null, link.linkName))) :
47
+ h("span", { class: "LinkSectionListLinkText", onClick: () => this.navigateLink(link) }, h("div", { class: "ContainerImage" }, h("ui-image", { class: "LinkSectionIcon", src: link.icon, alt: "icon" }))))) : (h("a", { class: "LinkSectionListLink", href: link.externalLink ? link.linkUrl : `${this.baseUrl}/${this.language}${link.linkUrl}`, target: link.target || '_blank' }, link.linkName && link.icon ? (h("span", { class: "LinkSectionListLinkText" }, h("div", { class: "ContainerImage" }, h("ui-image", { class: "LinkSectionIcon", src: link.icon, alt: "icon" })), h("span", null, link.linkName))) :
71
48
  link.linkName ? (h("span", { class: "LinkSectionListLinkText" }, h("span", null, link.linkName))) :
72
- h("span", { class: "LinkSectionListLinkText" }, h("div", { class: "ContainerImage" }, h("img", { class: "LinkSectionIcon", src: link.icon, alt: "icon", ref: (el) => (this.imgRef = el), style: { display: this.skeletonLoading ? 'none' : 'block' } }), this.skeletonLoading && (h("div", { class: "SkeletonWrapper" }, h("ui-skeleton", { structure: "text", rows: "1", width: "100%", height: "100%" })))))))))))));
49
+ h("span", { class: "LinkSectionListLinkText" }, h("div", { class: "ContainerImage" }, h("ui-image", { class: "LinkSectionIcon", src: link.icon, alt: "icon" })))))))))));
73
50
  }
74
51
  static get is() { return "link-section-list"; }
75
52
  static get originalStyleUrls() {
@@ -173,10 +150,4 @@ export class LinkSectionList {
173
150
  }
174
151
  };
175
152
  }
176
- static get states() {
177
- return {
178
- "skeletonLoading": {}
179
- };
180
- }
181
- static get elementRef() { return "el"; }
182
153
  }