@scayle/storefront-product-listing 0.3.0 → 0.4.0
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.
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { type ProductSortConfig } from '@scayle/storefront-nuxt';
|
|
2
2
|
import { type ComputedRef } from 'vue';
|
|
3
|
-
import type { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
|
|
3
|
+
import type { RouteLocationNormalizedLoadedGeneric, RouteLocationRaw } from 'vue-router';
|
|
4
4
|
type SelectedSort = ProductSortConfig & {
|
|
5
5
|
key: string;
|
|
6
6
|
label: string;
|
|
7
7
|
};
|
|
8
|
+
type SortLink = SelectedSort & {
|
|
9
|
+
to: RouteLocationRaw;
|
|
10
|
+
};
|
|
8
11
|
export interface UseProductListSortReturn {
|
|
9
12
|
selectedSort: ComputedRef<SelectedSort | undefined>;
|
|
10
|
-
sortLinks: ComputedRef<
|
|
13
|
+
sortLinks: ComputedRef<SortLink[]>;
|
|
11
14
|
isDefaultSortSelected: ComputedRef<boolean>;
|
|
12
15
|
}
|
|
13
16
|
export interface ProductListSortOptions {
|
package/package.json
CHANGED