@ikas/bp-storefront 0.77.0 → 0.78.0

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.
@@ -1,4 +1,4 @@
1
- import { IkasOrderLineItemOptionValue } from "../../../../../../storefront-models/src";
1
+ import { IkasOrderLineItem, IkasOrderLineItemOptionValue } from "../../../../../../storefront-models/src";
2
2
  /**
3
3
  * Extracts the file name from an order line item option value's URL path.
4
4
  *
@@ -35,3 +35,21 @@ export declare function getOrderLineOptionFileName(value: IkasOrderLineItemOptio
35
35
  * ```
36
36
  */
37
37
  export declare function downloadFile(value: IkasOrderLineItemOptionValue): Promise<string | undefined>;
38
+ /**
39
+ * Returns the formatted currency string for an order line item option value's price, handling both ratio-based and flat pricing.
40
+ *
41
+ * @ai-category LineItemOption, OrderLineItem, Pricing
42
+ * @ai-related getOrderLineOptionFileName, downloadFile
43
+ *
44
+ * @param item - The order line item used to calculate ratio-based prices.
45
+ * @param value - The order line item option value whose price to format.
46
+ * @returns A locale-formatted currency string representing the option value price (e.g. "$5.00").
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * import { getOrderLineItemOptionValueFormattedPrice } from "@ikas/bp-storefront";
51
+ * const formattedPrice = getOrderLineItemOptionValueFormattedPrice(lineItem, optionValue);
52
+ * // "$5.00"
53
+ * ```
54
+ */
55
+ export declare function getOrderLineItemOptionValueFormattedPrice(item: IkasOrderLineItem, value: IkasOrderLineItemOptionValue): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/bp-storefront",
3
- "version": "0.77.0",
3
+ "version": "0.78.0",
4
4
  "description": "A framework for the ikas blueprint storefronts.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",