simpo-component-library 3.7.5 → 3.7.6
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/categories-with-image-background-columns/categories-with-image-background-columns.component.mjs +5 -3
- package/esm2022/lib/ecommerce/sections/featured-category/featured-category.component.mjs +5 -5
- package/esm2022/lib/ecommerce/sections/featured-category/featured-collection.component.mjs +5 -5
- package/esm2022/lib/ecommerce/sections/new-collection/new-collection.component.mjs +3 -3
- package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +19 -5
- package/esm2022/lib/ecommerce/sections/product-list/product-list.component.mjs +268 -15
- package/esm2022/lib/ecommerce/styles/Collection.modal.mjs +2 -1
- package/esm2022/lib/ecommerce/styles/category.modal.mjs +2 -1
- package/esm2022/lib/ecommerce/styles/product.modal.mjs +11 -1
- package/esm2022/lib/elements/my-bookings/my-bookings.component.mjs +19 -2
- package/esm2022/lib/sections/footer/footer.component.mjs +10 -7
- package/esm2022/lib/sections/header-section/header-section.component.mjs +33 -7
- package/esm2022/lib/services/rest.service.mjs +37 -2
- package/esm2022/lib/utils/list-route.util.mjs +56 -0
- package/fesm2022/simpo-component-library.mjs +454 -45
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/product-desc/product-desc.component.d.ts +4 -0
- package/lib/ecommerce/sections/product-list/product-list.component.d.ts +46 -1
- package/lib/ecommerce/styles/Collection.modal.d.ts +1 -0
- package/lib/ecommerce/styles/category.modal.d.ts +1 -0
- package/lib/ecommerce/styles/product.modal.d.ts +42 -0
- package/lib/elements/my-bookings/my-bookings.component.d.ts +8 -0
- package/lib/sections/footer/footer.component.d.ts +2 -2
- package/lib/sections/header-section/header-section.component.d.ts +3 -0
- package/lib/services/rest.service.d.ts +13 -2
- package/lib/utils/list-route.util.d.ts +21 -0
- package/package.json +1 -1
- package/simpo-component-library-3.7.6.tgz +0 -0
- package/simpo-component-library-3.7.5.tgz +0 -0
|
@@ -81,6 +81,10 @@ export declare class ProductDescComponent extends BaseSection {
|
|
|
81
81
|
ngOnInit(): void;
|
|
82
82
|
ngAfterViewInit(): void;
|
|
83
83
|
varientLoading: boolean;
|
|
84
|
+
get customFieldSpecs(): {
|
|
85
|
+
label: string;
|
|
86
|
+
value: string;
|
|
87
|
+
}[];
|
|
84
88
|
recentViewItemList: Product[];
|
|
85
89
|
getRelatedProducts(): void;
|
|
86
90
|
selectVarient(key: string, value: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnDestroy, ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
import { ItemVariant, Product } from '../../styles/product.modal';
|
|
2
|
+
import { FilterDef, FilterGroup, ItemVariant, Product } from '../../styles/product.modal';
|
|
3
3
|
import BaseSection from '../../../sections/BaseSection';
|
|
4
4
|
import { ProductListContentModal, ProductListModal, ProductListStylesModal } from './product-list.modal';
|
|
5
5
|
import { EventsService } from '../../../services/events.service';
|
|
@@ -20,6 +20,7 @@ interface BaseModel {
|
|
|
20
20
|
id: string;
|
|
21
21
|
imgUrl: string;
|
|
22
22
|
status: boolean;
|
|
23
|
+
slug?: string;
|
|
23
24
|
}
|
|
24
25
|
interface RatingFilterOption {
|
|
25
26
|
label: string;
|
|
@@ -76,6 +77,24 @@ export declare class ProductListComponent extends BaseSection implements OnDestr
|
|
|
76
77
|
name: string;
|
|
77
78
|
value: string;
|
|
78
79
|
}[];
|
|
80
|
+
private readonly SYSTEM_FILTER_IDS;
|
|
81
|
+
private readonly BUILT_IN_SORTS;
|
|
82
|
+
customFilterGroups: FilterGroup[];
|
|
83
|
+
customChoiceSelections: {
|
|
84
|
+
[identifier: string]: string[];
|
|
85
|
+
};
|
|
86
|
+
customRangeSelections: {
|
|
87
|
+
[identifier: string]: {
|
|
88
|
+
min: string;
|
|
89
|
+
max: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
customGroupCollapsed: {
|
|
93
|
+
[key: string]: boolean;
|
|
94
|
+
};
|
|
95
|
+
private filterOptionsKey;
|
|
96
|
+
urlCategorySlugs: string[];
|
|
97
|
+
urlCollectionSlugs: string[];
|
|
79
98
|
screenWidth: number;
|
|
80
99
|
filterList: any[];
|
|
81
100
|
styles?: ProductListStylesModal;
|
|
@@ -113,6 +132,27 @@ export declare class ProductListComponent extends BaseSection implements OnDestr
|
|
|
113
132
|
raiseLead(): void;
|
|
114
133
|
priceRangeFlag: boolean;
|
|
115
134
|
filterItemList(): void;
|
|
135
|
+
private get customSearchOptions();
|
|
136
|
+
private loadFilterOptions;
|
|
137
|
+
apiFilterIds: Set<string>;
|
|
138
|
+
isApiFilter(identifier: string): boolean;
|
|
139
|
+
private systemList;
|
|
140
|
+
private isSystemListFilter;
|
|
141
|
+
isCustomChoiceSelected(identifier: string, value: string): boolean;
|
|
142
|
+
toggleCustomChoice(filter: FilterDef, value: string): void;
|
|
143
|
+
customRange(identifier: string): {
|
|
144
|
+
min: string;
|
|
145
|
+
max: string;
|
|
146
|
+
};
|
|
147
|
+
setCustomRange(identifier: string, edge: 'min' | 'max', value: string | number | null): void;
|
|
148
|
+
get selectedCustomChips(): {
|
|
149
|
+
id: string;
|
|
150
|
+
name: string;
|
|
151
|
+
type: string;
|
|
152
|
+
identifier: string;
|
|
153
|
+
value?: string;
|
|
154
|
+
}[];
|
|
155
|
+
get displayChips(): any[];
|
|
116
156
|
dynamicPriceRange(minPrice: number, maxPrice: number): void;
|
|
117
157
|
selectOption(filter: any, event: MouseEvent): void;
|
|
118
158
|
getSelectedName(): string;
|
|
@@ -128,6 +168,11 @@ export declare class ProductListComponent extends BaseSection implements OnDestr
|
|
|
128
168
|
ngOnInit(): void;
|
|
129
169
|
fetchAnalytics(): void;
|
|
130
170
|
getCategoriesAndCollection(): void;
|
|
171
|
+
private listsLoaded;
|
|
172
|
+
private lastListPath;
|
|
173
|
+
private listPathSubscription?;
|
|
174
|
+
private currentListPath;
|
|
175
|
+
private resolveListRouteParams;
|
|
131
176
|
get selectedCategoryCollectionChips(): {
|
|
132
177
|
id: string;
|
|
133
178
|
name: string;
|
|
@@ -38,6 +38,9 @@ export declare class Product {
|
|
|
38
38
|
tags: string[];
|
|
39
39
|
jewelryPriceBreakup: any;
|
|
40
40
|
configs: any;
|
|
41
|
+
customFieldValues: {
|
|
42
|
+
[identifier: string]: any;
|
|
43
|
+
};
|
|
41
44
|
constructor(json?: {
|
|
42
45
|
[key: string]: any;
|
|
43
46
|
});
|
|
@@ -105,10 +108,49 @@ export interface ItemVariant {
|
|
|
105
108
|
variantImages: ItemImage[];
|
|
106
109
|
itemPacks: ItemPack[];
|
|
107
110
|
properties: any;
|
|
111
|
+
options?: ItemVariantOption[];
|
|
108
112
|
itemVariantPrice: ItemVariantPrice;
|
|
109
113
|
itemInventory: ItemInventory2;
|
|
110
114
|
itemStatus: string;
|
|
111
115
|
}
|
|
116
|
+
export interface ItemVariantOption {
|
|
117
|
+
name: string;
|
|
118
|
+
value: string;
|
|
119
|
+
}
|
|
120
|
+
export interface FilterChoice {
|
|
121
|
+
value: string;
|
|
122
|
+
label: string;
|
|
123
|
+
count: number;
|
|
124
|
+
}
|
|
125
|
+
export interface FilterDef {
|
|
126
|
+
identifier: string;
|
|
127
|
+
label: string;
|
|
128
|
+
type: string;
|
|
129
|
+
control: 'MULTI_SELECT' | 'SELECT' | 'RANGE' | 'BOOLEAN' | 'LOOKUP' | string;
|
|
130
|
+
choices: FilterChoice[];
|
|
131
|
+
min?: number | null;
|
|
132
|
+
max?: number | null;
|
|
133
|
+
}
|
|
134
|
+
export interface FilterGroup {
|
|
135
|
+
key: string;
|
|
136
|
+
label: string;
|
|
137
|
+
filters: FilterDef[];
|
|
138
|
+
}
|
|
139
|
+
export interface SortOption {
|
|
140
|
+
key: string;
|
|
141
|
+
label: string;
|
|
142
|
+
}
|
|
143
|
+
export interface FilterOptions {
|
|
144
|
+
sorts: SortOption[];
|
|
145
|
+
groups: FilterGroup[];
|
|
146
|
+
filters: FilterDef[];
|
|
147
|
+
}
|
|
148
|
+
export interface CustomFieldFilter {
|
|
149
|
+
identifier: string;
|
|
150
|
+
values?: string[];
|
|
151
|
+
min?: string;
|
|
152
|
+
max?: string;
|
|
153
|
+
}
|
|
112
154
|
export interface ItemPack {
|
|
113
155
|
itemPackId: string;
|
|
114
156
|
packName: string;
|
|
@@ -45,6 +45,10 @@ interface BookingRow {
|
|
|
45
45
|
/** Transient, computed on every backend read of this group - see BookingGroup#canReschedule. */
|
|
46
46
|
canReschedule?: boolean;
|
|
47
47
|
rescheduleBlockedReason?: string;
|
|
48
|
+
/** Not part of the GET /booking/group/my response either - resolved lazily, once, the first
|
|
49
|
+
* time this booking's detail is viewed (see viewBookingDetail()), so the "Add service" action
|
|
50
|
+
* only shows when there's actually something left to add. undefined = not checked yet. */
|
|
51
|
+
addServiceAvailable?: boolean;
|
|
48
52
|
}
|
|
49
53
|
/**
|
|
50
54
|
* "My Bookings" - a customer's own booking history (Upcoming/Past), a detail view per booking,
|
|
@@ -121,6 +125,10 @@ export declare class MyBookingsComponent implements OnInit {
|
|
|
121
125
|
get canRescheduleSelected(): boolean;
|
|
122
126
|
get canAddServiceSelected(): boolean;
|
|
123
127
|
viewBookingDetail(b: BookingRow): void;
|
|
128
|
+
/** Lazy, cached on the row - only ever queried once per booking (re-queried after a successful
|
|
129
|
+
* add, since what's addable just changed). Best-effort: a failure just leaves the action
|
|
130
|
+
* hidden, same as this component's other non-critical lookups. */
|
|
131
|
+
private checkAddServiceAvailability;
|
|
124
132
|
backToList(): void;
|
|
125
133
|
openReschedulePanel(): void;
|
|
126
134
|
closeReschedulePanel(): void;
|
|
@@ -38,8 +38,8 @@ export declare class FooterComponent extends BaseSection {
|
|
|
38
38
|
navigateToHome(): void;
|
|
39
39
|
popularSearchedCategories: any[];
|
|
40
40
|
getPopularSearches(): void;
|
|
41
|
-
redirectToCollection(
|
|
42
|
-
redirectToCategory(
|
|
41
|
+
redirectToCollection(collection: any, category: any): void;
|
|
42
|
+
redirectToCategory(category: any): void;
|
|
43
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<FooterComponent, never>;
|
|
44
44
|
static ɵcmp: i0.ɵɵComponentDeclaration<FooterComponent, "simpo-footer", never, { "data": { "alias": "data"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
|
|
45
45
|
}
|
|
@@ -131,6 +131,7 @@ export declare class HeaderSectionComponent implements OnInit, AfterViewInit, On
|
|
|
131
131
|
showList: boolean;
|
|
132
132
|
dropdownLeft: number;
|
|
133
133
|
dropdownTop: number;
|
|
134
|
+
private closeDropdownTimeout;
|
|
134
135
|
showCollections: boolean;
|
|
135
136
|
categoryList: any;
|
|
136
137
|
collectionList: any;
|
|
@@ -166,6 +167,8 @@ export declare class HeaderSectionComponent implements OnInit, AfterViewInit, On
|
|
|
166
167
|
openSubmenuChild: any;
|
|
167
168
|
toggleSubMenu(child: any, event: Event): void;
|
|
168
169
|
private updateDropdownPosition;
|
|
170
|
+
scheduleCloseDropdown(): void;
|
|
171
|
+
cancelCloseDropdown(): void;
|
|
169
172
|
toggleChildMenu(ele: any, event?: Event): void;
|
|
170
173
|
setChildMenu(ele: any): void;
|
|
171
174
|
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderSectionComponent, never>;
|
|
@@ -3,7 +3,7 @@ import { OnDestroy } from '@angular/core';
|
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { Review } from '../ecommerce/styles/review.modal';
|
|
5
5
|
import { DeviceInfo } from '../ecommerce/styles/user.modal';
|
|
6
|
-
import { checkItemAlreadyAdded, syncItemToServerDBRequest } from '../ecommerce/styles/product.modal';
|
|
6
|
+
import { checkItemAlreadyAdded, CustomFieldFilter, FilterOptions, syncItemToServerDBRequest } from '../ecommerce/styles/product.modal';
|
|
7
7
|
import { CookieService } from 'ngx-cookie-service';
|
|
8
8
|
import { StorageLike } from '../services/storage-like';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
@@ -42,7 +42,18 @@ export declare class RestService implements OnDestroy {
|
|
|
42
42
|
getAllCategories(): Observable<any>;
|
|
43
43
|
getAllCollections(): Observable<any>;
|
|
44
44
|
getAllBrands(): Observable<any>;
|
|
45
|
-
|
|
45
|
+
getFilterOptions(scope?: {
|
|
46
|
+
categoryIds?: string[];
|
|
47
|
+
collectionIds?: string[];
|
|
48
|
+
categorySlugNames?: string[];
|
|
49
|
+
collectionSlugNames?: string[];
|
|
50
|
+
}): Observable<FilterOptions>;
|
|
51
|
+
getFilteredProduct(collectionIds: string[], categoryIds: string[], searchText: string, minPrice: number, maxPrice: number, minRating: number, maxRating: number, sortBy: string, pageNo: number, size: number, brandIds?: string[], extra?: {
|
|
52
|
+
customFieldFilters?: CustomFieldFilter[];
|
|
53
|
+
sortDirection?: 'asc' | 'desc';
|
|
54
|
+
categorySlugName?: string[];
|
|
55
|
+
collectionSlugName?: string[];
|
|
56
|
+
}): Observable<{
|
|
46
57
|
count: any;
|
|
47
58
|
minPrice: any;
|
|
48
59
|
maxPrice: any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface Sluggable {
|
|
2
|
+
slugName?: string | null;
|
|
3
|
+
categoryName?: string | null;
|
|
4
|
+
collectionName?: string | null;
|
|
5
|
+
refName?: string | null;
|
|
6
|
+
name?: string | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function slugFromName(name?: string | null): string;
|
|
9
|
+
export declare function listSlug(item?: Sluggable | string | null): string;
|
|
10
|
+
/** Commands for `router.navigate`, e.g. `['/list', 'mens-wear', 'summer-wear']`. */
|
|
11
|
+
export declare function listPath(target: {
|
|
12
|
+
category?: Sluggable | string | null;
|
|
13
|
+
collection?: Sluggable | string | null;
|
|
14
|
+
}): string[];
|
|
15
|
+
/**
|
|
16
|
+
* Slug segments of a list page pathname, at most `[category, collection]`.
|
|
17
|
+
* `/list/mens-wear/summer-wear` and a host route that serves the list at the root,
|
|
18
|
+
* `/mens-wear/summer-wear`, both give `['mens-wear', 'summer-wear']`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseListPath(pathname: string): string[];
|
|
21
|
+
export {};
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|