@shopware/composables 1.9.1 → 1.11.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 +12 -5
- package/dist/index.d.mts +116 -34
- package/dist/index.d.ts +116 -34
- package/dist/index.mjs +117 -74
- package/package.json +13 -12
- package/src/cms/cmsAssociations.ts +5 -1
- package/src/cms/useCmsElementConfig.test.ts +8 -0
- package/src/cms/useCmsElementConfig.ts +4 -1
- package/src/cms/useCmsElementImage.test.ts +23 -0
- package/src/cms/useCmsElementProductBox.test.ts +21 -0
- package/src/devtools/plugin.ts +1 -2
- package/src/mocks/Configurator.ts +36 -36
- package/src/types/cmsBlockTypes.ts +2 -0
- package/src/types/cmsElementTypes.ts +24 -18
- package/src/useAddToCart/useAddToCart.test.ts +18 -1
- package/src/useAddress/useAddress.test.ts +41 -2
- package/src/useAddress/useAddress.ts +1 -1
- package/src/useCart/useCart.test.ts +42 -0
- package/src/useCart/useCart.ts +17 -0
- package/src/useCartNotification/useCartNotification.test.ts +30 -0
- package/src/useCheckout/useCheckout.test.ts +43 -1
- package/src/useCmsMeta/useCmsMeta.test.ts +26 -0
- package/src/useCountries/useCountries.test.ts +14 -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/useLocalWishlist/useLocalWishlist.test.ts +44 -5
- package/src/useLocalWishlist/useLocalWishlist.ts +3 -2
- package/src/useNavigationContext/useNavigationContext.test.ts +25 -24
- package/src/useNewsletter/useNewsletter.test.ts +16 -0
- package/src/useNewsletter/useNewsletter.ts +13 -0
- package/src/useOrderDetails/useOrderDetails.test.ts +92 -3
- package/src/useOrderDetails/useOrderDetails.ts +12 -14
- package/src/useOrderPayment/useOrderPayment.test.ts +55 -1
- package/src/useOrderPayment/useOrderPayment.ts +1 -0
- package/src/usePrice/usePrice.test.ts +10 -0
- package/src/usePrice/usePrice.ts +2 -7
- package/src/useProduct/useProduct.test.ts +14 -1
- package/src/useProductAssociations/useProductAssociations.spec.ts +1 -0
- package/src/useProductConfigurator/useProductConfigurator.spec.ts +38 -0
- package/src/useProductConfigurator/useProductConfigurator.ts +1 -1
- package/src/useProductPrice/useProductPrice.test.ts +7 -7
- package/src/useProductPrice/useProductPrice.ts +12 -4
- package/src/useProductReviews/useProductReviews.test.ts +15 -3
- package/src/useProductWishlist/useProductWishlist.ts +2 -2
- package/src/useSalutations/useSalutations.spec.ts +13 -0
- package/src/useSessionContext/useSessionContext.test.ts +122 -4
- package/src/useSessionContext/useSessionContext.ts +14 -2
- package/src/useSyncWishlist/useSyncWishlist.test.ts +94 -25
- package/src/useSyncWishlist/useSyncWishlist.ts +27 -8
- package/src/useUrlResolver/useUrlResolver.test.ts +6 -12
- package/src/useUrlResolver/useUrlResolver.ts +4 -6
- package/src/useUser/useUser.test.ts +233 -18
- package/src/useUser/useUser.ts +6 -1
- package/src/useWishlist/useWishlist.test.ts +133 -26
- package/src/useWishlist/useWishlist.ts +22 -6
package/dist/index.d.ts
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: {
|
|
@@ -179,7 +181,7 @@ type YouTubeVideoElementConfig = {
|
|
|
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
|
*/
|
|
@@ -981,15 +987,12 @@ type UseCustomerPasswordReturn = {
|
|
|
981
987
|
*/
|
|
982
988
|
declare function useCustomerPassword(): UseCustomerPasswordReturn;
|
|
983
989
|
|
|
984
|
-
type UseDefaultOrderAssociationsReturn = Schemas["Criteria"] & {
|
|
985
|
-
checkPromotion?: boolean;
|
|
986
|
-
};
|
|
987
990
|
/**
|
|
988
991
|
* Returns default order associations. You can override this composable in your project.
|
|
989
992
|
* @public
|
|
990
993
|
* @category Order
|
|
991
994
|
*/
|
|
992
|
-
declare function useDefaultOrderAssociations():
|
|
995
|
+
declare function useDefaultOrderAssociations(): Schemas["Criteria"]["associations"];
|
|
993
996
|
|
|
994
997
|
type UseInternationalizationReturn = {
|
|
995
998
|
/**
|
|
@@ -1205,8 +1208,42 @@ declare function useListing(params?: {
|
|
|
1205
1208
|
listingType: ListingType;
|
|
1206
1209
|
categoryId?: string;
|
|
1207
1210
|
defaultSearchCriteria?: operations["searchPage post /search"]["body"];
|
|
1211
|
+
initialListing?: Schemas["ProductListingResult"] | null;
|
|
1208
1212
|
}): UseListingReturn;
|
|
1209
|
-
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;
|
|
1210
1247
|
/**
|
|
1211
1248
|
* Temporary workaround over `useListing` to support shared data. This composable API will change in the future.
|
|
1212
1249
|
*
|
|
@@ -1225,10 +1262,11 @@ declare const useProductSearchListing: () => UseListingReturn;
|
|
|
1225
1262
|
*
|
|
1226
1263
|
* @public
|
|
1227
1264
|
*/
|
|
1228
|
-
declare function createListingComposable({ searchMethod, searchDefaults, listingKey, }: {
|
|
1265
|
+
declare function createListingComposable({ searchMethod, searchDefaults, listingKey, initialListing, }: {
|
|
1229
1266
|
searchMethod(searchParams: operations["readProductListing post /product-listing/{categoryId}"]["body"] | operations["searchPage post /search"]["body"]): Promise<Schemas["ProductListingResult"]>;
|
|
1230
1267
|
searchDefaults: operations["searchPage post /search"]["body"];
|
|
1231
1268
|
listingKey: string;
|
|
1269
|
+
initialListing?: Schemas["ProductListingResult"] | null;
|
|
1232
1270
|
}): UseListingReturn;
|
|
1233
1271
|
|
|
1234
1272
|
type UseLocalWishlistReturn = {
|
|
@@ -1360,6 +1398,14 @@ type UseNewsletterReturn = {
|
|
|
1360
1398
|
* Inform about newsletter confirmation
|
|
1361
1399
|
*/
|
|
1362
1400
|
confirmationNeeded: ComputedRef<boolean>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Subscribe key
|
|
1403
|
+
*/
|
|
1404
|
+
SUBSCRIBE_KEY: string;
|
|
1405
|
+
/**
|
|
1406
|
+
* Unsubscribe key
|
|
1407
|
+
*/
|
|
1408
|
+
UNSUBSCRIBE_KEY: string;
|
|
1363
1409
|
};
|
|
1364
1410
|
/**
|
|
1365
1411
|
* Composable for newsletter subscription.
|
|
@@ -1514,9 +1560,9 @@ type UseOrderDetailsReturn = {
|
|
|
1514
1560
|
* Get order documents
|
|
1515
1561
|
* @param {string} documentId
|
|
1516
1562
|
* @param {string} deepLinkCode
|
|
1517
|
-
* @returns
|
|
1563
|
+
* @returns Binary document content (PDF, HTML, or XML)
|
|
1518
1564
|
*/
|
|
1519
|
-
getDocumentFile: (documentId: string, deepLinkCode: string) => Promise<
|
|
1565
|
+
getDocumentFile: (documentId: string, deepLinkCode: string) => Promise<Blob | string>;
|
|
1520
1566
|
/**
|
|
1521
1567
|
* Check if order has documents
|
|
1522
1568
|
*/
|
|
@@ -1675,7 +1721,7 @@ type UseProductConfiguratorReturn = {
|
|
|
1675
1721
|
/**
|
|
1676
1722
|
* Handler for action when the selected option is changed
|
|
1677
1723
|
*/
|
|
1678
|
-
handleChange(attribute: string, option: string, onChangeHandled
|
|
1724
|
+
handleChange(attribute: string, option: string, onChangeHandled?: () => void): Promise<void>;
|
|
1679
1725
|
findVariantForSelectedOptions(options?: {
|
|
1680
1726
|
[key: string]: string;
|
|
1681
1727
|
}): Promise<Schemas["Product"] | undefined>;
|
|
@@ -1715,7 +1761,7 @@ type UseProductPriceReturn = {
|
|
|
1715
1761
|
*/
|
|
1716
1762
|
unitPrice: ComputedRef<number | undefined>;
|
|
1717
1763
|
/**
|
|
1718
|
-
* Can be used if
|
|
1764
|
+
* Can be used if hasListPrice is set to true
|
|
1719
1765
|
*/
|
|
1720
1766
|
referencePrice: ComputedRef<Schemas["CalculatedPrice"]["referencePrice"] | undefined>;
|
|
1721
1767
|
/**
|
|
@@ -1731,7 +1777,13 @@ type UseProductPriceReturn = {
|
|
|
1731
1777
|
*/
|
|
1732
1778
|
tierPrices: ComputedRef<TierPrice[]>;
|
|
1733
1779
|
/**
|
|
1734
|
-
*
|
|
1780
|
+
* Whether the product currently has a list price reduction / discount
|
|
1781
|
+
* (e.g. for strikethrough / discount display, typically based on `listPrice.percentage`).
|
|
1782
|
+
*/
|
|
1783
|
+
hasListPrice: ComputedRef<boolean>;
|
|
1784
|
+
/**
|
|
1785
|
+
* Whether the product currently has a list price reduction / discount.
|
|
1786
|
+
* @deprecated Use `hasListPrice` instead. Will be removed in a future version.
|
|
1735
1787
|
*/
|
|
1736
1788
|
isListPrice: ComputedRef<boolean>;
|
|
1737
1789
|
/**
|
|
@@ -1844,7 +1896,7 @@ type UseProductWishlistReturn = {
|
|
|
1844
1896
|
/**
|
|
1845
1897
|
* Indicates whether a product is in wishlist
|
|
1846
1898
|
*/
|
|
1847
|
-
isInWishlist:
|
|
1899
|
+
isInWishlist: ComputedRef<boolean>;
|
|
1848
1900
|
};
|
|
1849
1901
|
/**
|
|
1850
1902
|
* Manage wishlist for a single product.
|
|
@@ -1949,17 +2001,27 @@ type UseSessionContextReturn = {
|
|
|
1949
2001
|
*/
|
|
1950
2002
|
salesChannelCountryId: ComputedRef<string | undefined>;
|
|
1951
2003
|
/**
|
|
1952
|
-
*
|
|
2004
|
+
* @deprecated use salesChannelLanguageId instead
|
|
2005
|
+
* sales channel language id
|
|
1953
2006
|
*/
|
|
1954
2007
|
languageId: ComputedRef<string | undefined>;
|
|
1955
2008
|
/**
|
|
2009
|
+
* sales channel language code
|
|
2010
|
+
*/
|
|
2011
|
+
salesChannelLanguageId: ComputedRef<string | undefined>;
|
|
2012
|
+
/**
|
|
2013
|
+
* @deprecated use currentLanguageId instead
|
|
1956
2014
|
* current language id chain
|
|
1957
2015
|
*/
|
|
1958
2016
|
languageIdChain: ComputedRef<string>;
|
|
2017
|
+
/**
|
|
2018
|
+
* current language code
|
|
2019
|
+
*/
|
|
2020
|
+
currentLanguageId: ComputedRef<string | undefined>;
|
|
1959
2021
|
/**
|
|
1960
2022
|
* current context's customer object
|
|
1961
2023
|
*/
|
|
1962
|
-
userFromContext: ComputedRef<Schemas["Customer"] | undefined>;
|
|
2024
|
+
userFromContext: ComputedRef<Schemas["Customer"] | undefined | null>;
|
|
1963
2025
|
};
|
|
1964
2026
|
/**
|
|
1965
2027
|
* Composable for session management.
|
|
@@ -2016,6 +2078,18 @@ type UseSyncWishlistReturn = {
|
|
|
2016
2078
|
* Current page number
|
|
2017
2079
|
*/
|
|
2018
2080
|
currentPage: ComputedRef<number>;
|
|
2081
|
+
/**
|
|
2082
|
+
* Limit number of products per page
|
|
2083
|
+
*/
|
|
2084
|
+
limit: ComputedRef<number>;
|
|
2085
|
+
/**
|
|
2086
|
+
* Wishlist products
|
|
2087
|
+
*/
|
|
2088
|
+
products: ComputedRef<Schemas["Product"][]>;
|
|
2089
|
+
/**
|
|
2090
|
+
* Indicates if the wishlist is loading
|
|
2091
|
+
*/
|
|
2092
|
+
isLoading: Ref<boolean>;
|
|
2019
2093
|
};
|
|
2020
2094
|
/**
|
|
2021
2095
|
* Composable to manage wishlist via API
|
|
@@ -2167,6 +2241,14 @@ type UseWishlistReturn = {
|
|
|
2167
2241
|
* Indicates if the wishlist can be synced
|
|
2168
2242
|
*/
|
|
2169
2243
|
canSyncWishlist: ComputedRef<boolean>;
|
|
2244
|
+
/**
|
|
2245
|
+
* Wishlist products
|
|
2246
|
+
*/
|
|
2247
|
+
products: ComputedRef<Schemas["Product"][]>;
|
|
2248
|
+
/**
|
|
2249
|
+
* Limit number of products per page
|
|
2250
|
+
*/
|
|
2251
|
+
limit: ComputedRef<number>;
|
|
2170
2252
|
};
|
|
2171
2253
|
/**
|
|
2172
2254
|
* Composable to manage wishlist
|
|
@@ -2261,4 +2343,4 @@ declare function getDefaultApiParams(): {
|
|
|
2261
2343
|
[composableName: string]: unknown;
|
|
2262
2344
|
};
|
|
2263
2345
|
|
|
2264
|
-
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
|
|
2346
|
+
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 };
|