@propeller-commerce/propeller-v2-vue-ui 0.3.36 → 0.3.37
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 +22 -0
- package/dist/components/SearchBar.vue.d.ts +39 -1
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,28 @@ 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.37] - 2026-07-21
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`SearchBar` autosuggest now respects orderlist (contract) scoping.** The
|
|
16
|
+
debounced live-search query built a plain `ProductSearchInput` that never
|
|
17
|
+
passed `orderlistIds`/`applyOrderlists`, so the dropdown previewed the full
|
|
18
|
+
catalogue even inside a B2B contract catalogue (the submitted results were
|
|
19
|
+
already correctly scoped — only the preview leaked). It now threads the same
|
|
20
|
+
orderlist scope as the grid fetch, so previews and results agree and a PDP
|
|
21
|
+
outside the contract is no longer reachable from the preview.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **`SearchBar`: `#price` scoped slot + `showPrice` prop.** The scoped
|
|
26
|
+
`#price` slot (receives `{ result }`) replaces the price cell of each result
|
|
27
|
+
with custom content — e.g. a "Price by quotation" label for a contract
|
|
28
|
+
catalogue where prices are quote-only; it fully overrides the default price
|
|
29
|
+
rendering. `showPrice` (default `true`) is a simpler boolean to hide the
|
|
30
|
+
price column outright. Both default to the previous behaviour, so the change
|
|
31
|
+
is backward-compatible.
|
|
32
|
+
|
|
11
33
|
## [0.3.36] - 2026-07-21
|
|
12
34
|
|
|
13
35
|
### Added
|
|
@@ -61,6 +61,17 @@ export interface SearchBarProps {
|
|
|
61
61
|
* Omit to keep the button fallback.
|
|
62
62
|
*/
|
|
63
63
|
getViewAllHref?: (term: string) => string;
|
|
64
|
+
/**
|
|
65
|
+
* Show the price column on each autosuggest result. Defaults to `true`.
|
|
66
|
+
* Set `false` to hide prices entirely in the dropdown — e.g. a B2B
|
|
67
|
+
* contract-catalogue context where prices are quote-only and shouldn't
|
|
68
|
+
* appear in the live preview. Ignored when the `price` slot is provided.
|
|
69
|
+
*
|
|
70
|
+
* For custom per-result price content (e.g. a "Price by quotation" label),
|
|
71
|
+
* use the scoped `#price` slot instead — it receives `{ result }` and fully
|
|
72
|
+
* overrides the default price cell.
|
|
73
|
+
*/
|
|
74
|
+
showPrice?: boolean;
|
|
64
75
|
/** Custom price formatting function */
|
|
65
76
|
formatPrice?: (price: number) => string;
|
|
66
77
|
/** Labels for the component */
|
|
@@ -107,5 +118,32 @@ export interface SearchBarProps {
|
|
|
107
118
|
*/
|
|
108
119
|
clearSignal?: number;
|
|
109
120
|
}
|
|
110
|
-
declare
|
|
121
|
+
declare function __VLS_template(): {
|
|
122
|
+
attrs: Partial<{}>;
|
|
123
|
+
slots: {
|
|
124
|
+
price?(_: {
|
|
125
|
+
result: {
|
|
126
|
+
id: number | string;
|
|
127
|
+
name: string;
|
|
128
|
+
sku?: string | undefined;
|
|
129
|
+
price?: number | undefined;
|
|
130
|
+
priceNet?: number | undefined;
|
|
131
|
+
priceGross?: number | undefined;
|
|
132
|
+
imageUrl?: string | undefined;
|
|
133
|
+
url?: string | undefined;
|
|
134
|
+
isCluster?: boolean | undefined;
|
|
135
|
+
};
|
|
136
|
+
}): any;
|
|
137
|
+
};
|
|
138
|
+
refs: {};
|
|
139
|
+
rootEl: HTMLDivElement;
|
|
140
|
+
};
|
|
141
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
142
|
+
declare const __VLS_component: import('vue').DefineComponent<SearchBarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SearchBarProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
143
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
111
144
|
export default _default;
|
|
145
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
146
|
+
new (): {
|
|
147
|
+
$slots: S;
|
|
148
|
+
};
|
|
149
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -2192,6 +2192,11 @@ function useProductSearch(options) {
|
|
|
2192
2192
|
try {
|
|
2193
2193
|
const service = index.createServices(graphqlClient).product;
|
|
2194
2194
|
const lang = languageRef.value || "NL";
|
|
2195
|
+
const searchOrderlistIds = options.orderlistIds?.value;
|
|
2196
|
+
const orderlistScope = searchOrderlistIds && searchOrderlistIds.length > 0 ? {
|
|
2197
|
+
applyOrderlists: options.applyOrderlists?.value !== false,
|
|
2198
|
+
orderlistIds: searchOrderlistIds
|
|
2199
|
+
} : { applyOrderlists: false };
|
|
2195
2200
|
const input = {
|
|
2196
2201
|
term,
|
|
2197
2202
|
language: lang,
|
|
@@ -2203,6 +2208,7 @@ function useProductSearch(options) {
|
|
|
2203
2208
|
propellerSdkV2.ProductStatus.T,
|
|
2204
2209
|
propellerSdkV2.ProductStatus.S
|
|
2205
2210
|
],
|
|
2211
|
+
...orderlistScope,
|
|
2206
2212
|
sortInputs: [{ field: propellerSdkV2.ProductSortField.RELEVANCE, order: propellerSdkV2.SortOrder.DESC }],
|
|
2207
2213
|
searchFields: [
|
|
2208
2214
|
{
|
|
@@ -19937,7 +19943,7 @@ const _hoisted_11$1 = {
|
|
|
19937
19943
|
class: "propeller-search-bar__result-sku text-sm text-muted-foreground"
|
|
19938
19944
|
};
|
|
19939
19945
|
const _hoisted_12$1 = {
|
|
19940
|
-
key:
|
|
19946
|
+
key: 2,
|
|
19941
19947
|
class: "propeller-search-bar__result-price text-sm font-semibold text-foreground flex-shrink-0 text-right"
|
|
19942
19948
|
};
|
|
19943
19949
|
const _hoisted_13$1 = { class: "propeller-search-bar__result-price-value" };
|
|
@@ -19964,6 +19970,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
19964
19970
|
onViewAllClick: { type: Function },
|
|
19965
19971
|
getResultHref: { type: Function },
|
|
19966
19972
|
getViewAllHref: { type: Function },
|
|
19973
|
+
showPrice: { type: Boolean },
|
|
19967
19974
|
formatPrice: { type: Function },
|
|
19968
19975
|
labels: {},
|
|
19969
19976
|
includeTax: { type: Boolean },
|
|
@@ -20196,7 +20203,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
20196
20203
|
vue.createElementVNode("div", _hoisted_10$1, vue.toDisplayString(result.name), 1),
|
|
20197
20204
|
result.sku ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$1, "SKU: " + vue.toDisplayString(result.sku), 1)) : vue.createCommentVNode("", true)
|
|
20198
20205
|
]),
|
|
20199
|
-
|
|
20206
|
+
_ctx.$slots.price ? vue.renderSlot(_ctx.$slots, "price", {
|
|
20207
|
+
key: 1,
|
|
20208
|
+
result
|
|
20209
|
+
}) : __props.showPrice !== false && result.price !== void 0 && result.price !== null ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$1, [
|
|
20200
20210
|
vue.createElementVNode("span", _hoisted_13$1, vue.toDisplayString(formatItemPrice(leadingPrice(result))), 1),
|
|
20201
20211
|
vue.createElementVNode("span", _hoisted_14$1, vue.toDisplayString(priceTaxLabel()), 1)
|
|
20202
20212
|
])) : vue.createCommentVNode("", true)
|