website-utilities 1.0.413 → 1.0.415
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.
- package/index.compiled.css +1 -1
- package/index.d.ts +18 -13
- package/index.js +1 -1
- package/index.scss +27 -4
- package/package.json +6 -6
- package/type.d.ts +2 -1
package/index.compiled.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--w-default-space:20px;--w-extra-extra-small-width:360px;--w-extra-small-width:500px;--w-small-width:768px;--w-medium-width:992px;--w-large-width:1200px;--w-theme-background:#fff;--w-theme-primary:#76b82a;--w-theme-on-primary:#f0f6fc;--w-theme-secondary:#238636;--w-theme-on-secondary:#d6e9da;--w-theme-error:#723637;--w-theme-on-error:#fff;--w-theme-surface:#21262d;--w-theme-on-surface:#bbc2ca;--w-typography-font-family:Open Sans,open-sans,sans-serif;--w-typography-font-family-headline:Open Sans Condensed,open-sans-condensed,sans-serif}website-utilities{font-family:var(--w-typography-font-family,"Open Sans",open-sans,sans-serif);font-size:14px}website-utilities lang-replacement{display:none}website-utilities h1,website-utilities h2,website-utilities h3,website-utilities h4,website-utilities h5,website-utilities h6{font-family:var(--w-typography-font-family,"Open Sans",open-sans,sans-serif);line-height:1.1}website-utilities h1,website-utilities h2{font-family:var(--w-typography-font-family-headline,"Open Sans Condensed",open-sans-condensed,sans-serif);font-weight:400;font-size:3em}website-utilities h2{font-size:2em}website-utilities a,website-utilities a:focus,website-utilities a:hover,website-utilities a:visited{outline:none;-webkit-text-decoration:none;text-decoration:none}website-utilities .wu-action{cursor:pointer}website-utilities .wu-disable-scrolling{height:100%!important;overflow:hidden!important}website-utilities .wu-section-active{display:block}website-utilities .wu-section-inactive{display:none}website-utilities .icon,website-utilities .icon-social{font-family:var(--w-typography-font-family-social,"Glyphicons Halflings",sans-serif);font-style:normal;font-weight:400;line-height:1;display:inline-block;position:relative;-webkit-text-decoration:none;text-decoration:none;top:1px;vertical-align:middle;zoom:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}website-utilities .icon-social:before,website-utilities .icon:before{font-family:var(--w-typography-font-family-social,"Glyphicons Halflings",sans-serif);display:inline-block;left:0;margin:0 5px 0 0;position:absolute;top:0}website-utilities .icon-arrow-left:before{content:""}website-utilities .icon-social:before{font:24px/1em Glyphicons Social Regular,sans-serif}website-utilities .icon-social-white:before{color:#fff}website-utilities .icon-social-pinterest:before{content:""}website-utilities .icon-social-dropbox:before{content:""}website-utilities .icon-social-google_plus:before{content:""}website-utilities .icon-social-jolicloud:before{content:""}website-utilities .icon-social-yahoo:before{content:""}website-utilities .icon-social-blogger:before{content:""}website-utilities .icon-social-picasa:before{content:""}website-utilities .icon-social-amazon:before{content:""}website-utilities .icon-social-tumblr:before{content:""}website-utilities .icon-social-wordpress:before{content:""}website-utilities .icon-social-instapaper:before{content:""}website-utilities .icon-social-evernote:before{content:""}website-utilities .icon-social-xing:before{content:""}website-utilities .icon-social-zootool:before{content:""}website-utilities .icon-social-dribbble:before{content:""}website-utilities .icon-social-deviantart:before{content:""}website-utilities .icon-social-read_it_later:before{content:""}website-utilities .icon-social-linked_in:before{content:""}website-utilities .icon-social-forrst:before{content:""}website-utilities .icon-social-pinboard:before{content:""}website-utilities .icon-social-behance:before{content:""}website-utilities .icon-social-github:before{content:""}website-utilities .icon-social-youtube:before{content:""}website-utilities .icon-social-skitch:before{content:""}website-utilities .icon-social-foursquare:before{content:""}website-utilities .icon-social-quora:before{content:""}website-utilities .icon-social-badoo:before{content:""}website-utilities .icon-social-spotify:before{content:""}website-utilities .icon-social-stumbleupon:before{content:""}website-utilities .icon-social-readability:before{content:""}website-utilities .icon-social-facebook:before{content:""}website-utilities .icon-social-twitter:before{content:""}website-utilities .icon-social-instagram:before{content:""}website-utilities .icon-social-posterous_spaces:before{content:""}website-utilities .icon-social-vimeo:before{content:""}website-utilities .icon-social-flickr:before{content:""}website-utilities .icon-social-last_fm:before{content:""}website-utilities .icon-social-rss:before{content:""}website-utilities .icon-social-skype:before{content:""}website-utilities .icon-social-e-mail:before{content:""}website-utilities .icon-social-vine:before{content:""}website-utilities .icon-social-myspace:before{content:""}website-utilities .icon-social-goodreads:before{content:""}website-utilities .icon-social-apple:before{content:""}website-utilities .icon-social-windows:before{content:""}website-utilities .icon-social-yelp:before{content:""}website-utilities .icon-social-playstation:before{content:""}website-utilities .icon-social-xbox:before{content:""}website-utilities .icon-social-android:before{content:""}website-utilities .icon-social-ios:before{content:""}website-utilities .wu-select{position:relative}website-utilities .wu-select__arrow{position:absolute;top:3px;right:15px;pointer-events:none}website-utilities .wu-select__arrow span{vertical-align:bottom;font-size:10px}website-utilities .wu-select select{position:static!important;padding-left:7px!important;padding-right:25px!important}website-utilities .wu-select select::-ms-expand{display:none}website-utilities .wu-checkbox{margin-top:2px;padding-top:3px}website-utilities .wu-checkbox label{padding-left:40px}website-utilities .wu-checkbox label .wu-checkbox__wrapper{margin-top:-2px;margin-left:-40px;position:absolute}website-utilities .wu-checkbox label .wu-checkbox__wrapper .wu-checkbox__wrapper__styled{border-radius:4px;border:2px solid var(--w-theme-primary,#76b82a);cursor:pointer;float:right;height:25px;padding:0;width:25px}website-utilities .wu-checkbox label .wu-checkbox__wrapper .wu-checkbox__wrapper__styled .wu-checkbox__wrapper__styled__checked{background:transparent;border:3px solid var(--w-theme-on-primary,#f0f6fc);border-top:none;border-right:none;height:8px;left:4px;opacity:0;position:absolute;top:5px;transform:rotate(-45deg);width:13px}website-utilities .wu-checkbox label .wu-checkbox__wrapper input[type=checkbox]{display:none}website-utilities .wu-checkbox label .wu-checkbox__wrapper input[type=checkbox]:checked~.wu-checkbox-styled>.wu-checkbox-styled-checked{opacity:1}website-utilities .wu-checkbox label .wu-checkbox__wrapper input[type=checkbox]:disabled~.wu-checkbox-styled{background-color:var(--w-theme-surface,#21262d)}website-utilities .wu-scroll-to-top{display:block;transition-property:bottom,opacity;transition-duration:.5s;position:fixed;right:var(--w-default-space,20px)}website-utilities .wu-scroll-to-top.wu-scroll-up{bottom:calc(var(--w-default-space, 20px)*3);opacity:0}website-utilities .wu-scroll-to-top.wu-scroll-down{bottom:var(--w-default-space,20px);opacity:1}website-utilities .wu-scroll-to-top.wu-top-settled{display:none}website-utilities .wu-priority-navigation>ul{list-style:none}website-utilities .wu-priority-navigation>ul>li{display:inline-block;position:relative}website-utilities .wu-priority-navigation>ul>li.wu-priority-navigation__overflow{display:none}website-utilities .wu-priority-navigation a{-webkit-text-decoration:none;text-decoration:none;color:#fff;display:inline-block;padding:10px 15px}website-utilities .wu-priority-navigation.resizing{overflow:hidden}website-utilities .wu-priority-navigation__overflow__list{display:block;width:-moz-max-content;width:max-content;background:#fff;box-shadow:0 0 10px rgba(0,0,0,.35);position:absolute;top:95%;right:-20px;opacity:0;visibility:hidden;padding:5px 0;list-style:none}website-utilities .wu-priority-navigation__overflow__list.wu-priority-navigation__overflow__list--show{opacity:1;visibility:visible}website-utilities .wu-priority-navigation__overflow__list>li>a{color:#000;display:block}website-utilities .wu-priority-navigation__overflow__title{cursor:pointer;text-align:center;color:#222;border-radius:50%;font-size:10px;width:2em;height:2em;line-height:2.2em;vertical-align:top;display:inline-block}website-utilities .wu-priority-navigation__list__item--hide{display:none!important}website-utilities .wu-priority-navigation__overflow--inline-block{display:inline-block!important}.wu-window-loading-cover{background-color:var(--w-surface-color,#21262d);top:0;left:0;position:fixed;height:100%;width:100%;z-index:1002!important}.wu-window-loading-cover .loading-text{position:absolute;inset:0;margin:auto;text-align:center;width:100%;height:100px;line-height:100px}.wu-window-loading-cover .loading-text span{display:inline-block;margin:0 5px;color:var(--w-on-surface-color,#bbc2ca)}.wu-window-loading-cover .loading-text span:first-child{filter:blur(0);animation:blur-text 1.5s linear 0s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(2){filter:blur(0);animation:blur-text 1.5s linear .2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(3){filter:blur(0);animation:blur-text 1.5s linear .4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(4){filter:blur(0);animation:blur-text 1.5s linear .6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(5){filter:blur(0);animation:blur-text 1.5s linear .8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(6){filter:blur(0);animation:blur-text 1.5s linear 1s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(7){filter:blur(0);animation:blur-text 1.5s linear 1.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(8){filter:blur(0);animation:blur-text 1.5s linear 1.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(9){filter:blur(0);animation:blur-text 1.5s linear 1.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(10){filter:blur(0);animation:blur-text 1.5s linear 1.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(11){filter:blur(0);animation:blur-text 1.5s linear 2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(12){filter:blur(0);animation:blur-text 1.5s linear 2.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(13){filter:blur(0);animation:blur-text 1.5s linear 2.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(14){filter:blur(0);animation:blur-text 1.5s linear 2.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(15){filter:blur(0);animation:blur-text 1.5s linear 2.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(16){filter:blur(0);animation:blur-text 1.5s linear 3s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(17){filter:blur(0);animation:blur-text 1.5s linear 3.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(18){filter:blur(0);animation:blur-text 1.5s linear 3.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(19){filter:blur(0);animation:blur-text 1.5s linear 3.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(20){filter:blur(0);animation:blur-text 1.5s linear 3.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(21){filter:blur(0);animation:blur-text 1.5s linear 4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(22){filter:blur(0);animation:blur-text 1.5s linear 4.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(23){filter:blur(0);animation:blur-text 1.5s linear 4.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(24){filter:blur(0);animation:blur-text 1.5s linear 4.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(25){filter:blur(0);animation:blur-text 1.5s linear 4.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(26){filter:blur(0);animation:blur-text 1.5s linear 5s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(27){filter:blur(0);animation:blur-text 1.5s linear 5.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(28){filter:blur(0);animation:blur-text 1.5s linear 5.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(29){filter:blur(0);animation:blur-text 1.5s linear 5.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(30){filter:blur(0);animation:blur-text 1.5s linear 5.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(31){filter:blur(0);animation:blur-text 1.5s linear 6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(32){filter:blur(0);animation:blur-text 1.5s linear 6.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(33){filter:blur(0);animation:blur-text 1.5s linear 6.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(34){filter:blur(0);animation:blur-text 1.5s linear 6.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(35){filter:blur(0);animation:blur-text 1.5s linear 6.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(36){filter:blur(0);animation:blur-text 1.5s linear 7s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(37){filter:blur(0);animation:blur-text 1.5s linear 7.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(38){filter:blur(0);animation:blur-text 1.5s linear 7.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(39){filter:blur(0);animation:blur-text 1.5s linear 7.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(40){filter:blur(0);animation:blur-text 1.5s linear 7.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(41){filter:blur(0);animation:blur-text 1.5s linear 8s infinite alternate}@keyframes blur-text{0%{filter:blur(0)}to{filter:blur(4px)}}
|
|
1
|
+
:root{--w-default-space:20px;--w-extra-extra-small-width:360px;--w-extra-small-width:500px;--w-small-width:768px;--w-medium-width:992px;--w-large-width:1200px;--w-theme-background:#fff;--w-theme-primary:#76b82a;--w-theme-on-primary:#f0f6fc;--w-theme-secondary:#238636;--w-theme-on-secondary:#d6e9da;--w-theme-error:#723637;--w-theme-on-error:#fff;--w-theme-surface:#21262d;--w-theme-on-surface:#bbc2ca;--w-typography-font-family:Open Sans,open-sans,sans-serif;--w-typography-font-family-headline:Open Sans Condensed,open-sans-condensed,sans-serif}website-utilities{font-family:var(--w-typography-font-family,"Open Sans",open-sans,sans-serif);font-size:14px}website-utilities h1,website-utilities h2,website-utilities h3,website-utilities h4,website-utilities h5,website-utilities h6{font-family:var(--w-typography-font-family,"Open Sans",open-sans,sans-serif);line-height:1.1}website-utilities h1,website-utilities h2{font-family:var(--w-typography-font-family-headline,"Open Sans Condensed",open-sans-condensed,sans-serif);font-weight:400;font-size:3em}website-utilities h2{font-size:2em}website-utilities a,website-utilities a:focus,website-utilities a:hover,website-utilities a:visited{outline:none;-webkit-text-decoration:none;text-decoration:none}website-utilities .wu-action{cursor:pointer}website-utilities .wu-disable-scrolling{height:100%!important;overflow:hidden!important}website-utilities .wu-section-active{display:block}website-utilities .wu-section-inactive{display:none}website-utilities .icon,website-utilities .icon-social{font-family:var(--w-typography-font-family-social,"Glyphicons Halflings",sans-serif);font-style:normal;font-weight:400;line-height:1;display:inline-block;position:relative;-webkit-text-decoration:none;text-decoration:none;top:1px;vertical-align:middle;zoom:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}website-utilities .icon-social:before,website-utilities .icon:before{font-family:var(--w-typography-font-family-social,"Glyphicons Halflings",sans-serif);display:inline-block;left:0;margin:0 5px 0 0;position:absolute;top:0}website-utilities .icon-arrow-left:before{content:""}website-utilities .icon-social:before{font:24px/1em Glyphicons Social Regular,sans-serif}website-utilities .icon-social-white:before{color:#fff}website-utilities .icon-social-pinterest:before{content:""}website-utilities .icon-social-dropbox:before{content:""}website-utilities .icon-social-google_plus:before{content:""}website-utilities .icon-social-jolicloud:before{content:""}website-utilities .icon-social-yahoo:before{content:""}website-utilities .icon-social-blogger:before{content:""}website-utilities .icon-social-picasa:before{content:""}website-utilities .icon-social-amazon:before{content:""}website-utilities .icon-social-tumblr:before{content:""}website-utilities .icon-social-wordpress:before{content:""}website-utilities .icon-social-instapaper:before{content:""}website-utilities .icon-social-evernote:before{content:""}website-utilities .icon-social-xing:before{content:""}website-utilities .icon-social-zootool:before{content:""}website-utilities .icon-social-dribbble:before{content:""}website-utilities .icon-social-deviantart:before{content:""}website-utilities .icon-social-read_it_later:before{content:""}website-utilities .icon-social-linked_in:before{content:""}website-utilities .icon-social-forrst:before{content:""}website-utilities .icon-social-pinboard:before{content:""}website-utilities .icon-social-behance:before{content:""}website-utilities .icon-social-github:before{content:""}website-utilities .icon-social-youtube:before{content:""}website-utilities .icon-social-skitch:before{content:""}website-utilities .icon-social-foursquare:before{content:""}website-utilities .icon-social-quora:before{content:""}website-utilities .icon-social-badoo:before{content:""}website-utilities .icon-social-spotify:before{content:""}website-utilities .icon-social-stumbleupon:before{content:""}website-utilities .icon-social-readability:before{content:""}website-utilities .icon-social-facebook:before{content:""}website-utilities .icon-social-twitter:before{content:""}website-utilities .icon-social-instagram:before{content:""}website-utilities .icon-social-posterous_spaces:before{content:""}website-utilities .icon-social-vimeo:before{content:""}website-utilities .icon-social-flickr:before{content:""}website-utilities .icon-social-last_fm:before{content:""}website-utilities .icon-social-rss:before{content:""}website-utilities .icon-social-skype:before{content:""}website-utilities .icon-social-e-mail:before{content:""}website-utilities .icon-social-vine:before{content:""}website-utilities .icon-social-myspace:before{content:""}website-utilities .icon-social-goodreads:before{content:""}website-utilities .icon-social-apple:before{content:""}website-utilities .icon-social-windows:before{content:""}website-utilities .icon-social-yelp:before{content:""}website-utilities .icon-social-playstation:before{content:""}website-utilities .icon-social-xbox:before{content:""}website-utilities .icon-social-android:before{content:""}website-utilities .icon-social-ios:before{content:""}website-utilities .wu-select{position:relative}website-utilities .wu-select__arrow{position:absolute;top:3px;right:15px;pointer-events:none}website-utilities .wu-select__arrow span{vertical-align:bottom;font-size:10px}website-utilities .wu-select select{position:static!important;padding-left:7px!important;padding-right:25px!important}website-utilities .wu-select select::-ms-expand{display:none}website-utilities .wu-checkbox{margin-top:2px;padding-top:3px}website-utilities .wu-checkbox label{padding-left:40px}website-utilities .wu-checkbox label .wu-checkbox__wrapper{margin-top:-2px;margin-left:-40px;position:absolute}website-utilities .wu-checkbox label .wu-checkbox__wrapper .wu-checkbox__wrapper__styled{border-radius:4px;border:2px solid var(--w-theme-primary,#76b82a);cursor:pointer;float:right;height:25px;padding:0;width:25px}website-utilities .wu-checkbox label .wu-checkbox__wrapper .wu-checkbox__wrapper__styled .wu-checkbox__wrapper__styled__checked{background:transparent;border:3px solid var(--w-theme-on-primary,#f0f6fc);border-top:none;border-right:none;height:8px;left:4px;opacity:0;position:absolute;top:5px;transform:rotate(-45deg);width:13px}website-utilities .wu-checkbox label .wu-checkbox__wrapper input[type=checkbox]{display:none}website-utilities .wu-checkbox label .wu-checkbox__wrapper input[type=checkbox]:checked~.wu-checkbox-styled>.wu-checkbox-styled-checked{opacity:1}website-utilities .wu-checkbox label .wu-checkbox__wrapper input[type=checkbox]:disabled~.wu-checkbox-styled{background-color:var(--w-theme-surface,#21262d)}website-utilities .wu-scroll-to-top{display:block;transition-property:bottom,opacity;transition-duration:.5s;position:fixed;right:var(--w-default-space,20px)}website-utilities .wu-scroll-to-top.wu-scroll-up{bottom:calc(var(--w-default-space, 20px)*3);opacity:0}website-utilities .wu-scroll-to-top.wu-scroll-down{bottom:var(--w-default-space,20px);opacity:1}website-utilities .wu-scroll-to-top.wu-top-settled{display:none}website-utilities .wu-priority-navigation>ul{list-style:none}website-utilities .wu-priority-navigation>ul>li{display:inline-block;position:relative}website-utilities .wu-priority-navigation>ul>li.wu-priority-navigation__overflow{display:none}website-utilities .wu-priority-navigation a{-webkit-text-decoration:none;text-decoration:none;color:#fff;display:inline-block;padding:10px 15px}website-utilities .wu-priority-navigation a:after{content:" ";position:absolute;left:0;top:0;width:100%;height:100%;border:none;box-sizing:border-box}website-utilities .wu-priority-navigation.resizing{overflow:hidden}website-utilities .wu-priority-navigation__overflow__list{display:block;width:-moz-max-content;width:max-content;background:#fff;box-shadow:0 0 10px rgba(0,0,0,.35);position:absolute;top:95%;right:-20px;opacity:0;visibility:hidden;padding:5px 0;list-style:none}website-utilities .wu-priority-navigation__overflow__list.wu-priority-navigation__overflow__list--show{opacity:1;visibility:visible}website-utilities .wu-priority-navigation__overflow__list>li>a{color:#000;display:block}website-utilities .wu-priority-navigation__overflow__title{cursor:pointer;text-align:center;color:#222;border-radius:50%;font-size:10px;width:2em;height:2em;line-height:2.2em;vertical-align:top;display:inline-block}website-utilities .wu-priority-navigation__list__item--hide{display:none!important}website-utilities .wu-priority-navigation__overflow--inline-block{display:inline-block!important}.wu-window-loading-cover{background-color:var(--w-surface-color,#21262d);top:0;left:0;position:fixed;height:100%;width:100%;z-index:1002!important}.wu-window-loading-cover .loading-text{position:absolute;inset:0;margin:auto;text-align:center;width:100%;height:100px;line-height:100px}.wu-window-loading-cover .loading-text span{display:inline-block;margin:0 5px;color:var(--w-on-surface-color,#bbc2ca)}.wu-window-loading-cover .loading-text span:first-child{filter:blur(0);animation:blur-text 1.5s linear 0s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(2){filter:blur(0);animation:blur-text 1.5s linear .2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(3){filter:blur(0);animation:blur-text 1.5s linear .4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(4){filter:blur(0);animation:blur-text 1.5s linear .6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(5){filter:blur(0);animation:blur-text 1.5s linear .8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(6){filter:blur(0);animation:blur-text 1.5s linear 1s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(7){filter:blur(0);animation:blur-text 1.5s linear 1.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(8){filter:blur(0);animation:blur-text 1.5s linear 1.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(9){filter:blur(0);animation:blur-text 1.5s linear 1.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(10){filter:blur(0);animation:blur-text 1.5s linear 1.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(11){filter:blur(0);animation:blur-text 1.5s linear 2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(12){filter:blur(0);animation:blur-text 1.5s linear 2.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(13){filter:blur(0);animation:blur-text 1.5s linear 2.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(14){filter:blur(0);animation:blur-text 1.5s linear 2.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(15){filter:blur(0);animation:blur-text 1.5s linear 2.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(16){filter:blur(0);animation:blur-text 1.5s linear 3s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(17){filter:blur(0);animation:blur-text 1.5s linear 3.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(18){filter:blur(0);animation:blur-text 1.5s linear 3.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(19){filter:blur(0);animation:blur-text 1.5s linear 3.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(20){filter:blur(0);animation:blur-text 1.5s linear 3.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(21){filter:blur(0);animation:blur-text 1.5s linear 4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(22){filter:blur(0);animation:blur-text 1.5s linear 4.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(23){filter:blur(0);animation:blur-text 1.5s linear 4.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(24){filter:blur(0);animation:blur-text 1.5s linear 4.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(25){filter:blur(0);animation:blur-text 1.5s linear 4.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(26){filter:blur(0);animation:blur-text 1.5s linear 5s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(27){filter:blur(0);animation:blur-text 1.5s linear 5.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(28){filter:blur(0);animation:blur-text 1.5s linear 5.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(29){filter:blur(0);animation:blur-text 1.5s linear 5.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(30){filter:blur(0);animation:blur-text 1.5s linear 5.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(31){filter:blur(0);animation:blur-text 1.5s linear 6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(32){filter:blur(0);animation:blur-text 1.5s linear 6.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(33){filter:blur(0);animation:blur-text 1.5s linear 6.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(34){filter:blur(0);animation:blur-text 1.5s linear 6.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(35){filter:blur(0);animation:blur-text 1.5s linear 6.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(36){filter:blur(0);animation:blur-text 1.5s linear 7s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(37){filter:blur(0);animation:blur-text 1.5s linear 7.2s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(38){filter:blur(0);animation:blur-text 1.5s linear 7.4s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(39){filter:blur(0);animation:blur-text 1.5s linear 7.6s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(40){filter:blur(0);animation:blur-text 1.5s linear 7.8s infinite alternate}.wu-window-loading-cover .loading-text span:nth-child(41){filter:blur(0);animation:blur-text 1.5s linear 8s infinite alternate}::view-transition-old(wu-menu-highlight){height:100%}::view-transition-new(wu-menu-highlight){height:100%}@keyframes blur-text{0%{filter:blur(0)}to{filter:blur(4px)}}
|
package/index.d.ts
CHANGED
|
@@ -11,10 +11,6 @@ export declare const log: Logger;
|
|
|
11
11
|
* Additional time to wait until page will be indicated as loaded.
|
|
12
12
|
* @property _defaultOptions.knownScrollEventNames - Saves all known scroll
|
|
13
13
|
* events in a space-separated string.
|
|
14
|
-
* @property _defaultOptions.language - Options for client side
|
|
15
|
-
* internationalization handler.
|
|
16
|
-
* @property _defaultOptions.mediaQueryClassNameIndicator - Mapping of media
|
|
17
|
-
* query class indicator names to internal event names.
|
|
18
14
|
* @property _defaultOptions.selectors - Mapping of dom node descriptions to
|
|
19
15
|
* their corresponding selectors.
|
|
20
16
|
* @property _defaultOptions.selectors.top - Selector to indicate that viewport
|
|
@@ -71,29 +67,26 @@ export declare class WebsiteUtilities<TElement = HTMLElement, ExternalProperties
|
|
|
71
67
|
static _defaultOptions: DefaultOptions;
|
|
72
68
|
readonly self: typeof WebsiteUtilities;
|
|
73
69
|
options: Options;
|
|
74
|
-
onChangeMediaQueryMode: (this: WebsiteUtilities, oldMediaQueryMode: string, newMediaQueryMode: string, event?: Event) => void;
|
|
75
|
-
onChangeToExtraSmallMode: (this: WebsiteUtilities, oldMediaQueryMode: string, event?: Event) => void;
|
|
76
|
-
onChangeToLargeMode: (this: WebsiteUtilities, oldMediaQueryMode: string, event?: Event) => void;
|
|
77
|
-
onChangeToMediumMode: (this: WebsiteUtilities, oldMediaQueryMode: string, event?: Event) => void;
|
|
78
|
-
onChangeToSmallMode: (this: WebsiteUtilities, oldMediaQueryMode: string, event?: Event) => void;
|
|
79
70
|
onStartUpAnimationComplete: (this: WebsiteUtilities) => void;
|
|
80
71
|
onSwitchSection: (this: WebsiteUtilities, event?: Event) => void;
|
|
81
72
|
onViewportMovesAwayFromTop: (this: WebsiteUtilities, event?: Event) => void;
|
|
82
73
|
onViewportMovesToTop: (this: WebsiteUtilities, event?: Event) => void;
|
|
83
74
|
onSwitchToManualScrollingIndicator: (event: Event) => boolean;
|
|
84
75
|
onLoaded: () => void;
|
|
85
|
-
onButtonClick: (this: WebsiteUtilities,
|
|
86
|
-
onSectionSwitch: (this: WebsiteUtilities,
|
|
87
|
-
onLinkClick: (this: WebsiteUtilities,
|
|
88
|
-
onTrack: (this: WebsiteUtilities,
|
|
76
|
+
onButtonClick: (this: WebsiteUtilities, _event: Event) => Promise<false | undefined>;
|
|
77
|
+
onSectionSwitch: (this: WebsiteUtilities, _sectionName: string, _oldSectionName: string, _event?: Event) => Promise<false | undefined>;
|
|
78
|
+
onLinkClick: (this: WebsiteUtilities, _event: Event) => Promise<false | undefined>;
|
|
79
|
+
onTrack: (this: WebsiteUtilities, _item: TrackingItem) => Promise<false | undefined>;
|
|
89
80
|
currentSectionName: string;
|
|
90
81
|
startUpAnimationIsComplete: boolean;
|
|
91
82
|
continueAutoScrolling: boolean;
|
|
92
83
|
viewportIsOnTop: boolean | undefined;
|
|
84
|
+
observerDeregisters: Array<() => void>;
|
|
93
85
|
static windowLoaded: boolean;
|
|
94
86
|
private static switchSectionLock;
|
|
95
87
|
windowLoadingCoverDomNode: HTMLElement | null;
|
|
96
88
|
topDomNode: HTMLElement | null;
|
|
89
|
+
priorityNavigationDomNodes: NodeListOf<HTMLElement> | null;
|
|
97
90
|
routerOutletDomNode: HTMLElement | null;
|
|
98
91
|
sectionDomNodes: {
|
|
99
92
|
default?: HTMLElement;
|
|
@@ -123,6 +116,10 @@ export declare class WebsiteUtilities<TElement = HTMLElement, ExternalProperties
|
|
|
123
116
|
* be needed for classes inheriting from this class.
|
|
124
117
|
*/
|
|
125
118
|
render(reason?: string, resolveRendering?: boolean): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Frees some memory.
|
|
121
|
+
*/
|
|
122
|
+
disconnectedCallback(): void;
|
|
126
123
|
grabDomNodes(): void;
|
|
127
124
|
/**
|
|
128
125
|
* Scrolls to the top of the page smoothly via being interruptible.
|
|
@@ -151,6 +148,13 @@ export declare class WebsiteUtilities<TElement = HTMLElement, ExternalProperties
|
|
|
151
148
|
value?: number;
|
|
152
149
|
}): Promise<void>;
|
|
153
150
|
initializePriorityNavigation(): void;
|
|
151
|
+
addMenuHighlighterViewTransition(): void;
|
|
152
|
+
activateNavigationItemHighlighters(sectionName: string): void;
|
|
153
|
+
triggerNavigationItemHighlighterSwitching(sectionName: string): void;
|
|
154
|
+
_onButtonClick(event: Event): Promise<void>;
|
|
155
|
+
_onSectionSwitch(sectionName: string, oldSectionName: string, event?: Event): Promise<void>;
|
|
156
|
+
_onLinkClick(event: Event): Promise<void>;
|
|
157
|
+
_onTrack(item: TrackingItem): Promise<void>;
|
|
154
158
|
/**
|
|
155
159
|
* This method triggers if the viewport moves to the top.
|
|
156
160
|
*/
|
|
@@ -163,6 +167,7 @@ export declare class WebsiteUtilities<TElement = HTMLElement, ExternalProperties
|
|
|
163
167
|
* This method triggers if we change the current section.
|
|
164
168
|
* @param sectionName - Contains the new section name.
|
|
165
169
|
* @param event - Optional event that triggered the switch.
|
|
170
|
+
* @returns Promise resolving when the section switch has been finished.
|
|
166
171
|
*/
|
|
167
172
|
switchSection(sectionName: string, event?: Event): Promise<void>;
|
|
168
173
|
/**
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("web-component-wrapper/Web"),require("web-component-wrapper/decorator"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/initializerWarningHelper","clientnode","clientnode/property-types","web-component-wrapper/Web","web-component-wrapper/decorator"],t);else{var o="object"==typeof exports?t(require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("web-component-wrapper/Web"),require("web-component-wrapper/decorator")):t(e["@babel/runtime/helpers/applyDecoratedDescriptor"],e["@babel/runtime/helpers/initializerDefineProperty"],e["@babel/runtime/helpers/initializerWarningHelper"],e.clientnode,e["clientnode/property-types"],e["web-component-wrapper/Web"],e["web-component-wrapper/decorator"]);for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(this,((e,t,o,i,n,r,s)=>(()=>{var l=[,,,e=>{e.exports=t},t=>{t.exports=e},e=>{e.exports=o},e=>{e.exports=i},e=>{e.exports=n},e=>{e.exports=s},e=>{e.exports=r}],a={};function c(e){var t=a[e];if(void 0!==t)return t.exports;var o=a[e]={exports:{}};return l[e](o,o.exports,c),o.exports}c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{c.r(u),c.d(u,{WebsiteUtilities:()=>R,api:()=>H,default:()=>Q,log:()=>$});var e,t,o,i,n,r,s,l,a,p,d,h,m,w,f,b,v,g,y,T,S,N,L,D,C,_,O,A,x,k,q,M,E,I,P=c(3),z=c.n(P),U=c(4),B=c.n(U),j=(c(5),c(6)),V=c(7),W=c(8),F=c(9);const $=new j.Logger({name:"website-utilities"});let R=(e=(0,W.property)({type:V.object}),t=(0,W.property)({type:V.func}),o=(0,W.property)({type:V.func}),i=(0,W.property)({type:V.func}),n=(0,W.property)({type:V.func}),r=(0,W.property)({type:V.func}),s=(0,W.property)({type:V.func}),l=(0,W.property)({type:V.func}),a=(0,W.property)({type:V.func}),p=(0,W.property)({type:V.func}),d=(0,W.property)({type:V.func}),h=(0,W.property)({type:V.func}),m=(0,W.property)({type:V.func}),w=(0,W.property)({type:V.func}),f=(0,W.property)({type:V.func}),b=(0,W.property)({type:V.func}),I=class e extends F.Web{constructor(){super(),this.self=e,z()(this,"options",g,this),z()(this,"onChangeMediaQueryMode",y,this),z()(this,"onChangeToExtraSmallMode",T,this),z()(this,"onChangeToLargeMode",S,this),z()(this,"onChangeToMediumMode",N,this),z()(this,"onChangeToSmallMode",L,this),z()(this,"onStartUpAnimationComplete",D,this),z()(this,"onSwitchSection",C,this),z()(this,"onViewportMovesAwayFromTop",_,this),z()(this,"onViewportMovesToTop",O,this),z()(this,"onSwitchToManualScrollingIndicator",A,this),z()(this,"onLoaded",x,this),z()(this,"onButtonClick",k,this),z()(this,"onSectionSwitch",q,this),z()(this,"onLinkClick",M,this),z()(this,"onTrack",E,this),this.currentSectionName="",this.startUpAnimationIsComplete=!1,this.continueAutoScrolling=!1,this.viewportIsOnTop=void 0,this.windowLoadingCoverDomNode=null,this.topDomNode=null,this.routerOutletDomNode=null,this.sectionDomNodes={},this.scrollToTopButtonDomNodes=null,this.defineGetterAndSetterInterface()}async onUpdateAttribute(e,t){await super.onUpdateAttribute(e,t),"options"===e&&this._extendOptions()}async render(e="unknown",t=!0){if(await super.render(e,!1),0===Object.keys(this.options).length&&this._extendOptions(),this.disableScrolling(),!this.self.windowLoaded){const e=()=>{this.self.windowLoaded||(this.self.windowLoaded=!0,this._removeLoadingCover().then((()=>{this.enableScrolling(),this._performStartUpEffects(),this.onLoaded()})))};(0,j.onDocumentReady)((()=>{(0,j.timeout)(e,this.options.windowLoadedTimeoutAfterDocLoadedInMSec)})),j.globalContext.window&&this.addSecureEventListener(j.globalContext.window,"load",e)}await this.waitForNestedComponentRendering(),this.grabDomNodes(),this._bindScrollEvents(),this._bindClickTracking(),await this._initializeRouting(),this.initializePriorityNavigation(),await this.resolveRenderingPromiseIfSet(e,t)}grabDomNodes(){var e,t,o;this.topDomNode=this.hostDomNode.querySelector(this.options.selectors.top),this.scrollToTopButtonDomNodes=this.hostDomNode.querySelectorAll(this.options.selectors.scrollToTopButtons),this.routerOutletDomNode=this.hostDomNode.querySelector(this.options.selectors.routerOutlet);for(const e of null!==(i=this.routerOutletDomNode?.children)&&void 0!==i?i:[]){var i;const t=e.getAttribute("data-website-utilities-section");""===t?this.sectionDomNodes.default=e:t&&this.options.sectionNames.managed.includes(t)&&(this.sectionDomNodes[t]=e)}this.windowLoadingCoverDomNode=null!==(e=null!==(t=null!==(o=this.hostDomNode.querySelector(this.options.selectors.windowLoadingCover))&&void 0!==o?o:this.hostDomNode.parentElement?.querySelector(this.options.selectors.windowLoadingCover))&&void 0!==t?t:j.globalContext.document?.body.querySelector(this.options.selectors.windowLoadingCover))&&void 0!==e?e:null}interruptableScrollToTop(){const e=window.pageYOffset,t=performance.now();this.continueAutoScrolling=!0;const o=i=>{if(!this.continueAutoScrolling)return;const n=i-t,r=Math.min(n/500,1),s=r*(2-r);window.scrollTo(0,e*(1-s)),r<1?requestAnimationFrame(o):this.continueAutoScrolling=!1};requestAnimationFrame(o)}scrollToTop(){j.globalContext.document&&window.scrollTo({top:0,behavior:"smooth"})}disableScrolling(){this.hostDomNode.parentElement&&(this.hostDomNode.parentElement.classList.add("wu-disable-scrolling"),this.addSecureEventListener(this.hostDomNode.parentElement,"touchmove",j.preventDefault))}enableScrolling(){this.hostDomNode.parentElement&&(this.hostDomNode.parentElement.classList.remove("wu-disable-scrolling"),this.hostDomNode.parentElement.classList.remove("touchmove"),this.hostDomNode.parentElement.removeEventListener("touchmove",j.preventDefault))}async track(e){if(j.globalContext.window?.location&&this.options.tracking){const t={context:`${j.globalContext.window.location.pathname}#`+this.currentSectionName,...e};("number"!=typeof t.value||isNaN(t.value))&&(t.value=1),$.debug('Run tracking code: "event" with arguments:'),$.debug(t);try{await this.onTrack(t)}catch(e){$.warn(`Problem in tracking "${(0,j.represent)(t)}":`,(0,j.represent)(e))}}}initializePriorityNavigation(){const e=this.hostDomNode.querySelectorAll(this.options.selectors.priorityNavigation);if(0===e.length)return;const t=()=>{for(const t of e){const e=t.querySelectorAll("ul > li"),o=Array.from(e).filter((e=>!e.classList.contains(this.options.selectors.priorityNavigationOverflow.substring(1)))),i=t.querySelector("ul > li").offsetTop,n=[];let r=!0,s=0;for(const e of o){e.offsetTop!==i&&(n.push(e),r&&(n.push(o[s-1]),r=!1)),s+=1}if(n.length){const e=n.map((e=>e.cloneNode(!0)));for(const e of n)e.classList.add("wu-priority-navigation__list__item--hide");const o=t.querySelector(this.options.selectors.priorityNavigationOverflowList);if(o)for(const t of e)o.append(t);const i=t.querySelector(this.options.selectors.priorityNavigationOverflow);i&&i.classList.add("wu-priority-navigation__overflow--inline-block"),t.style.overflow="visible"}}};for(const e of this.hostDomNode.querySelectorAll(this.options.selectors.priorityNavigationOverflowTitle))e.addEventListener("click",(()=>{for(const e of this.hostDomNode.querySelectorAll(this.options.selectors.priorityNavigationOverflowList))e.classList.toggle("wu-priority-navigation__overflow__list--show")}));for(const o of e){const e=(0,j.trailingThrottle)((()=>{for(const e of o.querySelectorAll(this.options.selectors.priorityNavigationOverflowList))for(;e.firstChild;)e.removeChild(e.firstChild);for(const e of o.querySelectorAll(this.options.selectors.priorityNavigationOverflow))e.classList.remove("wu-priority-navigation__overflow--show-inline-block");for(const e of o.querySelectorAll("ul > li"))e.classList.contains(this.options.selectors.priorityNavigationOverflow.substring(1))||e.classList.remove("wu-priority-navigation__list__item--hide");t(),o.classList.remove("wu-priority-navigation--resizing")}),20);new ResizeObserver((()=>{o.classList.add("wu-priority-navigation--resizing"),e()})).observe(o)}t()}_onViewportMovesToTop(){this._finishScrollToTopButtonTransition();for(const t of null!==(e=this.scrollToTopButtonDomNodes)&&void 0!==e?e:[]){var e;const o=()=>{t.removeEventListener("transitionend",i),t.removeEventListener("transitioncancel",o)},i=()=>{this.viewportIsOnTop&&t.classList.add("wu-top-settled"),o()};t.addEventListener("transitionend",i,{once:!0}),t.addEventListener("transitioncancel",o,{once:!0}),t.classList.add("wu-scroll-up")}}async _onViewportMovesAwayFromTop(){this._finishScrollToTopButtonTransition("wu-top-settled"),await(0,j.timeout)(),this._finishScrollToTopButtonTransition();for(const t of null!==(e=this.scrollToTopButtonDomNodes)&&void 0!==e?e:[]){var e;t.classList.add("wu-scroll-down")}}async switchSection(e,t){if(j.globalContext.window&&"location"in j.globalContext.window&&(""===e||this.options.sectionNames.managed.includes(e)||this.options.sectionNames.unmanaged.includes(e))){var o,i;const n=Object.prototype.hasOwnProperty.call(this.sectionDomNodes,this.currentSectionName)?this.sectionDomNodes[this.currentSectionName]:null!==(o=this.sectionDomNodes.default)&&void 0!==o?o:null,r=Object.prototype.hasOwnProperty.call(this.sectionDomNodes,e)?this.sectionDomNodes[e]:null!==(i=this.sectionDomNodes.default)&&void 0!==i?i:null;await this.self.switchSectionLock.acquire(),$.debug(`Run section switch from "${this.currentSectionName}" to`,`"${e}".`),this.currentSectionName===e?(n&&(n.classList.remove("wu-section-active"),n.classList.add("wu-section-inactive")),r&&(r.classList.remove("wu-section-inactive"),r.classList.add("wu-section-active"))):this.options.sectionNames.unmanaged.includes(e)&&this.options.sectionNames.unmanaged.includes(this.currentSectionName)||(this.interruptableScrollToTop(),n&&(await(0,j.fadeOut)(n),n.classList.remove("wu-section-active"),n.classList.add("wu-section-inactive")),r&&(r.classList.remove("wu-section-inactive"),r.classList.add("wu-section-active"),await(0,j.fadeIn)(r)));const s=this.currentSectionName;this.currentSectionName=e;try{await this.onSectionSwitch(this.currentSectionName,s,t)}catch(e){$.warn("Problem due to call section switch callback on section",`"${this.currentSectionName}": ${(0,j.represent)(e)}`)}await this.self.switchSectionLock.release()}}_extendOptions(){this.setPropertyValue("options",(0,j.extend)(!0,{},this.self._defaultOptions,this.options))}_initializeRouting(){this._bindNavigationEvents();const e=j.globalContext.location?.hash&&j.globalContext.location.hash.substring(1);e&&(this.options.sectionNames.managed.includes(e)||this.options.sectionNames.unmanaged.includes(e))&&(this.currentSectionName=e);for(const e of Object.values(this.sectionDomNodes))e.classList.add("wu-section-inactive");return this.switchSection(null!=e?e:this.currentSectionName)}_finishScrollToTopButtonTransition(e=["wu-scroll-down","wu-scroll-up"]){for(const o of null!==(t=this.scrollToTopButtonDomNodes)&&void 0!==t?t:[]){var t;o.classList.remove(...[].concat(e))}}_bindScrollEvents(){if(j.globalContext.document){for(const e of[j.globalContext.document.body,j.globalContext.document.querySelector("html"),j.globalContext.window])for(const t of this.options.knownScrollEventNames)e&&this.addSecureEventListener(e,t,(e=>{this.onSwitchToManualScrollingIndicator(e)&&(this.continueAutoScrolling=!1)}));if(j.globalContext.window&&this.addSecureEventListener(j.globalContext.window,"scroll",(e=>{j.globalContext.window?.scrollY?this.viewportIsOnTop&&(this.viewportIsOnTop=!1,this._onViewportMovesAwayFromTop().then(this.onViewportMovesAwayFromTop.bind(this,e))):this.viewportIsOnTop||(this.viewportIsOnTop=!0,this._onViewportMovesToTop(),this.onViewportMovesToTop(e))})),j.globalContext.window?.scrollY)this.viewportIsOnTop=!1,this._onViewportMovesAwayFromTop().then((()=>{this.onViewportMovesAwayFromTop()}));else{this.viewportIsOnTop=!0;for(const t of null!==(e=this.scrollToTopButtonDomNodes)&&void 0!==e?e:[]){var e;t.classList.add("wu-top-settled")}this._onViewportMovesToTop(),this.onViewportMovesToTop()}}}async _removeLoadingCover(){await(0,j.timeout)(this.options.additionalPageLoadingTimeInMilliseconds);for(const e of this.hostDomNode.querySelectorAll(`[class^="${this.options.selectors.startUpAnimationClassPrefix}"], [class*=" ${this.options.selectors.startUpAnimationClassPrefix}"]`))e.style.opacity="0";this.windowLoadingCoverDomNode&&await(0,j.fadeOut)(this.windowLoadingCoverDomNode)}async _performStartUpEffects(){const e=[];let t=1;for(;;){const o=this.hostDomNode.querySelectorAll("."+this.options.selectors.startUpAnimationClassPrefix+String(t));if(0===o.length){await Promise.all(e),this.startUpAnimationIsComplete=!0,this.onStartUpAnimationComplete();break}await(0,j.timeout)(this.options.startUpAnimationElementDelayInMilliseconds);for(const t of o)e.push((0,j.fadeIn)(t));t+=1}}_bindNavigationEvents(){j.globalContext.window&&this.addSecureEventListener(j.globalContext.window,"hashchange",(e=>{if(this.startUpAnimationIsComplete){const t=location.hash.substring(1);this.switchSection(t,e)}})),this._bindScrollToTopButton()}_bindScrollToTopButton(){for(const e of this.scrollToTopButtonDomNodes||[])this.addSecureEventListener(e,"click",(e=>{e.preventDefault(),this.interruptableScrollToTop()}))}_bindClickTracking(){if(this.options.tracking){for(const e of this.hostDomNode.querySelectorAll("a"))this.addSecureEventListener(e,"click",this.onButtonClick.bind(this));for(const e of this.hostDomNode.querySelectorAll("button"))this.addSecureEventListener(e,"click",this.onButtonClick.bind(this))}}},I._name="WebsiteUtilities",I._defaultOptions={additionalPageLoadingTimeInMilliseconds:0,startUpAnimationElementDelayInMilliseconds:100,windowLoadedTimeoutAfterDocLoadedInMSec:2e3,domain:"auto",knownScrollEventNames:["DOMMouseScroll","keyup","mousedown","mousewheel","scroll","touchmove","wheel"],mediaQueryClassNameIndicator:[["extraSmall","xs"],["small","sm"],["medium","md"],["large","lg"]],sectionNames:{managed:["home"],unmanaged:[]},selectors:{windowLoadingCover:".wu-window-loading-cover",startUpAnimationClassPrefix:"wu-start-up-animation-number-",top:".wu-header",routerOutlet:".wu-router-outlet",scrollToTopButtons:".wu-scroll-to-top",priorityNavigation:".wu-priority-navigation",priorityNavigationOverflow:".wu-priority-navigation__overflow",priorityNavigationOverflowTitle:".wu-priority-navigation__overflow__title",priorityNavigationOverflowList:".wu-priority-navigation__overflow__list"},tracking:!1},I.windowLoaded=!1,I.switchSectionLock=new j.Lock,v=I,g=B()(v.prototype,"options",[e],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),y=B()(v.prototype,"onChangeMediaQueryMode",[t],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),T=B()(v.prototype,"onChangeToExtraSmallMode",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),S=B()(v.prototype,"onChangeToLargeMode",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),N=B()(v.prototype,"onChangeToMediumMode",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),L=B()(v.prototype,"onChangeToSmallMode",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),D=B()(v.prototype,"onStartUpAnimationComplete",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),C=B()(v.prototype,"onSwitchSection",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),_=B()(v.prototype,"onViewportMovesAwayFromTop",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),O=B()(v.prototype,"onViewportMovesToTop",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),A=B()(v.prototype,"onSwitchToManualScrollingIndicator",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>!0}}),x=B()(v.prototype,"onLoaded",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return j.NOOP}}),k=B()(v.prototype,"onButtonClick",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e){const t=e.target,o=(0,j.getText)(t).join(" ");this.onTrack({event:"buttonClick",eventType:"click",label:o,reference:t.getAttribute("action")||t.getAttribute("target")||t.getAttribute("type")||o,subject:"button",value:parseInt(t.getAttribute("website-analytics-value")||"1"),userInteraction:!0})}}}),q=B()(v.prototype,"onSectionSwitch",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return async function(e,t,o){j.globalContext.window?.location&&await this.onTrack({event:"sectionSwitch",eventType:"sectionSwitch",label:e,reference:`${j.globalContext.window.location.pathname}#${e}`,subject:"url",userInteraction:!1})}}}),M=B()(v.prototype,"onLinkClick",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e){const t=e.target,o=(0,j.getText)(t).join(" ");this.onTrack({event:"linkClick",eventType:"click",label:o,reference:t.getAttribute("href")||t.getAttribute("action")||t.getAttribute("target")||t.getAttribute("type")||o,subject:"link",value:parseInt(t.getAttribute("website-analytics-value")||"1"),userInteraction:!0})}}}),E=B()(v.prototype,"onTrack",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e){return this.options.tracking&&j.globalContext.dataLayer?.push(e),Promise.resolve()}}}),v);const H={component:R,register:(e=(0,j.camelCaseToDelimited)(R._name))=>{customElements.define(e,R)}},Q=R;j.globalContext.AUTO_DEFINE_WEBSITE_UTILITIES&&H.register()})(),u})()));
|
|
1
|
+
"use strict";if("undefined"!=typeof module&&null!==module&&"undefined"!==eval("typeof require")&&null!==eval("require")&&"main"in eval("require")&&"undefined"!==eval("typeof require.main")&&null!==eval("require.main")){var ORIGINAL_MAIN_MODULE=module;module!==eval("require.main")&&"paths"in module&&"paths"in eval("require.main")&&"undefined"!=typeof __dirname&&null!==__dirname&&(module.paths=eval("require.main.paths").concat(module.paths.filter((function(path){return eval("require.main.paths").includes(path)}))))}if(null==window)var window="undefined"==typeof global||null===global?{}:global;!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("web-component-wrapper/Web"),require("web-component-wrapper/decorator"));else if("function"==typeof define&&define.amd)define(["@babel/runtime/helpers/applyDecoratedDescriptor","@babel/runtime/helpers/initializerDefineProperty","@babel/runtime/helpers/initializerWarningHelper","clientnode","clientnode/property-types","web-component-wrapper/Web","web-component-wrapper/decorator"],e);else{var o="object"==typeof exports?e(require("@babel/runtime/helpers/applyDecoratedDescriptor"),require("@babel/runtime/helpers/initializerDefineProperty"),require("@babel/runtime/helpers/initializerWarningHelper"),require("clientnode"),require("clientnode/property-types"),require("web-component-wrapper/Web"),require("web-component-wrapper/decorator")):e(t["@babel/runtime/helpers/applyDecoratedDescriptor"],t["@babel/runtime/helpers/initializerDefineProperty"],t["@babel/runtime/helpers/initializerWarningHelper"],t.clientnode,t["clientnode/property-types"],t["web-component-wrapper/Web"],t["web-component-wrapper/decorator"]);for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(this,((t,e,o,i,n,r,s)=>(()=>{var a=[,,,t=>{t.exports=e},e=>{e.exports=t},t=>{t.exports=o},t=>{t.exports=i},t=>{t.exports=n},t=>{t.exports=s},t=>{t.exports=r}],l={};function c(t){var e=l[t];if(void 0!==e)return e.exports;var o=l[t]={exports:{}};return a[t](o,o.exports,c),o.exports}c.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return c.d(e,{a:e}),e},c.d=(t,e)=>{for(var o in e)c.o(e,o)&&!c.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},c.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var u={};return(()=>{c.r(u),c.d(u,{WebsiteUtilities:()=>M,api:()=>P,default:()=>z,log:()=>E});var t,e,o,i,n,r,s,a,l,p,d,h,m,w,f,v,g,b,y,N,S,T,_,L,D=c(3),C=c.n(D),k=c(4),A=c.n(k),x=(c(5),c(6)),O=c(7),q=c(8),I=c(9);const E=new x.Logger({name:"website-utilities"});let M=(t=(0,q.property)({type:O.object}),e=(0,q.property)({type:O.func}),o=(0,q.property)({type:O.func}),i=(0,q.property)({type:O.func}),n=(0,q.property)({type:O.func}),r=(0,q.property)({type:O.func}),s=(0,q.property)({type:O.func}),a=(0,q.property)({type:O.func}),l=(0,q.property)({type:O.func}),p=(0,q.property)({type:O.func}),d=(0,q.property)({type:O.func}),L=class t extends I.Web{constructor(){super(),this.self=t,C()(this,"options",m,this),C()(this,"onStartUpAnimationComplete",w,this),C()(this,"onSwitchSection",f,this),C()(this,"onViewportMovesAwayFromTop",v,this),C()(this,"onViewportMovesToTop",g,this),C()(this,"onSwitchToManualScrollingIndicator",b,this),C()(this,"onLoaded",y,this),C()(this,"onButtonClick",N,this),C()(this,"onSectionSwitch",S,this),C()(this,"onLinkClick",T,this),C()(this,"onTrack",_,this),this.currentSectionName="",this.startUpAnimationIsComplete=!1,this.continueAutoScrolling=!1,this.viewportIsOnTop=void 0,this.observerDeregisters=[],this.windowLoadingCoverDomNode=null,this.topDomNode=null,this.priorityNavigationDomNodes=null,this.routerOutletDomNode=null,this.sectionDomNodes={},this.scrollToTopButtonDomNodes=null,this.defineGetterAndSetterInterface()}async onUpdateAttribute(t,e){await super.onUpdateAttribute(t,e),"options"===t&&this._extendOptions()}async render(t="unknown",e=!0){if(await super.render(t,!1),0===Object.keys(this.options).length&&this._extendOptions(),this.disableScrolling(),!this.self.windowLoaded){const t=()=>{this.self.windowLoaded||(this.self.windowLoaded=!0,this._removeLoadingCover().then((()=>{this.enableScrolling(),this._performStartUpEffects().then((()=>{this.addMenuHighlighterViewTransition()})),this.onLoaded()})))};(0,x.onDocumentReady)((()=>{(0,x.timeout)(t,this.options.windowLoadedTimeoutAfterDocLoadedInMSec)})),x.globalContext.window&&this.addSecureEventListener(x.globalContext.window,"load",t)}await this.waitForNestedComponentRendering(),this.grabDomNodes(),this._bindScrollEvents(),this._bindClickTracking(),await this._initializeRouting(),this.initializePriorityNavigation(),await this.resolveRenderingPromiseIfSet(t,e)}disconnectedCallback(){super.disconnectedCallback();for(const t of this.observerDeregisters)t()}grabDomNodes(){var t,e,o;this.topDomNode=this.hostDomNode.querySelector(this.options.selectors.top),this.scrollToTopButtonDomNodes=this.hostDomNode.querySelectorAll(this.options.selectors.scrollToTopButtons),this.priorityNavigationDomNodes=this.hostDomNode.querySelectorAll(this.options.selectors.priorityNavigation),this.routerOutletDomNode=this.hostDomNode.querySelector(this.options.selectors.routerOutlet);for(const t of null!==(i=this.routerOutletDomNode?.children)&&void 0!==i?i:[]){var i;const e=t.getAttribute("data-website-utilities-section");""===e?this.sectionDomNodes.default=t:e&&this.options.sectionNames.managed.includes(e)&&(this.sectionDomNodes[e]=t)}this.windowLoadingCoverDomNode=null!==(t=null!==(e=null!==(o=this.hostDomNode.querySelector(this.options.selectors.windowLoadingCover))&&void 0!==o?o:this.hostDomNode.parentElement?.querySelector(this.options.selectors.windowLoadingCover))&&void 0!==e?e:x.globalContext.document?.body.querySelector(this.options.selectors.windowLoadingCover))&&void 0!==t?t:null}interruptableScrollToTop(){const t=window.pageYOffset,e=performance.now();this.continueAutoScrolling=!0;const o=i=>{if(!this.continueAutoScrolling)return;const n=i-e,r=Math.min(n/500,1),s=r*(2-r);window.scrollTo(0,t*(1-s)),r<1?requestAnimationFrame(o):this.continueAutoScrolling=!1};requestAnimationFrame(o)}scrollToTop(){x.globalContext.document&&window.scrollTo({top:0,behavior:"smooth"})}disableScrolling(){this.hostDomNode.parentElement&&(this.hostDomNode.parentElement.classList.add("wu-disable-scrolling"),this.addSecureEventListener(this.hostDomNode.parentElement,"touchmove",x.preventDefault))}enableScrolling(){this.hostDomNode.parentElement&&(this.hostDomNode.parentElement.classList.remove("wu-disable-scrolling"),this.hostDomNode.parentElement.classList.remove("touchmove"),this.hostDomNode.parentElement.removeEventListener("touchmove",x.preventDefault))}async track(t){if(x.globalContext.window?.location&&this.options.tracking){const e={context:`${x.globalContext.window.location.pathname}#`+this.currentSectionName,...t};("number"!=typeof e.value||isNaN(e.value))&&(e.value=1),E.debug('Run tracking code: "event" with arguments:'),E.debug(e);try{await this._onTrack(e)}catch(t){E.warn(`Problem in tracking "${(0,x.represent)(e)}":`,(0,x.represent)(t))}}}initializePriorityNavigation(){if(0===this.priorityNavigationDomNodes?.length)return;for(const t of this.priorityNavigationDomNodes||[])for(const e of t.querySelectorAll(`[href="#${this.currentSectionName}"]`))e.classList.add(this.options.selectors.activeNavigationItemClassName);const t=()=>{for(const t of this.priorityNavigationDomNodes||[]){const e=t.querySelectorAll("ul > li"),o=Array.from(e).filter((t=>!t.classList.contains(this.options.selectors.priorityNavigationOverflow.substring(1)))),i=t.querySelector("ul > li").offsetTop,n=[];let r=!0,s=0;for(const t of o){t.offsetTop!==i&&(n.push(t),r&&(n.push(o[s-1]),r=!1)),s+=1}if(n.length){const e=n.map((t=>t.cloneNode(!0)));for(const t of n)t.classList.add("wu-priority-navigation__list__item--hide");const o=t.querySelector(this.options.selectors.priorityNavigationOverflowList);if(o)for(const t of e)o.append(t);const i=t.querySelector(this.options.selectors.priorityNavigationOverflow);i&&i.classList.add("wu-priority-navigation__overflow--inline-block"),t.style.overflow="visible"}}};for(const t of this.hostDomNode.querySelectorAll(this.options.selectors.priorityNavigationOverflowTitle))this.addSecureEventListener(t,"click",(()=>{for(const t of this.hostDomNode.querySelectorAll(this.options.selectors.priorityNavigationOverflowList))t.classList.toggle("wu-priority-navigation__overflow__list--show")}));for(const e of this.priorityNavigationDomNodes||[]){const o=(0,x.trailingThrottle)((()=>{for(const t of e.querySelectorAll(this.options.selectors.priorityNavigationOverflowList))for(;t.firstChild;)t.removeChild(t.firstChild);for(const t of e.querySelectorAll(this.options.selectors.priorityNavigationOverflow))t.classList.remove("wu-priority-navigation__overflow--show-inline-block");for(const t of e.querySelectorAll("ul > li"))t.classList.contains(this.options.selectors.priorityNavigationOverflow.substring(1))||t.classList.remove("wu-priority-navigation__list__item--hide");t(),e.classList.remove("wu-priority-navigation--resizing")}),20),i=new ResizeObserver((()=>{e.classList.add("wu-priority-navigation--resizing"),o()}));this.observerDeregisters.push((()=>{i.unobserve(e)})),i.observe(e)}t()}addMenuHighlighterViewTransition(){if(!x.globalContext.document)return;const t=document.createElement("style");t.type="text/css";t.appendChild(x.globalContext.document.createTextNode("\n a.wu-priority-navigation__link--active::after {\n view-transition-name: wu-menu-highlight;\n }\n ")),x.globalContext.document.getElementsByTagName("head")[0].appendChild(t)}activateNavigationItemHighlighters(t){const e=this.options.selectors.activeNavigationItemClassName;for(const o of this.priorityNavigationDomNodes||[]){for(const t of o.querySelectorAll(`.${e}`))t.classList.remove(e);for(const i of o.querySelectorAll(`[href="#${t}"]`))i.classList.add(e)}}triggerNavigationItemHighlighterSwitching(t){x.globalContext.document?.startViewTransition?x.globalContext.document.startViewTransition((()=>{this.activateNavigationItemHighlighters(t)})):this.activateNavigationItemHighlighters(t)}async _onButtonClick(t){if(!1===await this.onButtonClick(t))return;const e=t.target,o=(0,x.getText)(e).join(" ");this._onTrack({event:"buttonClick",eventType:"click",label:o,reference:e.getAttribute("action")||e.getAttribute("target")||e.getAttribute("type")||o,subject:"button",value:parseInt(e.getAttribute("website-analytics-value")||"1"),userInteraction:!0})}async _onSectionSwitch(t,e,o){!1!==await this.onSectionSwitch(t,e,o)&&x.globalContext.window?.location&&await this._onTrack({event:"sectionSwitch",eventType:"sectionSwitch",label:t,reference:`${x.globalContext.window.location.pathname}#${t}`,subject:"url",userInteraction:!1})}async _onLinkClick(t){if(!1===await this.onLinkClick(t))return;const e=t.target,o=(0,x.getText)(e).join(" ");this._onTrack({event:"linkClick",eventType:"click",label:o,reference:e.getAttribute("href")||e.getAttribute("action")||e.getAttribute("target")||e.getAttribute("type")||o,subject:"link",value:parseInt(e.getAttribute("website-analytics-value")||"1"),userInteraction:!0})}async _onTrack(t){!1!==await this.onTrack(t)&&this.options.tracking&&x.globalContext.dataLayer?.push(t)}_onViewportMovesToTop(){this._finishScrollToTopButtonTransition();for(const e of null!==(t=this.scrollToTopButtonDomNodes)&&void 0!==t?t:[]){var t;const o=()=>{e.removeEventListener("transitionend",i),e.removeEventListener("transitioncancel",o)},i=()=>{this.viewportIsOnTop&&e.classList.add("wu-top-settled"),o()};e.addEventListener("transitionend",i,{once:!0}),e.addEventListener("transitioncancel",o,{once:!0}),e.classList.add("wu-scroll-up")}}async _onViewportMovesAwayFromTop(){this._finishScrollToTopButtonTransition("wu-top-settled"),await(0,x.timeout)(),this._finishScrollToTopButtonTransition();for(const e of null!==(t=this.scrollToTopButtonDomNodes)&&void 0!==t?t:[]){var t;e.classList.add("wu-scroll-down")}}async switchSection(t,e){if(x.globalContext.window&&"location"in x.globalContext.window&&(""===t||this.options.sectionNames.managed.includes(t)||this.options.sectionNames.unmanaged.includes(t))){var o,i;const n=Object.prototype.hasOwnProperty.call(this.sectionDomNodes,this.currentSectionName)?this.sectionDomNodes[this.currentSectionName]:null!==(o=this.sectionDomNodes.default)&&void 0!==o?o:null,r=Object.prototype.hasOwnProperty.call(this.sectionDomNodes,t)?this.sectionDomNodes[t]:null!==(i=this.sectionDomNodes.default)&&void 0!==i?i:null;await this.self.switchSectionLock.acquire(),this.triggerNavigationItemHighlighterSwitching(t),E.debug(`Run section switch from "${this.currentSectionName}" to`,`"${t}".`),this.currentSectionName===t?(n&&(n.classList.remove("wu-section-active"),n.classList.add("wu-section-inactive")),r&&(r.classList.remove("wu-section-inactive"),r.classList.add("wu-section-active"))):this.options.sectionNames.unmanaged.includes(t)&&this.options.sectionNames.unmanaged.includes(this.currentSectionName)||(this.interruptableScrollToTop(),n&&(await(0,x.fadeOut)(n),n.classList.remove("wu-section-active"),n.classList.add("wu-section-inactive")),r&&(r.classList.remove("wu-section-inactive"),r.classList.add("wu-section-active"),await(0,x.fadeIn)(r)));const s=this.currentSectionName;this.currentSectionName=t;try{await this._onSectionSwitch(this.currentSectionName,s,e)}catch(t){E.warn("Problem due to call section switch callback on section",`"${this.currentSectionName}": ${(0,x.represent)(t)}`)}await this.self.switchSectionLock.release()}}_extendOptions(){this.setPropertyValue("options",(0,x.extend)(!0,{},this.self._defaultOptions,this.options))}_initializeRouting(){""===this.currentSectionName&&(this.currentSectionName=this.options.sectionNames.default),this._bindNavigationEvents();const t=x.globalContext.location?.hash&&x.globalContext.location.hash.substring(1);t&&(this.options.sectionNames.managed.includes(t)||this.options.sectionNames.unmanaged.includes(t))&&(this.currentSectionName=t);for(const t of Object.values(this.sectionDomNodes))t.classList.add("wu-section-inactive");return this.switchSection(null!=t?t:this.currentSectionName)}_finishScrollToTopButtonTransition(t=["wu-scroll-down","wu-scroll-up"]){for(const o of null!==(e=this.scrollToTopButtonDomNodes)&&void 0!==e?e:[]){var e;o.classList.remove(...[].concat(t))}}_bindScrollEvents(){if(x.globalContext.document){for(const t of[x.globalContext.document.body,x.globalContext.document.querySelector("html"),x.globalContext.window])for(const e of this.options.knownScrollEventNames)t&&this.addSecureEventListener(t,e,(t=>{this.onSwitchToManualScrollingIndicator(t)&&(this.continueAutoScrolling=!1)}));if(x.globalContext.window&&this.addSecureEventListener(x.globalContext.window,"scroll",(t=>{x.globalContext.window?.scrollY?this.viewportIsOnTop&&(this.viewportIsOnTop=!1,this._onViewportMovesAwayFromTop().then(this.onViewportMovesAwayFromTop.bind(this,t))):this.viewportIsOnTop||(this.viewportIsOnTop=!0,this._onViewportMovesToTop(),this.onViewportMovesToTop(t))})),x.globalContext.window?.scrollY)this.viewportIsOnTop=!1,this._onViewportMovesAwayFromTop().then((()=>{this.onViewportMovesAwayFromTop()}));else{this.viewportIsOnTop=!0;for(const e of null!==(t=this.scrollToTopButtonDomNodes)&&void 0!==t?t:[]){var t;e.classList.add("wu-top-settled")}this._onViewportMovesToTop(),this.onViewportMovesToTop()}}}async _removeLoadingCover(){await(0,x.timeout)(this.options.additionalPageLoadingTimeInMilliseconds);for(const t of this.hostDomNode.querySelectorAll(`[class^="${this.options.selectors.startUpAnimationClassPrefix}"], [class*=" ${this.options.selectors.startUpAnimationClassPrefix}"]`))t.style.opacity="0";this.windowLoadingCoverDomNode&&await(0,x.fadeOut)(this.windowLoadingCoverDomNode)}async _performStartUpEffects(){const t=[];let e=1;for(;;){const o=this.hostDomNode.querySelectorAll("."+this.options.selectors.startUpAnimationClassPrefix+String(e));if(0===o.length){await Promise.all(t),this.startUpAnimationIsComplete=!0,this.onStartUpAnimationComplete();break}await(0,x.timeout)(this.options.startUpAnimationElementDelayInMilliseconds);for(const e of o)t.push((0,x.fadeIn)(e));e+=1}}_bindNavigationEvents(){x.globalContext.window&&this.addSecureEventListener(x.globalContext.window,"hashchange",(t=>{if(this.startUpAnimationIsComplete){const e=location.hash.substring(1);this.switchSection(e,t)}})),this._bindScrollToTopButton()}_bindScrollToTopButton(){for(const t of this.scrollToTopButtonDomNodes||[])this.addSecureEventListener(t,"click",(t=>{t.preventDefault(),this.interruptableScrollToTop()}))}_bindClickTracking(){if(this.options.tracking){for(const t of this.hostDomNode.querySelectorAll("a"))this.addSecureEventListener(t,"click",(t=>{this._onLinkClick(t)}));for(const t of this.hostDomNode.querySelectorAll("button"))this.addSecureEventListener(t,"click",(t=>{this._onButtonClick(t)}))}}},L._name="WebsiteUtilities",L._defaultOptions={additionalPageLoadingTimeInMilliseconds:0,startUpAnimationElementDelayInMilliseconds:100,windowLoadedTimeoutAfterDocLoadedInMSec:2e3,domain:"auto",knownScrollEventNames:["DOMMouseScroll","keyup","mousedown","mousewheel","scroll","touchmove","wheel"],sectionNames:{default:"",managed:["home"],unmanaged:[]},selectors:{windowLoadingCover:".wu-window-loading-cover",startUpAnimationClassPrefix:"wu-start-up-animation-number-",top:".wu-header",routerOutlet:".wu-router-outlet",scrollToTopButtons:".wu-scroll-to-top",activeNavigationItemClassName:"wu-priority-navigation__link--active",priorityNavigation:".wu-priority-navigation",priorityNavigationOverflow:".wu-priority-navigation__overflow",priorityNavigationOverflowTitle:".wu-priority-navigation__overflow__title",priorityNavigationOverflowList:".wu-priority-navigation__overflow__list"},tracking:!1},L.windowLoaded=!1,L.switchSectionLock=new x.Lock,h=L,m=A()(h.prototype,"options",[t],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),w=A()(h.prototype,"onStartUpAnimationComplete",[e],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),f=A()(h.prototype,"onSwitchSection",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),v=A()(h.prototype,"onViewportMovesAwayFromTop",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),g=A()(h.prototype,"onViewportMovesToTop",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),b=A()(h.prototype,"onSwitchToManualScrollingIndicator",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>!0}}),y=A()(h.prototype,"onLoaded",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),N=A()(h.prototype,"onButtonClick",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(t){return Promise.resolve(void 0)}}}),S=A()(h.prototype,"onSectionSwitch",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(t,e,o){return Promise.resolve(void 0)}}}),T=A()(h.prototype,"onLinkClick",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(t){return Promise.resolve(void 0)}}}),_=A()(h.prototype,"onTrack",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(t){return Promise.resolve(void 0)}}}),h);const P={component:M,register:(t=(0,x.camelCaseToDelimited)(M._name))=>{customElements.define(t,M)}},z=M;x.globalContext.AUTO_DEFINE_WEBSITE_UTILITIES&&P.register()})(),u})()));
|
package/index.scss
CHANGED
|
@@ -54,10 +54,6 @@ endregion
|
|
|
54
54
|
website-utilities {
|
|
55
55
|
font-family: var(--w-typography-font-family, v.$typography-font-family);
|
|
56
56
|
font-size: 14px;
|
|
57
|
-
|
|
58
|
-
lang-replacement {
|
|
59
|
-
display: none;
|
|
60
|
-
}
|
|
61
57
|
/* region generic dom nodes */
|
|
62
58
|
/** region headline */
|
|
63
59
|
h1,
|
|
@@ -497,6 +493,25 @@ website-utilities {
|
|
|
497
493
|
display: inline-block;
|
|
498
494
|
padding: 10px 15px;
|
|
499
495
|
}
|
|
496
|
+
/* region menu highlighter */
|
|
497
|
+
a::after {
|
|
498
|
+
content: " ";
|
|
499
|
+
position: absolute;
|
|
500
|
+
left: 0;
|
|
501
|
+
top: 0;
|
|
502
|
+
width: 100%;
|
|
503
|
+
height: 100%;
|
|
504
|
+
border: none;
|
|
505
|
+
box-sizing: border-box;
|
|
506
|
+
}
|
|
507
|
+
/*
|
|
508
|
+
NOTE: Will be set to when startup animations have been finished.
|
|
509
|
+
|
|
510
|
+
a.wu-priority-navigation__link--active::after {
|
|
511
|
+
view-transition-name: wu-menu-highlight;
|
|
512
|
+
}
|
|
513
|
+
*/
|
|
514
|
+
/* endregion */
|
|
500
515
|
|
|
501
516
|
&.resizing {
|
|
502
517
|
overflow: hidden;
|
|
@@ -586,6 +601,14 @@ website-utilities {
|
|
|
586
601
|
}
|
|
587
602
|
}
|
|
588
603
|
|
|
604
|
+
::view-transition-old(wu-menu-highlight) {
|
|
605
|
+
height: 100%;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
::view-transition-new(wu-menu-highlight) {
|
|
609
|
+
height: 100%;
|
|
610
|
+
}
|
|
611
|
+
|
|
589
612
|
@keyframes blur-text {
|
|
590
613
|
0% {
|
|
591
614
|
filter: blur(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "website-utilities",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.415",
|
|
4
4
|
"description": "extend your web app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"website",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
68
68
|
"@types/ejs": "^3.1.5",
|
|
69
69
|
"@types/html-minifier": "^4.0.6",
|
|
70
|
-
"@types/jsdom": "^28.0.
|
|
71
|
-
"@types/node": "^25.
|
|
70
|
+
"@types/jsdom": "^28.0.3",
|
|
71
|
+
"@types/node": "^25.8.0",
|
|
72
72
|
"@types/webpack-env": "^1.18.8",
|
|
73
73
|
"@typescript-eslint/eslint-plugin": "^8.59.3",
|
|
74
74
|
"@typescript-eslint/parser": "^8.59.3",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"postcss-fontpath": "^1.0.0",
|
|
87
87
|
"postcss-import": "^16.1.1",
|
|
88
88
|
"postcss-loader": "^8.2.1",
|
|
89
|
-
"postcss-preset-env": "^11.
|
|
89
|
+
"postcss-preset-env": "^11.3.0",
|
|
90
90
|
"postcss-scss": "^4.0.9",
|
|
91
91
|
"postcss-sprites": "^4.2.1",
|
|
92
92
|
"postcss-url": "^10.1.3",
|
|
@@ -94,11 +94,11 @@
|
|
|
94
94
|
"sass": "^1.99.0",
|
|
95
95
|
"sass-loader": "^16.0.8",
|
|
96
96
|
"style-loader": "^4.0.0",
|
|
97
|
-
"stylelint": "^17.11.
|
|
97
|
+
"stylelint": "^17.11.1",
|
|
98
98
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
99
99
|
"typescript-eslint": "^8.59.3",
|
|
100
100
|
"web-component-wrapper": "^0.0.591",
|
|
101
|
-
"web-documentation": "^1.0.
|
|
101
|
+
"web-documentation": "^1.0.12",
|
|
102
102
|
"weboptimizer": "^3.0.22",
|
|
103
103
|
"webpack-dev-server": "^5.2.4"
|
|
104
104
|
},
|
package/type.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export interface DefaultOptions {
|
|
|
3
3
|
additionalPageLoadingTimeInMilliseconds: number;
|
|
4
4
|
domain: string;
|
|
5
5
|
knownScrollEventNames: Array<KnownEventName>;
|
|
6
|
-
mediaQueryClassNameIndicator: Array<Array<string>>;
|
|
7
6
|
sectionNames: {
|
|
7
|
+
default: string;
|
|
8
8
|
managed: Array<string>;
|
|
9
9
|
unmanaged: Array<string>;
|
|
10
10
|
};
|
|
@@ -14,6 +14,7 @@ export interface DefaultOptions {
|
|
|
14
14
|
top: string;
|
|
15
15
|
routerOutlet: string;
|
|
16
16
|
scrollToTopButtons: string;
|
|
17
|
+
activeNavigationItemClassName: string;
|
|
17
18
|
priorityNavigation: string;
|
|
18
19
|
priorityNavigationOverflow: string;
|
|
19
20
|
priorityNavigationOverflowList: string;
|