@soma-vertical-web/multi-lib 0.0.51 → 0.0.53
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/constants.d.ts +0 -2
- package/contexts/contexts/plp/PLPContext.d.ts +1 -1
- package/contexts/contexts/search/Facets.d.ts +1 -1
- package/contexts/index.d.ts +2 -2
- package/contexts/store/wishlist.d.ts +12 -0
- package/data/api/wishlist/products/index.d.ts +3 -0
- package/index-DfnS9D5I.mjs +354 -0
- package/index-WV5Gjz3i.js +1 -0
- package/index.js +13 -13
- package/index.mjs +2721 -2723
- package/package.json +1 -1
- package/types/constants.d.ts +1 -0
- package/types/contexts/contexts/plp.d.ts +2 -0
- package/types/contexts/contexts/search.d.ts +3 -1
- package/types/contexts/store/wishlist.d.ts +17 -0
package/package.json
CHANGED
package/types/constants.d.ts
CHANGED
|
@@ -79,6 +79,7 @@ export type PDC_NAVIGATIONType = {
|
|
|
79
79
|
export type PLP_PRODUCT_SIMILAR_DELAYType = number;
|
|
80
80
|
export type PLP_SHOW_VIDEO_ON_PRODUCT_CARDType = boolean;
|
|
81
81
|
export type PLP_SIZE_ORDERType = string[];
|
|
82
|
+
export type PLP_SORT_DEFAULTType = 'score:desc' | 'orders:desc' | 'price:desc' | 'price:asc' | 'release:desc' | 'discount:desc' | 'name:asc';
|
|
82
83
|
export type PRODUCT_CARD_IMAGE_ASPECT_RATIOType = string;
|
|
83
84
|
export type PRODUCT_CARD_TEXTSType = {
|
|
84
85
|
disabled: string;
|
|
@@ -5,6 +5,7 @@ import { BannerType } from '../../cms/Sections/Banner';
|
|
|
5
5
|
import { HasVariant, ProductType_PDC } from '../../global/product';
|
|
6
6
|
import { ReadonlyURLSearchParams } from 'next/navigation';
|
|
7
7
|
import { PLPSearchParamsType } from '../../layout/templates/PLP';
|
|
8
|
+
import { PLP_SORT_DEFAULTType } from '../../constants';
|
|
8
9
|
|
|
9
10
|
export type PLPBanners = ({
|
|
10
11
|
columns: number;
|
|
@@ -58,6 +59,7 @@ export interface PLPContextProps {
|
|
|
58
59
|
}
|
|
59
60
|
export interface PLPProviderProps extends PropsWithChildren {
|
|
60
61
|
slug: string[] | string;
|
|
62
|
+
PLP_SORT_DEFAULT: PLP_SORT_DEFAULTType;
|
|
61
63
|
searchParams?: PLPSearchParamsType;
|
|
62
64
|
collectionId?: number | null;
|
|
63
65
|
itemsPerPage?: number;
|
|
@@ -2,7 +2,7 @@ import { Dispatch, PropsWithChildren, SetStateAction } from 'react';
|
|
|
2
2
|
import { ProductSearchResultPage } from '../../data/api/search/product';
|
|
3
3
|
import { State, Suggestion } from '../../data/api/search';
|
|
4
4
|
import { Facet, SelectedFacet } from '../../data/api/search/facets';
|
|
5
|
-
import { ITEMS_PER_PAGEType, PLP_FILTERS_SORT_OPTIONtype } from '../../constants';
|
|
5
|
+
import { ITEMS_PER_PAGEType, PLP_FILTERS_SORT_OPTIONtype, PLP_SORT_DEFAULTType } from '../../constants';
|
|
6
6
|
import { BreadCrumbItemLinkProps } from '../../layout/team-components/PLPNavigation';
|
|
7
7
|
|
|
8
8
|
export interface FacetsContextProps {
|
|
@@ -19,9 +19,11 @@ export interface FacetsProviderProps extends PropsWithChildren, Pick<ProductsPro
|
|
|
19
19
|
searchParams: {
|
|
20
20
|
[key: string]: string | string[] | undefined;
|
|
21
21
|
};
|
|
22
|
+
PLP_SORT_DEFAULT: PLP_SORT_DEFAULTType;
|
|
22
23
|
}
|
|
23
24
|
export interface FacetsProviderContentProps extends FacetsProviderProps {
|
|
24
25
|
selectedFacets: SelectedFacet[];
|
|
26
|
+
PLP_SORT_DEFAULT: PLP_SORT_DEFAULTType;
|
|
25
27
|
}
|
|
26
28
|
export interface ProductsContextProps extends ProductSearchResultPage {
|
|
27
29
|
isLoading: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type WishListStateValue = {
|
|
2
|
+
feedback: {
|
|
3
|
+
active: boolean;
|
|
4
|
+
action: 'add' | 'remove' | '';
|
|
5
|
+
};
|
|
6
|
+
list: string[];
|
|
7
|
+
};
|
|
8
|
+
export type UseWishlistStoreType = {
|
|
9
|
+
value: WishListStateValue;
|
|
10
|
+
actions: {
|
|
11
|
+
reset: () => void;
|
|
12
|
+
setValue: (value: WishListStateValue) => void;
|
|
13
|
+
toggleProduct: (productId: string) => void;
|
|
14
|
+
updateList: (list: string[]) => void;
|
|
15
|
+
resetFeedback: () => void;
|
|
16
|
+
};
|
|
17
|
+
};
|