@umituz/web-dashboard 4.6.5 → 4.7.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 (29) hide show
  1. package/package.json +3 -10
  2. package/src/{domain/config → config}/DashboardConfig.ts +1 -1
  3. package/src/config/index.ts +1 -0
  4. package/src/{domain/config/CalendarConfig.ts → domains/calendar/config.ts} +1 -1
  5. package/src/domains/calendar/hooks/useCalendar.ts +1 -1
  6. package/src/domains/calendar/index.ts +1 -0
  7. package/src/domains/calendar/utils/index.ts +0 -6
  8. package/src/domains/layouts/components/DashboardHeader.tsx +21 -13
  9. package/src/domains/layouts/types/index.ts +1 -1
  10. package/src/domains/layouts/types/layout.ts +18 -0
  11. package/src/index.ts +2 -14
  12. package/src/styles/dashboard.css +1 -652
  13. package/src/domain/config/index.ts +0 -6
  14. package/src/domains/onboarding/components/AppFocusStep.tsx +0 -144
  15. package/src/domains/onboarding/components/OnboardingWizard.tsx +0 -188
  16. package/src/domains/onboarding/components/PlanStep.tsx +0 -241
  17. package/src/domains/onboarding/components/PlatformsStep.tsx +0 -129
  18. package/src/domains/onboarding/components/StepNavigation.tsx +0 -108
  19. package/src/domains/onboarding/components/StepProgress.tsx +0 -62
  20. package/src/domains/onboarding/components/UserTypeStep.tsx +0 -114
  21. package/src/domains/onboarding/components/index.ts +0 -13
  22. package/src/domains/onboarding/hooks/index.ts +0 -5
  23. package/src/domains/onboarding/hooks/useOnboarding.ts +0 -156
  24. package/src/domains/onboarding/index.ts +0 -36
  25. package/src/domains/onboarding/types/index.ts +0 -16
  26. package/src/domains/onboarding/types/onboarding.ts +0 -254
  27. package/src/domains/onboarding/utils/i18nKeys.ts +0 -72
  28. package/src/domains/onboarding/utils/index.ts +0 -17
  29. package/src/domains/onboarding/utils/onboarding.ts +0 -166
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@umituz/web-dashboard",
3
- "version": "4.6.5",
4
- "description": "Installable app skeleton for the fleet — layouts, auth, onboarding, analytics (dependency-free SVG charts), calendar, i18n injection, permissions/session/module registry; ships its own udb-* stylesheet and --u-* tokens",
3
+ "version": "4.7.1",
4
+ "description": "Installable app skeleton for the fleet — layouts, auth, analytics (dependency-free SVG charts), calendar, i18n injection, permissions/session/module registry; ships its own udb-* stylesheet and --u-* tokens",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
7
7
  "types": "./src/index.ts",
@@ -28,11 +28,6 @@
28
28
  "./settings/hooks": "./src/domains/settings/hooks/index.ts",
29
29
  "./settings/utils": "./src/domains/settings/utils/index.ts",
30
30
  "./settings/types": "./src/domains/settings/types/index.ts",
31
- "./onboarding": "./src/domains/onboarding/index.ts",
32
- "./onboarding/components": "./src/domains/onboarding/components/index.ts",
33
- "./onboarding/hooks": "./src/domains/onboarding/hooks/index.ts",
34
- "./onboarding/utils": "./src/domains/onboarding/utils/index.ts",
35
- "./onboarding/types": "./src/domains/onboarding/types/index.ts",
36
31
  "./auth": "./src/domains/auth/index.ts",
37
32
  "./auth/components": "./src/domains/auth/components/index.ts",
38
33
  "./auth/hooks": "./src/domains/auth/hooks/index.ts",
@@ -49,7 +44,7 @@
49
44
  "./calendar/services": "./src/domains/calendar/services/index.ts",
50
45
  "./calendar/hooks": "./src/domains/calendar/hooks/index.ts",
51
46
  "./calendar/utils": "./src/domains/calendar/utils/index.ts",
52
- "./config": "./src/domain/config/index.ts",
47
+ "./config": "./src/config/index.ts",
53
48
  "./package.json": "./package.json",
