mealz-components 1.3.12 → 2.0.0-beta.1
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/dist/accordion/accordion.css +1 -0
- package/dist/accordion.css +56 -0
- package/dist/add-to-cart-cta/add-to-cart-cta.css +1 -0
- package/dist/add-to-cart-cta/add-to-cart-cta.min.js +7 -0
- package/dist/all-recipes-banner/all-recipes-banner.css +1 -0
- package/dist/assets/OperatorSubscriber-C_ZC-4p2.js +1 -0
- package/dist/assets/async-Cf5pIG6K.js +1 -0
- package/dist/assets/capitalize-DUAqYmp4.js +1 -0
- package/dist/assets/combineLatest-ZcJd71-W.js +1 -0
- package/dist/assets/debounceTime-Dqha8z_N.js +1 -0
- package/dist/assets/delay-DY9ohHpd.js +1 -0
- package/dist/assets/distinctUntilChanged-C5xhZT8-.js +1 -0
- package/dist/assets/empty-DzB-G1O3.js +1 -0
- package/dist/assets/executeSchedule-BoZ8McHf.js +1 -0
- package/dist/assets/filter-CCrCJ0Ez.js +1 -0
- package/dist/assets/from-BJlgdPzK.js +1 -0
- package/dist/assets/http-_HLok9_q.js +1 -0
- package/dist/assets/innerFrom-cJ8wLVnp.js +1 -0
- package/dist/assets/map-CtoF0MFx.js +1 -0
- package/dist/assets/mapOneOrManyArgs-BgYvpJCA.js +1 -0
- package/dist/assets/merge-CfUUBPqp.js +1 -0
- package/dist/assets/mergeMap-DkeMJrVP.js +1 -0
- package/dist/assets/no-shadow-element-Dckeu5Ol.js +21 -0
- package/dist/assets/of-CGDeMeoh.js +1 -0
- package/dist/assets/price-3QEU2vDV.js +1 -0
- package/dist/assets/price-utils-BRFZa-3D.js +1 -0
- package/dist/assets/product-card-_1qE9t-X.js +189 -0
- package/dist/assets/promotion-badge-DCM0C5Lw.js +12 -0
- package/dist/assets/property-B_Up5EGr.js +5 -0
- package/dist/assets/recipe-BwGs-blm.js +1 -0
- package/dist/assets/session-handler-BjExGUaE.js +1 -0
- package/dist/assets/skipWhile-BpCW6MT3.js +1 -0
- package/dist/assets/state-Dg5rn9XH.js +5 -0
- package/dist/{store-locator/store-locator.min.js → assets/store-locator-DdG34z7_.js} +34 -42
- package/dist/assets/switchMap-_eqjHrlq.js +1 -0
- package/dist/assets/take-C-_8_Rq7.js +1 -0
- package/dist/assets/tap-C7Bbgrv8.js +1 -0
- package/dist/assets/timer-FQ7WMtFD.js +1 -0
- package/dist/assets/unsafe-html-ZfqpUwaC.js +9 -0
- package/dist/assets/viewport-listener-VXtYxJHH.js +1 -0
- package/dist/basket-preview-product.css +107 -0
- package/dist/basket-preview.css +193 -0
- package/dist/basket-transfer-modal/basket-transfer-modal.css +1 -0
- package/dist/basket-transfer-modal/basket-transfer-modal.min.js +41 -0
- package/dist/basket-transfer-modal.css +13 -0
- package/dist/breadcrumb/breadcrumb.css +1 -0
- package/dist/catalog/basket-preview/basket-preview-product/basket-preview-product.css +1 -0
- package/dist/catalog/basket-preview/basket-preview.css +1 -0
- package/dist/catalog/basket-preview/basket-preview.min.js +228 -0
- package/dist/catalog/catalog-category/catalog-category.min.js +1 -1
- package/dist/catalog/catalog-favorites/catalog-favorites.min.js +1 -1
- package/dist/catalog/catalog-history/catalog-history.css +1 -1
- package/dist/catalog/catalog-history/catalog-history.min.js +1 -1
- package/dist/catalog/catalog-home/catalog-home.css +1 -1
- package/dist/catalog/catalog-home/catalog-home.min.js +1 -1
- package/dist/catalog/catalog-list/catalog-list.min.js +1 -1
- package/dist/catalog/catalog-load-more.min.js +1 -1
- package/dist/catalog/catalog-tabs/catalog-tabs.css +1 -1
- package/dist/catalog/catalog-tabs/catalog-tabs.min.js +1 -1
- package/dist/catalog/catalog-toolbar/catalog-toolbar.css +1 -1
- package/dist/catalog/catalog-toolbar/catalog-toolbar.min.js +1 -1
- package/dist/catalog/catalog.css +1 -1
- package/dist/catalog/my-meals-button/my-meals-button.css +1 -1
- package/dist/catalog/my-meals-button/my-meals-button.min.js +1 -1
- package/dist/catalog-history.css +39 -0
- package/dist/counter/counter.css +1 -0
- package/dist/counter/counter.min.js +47 -0
- package/dist/counter.css +55 -0
- package/dist/details-footer.css +117 -0
- package/dist/details-infos.css +55 -0
- package/dist/details-ingredients.css +66 -0
- package/dist/details-steps.css +65 -0
- package/dist/drawer/drawer.css +1 -1
- package/dist/drawer/drawer.min.js +14 -7
- package/dist/drawer-view-swapper/drawer-view-swapper.css +1 -0
- package/dist/drawer-view-swapper/drawer-view-swapper.min.js +92 -0
- package/dist/drawer-view-swapper.css +45 -0
- package/dist/history-drawer/history-drawer.min.js +1 -0
- package/dist/history-order/history-order.css +1 -1
- package/dist/history-order/history-order.min.js +1 -1
- package/dist/history-order-expanded/history-order-expanded.min.js +1 -1
- package/dist/last-order-badge/last-order-badge.css +1 -0
- package/dist/last-order-badge/last-order-badge.min.js +13 -0
- package/dist/last-order-badge.css +15 -0
- package/dist/last-order-modal/last-order-modal.css +1 -0
- package/dist/last-order-modal/last-order-modal.min.js +17 -0
- package/dist/last-order-modal.css +23 -0
- package/dist/legal-notice/legal-notice.css +1 -0
- package/dist/legal-notice.css +33 -0
- package/dist/like-button/like-button.css +1 -1
- package/dist/like-button/like-button.min.js +1 -1
- package/dist/modal/modal.css +1 -0
- package/dist/modal/modal.min.js +18 -0
- package/dist/modal.css +56 -0
- package/dist/no-pos-selected.css +24 -0
- package/dist/no-supplier-onboarding/no-supplier-onboarding.css +1 -0
- package/dist/no-supplier-onboarding.css +150 -0
- package/dist/order-again/order-again.css +1 -0
- package/dist/order-again/order-again.min.js +20 -0
- package/dist/order-again.css +39 -0
- package/dist/out-of-stock-overlay/out-of-stock-overlay.css +1 -0
- package/dist/out-of-stock-overlay.css +24 -0
- package/dist/planner/planner-abandon-modal/planner-abandon-modal.css +1 -0
- package/dist/planner/planner-abandon-modal/planner-abandon-modal.min.js +14 -0
- package/dist/planner/planner-budget-gauge/planner-budget-gauge.css +1 -0
- package/dist/planner/planner-budget-gauge/planner-budget-gauge.min.js +1 -0
- package/dist/planner/planner-catalog/planner-catalog.css +1 -0
- package/dist/planner/planner-catalog/planner-catalog.min.js +3 -0
- package/dist/planner/planner-current-menu/planner-current-menu.css +1 -0
- package/dist/planner/planner-current-menu/planner-current-menu.min.js +1 -0
- package/dist/planner/planner-current-menu-modal/planner-current-menu-modal.css +1 -0
- package/dist/planner/planner-current-menu-modal/planner-current-menu-modal.min.js +17 -0
- package/dist/planner/planner-dashboard/planner-dashboard.css +1 -0
- package/dist/planner/planner-dashboard/planner-dashboard.min.js +1 -0
- package/dist/planner/planner-form/planner-form.css +1 -0
- package/dist/planner/planner-form/planner-form.min.js +62 -0
- package/dist/planner/planner-menu-option/planner-menu-option.css +1 -0
- package/dist/planner/planner-menu-option/planner-menu-option.min.js +1 -0
- package/dist/planner/planner-open-catalog-modal/planner-open-catalog-modal.css +1 -0
- package/dist/planner/planner-open-catalog-modal/planner-open-catalog-modal.min.js +18 -0
- package/dist/planner/planner-recipe-card/planner-recipe-card.css +1 -0
- package/dist/planner/planner-recipe-card/planner-recipe-card.min.js +1 -0
- package/dist/planner/planner-recipe-list/planner-recipe-list.css +1 -0
- package/dist/planner/planner-recipe-list/planner-recipe-list.min.js +1 -0
- package/dist/planner/planner-recipe-suggestion/planner-recipe-suggestion.css +1 -0
- package/dist/planner/planner-recipe-suggestion/planner-recipe-suggestion.min.js +1 -0
- package/dist/planner/to-basket-loader/to-basket-loader.css +1 -0
- package/dist/planner/to-basket-loader/to-basket-loader.min.js +20 -0
- package/dist/planner-abandon-modal.css +31 -0
- package/dist/planner-banner/planner-banner.css +1 -0
- package/dist/planner-card-link/planner-card-link.css +1 -0
- package/dist/planner-current-menu-modal.css +49 -0
- package/dist/planner-form.css +178 -0
- package/dist/planner-open-catalog-modal.css +51 -0
- package/dist/preferences/preferences-search/preferences-search.css +1 -0
- package/dist/preferences/preferences.css +1 -0
- package/dist/preferences/preferences.min.js +177 -0
- package/dist/preferences-search.css +69 -0
- package/dist/price/price.css +1 -0
- package/dist/price/price.min.js +12 -0
- package/dist/price.css +10 -0
- package/dist/product-addition/product-addition.css +1 -0
- package/dist/product-addition.css +16 -0
- package/dist/product-badges/product-badges.css +1 -0
- package/dist/product-badges.css +12 -0
- package/dist/product-card/product-card-planner.css +1 -0
- package/dist/product-card/product-card-skeleton/product-card-skeleton.css +1 -0
- package/dist/product-card/product-card.css +1 -0
- package/dist/product-card-planner.css +217 -0
- package/dist/product-card-skeleton.css +44 -0
- package/dist/product-card.css +208 -0
- package/dist/products-picker/products-picker.css +1 -0
- package/dist/products-picker.css +104 -0
- package/dist/promotion-badge/promotion-badge.css +1 -0
- package/dist/promotion-badge.css +18 -0
- package/dist/promotions-banner/promotions-banner.css +1 -1
- package/dist/recipe-addon.css +33 -0
- package/dist/recipe-card/recipe-card.css +1 -1
- package/dist/recipe-card/recipe-card.min.js +1 -1
- package/dist/recipe-card-cta/recipe-card-cta.css +1 -1
- package/dist/recipe-card-cta/recipe-card-cta.min.js +1 -1
- package/dist/recipe-details/details-footer/details-footer.css +1 -0
- package/dist/recipe-details/details-infos/details-infos.css +1 -0
- package/dist/recipe-details/details-ingredients/details-ingredients.css +1 -0
- package/dist/recipe-details/details-steps/details-steps.css +1 -0
- package/dist/recipe-details/no-pos-selected/no-pos-selected.css +1 -0
- package/dist/recipe-details/recipe-addon/recipe-addon.css +1 -0
- package/dist/recipe-details/recipe-details.css +1 -0
- package/dist/recipe-details/recipe-details.min.js +698 -0
- package/dist/recipe-details/sponsor-block/sponsor-block.css +1 -0
- package/dist/recipe-details.css +346 -0
- package/dist/recipe-pricing/recipe-pricing.css +1 -1
- package/dist/recipe-pricing/recipe-pricing.min.js +1 -1
- package/dist/recipe-promotion-badge/recipe-promotion-badge.css +1 -1
- package/dist/replace-item/replace-item-card/replace-item-card.css +1 -0
- package/dist/replace-item/replace-item-card/replace-item-card.min.js +60 -0
- package/dist/replace-item/replace-item.css +1 -0
- package/dist/replace-item/replace-item.min.js +96 -0
- package/dist/replace-item-card-planner.css +80 -0
- package/dist/replace-item-card.css +75 -0
- package/dist/replace-item-planner/replace-item-card-planner/replace-item-card-planner.css +1 -0
- package/dist/replace-item-planner/replace-item-card-planner/replace-item-card-planner.min.js +56 -0
- package/dist/replace-item-planner/replace-item-planner.css +1 -0
- package/dist/replace-item-planner/replace-item-planner.min.js +87 -0
- package/dist/replace-item-planner.css +150 -0
- package/dist/replace-item.css +150 -0
- package/dist/slider-tabs/slider-tabs.css +1 -0
- package/dist/slider-tabs/slider-tabs.min.js +14 -0
- package/dist/slider-tabs.css +58 -0
- package/dist/sponsor-block.css +226 -0
- package/dist/store-indicator/store-indicator.css +1 -0
- package/dist/store-indicator/store-indicator.min.js +14 -0
- package/dist/store-indicator.css +41 -0
- package/dist/store-locator-drawer/store-locator-drawer.min.js +43 -0
- package/dist/styles/history-drawer.css +1 -0
- package/dist/styles/skeleton.css +1 -0
- package/dist/to-basket-loader.css +157 -0
- package/dist/unavailable-badge/unavailable-badge.css +1 -0
- package/dist/unavailable-badge.css +25 -0
- package/package.json +10 -5
- package/dist/assets/OperatorSubscriber-CcnWrfoX.js +0 -3
- package/dist/assets/Subject-rBVVIydv.js +0 -1
- package/dist/assets/async-CcgIcE7w.js +0 -1
- package/dist/assets/lit-element-4gw3YGga.js +0 -19
- package/dist/assets/no-shadow-element-CaVIVF-o.js +0 -1
- package/dist/assets/session-handler-BPS5vj92.js +0 -1
- package/dist/assets/viewport-listener-DAXSJTi3.js +0 -1
- package/dist/catalog/catalog-breadcrumb/catalog-breadcrumb.css +0 -1
- package/dist/catalog/catalog-breadcrumb/catalog-breadcrumb.min.js +0 -1
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{i as u,h as m,a as c,k as a}from"./no-shadow-element-Dckeu5Ol.js";import{t as g}from"./custom-element-BhZVzxrc.js";import{n as p}from"./property-B_Up5EGr.js";import{r as b}from"./state-Dg5rn9XH.js";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const f=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,s),s);/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/function v(t){return
|
|
10
|
-
|
|
11
|
-
* Copyright 2017 Google LLC
|
|
12
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const w=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,s),s);/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright 2017 Google LLC
|
|
16
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/function y(t,e){return(s,i,o)=>{const a=r=>{var p;return((p=r.renderRoot)==null?void 0:p.querySelector(t))??null};return w(s,i,{get(){return a(this)}})}}class S{get extId(){return this.attributes["ext-id"]}}var C=Object.defineProperty,L=Object.getOwnPropertyDescriptor,d=(t,e,s,i)=>{for(var o=i>1?void 0:i?L(e,s):e,a=t.length-1,r;a>=0;a--)(r=t[a])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&C(e,s,o),o};let l=class extends f{constructor(){var t,e,s,i,o,a;super(...arguments),this.selectedRadius=50,this.getByAddress=(e=(t=window.mealz)==null?void 0:t.pos)==null?void 0:e.getByAddress,this.getByCoordinates=(i=(s=window.mealz)==null?void 0:s.pos)==null?void 0:i.getByCoordinates,this.getAffiliateSuppliers=(a=(o=window.mealz)==null?void 0:o.supplier)==null?void 0:a.getAffiliateSuppliers,this._posList=[],this._markers=[],this._searchingPos=!1,this._searchSubmitted=!1,this._previousSearchMethod=()=>{},this._suppliers=[],this._selectedSuppliers=[],this._showPosList=!1,this._posSelected=!1,this.subscriptions=[]}set geolocationCoordinates(t){var e,s;this._geolocationCoordinates=t,(e=t==null?void 0:t.coords)!=null&&e.latitude&&((s=t==null?void 0:t.coords)!=null&&s.longitude)&&this.setGeolocation()}get geolocationCoordinates(){return this._geolocationCoordinates}_nameOfStore(t){return`${t.supplier.attributes.name} - ${t.attributes.name}`}connectedCallback(){super.connectedCallback(),this.initLeaflet(),this.fetchSuppliers(),this.initEvents()}disconnectedCallback(){this.subscriptions.forEach(t=>t.unsubscribe()),super.disconnectedCallback(),this._leafletCss.remove(),this._miamDs.remove(),this._leafletJs.remove()}render(){if(this.show)return this.posSelectionTemplate()}firstUpdated(){this._posSelected=!1,this.loadMap(),this.geolocationTimeout(),this.listenFormSubmit()}posSelectionTemplate(){return n`
|
|
18
|
-
<div class="wrapper miam-ds-body">
|
|
9
|
+
*/function _(t,e){return(s,i,o)=>{const n=d=>{var h;return((h=d.renderRoot)==null?void 0:h.querySelector(t))??null};return f(s,i,{get(){return n(this)}})}}class x{get extId(){return this.attributes["ext-id"]}}var v=Object.defineProperty,w=Object.getOwnPropertyDescriptor,r=(t,e,s,i)=>{for(var o=i>1?void 0:i?w(e,s):e,n=t.length-1,d;n>=0;n--)(d=t[n])&&(o=(i?d(e,s,o):d(o))||o);return i&&o&&v(e,s,o),o};let l=class extends m{constructor(){var t,e,s,i,o,n;super(...arguments),this.selectedRadius=50,this.getByAddress=(e=(t=c)==null?void 0:t.pos)==null?void 0:e.getByAddress,this.getByCoordinates=(i=(s=c)==null?void 0:s.pos)==null?void 0:i.getByCoordinates,this.getAffiliateSuppliers=(n=(o=c)==null?void 0:o.supplier)==null?void 0:n.getAffiliateSuppliers,this._posList=[],this._markers=[],this._searchingPos=!1,this._searchSubmitted=!1,this._previousSearchMethod=()=>{},this._suppliers=[],this._selectedSuppliers=[],this._showPosList=!1,this._posSelected=!1,this.subscriptions=[]}set geolocationCoordinates(t){var e,s;this._geolocationCoordinates=t,(e=t==null?void 0:t.coords)!=null&&e.latitude&&((s=t==null?void 0:t.coords)!=null&&s.longitude)&&this.setGeolocation()}get geolocationCoordinates(){return this._geolocationCoordinates}_nameOfStore(t){return`${t.supplier.attributes.name} - ${t.attributes.name}`}connectedCallback(){super.connectedCallback(),this.initLeaflet(),this.fetchSuppliers(),this.initEvents()}disconnectedCallback(){this.subscriptions.forEach(t=>t.unsubscribe()),super.disconnectedCallback(),this._leafletCss.remove(),this._miamDs.remove(),this._leafletJs.remove()}render(){if(this.show)return this.posSelectionTemplate()}firstUpdated(){this._posSelected=!1,this.loadMap(),this.geolocationTimeout(),this.listenFormSubmit()}posSelectionTemplate(){return a`
|
|
10
|
+
<div class="wrapper mealz-ds-body">
|
|
19
11
|
<div class="pos-selection">
|
|
20
12
|
<div class="title">
|
|
21
13
|
<button @click=${()=>this.dispatchShow(!1)}><</button>
|
|
@@ -26,16 +18,16 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
26
18
|
${this.geolocButtonTemplate()}
|
|
27
19
|
<input required class="address-input" type="text" name="address"
|
|
28
20
|
placeholder="Votre code postal ou ville">
|
|
29
|
-
<button type="submit" class="
|
|
21
|
+
<button type="submit" class="mealz-ds-button primary search-address-button">OK</button>
|
|
30
22
|
</div>
|
|
31
23
|
${this.selectSupplierTemplate()}
|
|
32
24
|
</form>
|
|
33
25
|
${this.posListTemplate()}
|
|
34
|
-
${this._posList.length>0?
|
|
26
|
+
${this._posList.length>0?a`
|
|
35
27
|
<div id="mobile-buttons-wrapper"
|
|
36
28
|
class="${this._showPosList?"mobile-buttons-wrapper__see-map":"mobile-buttons-wrapper__see-list"}">
|
|
37
29
|
<button @click=${()=>this.togglePosList(this._showPosList)}
|
|
38
|
-
class="
|
|
30
|
+
class="mealz-ds-button primary hide-pos-button">
|
|
39
31
|
${this.getButtonLabel()}
|
|
40
32
|
</button>
|
|
41
33
|
</div>`:""}
|
|
@@ -43,37 +35,37 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
43
35
|
</div>
|
|
44
36
|
${this.posMapTemplate()}
|
|
45
37
|
</div>
|
|
46
|
-
`}geolocButtonTemplate(){var e,s,i,o;let t;if(this.geolocationCoordinates===void 0)t=
|
|
47
|
-
<div class="
|
|
38
|
+
`}geolocButtonTemplate(){var e,s,i,o;let t;if(this.geolocationCoordinates===void 0)t=a`
|
|
39
|
+
<div class="mealz-ds-loader"></div>`;else if((s=(e=this.geolocationCoordinates)==null?void 0:e.coords)!=null&&s.longitude&&((o=(i=this.geolocationCoordinates)==null?void 0:i.coords)!=null&&o.latitude))t=a`<img title="Votre position" class="geolocation-icon"
|
|
48
40
|
src="https://storage.googleapis.com/assets.miam.tech/generic/icons/locate-primary.svg"
|
|
49
|
-
alt="Geolocaliser"/>`;else return
|
|
41
|
+
alt="Geolocaliser"/>`;else return a``;return a`
|
|
50
42
|
<button type="button" ?disabled=${this.geolocationCoordinates===void 0}
|
|
51
|
-
class="
|
|
43
|
+
class="mealz-ds-button square ghost locate-button" @click=${this.setGeolocation}>
|
|
52
44
|
${t}
|
|
53
45
|
</button>
|
|
54
|
-
`}posMapTemplate(){return
|
|
46
|
+
`}posMapTemplate(){return a`
|
|
55
47
|
<div id="map"></div>
|
|
56
|
-
`}selectSupplierTemplate(){return
|
|
57
|
-
<div class="select-supplier
|
|
48
|
+
`}selectSupplierTemplate(){return a`
|
|
49
|
+
<div class="select-supplier mealz-ds-dropdown">
|
|
58
50
|
<select @change=${this.supplierSelected}>
|
|
59
51
|
<option ?selected=${this._selectedSuppliers.length<1} value="${null}">Toutes les enseignes</option>
|
|
60
|
-
${this._suppliers.map(t=>
|
|
52
|
+
${this._suppliers.map(t=>a`
|
|
61
53
|
<option ?selected=${t===this._selectedSuppliers[0]} value=${t.id}>
|
|
62
54
|
${t.name}
|
|
63
55
|
</option>`)}
|
|
64
56
|
</select>
|
|
65
|
-
</div>`}supplierSelected(t){t.target.value?this._selectedSuppliers[0]=t.target.value:this._selectedSuppliers=[];const e=this._suppliers.find(s=>s.id===t.target.value);e?this._filterEvent.detail.supplierName=e.name:this._filterEvent.detail.supplierName="",this.dispatchEvent(this._filterEvent),this._previousSearchMethod(!0)}posListTemplate(){if(this._searchingPos)return
|
|
57
|
+
</div>`}supplierSelected(t){t.target.value?this._selectedSuppliers[0]=t.target.value:this._selectedSuppliers=[];const e=this._suppliers.find(s=>s.id===t.target.value);e?this._filterEvent.detail.supplierName=e.name:this._filterEvent.detail.supplierName="",this.dispatchEvent(this._filterEvent),this._previousSearchMethod(!0)}posListTemplate(){if(this._searchingPos)return a`
|
|
66
58
|
<div class="pos-loader">
|
|
67
|
-
<div class="
|
|
59
|
+
<div class="mealz-ds-loader"></div>
|
|
68
60
|
</div>
|
|
69
|
-
`;if(this._posList.length<1&&this._searchSubmitted)return
|
|
61
|
+
`;if(this._posList.length<1&&this._searchSubmitted)return a`
|
|
70
62
|
<div class="no-pos-found">
|
|
71
63
|
<b>Aucun magasin trouvé à proximité.</b>
|
|
72
64
|
<span>Essayez une autre adresse.</span>
|
|
73
65
|
</div>
|
|
74
|
-
`;if(this._posList.length<1)return;const t=this.shadowRoot.querySelector(".pos-selection");return t&&t.classList.toggle("pos-selection__height",this._showPosList),
|
|
66
|
+
`;if(this._posList.length<1)return;const t=this.shadowRoot.querySelector(".pos-selection");return t&&t.classList.toggle("pos-selection__height",this._showPosList),a`
|
|
75
67
|
<div id="pos-list" class="${this._showPosList?"pos-list__visible":"pos-list__hidden"}">
|
|
76
|
-
${this._posList.map(e=>
|
|
68
|
+
${this._posList.map(e=>a`
|
|
77
69
|
<div class="pos-item">
|
|
78
70
|
<div class="top">
|
|
79
71
|
<img src="${e.supplier.attributes.logo}" alt="${e.supplier.attributes.name}"/>
|
|
@@ -84,16 +76,16 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
84
76
|
</div>
|
|
85
77
|
<div class="bottom">
|
|
86
78
|
<button @click=${()=>this.dispatchPos(e)}
|
|
87
|
-
class="
|
|
79
|
+
class="mealz-ds-button primary select-pos-button"
|
|
88
80
|
?disabled=${this._posSelected}>
|
|
89
|
-
${this._posSelected?
|
|
90
|
-
<div class="
|
|
81
|
+
${this._posSelected?a`
|
|
82
|
+
<div class="mealz-ds-loader"></div>`:"Sélectionner"}
|
|
91
83
|
</button>
|
|
92
84
|
</div>
|
|
93
85
|
</div>
|
|
94
86
|
`)}
|
|
95
87
|
</div>
|
|
96
|
-
`}getButtonLabel(){if(this._showPosList)return"Voir la carte";const t=this._posList.length;return t===1?"Voir le magasin":`Voir les ${t} magasins`}setAddress(t=!1){!this._addressInput.value||this._addressInput.value.length<3||this._searchingPos||!t&&this._prevAddress===this._addressInput.value+", France"||(this.
|
|
88
|
+
`}getButtonLabel(){if(this._showPosList)return"Voir la carte";const t=this._posList.length;return t===1?"Voir le magasin":`Voir les ${t} magasins`}setAddress(t=!1){!this._addressInput.value||this._addressInput.value.length<3||this._searchingPos||!t&&this._prevAddress===this._addressInput.value+", France"||(this._previousSearchMethod=this.setAddress,this._prevAddress=this._addressInput.value+", France",this._searchingPos=!0,this.requestUpdate(),this.subscriptions.push(this.getByAddress(this._prevAddress,this.selectedRadius,this._selectedSuppliers).subscribe(e=>{this.setPosList(e),this.setNewLocation(),this.dispatchSearch(this._prevAddress,e.data.length),this._searchingPos=!1,this._searchSubmitted=!0,this.togglePosList(!1),this.requestUpdate()})))}setGeolocation(){this._prevAddress="",this._previousSearchMethod=this.setGeolocation,this.getPosByCoordinates()}getPosByCoordinates(){this._searchingPos=!0,this.requestUpdate(),this.subscriptions.push(this.getByCoordinates(this.geolocationCoordinates.coords.latitude,this.geolocationCoordinates.coords.longitude,this.selectedRadius,this._selectedSuppliers).subscribe(t=>{this._addressInput.value="",this.setPosList(t),this._searchingPos=!1,this.setNewLocation(),this._searchSubmitted=!0,this.togglePosList(!1),this.requestUpdate()}))}setPosList(t){this._posList=t.data.map(e=>{const s=Object.assign(new x,e);return s.supplier=t.included.find(i=>i.id===s.relationships.supplier.data.id),s}).sort((e,s)=>e.attributes.name.includes("onoprix")?-1:s.attributes.name.includes("onoprix")?1:0)}dispatchPos(t){this._posSelected=!0,this.requestUpdate();const e={detail:{posId:t.id,posExtId:t.extId,supplierId:t.supplier.id,supplierName:t.supplier.attributes.name,posName:this._nameOfStore(t)},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("posIdChange",e))}dispatchShow(t){const e={detail:{show:t},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("showChange",e))}dispatchSearch(t,e){const s={detail:{searchTerm:t,storesFoundCount:e},bubbles:!0,composed:!0};console.debug("[MealzComponents] dispatchEvent searchChange",s),this.dispatchEvent(new CustomEvent("searchChange",s))}initLeaflet(){this._leafletCss=document.createElement("link"),this._leafletCss.setAttribute("rel","stylesheet"),this._leafletCss.setAttribute("href","https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),this._leafletCss.setAttribute("integrity","sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="),this._leafletCss.setAttribute("crossorigin",""),this._leafletJs=document.createElement("script"),this._leafletJs.setAttribute("src","https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"),this._leafletJs.setAttribute("integrity","sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="),this._leafletJs.setAttribute("crossorigin",""),this._miamDs=document.createElement("link"),this._miamDs.setAttribute("rel","stylesheet"),this._miamDs.setAttribute("href","https://unpkg.com/mealz-ds@2.0.0/mealz-ds.min.css"),this.shadowRoot.appendChild(this._miamDs),this.shadowRoot.appendChild(this._leafletCss),document.head.appendChild(this._leafletJs)}waitForLeaflet(t){let i=50;console.debug("[Map] Checking for window.L");const o=setInterval(()=>{window.L!==void 0||i===0?(clearInterval(o),window.L!==void 0?(console.debug("[Map] window.L is defined"),t(!0)):(console.error("[Map] Failed to load Leaflet after",5e3,"ms"),t(!1))):i--},100)}initMap(){this._map&&(this._map.off(),this._map.remove()),this.setNewLocation(),window.L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",{maxZoom:19,attribution:"Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL."}).addTo(this._map)}loadMap(){this.waitForLeaflet(t=>{t&&this.initMap()})}initEvents(){this._filterEvent=new CustomEvent("filterChange",{detail:{supplierName:""},bubbles:!0,composed:!0})}fetchSuppliers(){this.subscriptions.push(this.getAffiliateSuppliers().subscribe(t=>{this._suppliers=t.map(e=>({id:e.id,name:e.attributes.name})),this.requestUpdate()}))}setNewLocation(){var e;const t=this.shadowRoot.getElementById("map");t&&(this._map?(this._markers.forEach(s=>{this._map.removeLayer(s)}),this._markers=[],this._map.panTo(this.getCoordinates())):this._map=(e=window.L)==null?void 0:e.map(t).setView(this.getCoordinates(),13),this.addMarkers())}getCoordinates(){return this._posList.length<1?[48.866667,2.333333]:[this._posList[0].attributes.latitude,this._posList[0].attributes.longitude]}addMarkers(){this._posList.length>0&&this._posList.forEach((t,e)=>{this._markers.push(window.L.marker([t.attributes.latitude,t.attributes.longitude],{icon:this.buildIcon(t.supplier)}).addTo(this._map));const s=window.L.popup({content:`
|
|
97
89
|
<div class="pos-item">
|
|
98
90
|
<div class="top">
|
|
99
91
|
<img class="pos-img" src="${t.supplier.attributes.logo}" alt="${t.supplier.attributes.name}"/>
|
|
@@ -103,10 +95,10 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
103
95
|
</div>
|
|
104
96
|
</div>
|
|
105
97
|
<div class="bottom">
|
|
106
|
-
<button id="select" class="
|
|
98
|
+
<button id="select" class="mealz-ds-button primary select-pos-button">Sélectionner</button>
|
|
107
99
|
</div>
|
|
108
100
|
</div>
|
|
109
|
-
`});this._markers[e].bindPopup(s).on("popupopen",i=>{i.target.getPopup().getElement().querySelector("#select").addEventListener("click",()=>{this.dispatchPos(t)})})})}buildIcon(t){return window.L.icon({iconUrl:t.attributes.logo||"https://cdn-icons-png.flaticon.com/512/3515/3515146.png",shadowUrl:"https://storage.googleapis.com/assets.miam.tech/mealz-components/store-locator/marker.svg",iconSize:[32,32],shadowSize:[44,53],iconAnchor:[16,45],shadowAnchor:[22,45],popupAnchor:[0,-55]})}togglePosList(t){this._showPosList=!t;const e=this.shadowRoot.getElementById("pos-list"),s={bubbles:!0,composed:!0};e&&(t?(e.style.display="none",this.dispatchEvent(new CustomEvent("mapSelected",s))):(e.style.display="flex",this.dispatchEvent(new CustomEvent("listSelected",s))),this.requestUpdate())}geolocationTimeout(){setTimeout(()=>{this.geolocationCoordinates===void 0&&(this.geolocationCoordinates={})},2e4)}listenFormSubmit(){this.shadowRoot.getElementById("store-locator-form").addEventListener("submit",e=>{e.preventDefault(),this.setAddress()})}};l.styles=[
|
|
101
|
+
`});this._markers[e].bindPopup(s).on("popupopen",i=>{i.target.getPopup().getElement().querySelector("#select").addEventListener("click",()=>{this.dispatchPos(t)})})})}buildIcon(t){return window.L.icon({iconUrl:t.attributes.logo||"https://cdn-icons-png.flaticon.com/512/3515/3515146.png",shadowUrl:"https://storage.googleapis.com/assets.miam.tech/mealz-components/store-locator/marker.svg",iconSize:[32,32],shadowSize:[44,53],iconAnchor:[16,45],shadowAnchor:[22,45],popupAnchor:[0,-55]})}togglePosList(t){this._showPosList=!t;const e=this.shadowRoot.getElementById("pos-list"),s={bubbles:!0,composed:!0};e&&(t?(e.style.display="none",this.dispatchEvent(new CustomEvent("mapSelected",s))):(e.style.display="flex",this.dispatchEvent(new CustomEvent("listSelected",s))),this.requestUpdate())}geolocationTimeout(){setTimeout(()=>{this.geolocationCoordinates===void 0&&(this.geolocationCoordinates={})},2e4)}listenFormSubmit(){this.shadowRoot.getElementById("store-locator-form").addEventListener("submit",e=>{e.preventDefault(),this.setAddress()})}};l.styles=[u`
|
|
110
102
|
:host {
|
|
111
103
|
display: block;
|
|
112
104
|
height: 100%;
|
|
@@ -125,7 +117,7 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
125
117
|
align-items: stretch;
|
|
126
118
|
gap: var(--spacing-padding-16-px, 16px);
|
|
127
119
|
flex-shrink: 0;
|
|
128
|
-
background: var(--
|
|
120
|
+
background: var(--mealz-ds-color-neutral-white, #FFFFFF);
|
|
129
121
|
box-shadow: 2px 0px 16px 0px rgba(0, 0, 0, 0.15);
|
|
130
122
|
z-index: 1;
|
|
131
123
|
|
|
@@ -137,7 +129,7 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
137
129
|
}
|
|
138
130
|
|
|
139
131
|
.pos-selection .title {
|
|
140
|
-
color: var(--
|
|
132
|
+
color: var(--mealz-ds-color-neutral-black, #0F191F);
|
|
141
133
|
font-size: 28px;
|
|
142
134
|
font-weight: 700;
|
|
143
135
|
line-height: 120%;
|
|
@@ -206,7 +198,7 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
206
198
|
align-items: center;
|
|
207
199
|
}
|
|
208
200
|
|
|
209
|
-
.pos-selection .pos-loader .
|
|
201
|
+
.pos-selection .pos-loader .mealz-ds-loader {
|
|
210
202
|
margin: 16px;
|
|
211
203
|
display: flex;
|
|
212
204
|
width: 72px;
|
|
@@ -243,7 +235,7 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
243
235
|
gap: 16px;
|
|
244
236
|
align-self: stretch;
|
|
245
237
|
border-radius: 8px;
|
|
246
|
-
border: 1px solid var(--
|
|
238
|
+
border: 1px solid var(--mealz-ds-color-neutral-200, #EFF1F3);
|
|
247
239
|
}
|
|
248
240
|
|
|
249
241
|
.pos-item .top {
|
|
@@ -260,14 +252,14 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
260
252
|
}
|
|
261
253
|
|
|
262
254
|
.pos-item .top .name {
|
|
263
|
-
color: var(--
|
|
255
|
+
color: var(--mealz-ds-color-neutral-black, #0F191F);
|
|
264
256
|
font-size: 14px;
|
|
265
257
|
font-weight: 700;
|
|
266
258
|
line-height: 150%;
|
|
267
259
|
}
|
|
268
260
|
|
|
269
261
|
.pos-item .top .address {
|
|
270
|
-
color: var(--
|
|
262
|
+
color: var(--mealz-ds-color-neutral-500, #8C96A2);
|
|
271
263
|
font-size: 12px;
|
|
272
264
|
font-weight: 600;
|
|
273
265
|
line-height: 150%;
|
|
@@ -323,7 +315,7 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
323
315
|
display: flex;
|
|
324
316
|
align-items: center;
|
|
325
317
|
justify-content: center;
|
|
326
|
-
border-bottom: solid 1px #
|
|
318
|
+
border-bottom: solid 1px var(--mealz-ds-color-neutral-200, #EFF1F3);
|
|
327
319
|
}
|
|
328
320
|
|
|
329
321
|
.pos-selection .title button {
|
|
@@ -413,4 +405,4 @@ import{u,f as m,i as g,r as f,x as n}from"../assets/lit-element-4gw3YGga.js";imp
|
|
|
413
405
|
top: 0;
|
|
414
406
|
}
|
|
415
407
|
}
|
|
416
|
-
`];
|
|
408
|
+
`];r([p({type:Boolean})],l.prototype,"show",2);r([p({type:Number})],l.prototype,"selectedRadius",2);r([p({type:GeolocationPosition})],l.prototype,"geolocationCoordinates",1);r([p()],l.prototype,"getByAddress",2);r([p()],l.prototype,"getByCoordinates",2);r([p()],l.prototype,"getAffiliateSuppliers",2);r([b()],l.prototype,"_geolocationCoordinates",2);r([_("input")],l.prototype,"_addressInput",2);l=r([g("mealz-store-locator")],l);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as v}from"./innerFrom-cJ8wLVnp.js";import{o as l,c as a}from"./OperatorSubscriber-C_ZC-4p2.js";function b(f,e){return l(function(p,r){var n=null,s=0,o=!1,t=function(){return o&&!n&&r.complete()};p.subscribe(a(r,function(i){n==null||n.unsubscribe();var m=0,u=s++;v(f(i,u)).subscribe(n=a(r,function(c){return r.next(e?e(i,c,u,m++):c)},function(){n=null,t()}))},function(){o=!0,t()}))})}export{b as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as a}from"./empty-DzB-G1O3.js";import{o as f,c as i}from"./OperatorSubscriber-C_ZC-4p2.js";function m(e){return e<=0?function(){return a}:f(function(o,t){var r=0;o.subscribe(i(t,function(n){++r<=e&&(t.next(n),e<=r&&t.complete())}))})}export{m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as v,e as d}from"./no-shadow-element-Dckeu5Ol.js";import{o as f,c as s}from"./OperatorSubscriber-C_ZC-4p2.js";function _(n,r,e){var a=d(n)||r||e?{next:n,error:r,complete:e}:n;return a?f(function(u,l){var t;(t=a.subscribe)===null||t===void 0||t.call(a);var c=!0;u.subscribe(s(l,function(i){var o;(o=a.next)===null||o===void 0||o.call(a,i),l.next(i)},function(){var i;c=!1,(i=a.complete)===null||i===void 0||i.call(a),l.complete()},function(i){var o;c=!1,(o=a.error)===null||o===void 0||o.call(a,i),l.error(i)},function(){var i,o;c&&((i=a.unsubscribe)===null||i===void 0||i.call(a)),(o=a.finalize)===null||o===void 0||o.call(a)}))}):v}export{_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as p}from"./no-shadow-element-Dckeu5Ol.js";import{b as m}from"./async-Cf5pIG6K.js";import{i as r}from"./executeSchedule-BoZ8McHf.js";function v(n){return n instanceof Date&&!isNaN(n)}function x(n,o,i){n===void 0&&(n=0),i===void 0&&(i=m);var t=-1;return o!=null&&(r(o)?i=o:t=o),new p(function(f){var a=v(n)?+n-i.now():n;a<0&&(a=0);var s=0;return i.schedule(function(){f.closed||(f.next(s++),0<=t?this.schedule(void 0,t):f.complete())},a)})}export{x as t};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{D as s,R as o}from"./no-shadow-element-Dckeu5Ol.js";/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const u={CHILD:2},c=i=>(...t)=>({_$litDirective$:i,values:t});class h{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,n){this.t=t,this._$AM=r,this.i=n}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}}/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/class e extends h{constructor(t){if(super(t),this.it=s,t.type!==u.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s||t==null)return this._t=void 0,this.it=t;if(t===o)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}}e.directiveName="unsafeHTML",e.resultType=1;const l=c(e);export{l as a,c as e,h as i,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as c}from"./no-shadow-element-Dckeu5Ol.js";import{d as h}from"./debounceTime-Dqha8z_N.js";class a{constructor(){this.condition=!0,this.threshold=0,this.debounce=0}}class p{constructor(t,i,s={}){this.element=t,this.callback=i,this.params=s,this.intersectionSubject=new c,this.subscriptions=[],this.params={...new a,...s};const n={root:null,rootMargin:"0px",threshold:this.params.threshold};this.observer=new IntersectionObserver(r=>{r.forEach(o=>this.intersectionSubject.next(o))},n),this.connect()}connect(){this.subscriptions.push(this.intersectionSubject.pipe(h(this.params.debounce)).subscribe(t=>this.handleIntersection(t))),this.observer.observe(this.element)}disconnect(){this.observer&&this.observer.disconnect(),this.intersectionSubject.complete(),this.subscriptions.forEach(t=>t.unsubscribe())}handleIntersection(t){this.params.condition&&t.isIntersecting&&this.callback()}}export{p as V};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
.mealz-basket-preview-product {
|
|
2
|
+
display: flex;
|
|
3
|
+
padding: 12px;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
align-self: stretch;
|
|
7
|
+
background: var(--mealz-ds-color-background-primary, #FFF);
|
|
8
|
+
gap: 8px;
|
|
9
|
+
|
|
10
|
+
.mealz-basket-preview-product__infos-container {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
align-items: center;
|
|
14
|
+
width: 100%;
|
|
15
|
+
|
|
16
|
+
.mealz-basket-preview-product__picture-container {
|
|
17
|
+
position: relative;
|
|
18
|
+
margin-right: 12px;
|
|
19
|
+
|
|
20
|
+
.mealz-basket-preview-product__picture {
|
|
21
|
+
height: 112px;
|
|
22
|
+
width: 112px;
|
|
23
|
+
border-radius: 8px;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
|
|
26
|
+
img {
|
|
27
|
+
height: 100%;
|
|
28
|
+
width: 100%;
|
|
29
|
+
object-fit: cover;
|
|
30
|
+
border-radius: 8px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.mealz-basket-preview-product__infos-and-actions {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
flex: 1 0 0;
|
|
39
|
+
|
|
40
|
+
.mealz-basket-preview-product__infos {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
align-items: flex-start;
|
|
44
|
+
flex: 1 0 0;
|
|
45
|
+
margin-right: 8px;
|
|
46
|
+
|
|
47
|
+
> * + * {
|
|
48
|
+
margin-top: 4px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mealz-basket-preview-product__title {
|
|
52
|
+
display: -webkit-box;
|
|
53
|
+
-webkit-box-orient: vertical;
|
|
54
|
+
-webkit-product-clamp: 2;
|
|
55
|
+
align-self: stretch;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
color: var(--mealz-ds-color-neutral-black, #0F191F);
|
|
58
|
+
text-overflow: ellipsis;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.mealz-basket-preview-product__price-per-unit {
|
|
64
|
+
color: var(--mealz-ds-color-neutral-black, #0F191F);
|
|
65
|
+
opacity: 0.7;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.mealz-basket-preview-product__price-and-action, .mealz-basket-preview-product__number-recipes-and-replace {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: row;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
align-items: center;
|
|
75
|
+
align-self: stretch;
|
|
76
|
+
|
|
77
|
+
.mealz-basket-preview-product__replace-button {
|
|
78
|
+
padding: 4px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.mealz-basket-preview-product__in-x-recipes-badge {
|
|
82
|
+
color: #2B61E8;
|
|
83
|
+
background: var(--mealz-ds-color-info-50, #E5ECFF);
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.mealz-counter {
|
|
88
|
+
button {
|
|
89
|
+
height: 40px;
|
|
90
|
+
width: 40px;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.mealz-modal {
|
|
97
|
+
.mealz-modal__recipe-name-badge-list {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-wrap: wrap;
|
|
100
|
+
margin: -4px;
|
|
101
|
+
|
|
102
|
+
.mealz-modal__recipe-name-badge {
|
|
103
|
+
margin: 4px;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
.mealz-basket-preview {
|
|
2
|
+
position: relative;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
|
|
7
|
+
.mealz-basket-preview__title {
|
|
8
|
+
text-align: center;
|
|
9
|
+
padding: 24px 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.mealz-basket-preview__product-addition-container {
|
|
13
|
+
margin: 0 16px 12px 16px;
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mealz-basket-preview__slider-tabs {
|
|
18
|
+
margin: 0 16px 24px 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.mealz-basket-preview__recipes {
|
|
22
|
+
margin: 0 16px;
|
|
23
|
+
flex: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mealz-basket-preview__products {
|
|
27
|
+
.mealz-basket-preview__products-separator {
|
|
28
|
+
margin: 0;
|
|
29
|
+
border-bottom: 1px solid var(--border-primary, #D9DDE1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mealz-basket-preview__recipes {
|
|
34
|
+
.mealz-basket-preview__recipe-card {
|
|
35
|
+
border: 1px solid var(--mealz-ds-color-neutral-200, #EFF1F3);
|
|
36
|
+
background: var(--mealz-ds-color-neutral-white, #fff);
|
|
37
|
+
display: flex;
|
|
38
|
+
padding: 8px;
|
|
39
|
+
border-radius: 12px;
|
|
40
|
+
margin-bottom: 12px;
|
|
41
|
+
|
|
42
|
+
> *:not(:last-child) {
|
|
43
|
+
margin-right: 8px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.mealz-basket-preview__recipe-picture-container {
|
|
47
|
+
height: 144px;
|
|
48
|
+
width: 144px;
|
|
49
|
+
border-radius: 8px;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
position: relative;
|
|
52
|
+
|
|
53
|
+
.mealz-basket-preview__recipe-picture {
|
|
54
|
+
height: 100%;
|
|
55
|
+
width: 100%;
|
|
56
|
+
object-fit: cover;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.mealz-basket-preview__counter {
|
|
61
|
+
position: absolute;
|
|
62
|
+
bottom: 8px;
|
|
63
|
+
right: 8px;
|
|
64
|
+
display: flex;
|
|
65
|
+
padding: 4px 8px;
|
|
66
|
+
align-items: center;
|
|
67
|
+
border-radius: 100px;
|
|
68
|
+
background: var(--mealz-ds-color-neutral-white, #FFF);
|
|
69
|
+
color: var(--mealz-ds-color-neutral-black, #0F191F);
|
|
70
|
+
height: fit-content;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
|
|
73
|
+
> *:not(:last-child) {
|
|
74
|
+
margin-right: 4px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
p {
|
|
78
|
+
line-height: 100%;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
img {
|
|
82
|
+
width: 16px;
|
|
83
|
+
height: 16px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mealz-basket-preview__info-container {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
justify-content: space-between;
|
|
92
|
+
flex: 1;
|
|
93
|
+
|
|
94
|
+
.mealz-basket-preview__info-labels {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
|
|
98
|
+
.mealz-basket-preview__recipe-title-container {
|
|
99
|
+
position: relative;
|
|
100
|
+
|
|
101
|
+
.mealz-basket-preview__recipe-title {
|
|
102
|
+
text-overflow: ellipsis;
|
|
103
|
+
display: -webkit-box;
|
|
104
|
+
-webkit-box-orient: vertical;
|
|
105
|
+
-webkit-line-clamp: 2;
|
|
106
|
+
line-clamp: 2;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
margin-right: 32px; /* Margin for remove button */
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.mealz-basket-preview__remove-button {
|
|
112
|
+
position: absolute;
|
|
113
|
+
top: 0;
|
|
114
|
+
right: 0;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.mealz-basket-preview__number-product {
|
|
119
|
+
font-weight: 400;
|
|
120
|
+
color: var(--mealz-ds-color-neutral-black, #0F191F);
|
|
121
|
+
opacity: 0.7;
|
|
122
|
+
margin-bottom: 4px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.mealz-basket-preview__total-price {
|
|
126
|
+
line-height: 100%;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.mealz-basket-preview__price-per-serve {
|
|
130
|
+
color: var(--mealz-ds-color-neutral-black, #0F191F);
|
|
131
|
+
opacity: 0.7;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.mealz-basket-preview__open-recipe-button-container {
|
|
136
|
+
margin-top: 8px;
|
|
137
|
+
display: flex;
|
|
138
|
+
justify-content: flex-end;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@media (max-width: 480px) {
|
|
142
|
+
.mealz-basket-preview__open-recipe-button-container {
|
|
143
|
+
.mealz-basket-preview__open-recipe-button {
|
|
144
|
+
width: 100%;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.mealz-basket-preview__footer {
|
|
153
|
+
z-index: 2;
|
|
154
|
+
position: sticky;
|
|
155
|
+
bottom: 0;
|
|
156
|
+
left: 0;
|
|
157
|
+
right: 0;
|
|
158
|
+
padding: 16px;
|
|
159
|
+
background: var(--mealz-ds-color-neutral-white, #fff);
|
|
160
|
+
box-shadow: -2px 0 18px 0 rgba(0, 0, 0, 0.15);
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
|
|
164
|
+
&.mealz-basket-preview__place-order-footer {
|
|
165
|
+
justify-content: space-between;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&.mealz-basket-preview__see-cart-footer {
|
|
169
|
+
justify-content: center;
|
|
170
|
+
|
|
171
|
+
a {
|
|
172
|
+
text-decoration: none;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.mealz-basket-preview__basket-price {
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
|
|
180
|
+
.mealz-basket-preview__in-basket-label {
|
|
181
|
+
color: var(--mealz-ds-color-neutral-500, #8C96A2);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@media (max-width: 607px) {
|
|
187
|
+
.mealz-basket-preview__footer {
|
|
188
|
+
a, .mealz-basket-preview__see-basket-button {
|
|
189
|
+
width: 100%;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.mealz-basket-transfer-modal__text{text-align:center}.mealz-basket-transfer-modal__buttons{display:flex;justify-content:center;margin-top:24px}.mealz-basket-transfer-modal__buttons button+button{margin-left:16px}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{N as m,m as o,k as a}from"../assets/no-shadow-element-Dckeu5Ol.js";import{t as u}from"../assets/custom-element-BhZVzxrc.js";var c=Object.getOwnPropertyDescriptor,p=(s,n,d,l)=>{for(var e=l>1?void 0:l?c(n,d):n,t=s.length-1,i;t>=0;t--)(i=s[t])&&(e=i(e)||e);return e};let r=class extends m{constructor(){super(),this.supplierName=null,this.showTransferConfirmModal=!1,this.subscriptions=[],this.styleURL=new URL("/basket-transfer-modal.css",import.meta.url)}connectedCallback(){super.connectedCallback(),this.subscriptions.push(o.pos.currentPos().subscribe(s=>{this.supplierName=(s==null?void 0:s.relationships.supplier.data.attributes.name)??null}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(s=>s.unsubscribe())}render(){return a`
|
|
2
|
+
<mealz-modal @modalClosed=${this.hide}>
|
|
3
|
+
<span slot="title">Transfert du panier</span>
|
|
4
|
+
<span slot="content">
|
|
5
|
+
${this.showTransferConfirmModal?this.renderTransferModalConfirm():this.renderTransferModalInitial()}
|
|
6
|
+
</span>
|
|
7
|
+
</mealz-modal>
|
|
8
|
+
`}renderTransferModalInitial(){return a`
|
|
9
|
+
<div class="mealz-basket-transfer-modal__text">
|
|
10
|
+
<p class="mealz-ds-text size-s">
|
|
11
|
+
Nous transférons votre panier${this.supplierName?` vers ${this.supplierName}`:""}.
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="mealz-basket-transfer-modal__buttons">
|
|
15
|
+
<button class="mealz-ds-button primary" @click=${this.show}>
|
|
16
|
+
<span class="mealz-ds-text weight-l">
|
|
17
|
+
Ok
|
|
18
|
+
</span>
|
|
19
|
+
</button>
|
|
20
|
+
</div>
|
|
21
|
+
`}renderTransferModalConfirm(){return a`
|
|
22
|
+
<div class="mealz-basket-transfer-modal__text">
|
|
23
|
+
<p class="mealz-ds-text size-s">
|
|
24
|
+
Votre panier est toujours en cours de transfert${this.supplierName?` vers ${this.supplierName}`:""}.
|
|
25
|
+
</p>
|
|
26
|
+
<p class="mealz-ds-text size-s">
|
|
27
|
+
Voulez-vous continuer ou abandonner le transfert ?
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="mealz-basket-transfer-modal__buttons">
|
|
31
|
+
<button class="mealz-ds-button secondary" @click=${this.hide}>
|
|
32
|
+
<span class="mealz-ds-text weight-l">Abandonner</span>
|
|
33
|
+
</button>
|
|
34
|
+
<button
|
|
35
|
+
class="mealz-ds-button primary"
|
|
36
|
+
@click=${()=>{o.basket.transfer(),this.showTransferConfirmModal=!1,this.requestUpdate()}}
|
|
37
|
+
>
|
|
38
|
+
<span class="mealz-ds-text weight-l">Continuer</span>
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
`}show(){this.showTransferConfirmModal=!0,this.requestUpdate()}hide(){this.showTransferConfirmModal=!1,this.requestUpdate()}};r=p([u("mealz-basket-transfer-modal")],r);customElements.get("mealz-basket-transfer-modal")||customElements.define("mealz-basket-preview",r);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.mealz-breadcrumb{position:relative;display:flex;flex:1;border-bottom:1px solid var(--mealz-ds-color-border, #EFF1F3);padding:16px 24px;margin:24px}.mealz-breadcrumb>*{margin-right:8px}.mealz-breadcrumb>a{display:flex;align-items:center;color:var(--mealz-ds-color-neutral-500, #8C96A2);text-decoration:none}.mealz-breadcrumb .active{color:var(--mealz-ds-color-primary, #24748F)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.mealz-basket-preview-product{display:flex;padding:12px;flex-direction:column;align-items:flex-start;align-self:stretch;background:var(--mealz-ds-color-background-primary, #FFF);gap:8px}.mealz-basket-preview-product .mealz-basket-preview-product__infos-container{display:flex;flex-direction:row;align-items:center;width:100%}.mealz-basket-preview-product .mealz-basket-preview-product__infos-container .mealz-basket-preview-product__picture-container{position:relative;margin-right:12px}.mealz-basket-preview-product .mealz-basket-preview-product__infos-container .mealz-basket-preview-product__picture-container .mealz-basket-preview-product__picture{height:112px;width:112px;border-radius:8px;cursor:pointer}.mealz-basket-preview-product .mealz-basket-preview-product__infos-container .mealz-basket-preview-product__picture-container .mealz-basket-preview-product__picture img{height:100%;width:100%;object-fit:cover;border-radius:8px}.mealz-basket-preview-product .mealz-basket-preview-product__infos-container .mealz-basket-preview-product__infos-and-actions{display:flex;align-items:flex-start;flex:1 0 0}.mealz-basket-preview-product .mealz-basket-preview-product__infos-container .mealz-basket-preview-product__infos-and-actions .mealz-basket-preview-product__infos{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;margin-right:8px}.mealz-basket-preview-product .mealz-basket-preview-product__infos-container .mealz-basket-preview-product__infos-and-actions .mealz-basket-preview-product__infos>*+*{margin-top:4px}.mealz-basket-preview-product .mealz-basket-preview-product__infos-container .mealz-basket-preview-product__infos-and-actions .mealz-basket-preview-product__infos .mealz-basket-preview-product__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-product-clamp:2;align-self:stretch;overflow:hidden;color:var(--mealz-ds-color-neutral-black, #0F191F);text-overflow:ellipsis;cursor:pointer}.mealz-basket-preview-product .mealz-basket-preview-product__infos-container .mealz-basket-preview-product__infos-and-actions .mealz-basket-preview-product__price-per-unit{color:var(--mealz-ds-color-neutral-black, #0F191F);opacity:.7}.mealz-basket-preview-product .mealz-basket-preview-product__price-and-action,.mealz-basket-preview-product .mealz-basket-preview-product__number-recipes-and-replace{display:flex;flex-direction:row;justify-content:space-between;align-items:center;align-self:stretch}.mealz-basket-preview-product .mealz-basket-preview-product__price-and-action .mealz-basket-preview-product__replace-button,.mealz-basket-preview-product .mealz-basket-preview-product__number-recipes-and-replace .mealz-basket-preview-product__replace-button{padding:4px}.mealz-basket-preview-product .mealz-basket-preview-product__price-and-action .mealz-basket-preview-product__in-x-recipes-badge,.mealz-basket-preview-product .mealz-basket-preview-product__number-recipes-and-replace .mealz-basket-preview-product__in-x-recipes-badge{color:#2b61e8;background:var(--mealz-ds-color-info-50, #E5ECFF);cursor:pointer}.mealz-basket-preview-product .mealz-basket-preview-product__price-and-action .mealz-counter button,.mealz-basket-preview-product .mealz-basket-preview-product__number-recipes-and-replace .mealz-counter button{height:40px;width:40px}.mealz-modal .mealz-modal__recipe-name-badge-list{display:flex;flex-wrap:wrap;margin:-4px}.mealz-modal .mealz-modal__recipe-name-badge-list .mealz-modal__recipe-name-badge{margin:4px}
|