website-utilities 1.0.429 → 1.0.431

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.d.ts CHANGED
@@ -9,8 +9,6 @@ export declare const log: Logger;
9
9
  * initializer method.
10
10
  * @property _defaultOptions.additionalPageLoadingTimeInMilliseconds -
11
11
  * Additional time to wait until page will be indicated as loaded.
12
- * @property _defaultOptions.knownScrollEventNames - Saves all known scroll
13
- * events in a space-separated string.
14
12
  * @property _defaultOptions.selectors - Mapping of dom node descriptions to
15
13
  * their corresponding selectors.
16
14
  * @property _defaultOptions.selectors.top - Selector to indicate that viewport
@@ -51,10 +49,6 @@ export declare const log: Logger;
51
49
  * moves away from top.
52
50
  * @property onViewportMovesToTop - Callback to trigger when viewport arrives
53
51
  * at top.
54
- * @property onSwitchToManualScrollingIndicator - Indicator
55
- * function to stop currently running scroll animations to let the user get
56
- * control of current scrolling behavior. Given callback gets an event object.
57
- * If the function returns "true", current animated scrolls will be stopped.
58
52
  * @property onButtonClick - Function to call on button click events.
59
53
  * @property onLinkClick - Function to call on link click events.
60
54
  * @property onSectionSwitch - Function to call on section switches.
@@ -70,7 +64,6 @@ export declare class WebsiteUtilities<TElement = HTMLElement, ExternalProperties
70
64
  onViewportMovesAwayFromTop: (this: WebsiteUtilities, event?: Event) => void;
71
65
  onViewportMovesToTop: (this: WebsiteUtilities, event?: Event) => void;
72
66
  onUnfocusResponsiveMenu: (this: WebsiteUtilities, event: Event, clickWasInMenu: boolean) => boolean | undefined;
73
- onSwitchToManualScrollingIndicator: (event: Event) => boolean;
74
67
  onLoaded: () => void;
75
68
  onButtonClick: (this: WebsiteUtilities, _event: Event) => Promise<false | undefined>;
76
69
  onSectionSwitch: (this: WebsiteUtilities, _sectionName: string, _oldSectionName: string, _event?: Event) => Promise<false | undefined>;
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 a=[,,,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}],l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return a[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:()=>z,api:()=>U,default:()=>B,log:()=>P});var e,t,o,i,n,r,s,a,l,p,d,h,m,w,v,f,g,b,y,N,S,T,C,L,D,_,O=c(3),k=c.n(O),x=c(4),I=c.n(x),A=(c(5),c(6)),q=c(7),E=c(8),M=c(9);const P=new A.Logger({name:"website-utilities"});let z=(e=(0,E.property)({type:q.object}),t=(0,E.property)({type:q.func}),o=(0,E.property)({type:q.func}),i=(0,E.property)({type:q.func}),n=(0,E.property)({type:q.func}),r=(0,E.property)({type:q.func}),s=(0,E.property)({type:q.func}),a=(0,E.property)({type:q.func}),l=(0,E.property)({type:q.func}),p=(0,E.property)({type:q.func}),d=(0,E.property)({type:q.func}),h=(0,E.property)({type:q.func}),_=class e extends M.Web{constructor(){super(),this.self=e,k()(this,"options",w,this),k()(this,"onStartUpAnimationComplete",v,this),k()(this,"onSwitchSection",f,this),k()(this,"onViewportMovesAwayFromTop",g,this),k()(this,"onViewportMovesToTop",b,this),k()(this,"onUnfocusResponsiveMenu",y,this),k()(this,"onSwitchToManualScrollingIndicator",N,this),k()(this,"onLoaded",S,this),k()(this,"onButtonClick",T,this),k()(this,"onSectionSwitch",C,this),k()(this,"onLinkClick",L,this),k()(this,"onTrack",D,this),this.currentSectionName="",this.startUpAnimationIsComplete=!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(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().then((()=>{this.addMenuHighlighterViewTransition()})),this.onLoaded()})))};(0,A.onDocumentReady)((()=>{(0,A.timeout)(e,this.options.windowLoadedTimeoutAfterDocLoadedInMSec)})),A.globalContext.window&&this.addSecureEventListener(A.globalContext.window,"load",e)}await this.waitForNestedComponentRendering(),this.grabDomNodes(),this._bindScrollEvents(),this._bindClickTracking(),await this._initializeRouting(),this.initializePriorityNavigation(),await this.resolveRenderingPromiseIfSet(e,t)}disconnectedCallback(){super.disconnectedCallback();for(const e of this.observerDeregisters)e()}grabDomNodes(){var e,t,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.priorityNavigationClassName}`),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:A.globalContext.document?.body.querySelector(this.options.selectors.windowLoadingCover))&&void 0!==e?e:null}disableScrolling(){this.hostDomNode.parentElement&&(this.hostDomNode.parentElement.classList.add("wu-disable-scrolling"),this.addSecureEventListener(this.hostDomNode.parentElement,"touchmove",A.preventDefault))}enableScrolling(){this.hostDomNode.parentElement&&(this.hostDomNode.parentElement.classList.remove("wu-disable-scrolling"),this.hostDomNode.parentElement.classList.remove("touchmove"),this.hostDomNode.parentElement.removeEventListener("touchmove",A.preventDefault))}async track(e){if(A.globalContext.window?.location&&this.options.tracking){const t={context:`${A.globalContext.window.location.pathname}#`+this.currentSectionName,...e};("number"!=typeof t.value||isNaN(t.value))&&(t.value=1),P.debug('Run tracking code: "event" with arguments:'),P.debug(t);try{await this._onTrack(t)}catch(e){P.warn(`Problem in tracking "${(0,A.represent)(t)}":`,(0,A.represent)(e))}}}initializePriorityNavigation(){const{selectors:e}=this.options,t=e.priorityNavigationOverflowIndicatorClassName,o=e.priorityNavigationOverflowIndicatorShowClassName;if(0===this.priorityNavigationDomNodes?.length)return;for(const t of this.priorityNavigationDomNodes||[])for(const o of t.querySelectorAll(`[href="#${this.currentSectionName}"]`))o.classList.add(e.activeNavigationItemClassName);const i=()=>{for(const i of this.priorityNavigationDomNodes||[]){const n=i.querySelectorAll("ul > li"),r=Array.from(n).filter((e=>!e.classList.contains(t))),s=n[0].offsetTop;let a=[];for(const e of r){e.offsetTop!==s&&a.push(e)}r.length-a.length<this.options.minimumNumberOfMenuItems&&(a=r.slice());const l=i.querySelector(`.${t}`);if(a.length){const t=a.map((e=>{const t=e.cloneNode(!0);for(const e of t.querySelectorAll("[style]"))e.removeAttribute("style");return t}));for(const t of a)t.classList.add(e.priorityNavigationListItemHideClassName);const n=i.querySelector(e.priorityNavigationOverflowList);if(n)for(const e of t)n.append(e);l&&l.classList.add(o)}else l&&l.classList.remove(o)}};for(const o of this.hostDomNode.querySelectorAll(`.${t}`)){const t=o.closest(`.${e.priorityNavigationClassName}`);this.addSecureEventListener(o,"click",(()=>{t?.classList.toggle(e.priorityNavigationOverflowOpenClassName)})),A.globalContext.document&&this.addSecureEventListener(A.globalContext.document,"click",(o=>{if(t?.classList.contains(e.priorityNavigationOverflowOpenClassName)){const i=Boolean(o.target&&(0,A.getParents)(o.target).some((e=>t===e))),n=this.onUnfocusResponsiveMenu(o,i);(!0===n||!i&&!1!==n)&&t.classList.remove(e.priorityNavigationOverflowOpenClassName)}}))}for(const n of this.priorityNavigationDomNodes||[]){const r=(0,A.trailingThrottle)((()=>{if(!n.classList.contains(e.priorityNavigationOverflowOpenClassName)){n.classList.add(e.priorityNavigationOverflowResizingClassName);for(const t of n.querySelectorAll(e.priorityNavigationOverflowList))for(;t.firstChild;)t.removeChild(t.firstChild);for(const e of n.querySelectorAll(`.${t}`))e.classList.remove(o);for(const t of n.querySelectorAll("ul > li"))t.classList.contains(e.priorityNavigationOverflowIndicatorClassName)||t.classList.remove(e.priorityNavigationListItemHideClassName);i(),n.classList.remove(e.priorityNavigationOverflowResizingClassName)}}),20),s=new ResizeObserver(r);this.observerDeregisters.push((()=>{s.unobserve(n)})),s.observe(n)}i()}addMenuHighlighterViewTransition(){if(!A.globalContext.document)return;const e=document.createElement("style");e.type="text/css";e.appendChild(A.globalContext.document.createTextNode("\n .wu-priority-navigation\n .wu-priority-navigation__link--active::after {\n view-transition-name: wu-menu-highlight;\n }\n ")),A.globalContext.document.getElementsByTagName("head")[0].appendChild(e)}activateNavigationItemHighlighters(e){const t=this.options.selectors.activeNavigationItemClassName;for(const o of this.priorityNavigationDomNodes||[]){for(const e of o.querySelectorAll(`.${t}`))e.classList.remove(t);for(const i of o.querySelectorAll(`[href="#${e}"]`))i.classList.add(t)}}triggerNavigationItemHighlighterSwitching(e){A.globalContext.document?.startViewTransition?A.globalContext.document.startViewTransition((()=>{this.activateNavigationItemHighlighters(e)})):this.activateNavigationItemHighlighters(e)}async _onButtonClick(e){if(!1===await this.onButtonClick(e))return;const t=e.target,o=(0,A.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})}async _onSectionSwitch(e,t,o){!1!==await this.onSectionSwitch(e,t,o)&&A.globalContext.window?.location&&await this._onTrack({event:"sectionSwitch",eventType:"sectionSwitch",label:e,reference:`${A.globalContext.window.location.pathname}#${e}`,subject:"url",userInteraction:!1})}async _onLinkClick(e){if(!1===await this.onLinkClick(e))return;const t=e.target,o=(0,A.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})}async _onTrack(e){!1!==await this.onTrack(e)&&this.options.tracking&&A.globalContext.dataLayer?.push(e)}_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,A.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(A.globalContext.window&&"location"in A.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(),this.triggerNavigationItemHighlighterSwitching(e),P.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)||((0,A.interruptableScrollTo)(),n&&(await(0,A.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,A.fadeIn)(r)));const s=this.currentSectionName;this.currentSectionName=e;try{await this._onSectionSwitch(this.currentSectionName,s,t)}catch(e){P.warn("Problem due to call section switch callback on section",`"${this.currentSectionName}": ${(0,A.represent)(e)}`)}await this.self.switchSectionLock.release()}}_extendOptions(){this.setPropertyValue("options",(0,A.extend)(!0,{},this.self._defaultOptions,this.options))}_initializeRouting(){""===this.currentSectionName&&(this.currentSectionName=this.options.sectionNames.default),this._bindNavigationEvents();const e=A.globalContext.location?.hash&&A.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(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(A.globalContext.document){for(const e of[A.globalContext.document.body,A.globalContext.document.querySelector("html"),A.globalContext.window])for(const t of this.options.knownScrollEventNames)e&&this.addSecureEventListener(e,t,(e=>{this.onSwitchToManualScrollingIndicator(e)&&(A.CONTINUE_AUTO_SCROLLING.value=!1)}));if(A.globalContext.window&&this.addSecureEventListener(A.globalContext.window,"scroll",(e=>{A.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))})),A.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,A.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,A.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,A.timeout)(this.options.startUpAnimationElementDelayInMilliseconds);for(const t of o){t.style.removeProperty("opacity");const o=(0,A.fadeIn)(t);e.push(o.then((()=>{o.resetStyles()})))}t+=1}}_bindNavigationEvents(){A.globalContext.window&&this.addSecureEventListener(A.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(),(0,A.interruptableScrollTo)()}))}_bindClickTracking(){if(this.options.tracking){for(const e of this.hostDomNode.querySelectorAll("a"))this.addSecureEventListener(e,"click",(e=>{this._onLinkClick(e)}));for(const e of this.hostDomNode.querySelectorAll("button"))this.addSecureEventListener(e,"click",(e=>{this._onButtonClick(e)}))}}},_._name="WebsiteUtilities",_._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",priorityNavigationClassName:"wu-priority-navigation",priorityNavigationOverflowOpenClassName:"wu-priority-navigation--overflow-open",priorityNavigationOverflowResizingClassName:"wu-priority-navigation--resizing",activeNavigationItemClassName:"wu-priority-navigation__link--active",priorityNavigationListItemHideClassName:"wu-priority-navigation__list__item--hide",priorityNavigationOverflowIndicatorClassName:"wu-priority-navigation__list__overflow-indicator",priorityNavigationOverflowIndicatorShowClassName:"wu-priority-navigation__list__overflow-indicator--show",priorityNavigationOverflowList:".wu-priority-navigation__overflow-list"},minimumNumberOfMenuItems:3,tracking:!1},_.windowLoaded=!1,_.switchSectionLock=new A.Lock,m=_,w=I()(m.prototype,"options",[e],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),v=I()(m.prototype,"onStartUpAnimationComplete",[t],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return A.NOOP}}),f=I()(m.prototype,"onSwitchSection",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return A.NOOP}}),g=I()(m.prototype,"onViewportMovesAwayFromTop",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return A.NOOP}}),b=I()(m.prototype,"onViewportMovesToTop",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return A.NOOP}}),y=I()(m.prototype,"onUnfocusResponsiveMenu",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return A.NOOP}}),N=I()(m.prototype,"onSwitchToManualScrollingIndicator",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return()=>!0}}),S=I()(m.prototype,"onLoaded",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return A.NOOP}}),T=I()(m.prototype,"onButtonClick",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e){return Promise.resolve(void 0)}}}),C=I()(m.prototype,"onSectionSwitch",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e,t,o){return Promise.resolve(void 0)}}}),L=I()(m.prototype,"onLinkClick",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e){return Promise.resolve(void 0)}}}),D=I()(m.prototype,"onTrack",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e){return Promise.resolve(void 0)}}}),m);const U={component:z,register:(e=(0,A.camelCaseToDelimited)(z._name))=>{customElements.define(e,z)}},B=z;A.globalContext.AUTO_DEFINE_WEBSITE_UTILITIES&&U.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(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 a=[,,,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}],l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return a[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 p={};return(()=>{c.r(p),c.d(p,{WebsiteUtilities:()=>P,api:()=>M,default:()=>z,log:()=>E});var e,t,o,i,n,r,s,a,l,u,d,h,m,v,w,f,g,b,y,N,S,T,C,L,D=c(3),_=c.n(D),O=c(4),k=c.n(O),x=(c(5),c(6)),A=c(7),I=c(8),q=c(9);const E=new x.Logger({name:"website-utilities"});let P=(e=(0,I.property)({type:A.object}),t=(0,I.property)({type:A.func}),o=(0,I.property)({type:A.func}),i=(0,I.property)({type:A.func}),n=(0,I.property)({type:A.func}),r=(0,I.property)({type:A.func}),s=(0,I.property)({type:A.func}),a=(0,I.property)({type:A.func}),l=(0,I.property)({type:A.func}),u=(0,I.property)({type:A.func}),d=(0,I.property)({type:A.func}),L=class e extends q.Web{constructor(){super(),this.self=e,_()(this,"options",m,this),_()(this,"onStartUpAnimationComplete",v,this),_()(this,"onSwitchSection",w,this),_()(this,"onViewportMovesAwayFromTop",f,this),_()(this,"onViewportMovesToTop",g,this),_()(this,"onUnfocusResponsiveMenu",b,this),_()(this,"onLoaded",y,this),_()(this,"onButtonClick",N,this),_()(this,"onSectionSwitch",S,this),_()(this,"onLinkClick",T,this),_()(this,"onTrack",C,this),this.currentSectionName="",this.startUpAnimationIsComplete=!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(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().then((()=>{this.addMenuHighlighterViewTransition()})),this.onLoaded()})))};(0,x.onDocumentReady)((()=>{(0,x.timeout)(e,this.options.windowLoadedTimeoutAfterDocLoadedInMSec)})),x.globalContext.window&&this.addSecureEventListener(x.globalContext.window,"load",e)}await this.waitForNestedComponentRendering(),this.grabDomNodes(),this._bindScrollEvents(),this._bindClickTracking(),await this._initializeRouting(),this.initializePriorityNavigation(),await this.resolveRenderingPromiseIfSet(e,t)}disconnectedCallback(){super.disconnectedCallback();for(const e of this.observerDeregisters)e()}grabDomNodes(){var e,t,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.priorityNavigationClassName}`),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:x.globalContext.document?.body.querySelector(this.options.selectors.windowLoadingCover))&&void 0!==e?e:null}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(e){if(x.globalContext.window?.location&&this.options.tracking){const t={context:`${x.globalContext.window.location.pathname}#`+this.currentSectionName,...e};("number"!=typeof t.value||isNaN(t.value))&&(t.value=1),E.debug('Run tracking code: "event" with arguments:'),E.debug(t);try{await this._onTrack(t)}catch(e){E.warn(`Problem in tracking "${(0,x.represent)(t)}":`,(0,x.represent)(e))}}}initializePriorityNavigation(){const{selectors:e}=this.options,t=e.priorityNavigationOverflowIndicatorClassName,o=e.priorityNavigationOverflowIndicatorShowClassName;if(0===this.priorityNavigationDomNodes?.length)return;for(const t of this.priorityNavigationDomNodes||[])for(const o of t.querySelectorAll(`[href="#${this.currentSectionName}"]`))o.classList.add(e.activeNavigationItemClassName);const i=()=>{for(const i of this.priorityNavigationDomNodes||[]){const n=i.querySelectorAll("ul > li"),r=Array.from(n).filter((e=>!e.classList.contains(t))),s=n[0].offsetTop;let a=[];for(const e of r){e.offsetTop!==s&&a.push(e)}r.length-a.length<this.options.minimumNumberOfMenuItems&&(a=r.slice());const l=i.querySelector(`.${t}`);if(a.length){const t=a.map((e=>{const t=e.cloneNode(!0);for(const e of t.querySelectorAll("[style]"))e.removeAttribute("style");return t}));for(const t of a)t.classList.add(e.priorityNavigationListItemHideClassName);const n=i.querySelector(e.priorityNavigationOverflowList);if(n)for(const e of t)n.append(e);l&&l.classList.add(o)}else l&&l.classList.remove(o)}};for(const o of this.hostDomNode.querySelectorAll(`.${t}`)){const t=o.closest(`.${e.priorityNavigationClassName}`);this.addSecureEventListener(o,"click",(()=>{t?.classList.toggle(e.priorityNavigationOverflowOpenClassName)})),x.globalContext.document&&this.addSecureEventListener(x.globalContext.document,"click",(o=>{if(t?.classList.contains(e.priorityNavigationOverflowOpenClassName)){const i=Boolean(o.target&&(0,x.getParents)(o.target).some((e=>t===e))),n=this.onUnfocusResponsiveMenu(o,i);(!0===n||!i&&!1!==n)&&t.classList.remove(e.priorityNavigationOverflowOpenClassName)}}))}for(const n of this.priorityNavigationDomNodes||[]){const r=(0,x.trailingThrottle)((()=>{if(!n.classList.contains(e.priorityNavigationOverflowOpenClassName)){n.classList.add(e.priorityNavigationOverflowResizingClassName);for(const t of n.querySelectorAll(e.priorityNavigationOverflowList))for(;t.firstChild;)t.removeChild(t.firstChild);for(const e of n.querySelectorAll(`.${t}`))e.classList.remove(o);for(const t of n.querySelectorAll("ul > li"))t.classList.contains(e.priorityNavigationOverflowIndicatorClassName)||t.classList.remove(e.priorityNavigationListItemHideClassName);i(),n.classList.remove(e.priorityNavigationOverflowResizingClassName)}}),20),s=new ResizeObserver(r);this.observerDeregisters.push((()=>{s.unobserve(n)})),s.observe(n)}i()}addMenuHighlighterViewTransition(){if(!x.globalContext.document)return;const e=document.createElement("style");e.type="text/css";e.appendChild(x.globalContext.document.createTextNode("\n .wu-priority-navigation\n .wu-priority-navigation__link--active::after {\n view-transition-name: wu-menu-highlight;\n }\n ")),x.globalContext.document.getElementsByTagName("head")[0].appendChild(e)}activateNavigationItemHighlighters(e){const t=this.options.selectors.activeNavigationItemClassName;for(const o of this.priorityNavigationDomNodes||[]){for(const e of o.querySelectorAll(`.${t}`))e.classList.remove(t);for(const i of o.querySelectorAll(`[href="#${e}"]`))i.classList.add(t)}}triggerNavigationItemHighlighterSwitching(e){x.globalContext.document?.startViewTransition?x.globalContext.document.startViewTransition((()=>{this.activateNavigationItemHighlighters(e)})):this.activateNavigationItemHighlighters(e)}async _onButtonClick(e){if(!1===await this.onButtonClick(e))return;const t=e.target,o=(0,x.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})}async _onSectionSwitch(e,t,o){!1!==await this.onSectionSwitch(e,t,o)&&x.globalContext.window?.location&&await this._onTrack({event:"sectionSwitch",eventType:"sectionSwitch",label:e,reference:`${x.globalContext.window.location.pathname}#${e}`,subject:"url",userInteraction:!1})}async _onLinkClick(e){if(!1===await this.onLinkClick(e))return;const t=e.target,o=(0,x.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})}async _onTrack(e){!1!==await this.onTrack(e)&&this.options.tracking&&x.globalContext.dataLayer?.push(e)}_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,x.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(x.globalContext.window&&"location"in x.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(),this.triggerNavigationItemHighlighterSwitching(e),E.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)||((0,x.interruptableScrollTo)(),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=e;try{await this._onSectionSwitch(this.currentSectionName,s,t)}catch(e){E.warn("Problem due to call section switch callback on section",`"${this.currentSectionName}": ${(0,x.represent)(e)}`)}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 e=x.globalContext.location?.hash&&x.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(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(x.globalContext.document)if(x.globalContext.window&&this.addSecureEventListener(x.globalContext.window,"scroll",(e=>{x.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))})),x.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,x.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,x.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,x.timeout)(this.options.startUpAnimationElementDelayInMilliseconds);for(const t of o){t.style.removeProperty("opacity");const o=(0,x.fadeIn)(t);e.push(o.then((()=>{o.resetStyles()})))}t+=1}}_bindNavigationEvents(){x.globalContext.window&&this.addSecureEventListener(x.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(),(0,x.interruptableScrollTo)()}))}_bindClickTracking(){if(this.options.tracking){for(const e of this.hostDomNode.querySelectorAll("a"))this.addSecureEventListener(e,"click",(e=>{this._onLinkClick(e)}));for(const e of this.hostDomNode.querySelectorAll("button"))this.addSecureEventListener(e,"click",(e=>{this._onButtonClick(e)}))}}},L._name="WebsiteUtilities",L._defaultOptions={additionalPageLoadingTimeInMilliseconds:0,startUpAnimationElementDelayInMilliseconds:100,windowLoadedTimeoutAfterDocLoadedInMSec:2e3,domain:"auto",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",priorityNavigationClassName:"wu-priority-navigation",priorityNavigationOverflowOpenClassName:"wu-priority-navigation--overflow-open",priorityNavigationOverflowResizingClassName:"wu-priority-navigation--resizing",activeNavigationItemClassName:"wu-priority-navigation__link--active",priorityNavigationListItemHideClassName:"wu-priority-navigation__list__item--hide",priorityNavigationOverflowIndicatorClassName:"wu-priority-navigation__list__overflow-indicator",priorityNavigationOverflowIndicatorShowClassName:"wu-priority-navigation__list__overflow-indicator--show",priorityNavigationOverflowList:".wu-priority-navigation__overflow-list"},minimumNumberOfMenuItems:3,tracking:!1},L.windowLoaded=!1,L.switchSectionLock=new x.Lock,h=L,m=k()(h.prototype,"options",[e],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),v=k()(h.prototype,"onStartUpAnimationComplete",[t],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),w=k()(h.prototype,"onSwitchSection",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),f=k()(h.prototype,"onViewportMovesAwayFromTop",[i],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),g=k()(h.prototype,"onViewportMovesToTop",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),b=k()(h.prototype,"onUnfocusResponsiveMenu",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),y=k()(h.prototype,"onLoaded",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return x.NOOP}}),N=k()(h.prototype,"onButtonClick",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e){return Promise.resolve(void 0)}}}),S=k()(h.prototype,"onSectionSwitch",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e,t,o){return Promise.resolve(void 0)}}}),T=k()(h.prototype,"onLinkClick",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e){return Promise.resolve(void 0)}}}),C=k()(h.prototype,"onTrack",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return function(e){return Promise.resolve(void 0)}}}),h);const M={component:P,register:(e=(0,x.camelCaseToDelimited)(P._name))=>{customElements.define(e,P)}},z=P;x.globalContext.AUTO_DEFINE_WEBSITE_UTILITIES&&M.register()})(),p})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "website-utilities",
3
- "version": "1.0.429",
3
+ "version": "1.0.431",
4
4
  "description": "extend your web app",
