@openeuropa/bcl-theme-joinup 1.10.7 → 1.10.9

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 (98) hide show
  1. package/css/oe-bcl-joinup.css +362 -220
  2. package/css/oe-bcl-joinup.css.map +1 -1
  3. package/css/oe-bcl-joinup.min.css +1 -1
  4. package/css/oe-bcl-joinup.min.css.map +1 -1
  5. package/fonts/files/roboto-cyrillic-400-italic.woff +0 -0
  6. package/fonts/files/roboto-cyrillic-400-italic.woff2 +0 -0
  7. package/fonts/files/roboto-cyrillic-400-normal.woff +0 -0
  8. package/fonts/files/roboto-cyrillic-400-normal.woff2 +0 -0
  9. package/fonts/files/roboto-cyrillic-500-italic.woff +0 -0
  10. package/fonts/files/roboto-cyrillic-500-italic.woff2 +0 -0
  11. package/fonts/files/roboto-cyrillic-500-normal.woff +0 -0
  12. package/fonts/files/roboto-cyrillic-500-normal.woff2 +0 -0
  13. package/fonts/files/roboto-cyrillic-700-italic.woff +0 -0
  14. package/fonts/files/roboto-cyrillic-700-italic.woff2 +0 -0
  15. package/fonts/files/roboto-cyrillic-700-normal.woff +0 -0
  16. package/fonts/files/roboto-cyrillic-700-normal.woff2 +0 -0
  17. package/fonts/files/roboto-greek-400-italic.woff +0 -0
  18. package/fonts/files/roboto-greek-400-italic.woff2 +0 -0
  19. package/fonts/files/roboto-greek-400-normal.woff +0 -0
  20. package/fonts/files/roboto-greek-400-normal.woff2 +0 -0
  21. package/fonts/files/roboto-greek-500-italic.woff +0 -0
  22. package/fonts/files/roboto-greek-500-italic.woff2 +0 -0
  23. package/fonts/files/roboto-greek-500-normal.woff +0 -0
  24. package/fonts/files/roboto-greek-500-normal.woff2 +0 -0
  25. package/fonts/files/roboto-greek-700-italic.woff +0 -0
  26. package/fonts/files/roboto-greek-700-italic.woff2 +0 -0
  27. package/fonts/files/roboto-greek-700-normal.woff +0 -0
  28. package/fonts/files/roboto-greek-700-normal.woff2 +0 -0
  29. package/fonts/files/roboto-latin-400-italic.woff +0 -0
  30. package/fonts/files/roboto-latin-400-italic.woff2 +0 -0
  31. package/fonts/files/roboto-latin-400-normal.woff +0 -0
  32. package/fonts/files/roboto-latin-400-normal.woff2 +0 -0
  33. package/fonts/files/roboto-latin-500-italic.woff +0 -0
  34. package/fonts/files/roboto-latin-500-italic.woff2 +0 -0
  35. package/fonts/files/roboto-latin-500-normal.woff +0 -0
  36. package/fonts/files/roboto-latin-500-normal.woff2 +0 -0
  37. package/fonts/files/roboto-latin-700-italic.woff +0 -0
  38. package/fonts/files/roboto-latin-700-italic.woff2 +0 -0
  39. package/fonts/files/roboto-latin-700-normal.woff +0 -0
  40. package/fonts/files/roboto-latin-700-normal.woff2 +0 -0
  41. package/fonts/files/roboto-latin-ext-400-italic.woff +0 -0
  42. package/fonts/files/roboto-latin-ext-400-italic.woff2 +0 -0
  43. package/fonts/files/roboto-latin-ext-400-normal.woff +0 -0
  44. package/fonts/files/roboto-latin-ext-400-normal.woff2 +0 -0
  45. package/fonts/files/roboto-latin-ext-500-italic.woff +0 -0
  46. package/fonts/files/roboto-latin-ext-500-italic.woff2 +0 -0
  47. package/fonts/files/roboto-latin-ext-500-normal.woff +0 -0
  48. package/fonts/files/roboto-latin-ext-500-normal.woff2 +0 -0
  49. package/fonts/files/roboto-latin-ext-700-italic.woff +0 -0
  50. package/fonts/files/roboto-latin-ext-700-italic.woff2 +0 -0
  51. package/fonts/files/roboto-latin-ext-700-normal.woff +0 -0
  52. package/fonts/files/roboto-latin-ext-700-normal.woff2 +0 -0
  53. package/icons/bcl-default-icons.svg +1 -1
  54. package/icons/bootstrap-icons.svg +1 -1
  55. package/js/oe-bcl-joinup.bundle.js +86 -14
  56. package/js/oe-bcl-joinup.bundle.js.map +1 -1
  57. package/js/oe-bcl-joinup.bundle.min.js +1 -1
  58. package/js/oe-bcl-joinup.bundle.min.js.map +1 -1
  59. package/js/oe-bcl-joinup.esm.js +85 -14
  60. package/js/oe-bcl-joinup.esm.js.map +1 -1
  61. package/js/oe-bcl-joinup.esm.min.js +1 -1
  62. package/js/oe-bcl-joinup.esm.min.js.map +1 -1
  63. package/js/oe-bcl-joinup.umd.js +86 -14
  64. package/js/oe-bcl-joinup.umd.js.map +1 -1
  65. package/js/oe-bcl-joinup.umd.min.js +1 -1
  66. package/js/oe-bcl-joinup.umd.min.js.map +1 -1
  67. package/package.json +12 -12
  68. package/src/js/index.esm.js +2 -0
  69. package/src/js/index.umd.js +2 -0
  70. package/src/scss/oe-bcl-joinup.scss +3 -2
  71. package/templates/bcl-base-templates/listing-page.html.twig +17 -19
  72. package/templates/bcl-contact-form/contact-form.html.twig +3 -3
  73. package/templates/bcl-content-banner/content-banner.html.twig +3 -0
  74. package/templates/bcl-dropdown/dropdown.html.twig +12 -7
  75. package/templates/bcl-event/event.html.twig +5 -5
  76. package/templates/bcl-file/file.html.twig +1 -1
  77. package/templates/bcl-glossary/glossary-detail.html.twig +4 -5
  78. package/templates/bcl-glossary/glossary-listing.html.twig +5 -5
  79. package/templates/bcl-group/group-landing.html.twig +5 -5
  80. package/templates/bcl-group/group.html.twig +3 -3
  81. package/templates/bcl-header/header.html.twig +43 -50
  82. package/templates/bcl-landing-page/landing-page.html.twig +5 -8
  83. package/templates/bcl-language-list/language-list-modal.html.twig +58 -5
  84. package/templates/bcl-links-block/links-block.html.twig +1 -1
  85. package/templates/bcl-mega-menu/mega-menu-submenu.html.twig +10 -7
  86. package/templates/bcl-modal/modal.html.twig +20 -7
  87. package/templates/bcl-navigation/navigation.html.twig +8 -0
  88. package/templates/bcl-page/page.html.twig +5 -5
  89. package/templates/bcl-pagination-v2/pagination-item.html.twig +90 -0
  90. package/templates/bcl-pagination-v2/pagination.html.twig +213 -0
  91. package/templates/bcl-person/person.html.twig +5 -5
  92. package/templates/bcl-project/project.html.twig +7 -7
  93. package/templates/bcl-project-status/project-contributions.html.twig +1 -1
  94. package/templates/bcl-search/search.html.twig +3 -3
  95. package/templates/bcl-subscription/subscription.html.twig +5 -5
  96. package/templates/{bcl-toast → bcl-toasts}/toasts.html.twig +17 -8
  97. package/templates/bcl-user/user-terms.html.twig +3 -3
  98. package/templates/bcl-user/user.html.twig +3 -3
