@nuskin/react-mysite-elements 1.6.0-comx-2229.13 → 1.6.0-comx-2229.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.
@@ -37,6 +37,20 @@ export declare function getLocaleFromMarketCode(marketCode?: string): string;
37
37
  * @returns Formatted currency string with code as text prefix
38
38
  */
39
39
  export declare function formatMoney(value: number, currencyCode?: string, minimumFractionDigits?: number): string;
40
+ /**
41
+ * Formats a revenue value in compact abbreviated form with the currency code prefix,
42
+ * matching how the other dashboard widgets display currency (code + space), e.g.
43
+ * "USD 2,609.76" becomes "USD 2.6k". Only the numeric value is shortened; the
44
+ * currency prefix is unchanged. Falls back to the 'USD' prefix when no code is given.
45
+ * Examples:
46
+ * - formatCompactRevenue(2609.76, 'USD') → "USD 2.6k"
47
+ * - formatCompactRevenue(2800) → "USD 2.8k"
48
+ * - formatCompactRevenue(1234567) → "USD 1.2m"
49
+ * @param value - The revenue amount
50
+ * @param currencyCode - ISO 4217 currency code (e.g. 'USD', 'EUR'); defaults to 'USD'
51
+ * @returns Compact currency string with code prefix, e.g. "USD 2.6k"
52
+ */
53
+ export declare function formatCompactRevenue(value: number, currencyCode?: string): string;
40
54
  export declare function capitalizeFirstLetter(text: string): string;
41
55
  /**
42
56
  * Gets the numeric value from a SignupDataPoint based on the selected signup view.