@nuskin/react-mysite-elements 1.5.0-ui-fixes.8 → 1.5.0-ui-fixes.10
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/MysiteDashboardWithNavigation.d.ts +4 -0
- package/dist/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.d.ts +18 -0
- package/dist/common/shopping-dashboard/index.d.ts +2 -0
- package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.d.ts +2 -1
- package/dist/common/shopping-dashboard/shared/Signups/SignupsChart.d.ts +2 -1
- package/dist/common/shopping-dashboard/utils/comparisonTextUtils.d.ts +8 -0
- package/dist/common/shopping-dashboard/utils/dataUtils.d.ts +14 -0
- package/dist/common/shopping-dashboard/utils/dateConstants.d.ts +1 -0
- 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 +5 -3
|
@@ -46,6 +46,10 @@ export interface MysiteDashboardWithNavigationProps {
|
|
|
46
46
|
readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;
|
|
47
47
|
readonly onCategorySortChange?: (sort: CategorySortOption) => void;
|
|
48
48
|
readonly onViewChange?: (view: MysiteDashboardView) => void;
|
|
49
|
+
readonly onProductsExport?: () => void;
|
|
50
|
+
readonly onConversionExport?: () => void;
|
|
51
|
+
readonly onSignupsExport?: () => void;
|
|
52
|
+
readonly onCategoriesExport?: () => void;
|
|
49
53
|
}
|
|
50
54
|
export declare const MysiteDashboardWithNavigation: React.FC<MysiteDashboardWithNavigationProps>;
|
|
51
55
|
export default MysiteDashboardWithNavigation;
|
package/dist/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.d.ts
CHANGED
|
@@ -218,6 +218,24 @@ export declare const ShoppingDashboardTranslationKeys: {
|
|
|
218
218
|
readonly fallback: "No sign-up trend data available.";
|
|
219
219
|
};
|
|
220
220
|
};
|
|
221
|
+
readonly compareTo: {
|
|
222
|
+
readonly last7days: {
|
|
223
|
+
readonly key: "shoppingDashboard.widget.compareTo.last7days";
|
|
224
|
+
readonly fallback: "compared to this time 7 days ago";
|
|
225
|
+
};
|
|
226
|
+
readonly last30days: {
|
|
227
|
+
readonly key: "shoppingDashboard.widget.compareTo.last30days";
|
|
228
|
+
readonly fallback: "compared to this time last month";
|
|
229
|
+
};
|
|
230
|
+
readonly last90days: {
|
|
231
|
+
readonly key: "shoppingDashboard.widget.compareTo.last90days";
|
|
232
|
+
readonly fallback: "compared to this time 90 days ago";
|
|
233
|
+
};
|
|
234
|
+
readonly thisMonth: {
|
|
235
|
+
readonly key: "shoppingDashboard.widget.compareTo.thisMonth";
|
|
236
|
+
readonly fallback: "compared to this time last month";
|
|
237
|
+
};
|
|
238
|
+
};
|
|
221
239
|
readonly topCategories: {
|
|
222
240
|
readonly title: {
|
|
223
241
|
readonly key: "shoppingDashboard.widget.topCategories.title";
|
|
@@ -42,4 +42,6 @@ export { calculateTotalPages, paginateItems, sortByNumericProperty, calculatePer
|
|
|
42
42
|
export { buildDefaultMarketOptions, resolveMarketOptions } from './utils/marketOptions';
|
|
43
43
|
export { useProductOfferWidgetExports } from './hooks/useProductOfferWidgetExports';
|
|
44
44
|
export { exportRowsToExcel, normalizeExcelFileName, normalizeExcelSheetName } from './utils/excelExport';
|
|
45
|
+
export type { ExcelExportColumn, ExcelExportOptions } from './utils/excelExport';
|
|
46
|
+
export { getComparedToText } from './utils/comparisonTextUtils';
|
|
45
47
|
export { exportTopPerformingOffers, exportTopProducts } from './utils/productOfferExport';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ConversionDataPoint, ConversionFilterOption } from '../../types.d';
|
|
2
|
+
import type { ConversionDataPoint, ConversionFilterOption, DateRangeOption } from '../../types.d';
|
|
3
3
|
export interface ConversionRateChartProps {
|
|
4
4
|
readonly conversionData: ConversionDataPoint[];
|
|
5
5
|
readonly conversionFilter: ConversionFilterOption;
|
|
6
|
+
readonly dateRange?: DateRangeOption;
|
|
6
7
|
readonly isLoading?: boolean;
|
|
7
8
|
readonly title?: string;
|
|
8
9
|
readonly summaryRate?: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SignupDataPoint, SignupViewOption } from '../../types.d';
|
|
2
|
+
import type { SignupDataPoint, SignupViewOption, DateRangeOption } from '../../types.d';
|
|
3
3
|
export interface SignupsChartProps {
|
|
4
4
|
readonly signupData: SignupDataPoint[];
|
|
5
5
|
readonly signupView: SignupViewOption;
|
|
6
|
+
readonly dateRange?: DateRangeOption;
|
|
6
7
|
readonly isLoading?: boolean;
|
|
7
8
|
readonly title?: string;
|
|
8
9
|
readonly onViewChange?: (view: SignupViewOption) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DateRangeOption } from '../types.d';
|
|
2
|
+
/**
|
|
3
|
+
* Generates dynamic comparison text based on the selected date range.
|
|
4
|
+
* Uses translation keys for internationalization support.
|
|
5
|
+
* @param dateRange The selected date range option
|
|
6
|
+
* @returns Dynamic comparison text like "compared to this time 7 days ago"
|
|
7
|
+
*/
|
|
8
|
+
export declare function getComparedToText(dateRange: DateRangeOption): string;
|
|
@@ -8,3 +8,17 @@ export declare function usePaginatedItems<T>(items: T[], currentPage: number, it
|
|
|
8
8
|
};
|
|
9
9
|
export declare function formatMoney(value: number, currencyCode?: string, locale?: string, fractionDigits?: number): string;
|
|
10
10
|
export declare function capitalizeFirstLetter(text: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Gets the numeric value from a SignupDataPoint based on the selected signup view.
|
|
13
|
+
* Maps the signup view option to the corresponding data field:
|
|
14
|
+
* - 'all' → total
|
|
15
|
+
* - 'members' → members
|
|
16
|
+
* - 'retail' → retail
|
|
17
|
+
* - 'brandAffiliates' → brandAffiliates
|
|
18
|
+
*/
|
|
19
|
+
export declare function getSignupValueByView(dataPoint: {
|
|
20
|
+
readonly total: number;
|
|
21
|
+
readonly members: number;
|
|
22
|
+
readonly retail: number;
|
|
23
|
+
readonly brandAffiliates: number;
|
|
24
|
+
}, view: 'all' | 'members' | 'retail' | 'brandAffiliates'): number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DateRangeOption } from '../types.d';
|
|
2
|
+
export declare const DEFAULT_DATE_RANGE: DateRangeOption;
|
|
2
3
|
export declare const DAYS_MAP: Record<DateRangeOption, number>;
|
|
3
4
|
export declare const DATE_RANGE_LABELS: Record<DateRangeOption, string>;
|
|
4
5
|
export declare function getDaysFromDateRange(dateRange: DateRangeOption): number;
|