@caweb/html-webpack-plugin 1.5.23 → 1.5.25

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 (122) hide show
  1. package/build/delta-rtl.css +13 -12
  2. package/build/delta-rtl.min.css +1 -1
  3. package/build/delta.asset.php +1 -1
  4. package/build/delta.css +13 -12
  5. package/build/delta.css.map +1 -1
  6. package/build/delta.js +21 -46
  7. package/build/delta.js.map +1 -1
  8. package/build/delta.min.asset.php +1 -1
  9. package/build/delta.min.css +1 -1
  10. package/build/delta.min.js +1 -1
  11. package/build/eureka-rtl.css +13 -12
  12. package/build/eureka-rtl.min.css +1 -1
  13. package/build/eureka.asset.php +1 -1
  14. package/build/eureka.css +13 -12
  15. package/build/eureka.css.map +1 -1
  16. package/build/eureka.js +21 -46
  17. package/build/eureka.js.map +1 -1
  18. package/build/eureka.min.asset.php +1 -1
  19. package/build/eureka.min.css +1 -1
  20. package/build/eureka.min.js +1 -1
  21. package/build/mono-rtl.css +13 -12
  22. package/build/mono-rtl.min.css +1 -1
  23. package/build/mono.asset.php +1 -1
  24. package/build/mono.css +13 -12
  25. package/build/mono.css.map +1 -1
  26. package/build/mono.js +21 -46
  27. package/build/mono.js.map +1 -1
  28. package/build/mono.min.asset.php +1 -1
  29. package/build/mono.min.css +1 -1
  30. package/build/mono.min.js +1 -1
  31. package/build/oceanside-rtl.css +13 -12
  32. package/build/oceanside-rtl.min.css +1 -1
  33. package/build/oceanside.asset.php +1 -1
  34. package/build/oceanside.css +13 -12
  35. package/build/oceanside.css.map +1 -1
  36. package/build/oceanside.js +21 -46
  37. package/build/oceanside.js.map +1 -1
  38. package/build/oceanside.min.asset.php +1 -1
  39. package/build/oceanside.min.css +1 -1
  40. package/build/oceanside.min.js +1 -1
  41. package/build/orangecounty-rtl.css +13 -12
  42. package/build/orangecounty-rtl.min.css +1 -1
  43. package/build/orangecounty.asset.php +1 -1
  44. package/build/orangecounty.css +13 -12
  45. package/build/orangecounty.css.map +1 -1
  46. package/build/orangecounty.js +21 -46
  47. package/build/orangecounty.js.map +1 -1
  48. package/build/orangecounty.min.asset.php +1 -1
  49. package/build/orangecounty.min.css +1 -1
  50. package/build/orangecounty.min.js +1 -1
  51. package/build/pasorobles-rtl.css +13 -12
  52. package/build/pasorobles-rtl.min.css +1 -1
  53. package/build/pasorobles.asset.php +1 -1
  54. package/build/pasorobles.css +13 -12
  55. package/build/pasorobles.css.map +1 -1
  56. package/build/pasorobles.js +21 -46
  57. package/build/pasorobles.js.map +1 -1
  58. package/build/pasorobles.min.asset.php +1 -1
  59. package/build/pasorobles.min.css +1 -1
  60. package/build/pasorobles.min.js +1 -1
  61. package/build/sacramento-rtl.css +13 -12
  62. package/build/sacramento-rtl.min.css +1 -1
  63. package/build/sacramento.asset.php +1 -1
  64. package/build/sacramento.css +13 -12
  65. package/build/sacramento.css.map +1 -1
  66. package/build/sacramento.js +21 -46
  67. package/build/sacramento.js.map +1 -1
  68. package/build/sacramento.min.asset.php +1 -1
  69. package/build/sacramento.min.css +1 -1
  70. package/build/sacramento.min.js +1 -1
  71. package/build/santabarbara-rtl.css +13 -12
  72. package/build/santabarbara-rtl.min.css +1 -1
  73. package/build/santabarbara.asset.php +1 -1
  74. package/build/santabarbara.css +13 -12
  75. package/build/santabarbara.css.map +1 -1
  76. package/build/santabarbara.js +21 -46
  77. package/build/santabarbara.js.map +1 -1
  78. package/build/santabarbara.min.asset.php +1 -1
  79. package/build/santabarbara.min.css +1 -1
  80. package/build/santabarbara.min.js +1 -1
  81. package/build/santacruz-rtl.css +13 -12
  82. package/build/santacruz-rtl.min.css +1 -1
  83. package/build/santacruz.asset.php +1 -1
  84. package/build/santacruz.css +13 -12
  85. package/build/santacruz.css.map +1 -1
  86. package/build/santacruz.js +21 -46
  87. package/build/santacruz.js.map +1 -1
  88. package/build/santacruz.min.asset.php +1 -1
  89. package/build/santacruz.min.css +1 -1
  90. package/build/santacruz.min.js +1 -1
  91. package/build/shasta-rtl.css +13 -12
  92. package/build/shasta-rtl.min.css +1 -1
  93. package/build/shasta.asset.php +1 -1
  94. package/build/shasta.css +13 -12
  95. package/build/shasta.css.map +1 -1
  96. package/build/shasta.js +21 -46
  97. package/build/shasta.js.map +1 -1
  98. package/build/shasta.min.asset.php +1 -1
  99. package/build/shasta.min.css +1 -1
  100. package/build/shasta.min.js +1 -1
  101. package/build/sierra-rtl.css +13 -12
  102. package/build/sierra-rtl.min.css +1 -1
  103. package/build/sierra.asset.php +1 -1
  104. package/build/sierra.css +13 -12
  105. package/build/sierra.css.map +1 -1
  106. package/build/sierra.js +21 -46
  107. package/build/sierra.js.map +1 -1
  108. package/build/sierra.min.asset.php +1 -1
  109. package/build/sierra.min.css +1 -1
  110. package/build/sierra.min.js +1 -1
  111. package/build/trinity-rtl.css +13 -12
  112. package/build/trinity-rtl.min.css +1 -1
  113. package/build/trinity.asset.php +1 -1
  114. package/build/trinity.css +13 -12
  115. package/build/trinity.css.map +1 -1
  116. package/build/trinity.js +21 -46
  117. package/build/trinity.js.map +1 -1
  118. package/build/trinity.min.asset.php +1 -1
  119. package/build/trinity.min.css +1 -1
  120. package/build/trinity.min.js +1 -1
  121. package/package.json +1 -1
  122. package/sample/default.html +0 -1
