@nuskin/react-mysite-elements 1.6.0-comx-2229.6 → 1.6.0-comx-2229.8
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/dist/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.d.ts +12 -0
- package/dist/common/shopping-dashboard/hooks/useScrollToTopOnViewChange.test.d.ts +1 -0
- package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.test.d.ts +1 -3
- package/dist/common/shopping-dashboard/shared/Signups/SignupsFullView.test.d.ts +1 -3
- package/dist/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.test.d.ts +1 -3
- package/dist/common/shopping-dashboard/utils/dataUtils.d.ts +12 -0
- package/dist/common/shopping-dashboard/utils/dateFormat.test.d.ts +1 -0
- package/dist/common/shopping-dashboard/utils/trendUtils.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.d.ts
CHANGED
|
@@ -548,6 +548,18 @@ export declare const ShoppingDashboardTranslationKeys: {
|
|
|
548
548
|
readonly key: "shoppingDashboard.defaults.dcSv";
|
|
549
549
|
readonly fallback: "DC-SV";
|
|
550
550
|
};
|
|
551
|
+
readonly showRevenue: {
|
|
552
|
+
readonly key: "shoppingDashboard.defaults.showRevenue";
|
|
553
|
+
readonly fallback: "Show: Revenue";
|
|
554
|
+
};
|
|
555
|
+
readonly showVolume: {
|
|
556
|
+
readonly key: "shoppingDashboard.defaults.showVolume";
|
|
557
|
+
readonly fallback: "Show: Volume";
|
|
558
|
+
};
|
|
559
|
+
readonly showUnits: {
|
|
560
|
+
readonly key: "shoppingDashboard.defaults.showUnits";
|
|
561
|
+
readonly fallback: "Show: Units";
|
|
562
|
+
};
|
|
551
563
|
};
|
|
552
564
|
};
|
|
553
565
|
type TranslationEntry = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,6 +2,18 @@ export declare function calculateTotalPages<T>(items: T[], itemsPerPage: number)
|
|
|
2
2
|
export declare function paginateItems<T>(items: T[], currentPage: number, itemsPerPage: number): T[];
|
|
3
3
|
export declare function sortByNumericProperty<T extends Record<string, unknown>>(items: T[], key: keyof T, direction?: 'asc' | 'desc'): T[];
|
|
4
4
|
export declare function calculatePercentage(value: number, total: number, decimalPlaces?: number): string;
|
|
5
|
+
/**
|
|
6
|
+
* Formats a percentage by removing trailing zeros and unnecessary decimal points.
|
|
7
|
+
* Examples:
|
|
8
|
+
* - formatPercentage(100) → "100"
|
|
9
|
+
* - formatPercentage(12.1) → "12.1"
|
|
10
|
+
* - formatPercentage(12.55) → "12.55"
|
|
11
|
+
* - formatPercentage(0) → "0"
|
|
12
|
+
* @param value - The percentage value as a number
|
|
13
|
+
* @param decimals - Maximum decimal places to round to (default: 2)
|
|
14
|
+
* @returns Formatted percentage string without trailing zeros or decimal point
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatPercentage(value: number, decimals?: number): string;
|
|
5
17
|
export declare function usePaginatedItems<T>(items: T[], currentPage: number, itemsPerPage: number): {
|
|
6
18
|
totalPages: number;
|
|
7
19
|
pageItems: T[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TrendDirection } from '../shared/types';
|
|
3
|
-
export declare function parseTrendPercent(value?: string): number | null;
|
|
4
|
-
export declare function resolveTrendDirection(value?: string): TrendDirection;
|
|
5
|
-
export declare function calculateWeightedRevenueTrend<T>(items: readonly T[], getRevenue: (item: T) => number, getTrend: (item: T) => string | undefined): {
|
|
3
|
+
export declare function parseTrendPercent(value?: string | number): number | null;
|
|
4
|
+
export declare function resolveTrendDirection(value?: string | number): TrendDirection;
|
|
5
|
+
export declare function calculateWeightedRevenueTrend<T>(items: readonly T[], getRevenue: (item: T) => number, getTrend: (item: T) => string | number | undefined): {
|
|
6
6
|
direction: TrendDirection;
|
|
7
7
|
formatted: string;
|
|
8
8
|
};
|