ng-easycommerce 0.0.657 → 0.0.659-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/README.md +22 -0
- package/bundles/ng-easycommerce.umd.js +204 -137
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/blocks-ec/block-render-ec/block-render-ec.component.js +48 -0
- package/esm2015/lib/ec-component/footer-ec/footer-ec.component.js +15 -43
- package/esm2015/lib/ec-component/index.js +4 -1
- package/esm2015/lib/interfaces/footer.types.js +1 -1
- package/esm2015/lib/services/footer/footer.adapters.js +87 -47
- package/esm2015/lib/services/footer/footer.service.js +3 -8
- package/esm2015/public-api.js +2 -1
- package/esm5/lib/ec-component/blocks-ec/block-render-ec/block-render-ec.component.js +64 -0
- package/esm5/lib/ec-component/footer-ec/footer-ec.component.js +15 -43
- package/esm5/lib/ec-component/index.js +4 -1
- package/esm5/lib/interfaces/footer.types.js +1 -1
- package/esm5/lib/services/footer/footer.adapters.js +87 -48
- package/esm5/lib/services/footer/footer.service.js +3 -8
- package/esm5/public-api.js +2 -1
- package/fesm2015/ng-easycommerce.js +185 -133
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +201 -134
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/blocks-ec/block-render-ec/block-render-ec.component.d.ts +13 -0
- package/lib/ec-component/footer-ec/footer-ec.component.d.ts +1 -15
- package/lib/ec-component/index.d.ts +1 -0
- package/lib/interfaces/footer.types.d.ts +28 -16
- package/lib/services/footer/footer.adapters.d.ts +4 -22
- package/lib/services/footer/footer.service.d.ts +0 -3
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnChanges, OnInit } from '@angular/core';
|
|
2
|
+
import { ComponentHelper } from '../../../classes/component-helper';
|
|
3
|
+
import { Constants } from '../../../core.consts';
|
|
4
|
+
import { IBlock } from '../../../interfaces/block';
|
|
5
|
+
export declare class BlockRenderEcComponent extends ComponentHelper implements OnInit, OnChanges {
|
|
6
|
+
protected consts: Constants;
|
|
7
|
+
block: any;
|
|
8
|
+
constructor(consts: Constants);
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
ngOnChanges(): void;
|
|
11
|
+
isNewsletter(block: any): boolean;
|
|
12
|
+
getHTMLContent(block: IBlock | any): string;
|
|
13
|
+
}
|
|
@@ -24,7 +24,6 @@ export declare class FooterEcComponent extends ComponentHelper implements OnInit
|
|
|
24
24
|
attributes: any[];
|
|
25
25
|
mediaUrl: string;
|
|
26
26
|
params: any;
|
|
27
|
-
/** Columns provenientes del endpoint */
|
|
28
27
|
columns$: Observable<FooterColumnView[]>;
|
|
29
28
|
extras$: Observable<FooterExtrasView | {}>;
|
|
30
29
|
private deviceSub?;
|
|
@@ -47,20 +46,6 @@ export declare class FooterEcComponent extends ComponentHelper implements OnInit
|
|
|
47
46
|
paramValue(it: any): string;
|
|
48
47
|
paramImagePath(it: any): string;
|
|
49
48
|
isImageParam(it: any): boolean;
|
|
50
|
-
sectionPages(item: any): {
|
|
51
|
-
code: string;
|
|
52
|
-
slug: string;
|
|
53
|
-
name: string;
|
|
54
|
-
enabled: boolean;
|
|
55
|
-
}[];
|
|
56
|
-
sectionHasPages(item: any): boolean;
|
|
57
|
-
sectionPageText(page: {
|
|
58
|
-
name: string | null;
|
|
59
|
-
code: string | null;
|
|
60
|
-
}): string;
|
|
61
|
-
sectionPageHref(page: {
|
|
62
|
-
code: string | null;
|
|
63
|
-
}): string;
|
|
64
49
|
logoUrl(extras: any): string;
|
|
65
50
|
legalHtml(extras: any): string;
|
|
66
51
|
fiscalQrUrl(extras: any): string;
|
|
@@ -84,4 +69,5 @@ export declare class FooterEcComponent extends ComponentHelper implements OnInit
|
|
|
84
69
|
trackByPos: (_: number, it: {
|
|
85
70
|
position?: number;
|
|
86
71
|
}) => number;
|
|
72
|
+
pageHref(it: any): string;
|
|
87
73
|
}
|
|
@@ -6,6 +6,7 @@ export * from "./blocks-ec/block-html-ec/block-html-ec.component";
|
|
|
6
6
|
export * from "./blocks-ec/block-newsletter-ec/contact-form-news-ec.component";
|
|
7
7
|
export * from "./blocks-ec/block-products-ec/block-products-ec.component";
|
|
8
8
|
export * from "./blocks-ec/blocks-ec.component";
|
|
9
|
+
export * from "./blocks-ec/block-render-ec/block-render-ec.component";
|
|
9
10
|
export * from "./cart-ec/cart-ec.component";
|
|
10
11
|
export * from "./checkout-ec/checkout-ec.component";
|
|
11
12
|
export * from "./checkout-ec/dataform-ec/dataform-ec.component";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare type DisplayMode = 'both' | 'desktop' | 'mobile';
|
|
2
|
-
export declare type FooterItemType = 'url' | '
|
|
2
|
+
export declare type FooterItemType = 'url' | 'page' | 'block' | 'category' | 'parameter' | 'text';
|
|
3
3
|
export declare type LinkTarget = 'same_tab' | 'new_tab' | 'new_window';
|
|
4
4
|
export interface FooterView {
|
|
5
5
|
channel: string;
|
|
@@ -47,6 +47,7 @@ export interface FooterItemView {
|
|
|
47
47
|
id: number;
|
|
48
48
|
type: FooterItemType;
|
|
49
49
|
label: string | null;
|
|
50
|
+
labelResolved?: string | null;
|
|
50
51
|
style: {
|
|
51
52
|
bold: boolean;
|
|
52
53
|
italic: boolean;
|
|
@@ -57,25 +58,36 @@ export interface FooterItemView {
|
|
|
57
58
|
position: number;
|
|
58
59
|
link: FooterItemLink;
|
|
59
60
|
}
|
|
61
|
+
export interface PageMini {
|
|
62
|
+
id?: number;
|
|
63
|
+
code?: string | null;
|
|
64
|
+
slug?: string | null;
|
|
65
|
+
name?: string | null;
|
|
66
|
+
enabled?: boolean | null;
|
|
67
|
+
}
|
|
68
|
+
export interface BlockView {
|
|
69
|
+
code: string;
|
|
70
|
+
priority?: number;
|
|
71
|
+
contentType?: string;
|
|
72
|
+
design?: string;
|
|
73
|
+
banners?: any[];
|
|
74
|
+
products?: {
|
|
75
|
+
items: any[];
|
|
76
|
+
options: any[];
|
|
77
|
+
};
|
|
78
|
+
contactForm?: any;
|
|
79
|
+
translations?: any;
|
|
80
|
+
styles?: any;
|
|
81
|
+
}
|
|
60
82
|
export declare type FooterItemLink = {
|
|
61
83
|
type: 'url';
|
|
62
84
|
url: string;
|
|
63
85
|
} | {
|
|
64
|
-
type: '
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} | null;
|
|
70
|
-
/** NUEVO: contenido mínimo de la sección que enviamos desde backend */
|
|
71
|
-
content?: {
|
|
72
|
-
pages: Array<{
|
|
73
|
-
code: string | null;
|
|
74
|
-
slug: string | null;
|
|
75
|
-
name: string | null;
|
|
76
|
-
enabled: boolean | null;
|
|
77
|
-
}>;
|
|
78
|
-
} | null;
|
|
86
|
+
type: 'page';
|
|
87
|
+
page: PageMini | null;
|
|
88
|
+
} | {
|
|
89
|
+
type: 'block';
|
|
90
|
+
block: BlockView | null;
|
|
79
91
|
} | {
|
|
80
92
|
type: 'category';
|
|
81
93
|
category: {
|
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
import { FooterItemView } from "../../interfaces/footer.types";
|
|
1
|
+
import { FooterItemView, PageMini, BlockView } from "../../interfaces/footer.types";
|
|
2
2
|
export declare function toHref(item: FooterItemView): string;
|
|
3
|
+
export declare function toPageHref(page: PageMini, base: string): string;
|
|
4
|
+
export declare function firstBlockUrl(block: BlockView): string | null;
|
|
3
5
|
export declare function toText(item: FooterItemView): string;
|
|
4
|
-
|
|
5
|
-
export declare function getSectionPages(item: FooterItemView): {
|
|
6
|
-
code: string;
|
|
7
|
-
slug: string;
|
|
8
|
-
name: string;
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
}[];
|
|
11
|
-
/** Helper para saber si una sección trae al menos una página habilitada (o cualquiera si no validás enabled). */
|
|
12
|
-
export declare function hasSectionPages(item: FooterItemView, onlyEnabled?: boolean): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Arma el href de UNA página de sección.
|
|
15
|
-
* @param item FooterItemView de tipo 'section'
|
|
16
|
-
* @param pageCode code de la página (obligatorio)
|
|
17
|
-
* @param sectionsBase base que te da consts.getSectionsRoute(), ej: 'section/' o '/section/'
|
|
18
|
-
*/
|
|
19
|
-
export declare function toSectionPageHref(item: FooterItemView, pageCode: string | null | undefined, sectionsBase: string): string;
|
|
20
|
-
/** Texto a mostrar para la página (fallback name -> code). */
|
|
21
|
-
export declare function toSectionPageText(page: {
|
|
22
|
-
name: string | null;
|
|
23
|
-
code: string | null;
|
|
24
|
-
}): string;
|
|
6
|
+
export declare function toPageText(page: PageMini): string;
|
|
@@ -15,11 +15,8 @@ export declare class FooterService {
|
|
|
15
15
|
constructor(conn: ConnectionService, consts: Constants);
|
|
16
16
|
footerApi: () => string;
|
|
17
17
|
load(device?: 'desktop' | 'mobile'): void;
|
|
18
|
-
/** Carga UNA SOLA VEZ y cachea todo. Luego aplica según device actual. */
|
|
19
18
|
loadOnce(initialDevice?: 'desktop' | 'mobile'): void;
|
|
20
|
-
/** Cambia el device y re-arma columnas/extras desde el cache (sin API). */
|
|
21
19
|
setDevice(device: 'desktop' | 'mobile'): void;
|
|
22
|
-
/** Recalcula columns/extras para el currentDevice usando el cache. */
|
|
23
20
|
private applyDevice;
|
|
24
21
|
private byPos;
|
|
25
22
|
private getDeviceByWidth;
|