mealz-components 1.2.4 → 1.2.5

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.
@@ -1 +1 @@
1
- .mealz-catalog-favorites .mealz-catalog-favorites__list__loader{font-size:20px;text-align:center}.mealz-catalog-favorites .hidden{display:none}.mealz-catalog-favorites .mealz-catalog-toolbar:not(.sticking){flex-direction:row;gap:0px}
1
+ .mealz-catalog-favorites .hidden{display:none}.mealz-catalog-favorites .mealz-catalog-toolbar:not(.sticking){flex-direction:row;gap:0px}
@@ -1 +1 @@
1
- import{t as h}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{C as u}from"../catalog-load-more.min.js";import{h as m}from"../../assets/session-handler-BPS5vj92.js";import"../../assets/no-shadow-element-CaVIVF-o.js";import"../../assets/OperatorSubscriber-BPZabEAm.js";import"../../assets/mapOneOrManyArgs-2FiDGdaS.js";import"../../assets/async-B_IhBgzg.js";var p=Object.defineProperty,f=Object.getOwnPropertyDescriptor,v=(t,e,i,a)=>{for(var s=a>1?void 0:a?f(e,i):e,r=t.length-1,o;r>=0;r--)(o=t[r])&&(s=(a?o(e,i,s):o(s))||s);return a&&s&&p(e,i,s),s};let l=class extends u{constructor(){super(...arguments),this.retryCount=0,this.maxRetries=30}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.user.isAuthenticated().subscribe(t=>{this.isLogged=t,this.updateDOM()}))}disconnectedCallback(){super.disconnectedCallback()}render(){var c;const t=(c=this.attributes["starting-data"])==null?void 0:c.value;if(!t||(this.favorites=this.querySelector(".mealz-catalog-favorites__list"),!this.favorites))return;this.subscriptions.push(window.mealzInternal.user.isAuthenticated().subscribe(g=>{this.isLogged=g,this.updateDOM()}));const e=this.querySelector(".mealz-catalog__list");if(!e)return;const{pageSize:i,storeId:a,loadMoreURL:s,displayRecipeVariant:r,search:o,sessionId:n,path:d}=JSON.parse(t);m(n),this.analyticsPath=d,this.sendPageViewEvent(),this.loadMoreRecipesOnScroll({displayRecipeVariant:r,loadMoreURL:s,sessionId:n,pageSize:i,storeId:a,packageId:null,search:o,listHTML:e}),this.removeAttribute("starting-data")}updateDOM(){const t=this.querySelector(".mealz-catalog-favorites__list__loader"),e=this.querySelector(".mealz-catalog-favorites__list__not-logged"),i=this.querySelector(".mealz-catalog-favorites__list__logged");!t||!e||!i||(t.classList.add("hidden"),e.classList.toggle("hidden",this.isLogged),i.classList.toggle("hidden",!this.isLogged))}sendPageViewEvent(){window.mealzInternal?(window.mealzInternal.analytics.sendEvent("pageview",this.analyticsPath,{}),this.retryCount=0):this.retryCount<this.maxRetries&&(this.retryCount++,setTimeout(()=>this.sendPageViewEvent(),10))}};l=v([h("mealz-catalog-favorites")],l);customElements.get("mealz-catalog-favorites")||customElements.define("mealz-catalog-favorites",l);
1
+ import{t as d}from"../../assets/custom-element-BhZVzxrc.js";import"../../assets/lit-element-4gw3YGga.js";import{C as g}from"../catalog-load-more.min.js";import{h}from"../../assets/session-handler-BPS5vj92.js";import{o as p,c as f}from"../../assets/OperatorSubscriber-BPZabEAm.js";import"../../assets/no-shadow-element-CaVIVF-o.js";import"../../assets/mapOneOrManyArgs-2FiDGdaS.js";import"../../assets/async-B_IhBgzg.js";function m(t,e){return p(function(i,a){var s=0;i.subscribe(f(a,function(r){return t.call(e,r,s++)&&a.next(r)}))})}function v(t){return m(function(e,i){return t<=i})}var _=Object.defineProperty,b=Object.getOwnPropertyDescriptor,w=(t,e,i,a)=>{for(var s=a>1?void 0:a?b(e,i):e,r=t.length-1,o;r>=0;r--)(o=t[r])&&(s=(a?o(e,i,s):o(s))||s);return a&&s&&_(e,i,s),s};let n=class extends g{constructor(){super(...arguments),this.retryCount=0,this.maxRetries=30}connectedCallback(){super.connectedCallback(),this.subscriptions.push(window.mealzInternal.user.isAuthenticated().pipe(v(1)).subscribe(t=>{this.isLogged=t,this.updateDOM()}))}disconnectedCallback(){super.disconnectedCallback()}render(){var c;const t=(c=this.attributes["starting-data"])==null?void 0:c.value;if(!t||(this.favorites=this.querySelector(".mealz-catalog-favorites__list"),!this.favorites))return;const e=this.querySelector(".mealz-catalog__list");if(!e)return;const{pageSize:i,storeId:a,loadMoreURL:s,displayRecipeVariant:r,search:o,sessionId:l,path:u}=JSON.parse(t);h(l),this.analyticsPath=u,this.sendPageViewEvent(),this.loadMoreRecipesOnScroll({displayRecipeVariant:r,loadMoreURL:s,sessionId:l,pageSize:i,storeId:a,packageId:null,search:o,listHTML:e}),this.removeAttribute("starting-data")}updateDOM(){const t=this.querySelector(".mealz-catalog-favorites__list__not-logged"),e=this.querySelector(".mealz-catalog-favorites__list__logged");!t||!e||(t.classList.toggle("hidden",this.isLogged),e.classList.toggle("hidden",!this.isLogged))}sendPageViewEvent(){window.mealzInternal?(window.mealzInternal.analytics.sendEvent("pageview",this.analyticsPath,{}),this.retryCount=0):this.retryCount<this.maxRetries&&(this.retryCount++,setTimeout(()=>this.sendPageViewEvent(),10))}};n=w([d("mealz-catalog-favorites")],n);customElements.get("mealz-catalog-favorites")||customElements.define("mealz-catalog-favorites",n);
@@ -1 +1 @@
1
- :root{--m-history-order-width: var(--miam-history-order-width, var(--miam-catalog-card-width, 308px))}mealz-catalog-history .mealz-catalog-favorites__list__loader{font-size:20px;text-align:center}mealz-catalog-history .hidden{display:none}mealz-catalog-history .mealz-catalog__list,mealz-catalog-history .mealz-catalog__content .mealz-catalog__list{grid-template-columns:repeat(auto-fill,var(--m-history-order-width, 308px))}@media (min-width: 375px) and (max-width: 712px){mealz-catalog-history .mealz-catalog__list{grid-template-columns:repeat(auto-fill,var(--m-history-order-width, 308px))}}mealz-catalog-history .mealz-catalog-toolbar:not(.sticking){flex-direction:row;gap:0px}
1
+ :root{--m-history-order-width: var(--miam-history-order-width, var(--miam-catalog-card-width, 308px))}mealz-catalog-history .hidden{display:none}mealz-catalog-history .mealz-catalog__list,mealz-catalog-history .mealz-catalog__content .mealz-catalog__list{grid-template-columns:repeat(auto-fill,var(--m-history-order-width, 308px))}@media (min-width: 375px) and (max-width: 712px){mealz-catalog-history .mealz-catalog__list{grid-template-columns:repeat(auto-fill,var(--m-history-order-width, 308px))}}mealz-catalog-history .mealz-catalog-toolbar:not(.sticking){flex-direction:row;gap:0px}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mealz-components",
3
3
  "type": "module",
4
- "version": "1.2.4",
4
+ "version": "1.2.5",
5
5
  "main": "./dist/mealz-components.js",
6
6
  "module": "./dist/mealz-components.js",
7
7
  "scripts": {