5
5
  "keywords": [
6
6
  "website",
@@ -74,7 +74,7 @@
74
74
  "@typescript-eslint/parser": "^8.59.4",
75
75
  "@webcomponents/webcomponentsjs": "^2.8.0",
76
76
  "bootstrap-icons": "^1.13.1",
77
- "clientnode": "^4.0.1407",
77
+ "clientnode": "^4.0.1411",
78
78
  "css-loader": "^7.1.4",
79
79
  "cssnano": "^8.0.1",
80
80
  "eslint": "^10.4.0",
@@ -90,7 +90,7 @@
90
90
  "postcss-preset-env": "^11.3.0",
91
91
  "postcss-scss": "^4.0.9",
92
92
  "postcss-sprites": "^4.2.1",
93
- "postcss-url": "^10.1.3",
93
+ "postcss-url": "^10.1.4",
94
94
  "prop-types": "^15.8.1",
95
95
  "sass": "^1.99.0",
96
96
  "sass-loader": "^17.0.0",
package/type.d.ts CHANGED
@@ -1,10 +1,8 @@
1
- import { KnownEventName } from 'web-component-wrapper/type';
2
1
  export interface DefaultOptions {
3
2
  additionalPageLoadingTimeInMilliseconds: number;
4
3
  startUpAnimationElementDelayInMilliseconds: number;
5
4
  windowLoadedTimeoutAfterDocLoadedInMSec: number;
6
5
  domain: string;
7
- knownScrollEventNames: Array<KnownEventName>;
8
6
  sectionNames: {
9
7
  default: string;
10
8
  managed: Array<string>;