@@ -638,7 +638,7 @@ class Config {
638
638
  * Constants
639
639
  */
640
640
 
641
- const VERSION = '5.3.6';
641
+ const VERSION = '5.3.8';
642
642
 
643
643
  /**
644
644
  * Class definition
@@ -1844,9 +1844,6 @@ class Dropdown extends BaseComponent {
1844
1844
  this._element.setAttribute('aria-expanded', 'false');
1845
1845
  Manipulator$1.removeDataAttribute(this._menu, 'popper');
1846
1846
  EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);
1847
-
1848
- // Explicitly return focus to the trigger element
1849
- this._element.focus();
1850
1847
  }
1851
1848
  _getConfig(config) {
1852
1849
  config = super._getConfig(config);
@@ -3130,7 +3127,6 @@ class AccessibleToggle {
3130
3127
  }
3131
3128
 
3132
3129
  class AccordionToggle {
3133
- static isInitialized = false;
3134
3130
  constructor(buttonElement) {
3135
3131
  this.buttonElement = buttonElement;
3136
3132
  this.targetAccordionId = buttonElement.getAttribute("data-target");
@@ -3157,15 +3153,24 @@ class AccordionToggle {
3157
3153
  }
3158
3154
  });
3159
3155
  }
3160
- static init() {
3161
- if (AccordionToggle.isInitialized) {
3162
- return;
3163
- }
3164
- const toggleButtons = SelectorEngine.find('[data-action][data-target]');
3165
- toggleButtons.forEach(buttonElement => new AccordionToggle(buttonElement));
3166
- AccordionToggle.isInitialized = true;
3156
+ static init(root = document.documentElement) {
3157
+ const context = root instanceof Document ? root.documentElement : root;
3158
+ const toggleButtons = context instanceof Element ? SelectorEngine.find('[data-action][data-target]', context) : context && typeof context.querySelectorAll === "function" ? Array.from(context.querySelectorAll('[data-action][data-target]')) : SelectorEngine.find('[data-action][data-target]');
3159
+ toggleButtons.forEach(buttonElement => {
3160
+ if (buttonElement.dataset.accordionToggleInitialized === "true") {
3161
+ return;
3162
+ }
3163
+ new AccordionToggle(buttonElement);
3164
+ buttonElement.dataset.accordionToggleInitialized = "true";
3165
+ });
3167
3166
  }
3168
3167
  }
3168
+ const initializeAccordionToggle = () => AccordionToggle.init();
3169
+ if (document.readyState === "loading") {
3170
+ document.addEventListener("DOMContentLoaded", initializeAccordionToggle);
3171
+ } else {
3172
+ initializeAccordionToggle();
3173
+ }
3169
3174
 
3170
3175
  class MainNavigation {
3171
3176
  constructor(toggler) {
@@ -3407,7 +3412,6 @@ const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longde
3407
3412
  *
3408
3413
  * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
3409
3414
  */
3410
- // eslint-disable-next-line unicorn/better-regex
3411
3415
  const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;
3412
3416
  const allowedAttribute = (attribute, allowedAttributeList) => {
3413
3417
  const attributeName = attribute.nodeName.toLowerCase();
@@ -3951,6 +3955,7 @@ class Tooltip extends BaseComponent {
3951
3955
  if (trigger === 'click') {
3952
3956
  EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {
3953
3957
  const context = this._initializeOnDelegatedTarget(event);
3958
+ context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]);
3954
3959
  context.toggle();
3955
3960
  });
3956
3961
  } else if (trigger !== TRIGGER_MANUAL) {
@@ -5251,5 +5256,71 @@ enableDismissTrigger(Toast);
5251
5256
 
5252
5257
  defineJQueryPlugin$1(Toast);
5253
5258
 
5254
- export { AccessibleToggle, AccordionToggle, Alert, Button, Carousel, Collapse, Dropdown, Gallery, MainNavigation, MegaMenu, Modal, Offcanvas, Popover, ScrollSpy, ScrollSpy$1 as ScrollSpyV2, Tab, Toast, Tooltip };
5259
+ const HEADER_SELECTOR = ".bcl-header";
5260
+ const TOGGLER_SELECTOR = ".bcl-navbar-toggler";
5261
+ const OFFSET_VARIABLE = "--oel-mega-menu-offset-top";
5262
+ class Header {
5263
+ scheduleUpdate = () => {
5264
+ if (this.frameRequest) {
5265
+ return;
5266
+ }
5267
+ this.frameRequest = window.requestAnimationFrame(() => {
5268
+ this.frameRequest = null;
5269
+ this.updateOffset();
5270
+ });
5271
+ };
5272
+ constructor(element) {
5273
+ this.element = element;
5274
+ this.frameRequest = null;
5275
+ this.resizeObserver = null;
5276
+ this.init();
5277
+ }
5278
+ init() {
5279
+ this.updateOffset();
5280
+ EventHandler.on(window, "resize", this.scheduleUpdate);
5281
+ EventHandler.on(window, "orientationchange", this.scheduleUpdate);
5282
+ const togglers = SelectorEngine.find(TOGGLER_SELECTOR, this.element);
5283
+ togglers.forEach(toggler => {
5284
+ // Some layouts move the header when the nav toggler expands; keep offset in sync.
5285
+ EventHandler.on(toggler, "click", this.scheduleUpdate);
5286
+ });
5287
+ }
5288
+ updateOffset() {
5289
+ if (!this.element) {
5290
+ return;
5291
+ }
5292
+ const rect = this.element.getBoundingClientRect();
5293
+ const offset = Math.max(0, rect.top);
5294
+ const value = `${offset}px`;
5295
+ if (this.element.style.getPropertyValue(OFFSET_VARIABLE) === value) {
5296
+ return;
5297
+ }
5298
+ this.element.style.setProperty(OFFSET_VARIABLE, value);
5299
+ }
5300
+ static init(root) {
5301
+ if (typeof document === "undefined" || typeof window === "undefined") {
5302
+ return;
5303
+ }
5304
+ const resolvedRoot = root || document;
5305
+ const context = resolvedRoot instanceof Element ? resolvedRoot : resolvedRoot.documentElement || document.documentElement;
5306
+ const headers = SelectorEngine.find(HEADER_SELECTOR, context);
5307
+ headers.forEach(headerElement => {
5308
+ if (headerElement.dataset.headerOffsetInitialized === "true") {
5309
+ return;
5310
+ }
5311
+ headerElement.dataset.headerOffsetInitialized = "true";
5312
+ new Header(headerElement);
5313
+ });
5314
+ }
5315
+ }
5316
+ if (typeof document !== "undefined") {
5317
+ const initializeHeaderOffset = () => Header.init();
5318
+ if (document.readyState === "loading") {
5319
+ document.addEventListener("DOMContentLoaded", initializeHeaderOffset);
5320
+ } else {
5321
+ initializeHeaderOffset();
5322
+ }
5323
+ }
5324
+
5325
+ export { AccessibleToggle, AccordionToggle, Alert, Button, Carousel, Collapse, Dropdown, Gallery, Header, MainNavigation, MegaMenu, Modal, Offcanvas, Popover, ScrollSpy, ScrollSpy$1 as ScrollSpyV2, Tab, Toast, Tooltip };
5255
5326
  //# sourceMappingURL=oe-bcl-joinup.esm.js.map