@pronto-tools-and-more/files 10.22.0 → 10.24.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_search-field_search-field_module_ts"],{2561:(w,u,r)=>{r.r(u),r.d(u,{SearchFieldModule:()=>G,component:()=>U});var h=r(177),C=r(467),e=r(3953),f=r(8251),S=r(610),b=r(3178),F=r(1210);const y={param:"phrase"};var d=r(8075),E=r(9745),p=r(4559),j=r(9516),T=r(8004),_=r(1652),R=r(345),B=r(8448);const V=["input"];function k(s,l){if(1&s){const c=e.RV6();e.j41(0,"div",9),e.bIt("click",function(){const n=e.eBV(c).$implicit,i=e.XpG(2);return e.Njj(i.onClickSuggestion(n))})("mousedown",function(n){e.eBV(c);const i=e.XpG(2);return e.Njj(i.onSuggestionMousedown(n))}),e.EFF(1),e.k0s()}if(2&s){const c=l.$implicit;e.R7$(),e.JRh(c)}}function I(s,l){if(1&s&&(e.j41(0,"div",7),e.DNE(1,k,2,1,"div",8),e.k0s()),2&s){const c=e.XpG();e.R7$(),e.Y8G("ngForOf",c.getSuggestions())}}let N=(()=>{var s;class l extends F.${constructor(t,n,i,a,o,D,g,M,m,v,z){super(n,i,g,m,v),this.router=t,this.injector=n,this.elementRef=i,this.route=a,this.changeDetectorRef=o,this.store=D,this.contextService=g,this.eventActionService=M,this.document=m,this.globalService=v,this.sanitizer=z,this.defaultConfig={...y},this.searched=!1,this.phrase="",this.suggestions=null}ngOnInit(){super.ngOnInit();let t=!1;this.store.subscribe(this.route.queryParams,n=>{if(!t&&n&&this.config&&this.config.param&&n[this.config.param]){const i=n[this.config.param];let a=this.sanitizer.sanitize(e.WPN.HTML,i)||"";a=this.decodeGermanChars(a),a!==i&&(t=!0,this.router.navigate([],{relativeTo:this.route,queryParams:{...n,[this.config.param]:a},queryParamsHandling:"merge"}).then(()=>{t=!1})),this.input.nativeElement.value=this.phrase=a,this.searched=this.input.nativeElement.value.trim().length>0}})}decodeGermanChars(t){return t.replace(/ä/g,"\xe4").replace(/ö/g,"\xf6").replace(/ü/g,"\xfc").replace(/ß/g,"\xdf").replace(/Ä/g,"\xc4").replace(/Ö/g,"\xd6").replace(/Ü/g,"\xdc")}onConfigChanges(){var t=this;return(0,C.A)(function*(){if(t.config.param&&t.context[t.config.param]&&(t.phrase=t.context[t.config.param],t.input.nativeElement.value=t.phrase,t.searched=t.input.nativeElement.value.trim().length>0),t.config.suggestions)try{t.suggestions=yield(0,b.hI)(t.config.suggestions.url)}catch{console.warn("Error fetching search suggestions")}t.changeDetectorRef.markForCheck()})()}onClickReset(t){this.phrase="",this.input.nativeElement.value=this.phrase,this.input.nativeElement.blur(),this.searched=!1,this.config.param&&(0,d.CV)(this.router,{[this.config.param]:null})}onSearch(){if(this.config.param&&this.input.nativeElement.value.trim().length>0){this.phrase=this.input.nativeElement.value,this.searched=!0;const t={...this.config.params,[this.config.param]:this.phrase};this.config.publicationType&&(t.publicationType=this.config.publicationType),this.store.dispatch((0,S.k4)({url:window.location.href,key:"SEARCH_PERFORMED",params:{phrase:this.phrase}})),this.config.path?this.eventActionService.processNavigateAction({type:E.H.NAVIGATE,path:this.config.path,params:t},this):(0,d.CV)(this.router,t)}}focus(t){return t&&t.preventDefault(),this.searched=this.input.nativeElement.value.trim().length>0,this.input.nativeElement.focus(),this.elementRef.nativeElement.classList.add("focus"),!1}focusOrSearch(t){t&&t.preventDefault();const n=this.input.nativeElement.value.trim();n.length>0&&n!==this.phrase?this.onSearch():this.focus()}onInput(t){this.searched=this.input.nativeElement.value.length>0}onBlur(t){setTimeout(()=>{this.input.nativeElement.value=this.phrase,this.searched=this.phrase.length>0;try{this.changeDetectorRef.detectChanges()}catch(n){console.warn("Error in change detection of Blur event",n)}},100),this.elementRef.nativeElement.classList.remove("focus"),this.searched=!1}onFocus(t){this.elementRef.nativeElement.classList.add("focus")}onKeyUp(t){13===(t.keyCode||t.which)?(this.input.nativeElement.blur(),this.onSearch()):8===(t.keyCode||t.which)&&(this.searched=this.input.nativeElement.value.length>0)}getSuggestions(){const t=this.input.nativeElement.value;return this.suggestions&&this.suggestions.filter(n=>0===n.toLowerCase().indexOf(t.toLowerCase()))}onClickSuggestion(t){this.input.nativeElement.value=t,this.phrase=t,this.onInput(),this.focus()}onSuggestionMousedown(t){return t.preventDefault(),!1}getId(){return null}}return(s=l).type="search-field",s.\u0275fac=function(t){return new(t||s)(e.rXU(p.Ix),e.rXU(e.zZn),e.rXU(e.aKT),e.rXU(p.nX),e.rXU(e.gRc),e.rXU(f.B),e.rXU(j.V),e.rXU(T.G),e.rXU(h.qQ),e.rXU(_.d),e.rXU(R.up))},s.\u0275cmp=e.VBU({type:s,selectors:[["storefront-search-field"]],viewQuery:function(t,n){if(1&t&&e.GBs(V,7),2&t){let i;e.mGM(i=e.lsd())&&(n.input=i.first)}},hostVars:2,hostBindings:function(t,n){2&t&&e.AVh("searched",n.searched)},features:[e.Jv_([f.B]),e.Vt3],decls:9,vars:6,consts:[["input",""],[1,"search-field-container"],["type","search",3,"click","input","focus","blur","keyup","placeholder"],["class","search-field-suggestions",4,"ngIf"],[1,"search-field-buttons"],[1,"icon","icon-search","search-btn",3,"mousedown","touchstart"],[1,"icon","icon-delete","reset-btn",3,"mousedown","touchstart"],[1,"search-field-suggestions"],["class","search-field-suggestion",3,"click","mousedown",4,"ngFor","ngForOf"],[1,"search-field-suggestion",3,"click","mousedown"]],template:function(t,n){if(1&t){const i=e.RV6();e.j41(0,"div",1)(1,"input",2,0),e.nI1(3,"storefrontTranslate"),e.nI1(4,"async"),e.bIt("click",function(o){return e.eBV(i),e.Njj(n.focus(o))})("input",function(o){return e.eBV(i),e.Njj(n.onInput(o))})("focus",function(o){return e.eBV(i),e.Njj(n.onFocus(o))})("blur",function(o){return e.eBV(i),e.Njj(n.onBlur(o))})("keyup",function(o){return e.eBV(i),e.Njj(n.onKeyUp(o))}),e.k0s(),e.DNE(5,I,2,1,"div",3),e.j41(6,"div",4)(7,"button",5),e.bIt("mousedown",function(o){return e.eBV(i),e.Njj(n.focusOrSearch(o))})("touchstart",function(o){return e.eBV(i),e.Njj(n.focusOrSearch(o))}),e.k0s(),e.j41(8,"button",6),e.bIt("mousedown",function(o){return e.eBV(i),e.Njj(n.onClickReset(o))})("touchstart",function(o){return e.eBV(i),e.Njj(n.onClickReset(o))}),e.k0s()()()}2&t&&(e.R7$(),e.Y8G("placeholder",e.bMT(4,4,e.bMT(3,2,"SEARCH_FIELD_PLACEHOLDER"))),e.R7$(4),e.Y8G("ngIf",n.getSuggestions()))},dependencies:[h.Sq,h.bT,h.Jj,B.D],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-search-field{display:block;position:relative;box-sizing:border-box;font-size:var(--searchFieldFontSize)}storefront-search-field *{font-size:inherit}storefront-search-field .search-field-container{position:relative}storefront-search-field .search-field-container input{width:100%;padding:var(--gutter)}storefront-search-field .search-field-container .search-field-buttons{position:absolute;top:0;right:0;display:flex;align-items:center;height:100%;z-index:1}storefront-search-field .search-field-container .search-field-buttons button{cursor:pointer;padding:var(--gutter)}storefront-search-field .search-field-container .search-field-buttons button.search-btn{display:block}storefront-search-field .search-field-container .search-field-buttons button.reset-btn{display:none;font-size:10px}storefront-search-field .search-field-container .search-field-suggestions{display:none;position:absolute;width:100%}storefront-search-field .search-field-container .search-field-suggestions .search-field-suggestion{padding:var(--gutter)}storefront-search-field.searched .search-field-buttons button.search-btn{display:none}storefront-search-field.searched .search-field-buttons button.reset-btn{display:block}storefront-search-field.focus .search-field-suggestions{display:block}\n'],encapsulation:2}),l})();var X=r(6483);let G=(()=>{var s;class l{}return(s=l).\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.$C({type:s}),s.\u0275inj=e.G2t({imports:[h.MD,X.h]}),l})();const U=N}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_search-field_search-field_module_ts"],{2561:(w,u,r)=>{r.r(u),r.d(u,{SearchFieldModule:()=>U,component:()=>D});var h=r(177),C=r(467),e=r(3953),f=r(8251),S=r(610),b=r(3178),F=r(1210);const y={param:"phrase"};var p=r(8075),E=r(9745),d=r(4559),j=r(9516),T=r(8004),_=r(1652),R=r(345),B=r(8448);const V=["input"];function I(s,l){if(1&s){const c=e.RV6();e.j41(0,"div",9),e.bIt("click",function(){const n=e.eBV(c).$implicit,i=e.XpG(2);return e.Njj(i.onClickSuggestion(n))})("mousedown",function(n){e.eBV(c);const i=e.XpG(2);return e.Njj(i.onSuggestionMousedown(n))}),e.EFF(1),e.k0s()}if(2&s){const c=l.$implicit;e.R7$(),e.JRh(c)}}function k(s,l){if(1&s&&(e.j41(0,"div",7),e.DNE(1,I,2,1,"div",8),e.k0s()),2&s){const c=e.XpG();e.R7$(),e.Y8G("ngForOf",c.getSuggestions())}}let N=(()=>{var s;class l extends F.${constructor(t,n,i,a,o,M,g,z,m,v,G){super(n,i,g,m,v),this.router=t,this.injector=n,this.elementRef=i,this.route=a,this.changeDetectorRef=o,this.store=M,this.contextService=g,this.eventActionService=z,this.document=m,this.globalService=v,this.sanitizer=G,this.defaultConfig={...y},this.searched=!1,this.phrase="",this.suggestions=null}ngOnInit(){super.ngOnInit();let t=!1;this.store.subscribe(this.route.queryParams,n=>{if(!t&&n&&this.config&&this.config.param&&n[this.config.param]){const i=n[this.config.param];let a=this.sanitizer.sanitize(e.WPN.HTML,i)||"";a=this.decodeImportantChars(a),a!==i&&(t=!0,this.router.navigate([],{relativeTo:this.route,queryParams:{...n,[this.config.param]:a},queryParamsHandling:"merge"}).then(()=>{t=!1})),this.input.nativeElement.value=this.phrase=a,this.searched=this.input.nativeElement.value.trim().length>0}})}decodeImportantChars(t){return t.replace(/ä/g,"\xe4").replace(/ö/g,"\xf6").replace(/ü/g,"\xfc").replace(/ß/g,"\xdf").replace(/Ä/g,"\xc4").replace(/Ö/g,"\xd6").replace(/Ü/g,"\xdc").replace(/"/g,'"').replace(/&/g,"&").replace(/“/g,"\u201c").replace(/”/g,"\u201d").replace(/£/g,"\xa3").replace(/§/g,"\xa7").replace(/€/g,"\u20ac")}onConfigChanges(){var t=this;return(0,C.A)(function*(){if(t.config.param&&t.context[t.config.param]&&(t.phrase=t.context[t.config.param],t.input.nativeElement.value=t.phrase,t.searched=t.input.nativeElement.value.trim().length>0),t.config.suggestions)try{t.suggestions=yield(0,b.hI)(t.config.suggestions.url)}catch{console.warn("Error fetching search suggestions")}t.changeDetectorRef.markForCheck()})()}onClickReset(t){this.phrase="",this.input.nativeElement.value=this.phrase,this.input.nativeElement.blur(),this.searched=!1,this.config.param&&(0,p.CV)(this.router,{[this.config.param]:null})}onSearch(){if(this.config.param&&this.input.nativeElement.value.trim().length>0){this.phrase=this.input.nativeElement.value,this.searched=!0;const t={...this.config.params,[this.config.param]:this.phrase};this.config.publicationType&&(t.publicationType=this.config.publicationType),this.store.dispatch((0,S.k4)({url:window.location.href,key:"SEARCH_PERFORMED",params:{phrase:this.phrase}})),this.config.path?this.eventActionService.processNavigateAction({type:E.H.NAVIGATE,path:this.config.path,params:t},this):(0,p.CV)(this.router,t)}}focus(t){return t&&t.preventDefault(),this.searched=this.input.nativeElement.value.trim().length>0,this.input.nativeElement.focus(),this.elementRef.nativeElement.classList.add("focus"),!1}focusOrSearch(t){t&&t.preventDefault();const n=this.input.nativeElement.value.trim();n.length>0&&n!==this.phrase?this.onSearch():this.focus()}onInput(t){this.searched=this.input.nativeElement.value.length>0}onBlur(t){setTimeout(()=>{this.input.nativeElement.value=this.phrase,this.searched=this.phrase.length>0;try{this.changeDetectorRef.detectChanges()}catch(n){console.warn("Error in change detection of Blur event",n)}},100),this.elementRef.nativeElement.classList.remove("focus"),this.searched=!1}onFocus(t){this.elementRef.nativeElement.classList.add("focus")}onKeyUp(t){13===(t.keyCode||t.which)?(this.input.nativeElement.blur(),this.onSearch()):8===(t.keyCode||t.which)&&(this.searched=this.input.nativeElement.value.length>0)}getSuggestions(){const t=this.input.nativeElement.value;return this.suggestions&&this.suggestions.filter(n=>0===n.toLowerCase().indexOf(t.toLowerCase()))}onClickSuggestion(t){this.input.nativeElement.value=t,this.phrase=t,this.onInput(),this.focus()}onSuggestionMousedown(t){return t.preventDefault(),!1}getId(){return null}}return(s=l).type="search-field",s.\u0275fac=function(t){return new(t||s)(e.rXU(d.Ix),e.rXU(e.zZn),e.rXU(e.aKT),e.rXU(d.nX),e.rXU(e.gRc),e.rXU(f.B),e.rXU(j.V),e.rXU(T.G),e.rXU(h.qQ),e.rXU(_.d),e.rXU(R.up))},s.\u0275cmp=e.VBU({type:s,selectors:[["storefront-search-field"]],viewQuery:function(t,n){if(1&t&&e.GBs(V,7),2&t){let i;e.mGM(i=e.lsd())&&(n.input=i.first)}},hostVars:2,hostBindings:function(t,n){2&t&&e.AVh("searched",n.searched)},features:[e.Jv_([f.B]),e.Vt3],decls:9,vars:6,consts:[["input",""],[1,"search-field-container"],["type","search",3,"click","input","focus","blur","keyup","placeholder"],["class","search-field-suggestions",4,"ngIf"],[1,"search-field-buttons"],[1,"icon","icon-search","search-btn",3,"mousedown","touchstart"],[1,"icon","icon-delete","reset-btn",3,"mousedown","touchstart"],[1,"search-field-suggestions"],["class","search-field-suggestion",3,"click","mousedown",4,"ngFor","ngForOf"],[1,"search-field-suggestion",3,"click","mousedown"]],template:function(t,n){if(1&t){const i=e.RV6();e.j41(0,"div",1)(1,"input",2,0),e.nI1(3,"storefrontTranslate"),e.nI1(4,"async"),e.bIt("click",function(o){return e.eBV(i),e.Njj(n.focus(o))})("input",function(o){return e.eBV(i),e.Njj(n.onInput(o))})("focus",function(o){return e.eBV(i),e.Njj(n.onFocus(o))})("blur",function(o){return e.eBV(i),e.Njj(n.onBlur(o))})("keyup",function(o){return e.eBV(i),e.Njj(n.onKeyUp(o))}),e.k0s(),e.DNE(5,k,2,1,"div",3),e.j41(6,"div",4)(7,"button",5),e.bIt("mousedown",function(o){return e.eBV(i),e.Njj(n.focusOrSearch(o))})("touchstart",function(o){return e.eBV(i),e.Njj(n.focusOrSearch(o))}),e.k0s(),e.j41(8,"button",6),e.bIt("mousedown",function(o){return e.eBV(i),e.Njj(n.onClickReset(o))})("touchstart",function(o){return e.eBV(i),e.Njj(n.onClickReset(o))}),e.k0s()()()}2&t&&(e.R7$(),e.Y8G("placeholder",e.bMT(4,4,e.bMT(3,2,"SEARCH_FIELD_PLACEHOLDER"))),e.R7$(4),e.Y8G("ngIf",n.getSuggestions()))},dependencies:[h.Sq,h.bT,h.Jj,B.D],styles:['.aspectRatioBase{position:relative;display:block}.aspectRatioBase:before{content:"";position:relative;display:block}.aspectRatioBase>*{position:absolute}storefront-search-field{display:block;position:relative;box-sizing:border-box;font-size:var(--searchFieldFontSize)}storefront-search-field *{font-size:inherit}storefront-search-field .search-field-container{position:relative}storefront-search-field .search-field-container input{width:100%;padding:var(--gutter)}storefront-search-field .search-field-container .search-field-buttons{position:absolute;top:0;right:0;display:flex;align-items:center;height:100%;z-index:1}storefront-search-field .search-field-container .search-field-buttons button{cursor:pointer;padding:var(--gutter)}storefront-search-field .search-field-container .search-field-buttons button.search-btn{display:block}storefront-search-field .search-field-container .search-field-buttons button.reset-btn{display:none;font-size:10px}storefront-search-field .search-field-container .search-field-suggestions{display:none;position:absolute;width:100%}storefront-search-field .search-field-container .search-field-suggestions .search-field-suggestion{padding:var(--gutter)}storefront-search-field.searched .search-field-buttons button.search-btn{display:none}storefront-search-field.searched .search-field-buttons button.reset-btn{display:block}storefront-search-field.focus .search-field-suggestions{display:block}\n'],encapsulation:2}),l})();var X=r(6483);let U=(()=>{var s;class l{}return(s=l).\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.$C({type:s}),s.\u0275inj=e.G2t({imports:[h.MD,X.h]}),l})();const D=N}}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/files",
3
- "version": "10.22.0",
3
+ "version": "10.24.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {},