@propeller-commerce/propeller-v2-vue-ui 0.3.24 → 0.3.25

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 CHANGED
@@ -8,6 +8,31 @@ 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.25] - 2026-07-09
12
+
13
+ ### Added
14
+
15
+ - `ProductGrid`, `SearchBar`, `ProductInfo`: new `orderlistIds?: number[]` and
16
+ `applyOrderlists?: boolean` props to scope the product/search fetch to
17
+ specific orderlists (e.g. a chosen B2B contract). When `orderlistIds` is
18
+ non-empty, orderlists are applied (unless `applyOrderlists` is `false`);
19
+ otherwise `applyOrderlists: false` is sent so an authenticated user without a
20
+ contract still sees the full catalogue. Threaded through `useProductSearch`
21
+ and `useProductInfo` (explicit ids override the composable's default
22
+ all-company-orderlists resolution).
23
+ - `Menu`: new `getUrl?: (category: Category) => string` prop — a custom URL
24
+ builder that overrides `menuLinkFormat` / `configuration.urls.getCategoryUrl`,
25
+ letting hosts inject dynamic query strings (e.g. `?contract=…`). Mirrors the
26
+ existing `Breadcrumbs.getUrl`.
27
+ - `GridToolbar`: new `hidePriceSort?: boolean` prop to hide the price sort
28
+ option entirely (closed B2B portals where prices are "by quotation").
29
+ - `ProductTabs` / `ProductSpecifications`: new
30
+ `specificationsPackageDescription?` (ProductTabs) → `packageDescription?`
31
+ (ProductSpecifications) passthrough, rendering an extra package-description
32
+ string above the specifications table.
33
+
34
+ Mirrors React UI 0.4.16. All additions are additive and backward-compatible.
35
+
11
36
  ## [0.3.24] - 2026-07-08
12
37
 
13
38
  ### 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.
@@ -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
  /**
@@ -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>;