@propeller-commerce/propeller-v2-vue-ui 0.3.24 → 0.3.26
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 +38 -0
- package/dist/components/GridToolbar.vue.d.ts +5 -0
- package/dist/components/Menu.vue.d.ts +7 -0
- package/dist/components/ProductCard.vue.d.ts +15 -0
- package/dist/components/ProductGrid.vue.d.ts +15 -0
- package/dist/components/ProductInfo.vue.d.ts +10 -0
- package/dist/components/ProductSpecifications.vue.d.ts +5 -0
- package/dist/components/ProductTabs.vue.d.ts +6 -0
- package/dist/components/SearchBar.vue.d.ts +8 -0
- package/dist/composables/vue/useProductInfo.d.ts +10 -0
- package/dist/composables/vue/useProductSearch.d.ts +8 -0
- package/dist/context/ProductGridContext.d.ts +7 -0
- package/dist/index.cjs +248 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +248 -180
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,44 @@ once it reaches 1.0. Until then (the `0.x` line) the public API may change
|
|
|
8
8
|
between minor versions; breaking changes are called out below and in
|
|
9
9
|
[MIGRATION.md](./MIGRATION.md).
|
|
10
10
|
|
|
11
|
+
## [0.3.26] - 2026-07-09
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `ProductCard` / `ProductGrid`: new `belowNameComponent?: Component` prop plus a
|
|
16
|
+
`#belowName` scoped slot on `ProductCard`. Renders arbitrary host-supplied
|
|
17
|
+
content directly below the product name (and above the short description /
|
|
18
|
+
price) in both the grid and row layouts, without forking the card — e.g.
|
|
19
|
+
package descriptions or custom badges. On `ProductGrid` the component cascades
|
|
20
|
+
to every card via `ProductGridConfig`; on `ProductCard` it can also be set
|
|
21
|
+
per-card (explicit prop wins over grid context) or overridden via the
|
|
22
|
+
`#belowName` slot. Mirrors the React `belowName` render prop.
|
|
23
|
+
|
|
24
|
+
## [0.3.25] - 2026-07-09
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- `ProductGrid`, `SearchBar`, `ProductInfo`: new `orderlistIds?: number[]` and
|
|
29
|
+
`applyOrderlists?: boolean` props to scope the product/search fetch to
|
|
30
|
+
specific orderlists (e.g. a chosen B2B contract). When `orderlistIds` is
|
|
31
|
+
non-empty, orderlists are applied (unless `applyOrderlists` is `false`);
|
|
32
|
+
otherwise `applyOrderlists: false` is sent so an authenticated user without a
|
|
33
|
+
contract still sees the full catalogue. Threaded through `useProductSearch`
|
|
34
|
+
and `useProductInfo` (explicit ids override the composable's default
|
|
35
|
+
all-company-orderlists resolution).
|
|
36
|
+
- `Menu`: new `getUrl?: (category: Category) => string` prop — a custom URL
|
|
37
|
+
builder that overrides `menuLinkFormat` / `configuration.urls.getCategoryUrl`,
|
|
38
|
+
letting hosts inject dynamic query strings (e.g. `?contract=…`). Mirrors the
|
|
39
|
+
existing `Breadcrumbs.getUrl`.
|
|
40
|
+
- `GridToolbar`: new `hidePriceSort?: boolean` prop to hide the price sort
|
|
41
|
+
option entirely (closed B2B portals where prices are "by quotation").
|
|
42
|
+
- `ProductTabs` / `ProductSpecifications`: new
|
|
43
|
+
`specificationsPackageDescription?` (ProductTabs) → `packageDescription?`
|
|
44
|
+
(ProductSpecifications) passthrough, rendering an extra package-description
|
|
45
|
+
string above the specifications table.
|
|
46
|
+
|
|
47
|
+
Mirrors React UI 0.4.16. All additions are additive and backward-compatible.
|
|
48
|
+
|
|
11
49
|
## [0.3.24] - 2026-07-08
|
|
12
50
|
|
|
13
51
|
### Changed
|
|
@@ -6,6 +6,11 @@ export interface GridToolbarProps {
|
|
|
6
6
|
* Defaults to all available sort fields.
|
|
7
7
|
*/
|
|
8
8
|
sortOptions?: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Hide the price-ascending/descending sort options entirely. Default: false.
|
|
11
|
+
* Useful for closed B2B portals where prices are "by quotation".
|
|
12
|
+
*/
|
|
13
|
+
hidePriceSort?: boolean;
|
|
9
14
|
/**
|
|
10
15
|
* Active sort — first element is used.
|
|
11
16
|
* Defaults to [{ field: 'CATEGORY_ORDER', order: 'DESC' }].
|
|
@@ -36,6 +36,13 @@ export interface MenuProps {
|
|
|
36
36
|
* Defaults to 'category/{categoryId}/{slug}'.
|
|
37
37
|
*/
|
|
38
38
|
menuLinkFormat?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Custom URL builder for category links. Overrides `menuLinkFormat` /
|
|
41
|
+
* `configuration.urls.getCategoryUrl`. Lets hosts inject dynamic query strings
|
|
42
|
+
* (e.g. `?contract=…`) that a static format string cannot express.
|
|
43
|
+
* Mirrors the `getUrl` prop on Breadcrumbs.
|
|
44
|
+
*/
|
|
45
|
+
getUrl?: (category: Category) => string;
|
|
39
46
|
/**
|
|
40
47
|
* Called when a menu item is clicked.
|
|
41
48
|
* Use for SPA-style routing instead of full-page navigation.
|
|
@@ -168,6 +168,15 @@ export interface ProductCardProps {
|
|
|
168
168
|
imageComponent?: Component;
|
|
169
169
|
badgesComponent?: Component;
|
|
170
170
|
favoriteComponent?: Component;
|
|
171
|
+
/**
|
|
172
|
+
* Render arbitrary content directly below the product name (and above the
|
|
173
|
+
* short description / price), in both the grid and row layouts. Receives the
|
|
174
|
+
* product as a prop so hosts can surface extra info — e.g. package
|
|
175
|
+
* descriptions, custom badges — without forking the card. Consumers can also
|
|
176
|
+
* use the `#belowName` scoped slot directly; this prop is the cascadable
|
|
177
|
+
* (grid-wide) equivalent.
|
|
178
|
+
*/
|
|
179
|
+
belowNameComponent?: Component;
|
|
171
180
|
}
|
|
172
181
|
interface ProductCardState {
|
|
173
182
|
isFavorite: boolean;
|
|
@@ -238,6 +247,12 @@ declare function __VLS_template(): {
|
|
|
238
247
|
name: string;
|
|
239
248
|
onNavigate: typeof handleNavigate;
|
|
240
249
|
}): any;
|
|
250
|
+
belowName?(_: {
|
|
251
|
+
product: Product;
|
|
252
|
+
}): any;
|
|
253
|
+
belowName?(_: {
|
|
254
|
+
product: Product;
|
|
255
|
+
}): any;
|
|
241
256
|
textLabels?(_: {
|
|
242
257
|
product: Product;
|
|
243
258
|
values: {
|
|
@@ -32,6 +32,14 @@ export interface ProductGridProps {
|
|
|
32
32
|
* categoryProductSearchInput and uses `config.baseCategoryId`.
|
|
33
33
|
*/
|
|
34
34
|
brand?: string;
|
|
35
|
+
/** Scope the product fetch to specific orderlist IDs (e.g. a chosen B2B contract). */
|
|
36
|
+
orderlistIds?: number[];
|
|
37
|
+
/**
|
|
38
|
+
* Apply the orderlist filter. Defaults to `true` when `orderlistIds` is
|
|
39
|
+
* non-empty, `false` otherwise — so an authenticated user without a contract
|
|
40
|
+
* still sees the full catalogue.
|
|
41
|
+
*/
|
|
42
|
+
applyOrderlists?: boolean;
|
|
35
43
|
/** Number of columns in the grid. Accepts 2, 3, 4, 5, or 6. Defaults to 3. */
|
|
36
44
|
columns?: number;
|
|
37
45
|
/**
|
|
@@ -256,6 +264,13 @@ export interface ProductGridProps {
|
|
|
256
264
|
favoriteComponent?: Component;
|
|
257
265
|
productCardComponent?: Component;
|
|
258
266
|
clusterCardComponent?: Component;
|
|
267
|
+
/**
|
|
268
|
+
* Render arbitrary content directly below each card's product name. Receives
|
|
269
|
+
* the product as a prop; cascades to every ProductCard via ProductGridConfig.
|
|
270
|
+
* Lets hosts surface extra per-product info (e.g. package descriptions)
|
|
271
|
+
* across the whole grid without swapping the entire card.
|
|
272
|
+
*/
|
|
273
|
+
belowNameComponent?: Component;
|
|
259
274
|
}
|
|
260
275
|
declare function __VLS_template(): {
|
|
261
276
|
attrs: Partial<{}>;
|
|
@@ -7,6 +7,16 @@ export interface ProductInfoProps {
|
|
|
7
7
|
* Overrides default company for price calculation.
|
|
8
8
|
* Triggers a re-fetch when changed. */
|
|
9
9
|
companyId?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Scope the product fetch to specific orderlist IDs (e.g. a chosen B2B
|
|
12
|
+
* contract). Overrides the default resolution of all the company's orderlists.
|
|
13
|
+
*/
|
|
14
|
+
orderlistIds?: number[];
|
|
15
|
+
/**
|
|
16
|
+
* Apply the orderlist filter. Defaults to `true`; set `false` to browse
|
|
17
|
+
* unscoped (full catalogue) for an authenticated user without a contract.
|
|
18
|
+
*/
|
|
19
|
+
applyOrderlists?: boolean;
|
|
10
20
|
/**
|
|
11
21
|
* Pre-fetched product object to display.
|
|
12
22
|
* When provided the component skips internal fetching.
|
|
@@ -30,6 +30,11 @@ export interface ProductSpecificationsProps {
|
|
|
30
30
|
* When false or omitted, displays a flat ungrouped table/list. Default: false.
|
|
31
31
|
*/
|
|
32
32
|
grouping?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Optional package-description string (e.g. contents / packaging notes),
|
|
35
|
+
* rendered above the attribute table. Omitted when empty.
|
|
36
|
+
*/
|
|
37
|
+
packageDescription?: string;
|
|
33
38
|
/** Extra CSS class applied to the root element. */
|
|
34
39
|
className?: string;
|
|
35
40
|
}
|
|
@@ -55,6 +55,12 @@ export interface ProductTabsProps {
|
|
|
55
55
|
* Passed as `grouping` to ProductSpecifications.
|
|
56
56
|
*/
|
|
57
57
|
specificationsGrouping?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Extra package-description string rendered in the specifications section
|
|
60
|
+
* (e.g. contents / packaging notes). Passed as `packageDescription` to
|
|
61
|
+
* ProductSpecifications.
|
|
62
|
+
*/
|
|
63
|
+
specificationsPackageDescription?: string;
|
|
58
64
|
/**
|
|
59
65
|
* Override UI strings for the Downloads section.
|
|
60
66
|
* Available keys: title, download
|
|
@@ -54,6 +54,14 @@ export interface SearchBarProps {
|
|
|
54
54
|
* if the underlying SDK call supports priceCalculateProductInput.
|
|
55
55
|
*/
|
|
56
56
|
companyId?: number;
|
|
57
|
+
/** Scope the autosuggest fetch to specific orderlist IDs (e.g. a chosen B2B contract). */
|
|
58
|
+
orderlistIds?: number[];
|
|
59
|
+
/**
|
|
60
|
+
* Apply the orderlist filter. Defaults to `true` when `orderlistIds` is
|
|
61
|
+
* non-empty, `false` otherwise — so an authenticated user without a contract
|
|
62
|
+
* still sees the full catalogue.
|
|
63
|
+
*/
|
|
64
|
+
applyOrderlists?: boolean;
|
|
57
65
|
/**
|
|
58
66
|
* Configuration object providing:
|
|
59
67
|
* imageSearchFiltersGrid, imageVariantFiltersMedium — passed to CategoryService
|
|
@@ -6,6 +6,16 @@ export interface UseProductInfoOptions {
|
|
|
6
6
|
taxZone?: string;
|
|
7
7
|
user?: Ref<Contact | Customer | null>;
|
|
8
8
|
companyId?: Ref<number | undefined>;
|
|
9
|
+
/**
|
|
10
|
+
* Scope the product fetch to specific orderlist IDs (e.g. a chosen B2B
|
|
11
|
+
* contract). Overrides the default resolution of all the company's orderlists.
|
|
12
|
+
*/
|
|
13
|
+
orderlistIds?: Ref<number[] | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* Apply the orderlist filter. Defaults to `true`; set `false` to browse
|
|
16
|
+
* unscoped (full catalogue) for an authenticated user without a contract.
|
|
17
|
+
*/
|
|
18
|
+
applyOrderlists?: Ref<boolean | undefined>;
|
|
9
19
|
/** Attribute names to include in attributeResultSearchInput (productTrackAttributes). */
|
|
10
20
|
productTrackAttributes?: string[];
|
|
11
21
|
configuration?: {
|
|
@@ -11,6 +11,14 @@ export interface UseProductSearchOptions {
|
|
|
11
11
|
taxZone?: string;
|
|
12
12
|
user?: Ref<Contact | Customer | null>;
|
|
13
13
|
companyId?: Ref<number | undefined>;
|
|
14
|
+
/** Scope the product fetch to specific orderlist IDs (e.g. a chosen B2B contract). */
|
|
15
|
+
orderlistIds?: Ref<number[] | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* Apply the orderlist filter. Defaults to `true` when `orderlistIds` is
|
|
18
|
+
* non-empty, `false` otherwise — so an authenticated user without a contract
|
|
19
|
+
* still sees the full catalogue.
|
|
20
|
+
*/
|
|
21
|
+
applyOrderlists?: Ref<boolean | undefined>;
|
|
14
22
|
textFilters?: Ref<ProductTextFilterInput[] | undefined>;
|
|
15
23
|
priceFilterMin?: Ref<number | undefined>;
|
|
16
24
|
priceFilterMax?: Ref<number | undefined>;
|
|
@@ -43,6 +43,13 @@ export interface ProductGridConfig {
|
|
|
43
43
|
surchargesComponent?: Component;
|
|
44
44
|
productCardComponent?: Component;
|
|
45
45
|
clusterCardComponent?: Component;
|
|
46
|
+
/**
|
|
47
|
+
* Render arbitrary content directly below each card's product name. Receives
|
|
48
|
+
* the product as a prop; cascades to every ProductCard. Lets hosts surface
|
|
49
|
+
* extra per-product info (e.g. package descriptions) across the whole grid
|
|
50
|
+
* without swapping the entire card.
|
|
51
|
+
*/
|
|
52
|
+
belowNameComponent?: Component;
|
|
46
53
|
}
|
|
47
54
|
/** Injection key for the Tier 2 grid config. Symbol-keyed, collision-free. */
|
|
48
55
|
export declare const ProductGridInjectionKey: InjectionKey<ProductGridConfig>;
|