@caweb/html-webpack-plugin 1.5.21 → 1.5.23

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 (62) hide show
  1. package/build/delta.asset.php +1 -1
  2. package/build/delta.js +22 -12
  3. package/build/delta.js.map +1 -1
  4. package/build/delta.min.asset.php +1 -1
  5. package/build/delta.min.js +1 -1
  6. package/build/eureka.asset.php +1 -1
  7. package/build/eureka.js +22 -12
  8. package/build/eureka.js.map +1 -1
  9. package/build/eureka.min.asset.php +1 -1
  10. package/build/eureka.min.js +1 -1
  11. package/build/mono.asset.php +1 -1
  12. package/build/mono.js +22 -12
  13. package/build/mono.js.map +1 -1
  14. package/build/mono.min.asset.php +1 -1
  15. package/build/mono.min.js +1 -1
  16. package/build/oceanside.asset.php +1 -1
  17. package/build/oceanside.js +22 -12
  18. package/build/oceanside.js.map +1 -1
  19. package/build/oceanside.min.asset.php +1 -1
  20. package/build/oceanside.min.js +1 -1
  21. package/build/orangecounty.asset.php +1 -1
  22. package/build/orangecounty.js +22 -12
  23. package/build/orangecounty.js.map +1 -1
  24. package/build/orangecounty.min.asset.php +1 -1
  25. package/build/orangecounty.min.js +1 -1
  26. package/build/pasorobles.asset.php +1 -1
  27. package/build/pasorobles.js +22 -12
  28. package/build/pasorobles.js.map +1 -1
  29. package/build/pasorobles.min.asset.php +1 -1
  30. package/build/pasorobles.min.js +1 -1
  31. package/build/sacramento.asset.php +1 -1
  32. package/build/sacramento.js +22 -12
  33. package/build/sacramento.js.map +1 -1
  34. package/build/sacramento.min.asset.php +1 -1
  35. package/build/sacramento.min.js +1 -1
  36. package/build/santabarbara.asset.php +1 -1
  37. package/build/santabarbara.js +22 -12
  38. package/build/santabarbara.js.map +1 -1
  39. package/build/santabarbara.min.asset.php +1 -1
  40. package/build/santabarbara.min.js +1 -1
  41. package/build/santacruz.asset.php +1 -1
  42. package/build/santacruz.js +22 -12
  43. package/build/santacruz.js.map +1 -1
  44. package/build/santacruz.min.asset.php +1 -1
  45. package/build/santacruz.min.js +1 -1
  46. package/build/shasta.asset.php +1 -1
  47. package/build/shasta.js +22 -12
  48. package/build/shasta.js.map +1 -1
  49. package/build/shasta.min.asset.php +1 -1
  50. package/build/shasta.min.js +1 -1
  51. package/build/sierra.asset.php +1 -1
  52. package/build/sierra.js +22 -12
  53. package/build/sierra.js.map +1 -1
  54. package/build/sierra.min.asset.php +1 -1
  55. package/build/sierra.min.js +1 -1
  56. package/build/trinity.asset.php +1 -1
  57. package/build/trinity.js +22 -12
  58. package/build/trinity.js.map +1 -1
  59. package/build/trinity.min.asset.php +1 -1
  60. package/build/trinity.min.js +1 -1
  61. package/package.json +6 -6
  62. package/sample/default.html +1 -0