54
49
  "./charts": "./src/domains/charts/index.ts"
55
50
  },
@@ -90,8 +85,6 @@
90
85
  "dashboard",
91
86
  "layout",
92
87
  "settings",
93
- "onboarding",
94
- "wizard",
95
88
  "auth",
96
89
  "authentication",
97
90
  "login",
@@ -3,7 +3,7 @@
3
3
  * Config-based dashboard system
4
4
  */
5
5
 
6
- import type { ChartType } from '../../domains/analytics/types/analytics';
6
+ import type { ChartType } from '../domains/analytics/types/analytics';
7
7
 
8
8
  /**
9
9
  * Analytics service types
@@ -0,0 +1 @@
1
+ export * from './DashboardConfig';
@@ -2,7 +2,7 @@
2
2
  * Calendar Configuration
3
3
  */
4
4
 
5
- import type { CalendarConfig } from '../../domains/calendar/types/calendar.types';
5
+ import type { CalendarConfig } from './types/calendar.types';
6
6
 
7
7
  /**
8
8
  * Default calendar configuration
@@ -14,7 +14,7 @@ import type {
14
14
  CalendarFilter,
15
15
  } from '../types/calendar.types';
16
16
  import { calendarService, applyCalendarFilter } from '../services';
17
- import { DEFAULT_CALENDAR_CONFIG } from '../utils';
17
+ import { DEFAULT_CALENDAR_CONFIG } from '../config';
18
18
  import type { ICalendarService } from '../types/calendar.types';
19
19
 
20
20
  type CalendarView = 'month' | 'week' | 'day' | 'timeline';
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  export * from './types/calendar.types';
6
+ export * from './config';
6
7
  export * from './services';
7
8
  export * from './hooks';
8
9
  export * from './utils';
@@ -125,10 +125,4 @@ export function generateTimeSlots(
125
125
 
126
126
  return slots;
127
127
  }
128
-
129
- /**
130
- * Re-export the default calendar config from the central config module
131
- * so consumers using only the calendar domain still get sensible defaults.
132
- */
133
- export { DEFAULT_CALENDAR_CONFIG } from '../../../domain/config/CalendarConfig';
134
128
  export type { CalendarConfig };
@@ -1,12 +1,12 @@
1
1
  import { useState } from "react";
2
2
  import {
3
3
  Bell, X, Sun, Moon, Menu, User, Settings, LogOut,
4
- ChevronDown, CreditCard
4
+ ChevronDown
5
5
  } from "lucide-react";
6
6
  import { Button } from "../../../primitives";
7
7
  import { useNavigate } from "react-router-dom";
8
8
  import { useT } from "../../../i18n";
9
- import type { DashboardHeaderProps } from "../types/layout";
9
+ import type { DashboardHeaderProps, HeaderProfileItem } from "../types/layout";
10
10
  import type { DashboardNotification } from "../types/notification";
11
11
  import type { DashboardUser } from "../types/user";
12
12
  import { formatNotificationTime } from "../utils/dashboard";
@@ -26,8 +26,9 @@ interface DashboardHeaderPropsExtended extends DashboardHeaderProps {
26
26
  settingsRoute?: string;
27
27
  /** Profile route */
28
28
  profileRoute?: string;
29
- /** Billing route */
30
- billingRoute?: string;
29
+ /** Host-injected profile-menu entries — billing and friends live here,
30
+ * not in the skeleton. */
31
+ extraProfileItems?: HeaderProfileItem[];
31
32
  }
32
33
 
