ng-miam 7.0.4 → 7.0.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.
- package/bundles/ng-miam.umd.js +29 -23
- package/bundles/ng-miam.umd.js.map +1 -1
- package/bundles/ng-miam.umd.min.js +1 -1
- package/bundles/ng-miam.umd.min.js.map +1 -1
- package/esm2015/lib/_services/interceptor.service.js +2 -2
- package/esm2015/lib/_services/recipes.service.js +6 -1
- package/esm2015/lib/_web-components/basket-preview/replace-item/replace-item.component.js +24 -23
- package/fesm2015/ng-miam.js +29 -23
- package/fesm2015/ng-miam.js.map +1 -1
- package/lib/_services/recipes.service.d.ts +1 -0
- package/package.json +1 -1
package/bundles/ng-miam.umd.js
CHANGED
|
@@ -3164,6 +3164,11 @@
|
|
|
3164
3164
|
}
|
|
3165
3165
|
return this.http.post(environment.miamAPI + "/api/v1/recipes/from_url", { source: source, ext_link: extLink }).pipe(operators.map(function (result) { return result.data; }));
|
|
3166
3166
|
};
|
|
3167
|
+
RecipesService.prototype.generateFromPicture = function (imageBase64) {
|
|
3168
|
+
var url = MIAM_API_HOST$3 + 'recipes/generate_from_picture';
|
|
3169
|
+
var body = { base64_image: imageBase64 };
|
|
3170
|
+
return this.http.post(url, body);
|
|
3171
|
+
};
|
|
3167
3172
|
// Open modal showing recipe details
|
|
3168
3173
|
RecipesService.prototype.display = function (recipeId, _e, eventTrace) {
|
|
3169
3174
|
var _this = this;
|
|
@@ -13077,7 +13082,7 @@
|
|
|
13077
13082
|
request = request.clone({
|
|
13078
13083
|
setHeaders: {
|
|
13079
13084
|
'miam-origin': context.origin.value,
|
|
13080
|
-
'miam-front-version': '7.0.
|
|
13085
|
+
'miam-front-version': '7.0.5',
|
|
13081
13086
|
'miam-front-type': 'web',
|
|
13082
13087
|
'miam-api-version': '4.7.0'
|
|
13083
13088
|
}
|
|
@@ -13528,12 +13533,12 @@
|
|
|
13528
13533
|
i0.ɵɵelementEnd();
|
|
13529
13534
|
}
|
|
13530
13535
|
}
|
|
13531
|
-
function
|
|
13536
|
+
function ReplaceItemComponent_div_17_div_21_Template(rf, ctx) {
|
|
13532
13537
|
if (rf & 1) {
|
|
13533
13538
|
i0.ɵɵelement(0, "div", 31);
|
|
13534
13539
|
}
|
|
13535
13540
|
}
|
|
13536
|
-
function
|
|
13541
|
+
function ReplaceItemComponent_div_17_ng_template_22_span_0_Template(rf, ctx) {
|
|
13537
13542
|
if (rf & 1) {
|
|
13538
13543
|
i0.ɵɵelementStart(0, "span");
|
|
13539
13544
|
i0.ɵɵtext(1);
|
|
@@ -13545,17 +13550,17 @@
|
|
|
13545
13550
|
i0.ɵɵtextInterpolate(i_r5 === 0 ? "S\u00E9lectionn\u00E9" : "S\u00E9lectionner");
|
|
13546
13551
|
}
|
|
13547
13552
|
}
|
|
13548
|
-
function
|
|
13553
|
+
function ReplaceItemComponent_div_17_ng_template_22_span_1_Template(rf, ctx) {
|
|
13549
13554
|
if (rf & 1) {
|
|
13550
13555
|
i0.ɵɵelementStart(0, "span");
|
|
13551
13556
|
i0.ɵɵtext(1, "Ajouter au panier");
|
|
13552
13557
|
i0.ɵɵelementEnd();
|
|
13553
13558
|
}
|
|
13554
13559
|
}
|
|
13555
|
-
function
|
|
13560
|
+
function ReplaceItemComponent_div_17_ng_template_22_Template(rf, ctx) {
|
|
13556
13561
|
if (rf & 1) {
|
|
13557
|
-
i0.ɵɵtemplate(0,
|
|
13558
|
-
i0.ɵɵtemplate(1,
|
|
13562
|
+
i0.ɵɵtemplate(0, ReplaceItemComponent_div_17_ng_template_22_span_0_Template, 2, 1, "span", 32);
|
|
13563
|
+
i0.ɵɵtemplate(1, ReplaceItemComponent_div_17_ng_template_22_span_1_Template, 2, 0, "span", 32);
|
|
13559
13564
|
}
|
|
13560
13565
|
if (rf & 2) {
|
|
13561
13566
|
var ctx_r8 = i0.ɵɵnextContext(2);
|
|
@@ -13587,21 +13592,22 @@
|
|
|
13587
13592
|
i0.ɵɵelementStart(11, "div", 24);
|
|
13588
13593
|
i0.ɵɵelementStart(12, "span", 25);
|
|
13589
13594
|
i0.ɵɵtext(13);
|
|
13595
|
+
i0.ɵɵpipe(14, "number");
|
|
13590
13596
|
i0.ɵɵelementEnd();
|
|
13591
13597
|
i0.ɵɵelementEnd();
|
|
13592
13598
|
i0.ɵɵelementEnd();
|
|
13593
13599
|
i0.ɵɵelementEnd();
|
|
13594
|
-
i0.ɵɵelementStart(
|
|
13595
|
-
i0.ɵɵelementStart(
|
|
13596
|
-
i0.ɵɵelementStart(
|
|
13597
|
-
i0.ɵɵtext(
|
|
13598
|
-
i0.ɵɵpipe(
|
|
13600
|
+
i0.ɵɵelementStart(15, "div", 26);
|
|
13601
|
+
i0.ɵɵelementStart(16, "div", 27);
|
|
13602
|
+
i0.ɵɵelementStart(17, "span");
|
|
13603
|
+
i0.ɵɵtext(18);
|
|
13604
|
+
i0.ɵɵpipe(19, "currency");
|
|
13599
13605
|
i0.ɵɵelementEnd();
|
|
13600
13606
|
i0.ɵɵelementEnd();
|
|
13601
|
-
i0.ɵɵelementStart(
|
|
13602
|
-
i0.ɵɵlistener("click", function
|
|
13603
|
-
i0.ɵɵtemplate(
|
|
13604
|
-
i0.ɵɵtemplate(
|
|
13607
|
+
i0.ɵɵelementStart(20, "button", 28);
|
|
13608
|
+
i0.ɵɵlistener("click", function ReplaceItemComponent_div_17_Template_button_click_20_listener() { i0.ɵɵrestoreView(_r13_1); var item_r4 = ctx.$implicit; var ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.onSelectItem(item_r4); });
|
|
13609
|
+
i0.ɵɵtemplate(21, ReplaceItemComponent_div_17_div_21_Template, 1, 0, "div", 29);
|
|
13610
|
+
i0.ɵɵtemplate(22, ReplaceItemComponent_div_17_ng_template_22_Template, 2, 2, "ng-template", null, 30, i0.ɵɵtemplateRefExtractor);
|
|
13605
13611
|
i0.ɵɵelementEnd();
|
|
13606
13612
|
i0.ɵɵelementEnd();
|
|
13607
13613
|
i0.ɵɵelementEnd();
|
|
@@ -13609,9 +13615,9 @@
|
|
|
13609
13615
|
if (rf & 2) {
|
|
13610
13616
|
var item_r4 = ctx.$implicit;
|
|
13611
13617
|
var i_r5 = ctx.index;
|
|
13612
|
-
var _r7 = i0.ɵɵreference(
|
|
13618
|
+
var _r7 = i0.ɵɵreference(23);
|
|
13613
13619
|
var ctx_r3 = i0.ɵɵnextContext();
|
|
13614
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
13620
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c4$3, ctx_r3.basketEntry.selectedItem && !ctx_r3.ignoreSelected && i_r5 === 0));
|
|
13615
13621
|
i0.ɵɵadvance(3);
|
|
13616
13622
|
i0.ɵɵproperty("src", item_r4.attributes.image, i0.ɵɵsanitizeUrl);
|
|
13617
13623
|
i0.ɵɵadvance(4);
|
|
@@ -13619,9 +13625,9 @@
|
|
|
13619
13625
|
i0.ɵɵadvance(3);
|
|
13620
13626
|
i0.ɵɵtextInterpolate(item_r4.attributes.name);
|
|
13621
13627
|
i0.ɵɵadvance(3);
|
|
13622
|
-
i0.ɵɵtextInterpolate2("", item_r4.capacityVolume, " ", item_r4.capacityUnit, "");
|
|
13623
|
-
i0.ɵɵadvance(
|
|
13624
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(
|
|
13628
|
+
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind2(14, 10, item_r4.capacityVolume, "1.0-2"), " ", item_r4.capacityUnit, "");
|
|
13629
|
+
i0.ɵɵadvance(5);
|
|
13630
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(19, 13, item_r4.price, item_r4.attributes.currency));
|
|
13625
13631
|
i0.ɵɵadvance(2);
|
|
13626
13632
|
i0.ɵɵproperty("disabled", ctx_r3.basketEntry.selectedItem && !ctx_r3.ignoreSelected && i_r5 === 0);
|
|
13627
13633
|
i0.ɵɵadvance(1);
|
|
@@ -13793,7 +13799,7 @@
|
|
|
13793
13799
|
i0.ɵɵelementEnd();
|
|
13794
13800
|
i0.ɵɵelementEnd();
|
|
13795
13801
|
i0.ɵɵelementStart(16, "div", 11);
|
|
13796
|
-
i0.ɵɵtemplate(17, ReplaceItemComponent_div_17_Template,
|
|
13802
|
+
i0.ɵɵtemplate(17, ReplaceItemComponent_div_17_Template, 24, 18, "div", 12);
|
|
13797
13803
|
i0.ɵɵelementEnd();
|
|
13798
13804
|
}
|
|
13799
13805
|
if (rf & 2) {
|
|
@@ -13813,7 +13819,7 @@
|
|
|
13813
13819
|
i0.ɵɵadvance(2);
|
|
13814
13820
|
i0.ɵɵproperty("ngForOf", ctx.itemsList);
|
|
13815
13821
|
}
|
|
13816
|
-
}, directives: [IconComponent, i2.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i2.NgForOf, i2.NgClass], pipes: [CapitalizeFirstLetterPipe, i2.CurrencyPipe], styles: ["ng-miam-replace-item{display:block}.miam-replace-item__header{align-items:center;background-color:var(--miam-ds-color-neutral-white,#fff);border-bottom:1px solid var(--miam-ds-color-neutral-200,#d9dde1);display:flex;flex-shrink:0;height:80px;justify-content:center;padding:0 16px;position:relative;width:100%}@media (max-width:1024px){.miam-replace-item__header{height:48px}}.miam-replace-item__header .miam-ds-button.ghost.square{left:16px;position:absolute}.miam-replace-item__header .miam-ds-button.ghost.square ng-miam-icon{transform:rotate(90deg)}.miam-replace-item__searchbar{align-items:center;background:var(--miam-ds-color-neutral-white);border:1px solid var(--miam-ds-color-neutral-200);border-radius:6px;display:flex;font-size:16px;gap:8px;margin:12px 24px;padding:12px 8px}.miam-replace-item__searchbar .miam-replace-item__searchbar__input{background:transparent;border:transparent;flex:1;outline:none!important}.miam-replace-item__product-banner{align-items:center;background:var(--miam-ds-color-primary-100,#e4eaec);border-radius:6px;display:flex;flex:1;justify-content:center;margin:16px 24px;padding:16px 8px;text-align:center}@media (max-width:1024px){.miam-replace-item__product-banner{margin:16px 16px 8px}}.miam-replace-item__product-list{display:grid;grid-gap:0;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.miam-replace-item__product-list .miam-replace-item__product-item{border-bottom:1px solid var(--miam-ds-color-neutral-200,#d9dde1);border-right:1px solid var(--miam-ds-color-neutral-200,#d9dde1);display:flex;flex-direction:column;gap:8px;padding:16px}.miam-replace-item__product-list .miam-replace-item__product-item.selected{background:var(--miam-ds-color-primary-50,#f0f3f4)}.miam-replace-item__product-list .miam-replace-item__card-upper-section{align-items:center;display:flex;gap:16px}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-image-container{flex-shrink:0;height:96px;width:96px}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-image-container .miam-replace-item__product-image{height:100%;width:100%}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-info{flex:1}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-brand{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-brand-text{text-transform:uppercase}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-name{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;margin-bottom:12px;overflow:hidden;text-overflow:ellipsis}.miam-replace-item__product-list .miam-replace-item__card-lower-section{align-items:center;display:flex;justify-content:space-between}.miam-replace-item__product-list .miam-replace-item__card-lower-section .miam-replace-item__product-price{color:var(--miam-ds-color-primary,#24748f)}"], encapsulation: 2, data: { animation: [
|
|
13822
|
+
}, directives: [IconComponent, i2.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i2.NgForOf, i2.NgClass], pipes: [CapitalizeFirstLetterPipe, i2.DecimalPipe, i2.CurrencyPipe], styles: ["ng-miam-replace-item{display:block}.miam-replace-item__header{align-items:center;background-color:var(--miam-ds-color-neutral-white,#fff);border-bottom:1px solid var(--miam-ds-color-neutral-200,#d9dde1);display:flex;flex-shrink:0;height:80px;justify-content:center;padding:0 16px;position:relative;width:100%}@media (max-width:1024px){.miam-replace-item__header{height:48px}}.miam-replace-item__header .miam-ds-button.ghost.square{left:16px;position:absolute}.miam-replace-item__header .miam-ds-button.ghost.square ng-miam-icon{transform:rotate(90deg)}.miam-replace-item__searchbar{align-items:center;background:var(--miam-ds-color-neutral-white);border:1px solid var(--miam-ds-color-neutral-200);border-radius:6px;display:flex;font-size:16px;gap:8px;margin:12px 24px;padding:12px 8px}.miam-replace-item__searchbar .miam-replace-item__searchbar__input{background:transparent;border:transparent;flex:1;outline:none!important}.miam-replace-item__product-banner{align-items:center;background:var(--miam-ds-color-primary-100,#e4eaec);border-radius:6px;display:flex;flex:1;justify-content:center;margin:16px 24px;padding:16px 8px;text-align:center}@media (max-width:1024px){.miam-replace-item__product-banner{margin:16px 16px 8px}}.miam-replace-item__product-list{display:grid;grid-gap:0;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.miam-replace-item__product-list .miam-replace-item__product-item{border-bottom:1px solid var(--miam-ds-color-neutral-200,#d9dde1);border-right:1px solid var(--miam-ds-color-neutral-200,#d9dde1);display:flex;flex-direction:column;gap:8px;padding:16px}.miam-replace-item__product-list .miam-replace-item__product-item.selected{background:var(--miam-ds-color-primary-50,#f0f3f4)}.miam-replace-item__product-list .miam-replace-item__card-upper-section{align-items:center;display:flex;gap:16px}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-image-container{flex-shrink:0;height:96px;width:96px}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-image-container .miam-replace-item__product-image{height:100%;width:100%}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-info{flex:1}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-brand{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-brand-text{text-transform:uppercase}.miam-replace-item__product-list .miam-replace-item__card-upper-section .miam-replace-item__product-name{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box;margin-bottom:12px;overflow:hidden;text-overflow:ellipsis}.miam-replace-item__product-list .miam-replace-item__card-lower-section{align-items:center;display:flex;justify-content:space-between}.miam-replace-item__product-list .miam-replace-item__card-lower-section .miam-replace-item__product-price{color:var(--miam-ds-color-primary,#24748f)}"], encapsulation: 2, data: { animation: [
|
|
13817
13823
|
animations.trigger('slide', [
|
|
13818
13824
|
animations.state('in', animations.style({ transform: 'translateX(0)' })),
|
|
13819
13825
|
animations.state('out', animations.style({ transform: 'translateX(100%)' })),
|