@@ -6335,7 +6335,7 @@ __webpack_require__.r(__webpack_exports__);
6335
6335
  //@ts-check
6336
6336
 
6337
6337
  /* EXTERNAL LINK ICON */
6338
- window.addEventListener('load', () => {
6338
+ window.addEventListener('DOMContentLoaded', () => {
6339
6339
  const ext = '<span class="ca-gov-icon-external-link" aria-hidden="true"></span><span class="sr-only">opens in a new window</span>';
6340
6340
 
6341
6341
  // Add any exceptions to not render here
@@ -6363,12 +6363,14 @@ window.addEventListener('load', () => {
6363
6363
  "use strict";
6364
6364
  __webpack_require__.r(__webpack_exports__);
6365
6365
  //@ts-check
6366
- window.addEventListener('load', () => {
6366
+ window.addEventListener('DOMContentLoaded', () => {
6367
+ let location_hash = window.location.hash.replace(/(\|)/g, "\\$1");
6368
+ let target = document.querySelector(location_hash);
6367
6369
  const header = document.querySelector('header');
6368
6370
  const pageContainer = document.querySelector('#page-container');
6369
6371
  const alerts = document.querySelector('.alerts');
6370
6372
  const utilityHeader = document.querySelector('.utility-header');
6371
- const resetPosition = () => {
6373
+ const compactHeader = () => {
6372
6374
  if (!header) {
6373
6375
  return;
6374
6376
  }
@@ -6399,19 +6401,27 @@ window.addEventListener('load', () => {
6399
6401
 
6400
6402
  // move the header up to the scroll height, minus any elements above the header
6401
6403
  header.style.top = `-${scrollHeights - miscElementHeights}px`;
6404
+
6405
+ // we add the header height + misc element heights to the page container as margin-top, minus the scroll heights since those get hidden
6406
+ pageContainer?.setAttribute('style', `margin-top: ${header.offsetHeight + miscElementHeights - scrollHeights}px;`);
6402
6407
  } else {
6403
6408
  header.style.top = `${miscElementHeights}px`; // reset header top position
6404
- }
6405
6409
 
6406
- // we add the misc element heights to the page container as margin-top
6407
- pageContainer?.setAttribute('style', `margin-top: ${miscElementHeights}px;`);
6410
+ pageContainer?.setAttribute('style', `margin-top: ${miscElementHeights}px;`);
6411
+ }
6408
6412
  };
6409
6413
 
6410
6414
  // reset position on scroll
6411
- window.addEventListener('scroll', resetPosition);
6415
+ window.addEventListener('scroll', compactHeader);
6412
6416
 
6413
- // reset position on load
6414
- resetPosition();
6417
+ // scroll to target
6418
+ if (target) {
6419
+ setTimeout(() => {
6420
+ target.scrollIntoView({
6421
+ behavior: 'smooth'
6422
+ });
6423
+ }, 1000);
6424
+ }
6415
6425
  });
6416
6426
 
6417
6427
  /***/ }),
@@ -6424,7 +6434,7 @@ window.addEventListener('load', () => {
6424
6434
 
6425
6435
  "use strict";
6426
6436
  __webpack_require__.r(__webpack_exports__);
6427
- window.addEventListener('load', () => {
6437
+ window.addEventListener('DOMContentLoaded', () => {
6428
6438
  const isDesktopWidth = () => window.innerWidth > 992; //Maximum px for mobile width
6429
6439
 
6430
6440
  const mainHeader = document.querySelector('header');
@@ -6534,7 +6544,7 @@ window.addEventListener('load', () => {
6534
6544
  "use strict";
6535
6545
  __webpack_require__.r(__webpack_exports__);
6536
6546
  //@ts-check
6537
- window.addEventListener('load', () => {
6547
+ window.addEventListener('DOMContentLoaded', () => {
6538
6548
  document.querySelectorAll('.return-top').forEach(returnTop => returnTop.addEventListener('click', () => {
6539
6549
  document.body.scrollTop = 0; // For Safari
6540
6550
  document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
@@ -6582,39 +6592,6 @@ window.addEventListener('load', () => {
6582
6592
  });
6583
6593
  });
6584
6594
 
6585
- /***/ }),
6586
-
6587
- /***/ "./src/scripts/components/scroll-margin-top.js":
6588
- /*!*****************************************************!*\
6589
- !*** ./src/scripts/components/scroll-margin-top.js ***!
6590
- \*****************************************************/
6591
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
6592
-
6593
- "use strict";
6594
- __webpack_require__.r(__webpack_exports__);
6595
- /**
6596
- * This script is used to add the scroll-margin-top to each element with an id
6597
- * This is used to ensure that the element is not hidden behind the header
6598
- */
6599
- window.addEventListener('load', () => {
6600
- let mainHeader = document.querySelector('header');
6601
- if (!mainHeader) {
6602
- return;
6603
- }
6604
-
6605
- // Function to update the scroll-margin-top for each element with an id
6606
- const updateScrollMarginTop = () => {
6607
- // for each element with an id we add the scroll-margin-top
6608
- document.querySelectorAll('#page-container [id]').forEach(element => element.style.scrollMarginTop = `${mainHeader.offsetHeight}px`);
6609
- };
6610
-
6611
- // on resize function (recalculate margin-top)
6612
- window.addEventListener('resize', updateScrollMarginTop);
6613
-
6614
- // on load function (recalculate margin-top)
6615
- updateScrollMarginTop();
6616
- });
6617
-
6618
6595
  /***/ })
6619
6596
 
6620
6597
  /******/ });
@@ -6693,8 +6670,6 @@ __webpack_require__.r(__webpack_exports__);
6693
6670
  /* harmony import */ var _components_return_top_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/return-top.js */ "./src/scripts/components/return-top.js");
6694
6671
  /* harmony import */ var _components_external_link_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/external-link.js */ "./src/scripts/components/external-link.js");
6695
6672
  /* harmony import */ var _components_header_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/header.js */ "./src/scripts/components/header.js");
6696
- /* harmony import */ var _components_scroll_margin_top_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/scroll-margin-top.js */ "./src/scripts/components/scroll-margin-top.js");
6697
-
6698
6673
 
6699
6674
 
6700
6675