@@ -1 +1 @@
1
- <?php return array('dependencies' => array(), 'version' => '64c13db2de54f5439af1');
1
+ <?php return array('dependencies' => array(), 'version' => '817c0e0bbe5b801aa4bf');
package/build/delta.js CHANGED
@@ -6378,18 +6378,24 @@ window.addEventListener('load', () => {
6378
6378
  let current = header.previousElementSibling;
6379
6379
  let miscElementHeights = 0;
6380
6380
  while (current) {
6381
- miscElementHeights += current.clientHeight;
6381
+ // if current is a div, add its height to the miscElementHeights.
6382
+ if ('DIV' === current.tagName) {
6383
+ miscElementHeights += current.clientHeight;
6384
+ }
6382
6385
  current = current.previousElementSibling;
6383
6386
  }
6384
6387
 
6385
6388
  // downscroll code passed the header height
6386
6389
  if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {
6387
- var _alerts$scrollHeight, _utilityHeader$scroll;
6388
6390
  // lets add the scroll heights of any alerts
6389
- scrollHeights += (_alerts$scrollHeight = alerts?.scrollHeight) !== null && _alerts$scrollHeight !== void 0 ? _alerts$scrollHeight : 0;
6391
+ if (alerts) {
6392
+ scrollHeights += alerts.scrollHeight;
6393
+ }
6390
6394
 
6391
6395
  // lets add the scroll heights of the utility header
6392
- scrollHeights += (_utilityHeader$scroll = utilityHeader?.scrollHeight) !== null && _utilityHeader$scroll !== void 0 ? _utilityHeader$scroll : 0;
6396
+ if (utilityHeader) {
6397
+ scrollHeights += utilityHeader.scrollHeight;
6398
+ }
6393
6399
 
6394
6400
  // move the header up to the scroll height, minus any elements above the header
6395
6401
  header.style.top = `-${scrollHeights - miscElementHeights}px`;
@@ -6422,12 +6428,12 @@ window.addEventListener('load', () => {
6422
6428
  const isDesktopWidth = () => window.innerWidth > 992; //Maximum px for mobile width
6423
6429
 
6424
6430
  const mainHeader = document.querySelector('header');
6425
- const mobileOverlay = mainHeader.querySelector('.mobile-controlled.overlay');
6426
- const searchContainer = mainHeader.querySelector('.search-container');
6427
- const mainNav = mainHeader.querySelector('.navigation');
6431
+ const mobileOverlay = mainHeader?.querySelector('.mobile-controlled.overlay');
6432
+ const searchContainer = mainHeader?.querySelector('.search-container');
6433
+ const mainNav = mainHeader?.querySelector('.navigation');
6428
6434
  const mainNavUl = mainNav?.querySelector('.nav');
6429
- const toggleMenuOpenButton = mainHeader.querySelector('.mobile-control.ca-gov-icon-menu');
6430
- const toggleMenuCloseButton = mainHeader.querySelector('.mobile-control.ca-gov-icon-close-mark');
6435
+ const toggleMenuOpenButton = mainHeader?.querySelector('.mobile-control.ca-gov-icon-menu');
6436
+ const toggleMenuCloseButton = mainHeader?.querySelector('.mobile-control.ca-gov-icon-close-mark');
6431
6437
  const mobileCheck = () => {
6432
6438
  if (isDesktopWidth()) {
6433
6439
  /**
@@ -6497,7 +6503,7 @@ window.addEventListener('load', () => {
6497
6503
  });
6498
6504
 
6499
6505
  // Mobile Overlay is being shown
6500
- mobileOverlay.addEventListener('shown.bs.collapse', () => {
6506
+ mobileOverlay?.addEventListener('shown.bs.collapse', () => {
6501
6507
  toggleMenuCloseButton.focus();
6502
6508
  mainHeader.classList.add('overlay');
6503
6509
  mainNav?.classList.add('visible');
@@ -6506,7 +6512,7 @@ window.addEventListener('load', () => {
6506
6512
  });
6507
6513
 
6508
6514
  // Mobile Overlay is hidden
6509
- mobileOverlay.addEventListener('hide.bs.collapse', () => {
6515
+ mobileOverlay?.addEventListener('hide.bs.collapse', () => {
6510
6516
  toggleMenuOpenButton.focus();
6511
6517
  mainHeader.classList.remove('overlay');
6512
6518
  document.body.classList.remove('overflow-hidden');
@@ -6591,9 +6597,13 @@ __webpack_require__.r(__webpack_exports__);
6591
6597
  * This is used to ensure that the element is not hidden behind the header
6592
6598
  */
6593
6599
  window.addEventListener('load', () => {
6600
+ let mainHeader = document.querySelector('header');
6601
+ if (!mainHeader) {
6602
+ return;
6603
+ }
6604
+
6594
6605
  // Function to update the scroll-margin-top for each element with an id
6595
6606
  const updateScrollMarginTop = () => {
6596
- let mainHeader = document.querySelector('header');
6597
6607
  // for each element with an id we add the scroll-margin-top
6598
6608
  document.querySelectorAll('#page-container [id]').forEach(element => element.style.scrollMarginTop = `${mainHeader.offsetHeight}px`);
6599
6609
  };