@nuskin/react-mysite-elements 1.3.0 → 1.4.0-po-dashboard.1

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.
Files changed (83) hide show
  1. package/README.md +124 -0
  2. package/dist/common/icon/icons/SocialMediaIcons.styled.d.ts +5 -0
  3. package/dist/common/index.d.ts +1 -0
  4. package/dist/common/shopping-dashboard/MysiteDashboardWithNavigation.d.ts +47 -0
  5. package/dist/common/shopping-dashboard/PoDashboardWithNavigation.d.ts +14 -0
  6. package/dist/common/shopping-dashboard/ProductOfferDashboard.d.ts +15 -0
  7. package/dist/common/shopping-dashboard/ProductOfferDashboard.styled.d.ts +20 -0
  8. package/dist/common/shopping-dashboard/ShoppingDashboard.d.ts +37 -0
  9. package/dist/common/shopping-dashboard/ShoppingDashboard.styled.d.ts +20 -0
  10. package/dist/common/shopping-dashboard/TranslationKeys/ProductOfferDashboardTranslationKeys.d.ts +241 -0
  11. package/dist/common/shopping-dashboard/TranslationKeys/ShoppingDashboardTranslationKeys.d.ts +630 -0
  12. package/dist/common/shopping-dashboard/fixtures/index.d.ts +1 -0
  13. package/dist/common/shopping-dashboard/fixtures/mockDashboardData.d.ts +8 -0
  14. package/dist/common/shopping-dashboard/fixtures/mockProductOfferData.d.ts +19 -0
  15. package/dist/common/shopping-dashboard/index.d.ts +44 -0
  16. package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.d.ts +11 -0
  17. package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateChart.styled.d.ts +62 -0
  18. package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.d.ts +15 -0
  19. package/dist/common/shopping-dashboard/shared/ConversionRate/ConversionRateFullView.styled.d.ts +37 -0
  20. package/dist/common/shopping-dashboard/shared/DashboardHeader.d.ts +13 -0
  21. package/dist/common/shopping-dashboard/shared/DashboardHeader.styled.d.ts +48 -0
  22. package/dist/common/shopping-dashboard/shared/DataTable.d.ts +18 -0
  23. package/dist/common/shopping-dashboard/shared/DataTable.styled.d.ts +42 -0
  24. package/dist/common/shopping-dashboard/shared/FilterBar.d.ts +7 -0
  25. package/dist/common/shopping-dashboard/shared/FilterBar.styled.d.ts +12 -0
  26. package/dist/common/shopping-dashboard/shared/FullViewComponents.styled.d.ts +54 -0
  27. package/dist/common/shopping-dashboard/shared/LoadingSkeletons.d.ts +14 -0
  28. package/dist/common/shopping-dashboard/shared/LoadingSkeletons.styled.d.ts +121 -0
  29. package/dist/common/shopping-dashboard/shared/PageHeader.d.ts +11 -0
  30. package/dist/common/shopping-dashboard/shared/PageHeader.styled.d.ts +56 -0
  31. package/dist/common/shopping-dashboard/shared/Pagination.d.ts +9 -0
  32. package/dist/common/shopping-dashboard/shared/Pagination.styled.d.ts +18 -0
  33. package/dist/common/shopping-dashboard/shared/Signups/SignupsChart.d.ts +11 -0
  34. package/dist/common/shopping-dashboard/shared/Signups/SignupsChart.styled.d.ts +56 -0
  35. package/dist/common/shopping-dashboard/shared/Signups/SignupsFullView.d.ts +15 -0
  36. package/dist/common/shopping-dashboard/shared/Signups/SignupsFullView.styled.d.ts +15 -0
  37. package/dist/common/shopping-dashboard/shared/StatsCard.d.ts +11 -0
  38. package/dist/common/shopping-dashboard/shared/StatsCard.styled.d.ts +38 -0
  39. package/dist/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.d.ts +14 -0
  40. package/dist/common/shopping-dashboard/shared/TopCategories/CategoriesFullView.styled.d.ts +72 -0
  41. package/dist/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.d.ts +11 -0
  42. package/dist/common/shopping-dashboard/shared/TopCategories/TopCategoriesPieChart.styled.d.ts +84 -0
  43. package/dist/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.d.ts +14 -0
  44. package/dist/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersFullView.styled.d.ts +52 -0
  45. package/dist/common/shopping-dashboard/shared/TopPerformingOffers/TopPerformingOffersPieChart.d.ts +11 -0
  46. package/dist/common/shopping-dashboard/shared/TopProducts/ProductsFullView.d.ts +14 -0
  47. package/dist/common/shopping-dashboard/shared/TopProducts/ProductsFullView.styled.d.ts +53 -0
  48. package/dist/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.d.ts +11 -0
  49. package/dist/common/shopping-dashboard/shared/TopProducts/TopSellingProductsList.styled.d.ts +74 -0
  50. package/dist/common/shopping-dashboard/shared/WidgetMenu.d.ts +6 -0
  51. package/dist/common/shopping-dashboard/shared/WidgetMenu.styled.d.ts +5 -0
  52. package/dist/common/shopping-dashboard/shared/types.d.ts +25 -0
  53. package/dist/common/shopping-dashboard/shared/useViewport.d.ts +2 -0
  54. package/dist/common/shopping-dashboard/specs/MysiteDashboardWithNavigation.spec.d.ts +1 -0
  55. package/dist/common/shopping-dashboard/specs/PoDashboardWithNavigation.spec.d.ts +1 -0
  56. package/dist/common/shopping-dashboard/specs/SignupsFullView.spec.d.ts +1 -0
  57. package/dist/common/shopping-dashboard/stories/CategoriesFullView.stories.d.ts +10 -0
  58. package/dist/common/shopping-dashboard/stories/ConversionRateChart.stories.d.ts +9 -0
  59. package/dist/common/shopping-dashboard/stories/ConversionRateFullView.stories.d.ts +9 -0
  60. package/dist/common/shopping-dashboard/stories/DashboardHeader.stories.d.ts +9 -0
  61. package/dist/common/shopping-dashboard/stories/DataTable.stories.d.ts +8 -0
  62. package/dist/common/shopping-dashboard/stories/PageHeader.stories.d.ts +8 -0
  63. package/dist/common/shopping-dashboard/stories/Pagination.stories.d.ts +9 -0
  64. package/dist/common/shopping-dashboard/stories/ProductOfferDashboard.stories.d.ts +13 -0
  65. package/dist/common/shopping-dashboard/stories/ProductsFullView.stories.d.ts +9 -0
  66. package/dist/common/shopping-dashboard/stories/ShoppingDashboard.stories.d.ts +13 -0
  67. package/dist/common/shopping-dashboard/stories/SignupsChart.stories.d.ts +10 -0
  68. package/dist/common/shopping-dashboard/stories/SignupsFullView.stories.d.ts +9 -0
  69. package/dist/common/shopping-dashboard/stories/StatsCard.stories.d.ts +11 -0
  70. package/dist/common/shopping-dashboard/stories/TopCategoriesPieChart.stories.d.ts +10 -0
  71. package/dist/common/shopping-dashboard/stories/TopPerformingOffersFullView.stories.d.ts +10 -0
  72. package/dist/common/shopping-dashboard/stories/TopPerformingOffersPieChart.stories.d.ts +11 -0
  73. package/dist/common/shopping-dashboard/stories/TopSellingProductsList.stories.d.ts +11 -0
  74. package/dist/common/shopping-dashboard/utils/dataUtils.d.ts +14 -0
  75. package/dist/common/shopping-dashboard/utils/dateConstants.d.ts +14 -0
  76. package/dist/common/shopping-dashboard/utils/dateFormat.d.ts +16 -0
  77. package/dist/common/shopping-dashboard/utils/marketConstants.d.ts +14 -0
  78. package/dist/common/shopping-dashboard/utils/trendUtils.d.ts +16 -0
  79. package/dist/index.js +1 -1
  80. package/dist/index.js.map +1 -1
  81. package/dist/index.mjs +1 -1
  82. package/dist/index.mjs.map +1 -1
  83. package/package.json +7 -3