33
34
  /**
@@ -53,7 +54,7 @@ export const DashboardHeader = ({
53
54
  onDismissNotification,
54
55
  settingsRoute = "/dashboard/settings",
55
56
  profileRoute = "/dashboard/profile",
56
- billingRoute = "/dashboard/billing",
57
+ extraProfileItems = [],
57
58
  }: DashboardHeaderPropsExtended) => {
58
59
  const navigate = useNavigate();
59
60
  const t = useT();
@@ -200,14 +201,21 @@ export const DashboardHeader = ({
200
201
  <User className="udb-menu__item-icon" />
201
202
  {t('common.profile')}
202
203
  </button>
203
- <button
204
- type="button"
205
- onClick={() => { navigate(billingRoute); setProfileOpen(false); }}
206
- className="udb-menu__item"
207
- >
208
- <CreditCard className="udb-menu__item-icon" />
209
- {t('common.billing')}
210
- </button>
204
+ {extraProfileItems.map((item) => (
205
+ <button
206
+ key={item.key}
207
+ type="button"
208
+ onClick={() => {
209
+ if (item.to) navigate(item.to);
210
+ item.onSelect?.();
211
+ setProfileOpen(false);
212
+ }}
213
+ className="udb-menu__item"
214
+ >
215
+ {item.icon}
216
+ {item.label}
217
+ </button>
218
+ ))}
211
219
  <button
212
220
  type="button"
213
221
  onClick={() => { navigate(settingsRoute); setProfileOpen(false); }}
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  export type { SidebarItem, SidebarGroup } from './sidebar';
6
- export type { DashboardHeaderProps, DashboardSidebarProps, DashboardLayoutConfig } from './layout';
6
+ export type { DashboardHeaderProps, DashboardSidebarProps, DashboardLayoutConfig, HeaderProfileItem } from './layout';
7
7
  export type { DashboardTheme, DashboardThemePreset } from './theme';
8
8
  export type { DashboardNotification } from './notification';
9
9
  export type { DashboardUser, UserNavMenuItem } from './user';
@@ -22,6 +22,24 @@ export interface DashboardHeaderProps {
22
22
  onToggleTheme?: () => void;
23
23
  }
24
24
 
25
+ /**
26
+ * Host-injected profile-menu entry — the extension seam for pages the
27
+ * skeleton does not own (billing, referrals, anything). Rendered above
28
+ * Settings; `to` navigates, `onSelect` runs, both close the menu.
29
+ */
30
+ export interface HeaderProfileItem {
31
+ /** Stable key for list rendering */
32
+ key: string;
33
+ /** Display label (already translated by the host) */
34
+ label: string;
35
+ /** Optional icon node — bring your own sizing (`udb-menu__item-icon`) */
36
+ icon?: React.ReactNode;
37
+ /** Route to navigate to */
38
+ to?: string;
39
+ /** Click handler (runs after navigation when both are set) */
40
+ onSelect?: () => void;
41
+ }
42
+
25
43
  /**
26
44
  * Dashboard sidebar props
27
45
  */
package/src/index.ts CHANGED
@@ -11,18 +11,6 @@
11
11
  export * from './domains/layouts';
12
12
  export * from './domains/settings';
13
13
  export * from './domains/calendar';
14
- export {
15
- OnboardingWizard,
16
- useOnboarding,
17
- useOnboardingStep,
18
- } from './domains/onboarding';
19
-
20
- export type {
21
- OnboardingStep,
22
- OnboardingState,
23
- OnboardingConfig,
24
- } from './domains/onboarding';
25
-
26
14
  export {
27
15
  AuthLayout,
28
16
  LoginForm,
@@ -94,6 +82,7 @@ export {
94
82
  generateTimeSlots,
95
83
  // Types
96
84
  type ContentItem,
85
+ DEFAULT_CALENDAR_CONFIG,
97
86
  type CalendarEvent,
98
87
  type CalendarFilter,
99
88
  type CalendarConfig,
@@ -108,7 +97,6 @@ export {
108
97
  // Config with renamed exports to avoid conflicts
109
98
  export {
110
99
  DEFAULT_DASHBOARD_CONFIG,
111
- DEFAULT_CALENDAR_CONFIG,
112
100
  type AnalyticsServiceType,
113
101
  type ExportFormat as DashboardExportFormat,
114
102
  type AnalyticsConfig as DashboardAnalyticsConfig,
@@ -116,4 +104,4 @@ export {
116
104
  type ChartsConfig,
117
105
  type PerformanceConfig as DashboardPerformanceConfig,
118
106
  type DashboardConfig as DashboardConfigType,
119
- } from './domain/config';
107
+ } from './config';