ng-easycommerce-v18 0.1.3 → 0.1.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/assets/ec-i18n/es.json +3 -1
- package/esm2022/lib/constants/core.constants.service.mjs +2 -1
- package/esm2022/lib/ec-components/abstractions-components/menu-ec.component.mjs +2 -1
- package/esm2022/lib/ec-components/auth-ec/auth-ec.component.mjs +1 -1
- package/esm2022/lib/ec-components/auth-ec/login-form-ec/login-form-ec.component.mjs +25 -3
- package/esm2022/lib/ec-components/auth-ec/register-form-ec/register-form-ec.component.mjs +2 -2
- package/esm2022/lib/ec-components/blocks-ec/block-products-ec/block-products-ec.component.mjs +147 -38
- package/esm2022/lib/ec-components/blocks-ec/blocks-ec.component.mjs +2 -2
- package/esm2022/lib/ec-components/cart-ec/cart-ec.component.mjs +27 -3
- package/esm2022/lib/ec-components/cart-ec/cart-item-ec/cart-item-ec.component.mjs +10 -1
- package/esm2022/lib/ec-components/checkout-ec/dataform-ec/dataform-ec.component.mjs +2 -2
- package/esm2022/lib/ec-components/contact-ec/contact-ec.component.mjs +3 -2
- package/esm2022/lib/ec-components/index.mjs +2 -1
- package/esm2022/lib/ec-components/product-ec/product-ec.component.mjs +3 -3
- package/esm2022/lib/ec-components/stores-ec/stores-ec.component.mjs +197 -0
- package/esm2022/lib/ec-services/auth.service.mjs +3 -2
- package/esm2022/lib/interfaces/index.mjs +2 -1
- package/esm2022/lib/interfaces/store.mjs +1 -1
- package/fesm2022/ng-easycommerce-v18.mjs +404 -47
- package/fesm2022/ng-easycommerce-v18.mjs.map +1 -1
- package/lib/constants/core.constants.service.d.ts +1 -0
- package/lib/ec-components/auth-ec/login-form-ec/login-form-ec.component.d.ts +2 -1
- package/lib/ec-components/blocks-ec/block-products-ec/block-products-ec.component.d.ts +36 -8
- package/lib/ec-components/cart-ec/cart-ec.component.d.ts +6 -0
- package/lib/ec-components/cart-ec/cart-item-ec/cart-item-ec.component.d.ts +1 -0
- package/lib/ec-components/index.d.ts +1 -0
- package/lib/ec-components/stores-ec/stores-ec.component.d.ts +62 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/interfaces/store.d.ts +4 -0
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@ export declare class LoginFormEcComponent {
|
|
|
21
21
|
*/
|
|
22
22
|
loading: boolean;
|
|
23
23
|
loggedIn: boolean;
|
|
24
|
+
inCart: boolean;
|
|
24
25
|
/**
|
|
25
26
|
* Signal que guarda el formulario de login.
|
|
26
27
|
*/
|
|
@@ -38,5 +39,5 @@ export declare class LoginFormEcComponent {
|
|
|
38
39
|
*/
|
|
39
40
|
redirectHome(): void;
|
|
40
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginFormEcComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LoginFormEcComponent, "app-login-form-ec", never, { "redirect": { "alias": "redirect"; "required": false; }; "redirectTo": { "alias": "redirectTo"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginFormEcComponent, "app-login-form-ec", never, { "redirect": { "alias": "redirect"; "required": false; }; "redirectTo": { "alias": "redirectTo"; "required": false; }; "inCart": { "alias": "inCart"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
42
43
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { BlockEcComponent } from '../../abstractions-components';
|
|
3
|
-
import { SwiperOptions } from 'swiper/types';
|
|
4
3
|
import { SwiperContainer } from 'swiper/element/bundle';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
/**
|
|
@@ -8,7 +7,11 @@ import * as i0 from "@angular/core";
|
|
|
8
7
|
* @extends {BlockEcComponent}
|
|
9
8
|
* @class BlockProductsEcComponent
|
|
10
9
|
*/
|
|
11
|
-
export declare class BlockProductsEcComponent extends BlockEcComponent {
|
|
10
|
+
export declare class BlockProductsEcComponent extends BlockEcComponent implements AfterViewInit {
|
|
11
|
+
prevArrowImage?: string;
|
|
12
|
+
nextArrowImage?: string;
|
|
13
|
+
prevArrowText: string;
|
|
14
|
+
nextArrowText: string;
|
|
12
15
|
/**
|
|
13
16
|
* Servicio de Analytics
|
|
14
17
|
*/
|
|
@@ -29,10 +32,7 @@ export declare class BlockProductsEcComponent extends BlockEcComponent {
|
|
|
29
32
|
* Bloque principal que contiene los productos
|
|
30
33
|
*/
|
|
31
34
|
meta: any;
|
|
32
|
-
|
|
33
|
-
* Método original en: {@link BlockEcComponent}
|
|
34
|
-
*/
|
|
35
|
-
swiperOptions: () => SwiperOptions;
|
|
35
|
+
ngAfterViewInit(): void;
|
|
36
36
|
private document?;
|
|
37
37
|
private platformId;
|
|
38
38
|
/**
|
|
@@ -46,6 +46,34 @@ export declare class BlockProductsEcComponent extends BlockEcComponent {
|
|
|
46
46
|
* @param banner
|
|
47
47
|
*/
|
|
48
48
|
selectPromotion(item: any): void;
|
|
49
|
+
/**
|
|
50
|
+
* Configura la navegación personalizada del Swiper.
|
|
51
|
+
* Esta función está diseñada para ser movida al componente base BlockProductsEcComponent.
|
|
52
|
+
* Permite personalización de las imágenes de las flechas mediante @Input.
|
|
53
|
+
*/
|
|
54
|
+
private setupSwiperNavigation;
|
|
55
|
+
/**
|
|
56
|
+
* Inicializa el Swiper con navegación personalizada.
|
|
57
|
+
* Esta función puede ser movida al componente base para reutilización.
|
|
58
|
+
*/
|
|
59
|
+
private initializeSwiperWithCustomNavigation;
|
|
60
|
+
/**
|
|
61
|
+
* Obtiene la configuración base del Swiper.
|
|
62
|
+
* Esta configuración puede ser personalizada en el futuro mediante @Input.
|
|
63
|
+
*/
|
|
64
|
+
private getSwiperConfiguration;
|
|
65
|
+
/**
|
|
66
|
+
* Inicializa un nuevo Swiper con la configuración proporcionada.
|
|
67
|
+
*/
|
|
68
|
+
private initializeNewSwiper;
|
|
69
|
+
/**
|
|
70
|
+
* Actualiza un Swiper existente para asegurar la configuración correcta.
|
|
71
|
+
*/
|
|
72
|
+
private updateExistingSwiper;
|
|
73
|
+
/**
|
|
74
|
+
* Configura los event listeners para los botones de navegación.
|
|
75
|
+
*/
|
|
76
|
+
private setupNavigationEventListeners;
|
|
49
77
|
static ɵfac: i0.ɵɵFactoryDeclaration<BlockProductsEcComponent, never>;
|
|
50
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BlockProductsEcComponent, "app-block-products-ec", never, { "appProduct": { "alias": "appProduct"; "required": false; }; "products": { "alias": "products"; "required": true; }; "meta": { "alias": "meta"; "required": true; }; }, {}, never, never, true, never>;
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BlockProductsEcComponent, "app-block-products-ec", never, { "prevArrowImage": { "alias": "prevArrowImage"; "required": false; }; "nextArrowImage": { "alias": "nextArrowImage"; "required": false; }; "prevArrowText": { "alias": "prevArrowText"; "required": false; }; "nextArrowText": { "alias": "nextArrowText"; "required": false; }; "appProduct": { "alias": "appProduct"; "required": false; }; "products": { "alias": "products"; "required": true; }; "meta": { "alias": "meta"; "required": true; }; }, {}, never, never, true, never>;
|
|
51
79
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Router } from '@angular/router';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class CartEcComponent {
|
|
4
|
+
private _channelService;
|
|
5
|
+
channel: any;
|
|
6
|
+
private _toastrService;
|
|
4
7
|
private _cartService;
|
|
5
8
|
router: Router;
|
|
6
9
|
cartItems$: import("rxjs").Observable<any[]>;
|
|
@@ -12,8 +15,11 @@ export declare class CartEcComponent {
|
|
|
12
15
|
isAuthenticated$: boolean;
|
|
13
16
|
getTotalAmount: import("rxjs").Observable<any>;
|
|
14
17
|
couponCode$: import("rxjs").Observable<string | null>;
|
|
18
|
+
constructor();
|
|
15
19
|
removeCoupon(): void;
|
|
16
20
|
redirectCheckout(): boolean;
|
|
21
|
+
getMinimumPurchaseAmount: () => any;
|
|
22
|
+
exceedsMinimumAmount: (value: number) => boolean;
|
|
17
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<CartEcComponent, never>;
|
|
18
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<CartEcComponent, "lib-cart-ec", never, {}, {}, never, never, true, never>;
|
|
19
25
|
}
|
|
@@ -10,6 +10,7 @@ export declare class CartItemEcComponent implements OnInit {
|
|
|
10
10
|
quantity: number;
|
|
11
11
|
variantsToShow: string[];
|
|
12
12
|
updateStock: boolean;
|
|
13
|
+
isQuantityUpdating: boolean;
|
|
13
14
|
ngOnInit(): void;
|
|
14
15
|
updateQuantity(stock: number): void;
|
|
15
16
|
less(stock: number, value?: number): void;
|
|
@@ -30,3 +30,4 @@ export * from './share-ec/share-ec.component';
|
|
|
30
30
|
export * from './reviews-ec/reviews-ec.component';
|
|
31
31
|
export * from './reviews-form-ec/reviews-form-ec.component';
|
|
32
32
|
export * from './section-container-ec/section-container-ec.component';
|
|
33
|
+
export * from './stores-ec/stores-ec.component';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
2
|
+
import { ComponentHelper } from '../../classes/component-helper';
|
|
3
|
+
import { CoreConstantsService } from "../../constants";
|
|
4
|
+
import { StoresService } from '../../ec-services/stores.service';
|
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
|
6
|
+
import { Store } from '../../interfaces';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class StoresEcComponent extends ComponentHelper {
|
|
9
|
+
storesService: StoresService;
|
|
10
|
+
consts: CoreConstantsService;
|
|
11
|
+
protected sanitizer: DomSanitizer;
|
|
12
|
+
stores: BehaviorSubject<Store[]>;
|
|
13
|
+
filterStores: Store[] | null;
|
|
14
|
+
storesAll: Store[] | null;
|
|
15
|
+
exclusiveStores: Store[] | null;
|
|
16
|
+
imageMap: boolean;
|
|
17
|
+
urlmap: import("@angular/platform-browser").SafeResourceUrl;
|
|
18
|
+
provinces: never[];
|
|
19
|
+
private url;
|
|
20
|
+
private map;
|
|
21
|
+
private markers;
|
|
22
|
+
private locations;
|
|
23
|
+
ultimoElementoSeleccionado: any;
|
|
24
|
+
constructor(storesService: StoresService, consts: CoreConstantsService, sanitizer: DomSanitizer);
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
updateMap(url: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* @description Obtiene todas la provincias que figuren en el arreglo
|
|
29
|
+
* @param stores Arreglo de tiendas
|
|
30
|
+
* @returns {Array} Arreglo de provincias
|
|
31
|
+
*/
|
|
32
|
+
getProvices: (stores: Store[]) => any[];
|
|
33
|
+
/**
|
|
34
|
+
* @description Retorna un arreglo de objetos formado por las claves
|
|
35
|
+
* "province"(contiene un objeto provincia) y
|
|
36
|
+
* "stores" (contiene un arreglo de tiendas pertenecientes a la provincia)
|
|
37
|
+
* @param stores Opcional, arreglo de tiendas a la que se le quiere aplicar la division por provincia
|
|
38
|
+
* @returns {Array<{"province", "stores"}>}
|
|
39
|
+
*/
|
|
40
|
+
getStoresByProvinces: (stores?: Store[]) => {
|
|
41
|
+
province: any;
|
|
42
|
+
stores: Store[];
|
|
43
|
+
}[];
|
|
44
|
+
/**
|
|
45
|
+
* @description Retorna las tiendas con/sin retiro en el local
|
|
46
|
+
* @param stores Opcional, arreglo de tiendas
|
|
47
|
+
* @param cond Opcional, Si es "true" obtiene las tiendas con retiro local caso contrario "false"
|
|
48
|
+
* @returns {Array<Store>} Arreglo de Store
|
|
49
|
+
*/
|
|
50
|
+
getPickupStores: (stores?: Store[], cond?: Boolean) => Store[];
|
|
51
|
+
/**
|
|
52
|
+
* @description Metodo que devuelve las tiendas que NO son exclusivas.
|
|
53
|
+
* @returns {Array<Store>} Arreglo de Store
|
|
54
|
+
*/
|
|
55
|
+
getNonExclusiveStores: () => Store[];
|
|
56
|
+
selectChange: (select: string) => boolean;
|
|
57
|
+
initMap(): void;
|
|
58
|
+
showStoreOnMap(storeCode: string): void;
|
|
59
|
+
stopBounce(): void;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StoresEcComponent, never>;
|
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StoresEcComponent, "app-store-ec", never, {}, {}, never, never, true, never>;
|
|
62
|
+
}
|