package/README.md CHANGED
@@ -123,6 +123,100 @@ The main hero component for Mysite pages with advanced scroll behavior and respo
123
123
  [];
124
124
  ```
125
125
 
126
+ ### Shopping Dashboard Suite
127
+
128
+ The Shopping Dashboard provides a complete analytics experience with overview widgets,
129
+ full-detail views, and stateful in-page navigation.
130
+
131
+ #### Highlights
132
+
133
+ - Dashboard overview with stats cards and 4 widgets (Top Products, Sign-ups, Conversion Rate, Top Categories)
134
+ - Full views for each widget with filtering, sorting, and pagination
135
+ - History-state navigation between dashboard and full views (back/forward/refresh aware)
136
+ - Loading skeletons and explicit empty/error states
137
+ - Translation-ready text (`getTranslation` + key catalog)
138
+ - Accessibility and test automation support with stable `data-testid` selectors
139
+ - Responsive mobile/desktop rendering with performance-focused optimizations
140
+
141
+ #### Main Exports
142
+
143
+ - `ShoppingDashboard`
144
+ - `MysiteDashboardWithNavigation`
145
+ - `ProductOfferDashboard`
146
+ - `PoDashboardWithNavigation`
147
+ - `ProductsFullView`
148
+ - `SignupsFullView`
149
+ - `ConversionRateFullView`
150
+ - `CategoriesFullView`
151
+ - `TopPerformingOffersFullView`
152
+ - `StatsCard`, `DashboardHeader`, `WidgetMenu`
153
+ - `TopSellingProductsList`, `SignupsChart`, `ConversionRateChart`, `TopCategoriesPieChart`, `TopPerformingOffersPieChart`
154
+
155
+ #### Quick Usage
156
+
157
+ ```tsx
158
+ import React, { useState } from 'react';
159
+ import {
160
+ MysiteDashboardWithNavigation,
161
+ mockStats,
162
+ mockTopProducts,
163
+ mockConversionData,
164
+ mockSignupData,
165
+ mockCategories,
166
+ mockOrders,
167
+ mockSignupDetails,
168
+ } from '@nuskin/react-mysite-elements';
169
+
170
+ export default function DashboardExample() {
171
+ const [dateRange, setDateRange] = useState('last30days');
172
+ const [market, setMarket] = useState('all');
173
+
174
+ return (
175
+ <MysiteDashboardWithNavigation
176
+ stats={mockStats}
177
+ topProducts={mockTopProducts}
178
+ conversionData={mockConversionData}
179
+ signupData={mockSignupData}
180
+ categories={mockCategories}
181
+ orders={mockOrders}
182
+ signups={mockSignupDetails}
183
+ dateRange={dateRange}
184
+ market={market}
185
+ onDateRangeChange={setDateRange}
186
+ onMarketChange={setMarket}
187
+ />
188
+ );
189
+ }
190
+ ```
191
+
192
+ #### Storybook
193
+
194
+ Shopping Dashboard stories are available under the `ShoppingDashboard` group, including
195
+ loading, error, navigation, and full-view scenarios.
196
+
197
+ #### Product Offer Dashboard
198
+
199
+ ```tsx
200
+ import {
201
+ PoDashboardWithNavigation,
202
+ mockProductOfferStats,
203
+ mockTopProducts,
204
+ mockConversionData,
205
+ mockTopOffers,
206
+ } from '@nuskin/react-mysite-elements';
207
+
208
+ export default function ProductOfferDashboardExample() {
209
+ return (
210
+ <PoDashboardWithNavigation
211
+ stats={mockProductOfferStats}
212
+ topProducts={mockTopProducts}
213
+ conversionData={mockConversionData}
214
+ topOffers={mockTopOffers}
215
+ />
216
+ );
217
+ }
218
+ ```
219
+
126
220
  ## ✨ Advanced Features
127
221
 
128
222
  ### Intelligent Scroll Behavior
@@ -250,6 +344,36 @@ The component automatically detects and integrates with Nu Skin's external heade
250
344
  4. Push to the branch (`git push origin feature/amazing-feature`)
251
345
  5. Open a Pull Request
252
346
 
347
+ ### Constitution Compliance (Required)
348
+
349
+ All UI contributions must follow the repository constitution in
350
+ `.specify/memory/constitution.md`.
351
+
352
+ Core non-negotiable rules:
353
+
354
+ - No inline CSS in production components (`style={{}}`, inline `sx`, runtime `.style` mutation)
355
+ - Styled component definitions must live in dedicated `*.styled.tsx` files, not inside component files
356
+ - No hardcoded user-visible strings in component code (use translation keys)
357
+ - Accessibility-first implementation (ADA/WCAG aligned)
358
+ - Mobile and desktop viewport validation for changed flows
359
+ - Stable `data-testid` selectors for critical interactions
360
+
361
+ PR validation checklist:
362
+
363
+ - [ ] UI styles are in stylesheet/styled-component files only
364
+ - [ ] Styled components are defined in `*.styled.tsx` files, not inline in component files
365
+ - [ ] All user-facing text is sourced from translation files
366
+ - [ ] Keyboard and semantic accessibility checks were completed
367
+ - [ ] Mobile and desktop behavior was validated
368
+ - [ ] Critical interactive elements include `data-testid`
369
+
370
+ Recommended verification commands:
371
+
372
+ ```bash
373
+ npx jest --testPathPattern="shopping-dashboard" --no-coverage
374
+ npx tsc --noEmit --project tsconfig.json
375
+ ```
376
+
253
377
  ### Commit Convention
254
378
 
255
379
  We use [Conventional Commits](https://www.conventionalcommits.org/) for semantic versioning:
@@ -0,0 +1,5 @@
1
+ export declare const StyledButton: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
3
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
4
+ brandColor: string;
5
+ }, {}, {}>;
@@ -2,3 +2,4 @@ export * from './card';
2
2
  export * from './carousel';
3
3
  export * from './headers';
4
4
  export * from './Nav-Category-Navigation';
5
+ export * from './shopping-dashboard';
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ import type { DashboardStats, TopProduct, ConversionDataPoint, SignupDataPoint, CategoryRevenue, OrderHistory, SignupDetail, DateRangeOption, MarketOption, ProductSortOption, SignupViewOption, ConversionFilterOption, CategorySortOption, FullViewWidgetType } from './types.d';
3
+ export type MysiteDashboardView = 'dashboard' | FullViewWidgetType;
4
+ export interface MysiteDashboardHistoryLocation {
5
+ readonly pathname?: string;
6
+ readonly search?: string;
7
+ readonly hash?: string;
8
+ readonly state?: unknown;
9
+ }
10
+ export interface MysiteDashboardHistoryAdapter {
11
+ readonly location?: MysiteDashboardHistoryLocation;
12
+ push(location: MysiteDashboardHistoryLocation): void;
13
+ replace(location: MysiteDashboardHistoryLocation): void;
14
+ goBack(): void;
15
+ listen(listener: (location: MysiteDashboardHistoryLocation, action: string) => void): () => void;
16
+ }
17
+ export interface MysiteDashboardWithNavigationProps {
18
+ readonly stats?: DashboardStats | null;
19
+ readonly topProducts?: TopProduct[];
20
+ readonly conversionData?: ConversionDataPoint[];
21
+ readonly signupData?: SignupDataPoint[];
22
+ readonly categories?: CategoryRevenue[];
23
+ readonly orders?: OrderHistory[];
24
+ readonly signups?: SignupDetail[];
25
+ readonly isLoading?: boolean;
26
+ readonly error?: string | null;
27
+ readonly shopTitle?: string;
28
+ readonly className?: string;
29
+ readonly initialDateRange?: DateRangeOption;
30
+ readonly initialMarket?: MarketOption;
31
+ readonly initialProductSort?: ProductSortOption;
32
+ readonly initialSignupView?: SignupViewOption;
33
+ readonly initialConversionFilter?: ConversionFilterOption;
34
+ readonly initialCategorySort?: CategorySortOption;
35
+ readonly historyAdapter?: MysiteDashboardHistoryAdapter;
36
+ readonly historyStateKey?: string;
37
+ readonly resetToDashboardOnMount?: boolean;
38
+ readonly onDateRangeChange?: (range: DateRangeOption) => void;
39
+ readonly onMarketChange?: (market: MarketOption) => void;
40
+ readonly onProductSortChange?: (sort: ProductSortOption) => void;
41
+ readonly onSignupViewChange?: (view: SignupViewOption) => void;
42
+ readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;
43
+ readonly onCategorySortChange?: (sort: CategorySortOption) => void;
44
+ readonly onViewChange?: (view: MysiteDashboardView) => void;
45
+ }
46
+ export declare const MysiteDashboardWithNavigation: React.FC<MysiteDashboardWithNavigationProps>;
47
+ export default MysiteDashboardWithNavigation;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { PoDashboardWithNavigationProps } from './types.d';
3
+ /**
4
+ * PoDashboardWithNavigation
5
+ *
6
+ * Stateful navigation wrapper for the Product Offer Dashboard.
7
+ * Manages dashboard/full-view switching with browser history integration,
8
+ * filter state ownership, and back navigation.
9
+ *
10
+ * Follows the same pattern as MysiteDashboardWithNavigation but for the
11
+ * Product Offer Dashboard with reduced view types (no signups/categories).
12
+ */
13
+ export declare const PoDashboardWithNavigation: React.FC<PoDashboardWithNavigationProps>;
14
+ export default PoDashboardWithNavigation;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { ProductOfferDashboardProps } from './types.d';
3
+ /**
4
+ * ProductOfferDashboard Main Container Component
5
+ *
6
+ * Orchestrates all dashboard widgets for the Product Offer Performance view.
7
+ * Pure presentational - receives all data via props.
8
+ * The consuming application is responsible for data fetching and state management.
9
+ *
10
+ * Layout (desktop):
11
+ * - Top row: Conversion Rate chart (left) | Total Revenue + Offers Purchased stacked (right)
12
+ * - Bottom row: Top Selling Products (left) | Top Performing Offers donut (right)
13
+ */
14
+ export declare const ProductOfferDashboard: React.FC<ProductOfferDashboardProps>;
15
+ export default ProductOfferDashboard;
@@ -0,0 +1,20 @@
1
+ export declare const PoDashboardContainer: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
+ export declare const TopChartsRow: import("@emotion/styled").StyledComponent<{
6
+ theme?: import("@emotion/react").Theme;
7
+ as?: React.ElementType;
8
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
+ export declare const StatsCardStack: import("@emotion/styled").StyledComponent<{
10
+ theme?: import("@emotion/react").Theme;
11
+ as?: React.ElementType;
12
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
+ export declare const BottomChartsRow: import("@emotion/styled").StyledComponent<{
14
+ theme?: import("@emotion/react").Theme;
15
+ as?: React.ElementType;
16
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
+ export declare const ErrorContainer: import("@emotion/styled").StyledComponent<{
18
+ theme?: import("@emotion/react").Theme;
19
+ as?: React.ElementType;
20
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import type { DashboardStats, TopProduct, ConversionDataPoint, SignupDataPoint, CategoryRevenue, DateRangeOption, MarketOption, ProductSortOption, SignupViewOption, ConversionFilterOption, CategorySortOption } from './types.d';
3
+ export interface ShoppingDashboardProps {
4
+ readonly stats?: DashboardStats | null;
5
+ readonly topProducts?: TopProduct[];
6
+ readonly conversionData?: ConversionDataPoint[];
7
+ readonly signupData?: SignupDataPoint[];
8
+ readonly categories?: CategoryRevenue[];
9
+ readonly isLoading?: boolean;
10
+ readonly error?: string | null;
11
+ readonly shopTitle?: string;
12
+ readonly className?: string;
13
+ readonly dateRange?: DateRangeOption;
14
+ readonly market?: MarketOption;
15
+ readonly productSort?: ProductSortOption;
16
+ readonly signupView?: SignupViewOption;
17
+ readonly conversionFilter?: ConversionFilterOption;
18
+ readonly categorySort?: CategorySortOption;
19
+ readonly onDateRangeChange?: (range: DateRangeOption) => void;
20
+ readonly onMarketChange?: (market: MarketOption) => void;
21
+ readonly onProductSortChange?: (sort: ProductSortOption) => void;
22
+ readonly onSignupViewChange?: (view: SignupViewOption) => void;
23
+ readonly onConversionFilterChange?: (filter: ConversionFilterOption) => void;
24
+ readonly onCategorySortChange?: (sort: CategorySortOption) => void;
25
+ readonly onProductsTitleClick?: () => void;
26
+ readonly onConversionTitleClick?: () => void;
27
+ readonly onSignupsTitleClick?: () => void;
28
+ readonly onCategoriesToTitleClick?: () => void;
29
+ }
30
+ /**
31
+ * ShoppingDashboard Main Container Component
32
+ *
33
+ * Orchestrates all dashboard widgets. Pure presentational - receives all data via props.
34
+ * The consuming application is responsible for data fetching and state management.
35
+ */
36
+ export declare const ShoppingDashboard: React.FC<ShoppingDashboardProps>;
37
+ export default ShoppingDashboard;
@@ -0,0 +1,20 @@
1
+ export declare const DashboardContainer: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
+ export declare const StatsRow: import("@emotion/styled").StyledComponent<{
6
+ theme?: import("@emotion/react").Theme;
7
+ as?: React.ElementType;
8
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
+ export declare const WidgetContainer: import("@emotion/styled").StyledComponent<{
10
+ theme?: import("@emotion/react").Theme;
11
+ as?: React.ElementType;
12
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
+ export declare const TwoColumnGrid: import("@emotion/styled").StyledComponent<{
14
+ theme?: import("@emotion/react").Theme;
15
+ as?: React.ElementType;
16
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
+ export declare const ErrorContainer: import("@emotion/styled").StyledComponent<{
18
+ theme?: import("@emotion/react").Theme;
19
+ as?: React.ElementType;
20
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,241 @@
1
+ /**
2
+ * Translation Keys for the Product Offer Dashboard
3
+ *
4
+ * All user-visible strings must use these keys with fallback text.
5
+ * Follow the same { key, fallback } pattern as ShoppingDashboardTranslationKeys.
6
+ */
7
+ type TranslationEntry = {
8
+ readonly key: string;
9
+ readonly fallback: string;
10
+ };
11
+ export declare const ProductOfferDashboardTranslationKeys: {
12
+ readonly title: {
13
+ readonly key: "productOfferDashboard.title";
14
+ readonly fallback: "Performance Overview";
15
+ };
16
+ readonly error: {
17
+ readonly key: "productOfferDashboard.error";
18
+ readonly fallback: "Failed to load dashboard data. Please try again.";
19
+ };
20
+ readonly stats: {
21
+ readonly revenue: {
22
+ readonly key: "productOfferDashboard.stats.revenue";
23
+ readonly fallback: "Total Revenue";
24
+ };
25
+ readonly offersPurchased: {
26
+ readonly key: "productOfferDashboard.stats.offersPurchased";
27
+ readonly fallback: "Offers Purchased";
28
+ };
29
+ readonly conversionRate: {
30
+ readonly key: "productOfferDashboard.stats.conversionRate";
31
+ readonly fallback: "Conversion Rate";
32
+ };
33
+ readonly trendUp: {
34
+ readonly key: "productOfferDashboard.stats.trendUp";
35
+ readonly fallback: "Trending up";
36
+ };
37
+ readonly trendDown: {
38
+ readonly key: "productOfferDashboard.stats.trendDown";
39
+ readonly fallback: "Trending down";
40
+ };
41
+ readonly trendNeutral: {
42
+ readonly key: "productOfferDashboard.stats.trendNeutral";
43
+ readonly fallback: "No change";
44
+ };
45
+ readonly comparedTo: {
46
+ readonly key: "productOfferDashboard.stats.comparedTo";
47
+ readonly fallback: "compared to this time last month";
48
+ };
49
+ };
50
+ readonly filter: {
51
+ readonly dateRange: {
52
+ readonly label: {
53
+ readonly key: "productOfferDashboard.filter.dateRange.label";
54
+ readonly fallback: "Date Range";
55
+ };
56
+ readonly last7days: {
57
+ readonly key: "productOfferDashboard.filter.dateRange.last7days";
58
+ readonly fallback: "Last 7 Days";
59
+ };
60
+ readonly last30days: {
61
+ readonly key: "productOfferDashboard.filter.dateRange.last30days";
62
+ readonly fallback: "Last 30 Days";
63
+ };
64
+ readonly last90days: {
65
+ readonly key: "productOfferDashboard.filter.dateRange.last90days";
66
+ readonly fallback: "Last 90 Days";
67
+ };
68
+ readonly thisMonth: {
69
+ readonly key: "productOfferDashboard.filter.dateRange.thisMonth";
70
+ readonly fallback: "This Month";
71
+ };
72
+ };
73
+ readonly market: {
74
+ readonly label: {
75
+ readonly key: "productOfferDashboard.filter.market.label";
76
+ readonly fallback: "Market";
77
+ };
78
+ readonly all: {
79
+ readonly key: "productOfferDashboard.filter.market.all";
80
+ readonly fallback: "All Markets";
81
+ };
82
+ };
83
+ readonly offerSort: {
84
+ readonly byRevenue: {
85
+ readonly key: "productOfferDashboard.filter.offerSort.byRevenue";
86
+ readonly fallback: "Revenue";
87
+ };
88
+ readonly byUnits: {
89
+ readonly key: "productOfferDashboard.filter.offerSort.byUnits";
90
+ readonly fallback: "Units";
91
+ };
92
+ };
93
+ readonly productSort: {
94
+ readonly byUnits: {
95
+ readonly key: "productOfferDashboard.filter.productSort.byUnits";
96
+ readonly fallback: "Units";
97
+ };
98
+ readonly byRevenue: {
99
+ readonly key: "productOfferDashboard.filter.productSort.byRevenue";
100
+ readonly fallback: "Revenue";
101
+ };
102
+ readonly byVolume: {
103
+ readonly key: "productOfferDashboard.filter.productSort.byVolume";
104
+ readonly fallback: "Volume";
105
+ };
106
+ };
107
+ readonly conversionFilter: {
108
+ readonly overall: {
109
+ readonly key: "productOfferDashboard.filter.conversionFilter.overall";
110
+ readonly fallback: "Overall";
111
+ };
112
+ };
113
+ };
114
+ readonly widget: {
115
+ readonly topProducts: {
116
+ readonly title: {
117
+ readonly key: "productOfferDashboard.widget.topProducts.title";
118
+ readonly fallback: "Top Selling Products";
119
+ };
120
+ readonly emptyState: {
121
+ readonly key: "productOfferDashboard.widget.topProducts.emptyState";
122
+ readonly fallback: "No products data available";
123
+ };
124
+ };
125
+ readonly conversionRate: {
126
+ readonly title: {
127
+ readonly key: "productOfferDashboard.widget.conversionRate.title";
128
+ readonly fallback: "Conversion Rate";
129
+ };
130
+ readonly subtitle: {
131
+ readonly key: "productOfferDashboard.widget.conversionRate.subtitle";
132
+ readonly fallback: "Orders ÷ Site visits";
133
+ };
134
+ };
135
+ readonly topPerformingOffers: {
136
+ readonly title: {
137
+ readonly key: "productOfferDashboard.widget.topPerformingOffers.title";
138
+ readonly fallback: "Top Performing Offers";
139
+ };
140
+ readonly totalRevenue: {
141
+ readonly key: "productOfferDashboard.widget.topPerformingOffers.totalRevenue";
142
+ readonly fallback: "Total revenue";
143
+ };
144
+ readonly emptyState: {
145
+ readonly key: "productOfferDashboard.widget.topPerformingOffers.emptyState";
146
+ readonly fallback: "No offers data available";
147
+ };
148
+ };
149
+ readonly menu: {
150
+ readonly fullView: {
151
+ readonly key: "productOfferDashboard.widget.menu.fullView";
152
+ readonly fallback: "Full View";
153
+ };
154
+ };
155
+ };
156
+ readonly navigation: {
157
+ readonly back: {
158
+ readonly key: "productOfferDashboard.navigation.back";
159
+ readonly fallback: "Back to Dashboard";
160
+ };
161
+ };
162
+ readonly ariaLabel: {
163
+ readonly dashboard: {
164
+ readonly key: "productOfferDashboard.ariaLabel.dashboard";
165
+ readonly fallback: "Product Offer Performance Dashboard";
166
+ };
167
+ readonly statsCard: {
168
+ readonly key: "productOfferDashboard.ariaLabel.statsCard";
169
+ readonly fallback: "Performance metric";
170
+ };
171
+ readonly conversionChart: {
172
+ readonly key: "productOfferDashboard.ariaLabel.conversionChart";
173
+ readonly fallback: "Conversion rate chart";
174
+ };
175
+ readonly topProducts: {
176
+ readonly key: "productOfferDashboard.ariaLabel.topProducts";
177
+ readonly fallback: "Top selling products";
178
+ };
179
+ readonly topOffers: {
180
+ readonly key: "productOfferDashboard.ariaLabel.topOffers";
181
+ readonly fallback: "Top performing offers chart";
182
+ };
183
+ readonly widgetMenu: {
184
+ readonly key: "productOfferDashboard.ariaLabel.widgetMenu";
185
+ readonly fallback: "Widget options menu";
186
+ };
187
+ readonly filterDateRange: {
188
+ readonly key: "productOfferDashboard.ariaLabel.filterDateRange";
189
+ readonly fallback: "Filter by date range";
190
+ };
191
+ readonly filterMarket: {
192
+ readonly key: "productOfferDashboard.ariaLabel.filterMarket";
193
+ readonly fallback: "Filter by market";
194
+ };
195
+ readonly backButton: {
196
+ readonly key: "productOfferDashboard.ariaLabel.backButton";
197
+ readonly fallback: "Back to dashboard overview";
198
+ };
199
+ };
200
+ readonly fullView: {
201
+ readonly topOffers: {
202
+ readonly title: {
203
+ readonly key: "productOfferDashboard.fullView.topOffers.title";
204
+ readonly fallback: "Top Performing Offers";
205
+ };
206
+ readonly columnName: {
207
+ readonly key: "productOfferDashboard.fullView.topOffers.columnName";
208
+ readonly fallback: "Offer Name";
209
+ };
210
+ readonly columnRevenue: {
211
+ readonly key: "productOfferDashboard.fullView.topOffers.columnRevenue";
212
+ readonly fallback: "Revenue";
213
+ };
214
+ readonly columnPercentage: {
215
+ readonly key: "productOfferDashboard.fullView.topOffers.columnPercentage";
216
+ readonly fallback: "Share";
217
+ };
218
+ readonly columnTrend: {
219
+ readonly key: "productOfferDashboard.fullView.topOffers.columnTrend";
220
+ readonly fallback: "Trend";
221
+ };
222
+ };
223
+ };
224
+ readonly defaults: {
225
+ readonly trendZero: {
226
+ readonly key: "productOfferDashboard.defaults.trendZero";
227
+ readonly fallback: "+0%";
228
+ };
229
+ readonly noData: {
230
+ readonly key: "productOfferDashboard.defaults.noData";
231
+ readonly fallback: "--";
232
+ };
233
+ };
234
+ };
235
+ /**
236
+ * Get translation text from a translation entry.
237
+ * Currently returns the fallback text. When an i18n provider is integrated,
238
+ * this function will use the key to look up the translated string.
239
+ */
240
+ export declare function getTranslation(entry: TranslationEntry): string;
241
+ export {};