@propeller-commerce/propeller-v2-vue-ui 0.3.14
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/CHANGELOG.md +549 -0
- package/LICENSE +21 -0
- package/MIGRATION.md +178 -0
- package/README.md +282 -0
- package/STYLING.md +119 -0
- package/dist/ProductVideos.vue_vue_type_script_setup_true_lang-BSXOpWBD.js +1706 -0
- package/dist/ProductVideos.vue_vue_type_script_setup_true_lang-BSXOpWBD.js.map +1 -0
- package/dist/ProductVideos.vue_vue_type_script_setup_true_lang-cfRT3L_k.cjs +1705 -0
- package/dist/ProductVideos.vue_vue_type_script_setup_true_lang-cfRT3L_k.cjs.map +1 -0
- package/dist/__mocks__/decorators.d.ts +17 -0
- package/dist/__mocks__/fixtures.d.ts +43 -0
- package/dist/__mocks__/mockServices.d.ts +7 -0
- package/dist/components/AccountIconAndMenu.vue.d.ts +152 -0
- package/dist/components/ActionCode.vue.d.ts +29 -0
- package/dist/components/AddToCart.vue.d.ts +122 -0
- package/dist/components/AddToFavorite.vue.d.ts +19 -0
- package/dist/components/AddressCard.vue.d.ts +169 -0
- package/dist/components/AddressSelector.vue.d.ts +30 -0
- package/dist/components/Breadcrumbs.vue.d.ts +69 -0
- package/dist/components/CartBonusItems.vue.d.ts +21 -0
- package/dist/components/CartCarriers.vue.d.ts +24 -0
- package/dist/components/CartIconAndSidebar.vue.d.ts +104 -0
- package/dist/components/CartItem.vue.d.ts +178 -0
- package/dist/components/CartOverview.vue.d.ts +41 -0
- package/dist/components/CartPaymethods.vue.d.ts +23 -0
- package/dist/components/CartSummary.vue.d.ts +58 -0
- package/dist/components/CategoryDescription.vue.d.ts +29 -0
- package/dist/components/CategoryShortDescription.vue.d.ts +18 -0
- package/dist/components/ClusterCard.vue.d.ts +251 -0
- package/dist/components/ClusterConfigurator.vue.d.ts +41 -0
- package/dist/components/ClusterInfo.vue.d.ts +73 -0
- package/dist/components/ClusterJsonLd.vue.d.ts +10 -0
- package/dist/components/ClusterOptions.vue.d.ts +44 -0
- package/dist/components/CompanySwitcher.vue.d.ts +18 -0
- package/dist/components/DeliveryDate.vue.d.ts +27 -0
- package/dist/components/FavoriteListDetails.vue.d.ts +94 -0
- package/dist/components/FavoriteListItem.vue.d.ts +141 -0
- package/dist/components/FavoriteLists.vue.d.ts +73 -0
- package/dist/components/ForgotPassword.vue.d.ts +35 -0
- package/dist/components/GridFilters.vue.d.ts +64 -0
- package/dist/components/GridPagination.vue.d.ts +34 -0
- package/dist/components/GridTitle.vue.d.ts +22 -0
- package/dist/components/GridToolbar.vue.d.ts +117 -0
- package/dist/components/ItemListJsonLd.vue.d.ts +10 -0
- package/dist/components/ItemStock.vue.d.ts +31 -0
- package/dist/components/ItemsOverview.vue.d.ts +40 -0
- package/dist/components/LoginForm.vue.d.ts +139 -0
- package/dist/components/Menu.vue.d.ts +73 -0
- package/dist/components/OrderActions.vue.d.ts +25 -0
- package/dist/components/OrderBonusItems.vue.d.ts +19 -0
- package/dist/components/OrderItemCard.vue.d.ts +47 -0
- package/dist/components/OrderList.vue.d.ts +66 -0
- package/dist/components/OrderShipments.vue.d.ts +11 -0
- package/dist/components/OrderSummary.vue.d.ts +49 -0
- package/dist/components/OrderTotals.vue.d.ts +34 -0
- package/dist/components/PriceToggle.vue.d.ts +24 -0
- package/dist/components/ProductBulkPrices.vue.d.ts +35 -0
- package/dist/components/ProductBundles.vue.d.ts +88 -0
- package/dist/components/ProductCard.vue.d.ts +332 -0
- package/dist/components/ProductDescription.vue.d.ts +30 -0
- package/dist/components/ProductDownloads.vue.d.ts +22 -0
- package/dist/components/ProductGallery.vue.d.ts +25 -0
- package/dist/components/ProductGrid.vue.d.ts +290 -0
- package/dist/components/ProductInfo.vue.d.ts +179 -0
- package/dist/components/ProductJsonLd.vue.d.ts +10 -0
- package/dist/components/ProductPrice.vue.d.ts +42 -0
- package/dist/components/ProductShortDescription.vue.d.ts +18 -0
- package/dist/components/ProductSlider.vue.d.ts +176 -0
- package/dist/components/ProductSpecifications.vue.d.ts +37 -0
- package/dist/components/ProductTabs.vue.d.ts +83 -0
- package/dist/components/ProductVideos.vue.d.ts +22 -0
- package/dist/components/PropellerProvider.vue.d.ts +40 -0
- package/dist/components/PurchaseAuthorizationConfigurator.vue.d.ts +44 -0
- package/dist/components/PurchaseAuthorizationRequests.vue.d.ts +50 -0
- package/dist/components/QuoteActions.vue.d.ts +22 -0
- package/dist/components/RegisterForm.vue.d.ts +87 -0
- package/dist/components/SearchBar.vue.d.ts +71 -0
- package/dist/components/UserDetails.vue.d.ts +44 -0
- package/dist/components/defaults/DefaultProductBadges.vue.d.ts +3 -0
- package/dist/components/defaults/DefaultProductImage.vue.d.ts +3 -0
- package/dist/components/defaults/DefaultProductSurcharges.vue.d.ts +3 -0
- package/dist/composables/shared/usePagination.d.ts +19 -0
- package/dist/composables/shared/useServiceFetch.d.ts +9 -0
- package/dist/composables/shared/useUserIdentity.d.ts +13 -0
- package/dist/composables/shared/utils/cartInit.d.ts +18 -0
- package/dist/composables/shared/utils/fetchActiveCart.d.ts +10 -0
- package/dist/composables/shared/utils/mergeAnonymousCart.d.ts +12 -0
- package/dist/composables/vue/useAddress.d.ts +50 -0
- package/dist/composables/vue/useAuth.d.ts +80 -0
- package/dist/composables/vue/useCart.d.ts +64 -0
- package/dist/composables/vue/useCheckout.d.ts +41 -0
- package/dist/composables/vue/useClusterConfigurator.d.ts +26 -0
- package/dist/composables/vue/useCompany.d.ts +31 -0
- package/dist/composables/vue/useFavorites.d.ts +39 -0
- package/dist/composables/vue/useInfraProps.d.ts +27 -0
- package/dist/composables/vue/useMenu.d.ts +24 -0
- package/dist/composables/vue/useOrders.d.ts +64 -0
- package/dist/composables/vue/useProductBundles.d.ts +37 -0
- package/dist/composables/vue/useProductInfo.d.ts +33 -0
- package/dist/composables/vue/useProductSearch.d.ts +49 -0
- package/dist/composables/vue/useProductSlider.d.ts +31 -0
- package/dist/composables/vue/useProductSpecs.d.ts +24 -0
- package/dist/composables/vue/usePurchaseAuthorization.d.ts +102 -0
- package/dist/composables/vue/useResolvedProps.d.ts +42 -0
- package/dist/composables/vue/useServices.d.ts +13 -0
- package/dist/context/ProductGridContext.d.ts +59 -0
- package/dist/context/PropellerContext.d.ts +51 -0
- package/dist/index-BN8nyGRL.js +518 -0
- package/dist/index-BN8nyGRL.js.map +1 -0
- package/dist/index-CrrZsxTR.cjs +517 -0
- package/dist/index-CrrZsxTR.cjs.map +1 -0
- package/dist/index.cjs +20086 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +109 -0
- package/dist/index.js +20088 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +67 -0
- package/dist/pure.cjs +16 -0
- package/dist/pure.cjs.map +1 -0
- package/dist/pure.d.ts +37 -0
- package/dist/pure.js +16 -0
- package/dist/pure.js.map +1 -0
- package/dist/shared.cjs +50 -0
- package/dist/shared.cjs.map +1 -0
- package/dist/shared.d.ts +14 -0
- package/dist/shared.js +50 -0
- package/dist/shared.js.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +91 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { BundleItem, Cart, CartBaseItem, CartMainItem, Cluster, Contact, Crossupsell, Customer, GraphQLClient, MediaImageProductSearchInput, Product, ProductInventory, TransformationsInput } from '@propeller-commerce/propeller-sdk-v2';
|
|
3
|
+
export interface CartItemProps {
|
|
4
|
+
/** GraphQL client for the Propeller SDK */
|
|
5
|
+
graphqlClient: GraphQLClient;
|
|
6
|
+
/** The shopping cart unique identifier */
|
|
7
|
+
cartId: string;
|
|
8
|
+
/** Tax zone for price calculations */
|
|
9
|
+
taxZone?: string;
|
|
10
|
+
/** Authenticated user for cart operations */
|
|
11
|
+
user?: Contact | Customer | null;
|
|
12
|
+
/** A shopping cart item */
|
|
13
|
+
cartItem: CartMainItem;
|
|
14
|
+
/** Currency symbol to display. Defaults to '€'. */
|
|
15
|
+
currency?: string;
|
|
16
|
+
/** Should the item title be a link to the PDP. Defaults to true. */
|
|
17
|
+
titleLinkable?: boolean;
|
|
18
|
+
/** Should the stock be displayed in the cart item. Defaults to false. */
|
|
19
|
+
showStockComponent?: boolean;
|
|
20
|
+
/** Display the SKU of the cart item beneath the item name. Defaults to true. */
|
|
21
|
+
showSku?: boolean;
|
|
22
|
+
/** +/- buttons on left and right of quantity input. Defaults to true. */
|
|
23
|
+
enableIncrementDecrement?: boolean;
|
|
24
|
+
/** Should the cart item notes field be displayed. Defaults to false. */
|
|
25
|
+
showCartItemNotesField?: boolean;
|
|
26
|
+
/** Action callback when a cart item quantity is changed */
|
|
27
|
+
onQuantityChange?: (item: CartMainItem, quantity: number) => void;
|
|
28
|
+
/** Action callback when a cart item note is changed */
|
|
29
|
+
onNoteChange?: (item: CartMainItem, note: string) => void;
|
|
30
|
+
/** Action callback when a cart item is deleted */
|
|
31
|
+
onDelete?: (item: CartMainItem) => void;
|
|
32
|
+
/** Callback with the updated cart after any cart mutation */
|
|
33
|
+
afterCartUpdate?: (cart: Cart) => void;
|
|
34
|
+
/** Label overrides for UI strings
|
|
35
|
+
*
|
|
36
|
+
* Available keys: remove, notes, notesPlaceholder, includedOptions, updating, deleting
|
|
37
|
+
*/
|
|
38
|
+
labels?: Record<string, string>;
|
|
39
|
+
/** Language code for CartService operations. Defaults to 'NL'. */
|
|
40
|
+
language?: string;
|
|
41
|
+
/** Configuration object for image filters and URL generation */
|
|
42
|
+
configuration?: {
|
|
43
|
+
language?: string;
|
|
44
|
+
imageSearchFiltersGrid?: MediaImageProductSearchInput;
|
|
45
|
+
imageVariantFiltersSmall?: TransformationsInput;
|
|
46
|
+
imageVariantFiltersMedium?: TransformationsInput;
|
|
47
|
+
urls?: {
|
|
48
|
+
getProductUrl: (product: Product, language?: string) => string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
/** Show cross-sell/upsell product suggestions below the item. Defaults to false. */
|
|
52
|
+
showCrossupsells?: boolean;
|
|
53
|
+
/** Which cross-sell types to fetch. Defaults to ['ACCESSORIES']. Values: 'ACCESSORIES', 'ALTERNATIVES', 'OPTIONS', 'PARTS', 'RELATED' */
|
|
54
|
+
crossupsellTypes?: string[];
|
|
55
|
+
/** Maximum number of cross-sell products to display. Defaults to 3. */
|
|
56
|
+
crossupsellLimit?: number;
|
|
57
|
+
/** Callback when a cross-sell product is clicked */
|
|
58
|
+
onCrossupsellClick?: (product: Product | Cluster) => void;
|
|
59
|
+
/** Additional CSS class for the root element */
|
|
60
|
+
className?: string;
|
|
61
|
+
/** Include tax in price. Defaults to false. */
|
|
62
|
+
includeTax?: boolean;
|
|
63
|
+
/** Active company ID for PAC lookup. */
|
|
64
|
+
companyId?: number;
|
|
65
|
+
priceComponent?: Component;
|
|
66
|
+
stockComponent?: Component;
|
|
67
|
+
surchargesComponent?: Component;
|
|
68
|
+
/** When false, root element drops the card frame
|
|
69
|
+
* ('bg-card p-4 rounded-[var(--radius-container)] shadow-sm border border-border'),
|
|
70
|
+
* leaving only the flex layout. Default: true. Used by drawer / summary
|
|
71
|
+
* widgets. */
|
|
72
|
+
cardFrame?: boolean;
|
|
73
|
+
/** When false, the delete button (and #delete slot in compound mode)
|
|
74
|
+
* returns null. Default: true. */
|
|
75
|
+
showDelete?: boolean;
|
|
76
|
+
/** When true, quantity renders as 'Qty: {n}' text — no stepper, no
|
|
77
|
+
* input. Default: false. Independent from enableIncrementDecrement. */
|
|
78
|
+
readOnlyQuantity?: boolean;
|
|
79
|
+
/** Optional title click callback. Fires BEFORE default navigation; the
|
|
80
|
+
* consumer may call event.preventDefault() to suppress nav. Used by
|
|
81
|
+
* the cart drawer to close the sidebar on title click. */
|
|
82
|
+
onTitleClick?: (event: MouseEvent, item: CartMainItem) => void;
|
|
83
|
+
}
|
|
84
|
+
declare function handleDelete(): Promise<void>;
|
|
85
|
+
declare function __VLS_template(): {
|
|
86
|
+
attrs: Partial<{}>;
|
|
87
|
+
slots: {
|
|
88
|
+
image?(_: {
|
|
89
|
+
cartItem: CartMainItem;
|
|
90
|
+
imageUrl: string;
|
|
91
|
+
productUrl: string;
|
|
92
|
+
name: string;
|
|
93
|
+
}): any;
|
|
94
|
+
sku?(_: {
|
|
95
|
+
cartItem: CartMainItem;
|
|
96
|
+
sku: string;
|
|
97
|
+
}): any;
|
|
98
|
+
title?(_: {
|
|
99
|
+
cartItem: CartMainItem;
|
|
100
|
+
isBundle: boolean;
|
|
101
|
+
name: string;
|
|
102
|
+
bundleName: string;
|
|
103
|
+
productUrl: string;
|
|
104
|
+
linkable: boolean;
|
|
105
|
+
handleTitleClick: (e: any) => void | undefined;
|
|
106
|
+
}): any;
|
|
107
|
+
surcharges?(_: {
|
|
108
|
+
cartItem: CartMainItem;
|
|
109
|
+
surcharges: string[];
|
|
110
|
+
includeTax: boolean | undefined;
|
|
111
|
+
labels: Record<string, string> | undefined;
|
|
112
|
+
}): any;
|
|
113
|
+
stock?(_: {
|
|
114
|
+
cartItem: CartMainItem;
|
|
115
|
+
inventory: ProductInventory | null;
|
|
116
|
+
labels: Record<string, string> | undefined;
|
|
117
|
+
}): any;
|
|
118
|
+
bundleItems?(_: {
|
|
119
|
+
cartItem: CartMainItem;
|
|
120
|
+
leaderName: string;
|
|
121
|
+
leaderPrice: string;
|
|
122
|
+
nonLeaders: BundleItem[];
|
|
123
|
+
}): any;
|
|
124
|
+
childItems?(_: {
|
|
125
|
+
cartItem: CartMainItem;
|
|
126
|
+
childItems: CartBaseItem[];
|
|
127
|
+
}): any;
|
|
128
|
+
notes?(_: {
|
|
129
|
+
cartItem: CartMainItem;
|
|
130
|
+
notes: string;
|
|
131
|
+
onNoteChange: (value: any) => void;
|
|
132
|
+
}): any;
|
|
133
|
+
crossupsells?(_: {
|
|
134
|
+
cartItem: CartMainItem;
|
|
135
|
+
crossupsells: Crossupsell[];
|
|
136
|
+
}): any;
|
|
137
|
+
price?(_: {
|
|
138
|
+
cartItem: CartMainItem;
|
|
139
|
+
isBundle: boolean;
|
|
140
|
+
price: import('@propeller-commerce/propeller-sdk-v2').ProductPrice | undefined;
|
|
141
|
+
formattedPrice: string;
|
|
142
|
+
bundlePrice: string;
|
|
143
|
+
includeTax: boolean | undefined;
|
|
144
|
+
currency: string | undefined;
|
|
145
|
+
labels: Record<string, string> | undefined;
|
|
146
|
+
}): any;
|
|
147
|
+
quantity?(_: {
|
|
148
|
+
cartItem: CartMainItem;
|
|
149
|
+
quantity: number;
|
|
150
|
+
readOnly: boolean | undefined;
|
|
151
|
+
minQuantity: number;
|
|
152
|
+
step: number;
|
|
153
|
+
onChange: (newQty: any) => Promise<void>;
|
|
154
|
+
labels: Record<string, string> | undefined;
|
|
155
|
+
}): any;
|
|
156
|
+
delete?(_: {
|
|
157
|
+
cartItem: CartMainItem;
|
|
158
|
+
deleting: boolean;
|
|
159
|
+
onDelete: typeof handleDelete;
|
|
160
|
+
labels: Record<string, string> | undefined;
|
|
161
|
+
}): any;
|
|
162
|
+
};
|
|
163
|
+
refs: {};
|
|
164
|
+
rootEl: HTMLDivElement;
|
|
165
|
+
};
|
|
166
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
167
|
+
declare const __VLS_component: import('vue').DefineComponent<CartItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CartItemProps> & Readonly<{}>, {
|
|
168
|
+
titleLinkable: boolean;
|
|
169
|
+
showSku: boolean;
|
|
170
|
+
enableIncrementDecrement: boolean;
|
|
171
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
172
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
173
|
+
export default _default;
|
|
174
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
175
|
+
new (): {
|
|
176
|
+
$slots: S;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Cart, GraphQLClient } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface CartOverviewProps {
|
|
3
|
+
/** GraphQL client for the Propeller SDK */
|
|
4
|
+
graphqlClient: GraphQLClient;
|
|
5
|
+
/** Shopping cart object from which the cart overview will be displayed */
|
|
6
|
+
cart: Cart;
|
|
7
|
+
/** The CSS class for the cart overview container */
|
|
8
|
+
overviewContainerClass?: string;
|
|
9
|
+
/** Title of the cart overview */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Labels for the cart overview form fields and buttons */
|
|
12
|
+
labels?: Record<string, string>;
|
|
13
|
+
/** Show the notes field for the cart */
|
|
14
|
+
showNotes?: boolean;
|
|
15
|
+
/** Show the reference field for the cart */
|
|
16
|
+
showReference?: boolean;
|
|
17
|
+
/** Show the terms and conditions acceptance */
|
|
18
|
+
showTermsAndConditions?: boolean;
|
|
19
|
+
/** Action when the "Terms and conditions" link is clicked */
|
|
20
|
+
onTermsAndConditionsClick?: () => void;
|
|
21
|
+
/** Show the "Purchase" button for placing an order */
|
|
22
|
+
showPurchaseButton?: boolean;
|
|
23
|
+
/** Action when the purchase button is clicked. Receives cart, reference, and notes */
|
|
24
|
+
onPurchaseButtonClick?: (cart: Cart, reference: string, notes: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Optional list of countries used to resolve ISO codes (e.g. 'NL') to display
|
|
27
|
+
* names (e.g. 'Netherlands') in the address blocks. When omitted, the shared
|
|
28
|
+
* built-in COUNTRIES list is used as a fallback.
|
|
29
|
+
*/
|
|
30
|
+
countries?: {
|
|
31
|
+
code: string;
|
|
32
|
+
name: string;
|
|
33
|
+
}[];
|
|
34
|
+
}
|
|
35
|
+
declare const _default: import('vue').DefineComponent<CartOverviewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CartOverviewProps> & Readonly<{}>, {
|
|
36
|
+
showNotes: boolean;
|
|
37
|
+
showReference: boolean;
|
|
38
|
+
showTermsAndConditions: boolean;
|
|
39
|
+
showPurchaseButton: boolean;
|
|
40
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Cart, CartPaymethod, Contact, Customer } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface CartPaymethodsProps {
|
|
3
|
+
/** Shopping cart object from which the payment methods will be displayed */
|
|
4
|
+
cart: Cart;
|
|
5
|
+
/** Currency symbol to display. Defaults to '€'. */
|
|
6
|
+
currency?: string;
|
|
7
|
+
/** Authenticated user — used for cart creation / lookup. */
|
|
8
|
+
user: Contact | Customer | null;
|
|
9
|
+
/** The CSS class for the payment methods container */
|
|
10
|
+
paymentsContainerClass?: string;
|
|
11
|
+
/** Display the on account payment method for anonymous users */
|
|
12
|
+
showOnAccountForGuests?: boolean;
|
|
13
|
+
/** Action when a payment method is selected */
|
|
14
|
+
onPaymethodSelect?: (paymethod: CartPaymethod) => void;
|
|
15
|
+
/** Custom price formatting function */
|
|
16
|
+
formatPrice?: (price: number) => string;
|
|
17
|
+
/** Labels for the component */
|
|
18
|
+
labels?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: import('vue').DefineComponent<CartPaymethodsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CartPaymethodsProps> & Readonly<{}>, {
|
|
21
|
+
showOnAccountForGuests: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Cart, Contact, Customer, GraphQLClient } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface CartSummaryProps {
|
|
3
|
+
/** The shopping cart used to populate the cart summary data */
|
|
4
|
+
cart: Cart;
|
|
5
|
+
/** Currency symbol to display. Defaults to '€'. */
|
|
6
|
+
currency?: string;
|
|
7
|
+
/** Cart summary block title */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Labels for the component */
|
|
10
|
+
labels?: Record<string, string>;
|
|
11
|
+
/** Display the subtotal of the shopping cart */
|
|
12
|
+
showSubtotal?: boolean;
|
|
13
|
+
/** Display the total discount of the shopping cart */
|
|
14
|
+
showDiscount?: boolean;
|
|
15
|
+
/** Display the shipping costs of the shopping cart */
|
|
16
|
+
showShippingCosts?: boolean;
|
|
17
|
+
/** Display all VATs of the shopping cart */
|
|
18
|
+
showVATs?: boolean;
|
|
19
|
+
/** Display the total of the shopping cart excluding the VAT */
|
|
20
|
+
showTotalExclVat?: boolean;
|
|
21
|
+
/** Display the total VAT of the shopping cart */
|
|
22
|
+
showTotalVat?: boolean;
|
|
23
|
+
/** Display the checkout button */
|
|
24
|
+
showCheckoutButton?: boolean;
|
|
25
|
+
/** Action handler when the checkout button is clicked */
|
|
26
|
+
onCheckoutButtonClick?: (cart: Cart) => void;
|
|
27
|
+
/** Custom price formatting function */
|
|
28
|
+
formatPrice?: (price: number) => string;
|
|
29
|
+
/** GraphQL client — required for the default requestPurchaseAuthorization handler */
|
|
30
|
+
graphqlClient?: GraphQLClient;
|
|
31
|
+
/** Logged-in user — used to determine purchaser role and authorization limit */
|
|
32
|
+
user?: Contact | Customer;
|
|
33
|
+
/** Active company ID — used to look up the user's PAC for this company */
|
|
34
|
+
companyId?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Override the default CartService.requestPurchaseAuthorization() call.
|
|
37
|
+
* Note: when this override is used, afterRequestAuthorization receives the original cart.
|
|
38
|
+
*/
|
|
39
|
+
onRequestAuthorization?: (cart: Cart) => void;
|
|
40
|
+
/** Fires after authorization request is sent; receives the updated cart */
|
|
41
|
+
afterRequestAuthorization?: (cart: Cart) => void;
|
|
42
|
+
/** Called when requestPurchaseAuthorization fails; receives the error */
|
|
43
|
+
onError?: (err: Error) => void;
|
|
44
|
+
/** Action handler when the "Request a Quote" button is clicked */
|
|
45
|
+
onRequestQuoteClick?: (cart: Cart) => void;
|
|
46
|
+
/** Configuration object for image filters */
|
|
47
|
+
configuration?: any;
|
|
48
|
+
}
|
|
49
|
+
declare const _default: import('vue').DefineComponent<CartSummaryProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CartSummaryProps> & Readonly<{}>, {
|
|
50
|
+
showCheckoutButton: boolean;
|
|
51
|
+
showSubtotal: boolean;
|
|
52
|
+
showDiscount: boolean;
|
|
53
|
+
showShippingCosts: boolean;
|
|
54
|
+
showVATs: boolean;
|
|
55
|
+
showTotalExclVat: boolean;
|
|
56
|
+
showTotalVat: boolean;
|
|
57
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
58
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Category } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface CategoryDescriptionProps {
|
|
3
|
+
/**
|
|
4
|
+
* Language code used to resolve the correct localised description
|
|
5
|
+
* from `category.description`.
|
|
6
|
+
*/
|
|
7
|
+
language: string;
|
|
8
|
+
/**
|
|
9
|
+
* Propeller Category object.
|
|
10
|
+
* The component reads `category.description` (an array of LocalizedString)
|
|
11
|
+
* and renders the matching language entry as HTML.
|
|
12
|
+
*/
|
|
13
|
+
category?: Category | null;
|
|
14
|
+
/**
|
|
15
|
+
* When `true` (default), the description is truncated to `maxLength`
|
|
16
|
+
* characters and a "Read more" / "Read less" toggle is shown.
|
|
17
|
+
*/
|
|
18
|
+
collapsed?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Maximum number of characters to display before truncating.
|
|
21
|
+
* Only applies when `collapsed` is `true`.
|
|
22
|
+
* Defaults to 200.
|
|
23
|
+
*/
|
|
24
|
+
maxLength?: number;
|
|
25
|
+
/** Extra CSS class applied to the root element. */
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
declare const _default: import('vue').DefineComponent<CategoryDescriptionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CategoryDescriptionProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Category } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface CategoryShortDescriptionProps {
|
|
3
|
+
/**
|
|
4
|
+
* Language code used to resolve the correct localised short description
|
|
5
|
+
* from `category.shortDescription`.
|
|
6
|
+
*/
|
|
7
|
+
language: string;
|
|
8
|
+
/**
|
|
9
|
+
* Propeller Category object.
|
|
10
|
+
* The component reads `category.shortDescription` (an array of LocalizedString)
|
|
11
|
+
* and renders the matching language entry as HTML.
|
|
12
|
+
*/
|
|
13
|
+
category?: Category;
|
|
14
|
+
/** Extra CSS class applied to the root element. */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import('vue').DefineComponent<CategoryShortDescriptionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CategoryShortDescriptionProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { Cluster } from '@propeller-commerce/propeller-sdk-v2';
|
|
3
|
+
export interface ClusterCardProps {
|
|
4
|
+
/** The cluster object to display */
|
|
5
|
+
cluster: Cluster;
|
|
6
|
+
/** Currency symbol to display. Defaults to '€'. */
|
|
7
|
+
currency?: string;
|
|
8
|
+
/** Show the cluster name. Defaults to true. */
|
|
9
|
+
showName?: boolean;
|
|
10
|
+
/** Show the default product image. Defaults to true. */
|
|
11
|
+
showImage?: boolean;
|
|
12
|
+
/** Show the cluster short description. Defaults to false. */
|
|
13
|
+
showShortDescription?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Show the SKU. Displays the cluster SKU; falls back to the default product SKU
|
|
16
|
+
* if the cluster SKU is empty. Defaults to true.
|
|
17
|
+
*/
|
|
18
|
+
showSku?: boolean;
|
|
19
|
+
/** Show the default product manufacturer. Defaults to false. */
|
|
20
|
+
showManufacturer?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Show default product stock information (quantity badge).
|
|
23
|
+
* Reads `defaultProduct.inventory.totalQuantity`. Defaults to true.
|
|
24
|
+
*/
|
|
25
|
+
showStock?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Show only the availability indicator (Available / Not available) inside ItemStock.
|
|
28
|
+
* Only relevant when `showStock` is true.
|
|
29
|
+
* Defaults to true.
|
|
30
|
+
*/
|
|
31
|
+
showAvailability?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Show the price below the product name.
|
|
34
|
+
* Defaults to true.
|
|
35
|
+
*/
|
|
36
|
+
showPrice?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Label overrides forwarded to the embedded ItemStock component.
|
|
39
|
+
* Keys: inStock, outOfStock, lowStock, available, notAvailable, pieces
|
|
40
|
+
*/
|
|
41
|
+
stockLabels?: Record<string, string>;
|
|
42
|
+
/**
|
|
43
|
+
* Attribute codes/names to look up on the default product and display as
|
|
44
|
+
* badge overlays on the image. Resolved against
|
|
45
|
+
* `defaultProduct.attributes.items[].attributeDescription.name`.
|
|
46
|
+
* Attributes with no matching value are silently omitted.
|
|
47
|
+
* Example: ['new', 'sale']
|
|
48
|
+
*/
|
|
49
|
+
imageLabels?: string[];
|
|
50
|
+
/**
|
|
51
|
+
* Attribute codes/names to look up on the default product and display as
|
|
52
|
+
* extra text rows below the cluster name. Resolved the same way as `imageLabels`.
|
|
53
|
+
* Example: ['brand', 'color']
|
|
54
|
+
*/
|
|
55
|
+
textLabels?: string[];
|
|
56
|
+
/** Renders a heart-icon toggle button on the cluster image. Defaults to false. */
|
|
57
|
+
enableAddFavorite?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Called whenever the favourite state is toggled.
|
|
60
|
+
* The second argument indicates the new state: `true` = added, `false` = removed.
|
|
61
|
+
*/
|
|
62
|
+
onToggleFavorite?: (cluster: Cluster, isFavorite: boolean) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Called when the cluster name, image, or "View cluster" button is clicked.
|
|
65
|
+
* When provided, the default `<a>` navigation is prevented so the consumer
|
|
66
|
+
* can use framework-specific routing (e.g. Next.js `router.push`).
|
|
67
|
+
*/
|
|
68
|
+
onClusterClick?: (cluster: Cluster) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Override any UI string.
|
|
71
|
+
* Available keys: addToFavorites, removeFromFavorites, viewCluster,
|
|
72
|
+
* inStock, lowStock, outOfStock
|
|
73
|
+
*/
|
|
74
|
+
labels?: Record<string, string>;
|
|
75
|
+
/** Number of grid columns — when 1 the card renders as a compact horizontal row. */
|
|
76
|
+
columns?: number;
|
|
77
|
+
/** Extra CSS class applied to the root element. */
|
|
78
|
+
className?: string;
|
|
79
|
+
/** Configuration object passed to the component */
|
|
80
|
+
configuration?: any;
|
|
81
|
+
/** Include tax in the price display */
|
|
82
|
+
includeTax?: boolean;
|
|
83
|
+
/** Language code used to resolve localised names and slugs. Defaults to 'NL'. */
|
|
84
|
+
language?: string;
|
|
85
|
+
priceComponent?: Component;
|
|
86
|
+
stockComponent?: Component;
|
|
87
|
+
imageComponent?: Component;
|
|
88
|
+
badgesComponent?: Component;
|
|
89
|
+
favoriteComponent?: Component;
|
|
90
|
+
}
|
|
91
|
+
interface ClusterCardState {
|
|
92
|
+
isFavorite: boolean;
|
|
93
|
+
includeTax: boolean;
|
|
94
|
+
priceListener: any;
|
|
95
|
+
isRow: () => boolean;
|
|
96
|
+
getClusterName: () => string;
|
|
97
|
+
getClusterSku: () => string;
|
|
98
|
+
getClusterImageUrl: () => string;
|
|
99
|
+
getClusterUrl: () => string;
|
|
100
|
+
getClusterShortDescription: () => string;
|
|
101
|
+
getClusterManufacturer: () => string;
|
|
102
|
+
getStockQuantity: () => number;
|
|
103
|
+
getStockStatusLabel: () => string;
|
|
104
|
+
getStockStatusClass: () => string;
|
|
105
|
+
getClusterPrice: () => string;
|
|
106
|
+
getLabel: (key: string, fallback: string) => string;
|
|
107
|
+
handleClusterClick: (e: any) => void;
|
|
108
|
+
handleToggleFavorite: (e: any) => void;
|
|
109
|
+
computedImageLabels: () => string[];
|
|
110
|
+
computedTextLabels: () => {
|
|
111
|
+
name: string;
|
|
112
|
+
value: string;
|
|
113
|
+
}[];
|
|
114
|
+
}
|
|
115
|
+
declare function handleClusterClick(e: any): ReturnType<ClusterCardState["handleClusterClick"]>;
|
|
116
|
+
declare function handleToggleFavorite(e: any): ReturnType<ClusterCardState["handleToggleFavorite"]>;
|
|
117
|
+
declare function __VLS_template(): {
|
|
118
|
+
attrs: Partial<{}>;
|
|
119
|
+
slots: {
|
|
120
|
+
image?(_: {
|
|
121
|
+
cluster: Cluster;
|
|
122
|
+
language: string | undefined;
|
|
123
|
+
imageUrl: string;
|
|
124
|
+
imageSearchFilters: any;
|
|
125
|
+
imageVariantFilters: any;
|
|
126
|
+
onNavigate: typeof handleClusterClick;
|
|
127
|
+
}): any;
|
|
128
|
+
badges?(_: {
|
|
129
|
+
cluster: Cluster;
|
|
130
|
+
imageLabels: string[];
|
|
131
|
+
labels: Record<string, string> | undefined;
|
|
132
|
+
}): any;
|
|
133
|
+
favorite?(_: {
|
|
134
|
+
cluster: Cluster;
|
|
135
|
+
isFavorite: boolean;
|
|
136
|
+
toggle: typeof handleToggleFavorite;
|
|
137
|
+
labels: Record<string, string> | undefined;
|
|
138
|
+
}): any;
|
|
139
|
+
sku?(_: {
|
|
140
|
+
cluster: Cluster;
|
|
141
|
+
sku: string;
|
|
142
|
+
}): any;
|
|
143
|
+
sku?(_: {
|
|
144
|
+
cluster: Cluster;
|
|
145
|
+
sku: string;
|
|
146
|
+
}): any;
|
|
147
|
+
name?(_: {
|
|
148
|
+
cluster: Cluster;
|
|
149
|
+
clusterUrl: string;
|
|
150
|
+
handleClusterClick: typeof handleClusterClick;
|
|
151
|
+
linkable: boolean;
|
|
152
|
+
name: string;
|
|
153
|
+
}): any;
|
|
154
|
+
name?(_: {
|
|
155
|
+
cluster: Cluster;
|
|
156
|
+
clusterUrl: string;
|
|
157
|
+
handleClusterClick: typeof handleClusterClick;
|
|
158
|
+
linkable: boolean;
|
|
159
|
+
name: string;
|
|
160
|
+
}): any;
|
|
161
|
+
textLabels?(_: {
|
|
162
|
+
cluster: Cluster;
|
|
163
|
+
values: {
|
|
164
|
+
name: string;
|
|
165
|
+
value: string;
|
|
166
|
+
}[];
|
|
167
|
+
}): any;
|
|
168
|
+
textLabels?(_: {
|
|
169
|
+
cluster: Cluster;
|
|
170
|
+
values: {
|
|
171
|
+
name: string;
|
|
172
|
+
value: string;
|
|
173
|
+
}[];
|
|
174
|
+
}): any;
|
|
175
|
+
manufacturer?(_: {
|
|
176
|
+
cluster: Cluster;
|
|
177
|
+
manufacturer: string;
|
|
178
|
+
}): any;
|
|
179
|
+
manufacturer?(_: {
|
|
180
|
+
cluster: Cluster;
|
|
181
|
+
manufacturer: string;
|
|
182
|
+
}): any;
|
|
183
|
+
shortDescription?(_: {
|
|
184
|
+
cluster: Cluster;
|
|
185
|
+
text: string;
|
|
186
|
+
}): any;
|
|
187
|
+
shortDescription?(_: {
|
|
188
|
+
cluster: Cluster;
|
|
189
|
+
text: string;
|
|
190
|
+
}): any;
|
|
191
|
+
stock?(_: {
|
|
192
|
+
cluster: Cluster;
|
|
193
|
+
inventory: import('@propeller-commerce/propeller-sdk-v2').ProductInventory;
|
|
194
|
+
showAvailability: boolean;
|
|
195
|
+
labels: Record<string, string> | undefined;
|
|
196
|
+
}): any;
|
|
197
|
+
stock?(_: {
|
|
198
|
+
cluster: Cluster;
|
|
199
|
+
inventory: import('@propeller-commerce/propeller-sdk-v2').ProductInventory;
|
|
200
|
+
showAvailability: boolean;
|
|
201
|
+
labels: Record<string, string> | undefined;
|
|
202
|
+
}): any;
|
|
203
|
+
price?(_: {
|
|
204
|
+
cluster: Cluster;
|
|
205
|
+
price: import('@propeller-commerce/propeller-sdk-v2').ProductPrice | undefined;
|
|
206
|
+
includeTax: boolean;
|
|
207
|
+
currency: string | undefined;
|
|
208
|
+
labels: Record<string, string> | undefined;
|
|
209
|
+
}): any;
|
|
210
|
+
price?(_: {
|
|
211
|
+
cluster: Cluster;
|
|
212
|
+
price: import('@propeller-commerce/propeller-sdk-v2').ProductPrice | undefined;
|
|
213
|
+
includeTax: boolean;
|
|
214
|
+
currency: string | undefined;
|
|
215
|
+
labels: Record<string, string> | undefined;
|
|
216
|
+
}): any;
|
|
217
|
+
viewClusterLink?(_: {
|
|
218
|
+
cluster: Cluster;
|
|
219
|
+
clusterUrl: string;
|
|
220
|
+
handleClusterClick: typeof handleClusterClick;
|
|
221
|
+
label: string;
|
|
222
|
+
}): any;
|
|
223
|
+
viewClusterLink?(_: {
|
|
224
|
+
cluster: Cluster;
|
|
225
|
+
clusterUrl: string;
|
|
226
|
+
handleClusterClick: typeof handleClusterClick;
|
|
227
|
+
label: string;
|
|
228
|
+
}): any;
|
|
229
|
+
};
|
|
230
|
+
refs: {};
|
|
231
|
+
rootEl: HTMLDivElement;
|
|
232
|
+
};
|
|
233
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
234
|
+
declare const __VLS_component: import('vue').DefineComponent<ClusterCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ClusterCardProps> & Readonly<{}>, {
|
|
235
|
+
showPrice: boolean;
|
|
236
|
+
showStock: boolean;
|
|
237
|
+
showAvailability: boolean;
|
|
238
|
+
enableAddFavorite: boolean;
|
|
239
|
+
showSku: boolean;
|
|
240
|
+
showName: boolean;
|
|
241
|
+
showImage: boolean;
|
|
242
|
+
showShortDescription: boolean;
|
|
243
|
+
showManufacturer: boolean;
|
|
244
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
245
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
246
|
+
export default _default;
|
|
247
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
248
|
+
new (): {
|
|
249
|
+
$slots: S;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ClusterConfig, Product } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
/**
|
|
3
|
+
* A computed object containing a cluster config setting enriched with
|
|
4
|
+
* its current UI state: available values for drilldown, the currently
|
|
5
|
+
* selected value, and whether the selector should be disabled.
|
|
6
|
+
*/
|
|
7
|
+
export interface ClusterConfiguratorProps {
|
|
8
|
+
/**
|
|
9
|
+
* The cluster ID this configurator belongs to.
|
|
10
|
+
* @required
|
|
11
|
+
*/
|
|
12
|
+
clusterId: number;
|
|
13
|
+
/**
|
|
14
|
+
* All products that belong to the cluster.
|
|
15
|
+
* Used to derive available values per attribute and to match
|
|
16
|
+
* the configured product when all selections are made.
|
|
17
|
+
* @required
|
|
18
|
+
*/
|
|
19
|
+
products: Product[];
|
|
20
|
+
/**
|
|
21
|
+
* Cluster configuration object (cluster.config).
|
|
22
|
+
* Provides the ordered list of attribute settings.
|
|
23
|
+
* @required
|
|
24
|
+
*/
|
|
25
|
+
config: ClusterConfig;
|
|
26
|
+
/**
|
|
27
|
+
* Fired whenever the user completes a set of attribute selections
|
|
28
|
+
* that uniquely identifies a cluster product.
|
|
29
|
+
* Also fired whenever any selection changes and a matching product
|
|
30
|
+
* can already be determined (e.g. only one setting exists).
|
|
31
|
+
*/
|
|
32
|
+
onConfigurationChange?: (product: Product) => void;
|
|
33
|
+
/** Default product to pre-populate the attribute selections on mount. */
|
|
34
|
+
defaultProduct?: Product;
|
|
35
|
+
/** Override any UI string. Available keys: selectOption */
|
|
36
|
+
labels?: Record<string, string>;
|
|
37
|
+
/** Extra CSS class applied to the root element. */
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
declare const _default: import('vue').DefineComponent<ClusterConfiguratorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ClusterConfiguratorProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
41
|
+
export default _default;
|