@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,122 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { CartChildItemInput, GraphQLClient, Product, Cart, Contact, Customer, TransformationsInput, MediaImageProductSearchInput, CartMainItem, Cluster } from '@propeller-commerce/propeller-sdk-v2';
|
|
3
|
+
export interface AddToCartProps {
|
|
4
|
+
/** GraphQL client for the Propeller SDK */
|
|
5
|
+
graphqlClient: GraphQLClient;
|
|
6
|
+
/** The authenticated user (Contact or Customer) */
|
|
7
|
+
user: Contact | Customer | null;
|
|
8
|
+
/** The product to be added to cart */
|
|
9
|
+
product: Product;
|
|
10
|
+
/** Currency symbol to display. Defaults to '€'. */
|
|
11
|
+
currency?: string;
|
|
12
|
+
/** Cart ID — required when onAddToCart is not provided */
|
|
13
|
+
cartId?: string;
|
|
14
|
+
/** The cluster to be added to cart */
|
|
15
|
+
cluster?: Cluster;
|
|
16
|
+
/** IDs of the cluster child items, e.g. cluster options */
|
|
17
|
+
childItems?: number[];
|
|
18
|
+
/** Called before adding to cart. Return false to abort (e.g. failed validation). */
|
|
19
|
+
beforeAddToCart?: () => boolean;
|
|
20
|
+
/** Notes for the cart item */
|
|
21
|
+
notes?: string;
|
|
22
|
+
/** Custom price for the product (overrides calculated price) */
|
|
23
|
+
price?: number;
|
|
24
|
+
/** Label overrides for UI strings
|
|
25
|
+
*
|
|
26
|
+
* available labels:
|
|
27
|
+
* - outOfStock
|
|
28
|
+
* - noCartId
|
|
29
|
+
* - errorAdding
|
|
30
|
+
* - addedToCart
|
|
31
|
+
* - modalTitle
|
|
32
|
+
* - quantity
|
|
33
|
+
* - continueShopping
|
|
34
|
+
* - proceedToCheckout
|
|
35
|
+
* - requestQuoteButton
|
|
36
|
+
* - add
|
|
37
|
+
* - adding
|
|
38
|
+
*/
|
|
39
|
+
labels?: Record<string, string>;
|
|
40
|
+
/**
|
|
41
|
+
* If true a new cart is created if no cart ID is provided.
|
|
42
|
+
* Defaults to false.
|
|
43
|
+
*/
|
|
44
|
+
createCart?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Callback to handle a new cart being created.
|
|
47
|
+
* WARNING: If not provided the component create new carts on every add-to-cart.
|
|
48
|
+
*/
|
|
49
|
+
onCartCreated?: (cart: Cart) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Callback to handle adding the product to cart.
|
|
52
|
+
* If not provided the component calls CartService.addItemToCart internally.
|
|
53
|
+
*/
|
|
54
|
+
onAddToCart?: (product: Product, clusterId?: number, quantity?: number, childItems?: CartChildItemInput[], notes?: string, price?: number, showModal?: boolean) => Cart;
|
|
55
|
+
/**
|
|
56
|
+
* Callback triggered after adding the product to cart.
|
|
57
|
+
*/
|
|
58
|
+
afterAddToCart?: (cart: Cart, item?: CartMainItem) => void;
|
|
59
|
+
/**
|
|
60
|
+
* When true a modal popup is shown after a successful add-to-cart
|
|
61
|
+
* with buttons to continue shopping or proceed to checkout.
|
|
62
|
+
* Defaults to false (only a brief inline success message is shown).
|
|
63
|
+
*/
|
|
64
|
+
showModal?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Renders − and + buttons beside the quantity input.
|
|
67
|
+
* Defaults to true.
|
|
68
|
+
*/
|
|
69
|
+
allowIncrDecr?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Validates available stock via InventoryService before adding.
|
|
72
|
+
* Defaults to false.
|
|
73
|
+
*/
|
|
74
|
+
enableStockValidation?: boolean;
|
|
75
|
+
/** Language code passed to CartService operations. Defaults to 'en'. */
|
|
76
|
+
language?: string;
|
|
77
|
+
/** Additional CSS class for the root element */
|
|
78
|
+
className?: string;
|
|
79
|
+
/** Callback fired when the "Proceed to checkout" modal button is clicked */
|
|
80
|
+
onProceedToCheckout?: () => void;
|
|
81
|
+
/** Callback fired when the "Request a Quote" modal button is clicked */
|
|
82
|
+
onRequestQuoteClick?: (cart: Cart) => void;
|
|
83
|
+
/** Configuration object passed to the component */
|
|
84
|
+
configuration?: {
|
|
85
|
+
language?: string;
|
|
86
|
+
imageSearchFiltersGrid?: MediaImageProductSearchInput;
|
|
87
|
+
imageVariantFiltersSmall?: TransformationsInput;
|
|
88
|
+
urls?: {
|
|
89
|
+
getProductUrl: (product: Product, language?: string) => string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
/** Active company ID from the company switcher. Overrides user's default company for cart creation and lookup. */
|
|
93
|
+
companyId?: number;
|
|
94
|
+
/**
|
|
95
|
+
* When true, tax-inclusive price (net) is shown.
|
|
96
|
+
* When false, tax-exclusive price (gross) is shown.
|
|
97
|
+
* Defaults to false.
|
|
98
|
+
*/
|
|
99
|
+
includeTax?: boolean;
|
|
100
|
+
priceComponent?: Component;
|
|
101
|
+
stockComponent?: Component;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Cart query variables interface Variables for the cart query
|
|
105
|
+
*/
|
|
106
|
+
/**
|
|
107
|
+
* Cart query variables interface Variables for the cart query
|
|
108
|
+
*/
|
|
109
|
+
export interface CartQueryVariables {
|
|
110
|
+
/** Cart ID to fetch */
|
|
111
|
+
cartId: string;
|
|
112
|
+
/** Language for localized content */
|
|
113
|
+
language: string;
|
|
114
|
+
/** Image search filters */
|
|
115
|
+
imageSearchFilters: MediaImageProductSearchInput;
|
|
116
|
+
/** Image transformation filters */
|
|
117
|
+
imageVariantFilters: TransformationsInput;
|
|
118
|
+
}
|
|
119
|
+
declare const _default: import('vue').DefineComponent<AddToCartProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AddToCartProps> & Readonly<{}>, {
|
|
120
|
+
allowIncrDecr: boolean;
|
|
121
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
122
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GraphQLClient, Contact, Customer } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface AddToFavoriteProps {
|
|
3
|
+
/** The initialized GraphQL Client instance */
|
|
4
|
+
graphqlClient: GraphQLClient;
|
|
5
|
+
/** The authenticated user */
|
|
6
|
+
user: Contact | Customer | null;
|
|
7
|
+
/** Product ID to add/remove from favorites (for products) */
|
|
8
|
+
productId?: number;
|
|
9
|
+
/** Cluster ID to add/remove from favorites (for clusters) */
|
|
10
|
+
clusterId?: number;
|
|
11
|
+
/** Extra CSS class applied to the root button */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** UI string overrides */
|
|
14
|
+
labels?: Record<string, string>;
|
|
15
|
+
/** Called after a favorite list mutation (add/remove) succeeds */
|
|
16
|
+
onFavoriteChanged?: () => void;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import('vue').DefineComponent<AddToFavoriteProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AddToFavoriteProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { Address, CartAddress, Gender, GraphQLClient, OrderAddress, WarehouseAddress, YesNo } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface AddressCardProps {
|
|
3
|
+
/** GraphQL client for the Propeller SDK (only needed when editing) */
|
|
4
|
+
graphqlClient?: GraphQLClient;
|
|
5
|
+
/** The address to display (Address | CartAddress | WarehouseAddress | OrderAddress) */
|
|
6
|
+
address: Address | CartAddress | WarehouseAddress | OrderAddress | null;
|
|
7
|
+
/** Display company name @default true */
|
|
8
|
+
showCompanyName?: boolean;
|
|
9
|
+
/** Display salutation (Mr./Mrs.) @default true */
|
|
10
|
+
showSalutation?: boolean;
|
|
11
|
+
/** Display full name @default true */
|
|
12
|
+
showFullName?: boolean;
|
|
13
|
+
/** Display street @default true */
|
|
14
|
+
showStreet?: boolean;
|
|
15
|
+
/** Display house number and extension @default true */
|
|
16
|
+
showNumberExtension?: boolean;
|
|
17
|
+
/** Display postal code @default true */
|
|
18
|
+
showPostalCode?: boolean;
|
|
19
|
+
/** Display city @default true */
|
|
20
|
+
showCity?: boolean;
|
|
21
|
+
/** Display country name @default true */
|
|
22
|
+
showCountry?: boolean;
|
|
23
|
+
/** Display email @default false */
|
|
24
|
+
showEmail?: boolean;
|
|
25
|
+
/** Display phone @default false */
|
|
26
|
+
showPhone?: boolean;
|
|
27
|
+
/** Display action buttons (edit, delete, set default) @default true */
|
|
28
|
+
enableActions?: boolean;
|
|
29
|
+
/** Display Edit button @default true */
|
|
30
|
+
enableEdit?: boolean;
|
|
31
|
+
/** Display Delete button @default true */
|
|
32
|
+
enableDelete?: boolean;
|
|
33
|
+
/** Display Set Default button @default true */
|
|
34
|
+
enableSetDefault?: boolean;
|
|
35
|
+
/** Display the "Default ... Address" badge @default false */
|
|
36
|
+
showDefaultBadge?: boolean;
|
|
37
|
+
/** Called when address is edited; receives the updated address object */
|
|
38
|
+
onEdit?: (address: Address) => void | Promise<void>;
|
|
39
|
+
/** Called after address edit completes */
|
|
40
|
+
afterEdit?: (address: Address) => void | Promise<void>;
|
|
41
|
+
/** Called when address is deleted; receives the address ID */
|
|
42
|
+
onDelete?: (addressId: Address) => void;
|
|
43
|
+
/** Called after address deletion completes */
|
|
44
|
+
afterDelete?: (addressId: Address) => void;
|
|
45
|
+
/** Called when address is set as default */
|
|
46
|
+
onSetDefault?: (address: Address) => void;
|
|
47
|
+
/** Called after address is set as default */
|
|
48
|
+
afterSetDefault?: (address: Address) => void;
|
|
49
|
+
/** List of countries for the country dropdown [{code: 'NL', name: 'Netherlands'}, ...] */
|
|
50
|
+
countries?: {
|
|
51
|
+
code: string;
|
|
52
|
+
name: string;
|
|
53
|
+
}[];
|
|
54
|
+
/** When true, renders in "new address" mode: auto-opens the edit form, hides the card body */
|
|
55
|
+
isNew?: boolean;
|
|
56
|
+
/** Called when the form is cancelled in new mode */
|
|
57
|
+
onCancel?: () => void;
|
|
58
|
+
/** When true, renders the form inline instead of in a modal overlay. @default false */
|
|
59
|
+
inline?: boolean;
|
|
60
|
+
/** Address type for new addresses (e.g., 'DELIVERY', 'INVOICE'). Used when creating, not editing. */
|
|
61
|
+
addressType?: string;
|
|
62
|
+
/** Show ICP/ICS (intra-community supply) checkbox. @default false */
|
|
63
|
+
showIcp?: boolean;
|
|
64
|
+
/** Title for the form or section */
|
|
65
|
+
title?: string;
|
|
66
|
+
/** Labels for form fields and buttons */
|
|
67
|
+
labels?: Record<string, string>;
|
|
68
|
+
/** Called before save starts */
|
|
69
|
+
beforeSave?: () => void;
|
|
70
|
+
}
|
|
71
|
+
interface AddressCardState {
|
|
72
|
+
showEditModal: boolean;
|
|
73
|
+
showDeleteConfirm: boolean;
|
|
74
|
+
localAddress: any;
|
|
75
|
+
editCompany: string;
|
|
76
|
+
editGender: Gender;
|
|
77
|
+
editFirstName: string;
|
|
78
|
+
editMiddleName: string;
|
|
79
|
+
editLastName: string;
|
|
80
|
+
editStreet: string;
|
|
81
|
+
editNumber: string;
|
|
82
|
+
editNumberExtension: string;
|
|
83
|
+
editPostalCode: string;
|
|
84
|
+
editCity: string;
|
|
85
|
+
editCountry: string;
|
|
86
|
+
editEmail: string;
|
|
87
|
+
editPhone: string;
|
|
88
|
+
editNotes: string;
|
|
89
|
+
editIcp: YesNo;
|
|
90
|
+
saving: boolean;
|
|
91
|
+
getLabel: (key: string, fallback: string) => string;
|
|
92
|
+
getCountryName: (code: string) => string;
|
|
93
|
+
addr: any;
|
|
94
|
+
showCard: boolean;
|
|
95
|
+
formTitle: string;
|
|
96
|
+
openEditModal: () => void;
|
|
97
|
+
handleSaveEdit: (e: any) => Promise<void>;
|
|
98
|
+
confirmDelete: () => void;
|
|
99
|
+
handleSetDefault: () => void;
|
|
100
|
+
closeEditModal: () => void;
|
|
101
|
+
}
|
|
102
|
+
declare function openEditModal(): ReturnType<AddressCardState["openEditModal"]>;
|
|
103
|
+
declare function handleSetDefault(): ReturnType<AddressCardState["handleSetDefault"]>;
|
|
104
|
+
declare function __VLS_template(): {
|
|
105
|
+
attrs: Partial<{}>;
|
|
106
|
+
slots: {
|
|
107
|
+
typeBadge?(_: {
|
|
108
|
+
address: any;
|
|
109
|
+
addressType: string;
|
|
110
|
+
addressTypeLabel: string;
|
|
111
|
+
}): any;
|
|
112
|
+
name?(_: {
|
|
113
|
+
address: any;
|
|
114
|
+
fullName: string;
|
|
115
|
+
salutation: any;
|
|
116
|
+
}): any;
|
|
117
|
+
addressLines?(_: {
|
|
118
|
+
address: any;
|
|
119
|
+
streetLine: string;
|
|
120
|
+
cityLine: string;
|
|
121
|
+
}): any;
|
|
122
|
+
country?(_: {
|
|
123
|
+
address: any;
|
|
124
|
+
countryName: string;
|
|
125
|
+
}): any;
|
|
126
|
+
defaultBadge?(_: {
|
|
127
|
+
address: any;
|
|
128
|
+
isDefault: boolean;
|
|
129
|
+
addressType: any;
|
|
130
|
+
}): any;
|
|
131
|
+
actions?(_: {
|
|
132
|
+
address: any;
|
|
133
|
+
onEdit: typeof openEditModal;
|
|
134
|
+
onDelete: () => void;
|
|
135
|
+
onSetDefault: typeof handleSetDefault;
|
|
136
|
+
saving: boolean;
|
|
137
|
+
}): any;
|
|
138
|
+
};
|
|
139
|
+
refs: {};
|
|
140
|
+
rootEl: HTMLDivElement;
|
|
141
|
+
};
|
|
142
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
143
|
+
declare const __VLS_component: import('vue').DefineComponent<AddressCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AddressCardProps> & Readonly<{}>, {
|
|
144
|
+
showCompanyName: boolean;
|
|
145
|
+
showSalutation: boolean;
|
|
146
|
+
showFullName: boolean;
|
|
147
|
+
showStreet: boolean;
|
|
148
|
+
showNumberExtension: boolean;
|
|
149
|
+
showPostalCode: boolean;
|
|
150
|
+
showCity: boolean;
|
|
151
|
+
showCountry: boolean;
|
|
152
|
+
showEmail: boolean;
|
|
153
|
+
showPhone: boolean;
|
|
154
|
+
enableActions: boolean;
|
|
155
|
+
enableEdit: boolean;
|
|
156
|
+
enableDelete: boolean;
|
|
157
|
+
enableSetDefault: boolean;
|
|
158
|
+
showDefaultBadge: boolean;
|
|
159
|
+
isNew: boolean;
|
|
160
|
+
inline: boolean;
|
|
161
|
+
showIcp: boolean;
|
|
162
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
163
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
164
|
+
export default _default;
|
|
165
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
166
|
+
new (): {
|
|
167
|
+
$slots: S;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { Address, Contact, Customer } from '@propeller-commerce/propeller-sdk-v2';
|
|
3
|
+
export interface AddressSelectorProps {
|
|
4
|
+
/** Authenticated user — addresses are derived from their profile. */
|
|
5
|
+
user: Contact | Customer | null;
|
|
6
|
+
/**
|
|
7
|
+
* Active company ID (for Contact users).
|
|
8
|
+
* Pass the value from the company switcher so the correct company's addresses are listed.
|
|
9
|
+
*/
|
|
10
|
+
companyId?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Filter addresses to this type.
|
|
13
|
+
* Defaults to AddressType.delivery.
|
|
14
|
+
*/
|
|
15
|
+
addressType?: string;
|
|
16
|
+
/** Called when the user picks an address from the modal. Supports async. */
|
|
17
|
+
onAddressSelected?: (address: Address) => void | Promise<void>;
|
|
18
|
+
/** Country list forwarded to AddressCard [{code: 'NL', name: 'Netherlands'}, ...] */
|
|
19
|
+
countries?: {
|
|
20
|
+
code: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}[];
|
|
23
|
+
/** Label overrides. Keys: chooseAddress, modalTitle, noAddresses */
|
|
24
|
+
labels?: Record<string, string>;
|
|
25
|
+
/** Extra CSS class on the root element. */
|
|
26
|
+
className?: string;
|
|
27
|
+
addressCardComponent?: Component;
|
|
28
|
+
}
|
|
29
|
+
declare const _default: import('vue').DefineComponent<AddressSelectorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AddressSelectorProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Category } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface BreadcrumbsProps {
|
|
3
|
+
/**
|
|
4
|
+
* The category path from the category, product or cluster response.
|
|
5
|
+
* Obtain from `category.categoryPath` or `product.category.categoryPath`.
|
|
6
|
+
*/
|
|
7
|
+
categoryPath: Category[];
|
|
8
|
+
/**
|
|
9
|
+
* When true (default), the last item in the path is displayed as the
|
|
10
|
+
* current page (non-clickable, aria-current="page").
|
|
11
|
+
* When false, the last item is omitted.
|
|
12
|
+
* Ignored when `currentLabel` is provided — the extra crumb becomes
|
|
13
|
+
* the current page instead.
|
|
14
|
+
*/
|
|
15
|
+
showCurrent?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The category of the current page. When provided and not already
|
|
18
|
+
* the last item in `categoryPath`, it is appended automatically so
|
|
19
|
+
* the trail always ends at the current category. This makes the
|
|
20
|
+
* component correct whether the API's categoryPath includes the
|
|
21
|
+
* current category or only its ancestors.
|
|
22
|
+
*/
|
|
23
|
+
currentCategory?: Category;
|
|
24
|
+
/**
|
|
25
|
+
* Optional trailing crumb appended after the category path — typically
|
|
26
|
+
* the name of the current product or cluster on a detail page.
|
|
27
|
+
* When provided, this crumb is marked as the current page and the
|
|
28
|
+
* last category becomes a normal link.
|
|
29
|
+
*/
|
|
30
|
+
currentLabel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional URL for the trailing `currentLabel` crumb. When omitted,
|
|
33
|
+
* the crumb is rendered as a non-link `<span>`.
|
|
34
|
+
*/
|
|
35
|
+
currentUrl?: string;
|
|
36
|
+
/**
|
|
37
|
+
* When true (default), a "Home" link is prepended to the trail.
|
|
38
|
+
*/
|
|
39
|
+
showHome?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* URL for the Home link. Defaults to '/'.
|
|
42
|
+
*/
|
|
43
|
+
homeUrl?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Language code used to resolve localised category names and slugs.
|
|
46
|
+
* Defaults to 'NL'.
|
|
47
|
+
*/
|
|
48
|
+
language?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Custom URL builder for category links.
|
|
51
|
+
* Receives the Category object and its zero-based index in the path.
|
|
52
|
+
* When omitted, URLs default to `/category/{categoryId}/{slug}`.
|
|
53
|
+
*/
|
|
54
|
+
getUrl?: (category: Category, index: number) => string;
|
|
55
|
+
/**
|
|
56
|
+
* Override any UI string.
|
|
57
|
+
* Available keys: home, separator
|
|
58
|
+
*/
|
|
59
|
+
labels?: Record<string, string>;
|
|
60
|
+
/** Extra CSS class applied to the root element. */
|
|
61
|
+
className?: string;
|
|
62
|
+
/** Configuration object passed to the component */
|
|
63
|
+
configuration?: any;
|
|
64
|
+
}
|
|
65
|
+
declare const _default: import('vue').DefineComponent<BreadcrumbsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BreadcrumbsProps> & Readonly<{}>, {
|
|
66
|
+
showCurrent: boolean;
|
|
67
|
+
showHome: boolean;
|
|
68
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
69
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Cart, CartBaseItem } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface CartBonusItemsProps {
|
|
3
|
+
/** Cart whose `bonusItems` (free items added via incentives) are displayed. */
|
|
4
|
+
cart?: Cart | null;
|
|
5
|
+
/** Pre-resolved bonus items. When omitted, `cart.bonusItems` is used. */
|
|
6
|
+
bonusItems?: CartBaseItem[];
|
|
7
|
+
/** When true, the tax-inclusive total (`totalPriceNet`) is shown. Resolved from the Propeller provider when omitted; defaults to false. */
|
|
8
|
+
includeTax?: boolean;
|
|
9
|
+
/** Currency symbol for prices. Resolved from the Propeller provider when omitted; defaults to '€'. */
|
|
10
|
+
currency?: string;
|
|
11
|
+
/** Active language for localized product names. Resolved from the Propeller provider when omitted. */
|
|
12
|
+
language?: string;
|
|
13
|
+
/** Additional CSS class for the root element. */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Label overrides. Keys: `title` ('Bonus items'), `sku` ('SKU'). */
|
|
16
|
+
labels?: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import('vue').DefineComponent<CartBonusItemsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CartBonusItemsProps> & Readonly<{}>, {
|
|
19
|
+
cart: Cart | null;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Cart, CartCarrier } from '@propeller-commerce/propeller-sdk-v2';
|
|
2
|
+
export interface CartCarriersProps {
|
|
3
|
+
/** Shopping cart object from which the carriers will be displayed */
|
|
4
|
+
cart: Cart;
|
|
5
|
+
/** Currency symbol to display. Defaults to '€'. */
|
|
6
|
+
currency?: string;
|
|
7
|
+
/** The CSS class for the carriers container */
|
|
8
|
+
carriersContainerClass?: string;
|
|
9
|
+
/** Display the carrier logo */
|
|
10
|
+
showCarrierLogo?: boolean;
|
|
11
|
+
/** Action when a carrier is selected */
|
|
12
|
+
onCarrierSelect?: (carrier: CartCarrier) => void;
|
|
13
|
+
/** Custom price formatting function */
|
|
14
|
+
formatPrice?: (price: number) => string;
|
|
15
|
+
/** Show carrier price (default: true) */
|
|
16
|
+
showPrice?: boolean;
|
|
17
|
+
/** Labels for the component */
|
|
18
|
+
labels?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: import('vue').DefineComponent<CartCarriersProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CartCarriersProps> & Readonly<{}>, {
|
|
21
|
+
showPrice: boolean;
|
|
22
|
+
showCarrierLogo: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { Cart, Contact, Customer, GraphQLClient } from '@propeller-commerce/propeller-sdk-v2';
|
|
3
|
+
export interface CartIconAndSidebarProps {
|
|
4
|
+
/**
|
|
5
|
+
* Shopping cart that this component will operate with.
|
|
6
|
+
* Should be passed from a cart state.
|
|
7
|
+
*/
|
|
8
|
+
cart: Cart | null;
|
|
9
|
+
/** Currency symbol to display. Defaults to '€'. */
|
|
10
|
+
currency?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Icon for the cart icon in header.
|
|
13
|
+
* @default 'default-cart-icon'
|
|
14
|
+
*/
|
|
15
|
+
icon?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Shows item count badge on the cart icon.
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
showBadge?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Shows the totals of the shopping cart beneath the icon when hovered.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
showTotals?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Show cart sidebar at the right side of the screen when cart icon is clicked.
|
|
28
|
+
* If false it will fire onCartIconClick() instead.
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
showCartSidebarOnClick?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Fires a click event when showCartSidebarOnClick is set to false.
|
|
34
|
+
*/
|
|
35
|
+
onCartIconClick?: (cart: Cart) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Title for the shopping cart sidebar.
|
|
38
|
+
* @default 'Shopping cart'
|
|
39
|
+
*/
|
|
40
|
+
cartSidebarTitle?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Show checkout button in cart sidebar for immediate checkout.
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
cartCheckoutButton?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Fires a click event when the checkout button in the sidebar is clicked.
|
|
48
|
+
*/
|
|
49
|
+
onCheckoutButtonClick?: (cart: Cart) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Show shopping cart page button in cart sidebar.
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
54
|
+
cartPageButton?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Fires a click event when the shopping cart button in the sidebar is clicked.
|
|
57
|
+
*/
|
|
58
|
+
onCartPageButtonClick?: (cart: Cart) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Labels for the component.
|
|
61
|
+
* Available keys: cartIconLabel, totalLabel, itemsLabel, emptyCart,
|
|
62
|
+
* continueShopping, qty, total, checkoutButton, cartPageButton, closeLabel
|
|
63
|
+
*/
|
|
64
|
+
labels?: Record<string, string>;
|
|
65
|
+
/** Logged-in user — used to determine purchaser role and authorization limit */
|
|
66
|
+
user?: Contact | Customer;
|
|
67
|
+
/** Active company ID — used to look up the user's PAC for this company */
|
|
68
|
+
companyId?: number;
|
|
69
|
+
/** Action handler when the "Request a Quote" button is clicked */
|
|
70
|
+
onRequestQuoteClick?: (cart: Cart) => void;
|
|
71
|
+
/** GraphQL client — used for internal CartService calls (e.g. purchase authorization) */
|
|
72
|
+
graphqlClient?: GraphQLClient;
|
|
73
|
+
/** Override the internal request purchase authorization call */
|
|
74
|
+
onRequestAuthorization?: (cart: Cart) => void;
|
|
75
|
+
/** Fires after a successful purchase authorization request with the updated cart */
|
|
76
|
+
afterRequestAuthorization?: (cart: Cart) => void;
|
|
77
|
+
/** Error handler for authorization request failures */
|
|
78
|
+
onError?: (error: Error) => void;
|
|
79
|
+
/**
|
|
80
|
+
* Additional class name for the shopping cart icon.
|
|
81
|
+
*/
|
|
82
|
+
iconClassName?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Additional class name for the shopping cart sidebar.
|
|
85
|
+
*/
|
|
86
|
+
sidebarClassName?: string;
|
|
87
|
+
/** Configuration object for image filters */
|
|
88
|
+
configuration?: any;
|
|
89
|
+
/** Language used to build localized URLs for cart-item links. Defaults to 'NL'. */
|
|
90
|
+
language?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Replaces each cart row rendered inside the drawer with a custom CartItem.
|
|
93
|
+
* The drawer composes CartItem with cardFrame=false, showDelete=false,
|
|
94
|
+
* readOnlyQuantity, and onTitleClick wired to close the sidebar.
|
|
95
|
+
*/
|
|
96
|
+
cartItemComponent?: Component;
|
|
97
|
+
cartBonusItemsComponent?: Component;
|
|
98
|
+
}
|
|
99
|
+
declare const _default: import('vue').DefineComponent<CartIconAndSidebarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CartIconAndSidebarProps> & Readonly<{}>, {
|
|
100
|
+
showBadge: boolean;
|
|
101
|
+
showCartSidebarOnClick: boolean;
|
|
102
|
+
cartPageButton: boolean;
|
|
103
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
104
|
+
export default _default;
|