simpo-component-library 3.6.628 → 3.6.630
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/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +2 -2
- package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +18 -12
- package/esm2022/lib/ecommerce/sections/product-list/product-list.component.mjs +74 -16
- package/esm2022/lib/elements/below-image-card/below-image-card.component.mjs +3 -3
- package/esm2022/lib/elements/top-of-image-card/top-of-image-card.component.mjs +3 -3
- package/esm2022/lib/sections/logo-showcase/logo-showcase.component.mjs +3 -3
- package/esm2022/lib/sections/video-grid-section/video-grid-section.component.mjs +3 -3
- package/esm2022/lib/services/analytics.service.mjs +160 -0
- package/esm2022/lib/services/cart.service.mjs +28 -4
- package/fesm2022/simpo-component-library.mjs +259 -25
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/components/input-fields/input-fields.component.d.ts +1 -1
- package/lib/ecommerce/sections/featured-category/featured-category.component.d.ts +1 -1
- package/lib/ecommerce/sections/featured-category/featured-collection.component.d.ts +1 -1
- package/lib/ecommerce/sections/new-collection/new-collection.component.d.ts +1 -1
- package/lib/ecommerce/sections/product-desc/product-desc.component.d.ts +3 -1
- package/lib/ecommerce/sections/product-list/product-list.component.d.ts +6 -1
- package/lib/sections/image-grid-hotspot/image-grid-hotspot.component.d.ts +1 -1
- package/lib/sections/image-grid-section/image-grid-section.component.d.ts +1 -1
- package/lib/services/analytics.service.d.ts +33 -0
- package/lib/services/cart.service.d.ts +4 -1
- package/package.json +1 -1
- package/simpo-component-library-3.6.630.tgz +0 -0
- package/simpo-component-library-3.6.628.tgz +0 -0
|
@@ -13,7 +13,7 @@ export declare class InputFieldsComponent implements OnChanges {
|
|
|
13
13
|
constructor(elementRef: ElementRef);
|
|
14
14
|
ngOnChanges(changes: SimpleChanges): void;
|
|
15
15
|
handleMoneyInput(event: any): void;
|
|
16
|
-
get getTextColor(): "#
|
|
16
|
+
get getTextColor(): "#000" | "#FFF";
|
|
17
17
|
interpolateColor(color1: string, color2: string, factor: number): string;
|
|
18
18
|
padZero(str: string, length: number): string;
|
|
19
19
|
generateColorBasedOnNumber(number: number): string;
|
|
@@ -32,7 +32,7 @@ export declare class FeaturedCategoryComponent extends BaseSection {
|
|
|
32
32
|
get getDirection(): "ROW" | "COLUMN" | undefined;
|
|
33
33
|
get stylesLayout(): LayOutModel;
|
|
34
34
|
get isMobile(): boolean;
|
|
35
|
-
getJustifyContent(): import("simpo-component-library").ALIGN | "
|
|
35
|
+
getJustifyContent(): "" | import("simpo-component-library").ALIGN | "flex-start";
|
|
36
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeaturedCategoryComponent, never>;
|
|
37
37
|
static ɵcmp: i0.ɵɵComponentDeclaration<FeaturedCategoryComponent, "simpo-featured-category", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "nextComponentColor": { "alias": "nextComponentColor"; "required": false; }; }, {}, never, never, true, never>;
|
|
38
38
|
}
|
|
@@ -32,7 +32,7 @@ export declare class FeaturedCollectionComponent extends BaseSection {
|
|
|
32
32
|
get getDirection(): "ROW" | "COLUMN" | undefined;
|
|
33
33
|
get isMobile(): boolean;
|
|
34
34
|
editSection(): void;
|
|
35
|
-
getJustifyContent(): import("simpo-component-library").ALIGN | "
|
|
35
|
+
getJustifyContent(): "" | import("simpo-component-library").ALIGN | "flex-start";
|
|
36
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeaturedCollectionComponent, never>;
|
|
37
37
|
static ɵcmp: i0.ɵɵComponentDeclaration<FeaturedCollectionComponent, "simpo-featured-collection", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "nextComponentColor": { "alias": "nextComponentColor"; "required": false; }; }, {}, never, never, true, never>;
|
|
38
38
|
}
|
|
@@ -33,7 +33,7 @@ export declare class NewCollectionComponent extends BaseSection {
|
|
|
33
33
|
get isMobile(): boolean;
|
|
34
34
|
editSection(): void;
|
|
35
35
|
getColor(color: any): "#000000" | "#ffffff";
|
|
36
|
-
getJustifyContent(): import("simpo-component-library").ALIGN | "
|
|
36
|
+
getJustifyContent(): "" | import("simpo-component-library").ALIGN | "flex-start";
|
|
37
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<NewCollectionComponent, never>;
|
|
38
38
|
static ɵcmp: i0.ɵɵComponentDeclaration<NewCollectionComponent, "simpo-new-collection", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "nextComponentColor": { "alias": "nextComponentColor"; "required": false; }; }, {}, never, never, true, never>;
|
|
39
39
|
}
|
|
@@ -14,6 +14,7 @@ import { Meta, Title } from '@angular/platform-browser';
|
|
|
14
14
|
import { MatDialog } from '@angular/material/dialog';
|
|
15
15
|
import { MatBottomSheet } from '@angular/material/bottom-sheet';
|
|
16
16
|
import { CustomerReviewComponent } from '../../sections/customer-review/customer-review.component';
|
|
17
|
+
import { AnalyticsService } from '../../../services/analytics.service';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
export declare class ProductDescComponent extends BaseSection {
|
|
19
20
|
private platformId;
|
|
@@ -29,6 +30,7 @@ export declare class ProductDescComponent extends BaseSection {
|
|
|
29
30
|
private readonly bottomSheet;
|
|
30
31
|
private renderer;
|
|
31
32
|
private matDialog;
|
|
33
|
+
private analyticsService;
|
|
32
34
|
reviewComponent: CustomerReviewComponent;
|
|
33
35
|
aboveHeight: ElementRef<HTMLDivElement>;
|
|
34
36
|
container: ElementRef<HTMLDivElement>;
|
|
@@ -52,7 +54,7 @@ export declare class ProductDescComponent extends BaseSection {
|
|
|
52
54
|
showReview: boolean;
|
|
53
55
|
selectedReview: any;
|
|
54
56
|
currentImageIndex: number;
|
|
55
|
-
constructor(platformId: Object, _eventService: EventsService, router: Router, activatedRoute: ActivatedRoute, restService: RestService, cartService: CartService, storageService: StorageServiceService, messageService: MessageService, metaTagService: Meta, titleService: Title, bottomSheet: MatBottomSheet, renderer: Renderer2, matDialog: MatDialog);
|
|
57
|
+
constructor(platformId: Object, _eventService: EventsService, router: Router, activatedRoute: ActivatedRoute, restService: RestService, cartService: CartService, storageService: StorageServiceService, messageService: MessageService, metaTagService: Meta, titleService: Title, bottomSheet: MatBottomSheet, renderer: Renderer2, matDialog: MatDialog, analyticsService: AnalyticsService);
|
|
56
58
|
buttonId?: string;
|
|
57
59
|
button?: ButtonModel;
|
|
58
60
|
styles?: ProductDescStylesModal;
|
|
@@ -12,6 +12,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
12
12
|
import { CartService } from '../../../services/cart.service';
|
|
13
13
|
import { MenuItem, MessageService } from 'primeng/api';
|
|
14
14
|
import { ProductCardTheme } from '../../../styles/index';
|
|
15
|
+
import { AnalyticsService } from '../../../services/analytics.service';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
17
|
interface BaseModel {
|
|
17
18
|
option: string;
|
|
@@ -31,6 +32,7 @@ export declare class ProductListComponent extends BaseSection {
|
|
|
31
32
|
private readonly cartService;
|
|
32
33
|
private readonly messageService;
|
|
33
34
|
private renderer;
|
|
35
|
+
private readonly analyticsService;
|
|
34
36
|
responseData?: Product[];
|
|
35
37
|
data?: ProductListModal;
|
|
36
38
|
index?: number;
|
|
@@ -69,6 +71,7 @@ export declare class ProductListComponent extends BaseSection {
|
|
|
69
71
|
searchTxt: string;
|
|
70
72
|
theme: typeof ProductCardTheme;
|
|
71
73
|
items: MenuItem[] | null;
|
|
74
|
+
latestAnalyicsEvent: string;
|
|
72
75
|
private filterBottomSheetRef;
|
|
73
76
|
private sortingDialogRef;
|
|
74
77
|
categories: BaseModel[];
|
|
@@ -77,7 +80,7 @@ export declare class ProductListComponent extends BaseSection {
|
|
|
77
80
|
listScrollContainer: ElementRef<HTMLDivElement>;
|
|
78
81
|
getScreenSize(): void;
|
|
79
82
|
onWindowScroll(event: Event): void;
|
|
80
|
-
constructor(platformId: Object, _eventService: EventsService, restService: RestService, router: Router, activatedRoute: ActivatedRoute, storageService: StorageServiceService, matBottomSheet: MatBottomSheet, matDialog: MatDialog, cartService: CartService, messageService: MessageService, renderer: Renderer2);
|
|
83
|
+
constructor(platformId: Object, _eventService: EventsService, restService: RestService, router: Router, activatedRoute: ActivatedRoute, storageService: StorageServiceService, matBottomSheet: MatBottomSheet, matDialog: MatDialog, cartService: CartService, messageService: MessageService, renderer: Renderer2, analyticsService: AnalyticsService);
|
|
81
84
|
get stylesLayout(): LayOutModel;
|
|
82
85
|
isOpen: boolean;
|
|
83
86
|
toggleDropdown(): void;
|
|
@@ -103,6 +106,8 @@ export declare class ProductListComponent extends BaseSection {
|
|
|
103
106
|
toShowInJewellery: boolean;
|
|
104
107
|
IsEcommerce: boolean;
|
|
105
108
|
ngOnInit(): void;
|
|
109
|
+
fetchAnalytics(): void;
|
|
110
|
+
getCategoriesAndCollection(): void;
|
|
106
111
|
get selectedCategoryCollectionChips(): {
|
|
107
112
|
id: string;
|
|
108
113
|
name: string;
|
|
@@ -23,7 +23,7 @@ export declare class ImageGridHotspotComponent extends BaseSection {
|
|
|
23
23
|
get headingSpace(): SPACING;
|
|
24
24
|
editSection(): void;
|
|
25
25
|
getLength(): number;
|
|
26
|
-
getJustifyContent(): import("simpo-component-library").ALIGN | "
|
|
26
|
+
getJustifyContent(): "" | import("simpo-component-library").ALIGN | "flex-start";
|
|
27
27
|
private get scrollStep();
|
|
28
28
|
scrollRight(): void;
|
|
29
29
|
isOverflowing: boolean;
|
|
@@ -23,7 +23,7 @@ export declare class ImageGridSectionComponent extends BaseSection {
|
|
|
23
23
|
get headingSpace(): SPACING;
|
|
24
24
|
editSection(): void;
|
|
25
25
|
getLength(): number;
|
|
26
|
-
getJustifyContent(): import("simpo-component-library").ALIGN | "
|
|
26
|
+
getJustifyContent(): "" | import("simpo-component-library").ALIGN | "flex-start";
|
|
27
27
|
private get scrollStep();
|
|
28
28
|
scrollRight(): void;
|
|
29
29
|
isOverflowing: boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { StorageServiceService } from './storage.service';
|
|
3
|
+
import { StorageLike } from '../services/storage-like';
|
|
4
|
+
import { Router } from '@angular/router';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AnalyticsService {
|
|
7
|
+
private http;
|
|
8
|
+
private platformId;
|
|
9
|
+
private document;
|
|
10
|
+
private readonly storageService;
|
|
11
|
+
private API_URL;
|
|
12
|
+
private storage;
|
|
13
|
+
private router;
|
|
14
|
+
private eventQueue;
|
|
15
|
+
private BATCH_SIZE;
|
|
16
|
+
private FLUSH_INTERVAL;
|
|
17
|
+
private currentPage;
|
|
18
|
+
private currentContextMetadata;
|
|
19
|
+
private contextStartTime;
|
|
20
|
+
private contextActiveTime;
|
|
21
|
+
private currentEvent;
|
|
22
|
+
constructor(http: HttpClient, platformId: Object, document: Document, storageService: StorageServiceService, API_URL: string, storage: StorageLike, router: Router);
|
|
23
|
+
startNewContext(metadata: any, event: string): void;
|
|
24
|
+
get getCurrentContext(): any;
|
|
25
|
+
private closeCurrentContext;
|
|
26
|
+
private listenToRouteChange;
|
|
27
|
+
trackUser(event: any, eventType: string): void;
|
|
28
|
+
private startAutoFlush;
|
|
29
|
+
private flush;
|
|
30
|
+
private listenToUnload;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnalyticsService, never>;
|
|
32
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AnalyticsService>;
|
|
33
|
+
}
|
|
@@ -2,15 +2,18 @@ import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
|
|
|
2
2
|
import { Product } from '../ecommerce/styles/product.modal';
|
|
3
3
|
import { RestService } from './rest.service';
|
|
4
4
|
import { StorageServiceService } from './storage.service';
|
|
5
|
+
import { AnalyticsService } from './analytics.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class CartService {
|
|
7
8
|
private readonly storageService;
|
|
8
9
|
private readonly restService;
|
|
9
|
-
|
|
10
|
+
private readonly analyticsService;
|
|
11
|
+
constructor(storageService: StorageServiceService, restService: RestService, analyticsService: AnalyticsService);
|
|
10
12
|
addItemFromCartPage(product: OrderedItems, userCart: any): import("rxjs").Observable<Object>;
|
|
11
13
|
addItemFromWishlistPage(product: OrderedItems, userWishlist: any): import("rxjs").Observable<Object>;
|
|
12
14
|
removeItemFromWishlistPage(product: OrderedItems, userWishlist: any): import("rxjs").Observable<Object>;
|
|
13
15
|
addItemToCart(product: Product | OrderedItems, varientId?: string): void | IDBRequest<IDBValidKey>;
|
|
16
|
+
captureCartAnalytics(productId: string, type: 'ADD_TO_CART' | 'REMOVE_FROM_CART', variantId?: string): void;
|
|
14
17
|
addItemToFavourite(product: Product, varientId?: string): void;
|
|
15
18
|
addItemToTrial(product: Product, varientId?: string): Promise<boolean>;
|
|
16
19
|
addItemToFavFromCart(product: OrderedItems): void;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|