@shopware/composables 1.9.0 → 1.10.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.
- package/README.md +30 -6
- package/dist/index.d.mts +99 -29
- package/dist/index.d.ts +99 -29
- package/dist/index.mjs +104 -59
- package/package.json +10 -10
- package/src/cms/cmsAssociations.ts +5 -1
- package/src/cms/useCmsElementConfig.ts +1 -1
- package/src/types/cmsBlockTypes.ts +2 -0
- package/src/types/cmsElementTypes.ts +25 -19
- package/src/useCart/useCart.test.ts +12 -0
- package/src/useCart/useCart.ts +17 -0
- package/src/useCountries/useCountries.test.ts +41 -0
- package/src/useCountries/useCountries.ts +16 -0
- package/src/useCustomerOrders/useCustomerOrders.ts +1 -1
- package/src/useDefaultOrderAssociations/useDefaultOrderAssociations.test.ts +19 -21
- package/src/useDefaultOrderAssociations/useDefaultOrderAssociations.ts +23 -30
- package/src/useLandingSearch/useLandingSearch.test.ts +1 -1
- package/src/useLandingSearch/useLandingSearch.ts +1 -1
- package/src/useListing/useListing.test.ts +73 -0
- package/src/useListing/useListing.ts +10 -3
- package/src/useNavigationSearch/useNavigationSearch.test.ts +21 -0
- package/src/useNavigationSearch/useNavigationSearch.ts +6 -3
- package/src/useNewsletter/useNewsletter.ts +13 -0
- package/src/useOrderDetails/useOrderDetails.ts +5 -11
- package/src/useOrderPayment/useOrderPayment.ts +1 -0
- package/src/usePrice/usePrice.test.ts +3 -3
- package/src/useProductWishlist/useProductWishlist.ts +2 -2
- package/src/useSessionContext/useSessionContext.ts +1 -1
- package/src/useSyncWishlist/useSyncWishlist.test.ts +34 -17
- package/src/useSyncWishlist/useSyncWishlist.ts +27 -8
- package/src/useUser/useUser.test.ts +126 -3
- package/src/useUser/useUser.ts +6 -1
- package/src/useWishlist/useWishlist.test.ts +9 -0
- package/src/useWishlist/useWishlist.ts +22 -6
package/README.md
CHANGED
|
@@ -157,7 +157,7 @@ All composable functions are fully typed with TypeScript and they are registed g
|
|
|
157
157
|
|
|
158
158
|
- [📘 Documentation](https://frontends.shopware.com)
|
|
159
159
|
|
|
160
|
-
- [👥 Community
|
|
160
|
+
- [👥 Community Discord](https://discord.com/channels/1308047705309708348/1405501315160739951) (`#composable-frontend`)
|
|
161
161
|
|
|
162
162
|
<!-- AUTO GENERATED CHANGELOG -->
|
|
163
163
|
|
|
@@ -165,15 +165,39 @@ All composable functions are fully typed with TypeScript and they are registed g
|
|
|
165
165
|
|
|
166
166
|
Full changelog for stable version is available [here](https://github.com/shopware/frontends/blob/main/packages/composables/CHANGELOG.md)
|
|
167
167
|
|
|
168
|
-
### Latest changes: 1.
|
|
168
|
+
### Latest changes: 1.10.0
|
|
169
169
|
|
|
170
170
|
### Minor Changes
|
|
171
171
|
|
|
172
|
-
- [#
|
|
172
|
+
- [#2098](https://github.com/shopware/frontends/pull/2098) [`a44d871`](https://github.com/shopware/frontends/commit/a44d8712d9ae5ee196c03ac8b894f3d1392d0e68) Thanks [@mdanilowicz](https://github.com/mdanilowicz)! - Enhanced the `useSyncWishlist` composable by exposing the `limit`, `products`, and `isLoading` properties, allowing better control and monitoring of the wishlist state. Similarly, updated `useWishlist` to also expose `limit`, `products`, and `isLoading` properties for both local and synced wishlists, providing a consistent API and improved state handling for wishlist management.
|
|
173
173
|
|
|
174
|
-
- [#
|
|
174
|
+
- [#1997](https://github.com/shopware/frontends/pull/1997) [`e43d9b7`](https://github.com/shopware/frontends/commit/e43d9b7f559af21be8b66f2021cea2d14940e4aa) Thanks [@mdanilowicz](https://github.com/mdanilowicz)! - Added consts `SUBSRIBE_KEY` and `UNSUBSCRIBE_KEY` for newsletter status in useNewsletter composable
|
|
175
|
+
|
|
176
|
+
- [#1974](https://github.com/shopware/frontends/pull/1974) [`7fe2ef9`](https://github.com/shopware/frontends/commit/7fe2ef96a9d9d156683b85d31f0a660458c9fbfd) Thanks [@mkucmus](https://github.com/mkucmus)! - Use proper associations format within `useDefaultOrderAssociations` (no redundant nesting).
|
|
177
|
+
|
|
178
|
+
Returned value is in type of `Schemas["Criteria"]['associations']` now:
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
const { loadOrders } = useCustomerOrders();
|
|
182
|
+
|
|
183
|
+
loadOrders({
|
|
184
|
+
// ... other parameters
|
|
185
|
+
associations: useDefaultOrderAssociations(),
|
|
186
|
+
});
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
- [#2176](https://github.com/shopware/frontends/pull/2176) [`c647baf`](https://github.com/shopware/frontends/commit/c647baf93e7174b849f5961ee5803add99d78602) Thanks [@mkucmus](https://github.com/mkucmus)! - - Add `initialListing` parameter to `useListing` composable for SSR data hydration
|
|
190
|
+
- Update `createCategoryListingContext` to accept initial listing data
|
|
191
|
+
- Maintain backward compatibility with existing implementations
|
|
192
|
+
|
|
193
|
+
- [#1959](https://github.com/shopware/frontends/pull/1959) [`c77daa6`](https://github.com/shopware/frontends/commit/c77daa6a11e96c7f3688b16f7da010b54c7f5e8b) Thanks [@patzick](https://github.com/patzick)! - Updated default types to Shopware 6.7
|
|
175
194
|
|
|
176
195
|
### Patch Changes
|
|
177
196
|
|
|
178
|
-
-
|
|
179
|
-
|
|
197
|
+
- [`87771c3`](https://github.com/shopware/frontends/commit/87771c3b7a4521fcdba43cb4c967b61f5db01b3e) Thanks [@mkucmus](https://github.com/mkucmus)! - add nested media entity association explicitly
|
|
198
|
+
|
|
199
|
+
- [#1985](https://github.com/shopware/frontends/pull/1985) [`2cbda25`](https://github.com/shopware/frontends/commit/2cbda257a1056454e12f2fba9052f83eecb6d986) Thanks [@mkucmus](https://github.com/mkucmus)! - Change `isInWishlist` property type to `ComputedRef` within `useProductWishlist` composable.
|
|
200
|
+
|
|
201
|
+
- Updated dependencies [[`22ff62e`](https://github.com/shopware/frontends/commit/22ff62e354f024599d64ea8096af57695248851c), [`2cbda25`](https://github.com/shopware/frontends/commit/2cbda257a1056454e12f2fba9052f83eecb6d986), [`70dcf95`](https://github.com/shopware/frontends/commit/70dcf95d4370c63964d877a5cab113a53f93ca19), [`56cd178`](https://github.com/shopware/frontends/commit/56cd178e25fe2399b7170ccac3044e980621f041), [`e1fae3e`](https://github.com/shopware/frontends/commit/e1fae3eb6430e5c8e133456fbaf7f215f80c36f6), [`c647baf`](https://github.com/shopware/frontends/commit/c647baf93e7174b849f5961ee5803add99d78602), [`c77daa6`](https://github.com/shopware/frontends/commit/c77daa6a11e96c7f3688b16f7da010b54c7f5e8b)]:
|
|
202
|
+
- @shopware/helpers@1.6.0
|
|
203
|
+
- @shopware/api-client@1.4.0
|
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import * as vue from 'vue';
|
|
|
2
2
|
import { CSSProperties, ComputedRef, AnchorHTMLAttributes, ImgHTMLAttributes, App, EffectScope, Ref } from 'vue';
|
|
3
3
|
import { createAPIClient, ApiError } from '@shopware/api-client';
|
|
4
4
|
import { operations as operations$1, components } from '@shopware/api-client/store-api-types';
|
|
5
|
+
import * as _shopware_api_client_api_types from '@shopware/api-client/api-types';
|
|
5
6
|
import { getListingFilters, TierPrice } from '@shopware/helpers';
|
|
6
7
|
|
|
7
8
|
type operations = operations$1;
|
|
@@ -52,6 +53,7 @@ type CmsBlockProductDescriptionReviews = BlockType<"content">;
|
|
|
52
53
|
type CmsBlockCrossSelling = BlockType<"content">;
|
|
53
54
|
type CmsBlockForm = BlockType<"content">;
|
|
54
55
|
type CmsBlockHtml = BlockType<"content">;
|
|
56
|
+
type CmsBlockImageGalleryBig = BlockType<"imageGallery">;
|
|
55
57
|
|
|
56
58
|
type SourceType = "static" | "mapped";
|
|
57
59
|
type Position = "left" | "center" | "right";
|
|
@@ -72,7 +74,7 @@ type ElementFieldConfig = {
|
|
|
72
74
|
value: string | null;
|
|
73
75
|
apiAlias: string;
|
|
74
76
|
};
|
|
75
|
-
type CmsElementText = Schemas["CmsSlot"] & {
|
|
77
|
+
type CmsElementText = Omit<Schemas["CmsSlot"], "config"> & {
|
|
76
78
|
type: "text" | typeof String;
|
|
77
79
|
slot: typeof String;
|
|
78
80
|
config: TextElementConfig;
|
|
@@ -85,7 +87,7 @@ type CmsElementText = Schemas["CmsSlot"] & {
|
|
|
85
87
|
config: TextElementConfig;
|
|
86
88
|
};
|
|
87
89
|
};
|
|
88
|
-
type CmsElementHtml = Schemas["CmsSlot"] & {
|
|
90
|
+
type CmsElementHtml = Omit<Schemas["CmsSlot"], "config"> & {
|
|
89
91
|
type: "html";
|
|
90
92
|
data: {
|
|
91
93
|
content: string;
|
|
@@ -103,7 +105,7 @@ type ImageElementConfig = {
|
|
|
103
105
|
verticalAlign: ElementConfig<VerticalAlign>;
|
|
104
106
|
horizontalAlign: ElementConfig<VerticalAlign>;
|
|
105
107
|
};
|
|
106
|
-
type CmsElementImage = Schemas["CmsSlot"] & {
|
|
108
|
+
type CmsElementImage = Omit<Schemas["CmsSlot"], "config"> & {
|
|
107
109
|
type: "image";
|
|
108
110
|
config: ImageElementConfig;
|
|
109
111
|
data: {
|
|
@@ -130,7 +132,7 @@ type ImageSliderElementConfig = ImageElementConfig & SliderElementConfig & {
|
|
|
130
132
|
mediaUrl: string;
|
|
131
133
|
}>>;
|
|
132
134
|
};
|
|
133
|
-
type CmsElementImageSlider = Schemas["CmsSlot"] & {
|
|
135
|
+
type CmsElementImageSlider = Omit<Schemas["CmsSlot"], "config"> & {
|
|
134
136
|
type: "image-slider";
|
|
135
137
|
config: ImageSliderElementConfig;
|
|
136
138
|
data: {
|
|
@@ -152,7 +154,7 @@ type ImageGalleryElementConfig = ImageSliderElementConfig & {
|
|
|
152
154
|
fullScreen: ElementConfig<boolean>;
|
|
153
155
|
zoom: ElementConfig<boolean>;
|
|
154
156
|
};
|
|
155
|
-
type CmsElementImageGallery = Schemas["CmsSlot"] & {
|
|
157
|
+
type CmsElementImageGallery = Omit<Schemas["CmsSlot"], "config"> & {
|
|
156
158
|
type: "image-gallery";
|
|
157
159
|
config: ImageGalleryElementConfig;
|
|
158
160
|
data: {
|
|
@@ -177,9 +179,9 @@ type YouTubeVideoElementConfig = {
|
|
|
177
179
|
previewMedia: ElementConfig<string>;
|
|
178
180
|
showControls: ElementConfig<boolean>;
|
|
179
181
|
needsConfirmation: ElementConfig<boolean>;
|
|
180
|
-
|
|
182
|
+
advancedPrivacyMode: ElementConfig<boolean>;
|
|
181
183
|
};
|
|
182
|
-
type CmsElementYoutubeVideo = Schemas["CmsSlot"] & {
|
|
184
|
+
type CmsElementYoutubeVideo = Omit<Schemas["CmsSlot"], "config"> & {
|
|
183
185
|
type: "youtube-video";
|
|
184
186
|
config: YouTubeVideoElementConfig;
|
|
185
187
|
data: {
|
|
@@ -204,7 +206,7 @@ type VimeoVideoElementConfig = {
|
|
|
204
206
|
previewMedia: ElementConfig<string>;
|
|
205
207
|
needsConfirmation: ElementConfig<boolean>;
|
|
206
208
|
};
|
|
207
|
-
type CmsElementVimeoVideo = Schemas["CmsSlot"] & {
|
|
209
|
+
type CmsElementVimeoVideo = Omit<Schemas["CmsSlot"], "config"> & {
|
|
208
210
|
type: "vimeo-video";
|
|
209
211
|
config: VimeoVideoElementConfig;
|
|
210
212
|
data: {
|
|
@@ -219,7 +221,7 @@ type ProductBoxElementConfig = {
|
|
|
219
221
|
boxLayout: ElementConfig<BoxLayout>;
|
|
220
222
|
product: ElementConfig<string>;
|
|
221
223
|
};
|
|
222
|
-
type CmsElementProductBox = Schemas["CmsSlot"] & {
|
|
224
|
+
type CmsElementProductBox = Omit<Schemas["CmsSlot"], "config"> & {
|
|
223
225
|
type: "product-box";
|
|
224
226
|
config: ProductBoxElementConfig;
|
|
225
227
|
data: {
|
|
@@ -241,7 +243,7 @@ type ProductSliderElementConfig = {
|
|
|
241
243
|
productStream: ElementConfig<string>;
|
|
242
244
|
productStreamSorting: ElementConfig<string>;
|
|
243
245
|
};
|
|
244
|
-
type CmsElementProductSlider = Schemas["CmsSlot"] & {
|
|
246
|
+
type CmsElementProductSlider = Omit<Schemas["CmsSlot"], "config"> & {
|
|
245
247
|
type: "product-slider";
|
|
246
248
|
config: ProductSliderElementConfig;
|
|
247
249
|
data: {
|
|
@@ -259,7 +261,7 @@ type CmsSidebarFilterElementConfig = {
|
|
|
259
261
|
url: ElementConfig<string>;
|
|
260
262
|
verticalAlign: ElementConfig<VerticalAlign>;
|
|
261
263
|
};
|
|
262
|
-
type CmsElementSidebarFilter = Schemas["CmsSlot"] & {
|
|
264
|
+
type CmsElementSidebarFilter = Omit<Schemas["CmsSlot"], "config"> & {
|
|
263
265
|
type: "sidebar-filter";
|
|
264
266
|
config: CmsSidebarFilterElementConfig;
|
|
265
267
|
};
|
|
@@ -272,7 +274,7 @@ type CmsProductListingElementConfig = {
|
|
|
272
274
|
availableSortings: ElementConfig<string[]>;
|
|
273
275
|
propertyWhitelist: ElementConfig<string[]>;
|
|
274
276
|
};
|
|
275
|
-
type CmsElementProductListing = Schemas["CmsSlot"] & {
|
|
277
|
+
type CmsElementProductListing = Omit<Schemas["CmsSlot"], "config"> & {
|
|
276
278
|
type: "product-listing";
|
|
277
279
|
config: CmsProductListingElementConfig;
|
|
278
280
|
data: {
|
|
@@ -281,7 +283,7 @@ type CmsElementProductListing = Schemas["CmsSlot"] & {
|
|
|
281
283
|
};
|
|
282
284
|
};
|
|
283
285
|
type CategoryNavigationElementConfig = unknown;
|
|
284
|
-
type CmsElementCategoryNavigation = Schemas["CmsSlot"] & {
|
|
286
|
+
type CmsElementCategoryNavigation = Omit<Schemas["CmsSlot"], "config"> & {
|
|
285
287
|
type: "category-navigation";
|
|
286
288
|
config: CategoryNavigationElementConfig;
|
|
287
289
|
};
|
|
@@ -289,7 +291,7 @@ type ProductDescriptionReviewsElementConfig = {
|
|
|
289
291
|
product: ElementConfig<string>;
|
|
290
292
|
alignment: ElementConfig<VerticalAlign>;
|
|
291
293
|
};
|
|
292
|
-
type CmsElementProductDescriptionReviews = Schemas["CmsSlot"] & {
|
|
294
|
+
type CmsElementProductDescriptionReviews = Omit<Schemas["CmsSlot"], "config"> & {
|
|
293
295
|
type: "product-description-reviews";
|
|
294
296
|
config: ProductDescriptionReviewsElementConfig;
|
|
295
297
|
data: {
|
|
@@ -303,7 +305,7 @@ type CmsElementProductDescriptionReviews = Schemas["CmsSlot"] & {
|
|
|
303
305
|
};
|
|
304
306
|
};
|
|
305
307
|
type BuyBoxElementConfig = ProductDescriptionReviewsElementConfig;
|
|
306
|
-
type CmsElementBuyBox = Schemas["CmsSlot"] & {
|
|
308
|
+
type CmsElementBuyBox = Omit<Schemas["CmsSlot"], "config"> & {
|
|
307
309
|
type: "buy-box";
|
|
308
310
|
config: BuyBoxElementConfig;
|
|
309
311
|
data: {
|
|
@@ -322,7 +324,7 @@ type CrossSellingElementConfig = {
|
|
|
322
324
|
elMinWidth: ElementConfig<string>;
|
|
323
325
|
displayMode: ElementConfig<DisplayMode>;
|
|
324
326
|
};
|
|
325
|
-
type CmsElementCrossSelling = Schemas["CmsSlot"] & {
|
|
327
|
+
type CmsElementCrossSelling = Omit<Schemas["CmsSlot"], "config"> & {
|
|
326
328
|
type: "cross-selling";
|
|
327
329
|
config: CrossSellingElementConfig;
|
|
328
330
|
data: {
|
|
@@ -337,12 +339,12 @@ type FormElementConfig = {
|
|
|
337
339
|
confirmationText: ElementConfig<string>;
|
|
338
340
|
defaultMailReceiver: ElementConfig<boolean>;
|
|
339
341
|
};
|
|
340
|
-
type CmsElementForm = Schemas["CmsSlot"] & {
|
|
342
|
+
type CmsElementForm = Omit<Schemas["CmsSlot"], "config"> & {
|
|
341
343
|
type: "form";
|
|
342
344
|
config: FormElementConfig;
|
|
343
345
|
data: Schemas["Salutation"][];
|
|
344
346
|
};
|
|
345
|
-
type CmsElementProductName = Schemas["CmsSlot"] & {
|
|
347
|
+
type CmsElementProductName = Omit<Schemas["CmsSlot"], "config"> & {
|
|
346
348
|
type: "product-name";
|
|
347
349
|
config: TextElementConfig;
|
|
348
350
|
fieldConfig: ElementFieldConfig[];
|
|
@@ -354,7 +356,7 @@ type CmsElementProductName = Schemas["CmsSlot"] & {
|
|
|
354
356
|
config: TextElementConfig;
|
|
355
357
|
};
|
|
356
358
|
};
|
|
357
|
-
type CmsElementManufacturerLogo = Schemas["CmsSlot"] & {
|
|
359
|
+
type CmsElementManufacturerLogo = Omit<Schemas["CmsSlot"], "config"> & {
|
|
358
360
|
type: "manufacturer-logo";
|
|
359
361
|
config: ImageElementConfig;
|
|
360
362
|
data: {
|
|
@@ -405,7 +407,7 @@ declare function useCmsElementImage(element: CmsElementImage | CmsElementManufac
|
|
|
405
407
|
*
|
|
406
408
|
* @category CMS (Shopping Experiences)
|
|
407
409
|
*/
|
|
408
|
-
declare function useCmsElementConfig<T extends Schemas["CmsSlot"] & {
|
|
410
|
+
declare function useCmsElementConfig<T extends Omit<Schemas["CmsSlot"], "config"> & {
|
|
409
411
|
config: T["config"] extends {
|
|
410
412
|
[key in infer X extends keyof T["config"]]: ElementConfig<unknown>;
|
|
411
413
|
} ? {
|
|
@@ -623,6 +625,10 @@ type UseCartReturn = {
|
|
|
623
625
|
* Removes the provided LineItem from the cart
|
|
624
626
|
*/
|
|
625
627
|
removeItem(lineItem: Schemas["LineItem"]): Promise<Schemas["Cart"]>;
|
|
628
|
+
/**
|
|
629
|
+
* Removes the item with the provided id from the cart
|
|
630
|
+
*/
|
|
631
|
+
removeItemById(id: string): Promise<Schemas["Cart"]>;
|
|
626
632
|
/**
|
|
627
633
|
* The total price of the cart (including calculated costs like shipping)
|
|
628
634
|
*/
|
|
@@ -917,6 +923,10 @@ type UseCountriesReturn = {
|
|
|
917
923
|
getCountries: ComputedRef<Schemas["Country"][]>;
|
|
918
924
|
fetchCountries(): Promise<operations["readCountry post /country"]["response"]>;
|
|
919
925
|
getStatesForCountry(countryId: string): Schemas["CountryState"][] | null;
|
|
926
|
+
getCountriesOptions: ComputedRef<{
|
|
927
|
+
label: string;
|
|
928
|
+
value: string;
|
|
929
|
+
}[]>;
|
|
920
930
|
};
|
|
921
931
|
/**
|
|
922
932
|
* Composable to manage countries
|
|
@@ -977,15 +987,12 @@ type UseCustomerPasswordReturn = {
|
|
|
977
987
|
*/
|
|
978
988
|
declare function useCustomerPassword(): UseCustomerPasswordReturn;
|
|
979
989
|
|
|
980
|
-
type UseDefaultOrderAssociationsReturn = Schemas["Criteria"] & {
|
|
981
|
-
checkPromotion?: boolean;
|
|
982
|
-
};
|
|
983
990
|
/**
|
|
984
991
|
* Returns default order associations. You can override this composable in your project.
|
|
985
992
|
* @public
|
|
986
993
|
* @category Order
|
|
987
994
|
*/
|
|
988
|
-
declare function useDefaultOrderAssociations():
|
|
995
|
+
declare function useDefaultOrderAssociations(): Schemas["Criteria"]["associations"];
|
|
989
996
|
|
|
990
997
|
type UseInternationalizationReturn = {
|
|
991
998
|
/**
|
|
@@ -1201,8 +1208,42 @@ declare function useListing(params?: {
|
|
|
1201
1208
|
listingType: ListingType;
|
|
1202
1209
|
categoryId?: string;
|
|
1203
1210
|
defaultSearchCriteria?: operations["searchPage post /search"]["body"];
|
|
1211
|
+
initialListing?: Schemas["ProductListingResult"] | null;
|
|
1204
1212
|
}): UseListingReturn;
|
|
1205
|
-
declare const createCategoryListingContext: (
|
|
1213
|
+
declare const createCategoryListingContext: (initialListing?: ({
|
|
1214
|
+
aggregations?: _shopware_api_client_api_types.GenericRecord[];
|
|
1215
|
+
entity?: string;
|
|
1216
|
+
limit?: number;
|
|
1217
|
+
page?: number;
|
|
1218
|
+
total?: number;
|
|
1219
|
+
} & {
|
|
1220
|
+
apiAlias: "product_listing";
|
|
1221
|
+
availableSortings: {
|
|
1222
|
+
apiAlias: "product_sorting";
|
|
1223
|
+
key: string;
|
|
1224
|
+
label: string;
|
|
1225
|
+
priority: number;
|
|
1226
|
+
translated: {
|
|
1227
|
+
key: string;
|
|
1228
|
+
label: string;
|
|
1229
|
+
};
|
|
1230
|
+
}[];
|
|
1231
|
+
currentFilters: {
|
|
1232
|
+
manufacturer: string[];
|
|
1233
|
+
navigationId: string;
|
|
1234
|
+
price: {
|
|
1235
|
+
max: number;
|
|
1236
|
+
min: number;
|
|
1237
|
+
};
|
|
1238
|
+
properties: string[];
|
|
1239
|
+
rating: number | null;
|
|
1240
|
+
search?: string;
|
|
1241
|
+
"shipping-free": boolean;
|
|
1242
|
+
};
|
|
1243
|
+
elements: _shopware_api_client_api_types.components["schemas"]["Product"][];
|
|
1244
|
+
entity?: "product";
|
|
1245
|
+
sorting?: string;
|
|
1246
|
+
}) | null | undefined) => UseListingReturn;
|
|
1206
1247
|
/**
|
|
1207
1248
|
* Temporary workaround over `useListing` to support shared data. This composable API will change in the future.
|
|
1208
1249
|
*
|
|
@@ -1221,10 +1262,11 @@ declare const useProductSearchListing: () => UseListingReturn;
|
|
|
1221
1262
|
*
|
|
1222
1263
|
* @public
|
|
1223
1264
|
*/
|
|
1224
|
-
declare function createListingComposable({ searchMethod, searchDefaults, listingKey, }: {
|
|
1265
|
+
declare function createListingComposable({ searchMethod, searchDefaults, listingKey, initialListing, }: {
|
|
1225
1266
|
searchMethod(searchParams: operations["readProductListing post /product-listing/{categoryId}"]["body"] | operations["searchPage post /search"]["body"]): Promise<Schemas["ProductListingResult"]>;
|
|
1226
1267
|
searchDefaults: operations["searchPage post /search"]["body"];
|
|
1227
1268
|
listingKey: string;
|
|
1269
|
+
initialListing?: Schemas["ProductListingResult"] | null;
|
|
1228
1270
|
}): UseListingReturn;
|
|
1229
1271
|
|
|
1230
1272
|
type UseLocalWishlistReturn = {
|
|
@@ -1356,6 +1398,14 @@ type UseNewsletterReturn = {
|
|
|
1356
1398
|
* Inform about newsletter confirmation
|
|
1357
1399
|
*/
|
|
1358
1400
|
confirmationNeeded: ComputedRef<boolean>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Subscribe key
|
|
1403
|
+
*/
|
|
1404
|
+
SUBSRIBE_KEY: string;
|
|
1405
|
+
/**
|
|
1406
|
+
* Unsubscribe key
|
|
1407
|
+
*/
|
|
1408
|
+
UNSUBSCRIBE_KEY: string;
|
|
1359
1409
|
};
|
|
1360
1410
|
/**
|
|
1361
1411
|
* Composable for newsletter subscription.
|
|
@@ -1840,7 +1890,7 @@ type UseProductWishlistReturn = {
|
|
|
1840
1890
|
/**
|
|
1841
1891
|
* Indicates whether a product is in wishlist
|
|
1842
1892
|
*/
|
|
1843
|
-
isInWishlist:
|
|
1893
|
+
isInWishlist: ComputedRef<boolean>;
|
|
1844
1894
|
};
|
|
1845
1895
|
/**
|
|
1846
1896
|
* Manage wishlist for a single product.
|
|
@@ -1955,7 +2005,7 @@ type UseSessionContextReturn = {
|
|
|
1955
2005
|
/**
|
|
1956
2006
|
* current context's customer object
|
|
1957
2007
|
*/
|
|
1958
|
-
userFromContext: ComputedRef<Schemas["Customer"] | undefined>;
|
|
2008
|
+
userFromContext: ComputedRef<Schemas["Customer"] | undefined | null>;
|
|
1959
2009
|
};
|
|
1960
2010
|
/**
|
|
1961
2011
|
* Composable for session management.
|
|
@@ -2012,6 +2062,18 @@ type UseSyncWishlistReturn = {
|
|
|
2012
2062
|
* Current page number
|
|
2013
2063
|
*/
|
|
2014
2064
|
currentPage: ComputedRef<number>;
|
|
2065
|
+
/**
|
|
2066
|
+
* Limit number of products per page
|
|
2067
|
+
*/
|
|
2068
|
+
limit: ComputedRef<number>;
|
|
2069
|
+
/**
|
|
2070
|
+
* Wishlist products
|
|
2071
|
+
*/
|
|
2072
|
+
products: ComputedRef<Schemas["Product"][]>;
|
|
2073
|
+
/**
|
|
2074
|
+
* Indicates if the wishlist is loading
|
|
2075
|
+
*/
|
|
2076
|
+
isLoading: Ref<boolean>;
|
|
2015
2077
|
};
|
|
2016
2078
|
/**
|
|
2017
2079
|
* Composable to manage wishlist via API
|
|
@@ -2163,6 +2225,14 @@ type UseWishlistReturn = {
|
|
|
2163
2225
|
* Indicates if the wishlist can be synced
|
|
2164
2226
|
*/
|
|
2165
2227
|
canSyncWishlist: ComputedRef<boolean>;
|
|
2228
|
+
/**
|
|
2229
|
+
* Wishlist products
|
|
2230
|
+
*/
|
|
2231
|
+
products: ComputedRef<Schemas["Product"][]>;
|
|
2232
|
+
/**
|
|
2233
|
+
* Limit number of products per page
|
|
2234
|
+
*/
|
|
2235
|
+
limit: ComputedRef<number>;
|
|
2166
2236
|
};
|
|
2167
2237
|
/**
|
|
2168
2238
|
* Composable to manage wishlist
|
|
@@ -2257,4 +2327,4 @@ declare function getDefaultApiParams(): {
|
|
|
2257
2327
|
[composableName: string]: unknown;
|
|
2258
2328
|
};
|
|
2259
2329
|
|
|
2260
|
-
export { type BoxLayout, type Breadcrumb, type ChangePaymentShippingMethodParams, type CmsBlockCategoryNavigation, type CmsBlockCenterText, type CmsBlockCrossSelling, type CmsBlockForm, type CmsBlockGalleryBuybox, type CmsBlockHtml, type CmsBlockImage, type CmsBlockImageBubbleRow, type CmsBlockImageCover, type CmsBlockImageFourColumn, type CmsBlockImageGallery, type CmsBlockImageHighlightRow, type CmsBlockImageSimpleGrid, type CmsBlockImageSlider, type CmsBlockImageText, type CmsBlockImageTextBubble, type CmsBlockImageTextCover, type CmsBlockImageTextGallery, type CmsBlockImageTextRow, type CmsBlockImageThreeColumn, type CmsBlockImageThreeCover, type CmsBlockImageTwoColumn, type CmsBlockProductDescriptionReviews, type CmsBlockProductHeading, type CmsBlockProductListing, type CmsBlockProductSlider, type CmsBlockProductThreeColumn, type CmsBlockSidebarFilter, type CmsBlockText, type CmsBlockTextHero, type CmsBlockTextOnImage, type CmsBlockTextTeaser, type CmsBlockTextTeaserSection, type CmsBlockTextThreeColumn, type CmsBlockTextTwoColumn, type CmsBlockVimeoVideo, type CmsBlockYoutubeVideo, type CmsElementBuyBox, type CmsElementCategoryNavigation, type CmsElementCrossSelling, type CmsElementForm, type CmsElementHtml, type CmsElementImage, type CmsElementImageGallery, type CmsElementImageSlider, type CmsElementManufacturerLogo, type CmsElementProductBox, type CmsElementProductDescriptionReviews, type CmsElementProductListing, type CmsElementProductName, type CmsElementProductSlider, type CmsElementSidebarFilter, type CmsElementText, type CmsElementVimeoVideo, type CmsElementYoutubeVideo, type CmsSectionBlock, type CmsSectionDefault, type CmsSectionSidebar, type DisplayMode, type ElementConfig, type ErrorObjectParam, type ImageContainerAttrs, type ListingType, type Notification, type NotificationOptions, type Position, type RouteObject, type ShopwareContext, type ShortcutFilterParam, type SliderElementConfig, type SourceType, type UseAddToCartReturn, type UseAddressReturn, type UseBreadcrumbsReturn, type UseCartErrorParamsResolver, type UseCartItemReturn, type UseCartReturn, type UseCategoryReturn, type UseCategorySearchReturn, type UseCheckoutReturn, type UseCmsBlockReturn, type UseCmsElementImage, type UseCmsMetaReturn, type UseCountriesReturn, type UseCustomerOrdersReturn, type UseCustomerPasswordReturn, type
|
|
2330
|
+
export { type BoxLayout, type Breadcrumb, type ChangePaymentShippingMethodParams, type CmsBlockCategoryNavigation, type CmsBlockCenterText, type CmsBlockCrossSelling, type CmsBlockForm, type CmsBlockGalleryBuybox, type CmsBlockHtml, type CmsBlockImage, type CmsBlockImageBubbleRow, type CmsBlockImageCover, type CmsBlockImageFourColumn, type CmsBlockImageGallery, type CmsBlockImageGalleryBig, type CmsBlockImageHighlightRow, type CmsBlockImageSimpleGrid, type CmsBlockImageSlider, type CmsBlockImageText, type CmsBlockImageTextBubble, type CmsBlockImageTextCover, type CmsBlockImageTextGallery, type CmsBlockImageTextRow, type CmsBlockImageThreeColumn, type CmsBlockImageThreeCover, type CmsBlockImageTwoColumn, type CmsBlockProductDescriptionReviews, type CmsBlockProductHeading, type CmsBlockProductListing, type CmsBlockProductSlider, type CmsBlockProductThreeColumn, type CmsBlockSidebarFilter, type CmsBlockText, type CmsBlockTextHero, type CmsBlockTextOnImage, type CmsBlockTextTeaser, type CmsBlockTextTeaserSection, type CmsBlockTextThreeColumn, type CmsBlockTextTwoColumn, type CmsBlockVimeoVideo, type CmsBlockYoutubeVideo, type CmsElementBuyBox, type CmsElementCategoryNavigation, type CmsElementCrossSelling, type CmsElementForm, type CmsElementHtml, type CmsElementImage, type CmsElementImageGallery, type CmsElementImageSlider, type CmsElementManufacturerLogo, type CmsElementProductBox, type CmsElementProductDescriptionReviews, type CmsElementProductListing, type CmsElementProductName, type CmsElementProductSlider, type CmsElementSidebarFilter, type CmsElementText, type CmsElementVimeoVideo, type CmsElementYoutubeVideo, type CmsSectionBlock, type CmsSectionDefault, type CmsSectionSidebar, type DisplayMode, type ElementConfig, type ErrorObjectParam, type ImageContainerAttrs, type ListingType, type Notification, type NotificationOptions, type Position, type RouteObject, type ShopwareContext, type ShortcutFilterParam, type SliderElementConfig, type SourceType, type UseAddToCartReturn, type UseAddressReturn, type UseBreadcrumbsReturn, type UseCartErrorParamsResolver, type UseCartItemReturn, type UseCartReturn, type UseCategoryReturn, type UseCategorySearchReturn, type UseCheckoutReturn, type UseCmsBlockReturn, type UseCmsElementImage, type UseCmsMetaReturn, type UseCountriesReturn, type UseCustomerOrdersReturn, type UseCustomerPasswordReturn, type UseInternationalizationReturn, type UseLandingSearchReturn, type UseListingReturn, type UseLocalWishlistReturn, type UseNavigationContextReturn, type UseNavigationReturn, type UseNavigationSearchReturn, type UseNewsletterReturn, type UseNotificationsReturn, type UseOrderDetailsReturn, type UseOrderPaymentReturn, type UsePriceReturn, type UseProductAssociationsReturn, type UseProductConfiguratorReturn, type UseProductPriceReturn, type UseProductReturn, type UseProductReviewsReturn, type UseProductSearchReturn, type UseProductSearchSuggestReturn, type UseProductWishlistReturn, type UseSalutationsReturn, type UseSessionContextReturn, type UseSyncWishlistReturn, type UseUserReturn, type UseWishlistReturn, type VerticalAlign, createCategoryListingContext, createListingComposable, createShopwareContext, getDefaultApiParams, resolveCmsComponent, useAddToCart, useAddress, useB2bQuoteManagement, useBreadcrumbs, useCart, useCartErrorParamsResolver, useCartFunction, useCartItem, useCartNotification, type useCartNotificationReturn, useCategory, useCategoryListing, useCategorySearch, useCheckout, useCmsBlock, useCmsElementConfig, useCmsElementImage, useCmsMeta, useCmsSection, useCmsTranslations, useContext, useCountries, useCustomerOrders, useCustomerPassword, useDefaultOrderAssociations, useInternationalization, useLandingSearch, useListing, useLocalWishlist, useNavigation, useNavigationContext, useNavigationSearch, useNewsletter, useNotifications, useOrderDetails, useOrderPayment, usePrice, useProduct, useProductAssociations, useProductConfigurator, useProductPrice, useProductReviews, useProductSearch, useProductSearchListing, useProductSearchSuggest, useProductWishlist, useSalutations, useSessionContext, useShopwareContext, useSyncWishlist, useUrlResolver, useUser, useWishlist };
|