ng-easycommerce-v18 0.3.14-beta.5 → 0.3.14-beta.7
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/README.md +4 -0
- package/esm2022/lib/constants/core.constants.service.mjs +2 -2
- package/esm2022/lib/ec-components/product-detail-ec/product-detail-ec.component.mjs +11 -10
- package/esm2022/lib/ec-components/stores-ec/stores-ec.component.mjs +21 -6
- package/esm2022/lib/ec-components/widgets-ec/decidir-ec/decidir-ec.component.mjs +3 -1
- package/esm2022/lib/ec-components/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.mjs +3 -3
- package/esm2022/lib/ec-services/analytics/google-analytics.service.mjs +4 -2
- package/esm2022/lib/ec-services/analytics/gtm.service.mjs +6 -3
- package/esm2022/lib/ec-services/analytics/metricool-pixel.service.mjs +4 -2
- package/fesm2022/ng-easycommerce-v18.mjs +44 -20
- package/fesm2022/ng-easycommerce-v18.mjs.map +1 -1
- package/lib/ec-components/stores-ec/stores-ec.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -28,6 +28,8 @@ export class MetricoolPixelService {
|
|
|
28
28
|
* @param pixel_hash hash provisto por Metricool Pixel.
|
|
29
29
|
*/
|
|
30
30
|
initialize = (pixel_hash) => {
|
|
31
|
+
if (!isPlatformBrowser(this.platformId) || !this.document)
|
|
32
|
+
return;
|
|
31
33
|
let new_analityc_script = this.renderer.createElement('script');
|
|
32
34
|
new_analityc_script.type = 'text/javascript';
|
|
33
35
|
new_analityc_script.text = `
|
|
@@ -41,7 +43,7 @@ export class MetricoolPixelService {
|
|
|
41
43
|
beTracker.t({ hash: "${pixel_hash}" })
|
|
42
44
|
});
|
|
43
45
|
`;
|
|
44
|
-
this.renderer.appendChild(this.document
|
|
46
|
+
this.renderer.appendChild(this.document.body, new_analityc_script);
|
|
45
47
|
};
|
|
46
48
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetricoolPixelService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
47
49
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetricoolPixelService, providedIn: 'root' });
|
|
@@ -52,4 +54,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
52
54
|
providedIn: 'root'
|
|
53
55
|
}]
|
|
54
56
|
}], ctorParameters: () => [] });
|
|
55
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
57
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0cmljb29sLXBpeGVsLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy1lYXN5Y29tbWVyY2UtdjE4L3NyYy9saWIvZWMtc2VydmljZXMvYW5hbHl0aWNzL21ldHJpY29vbC1waXhlbC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxXQUFXLEVBQWEsZ0JBQWdCLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBQzdGOztHQUVHO0FBSUgsTUFBTSxPQUFPLHFCQUFxQjtJQUM5Qjs7T0FFRztJQUNLLFFBQVEsR0FBRyxLQUFLLENBQUM7SUFFakIsZUFBZSxHQUFxQixNQUFNLENBQUMsZ0JBQWdCLENBQUMsQ0FBQTtJQUM1RCxRQUFRLEdBQW9CLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQTtJQUM1QyxVQUFVLEdBQVEsTUFBTSxDQUFDLFdBQVcsQ0FBQyxDQUFBO0lBQzdDOzs7T0FHRztJ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ubWV0cmljb29sLmNvbS9yZXNvdXJjZXMvYmUuanNcIixcclxuICAgICAgICAgICAgICAgIGMub25yZWFkeXN0YXRlY2hhbmdlID0gYSxcclxuICAgICAgICAgICAgICAgIGMub25sb2FkID0gYSwgYi5hcHBlbmRDaGlsZChjKVxyXG4gICAgICAgIH0gbG9hZFNjcmlwdChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIGJlVHJhY2tlci50KHsgaGFzaDogXCIke3BpeGVsX2hhc2h9XCIgfSlcclxuICAgICAgICB9KTtcclxuICAgICAgICBgO1xyXG4gICAgICAgIHRoaXMucmVuZGVyZXIuYXBwZW5kQ2hpbGQodGhpcy5kb2N1bWVudC5ib2R5LCBuZXdfYW5hbGl0eWNfc2NyaXB0KTtcclxuICAgIH1cclxufVxyXG4iXX0=
|
|
@@ -295,7 +295,7 @@ class CoreConstantsService {
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
// Para SSR, intentar construir desde el document si está disponible
|
|
298
|
-
if (this.document?.location) {
|
|
298
|
+
if (isPlatformBrowser(this.platformId) && this.document?.location) {
|
|
299
299
|
return `${this.document.location.protocol}//${this.document.location.host}`;
|
|
300
300
|
}
|
|
301
301
|
// Intentar obtener desde environment
|
|
@@ -1253,7 +1253,9 @@ class GoogleAnalyticsService {
|
|
|
1253
1253
|
* @param gtm_id id provisto por Google Tag Manager.
|
|
1254
1254
|
*/
|
|
1255
1255
|
initialize(gtm_id) {
|
|
1256
|
-
if (!
|
|
1256
|
+
if (!isPlatformBrowser(this.platformId))
|
|
1257
|
+
return;
|
|
1258
|
+
if (!this.document?.getElementById('google_tag_manager')) {
|
|
1257
1259
|
console.log('hay elemento');
|
|
1258
1260
|
const declaration = this.renderer.createElement('script');
|
|
1259
1261
|
declaration.async = true;
|
|
@@ -1568,9 +1570,12 @@ class GTMService {
|
|
|
1568
1570
|
if (this.isLoaded) {
|
|
1569
1571
|
return resolve(this.isLoaded);
|
|
1570
1572
|
}
|
|
1573
|
+
if (!isPlatformBrowser(this.platformId) || !this.document) {
|
|
1574
|
+
return reject(false);
|
|
1575
|
+
}
|
|
1571
1576
|
//const doc = this.browserGlobals.documentRef();
|
|
1572
1577
|
this.pushOnDataLayer({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
|
|
1573
|
-
const gtmScript = this.document
|
|
1578
|
+
const gtmScript = this.document.createElement('script'); //doc.createElement('script');
|
|
1574
1579
|
if (gtmScript) {
|
|
1575
1580
|
gtmScript.id = 'GTMscript';
|
|
1576
1581
|
gtmScript.async = true;
|
|
@@ -1581,7 +1586,7 @@ class GTMService {
|
|
|
1581
1586
|
gtmScript.addEventListener('error', () => {
|
|
1582
1587
|
return reject(false);
|
|
1583
1588
|
});
|
|
1584
|
-
this.document
|
|
1589
|
+
this.document.head.insertBefore(gtmScript, this.document.head.firstChild);
|
|
1585
1590
|
}
|
|
1586
1591
|
});
|
|
1587
1592
|
}
|
|
@@ -1982,6 +1987,8 @@ class MetricoolPixelService {
|
|
|
1982
1987
|
* @param pixel_hash hash provisto por Metricool Pixel.
|
|
1983
1988
|
*/
|
|
1984
1989
|
initialize = (pixel_hash) => {
|
|
1990
|
+
if (!isPlatformBrowser(this.platformId) || !this.document)
|
|
1991
|
+
return;
|
|
1985
1992
|
let new_analityc_script = this.renderer.createElement('script');
|
|
1986
1993
|
new_analityc_script.type = 'text/javascript';
|
|
1987
1994
|
new_analityc_script.text = `
|
|
@@ -1995,7 +2002,7 @@ class MetricoolPixelService {
|
|
|
1995
2002
|
beTracker.t({ hash: "${pixel_hash}" })
|
|
1996
2003
|
});
|
|
1997
2004
|
`;
|
|
1998
|
-
this.renderer.appendChild(this.document
|
|
2005
|
+
this.renderer.appendChild(this.document.body, new_analityc_script);
|
|
1999
2006
|
};
|
|
2000
2007
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetricoolPixelService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2001
2008
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetricoolPixelService, providedIn: 'root' });
|
|
@@ -7869,7 +7876,7 @@ class RedsysCatchEcComponent extends ComponentHelper {
|
|
|
7869
7876
|
}
|
|
7870
7877
|
/** Oculta header/footer para esta pantalla mínima. */
|
|
7871
7878
|
hideHeaderFooter() {
|
|
7872
|
-
if (!isPlatformBrowser(this.platformId))
|
|
7879
|
+
if (!isPlatformBrowser(this.platformId) || !this.document)
|
|
7873
7880
|
return;
|
|
7874
7881
|
const header = this.document.querySelector('header');
|
|
7875
7882
|
const footer = this.document.querySelector('footer');
|
|
@@ -7880,7 +7887,7 @@ class RedsysCatchEcComponent extends ComponentHelper {
|
|
|
7880
7887
|
}
|
|
7881
7888
|
/** Restaura header/footer al salir. */
|
|
7882
7889
|
showHeaderFooter() {
|
|
7883
|
-
if (!isPlatformBrowser(this.platformId))
|
|
7890
|
+
if (!isPlatformBrowser(this.platformId) || !this.document)
|
|
7884
7891
|
return;
|
|
7885
7892
|
const header = this.document.querySelector('header');
|
|
7886
7893
|
const footer = this.document.querySelector('footer');
|
|
@@ -9052,9 +9059,8 @@ class ProductDetailEcComponent {
|
|
|
9052
9059
|
this._meta.updateTag({ property: 'og:type', content: 'product' });
|
|
9053
9060
|
}
|
|
9054
9061
|
decodeHtml(html) {
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
return txt.value;
|
|
9062
|
+
// Usar he.decode en lugar de document para compatibilidad SSR
|
|
9063
|
+
return he.decode(html);
|
|
9058
9064
|
}
|
|
9059
9065
|
sanitizedHtml(html) {
|
|
9060
9066
|
const decodedHtml = this.decodeHtml(html);
|
|
@@ -9103,12 +9109,14 @@ class ProductDetailEcComponent {
|
|
|
9103
9109
|
}
|
|
9104
9110
|
goToSection(section) {
|
|
9105
9111
|
this.showFormContact = true;
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
element
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
+
if (typeof document !== 'undefined') {
|
|
9113
|
+
setTimeout(() => {
|
|
9114
|
+
const element = document.getElementById(section);
|
|
9115
|
+
if (element) {
|
|
9116
|
+
element.scrollIntoView({ behavior: 'smooth' });
|
|
9117
|
+
}
|
|
9118
|
+
}, 500);
|
|
9119
|
+
}
|
|
9112
9120
|
}
|
|
9113
9121
|
resetForm = () => {
|
|
9114
9122
|
this.reset = !this.reset;
|
|
@@ -10291,6 +10299,8 @@ class DecidirEcComponent extends ComponentHelper {
|
|
|
10291
10299
|
});
|
|
10292
10300
|
};
|
|
10293
10301
|
resizeIframe = (obj) => {
|
|
10302
|
+
if (typeof document === 'undefined' || !obj.contentWindow || !obj.contentWindow.document)
|
|
10303
|
+
return;
|
|
10294
10304
|
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
|
|
10295
10305
|
obj.style.width = obj.contentWindow.document.body.scrollWidth + 'px';
|
|
10296
10306
|
};
|
|
@@ -11604,6 +11614,7 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
11604
11614
|
storesService;
|
|
11605
11615
|
consts;
|
|
11606
11616
|
sanitizer;
|
|
11617
|
+
platformId;
|
|
11607
11618
|
stores = new BehaviorSubject([]);
|
|
11608
11619
|
filterStores = null;
|
|
11609
11620
|
storesAll = null;
|
|
@@ -11616,11 +11627,12 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
11616
11627
|
markers = [];
|
|
11617
11628
|
locations = [];
|
|
11618
11629
|
ultimoElementoSeleccionado = null;
|
|
11619
|
-
constructor(storesService, consts, sanitizer) {
|
|
11630
|
+
constructor(storesService, consts, sanitizer, platformId) {
|
|
11620
11631
|
super();
|
|
11621
11632
|
this.storesService = storesService;
|
|
11622
11633
|
this.consts = consts;
|
|
11623
11634
|
this.sanitizer = sanitizer;
|
|
11635
|
+
this.platformId = platformId;
|
|
11624
11636
|
this.urlmap = this.sanitizer.bypassSecurityTrustResourceUrl('https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d13137.519688957545!2d-58.3888163!3d-34.5945533!3m2!1i1024!2i768!4f13.1!5e0!3m2!1ses-419!2sar!4v1523889204148');
|
|
11625
11637
|
this.storesService.stores
|
|
11626
11638
|
.pipe(filter$1((stores) => Array.isArray(stores) && stores.length > 0))
|
|
@@ -11693,6 +11705,8 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
11693
11705
|
return true;
|
|
11694
11706
|
};
|
|
11695
11707
|
initMap() {
|
|
11708
|
+
if (!isPlatformBrowser(this.platformId))
|
|
11709
|
+
return;
|
|
11696
11710
|
this.storesService.stores.pipe(skipWhile(stores => !stores || stores.length === 0) // Omitir valores vacíos
|
|
11697
11711
|
).subscribe((res) => {
|
|
11698
11712
|
// this.stores.next(res ?? []); // Eliminado para no sobrescribir el listado principal
|
|
@@ -11713,7 +11727,10 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
11713
11727
|
});
|
|
11714
11728
|
const center = bounds.getCenter();
|
|
11715
11729
|
const style = [{ "elementType": "geometry", "stylers": [{ "color": "#212121" }] }, { "elementType": "labels.icon", "stylers": [{ "visibility": "off" }] }, { "elementType": "labels.text.fill", "stylers": [{ "color": "#757575" }] }, { "elementType": "labels.text.stroke", "stylers": [{ "color": "#212121" }] }, { "featureType": "administrative", "elementType": "geometry", "stylers": [{ "color": "#757575" }] }, { "featureType": "administrative.country", "elementType": "labels.text.fill", "stylers": [{ "color": "#9e9e9e" }] }, { "featureType": "administrative.locality", "elementType": "labels.text.fill", "stylers": [{ "color": "#bdbdbd" }] }, { "featureType": "poi", "elementType": "labels.text.fill", "stylers": [{ "color": "#757575" }] }, { "featureType": "poi.business", "stylers": [{ "visibility": "off" }] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [{ "color": "#181818" }] }, { "featureType": "poi.park", "elementType": "labels.text.fill", "stylers": [{ "color": "#616161" }] }, { "featureType": "poi.park", "elementType": "labels.text.stroke", "stylers": [{ "color": "#1b1b1b" }] }, { "featureType": "road", "elementType": "geometry.fill", "stylers": [{ "color": "#2c2c2c" }] }, { "featureType": "road", "elementType": "labels.icon", "stylers": [{ "visibility": "off" }] }, { "featureType": "road", "elementType": "labels.text.fill", "stylers": [{ "color": "#8a8a8a" }] }, { "featureType": "road.arterial", "elementType": "geometry", "stylers": [{ "color": "#373737" }] }, { "featureType": "road.arterial", "elementType": "labels", "stylers": [{ "visibility": "off" }] }, { "featureType": "road.highway", "elementType": "geometry", "stylers": [{ "color": "#3c3c3c" }] }, { "featureType": "road.highway", "elementType": "labels", "stylers": [{ "visibility": "off" }] }, { "featureType": "road.highway.controlled_access", "elementType": "geometry", "stylers": [{ "color": "#4e4e4e" }] }, { "featureType": "road.local", "stylers": [{ "visibility": "off" }] }, { "featureType": "road.local", "elementType": "labels.text.fill", "stylers": [{ "color": "#616161" }] }, { "featureType": "transit", "stylers": [{ "visibility": "off" }] }, { "featureType": "transit", "elementType": "labels.text.fill", "stylers": [{ "color": "#757575" }] }, { "featureType": "water", "elementType": "geometry", "stylers": [{ "color": "#000000" }] }, { "featureType": "water", "elementType": "labels.text.fill", "stylers": [{ "color": "#3d3d3d" }] }];
|
|
11716
|
-
|
|
11730
|
+
const mapElement = document.getElementById('map');
|
|
11731
|
+
if (!mapElement)
|
|
11732
|
+
return;
|
|
11733
|
+
this.map = new google.maps.Map(mapElement, {
|
|
11717
11734
|
zoom: 12,
|
|
11718
11735
|
center: center, // Centrar el mapa en el centro calculado
|
|
11719
11736
|
styles: style // Aplica los estilos personalizados
|
|
@@ -11731,6 +11748,8 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
11731
11748
|
marker.set('id', location.id); // Associate marker with its ID
|
|
11732
11749
|
this.markers.push(marker);
|
|
11733
11750
|
marker.addListener('click', () => {
|
|
11751
|
+
if (typeof document === 'undefined')
|
|
11752
|
+
return;
|
|
11734
11753
|
const elemento = document.getElementById(location.id);
|
|
11735
11754
|
const contenedor = document.getElementById('home');
|
|
11736
11755
|
if (elemento && contenedor) {
|
|
@@ -11758,6 +11777,8 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
11758
11777
|
});
|
|
11759
11778
|
}
|
|
11760
11779
|
showStoreOnMap(storeCode) {
|
|
11780
|
+
if (!isPlatformBrowser(this.platformId))
|
|
11781
|
+
return;
|
|
11761
11782
|
this.stopBounce();
|
|
11762
11783
|
const marker = this.markers.find(m => m.get('id') === storeCode);
|
|
11763
11784
|
const elemento = document.getElementById(storeCode);
|
|
@@ -11779,13 +11800,16 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
11779
11800
|
marker.setAnimation(null);
|
|
11780
11801
|
});
|
|
11781
11802
|
}
|
|
11782
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StoresEcComponent, deps: [{ token: StoresService }, { token: CoreConstantsService }, { token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
11803
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StoresEcComponent, deps: [{ token: StoresService }, { token: CoreConstantsService }, { token: i1$4.DomSanitizer }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
11783
11804
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StoresEcComponent, isStandalone: true, selector: "app-store-ec", usesInheritance: true, ngImport: i0, template: "<!-- <div class=\"row w-100 mx-auto my-4 px-3 bb-s bt-md-s py-1\">\r\n <strong>{{ 'stores' | translate }}</strong>\r\n</div>\r\n@if(stores){\r\n<div class=\"row\">\r\n <div class=\"col-12 col-md-3 order-1 order-md-1\">\r\n <div class=\"row\">\r\n <div class=\"form-group w-100\">\r\n <select (change)=\"selectChange($event.target.value)\" class=\"rounded-0 form-control form-control-sm\"\r\n id=\"exampleFormControlSelect1\">\r\n <option selected [value]=\"''\">Seleccione provincia</option>\r\n <option [value]=\"item.code\" *ngFor=\"let item of getProvices(stores)\"> {{item.name}}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-md-3 order-3 order-md-2\">\r\n <div class=\"container-fluid scrolleable\" *ngIf=\"filterStores && filterStores.length\">\r\n <div class=\"row mb-1\" *ngFor=\"let store of filterStores; let i = index\">\r\n <div class=\"col-12\">\r\n <h6 class=\"\"><strong>{{ store.name }}</strong></h6>\r\n <label>{{ store.address }}</label>\r\n <label>{{ store.phone }}</label>\r\n <div [innerHtml]=\"store.note\"></div>\r\n <div class=\"text-right\">\r\n\r\n <a *ngIf=\"store.urlMap\" (click)=\"updateMap (store.urlMap)\" class=\"custom-a\">Ver mapa</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-md-6 order-2 order-md-3 my-4 mt-md-0\">\r\n\r\n <iframe id=\"map-iframe\" [src]=\"urlmap\" frameborder=\"0\"></iframe>\r\n </div>\r\n</div>\r\n}@else {\r\n<div class=\"d-flex flex-row justify-content-center my-5 align-items-center alto-total\">\r\n <h5 class=\"text-center\">{{ 'no-stores' | translate }}</h5>\r\n</div>\r\n}\r\n\r\n\r\n\r\n<ng-template #loading>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 align-items-center\">\r\n <div class=\"d-flex flex-column justify-content-center align-items-center my-5\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template> -->", styles: [".scrolleable{height:70vh;overflow:auto}@media screen and (max-width: 768px){.scrolleable{height:auto}}.background-white{background-color:#fff}.alto-total{height:60vh}.custom-a{color:#000}#map-iframe{width:100%;border:0;height:100%}@media screen and (max-width: 425px){#map-iframe{height:400px}}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }] });
|
|
11784
11805
|
}
|
|
11785
11806
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StoresEcComponent, decorators: [{
|
|
11786
11807
|
type: Component,
|
|
11787
11808
|
args: [{ selector: 'app-store-ec', standalone: true, imports: [TranslateModule], template: "<!-- <div class=\"row w-100 mx-auto my-4 px-3 bb-s bt-md-s py-1\">\r\n <strong>{{ 'stores' | translate }}</strong>\r\n</div>\r\n@if(stores){\r\n<div class=\"row\">\r\n <div class=\"col-12 col-md-3 order-1 order-md-1\">\r\n <div class=\"row\">\r\n <div class=\"form-group w-100\">\r\n <select (change)=\"selectChange($event.target.value)\" class=\"rounded-0 form-control form-control-sm\"\r\n id=\"exampleFormControlSelect1\">\r\n <option selected [value]=\"''\">Seleccione provincia</option>\r\n <option [value]=\"item.code\" *ngFor=\"let item of getProvices(stores)\"> {{item.name}}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-md-3 order-3 order-md-2\">\r\n <div class=\"container-fluid scrolleable\" *ngIf=\"filterStores && filterStores.length\">\r\n <div class=\"row mb-1\" *ngFor=\"let store of filterStores; let i = index\">\r\n <div class=\"col-12\">\r\n <h6 class=\"\"><strong>{{ store.name }}</strong></h6>\r\n <label>{{ store.address }}</label>\r\n <label>{{ store.phone }}</label>\r\n <div [innerHtml]=\"store.note\"></div>\r\n <div class=\"text-right\">\r\n\r\n <a *ngIf=\"store.urlMap\" (click)=\"updateMap (store.urlMap)\" class=\"custom-a\">Ver mapa</a>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-md-6 order-2 order-md-3 my-4 mt-md-0\">\r\n\r\n <iframe id=\"map-iframe\" [src]=\"urlmap\" frameborder=\"0\"></iframe>\r\n </div>\r\n</div>\r\n}@else {\r\n<div class=\"d-flex flex-row justify-content-center my-5 align-items-center alto-total\">\r\n <h5 class=\"text-center\">{{ 'no-stores' | translate }}</h5>\r\n</div>\r\n}\r\n\r\n\r\n\r\n<ng-template #loading>\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 align-items-center\">\r\n <div class=\"d-flex flex-column justify-content-center align-items-center my-5\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-template> -->", styles: [".scrolleable{height:70vh;overflow:auto}@media screen and (max-width: 768px){.scrolleable{height:auto}}.background-white{background-color:#fff}.alto-total{height:60vh}.custom-a{color:#000}#map-iframe{width:100%;border:0;height:100%}@media screen and (max-width: 425px){#map-iframe{height:400px}}\n"] }]
|
|
11788
|
-
}], ctorParameters: () => [{ type: StoresService }, { type: CoreConstantsService }, { type: i1$4.DomSanitizer }
|
|
11809
|
+
}], ctorParameters: () => [{ type: StoresService }, { type: CoreConstantsService }, { type: i1$4.DomSanitizer }, { type: Object, decorators: [{
|
|
11810
|
+
type: Inject,
|
|
11811
|
+
args: [PLATFORM_ID]
|
|
11812
|
+
}] }] });
|
|
11789
11813
|
|
|
11790
11814
|
class PriceRangeFilterComponent {
|
|
11791
11815
|
_filtersService = inject(FiltersService);
|