@syuttechnologies/layout 1.0.0
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/components/ChangePasswordModal.d.ts +24 -0
- package/dist/components/ChangePasswordModal.d.ts.map +1 -0
- package/dist/components/ChangePasswordModal.js +319 -0
- package/dist/components/EnterpriseLayout.d.ts +154 -0
- package/dist/components/EnterpriseLayout.d.ts.map +1 -0
- package/dist/components/EnterpriseLayout.js +2933 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/services/notificationService.d.ts +23 -0
- package/dist/services/notificationService.d.ts.map +1 -0
- package/dist/services/notificationService.js +72 -0
- package/package.json +27 -0
- package/src/components/ChangePasswordModal.tsx +545 -0
- package/src/components/EnterpriseLayout.tsx +4460 -0
- package/src/index.ts +53 -0
- package/src/services/notificationService.ts +101 -0
- package/tsconfig.json +20 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,2933 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @prima/layout - Enterprise React Layout Component
|
|
4
|
+
*/
|
|
5
|
+
import React, { useState, useEffect, useCallback, useMemo, useTransition, useDeferredValue, useId, } from "react";
|
|
6
|
+
import notificationService from "../services/notificationService";
|
|
7
|
+
import { ChangePasswordModal } from "./ChangePasswordModal";
|
|
8
|
+
// Enterprise Layout Component
|
|
9
|
+
export const EnterpriseLayout = ({ config, componentRegistry, children, router = null, apiClient = null, authProvider = null, onModuleChange = null, onThemeChange = null, }) => {
|
|
10
|
+
// State Management
|
|
11
|
+
const initialOverviewConfig = config.modules["overview"] || config.modules["dashboard"] || { title: "Overview", description: "Dashboard overview", component: null, actions: [], permissions: [], breadcrumb: ["Dashboard", "Overview"], showHeader: false };
|
|
12
|
+
const [openTabs, setOpenTabs] = useState(new Map([["overview", { title: "Overview", config: initialOverviewConfig }]]));
|
|
13
|
+
const [activeTab, setActiveTab] = useState("overview");
|
|
14
|
+
const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
|
|
15
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
16
|
+
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
|
17
|
+
const [expandedSections, setExpandedSections] = useState(new Set(config.navigation.map((n) => n.section)));
|
|
18
|
+
// NEW: State for managing multi-level menu expansion
|
|
19
|
+
const [expandedSubItems, setExpandedSubItems] = useState(new Set());
|
|
20
|
+
const [tabModeEnabled, setTabModeEnabled] = useState(config.layout.enableTabMode);
|
|
21
|
+
const [darkMode, setDarkMode] = useState(config.layout.defaultTheme === "dark");
|
|
22
|
+
const [tabOverflowMenuOpen, setTabOverflowMenuOpen] = useState(false);
|
|
23
|
+
const [footerVisible, setFooterVisible] = useState(false);
|
|
24
|
+
const [breadcrumbs, setBreadcrumbs] = useState([
|
|
25
|
+
"Dashboard",
|
|
26
|
+
"Overview",
|
|
27
|
+
]);
|
|
28
|
+
// Entity and Financial Year information
|
|
29
|
+
const [currentEntity, setCurrentEntity] = useState("Sample Entity A");
|
|
30
|
+
const [currentBusinessUnit, setCurrentBusinessUnit] = useState("Sample Business Unit 1");
|
|
31
|
+
const [financialYear, setFinancialYear] = useState("FY 2024-25");
|
|
32
|
+
// Available options for selection
|
|
33
|
+
const availableEntities = [
|
|
34
|
+
"Sample Entity A",
|
|
35
|
+
"Sample Entity B",
|
|
36
|
+
"Sample Entity C",
|
|
37
|
+
"Test Entity 1",
|
|
38
|
+
"Test Entity 2"
|
|
39
|
+
];
|
|
40
|
+
const availableFinancialYears = [
|
|
41
|
+
"FY 2024-25",
|
|
42
|
+
"FY 2023-24",
|
|
43
|
+
"FY 2022-23",
|
|
44
|
+
"FY 2021-22"
|
|
45
|
+
];
|
|
46
|
+
// Dropdown states
|
|
47
|
+
const [entityDropdownOpen, setEntityDropdownOpen] = useState(false);
|
|
48
|
+
const [fyDropdownOpen, setFyDropdownOpen] = useState(false);
|
|
49
|
+
// FIX: Initialize persona panel as closed to prevent initial popup
|
|
50
|
+
const [personaPanelOpen, setPersonaPanelOpen] = useState(false);
|
|
51
|
+
const [isInitialized, setIsInitialized] = useState(false); // NEW: Track initialization
|
|
52
|
+
// Notification panel state
|
|
53
|
+
const [notificationPanelOpen, setNotificationPanelOpen] = useState(false);
|
|
54
|
+
// Change Password Modal state
|
|
55
|
+
const [changePasswordModalOpen, setChangePasswordModalOpen] = useState(false);
|
|
56
|
+
const [isChangingPassword, setIsChangingPassword] = useState(false);
|
|
57
|
+
const [notifications, setNotifications] = useState([
|
|
58
|
+
{ id: 1, type: 'success', title: 'Welcome!', message: 'Your account has been successfully verified', time: '5 min ago', read: false },
|
|
59
|
+
{ id: 2, type: 'info', title: 'System Update', message: 'New features are now available in the dashboard', time: '1 hour ago', read: false },
|
|
60
|
+
{ id: 3, type: 'warning', title: 'Action Required', message: 'Please update your profile information', time: '2 hours ago', read: true },
|
|
61
|
+
{ id: 4, type: 'error', title: 'Failed Transaction', message: 'Your recent transaction could not be processed', time: '1 day ago', read: true }
|
|
62
|
+
]);
|
|
63
|
+
const [notificationFilter, setNotificationFilter] = useState('all');
|
|
64
|
+
const [notificationGrouping, setNotificationGrouping] = useState('none');
|
|
65
|
+
// Dynamic navigation menu from localStorage
|
|
66
|
+
const [dynamicNavigation, setDynamicNavigation] = useState(config.navigation);
|
|
67
|
+
// Dynamic modules configuration from localStorage
|
|
68
|
+
const [dynamicModules, setDynamicModules] = useState(config.modules);
|
|
69
|
+
// Dynamic user data from localStorage
|
|
70
|
+
const [dynamicUser, setDynamicUser] = useState(config.user);
|
|
71
|
+
// Dynamic app title from localStorage
|
|
72
|
+
const [dynamicAppTitle, setDynamicAppTitle] = useState(config.branding.appName);
|
|
73
|
+
// Load all dynamic config from localStorage on mount
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
// Load user data
|
|
76
|
+
const storedUser = localStorage.getItem('user');
|
|
77
|
+
if (storedUser) {
|
|
78
|
+
try {
|
|
79
|
+
const parsedUser = JSON.parse(storedUser);
|
|
80
|
+
setDynamicUser({
|
|
81
|
+
name: parsedUser.name || config.user.name,
|
|
82
|
+
role: parsedUser.role || config.user.role,
|
|
83
|
+
avatar: parsedUser.avatar || parsedUser.name?.split(' ').map((n) => n[0]).join('').toUpperCase() || config.user.avatar,
|
|
84
|
+
permissions: parsedUser.permissions || config.user.permissions,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
console.error('Failed to parse user data from localStorage:', error);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// Load app config (title)
|
|
92
|
+
const storedAppConfig = localStorage.getItem('APP_CONFIG');
|
|
93
|
+
if (storedAppConfig) {
|
|
94
|
+
try {
|
|
95
|
+
const parsedAppConfig = JSON.parse(storedAppConfig);
|
|
96
|
+
if (parsedAppConfig.appTitle) {
|
|
97
|
+
setDynamicAppTitle(parsedAppConfig.appTitle);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
console.error('Failed to parse app config from localStorage:', error);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// Load navigation menu
|
|
105
|
+
const storedNavigation = localStorage.getItem('NAVIGATION_MENU');
|
|
106
|
+
if (storedNavigation) {
|
|
107
|
+
try {
|
|
108
|
+
const parsedNavigation = JSON.parse(storedNavigation);
|
|
109
|
+
if (Array.isArray(parsedNavigation) && parsedNavigation.length > 0) {
|
|
110
|
+
setDynamicNavigation(parsedNavigation);
|
|
111
|
+
// Update expanded sections for the new navigation
|
|
112
|
+
setExpandedSections(new Set(parsedNavigation.map((n) => n.section)));
|
|
113
|
+
setExpandedOverviewSections(new Set(parsedNavigation.filter((sec) => sec.section !== "Dashboard").map((sec) => sec.section)));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
console.error('Failed to parse navigation menu from localStorage:', error);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// Load modules configuration
|
|
121
|
+
const storedModules = localStorage.getItem('MODULES_CONFIG');
|
|
122
|
+
if (storedModules) {
|
|
123
|
+
try {
|
|
124
|
+
const parsedModules = JSON.parse(storedModules);
|
|
125
|
+
// Convert stored module configs to actual ModuleConfig with component references
|
|
126
|
+
const modulesWithComponents = {};
|
|
127
|
+
for (const [moduleId, storedConfig] of Object.entries(parsedModules)) {
|
|
128
|
+
modulesWithComponents[moduleId] = {
|
|
129
|
+
showHeader: storedConfig.showHeader,
|
|
130
|
+
title: storedConfig.title,
|
|
131
|
+
description: storedConfig.description,
|
|
132
|
+
component: componentRegistry[storedConfig.componentName] || null,
|
|
133
|
+
actions: storedConfig.actions,
|
|
134
|
+
permissions: storedConfig.permissions,
|
|
135
|
+
breadcrumb: storedConfig.breadcrumb,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
setDynamicModules(modulesWithComponents);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
console.error('Failed to parse modules config from localStorage:', error);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}, []);
|
|
145
|
+
// User preference for auto-collapse (configurable)
|
|
146
|
+
const [autoCollapseEnabled, setAutoCollapseEnabled] = useState(config.layout.autoCollapseSidebar);
|
|
147
|
+
// Overview tab section management
|
|
148
|
+
const [expandedOverviewSections, setExpandedOverviewSections] = useState(new Set(config.navigation.filter(sec => sec.section !== "Dashboard").map(sec => sec.section)));
|
|
149
|
+
// React 18 Concurrent Features
|
|
150
|
+
const [isPending, startTransition] = useTransition();
|
|
151
|
+
const deferredActiveTab = useDeferredValue(activeTab);
|
|
152
|
+
const componentId = useId();
|
|
153
|
+
// FIX: Mark as initialized after first render to prevent initial popup flashes
|
|
154
|
+
useEffect(() => {
|
|
155
|
+
const timer = setTimeout(() => {
|
|
156
|
+
setIsInitialized(true);
|
|
157
|
+
}, 100); // Small delay to prevent initial flashes
|
|
158
|
+
return () => clearTimeout(timer);
|
|
159
|
+
}, []);
|
|
160
|
+
// Subscribe to notification events from any component
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
const unsubscribe = notificationService.subscribe((notification) => {
|
|
163
|
+
setNotifications(prev => [notification, ...prev]);
|
|
164
|
+
});
|
|
165
|
+
return () => unsubscribe();
|
|
166
|
+
}, []);
|
|
167
|
+
// Dynamic Icon System - Enhanced with enterprise action icons
|
|
168
|
+
const IconSystem = useMemo(() => ({
|
|
169
|
+
menu: () => (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("line", { x1: "3", y1: "6", x2: "21", y2: "6" }), _jsx("line", { x1: "3", y1: "12", x2: "21", y2: "12" }), _jsx("line", { x1: "3", y1: "18", x2: "21", y2: "18" })] })),
|
|
170
|
+
notification: () => (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("path", { d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" }), _jsx("path", { d: "M13.73 21a2 2 0 0 1-3.46 0" })] })),
|
|
171
|
+
settings: () => (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("circle", { cx: "12", cy: "12", r: "5" }), _jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }), _jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }), _jsx("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }), _jsx("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }), _jsx("line", { x1: "1", y1: "12", x2: "3", y2: "12" }), _jsx("line", { x1: "21", y1: "12", x2: "23", y2: "12" }), _jsx("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }), _jsx("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })] })),
|
|
172
|
+
chevronDown: () => (_jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: _jsx("polyline", { points: "6,9 12,15 18,9" }) })),
|
|
173
|
+
home: () => (_jsx("svg", { style: { width: "1.125rem", height: "1.125rem", opacity: 0.85 }, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: _jsx("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }) })),
|
|
174
|
+
user: () => (_jsxs("svg", { style: { width: "1.125rem", height: "1.125rem", opacity: 0.85 }, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }), _jsx("circle", { cx: "12", cy: "7", r: "4" })] })),
|
|
175
|
+
users: () => (_jsxs("svg", { style: { width: "1.125rem", height: "1.125rem", opacity: 0.85 }, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }), _jsx("circle", { cx: "9", cy: "7", r: "4" }), _jsx("path", { d: "m22 21-3-3m0 0a4 4 0 0 0 0-4 4 4 0 0 0 0 4Z" })] })),
|
|
176
|
+
tabs: () => (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), _jsx("line", { x1: "9", y1: "9", x2: "15", y2: "9" }), _jsx("line", { x1: "9", y1: "12", x2: "15", y2: "12" }), _jsx("line", { x1: "9", y1: "15", x2: "15", y2: "15" })] })),
|
|
177
|
+
window: () => (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }), _jsx("path", { d: "M10 4v16" })] })),
|
|
178
|
+
chevronRight: () => (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: _jsx("polyline", { points: "9,18 15,12 9,6" }) })),
|
|
179
|
+
arrowLeft: () => (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("line", { x1: "19", y1: "12", x2: "5", y2: "12" }), _jsx("polyline", { points: "12,19 5,12 12,5" })] })),
|
|
180
|
+
plus: () => (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("circle", { cx: "12", cy: "12", r: "10" }), _jsx("line", { x1: "12", y1: "8", x2: "12", y2: "16" }), _jsx("line", { x1: "8", y1: "12", x2: "16", y2: "12" })] })),
|
|
181
|
+
file: () => (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), _jsx("polyline", { points: "14,2 14,8 20,8" })] })),
|
|
182
|
+
breadcrumbSeparator: () => (_jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: _jsx("polyline", { points: "9,18 15,12 9,6" }) })),
|
|
183
|
+
lock: () => (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }), _jsx("circle", { cx: "12", cy: "16", r: "1" }), _jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] })),
|
|
184
|
+
logout: () => (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), _jsx("polyline", { points: "16,17 21,12 16,7" }), _jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })] })),
|
|
185
|
+
footer: () => (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2", ry: "2" }), _jsx("line", { x1: "8", y1: "21", x2: "16", y2: "21" }), _jsx("line", { x1: "12", y1: "17", x2: "12", y2: "21" })] })),
|
|
186
|
+
folder: () => (_jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: _jsx("path", { d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" }) })),
|
|
187
|
+
collapse: () => (_jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("polyline", { points: "11,19 2,12 11,5" }), _jsx("polyline", { points: "22,19 13,12 22,5" })] })),
|
|
188
|
+
service: () => (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("circle", { cx: "12", cy: "10", r: "3" }), _jsx("path", { d: "M3 20c1.5-4.5 4.5-7.5 9-7.5s7.5 3 9 7.5" }), _jsx("circle", { cx: "17", cy: "5", r: "1" }), _jsx("circle", { cx: "19", cy: "3", r: "1" })] })),
|
|
189
|
+
currency: () => (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("circle", { cx: "12", cy: "12", r: "10" }), _jsx("path", { d: "M12 6v12" }), _jsx("path", { d: "M15 9.5a3 3 0 1 0 0 5" }), _jsx("path", { d: "M9 9.5a3 3 0 1 1 0 5" })] })),
|
|
190
|
+
chartofAccount: () => (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), _jsx("line", { x1: "9", y1: "7", x2: "9", y2: "17" }), _jsx("line", { x1: "15", y1: "7", x2: "15", y2: "17" }), _jsx("line", { x1: "7", y1: "11", x2: "17", y2: "11" }), _jsx("line", { x1: "7", y1: "15", x2: "17", y2: "15" }), _jsx("line", { x1: "7", y1: "7", x2: "17", y2: "7" })] })),
|
|
191
|
+
configure: () => (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("circle", { cx: "12", cy: "12", r: "3" }), _jsx("path", { d: "M12 1v6m0 6v6m11-7h-6m-6 0H1m15.5-6.5L19 5l-1.5-1.5M6.5 17.5L5 19l-1.5-1.5M17.5 17.5L19 19l1.5-1.5M6.5 6.5L5 5 3.5 6.5" })] })),
|
|
192
|
+
search: () => (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("circle", { cx: "11", cy: "11", r: "8" }), _jsx("path", { d: "m21 21-4.35-4.35" })] })),
|
|
193
|
+
}), []);
|
|
194
|
+
// CSS Styles
|
|
195
|
+
const dynamicStyles = useMemo(() => {
|
|
196
|
+
const colors = config.branding.colors;
|
|
197
|
+
const footerHeight = footerVisible && config.layout.enableFooter
|
|
198
|
+
? config.layout.footerHeight
|
|
199
|
+
: "0px";
|
|
200
|
+
return `
|
|
201
|
+
* {
|
|
202
|
+
margin: 0;
|
|
203
|
+
padding: 0;
|
|
204
|
+
box-sizing: border-box;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
:root {
|
|
208
|
+
--primary: ${colors.primary};
|
|
209
|
+
--secondary: ${colors.secondary};
|
|
210
|
+
--success: ${colors.success};
|
|
211
|
+
--warning: ${colors.warning};
|
|
212
|
+
--danger: ${colors.danger};
|
|
213
|
+
--info: ${colors.info};
|
|
214
|
+
|
|
215
|
+
--bg-primary: #ffffff;
|
|
216
|
+
--bg-secondary: #f8fafc;
|
|
217
|
+
--bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
|
|
218
|
+
--text-primary: #1e293b;
|
|
219
|
+
--text-secondary: #64748b;
|
|
220
|
+
--text-muted: #94a3b8;
|
|
221
|
+
--border-color: rgba(226, 232, 240, 0.5);
|
|
222
|
+
--glass-bg: rgba(255, 255, 255, 0.95);
|
|
223
|
+
--shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.1);
|
|
224
|
+
--accent-primary: ${colors.primary};
|
|
225
|
+
--accent-gradient: linear-gradient(135deg, ${colors.primary}, ${colors.info});
|
|
226
|
+
|
|
227
|
+
--header-height: ${config.layout.headerHeight};
|
|
228
|
+
--sidebar-width: ${config.layout.sidebarWidth};
|
|
229
|
+
--sidebar-collapsed-width: ${config.layout.sidebarCollapsedWidth};
|
|
230
|
+
--footer-height: ${footerHeight};
|
|
231
|
+
--tab-bar-height: ${config.layout.tabBarHeight};
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
[data-theme="dark"] {
|
|
235
|
+
--bg-primary: #0f172a;
|
|
236
|
+
--bg-secondary: #1e293b;
|
|
237
|
+
--bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
|
|
238
|
+
--text-primary: #f1f5f9;
|
|
239
|
+
--text-secondary: #cbd5e1;
|
|
240
|
+
--text-muted: #64748b;
|
|
241
|
+
--border-color: rgba(71, 85, 105, 0.5);
|
|
242
|
+
--glass-bg: rgba(15, 23, 42, 0.95);
|
|
243
|
+
--shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.3);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
html {
|
|
247
|
+
margin: 0;
|
|
248
|
+
padding: 0;
|
|
249
|
+
width: 100%;
|
|
250
|
+
overflow: hidden;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
body {
|
|
254
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
255
|
+
background: var(--bg-gradient);
|
|
256
|
+
color: var(--text-primary);
|
|
257
|
+
line-height: 1.5;
|
|
258
|
+
height: 100vh;
|
|
259
|
+
width: 100%;
|
|
260
|
+
margin: 0;
|
|
261
|
+
padding: 0;
|
|
262
|
+
overflow: hidden;
|
|
263
|
+
transition: background 0.3s ease, color 0.3s ease;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.enterprise-layout {
|
|
267
|
+
width: 100%;
|
|
268
|
+
height: 100vh;
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: column;
|
|
271
|
+
overflow: hidden;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.layout-header {
|
|
275
|
+
position: fixed;
|
|
276
|
+
top: 0;
|
|
277
|
+
left: 0;
|
|
278
|
+
right: 0;
|
|
279
|
+
height: var(--header-height);
|
|
280
|
+
background: var(--glass-bg);
|
|
281
|
+
backdrop-filter: blur(15px);
|
|
282
|
+
border-bottom: 1px solid var(--border-color);
|
|
283
|
+
display: flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
justify-content: space-between;
|
|
286
|
+
padding: 0 1rem;
|
|
287
|
+
z-index: 1000;
|
|
288
|
+
box-shadow: var(--shadow);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.header-left {
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
gap: 0.75rem;
|
|
295
|
+
flex: 0 0 auto;
|
|
296
|
+
min-width: 0;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.header-center {
|
|
300
|
+
display: flex;
|
|
301
|
+
align-items: center;
|
|
302
|
+
flex: 1;
|
|
303
|
+
justify-content: center;
|
|
304
|
+
min-width: 0;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.header-right {
|
|
308
|
+
display: flex;
|
|
309
|
+
align-items: center;
|
|
310
|
+
gap: 0.75rem;
|
|
311
|
+
flex-shrink: 0;
|
|
312
|
+
position: relative;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.header-info-section {
|
|
316
|
+
display: flex;
|
|
317
|
+
align-items: center;
|
|
318
|
+
gap: 0.5rem;
|
|
319
|
+
height: fit-content;
|
|
320
|
+
max-height: calc(var(--header-height) - 1rem);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.header-info-card {
|
|
324
|
+
display: flex;
|
|
325
|
+
align-items: center;
|
|
326
|
+
gap: 0.5rem;
|
|
327
|
+
padding: 0.375rem 0.875rem;
|
|
328
|
+
border-radius: 1.25rem;
|
|
329
|
+
backdrop-filter: blur(10px);
|
|
330
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
331
|
+
cursor: pointer;
|
|
332
|
+
position: relative;
|
|
333
|
+
overflow: visible;
|
|
334
|
+
height: fit-content;
|
|
335
|
+
max-height: 2.25rem;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.header-info-card-blue {
|
|
339
|
+
background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.06) 100%);
|
|
340
|
+
border: 1px solid rgba(37, 99, 235, 0.2);
|
|
341
|
+
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08),
|
|
342
|
+
0 1px 2px rgba(0, 0, 0, 0.04);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.header-info-card-green {
|
|
346
|
+
background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(34, 197, 94, 0.06) 100%);
|
|
347
|
+
border: 1px solid rgba(16, 185, 129, 0.2);
|
|
348
|
+
box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08),
|
|
349
|
+
0 1px 2px rgba(0, 0, 0, 0.04);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.header-info-card::before {
|
|
353
|
+
content: '';
|
|
354
|
+
position: absolute;
|
|
355
|
+
top: 50%;
|
|
356
|
+
left: 50%;
|
|
357
|
+
width: 100%;
|
|
358
|
+
height: 100%;
|
|
359
|
+
background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
|
|
360
|
+
transform: translate(-50%, -50%) scale(0);
|
|
361
|
+
transition: transform 0.5s ease-out;
|
|
362
|
+
pointer-events: none;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.header-info-card:hover::before {
|
|
366
|
+
transform: translate(-50%, -50%) scale(2);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.header-info-card-blue:hover {
|
|
370
|
+
transform: translateY(-2px);
|
|
371
|
+
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18),
|
|
372
|
+
0 2px 4px rgba(0, 0, 0, 0.06);
|
|
373
|
+
border-color: rgba(37, 99, 235, 0.35);
|
|
374
|
+
background: linear-gradient(135deg, rgba(37, 99, 235, 0.14) 0%, rgba(59, 130, 246, 0.08) 100%);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.header-info-card-green:hover {
|
|
378
|
+
transform: translateY(-2px);
|
|
379
|
+
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18),
|
|
380
|
+
0 2px 4px rgba(0, 0, 0, 0.06);
|
|
381
|
+
border-color: rgba(16, 185, 129, 0.35);
|
|
382
|
+
background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(34, 197, 94, 0.08) 100%);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.header-info-card:active {
|
|
386
|
+
transform: translateY(0) scale(0.98);
|
|
387
|
+
transition: all 0.1s ease;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.header-info-icon {
|
|
391
|
+
display: flex;
|
|
392
|
+
align-items: center;
|
|
393
|
+
justify-content: center;
|
|
394
|
+
width: 1.25rem;
|
|
395
|
+
height: 1.25rem;
|
|
396
|
+
flex-shrink: 0;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.header-info-card-blue .header-info-icon {
|
|
400
|
+
color: #2563eb;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.header-info-card-green .header-info-icon {
|
|
404
|
+
color: #10b981;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.header-info-content {
|
|
408
|
+
display: flex;
|
|
409
|
+
flex-direction: column;
|
|
410
|
+
gap: 0.0625rem;
|
|
411
|
+
min-width: 0;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.header-info-label {
|
|
415
|
+
font-size: 0.5625rem;
|
|
416
|
+
text-transform: uppercase;
|
|
417
|
+
letter-spacing: 0.08em;
|
|
418
|
+
font-weight: 700;
|
|
419
|
+
line-height: 1;
|
|
420
|
+
white-space: nowrap;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.header-info-card-blue .header-info-label {
|
|
424
|
+
color: #1d4ed8;
|
|
425
|
+
opacity: 0.85;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.header-info-card-green .header-info-label {
|
|
429
|
+
color: #059669;
|
|
430
|
+
opacity: 0.85;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.header-info-value {
|
|
434
|
+
font-size: 0.8125rem;
|
|
435
|
+
font-weight: 700;
|
|
436
|
+
white-space: nowrap;
|
|
437
|
+
letter-spacing: -0.01em;
|
|
438
|
+
line-height: 1.2;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.header-info-card-blue .header-info-value {
|
|
442
|
+
color: #1e3a8a;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.header-info-card-green .header-info-value {
|
|
446
|
+
color: #065f46;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.header-info-card:hover .header-info-label,
|
|
450
|
+
.header-info-card:hover .header-info-value {
|
|
451
|
+
opacity: 1;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.header-info-card.selectable {
|
|
455
|
+
cursor: pointer;
|
|
456
|
+
padding-right: 0.625rem;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.header-info-chevron {
|
|
460
|
+
display: flex;
|
|
461
|
+
align-items: center;
|
|
462
|
+
justify-content: center;
|
|
463
|
+
margin-left: 0.25rem;
|
|
464
|
+
transition: transform 0.3s ease;
|
|
465
|
+
opacity: 0.7;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.header-info-card:hover .header-info-chevron {
|
|
469
|
+
opacity: 1;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.header-info-dropdown {
|
|
473
|
+
position: absolute;
|
|
474
|
+
top: calc(100% + 0.5rem);
|
|
475
|
+
left: 0;
|
|
476
|
+
right: 0;
|
|
477
|
+
background: var(--glass-bg);
|
|
478
|
+
border-radius: 0.75rem;
|
|
479
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15),
|
|
480
|
+
0 4px 8px rgba(0, 0, 0, 0.1);
|
|
481
|
+
backdrop-filter: blur(12px);
|
|
482
|
+
z-index: 1000;
|
|
483
|
+
overflow: hidden;
|
|
484
|
+
animation: dropdownSlideIn 0.2s ease-out;
|
|
485
|
+
min-width: 180px;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
@keyframes dropdownSlideIn {
|
|
489
|
+
from {
|
|
490
|
+
opacity: 0;
|
|
491
|
+
transform: translateY(-8px);
|
|
492
|
+
}
|
|
493
|
+
to {
|
|
494
|
+
opacity: 1;
|
|
495
|
+
transform: translateY(0);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.header-info-dropdown-blue {
|
|
500
|
+
border: 1px solid rgba(37, 99, 235, 0.3);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.header-info-dropdown-green {
|
|
504
|
+
border: 1px solid rgba(16, 185, 129, 0.3);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.header-info-dropdown-item {
|
|
508
|
+
display: flex;
|
|
509
|
+
align-items: center;
|
|
510
|
+
justify-content: space-between;
|
|
511
|
+
padding: 0.625rem 0.875rem;
|
|
512
|
+
font-size: 0.8125rem;
|
|
513
|
+
font-weight: 500;
|
|
514
|
+
color: var(--text-primary);
|
|
515
|
+
transition: all 0.2s ease;
|
|
516
|
+
cursor: pointer;
|
|
517
|
+
gap: 0.5rem;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.header-info-dropdown-item:hover {
|
|
521
|
+
background: rgba(37, 99, 235, 0.08);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.header-info-dropdown-blue .header-info-dropdown-item:hover {
|
|
525
|
+
background: rgba(37, 99, 235, 0.12);
|
|
526
|
+
color: #1e40af;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.header-info-dropdown-green .header-info-dropdown-item:hover {
|
|
530
|
+
background: rgba(16, 185, 129, 0.12);
|
|
531
|
+
color: #047857;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.header-info-dropdown-item.active {
|
|
535
|
+
font-weight: 700;
|
|
536
|
+
background: rgba(37, 99, 235, 0.1);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.header-info-dropdown-blue .header-info-dropdown-item.active {
|
|
540
|
+
background: rgba(37, 99, 235, 0.15);
|
|
541
|
+
color: #1e40af;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.header-info-dropdown-green .header-info-dropdown-item.active {
|
|
545
|
+
background: rgba(16, 185, 129, 0.15);
|
|
546
|
+
color: #047857;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.header-info-dropdown-item svg {
|
|
550
|
+
flex-shrink: 0;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.app-logo {
|
|
554
|
+
display: flex;
|
|
555
|
+
align-items: center;
|
|
556
|
+
gap: 0.5rem;
|
|
557
|
+
font-size: 1.125rem;
|
|
558
|
+
font-weight: 700;
|
|
559
|
+
background: var(--accent-gradient);
|
|
560
|
+
-webkit-background-clip: text;
|
|
561
|
+
-webkit-text-fill-color: transparent;
|
|
562
|
+
background-clip: text;
|
|
563
|
+
white-space: nowrap;
|
|
564
|
+
flex-shrink: 0;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.logo-image {
|
|
568
|
+
flex-shrink: 0;
|
|
569
|
+
border-radius: 0.375rem;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.breadcrumb-container {
|
|
573
|
+
display: flex;
|
|
574
|
+
align-items: center;
|
|
575
|
+
font-size: 0.75rem;
|
|
576
|
+
opacity: 0.8;
|
|
577
|
+
margin-left: 1rem;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.breadcrumb {
|
|
581
|
+
display: flex;
|
|
582
|
+
align-items: center;
|
|
583
|
+
gap: 0.375rem;
|
|
584
|
+
color: var(--text-secondary);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.breadcrumb-item {
|
|
588
|
+
display: flex;
|
|
589
|
+
align-items: center;
|
|
590
|
+
gap: 0.25rem;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.breadcrumb-link {
|
|
594
|
+
color: var(--text-secondary);
|
|
595
|
+
text-decoration: none;
|
|
596
|
+
transition: color 0.2s ease;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.breadcrumb-link:hover {
|
|
600
|
+
color: var(--accent-primary);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.breadcrumb-current {
|
|
604
|
+
color: var(--accent-primary);
|
|
605
|
+
font-weight: 500;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.breadcrumb-separator {
|
|
609
|
+
color: var(--text-muted);
|
|
610
|
+
opacity: 0.6;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.layout-body {
|
|
614
|
+
display: flex;
|
|
615
|
+
height: calc(100vh - var(--header-height) - var(--footer-height));
|
|
616
|
+
margin-top: var(--header-height);
|
|
617
|
+
overflow: hidden;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.layout-body.footer-hidden {
|
|
621
|
+
height: calc(100vh - var(--header-height));
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.layout-sidebar {
|
|
625
|
+
width: var(--sidebar-width);
|
|
626
|
+
background: var(--glass-bg);
|
|
627
|
+
backdrop-filter: blur(15px);
|
|
628
|
+
border-right: 1px solid var(--border-color);
|
|
629
|
+
overflow-y: auto;
|
|
630
|
+
overflow-x: hidden;
|
|
631
|
+
transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
632
|
+
flex-shrink: 0;
|
|
633
|
+
will-change: width;
|
|
634
|
+
backface-visibility: hidden;
|
|
635
|
+
contain: layout style paint;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.layout-sidebar.collapsed {
|
|
639
|
+
width: var(--sidebar-collapsed-width);
|
|
640
|
+
overflow-y: hidden;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.layout-sidebar.mobile-hidden {
|
|
644
|
+
transform: translateX(-100%);
|
|
645
|
+
width: 0;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.layout-main {
|
|
649
|
+
flex: 1;
|
|
650
|
+
display: flex;
|
|
651
|
+
flex-direction: column;
|
|
652
|
+
background: var(--bg-gradient);
|
|
653
|
+
min-width: 0;
|
|
654
|
+
width: 100%;
|
|
655
|
+
height: 100%;
|
|
656
|
+
overflow: hidden;
|
|
657
|
+
box-sizing: border-box;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.layout-footer {
|
|
661
|
+
position: fixed;
|
|
662
|
+
bottom: 0;
|
|
663
|
+
left: 0;
|
|
664
|
+
right: 0;
|
|
665
|
+
height: var(--footer-height);
|
|
666
|
+
background: var(--glass-bg);
|
|
667
|
+
backdrop-filter: blur(15px);
|
|
668
|
+
border-top: 1px solid var(--border-color);
|
|
669
|
+
display: flex;
|
|
670
|
+
align-items: center;
|
|
671
|
+
justify-content: space-between;
|
|
672
|
+
padding: 0 1rem;
|
|
673
|
+
z-index: 1000;
|
|
674
|
+
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
|
|
675
|
+
font-size: 0.7rem;
|
|
676
|
+
color: var(--text-secondary);
|
|
677
|
+
transition: transform 0.3s ease;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.layout-footer.hidden {
|
|
681
|
+
transform: translateY(100%);
|
|
682
|
+
visibility: hidden;
|
|
683
|
+
opacity: 0;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.footer-left {
|
|
687
|
+
display: flex;
|
|
688
|
+
align-items: center;
|
|
689
|
+
gap: 0.75rem;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.footer-environment {
|
|
693
|
+
display: flex;
|
|
694
|
+
align-items: center;
|
|
695
|
+
gap: 0.25rem;
|
|
696
|
+
padding: 0.125rem 0.375rem;
|
|
697
|
+
border-radius: 0.375rem;
|
|
698
|
+
font-weight: 500;
|
|
699
|
+
font-size: 0.625rem;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.env-development {
|
|
703
|
+
background: var(--danger);
|
|
704
|
+
color: white;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.env-staging {
|
|
708
|
+
background: var(--warning);
|
|
709
|
+
color: white;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.env-production {
|
|
713
|
+
background: var(--success);
|
|
714
|
+
color: white;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.env-uat {
|
|
718
|
+
background: var(--info);
|
|
719
|
+
color: white;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.footer-right {
|
|
723
|
+
display: flex;
|
|
724
|
+
align-items: center;
|
|
725
|
+
gap: 0.75rem;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.footer-support {
|
|
729
|
+
color: var(--accent-primary);
|
|
730
|
+
text-decoration: none;
|
|
731
|
+
transition: opacity 0.2s ease;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
.footer-support:hover {
|
|
735
|
+
opacity: 0.8;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
.content-wrapper {
|
|
739
|
+
display: flex;
|
|
740
|
+
flex-direction: column;
|
|
741
|
+
height: 100%;
|
|
742
|
+
overflow: hidden;
|
|
743
|
+
width: 100%;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.tab-bar {
|
|
747
|
+
display: flex;
|
|
748
|
+
align-items: center;
|
|
749
|
+
background: var(--glass-bg);
|
|
750
|
+
border-bottom: 1px solid var(--border-color);
|
|
751
|
+
padding: 0;
|
|
752
|
+
margin: 0;
|
|
753
|
+
min-height: var(--tab-bar-height);
|
|
754
|
+
overflow-x: hidden;
|
|
755
|
+
flex-shrink: 0;
|
|
756
|
+
gap: 0.25rem;
|
|
757
|
+
transition: all 0.3s ease;
|
|
758
|
+
width: 100%;
|
|
759
|
+
box-sizing: border-box;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.tab-bar.hidden {
|
|
763
|
+
display: none;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.single-page-header {
|
|
767
|
+
display: flex;
|
|
768
|
+
align-items: center;
|
|
769
|
+
justify-content: space-between;
|
|
770
|
+
background: var(--glass-bg);
|
|
771
|
+
border-bottom: 1px solid var(--border-color);
|
|
772
|
+
padding: 0.5rem 1.25rem;
|
|
773
|
+
flex-shrink: 0;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
.page-title {
|
|
777
|
+
font-size: 1.125rem;
|
|
778
|
+
font-weight: 600;
|
|
779
|
+
color: var(--text-primary);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.back-button {
|
|
783
|
+
display: flex;
|
|
784
|
+
align-items: center;
|
|
785
|
+
gap: 0.5rem;
|
|
786
|
+
padding: 0.375rem 0.75rem;
|
|
787
|
+
background: transparent;
|
|
788
|
+
border: 1px solid var(--border-color);
|
|
789
|
+
border-radius: 0.5rem;
|
|
790
|
+
color: var(--text-secondary);
|
|
791
|
+
text-decoration: none;
|
|
792
|
+
font-size: 0.8rem;
|
|
793
|
+
transition: all 0.3s ease;
|
|
794
|
+
cursor: pointer;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.back-button:hover {
|
|
798
|
+
background: var(--bg-secondary);
|
|
799
|
+
color: var(--text-primary);
|
|
800
|
+
border-color: var(--border-color);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.tab {
|
|
804
|
+
display: flex;
|
|
805
|
+
align-items: center;
|
|
806
|
+
gap: 0.5rem;
|
|
807
|
+
padding: 0.375rem 0.5rem;
|
|
808
|
+
margin: 0;
|
|
809
|
+
background: var(--bg-secondary);
|
|
810
|
+
border: 1px solid var(--border-color);
|
|
811
|
+
border-bottom: none;
|
|
812
|
+
border-radius: 0.75rem 0.75rem 0 0;
|
|
813
|
+
cursor: pointer;
|
|
814
|
+
transition: all 0.3s ease;
|
|
815
|
+
white-space: nowrap;
|
|
816
|
+
min-width: 100px;
|
|
817
|
+
max-width: 180px;
|
|
818
|
+
font-size: 0.8rem;
|
|
819
|
+
color: var(--text-secondary);
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
.tab:hover {
|
|
823
|
+
background: var(--bg-primary);
|
|
824
|
+
color: var(--text-primary);
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.tab.active {
|
|
828
|
+
background: var(--bg-primary);
|
|
829
|
+
border-color: var(--accent-primary);
|
|
830
|
+
color: var(--accent-primary);
|
|
831
|
+
box-shadow: 0 -2px 4px rgba(37, 99, 235, 0.1);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.tab-title {
|
|
835
|
+
flex: 1;
|
|
836
|
+
overflow: hidden;
|
|
837
|
+
text-overflow: ellipsis;
|
|
838
|
+
white-space: nowrap;
|
|
839
|
+
min-width: 0;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
.tab-close {
|
|
843
|
+
display: flex;
|
|
844
|
+
align-items: center;
|
|
845
|
+
justify-content: center;
|
|
846
|
+
width: 1rem;
|
|
847
|
+
height: 1rem;
|
|
848
|
+
border-radius: 50%;
|
|
849
|
+
background: none;
|
|
850
|
+
border: none;
|
|
851
|
+
cursor: pointer;
|
|
852
|
+
color: var(--text-muted);
|
|
853
|
+
transition: all 0.3s ease;
|
|
854
|
+
flex-shrink: 0;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
.tab-close:hover {
|
|
858
|
+
background: var(--border-color);
|
|
859
|
+
color: var(--text-secondary);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.tab.active .tab-close:hover {
|
|
863
|
+
background: rgba(37, 99, 235, 0.1);
|
|
864
|
+
color: var(--accent-primary);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/* Tab overflow menu styles for mobile */
|
|
868
|
+
.tab-bar-wrapper {
|
|
869
|
+
display: flex;
|
|
870
|
+
align-items: center;
|
|
871
|
+
width: 100%;
|
|
872
|
+
background: var(--glass-bg);
|
|
873
|
+
border-bottom: 1px solid var(--border-color);
|
|
874
|
+
min-height: var(--tab-bar-height);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.tab-bar-visible {
|
|
878
|
+
display: flex;
|
|
879
|
+
align-items: center;
|
|
880
|
+
gap: 0.25rem;
|
|
881
|
+
flex: 1;
|
|
882
|
+
overflow: hidden;
|
|
883
|
+
min-height: var(--tab-bar-height);
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.tab-more-container {
|
|
887
|
+
position: relative;
|
|
888
|
+
flex-shrink: 0;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
.tab-more-btn {
|
|
892
|
+
display: none;
|
|
893
|
+
align-items: center;
|
|
894
|
+
gap: 0.25rem;
|
|
895
|
+
padding: 0.375rem 0.75rem;
|
|
896
|
+
background: var(--bg-secondary);
|
|
897
|
+
border: 1px solid var(--border-color);
|
|
898
|
+
border-radius: 0.5rem;
|
|
899
|
+
cursor: pointer;
|
|
900
|
+
font-size: 0.8rem;
|
|
901
|
+
color: var(--text-secondary);
|
|
902
|
+
transition: all 0.3s ease;
|
|
903
|
+
margin-right: 0.5rem;
|
|
904
|
+
white-space: nowrap;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
.tab-more-btn:hover {
|
|
908
|
+
background: var(--bg-primary);
|
|
909
|
+
color: var(--accent-primary);
|
|
910
|
+
border-color: var(--accent-primary);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.tab-more-btn.active {
|
|
914
|
+
background: var(--accent-primary);
|
|
915
|
+
color: white;
|
|
916
|
+
border-color: var(--accent-primary);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
.tab-overflow-menu {
|
|
920
|
+
position: absolute;
|
|
921
|
+
top: 100%;
|
|
922
|
+
right: 0;
|
|
923
|
+
min-width: 200px;
|
|
924
|
+
max-width: 280px;
|
|
925
|
+
background: var(--glass-bg);
|
|
926
|
+
backdrop-filter: blur(15px);
|
|
927
|
+
border: 1px solid var(--border-color);
|
|
928
|
+
border-radius: 0.75rem;
|
|
929
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
930
|
+
padding: 0.5rem;
|
|
931
|
+
z-index: 1002;
|
|
932
|
+
margin-top: 0.25rem;
|
|
933
|
+
opacity: 0;
|
|
934
|
+
visibility: hidden;
|
|
935
|
+
transform: translateY(-10px);
|
|
936
|
+
transition: all 0.3s ease;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.tab-overflow-menu.open {
|
|
940
|
+
opacity: 1;
|
|
941
|
+
visibility: visible;
|
|
942
|
+
transform: translateY(0);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
.tab-overflow-item {
|
|
946
|
+
display: flex;
|
|
947
|
+
align-items: center;
|
|
948
|
+
justify-content: space-between;
|
|
949
|
+
padding: 0.5rem 0.75rem;
|
|
950
|
+
border-radius: 0.5rem;
|
|
951
|
+
cursor: pointer;
|
|
952
|
+
font-size: 0.8rem;
|
|
953
|
+
color: var(--text-secondary);
|
|
954
|
+
transition: all 0.3s ease;
|
|
955
|
+
gap: 0.5rem;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.tab-overflow-item:hover {
|
|
959
|
+
background: var(--bg-secondary);
|
|
960
|
+
color: var(--text-primary);
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
.tab-overflow-item.active {
|
|
964
|
+
background: rgba(37, 99, 235, 0.1);
|
|
965
|
+
color: var(--accent-primary);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
.tab-overflow-item-title {
|
|
969
|
+
flex: 1;
|
|
970
|
+
overflow: hidden;
|
|
971
|
+
text-overflow: ellipsis;
|
|
972
|
+
white-space: nowrap;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
.tab-overflow-item-close {
|
|
976
|
+
display: flex;
|
|
977
|
+
align-items: center;
|
|
978
|
+
justify-content: center;
|
|
979
|
+
width: 1.25rem;
|
|
980
|
+
height: 1.25rem;
|
|
981
|
+
border-radius: 50%;
|
|
982
|
+
background: none;
|
|
983
|
+
border: none;
|
|
984
|
+
cursor: pointer;
|
|
985
|
+
color: var(--text-muted);
|
|
986
|
+
transition: all 0.3s ease;
|
|
987
|
+
flex-shrink: 0;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
.tab-overflow-item-close:hover {
|
|
991
|
+
background: var(--border-color);
|
|
992
|
+
color: var(--danger);
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
.tab-content-area {
|
|
996
|
+
flex: 1;
|
|
997
|
+
overflow: hidden;
|
|
998
|
+
width: 100%;
|
|
999
|
+
height: 100%;
|
|
1000
|
+
min-height: 0;
|
|
1001
|
+
background: var(--bg-gradient);
|
|
1002
|
+
box-sizing: border-box;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.enterprise-module {
|
|
1006
|
+
display: none;
|
|
1007
|
+
width: 100%;
|
|
1008
|
+
height: 100%;
|
|
1009
|
+
overflow: hidden;
|
|
1010
|
+
box-sizing: border-box;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.enterprise-module.active {
|
|
1014
|
+
display: block;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
.module-header {
|
|
1018
|
+
background: var(--glass-bg);
|
|
1019
|
+
backdrop-filter: blur(15px);
|
|
1020
|
+
border: 1px solid var(--border-color);
|
|
1021
|
+
border-radius: 1rem;
|
|
1022
|
+
padding: 0.75rem 1.25rem;
|
|
1023
|
+
margin: 0.75rem 1.25rem 0 1.25rem;
|
|
1024
|
+
box-shadow: var(--shadow);
|
|
1025
|
+
display: flex;
|
|
1026
|
+
align-items: flex-start;
|
|
1027
|
+
justify-content: space-between;
|
|
1028
|
+
gap: 1rem;
|
|
1029
|
+
flex-shrink: 0;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
.module-header-content {
|
|
1033
|
+
flex: 1;
|
|
1034
|
+
text-align: left;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.module-title {
|
|
1038
|
+
font-size: 1.25rem;
|
|
1039
|
+
font-weight: 700;
|
|
1040
|
+
background: var(--accent-gradient);
|
|
1041
|
+
-webkit-background-clip: text;
|
|
1042
|
+
-webkit-text-fill-color: transparent;
|
|
1043
|
+
background-clip: text;
|
|
1044
|
+
margin-bottom: 0.375rem;
|
|
1045
|
+
line-height: 1.2;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.module-description {
|
|
1049
|
+
font-size: 0.8rem;
|
|
1050
|
+
color: var(--text-secondary);
|
|
1051
|
+
margin-bottom: 0;
|
|
1052
|
+
line-height: 1.3;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.module-actions {
|
|
1056
|
+
display: flex;
|
|
1057
|
+
align-items: flex-start;
|
|
1058
|
+
gap: 0.75rem;
|
|
1059
|
+
flex-wrap: wrap;
|
|
1060
|
+
flex-shrink: 0;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.module-content {
|
|
1064
|
+
padding: 0 1.25rem 2rem 1.25rem;
|
|
1065
|
+
max-width: 100%;
|
|
1066
|
+
overflow: hidden;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.layout-body.footer-hidden .module-content {
|
|
1070
|
+
padding-bottom: 0;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.btn {
|
|
1074
|
+
display: inline-flex;
|
|
1075
|
+
align-items: center;
|
|
1076
|
+
justify-content: center;
|
|
1077
|
+
gap: 0.375rem;
|
|
1078
|
+
padding: 0.5rem 1rem;
|
|
1079
|
+
font-size: 0.8rem;
|
|
1080
|
+
font-weight: 500;
|
|
1081
|
+
border: none;
|
|
1082
|
+
border-radius: 0.75rem;
|
|
1083
|
+
cursor: pointer;
|
|
1084
|
+
text-decoration: none;
|
|
1085
|
+
transition: all 0.3s ease;
|
|
1086
|
+
white-space: nowrap;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
.btn-primary {
|
|
1090
|
+
background: var(--accent-gradient);
|
|
1091
|
+
color: white;
|
|
1092
|
+
box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.btn-primary:hover {
|
|
1096
|
+
transform: translateY(-2px);
|
|
1097
|
+
box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.btn-secondary {
|
|
1101
|
+
background: var(--glass-bg);
|
|
1102
|
+
color: var(--text-primary);
|
|
1103
|
+
border: 1px solid var(--border-color);
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
.btn-secondary:hover {
|
|
1107
|
+
background: var(--bg-secondary);
|
|
1108
|
+
transform: translateY(-2px);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
.nav-section {
|
|
1112
|
+
padding: 0.75rem 0 0 0;
|
|
1113
|
+
border-bottom: 1px solid var(--border-color);
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.nav-section:last-child {
|
|
1117
|
+
border-bottom: none;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
.nav-section-header {
|
|
1121
|
+
display: flex;
|
|
1122
|
+
align-items: center;
|
|
1123
|
+
justify-content: space-between;
|
|
1124
|
+
padding: 0.5rem 1rem;
|
|
1125
|
+
cursor: pointer;
|
|
1126
|
+
transition: all 0.3s ease;
|
|
1127
|
+
border-radius: 0.75rem;
|
|
1128
|
+
margin: 0 0.75rem 0.375rem 0.75rem;
|
|
1129
|
+
position: relative;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
.nav-section-header:hover {
|
|
1133
|
+
background: var(--bg-secondary);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.nav-section-title {
|
|
1137
|
+
font-size: 0.6875rem;
|
|
1138
|
+
font-weight: 600;
|
|
1139
|
+
color: var(--text-secondary);
|
|
1140
|
+
text-transform: uppercase;
|
|
1141
|
+
letter-spacing: 0.075em;
|
|
1142
|
+
margin: 0;
|
|
1143
|
+
flex: 1;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
.nav-chevron {
|
|
1147
|
+
color: var(--text-muted);
|
|
1148
|
+
transition: all 0.2s ease;
|
|
1149
|
+
display: flex;
|
|
1150
|
+
align-items: center;
|
|
1151
|
+
justify-content: center;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
.nav-section-header.expanded .nav-chevron {
|
|
1155
|
+
transform: rotate(0deg);
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
.nav-section-header.collapsed .nav-chevron {
|
|
1159
|
+
transform: rotate(-90deg);
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
.nav-section-content {
|
|
1163
|
+
overflow: hidden;
|
|
1164
|
+
transition: all 0.3s ease;
|
|
1165
|
+
padding-bottom: 0.75rem;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.nav-section-content.expanded {
|
|
1169
|
+
max-height: 500px;
|
|
1170
|
+
opacity: 1;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.nav-section-content.collapsed {
|
|
1174
|
+
max-height: 0;
|
|
1175
|
+
opacity: 0;
|
|
1176
|
+
padding-bottom: 0;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
.nav-menu {
|
|
1180
|
+
list-style: none;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
.nav-item {
|
|
1184
|
+
margin: 0 0.75rem;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
.nav-link {
|
|
1188
|
+
display: flex;
|
|
1189
|
+
align-items: center;
|
|
1190
|
+
gap: 0.75rem;
|
|
1191
|
+
padding: 0.5rem 0.75rem;
|
|
1192
|
+
color: var(--text-secondary);
|
|
1193
|
+
text-decoration: none;
|
|
1194
|
+
border-radius: 0.75rem;
|
|
1195
|
+
transition: all 0.3s ease;
|
|
1196
|
+
font-size: 0.8rem;
|
|
1197
|
+
position: relative;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
.nav-link:hover,
|
|
1201
|
+
.nav-link.active {
|
|
1202
|
+
background: var(--accent-gradient);
|
|
1203
|
+
color: white;
|
|
1204
|
+
transform: translateX(4px);
|
|
1205
|
+
box-shadow: var(--shadow);
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
/* NEW: Multi-level menu styles */
|
|
1209
|
+
.nav-sub-menu {
|
|
1210
|
+
margin-left: 1.5rem;
|
|
1211
|
+
border-left: 1px solid var(--border-color);
|
|
1212
|
+
padding-left: 0.5rem;
|
|
1213
|
+
margin-top: 0.25rem;
|
|
1214
|
+
list-style: none;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
.nav-sub-item {
|
|
1218
|
+
margin: 0 0.5rem;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
.nav-sub-link {
|
|
1222
|
+
display: flex;
|
|
1223
|
+
align-items: center;
|
|
1224
|
+
gap: 0.5rem;
|
|
1225
|
+
padding: 0.375rem 0.5rem;
|
|
1226
|
+
color: var(--text-muted);
|
|
1227
|
+
text-decoration: none;
|
|
1228
|
+
border-radius: 0.5rem;
|
|
1229
|
+
transition: all 0.3s ease;
|
|
1230
|
+
font-size: 0.75rem;
|
|
1231
|
+
position: relative;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.nav-sub-link:hover,
|
|
1235
|
+
.nav-sub-link.active {
|
|
1236
|
+
background: var(--accent-gradient);
|
|
1237
|
+
color: white;
|
|
1238
|
+
transform: translateX(2px);
|
|
1239
|
+
box-shadow: var(--shadow);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.nav-item-with-children > .nav-link {
|
|
1243
|
+
position: relative;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
.nav-item-expand {
|
|
1247
|
+
position: absolute;
|
|
1248
|
+
right: 0.5rem;
|
|
1249
|
+
color: var(--text-muted);
|
|
1250
|
+
transition: all 0.2s ease;
|
|
1251
|
+
display: flex;
|
|
1252
|
+
align-items: center;
|
|
1253
|
+
justify-content: center;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.nav-item-expand.expanded {
|
|
1257
|
+
transform: rotate(90deg);
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
.nav-badge {
|
|
1261
|
+
background: var(--danger);
|
|
1262
|
+
color: white;
|
|
1263
|
+
font-size: 0.625rem;
|
|
1264
|
+
padding: 0.125rem 0.3rem;
|
|
1265
|
+
border-radius: 0.5rem;
|
|
1266
|
+
margin-left: auto;
|
|
1267
|
+
font-weight: 600;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
.menu-toggle {
|
|
1271
|
+
background: none;
|
|
1272
|
+
border: none;
|
|
1273
|
+
padding: 0.5rem;
|
|
1274
|
+
border-radius: 0.75rem;
|
|
1275
|
+
cursor: pointer;
|
|
1276
|
+
color: var(--text-secondary);
|
|
1277
|
+
transition: all 0.3s ease;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
.menu-toggle:hover {
|
|
1281
|
+
background: var(--bg-secondary);
|
|
1282
|
+
color: var(--text-primary);
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
.persona-control {
|
|
1286
|
+
position: relative;
|
|
1287
|
+
display: flex;
|
|
1288
|
+
align-items: center;
|
|
1289
|
+
gap: 0.375rem;
|
|
1290
|
+
padding: 0.375rem;
|
|
1291
|
+
border-radius: 0.75rem;
|
|
1292
|
+
cursor: pointer;
|
|
1293
|
+
transition: all 0.3s ease;
|
|
1294
|
+
flex-shrink: 0;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
.persona-control:hover {
|
|
1298
|
+
background: var(--bg-secondary);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
.persona-avatar {
|
|
1302
|
+
width: 2rem;
|
|
1303
|
+
height: 2rem;
|
|
1304
|
+
border-radius: 50%;
|
|
1305
|
+
background: var(--accent-gradient);
|
|
1306
|
+
display: flex;
|
|
1307
|
+
align-items: center;
|
|
1308
|
+
justify-content: center;
|
|
1309
|
+
color: white;
|
|
1310
|
+
font-weight: 600;
|
|
1311
|
+
font-size: 0.75rem;
|
|
1312
|
+
flex-shrink: 0;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
.persona-role {
|
|
1316
|
+
font-size: 0.75rem;
|
|
1317
|
+
color: var(--text-secondary);
|
|
1318
|
+
white-space: nowrap;
|
|
1319
|
+
overflow: hidden;
|
|
1320
|
+
text-overflow: ellipsis;
|
|
1321
|
+
max-width: 100px;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
.persona-panel {
|
|
1325
|
+
position: absolute;
|
|
1326
|
+
top: 100%;
|
|
1327
|
+
right: 0;
|
|
1328
|
+
width: 300px;
|
|
1329
|
+
background: var(--glass-bg);
|
|
1330
|
+
backdrop-filter: blur(15px);
|
|
1331
|
+
border: 2px solid rgba(203, 213, 225, 0.8);
|
|
1332
|
+
border-radius: 1rem;
|
|
1333
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
1334
|
+
padding: 1rem;
|
|
1335
|
+
z-index: 1001;
|
|
1336
|
+
margin-top: 0.5rem;
|
|
1337
|
+
opacity: 0;
|
|
1338
|
+
visibility: hidden;
|
|
1339
|
+
transform: translateY(-10px);
|
|
1340
|
+
transition: all 0.3s ease;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
.persona-panel.open {
|
|
1344
|
+
opacity: 1;
|
|
1345
|
+
visibility: visible;
|
|
1346
|
+
transform: translateY(0);
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
.persona-panel-header {
|
|
1350
|
+
display: flex;
|
|
1351
|
+
align-items: center;
|
|
1352
|
+
gap: 0.75rem;
|
|
1353
|
+
padding-bottom: 0.75rem;
|
|
1354
|
+
margin-bottom: 0.75rem;
|
|
1355
|
+
border-bottom: 2px solid rgba(226, 232, 240, 0.9);
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
.persona-panel-avatar {
|
|
1359
|
+
width: 2.5rem;
|
|
1360
|
+
height: 2.5rem;
|
|
1361
|
+
border-radius: 50%;
|
|
1362
|
+
background: var(--accent-gradient);
|
|
1363
|
+
display: flex;
|
|
1364
|
+
align-items: center;
|
|
1365
|
+
justify-content: center;
|
|
1366
|
+
color: white;
|
|
1367
|
+
font-weight: 600;
|
|
1368
|
+
font-size: 0.875rem;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
.persona-panel-info h3 {
|
|
1372
|
+
font-size: 0.875rem;
|
|
1373
|
+
font-weight: 600;
|
|
1374
|
+
color: var(--text-primary);
|
|
1375
|
+
margin-bottom: 0.125rem;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
.persona-panel-info p {
|
|
1379
|
+
font-size: 0.75rem;
|
|
1380
|
+
color: var(--text-secondary);
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
.persona-panel-section {
|
|
1384
|
+
padding-bottom: 0.75rem;
|
|
1385
|
+
margin-bottom: 0.75rem;
|
|
1386
|
+
border-bottom: 1px solid rgba(226, 232, 240, 0.8);
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
.persona-panel-section:last-child {
|
|
1390
|
+
margin-bottom: 0;
|
|
1391
|
+
padding-bottom: 0;
|
|
1392
|
+
border-bottom: none;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
.persona-panel-section h4 {
|
|
1396
|
+
font-size: 0.75rem;
|
|
1397
|
+
font-weight: 600;
|
|
1398
|
+
color: var(--text-secondary);
|
|
1399
|
+
text-transform: uppercase;
|
|
1400
|
+
letter-spacing: 0.05em;
|
|
1401
|
+
margin-bottom: 0.5rem;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
.persona-panel-controls {
|
|
1405
|
+
display: flex;
|
|
1406
|
+
flex-direction: column;
|
|
1407
|
+
gap: 0.375rem;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
.persona-control-item {
|
|
1411
|
+
display: flex;
|
|
1412
|
+
align-items: center;
|
|
1413
|
+
justify-content: space-between;
|
|
1414
|
+
padding: 0.5rem 0.75rem;
|
|
1415
|
+
border-radius: 0.5rem;
|
|
1416
|
+
border: 1px solid transparent;
|
|
1417
|
+
transition: all 0.3s ease;
|
|
1418
|
+
cursor: pointer;
|
|
1419
|
+
font-size: 0.8rem;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
.persona-control-item:hover {
|
|
1423
|
+
background: var(--bg-secondary);
|
|
1424
|
+
border-color: rgba(203, 213, 225, 0.7);
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
.persona-control-item.action {
|
|
1428
|
+
color: var(--text-primary);
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
.persona-control-item.action:hover {
|
|
1432
|
+
color: var(--accent-primary);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
.persona-control-item.danger:hover {
|
|
1436
|
+
background: rgba(220, 38, 38, 0.1);
|
|
1437
|
+
color: var(--danger);
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
.persona-control-label {
|
|
1441
|
+
display: flex;
|
|
1442
|
+
align-items: center;
|
|
1443
|
+
gap: 0.5rem;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
/* Notification Panel */
|
|
1447
|
+
.notification-bell {
|
|
1448
|
+
position: relative;
|
|
1449
|
+
display: flex;
|
|
1450
|
+
align-items: center;
|
|
1451
|
+
justify-content: center;
|
|
1452
|
+
width: 2.5rem;
|
|
1453
|
+
height: 2.5rem;
|
|
1454
|
+
border-radius: 50%;
|
|
1455
|
+
cursor: pointer;
|
|
1456
|
+
transition: all 0.3s ease;
|
|
1457
|
+
background: transparent;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
.notification-bell:hover {
|
|
1461
|
+
background: var(--bg-secondary);
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
.notification-badge {
|
|
1465
|
+
position: absolute;
|
|
1466
|
+
top: 0.25rem;
|
|
1467
|
+
right: 0.25rem;
|
|
1468
|
+
background: var(--danger);
|
|
1469
|
+
color: white;
|
|
1470
|
+
font-size: 0.625rem;
|
|
1471
|
+
font-weight: 600;
|
|
1472
|
+
min-width: 1.125rem;
|
|
1473
|
+
height: 1.125rem;
|
|
1474
|
+
border-radius: 0.5625rem;
|
|
1475
|
+
display: flex;
|
|
1476
|
+
align-items: center;
|
|
1477
|
+
justify-content: center;
|
|
1478
|
+
padding: 0 0.25rem;
|
|
1479
|
+
border: 2px solid var(--glass-bg);
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
.notification-panel {
|
|
1483
|
+
position: absolute;
|
|
1484
|
+
top: 100%;
|
|
1485
|
+
right: 0;
|
|
1486
|
+
width: 380px;
|
|
1487
|
+
max-height: 500px;
|
|
1488
|
+
background: var(--glass-bg);
|
|
1489
|
+
backdrop-filter: blur(15px);
|
|
1490
|
+
border: 2px solid rgba(203, 213, 225, 0.8);
|
|
1491
|
+
border-radius: 1rem;
|
|
1492
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
1493
|
+
z-index: 1001;
|
|
1494
|
+
margin-top: 0.5rem;
|
|
1495
|
+
opacity: 0;
|
|
1496
|
+
visibility: hidden;
|
|
1497
|
+
transform: translateY(-10px);
|
|
1498
|
+
transition: all 0.3s ease;
|
|
1499
|
+
display: flex;
|
|
1500
|
+
flex-direction: column;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
.notification-panel.open {
|
|
1504
|
+
opacity: 1;
|
|
1505
|
+
visibility: visible;
|
|
1506
|
+
transform: translateY(0);
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
.notification-panel-header {
|
|
1510
|
+
display: flex;
|
|
1511
|
+
align-items: center;
|
|
1512
|
+
justify-content: space-between;
|
|
1513
|
+
padding: 1rem 1.25rem;
|
|
1514
|
+
border-bottom: 2px solid rgba(226, 232, 240, 0.9);
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
.notification-panel-title {
|
|
1518
|
+
font-size: 1rem;
|
|
1519
|
+
font-weight: 600;
|
|
1520
|
+
color: var(--text-primary);
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
.notification-panel-actions {
|
|
1524
|
+
display: flex;
|
|
1525
|
+
gap: 0.5rem;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
.notification-action-btn {
|
|
1529
|
+
font-size: 0.75rem;
|
|
1530
|
+
color: var(--primary);
|
|
1531
|
+
background: transparent;
|
|
1532
|
+
border: none;
|
|
1533
|
+
cursor: pointer;
|
|
1534
|
+
padding: 0.25rem 0.5rem;
|
|
1535
|
+
border-radius: 0.375rem;
|
|
1536
|
+
transition: all 0.2s ease;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
.notification-action-btn:hover {
|
|
1540
|
+
background: rgba(37, 99, 235, 0.1);
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
.notification-panel-content {
|
|
1544
|
+
flex: 1;
|
|
1545
|
+
overflow-y: auto;
|
|
1546
|
+
padding: 0.5rem;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
.notification-item {
|
|
1550
|
+
display: flex;
|
|
1551
|
+
gap: 0.75rem;
|
|
1552
|
+
padding: 0.875rem;
|
|
1553
|
+
margin-bottom: 0.5rem;
|
|
1554
|
+
border-radius: 0.75rem;
|
|
1555
|
+
cursor: pointer;
|
|
1556
|
+
transition: all 0.2s ease;
|
|
1557
|
+
border: 1px solid transparent;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
.notification-item:hover {
|
|
1561
|
+
background: var(--bg-secondary);
|
|
1562
|
+
border-color: rgba(203, 213, 225, 0.7);
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
.notification-item.unread {
|
|
1566
|
+
background: rgba(37, 99, 235, 0.05);
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
.notification-icon {
|
|
1570
|
+
flex-shrink: 0;
|
|
1571
|
+
width: 2.5rem;
|
|
1572
|
+
height: 2.5rem;
|
|
1573
|
+
border-radius: 50%;
|
|
1574
|
+
display: flex;
|
|
1575
|
+
align-items: center;
|
|
1576
|
+
justify-content: center;
|
|
1577
|
+
font-size: 1.125rem;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
.notification-icon.success {
|
|
1581
|
+
background: rgba(22, 163, 74, 0.1);
|
|
1582
|
+
color: var(--success);
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
.notification-icon.info {
|
|
1586
|
+
background: rgba(37, 99, 235, 0.1);
|
|
1587
|
+
color: var(--primary);
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
.notification-icon.warning {
|
|
1591
|
+
background: rgba(217, 119, 6, 0.1);
|
|
1592
|
+
color: var(--warning);
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
.notification-icon.error {
|
|
1596
|
+
background: rgba(220, 38, 38, 0.1);
|
|
1597
|
+
color: var(--danger);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
.notification-content {
|
|
1601
|
+
flex: 1;
|
|
1602
|
+
min-width: 0;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
.notification-title {
|
|
1606
|
+
font-size: 0.875rem;
|
|
1607
|
+
font-weight: 600;
|
|
1608
|
+
color: var(--text-primary);
|
|
1609
|
+
margin-bottom: 0.25rem;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
.notification-message {
|
|
1613
|
+
font-size: 0.8rem;
|
|
1614
|
+
color: var(--text-secondary);
|
|
1615
|
+
margin-bottom: 0.375rem;
|
|
1616
|
+
line-height: 1.4;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.notification-time {
|
|
1620
|
+
font-size: 0.7rem;
|
|
1621
|
+
color: var(--text-muted);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
.notification-empty {
|
|
1625
|
+
text-align: center;
|
|
1626
|
+
padding: 3rem 2rem;
|
|
1627
|
+
color: var(--text-muted);
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
.notification-empty-icon {
|
|
1631
|
+
font-size: 3rem;
|
|
1632
|
+
margin-bottom: 1rem;
|
|
1633
|
+
opacity: 0.3;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
.notification-filters {
|
|
1637
|
+
display: flex;
|
|
1638
|
+
align-items: center;
|
|
1639
|
+
justify-content: space-between;
|
|
1640
|
+
padding: 0.75rem 1rem;
|
|
1641
|
+
border-bottom: 1px solid rgba(226, 232, 240, 0.8);
|
|
1642
|
+
background: var(--bg-secondary);
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
.notification-filter-tabs {
|
|
1646
|
+
display: flex;
|
|
1647
|
+
gap: 0.25rem;
|
|
1648
|
+
background: white;
|
|
1649
|
+
border-radius: 0.5rem;
|
|
1650
|
+
padding: 0.25rem;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
.notification-filter-tab {
|
|
1654
|
+
padding: 0.375rem 0.75rem;
|
|
1655
|
+
font-size: 0.75rem;
|
|
1656
|
+
font-weight: 500;
|
|
1657
|
+
color: var(--text-secondary);
|
|
1658
|
+
background: transparent;
|
|
1659
|
+
border: none;
|
|
1660
|
+
border-radius: 0.375rem;
|
|
1661
|
+
cursor: pointer;
|
|
1662
|
+
transition: all 0.2s ease;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
.notification-filter-tab:hover {
|
|
1666
|
+
background: var(--bg-secondary);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
.notification-filter-tab.active {
|
|
1670
|
+
background: var(--primary);
|
|
1671
|
+
color: white;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
.notification-grouping-dropdown {
|
|
1675
|
+
position: relative;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
.notification-grouping-btn {
|
|
1679
|
+
display: flex;
|
|
1680
|
+
align-items: center;
|
|
1681
|
+
gap: 0.375rem;
|
|
1682
|
+
padding: 0.375rem 0.625rem;
|
|
1683
|
+
font-size: 0.75rem;
|
|
1684
|
+
font-weight: 500;
|
|
1685
|
+
color: var(--text-secondary);
|
|
1686
|
+
background: white;
|
|
1687
|
+
border: 1px solid var(--border-color);
|
|
1688
|
+
border-radius: 0.375rem;
|
|
1689
|
+
cursor: pointer;
|
|
1690
|
+
transition: all 0.2s ease;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
.notification-grouping-btn:hover {
|
|
1694
|
+
border-color: var(--primary);
|
|
1695
|
+
color: var(--primary);
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
.notification-group-header {
|
|
1699
|
+
padding: 0.5rem 0.875rem;
|
|
1700
|
+
font-size: 0.75rem;
|
|
1701
|
+
font-weight: 600;
|
|
1702
|
+
color: var(--text-secondary);
|
|
1703
|
+
text-transform: uppercase;
|
|
1704
|
+
letter-spacing: 0.05em;
|
|
1705
|
+
background: var(--bg-secondary);
|
|
1706
|
+
border-bottom: 1px solid rgba(226, 232, 240, 0.8);
|
|
1707
|
+
margin-bottom: 0.25rem;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
.view-mode-toggle {
|
|
1711
|
+
display: flex;
|
|
1712
|
+
align-items: center;
|
|
1713
|
+
background: var(--bg-secondary);
|
|
1714
|
+
border: 1px solid var(--border-color);
|
|
1715
|
+
border-radius: 0.5rem;
|
|
1716
|
+
padding: 0.125rem;
|
|
1717
|
+
gap: 0.125rem;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
.view-mode-btn {
|
|
1721
|
+
display: flex;
|
|
1722
|
+
align-items: center;
|
|
1723
|
+
justify-content: center;
|
|
1724
|
+
padding: 0.25rem 0.5rem;
|
|
1725
|
+
border-radius: 0.375rem;
|
|
1726
|
+
cursor: pointer;
|
|
1727
|
+
transition: all 0.3s ease;
|
|
1728
|
+
color: var(--text-secondary);
|
|
1729
|
+
background: transparent;
|
|
1730
|
+
border: none;
|
|
1731
|
+
font-size: 0.75rem;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
.view-mode-btn.active {
|
|
1735
|
+
background: var(--accent-gradient);
|
|
1736
|
+
color: white;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
.theme-toggle {
|
|
1740
|
+
display: flex;
|
|
1741
|
+
align-items: center;
|
|
1742
|
+
gap: 0.5rem;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
.theme-switch {
|
|
1746
|
+
position: relative;
|
|
1747
|
+
width: 2.5rem;
|
|
1748
|
+
height: 1.25rem;
|
|
1749
|
+
background: var(--bg-secondary);
|
|
1750
|
+
border: 1px solid var(--border-color);
|
|
1751
|
+
border-radius: 0.625rem;
|
|
1752
|
+
cursor: pointer;
|
|
1753
|
+
transition: all 0.3s ease;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
.theme-switch.active {
|
|
1757
|
+
background: var(--accent-primary);
|
|
1758
|
+
border-color: var(--accent-primary);
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
.theme-switch-handle {
|
|
1762
|
+
position: absolute;
|
|
1763
|
+
top: 0.125rem;
|
|
1764
|
+
left: 0.125rem;
|
|
1765
|
+
width: 0.875rem;
|
|
1766
|
+
height: 0.875rem;
|
|
1767
|
+
background: white;
|
|
1768
|
+
border-radius: 50%;
|
|
1769
|
+
transition: all 0.3s ease;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
.theme-switch.active .theme-switch-handle {
|
|
1773
|
+
transform: translateX(1.125rem);
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
/* Compact Mode Styles */
|
|
1777
|
+
.sidebar-collapsed .nav-section-title,
|
|
1778
|
+
.sidebar-collapsed .nav-badge,
|
|
1779
|
+
.sidebar-collapsed .persona-role {
|
|
1780
|
+
display: none;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
.sidebar-collapsed .nav-link {
|
|
1784
|
+
justify-content: center;
|
|
1785
|
+
padding: 0.75rem;
|
|
1786
|
+
margin: 0.25rem 0.5rem;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
.sidebar-collapsed .nav-section-header {
|
|
1790
|
+
justify-content: center;
|
|
1791
|
+
padding: 0.75rem;
|
|
1792
|
+
margin: 0.25rem 0.5rem;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
.sidebar-collapsed .nav-chevron {
|
|
1796
|
+
display: none;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
.sidebar-collapsed .nav-section-content {
|
|
1800
|
+
display: none;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
/* Compact navigation specific styles */
|
|
1804
|
+
.compact-navigation {
|
|
1805
|
+
padding: 0.5rem 0;
|
|
1806
|
+
width: 100%;
|
|
1807
|
+
overflow: visible;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
.compact-nav-item {
|
|
1811
|
+
margin: 0.25rem 0.5rem;
|
|
1812
|
+
position: relative;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
.compact-nav-link {
|
|
1816
|
+
display: flex;
|
|
1817
|
+
align-items: center;
|
|
1818
|
+
justify-content: center;
|
|
1819
|
+
padding: 0.75rem;
|
|
1820
|
+
color: var(--text-secondary);
|
|
1821
|
+
text-decoration: none;
|
|
1822
|
+
border-radius: 0.75rem;
|
|
1823
|
+
transition: all 0.2s ease;
|
|
1824
|
+
font-size: 0.8rem;
|
|
1825
|
+
position: relative;
|
|
1826
|
+
min-height: 3rem;
|
|
1827
|
+
width: 100%;
|
|
1828
|
+
box-sizing: border-box;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
.compact-nav-link:hover,
|
|
1832
|
+
.compact-nav-link.active {
|
|
1833
|
+
background: var(--accent-gradient);
|
|
1834
|
+
color: white;
|
|
1835
|
+
box-shadow: var(--shadow);
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
.compact-nav-badge {
|
|
1839
|
+
position: absolute;
|
|
1840
|
+
top: 0.25rem;
|
|
1841
|
+
right: 0.25rem;
|
|
1842
|
+
background: var(--danger);
|
|
1843
|
+
color: white;
|
|
1844
|
+
font-size: 0.5rem;
|
|
1845
|
+
padding: 0.125rem 0.25rem;
|
|
1846
|
+
border-radius: 0.375rem;
|
|
1847
|
+
font-weight: 600;
|
|
1848
|
+
min-width: 1rem;
|
|
1849
|
+
text-align: center;
|
|
1850
|
+
line-height: 1;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
.section-tooltip {
|
|
1854
|
+
position: relative;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
.section-tooltip::after {
|
|
1858
|
+
content: attr(data-tooltip);
|
|
1859
|
+
position: absolute;
|
|
1860
|
+
left: calc(100% + 0.75rem);
|
|
1861
|
+
top: 50%;
|
|
1862
|
+
transform: translateY(-50%);
|
|
1863
|
+
background: var(--glass-bg);
|
|
1864
|
+
color: var(--text-primary);
|
|
1865
|
+
padding: 0.5rem 0.75rem;
|
|
1866
|
+
border-radius: 0.5rem;
|
|
1867
|
+
font-size: 0.75rem;
|
|
1868
|
+
white-space: nowrap;
|
|
1869
|
+
z-index: 1000;
|
|
1870
|
+
box-shadow: var(--shadow);
|
|
1871
|
+
backdrop-filter: blur(15px);
|
|
1872
|
+
border: 1px solid var(--border-color);
|
|
1873
|
+
opacity: 0;
|
|
1874
|
+
visibility: hidden;
|
|
1875
|
+
transition: all 0.2s ease;
|
|
1876
|
+
pointer-events: none;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
/* FIX: Only show tooltips after initialization */
|
|
1880
|
+
.enterprise-layout.initialized .section-tooltip:hover::after {
|
|
1881
|
+
opacity: 1;
|
|
1882
|
+
visibility: visible;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
/* Tablet responsive styles */
|
|
1886
|
+
@media (max-width: 1024px) and (min-width: 769px) {
|
|
1887
|
+
/* Reduce header info card padding on tablets */
|
|
1888
|
+
.header-info-card {
|
|
1889
|
+
padding: 0.3rem 0.6rem;
|
|
1890
|
+
gap: 0.4rem;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
.header-info-label {
|
|
1894
|
+
font-size: 0.5rem;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
.header-info-value {
|
|
1898
|
+
font-size: 0.75rem;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
.header-info-icon {
|
|
1902
|
+
width: 1rem;
|
|
1903
|
+
height: 1rem;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
.notification-bell {
|
|
1907
|
+
width: 2.25rem;
|
|
1908
|
+
height: 2.25rem;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
.logo-company {
|
|
1912
|
+
font-size: 1.1rem;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
.logo-tagline {
|
|
1916
|
+
font-size: 0.55rem;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
/* Mobile responsive styles */
|
|
1921
|
+
@media (max-width: 768px) {
|
|
1922
|
+
.mobile-overlay {
|
|
1923
|
+
position: fixed;
|
|
1924
|
+
top: var(--header-height);
|
|
1925
|
+
left: 0;
|
|
1926
|
+
right: 0;
|
|
1927
|
+
bottom: 0;
|
|
1928
|
+
background: rgba(0, 0, 0, 0.5);
|
|
1929
|
+
z-index: 1000;
|
|
1930
|
+
opacity: 0;
|
|
1931
|
+
visibility: hidden;
|
|
1932
|
+
transition: opacity 0.3s ease, visibility 0.3s ease;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
.mobile-overlay.visible {
|
|
1936
|
+
opacity: 1;
|
|
1937
|
+
visibility: visible;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
.layout-sidebar {
|
|
1941
|
+
position: absolute;
|
|
1942
|
+
top: var(--header-height);
|
|
1943
|
+
left: 0;
|
|
1944
|
+
height: calc(100% - var(--header-height));
|
|
1945
|
+
width: 85vw;
|
|
1946
|
+
max-width: var(--sidebar-width);
|
|
1947
|
+
transform: translateX(-100%);
|
|
1948
|
+
z-index: 1001;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
.layout-sidebar.mobile-open {
|
|
1952
|
+
transform: translateX(0);
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
.tab-bar {
|
|
1956
|
+
padding: 0;
|
|
1957
|
+
margin: 0;
|
|
1958
|
+
width: 100%;
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
/* Mobile tab overflow - show only 2 tabs + more button */
|
|
1962
|
+
.tab-bar-visible .tab {
|
|
1963
|
+
display: none;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
.tab-bar-visible .tab:nth-child(-n+2) {
|
|
1967
|
+
display: flex;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
.tab-more-btn {
|
|
1971
|
+
display: flex;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
.tab {
|
|
1975
|
+
min-width: 80px;
|
|
1976
|
+
max-width: 120px;
|
|
1977
|
+
padding: 0.25rem 0.5rem;
|
|
1978
|
+
margin: 0;
|
|
1979
|
+
font-size: 0.7rem;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
.single-page-header {
|
|
1983
|
+
padding: 0.375rem 0.75rem;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
.page-title {
|
|
1987
|
+
font-size: 1rem;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
.module-header {
|
|
1991
|
+
margin: 1rem;
|
|
1992
|
+
padding: 1rem;
|
|
1993
|
+
flex-direction: column;
|
|
1994
|
+
align-items: flex-start;
|
|
1995
|
+
gap: 0.75rem;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
.module-content {
|
|
1999
|
+
padding: 1rem;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
.footer-left,
|
|
2003
|
+
.footer-right {
|
|
2004
|
+
gap: 0.5rem;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
.footer-environment {
|
|
2008
|
+
font-size: 0.5rem;
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
.breadcrumb-container {
|
|
2012
|
+
display: none;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
.header-center {
|
|
2016
|
+
display: none;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
/* Hide Entity & FY info cards on mobile to make room for persona */
|
|
2020
|
+
.header-info-section {
|
|
2021
|
+
display: none;
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
/* Ensure header-right elements are properly spaced and visible */
|
|
2025
|
+
.header-right {
|
|
2026
|
+
gap: 0.5rem;
|
|
2027
|
+
flex-wrap: nowrap;
|
|
2028
|
+
flex-shrink: 0;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
/* Adjust notification bell size for mobile */
|
|
2032
|
+
.notification-bell {
|
|
2033
|
+
width: 2.25rem;
|
|
2034
|
+
height: 2.25rem;
|
|
2035
|
+
flex-shrink: 0;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
/* Ensure persona-control is always visible on mobile */
|
|
2039
|
+
.persona-control {
|
|
2040
|
+
display: flex !important;
|
|
2041
|
+
flex-shrink: 0;
|
|
2042
|
+
z-index: 1001;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
/* Make notification panel full width on mobile */
|
|
2046
|
+
.notification-panel {
|
|
2047
|
+
position: fixed;
|
|
2048
|
+
left: 50%;
|
|
2049
|
+
right: auto;
|
|
2050
|
+
transform: translateX(-50%);
|
|
2051
|
+
width: calc(100vw - 2rem);
|
|
2052
|
+
max-width: 380px;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
.notification-panel.open {
|
|
2056
|
+
transform: translateX(-50%) translateY(0);
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
/* Adjust persona panel for mobile - fixed position for better visibility */
|
|
2060
|
+
.persona-panel {
|
|
2061
|
+
position: fixed;
|
|
2062
|
+
top: var(--header-height);
|
|
2063
|
+
right: 0.5rem;
|
|
2064
|
+
left: auto;
|
|
2065
|
+
width: calc(100vw - 1rem);
|
|
2066
|
+
max-width: 300px;
|
|
2067
|
+
margin-top: 0.25rem;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
/* Make logo smaller on mobile */
|
|
2071
|
+
.logo-company {
|
|
2072
|
+
font-size: 1rem;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
.logo-tagline {
|
|
2076
|
+
font-size: 0.5rem;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
.persona-role {
|
|
2080
|
+
display: none;
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
/* Extra small mobile (phones) */
|
|
2085
|
+
@media (max-width: 480px) {
|
|
2086
|
+
.layout-header {
|
|
2087
|
+
padding: 0 0.5rem;
|
|
2088
|
+
height: 3rem;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
.header-left {
|
|
2092
|
+
gap: 0.5rem;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
.menu-toggle {
|
|
2096
|
+
width: 2rem;
|
|
2097
|
+
height: 2rem;
|
|
2098
|
+
padding: 0.25rem;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
.logo-company {
|
|
2102
|
+
font-size: 0.875rem;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
.logo-tagline {
|
|
2106
|
+
display: none;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
.notification-bell {
|
|
2110
|
+
width: 2rem;
|
|
2111
|
+
height: 2rem;
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
.notification-panel {
|
|
2115
|
+
width: calc(100vw - 1rem);
|
|
2116
|
+
max-width: 100%;
|
|
2117
|
+
right: -0.25rem;
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
.notification-filter-tab {
|
|
2121
|
+
padding: 0.25rem 0.5rem;
|
|
2122
|
+
font-size: 0.65rem;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
.notification-grouping-btn {
|
|
2126
|
+
font-size: 0.65rem;
|
|
2127
|
+
padding: 0.25rem 0.5rem;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
.tab {
|
|
2131
|
+
min-width: 60px;
|
|
2132
|
+
max-width: 100px;
|
|
2133
|
+
padding: 0.25rem 0.375rem;
|
|
2134
|
+
font-size: 0.65rem;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
.module-header {
|
|
2138
|
+
margin: 0.75rem;
|
|
2139
|
+
padding: 0.75rem;
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
.module-content {
|
|
2143
|
+
padding: 0.75rem;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
.header-right {
|
|
2147
|
+
gap: 0.375rem;
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
/* Smaller persona avatar on extra small screens */
|
|
2151
|
+
.persona-avatar {
|
|
2152
|
+
width: 1.75rem;
|
|
2153
|
+
height: 1.75rem;
|
|
2154
|
+
font-size: 0.65rem;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
`;
|
|
2158
|
+
}, [config.branding.colors, config.layout, footerVisible]);
|
|
2159
|
+
// Apply theme and styles
|
|
2160
|
+
useEffect(() => {
|
|
2161
|
+
const styleId = "enterprise-layout-styles";
|
|
2162
|
+
const existingStyle = document.getElementById(styleId);
|
|
2163
|
+
if (existingStyle) {
|
|
2164
|
+
existingStyle.remove();
|
|
2165
|
+
}
|
|
2166
|
+
const style = document.createElement("style");
|
|
2167
|
+
style.id = styleId;
|
|
2168
|
+
style.textContent = dynamicStyles;
|
|
2169
|
+
document.head.appendChild(style);
|
|
2170
|
+
return () => {
|
|
2171
|
+
const style = document.getElementById(styleId);
|
|
2172
|
+
if (style) {
|
|
2173
|
+
style.remove();
|
|
2174
|
+
}
|
|
2175
|
+
};
|
|
2176
|
+
}, [dynamicStyles]);
|
|
2177
|
+
// Helper function to find which section contains the active tab (moved before useEffect)
|
|
2178
|
+
const findActiveSectionName = useCallback((activeTabId) => {
|
|
2179
|
+
for (const section of dynamicNavigation) {
|
|
2180
|
+
if (section.items.some((item) => item.id === activeTabId)) {
|
|
2181
|
+
return section.section;
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
return null;
|
|
2185
|
+
}, [dynamicNavigation]);
|
|
2186
|
+
useEffect(() => {
|
|
2187
|
+
document.documentElement.setAttribute("data-theme", darkMode ? "dark" : "light");
|
|
2188
|
+
if (onThemeChange) {
|
|
2189
|
+
onThemeChange(darkMode ? "dark" : "light");
|
|
2190
|
+
}
|
|
2191
|
+
}, [darkMode, onThemeChange]);
|
|
2192
|
+
// Responsive handling
|
|
2193
|
+
useEffect(() => {
|
|
2194
|
+
const checkMobile = () => {
|
|
2195
|
+
setIsMobile(window.innerWidth <= 768);
|
|
2196
|
+
};
|
|
2197
|
+
checkMobile();
|
|
2198
|
+
window.addEventListener("resize", checkMobile);
|
|
2199
|
+
return () => window.removeEventListener("resize", checkMobile);
|
|
2200
|
+
}, []);
|
|
2201
|
+
// Update breadcrumbs when active tab changes
|
|
2202
|
+
useEffect(() => {
|
|
2203
|
+
if (activeTab === "overview") {
|
|
2204
|
+
setBreadcrumbs(["Dashboard", "Overview"]);
|
|
2205
|
+
}
|
|
2206
|
+
else {
|
|
2207
|
+
const moduleConfig = dynamicModules[activeTab];
|
|
2208
|
+
if (moduleConfig && moduleConfig.breadcrumb) {
|
|
2209
|
+
setBreadcrumbs(moduleConfig.breadcrumb);
|
|
2210
|
+
}
|
|
2211
|
+
else {
|
|
2212
|
+
setBreadcrumbs([
|
|
2213
|
+
"Dashboard",
|
|
2214
|
+
activeTab
|
|
2215
|
+
.replace("-", " ")
|
|
2216
|
+
.replace(/\b\w/g, (l) => l.toUpperCase()),
|
|
2217
|
+
]);
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
}, [activeTab, dynamicModules]);
|
|
2221
|
+
useEffect(() => {
|
|
2222
|
+
if (autoCollapseEnabled && !isMobile && activeTab !== "overview") {
|
|
2223
|
+
setSidebarCollapsed(true);
|
|
2224
|
+
const activeSectionName = findActiveSectionName(activeTab);
|
|
2225
|
+
if (activeSectionName) {
|
|
2226
|
+
setExpandedSections(new Set([activeSectionName]));
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
}, [activeTab, autoCollapseEnabled, isMobile, findActiveSectionName]);
|
|
2230
|
+
// NEW: Helper function to recursively find if an item has active children
|
|
2231
|
+
const hasActiveChild = useCallback((item, activeTabId) => {
|
|
2232
|
+
if (item.id === activeTabId)
|
|
2233
|
+
return true;
|
|
2234
|
+
if (item.children) {
|
|
2235
|
+
return item.children.some((child) => hasActiveChild(child, activeTabId));
|
|
2236
|
+
}
|
|
2237
|
+
return false;
|
|
2238
|
+
}, []);
|
|
2239
|
+
// Helper function to get items to display in compact mode
|
|
2240
|
+
const getCompactModeItems = useCallback((strategy) => {
|
|
2241
|
+
switch (strategy) {
|
|
2242
|
+
case "sections-only":
|
|
2243
|
+
return dynamicNavigation.map((section) => ({
|
|
2244
|
+
id: `section-${section.section}`,
|
|
2245
|
+
title: section.section,
|
|
2246
|
+
icon: section.icon || "folder",
|
|
2247
|
+
isSection: true,
|
|
2248
|
+
section: section.section,
|
|
2249
|
+
items: section.items,
|
|
2250
|
+
sectionName: section.section,
|
|
2251
|
+
badge: section.items
|
|
2252
|
+
.reduce((sum, item) => {
|
|
2253
|
+
const badgeNum = item.badge
|
|
2254
|
+
? parseInt(item.badge) || 0
|
|
2255
|
+
: 0;
|
|
2256
|
+
return sum + badgeNum;
|
|
2257
|
+
}, 0)
|
|
2258
|
+
.toString() || undefined,
|
|
2259
|
+
}));
|
|
2260
|
+
case "all-items":
|
|
2261
|
+
return dynamicNavigation.flatMap((section) => section.items.map((item) => {
|
|
2262
|
+
const compactItem = {
|
|
2263
|
+
...item,
|
|
2264
|
+
sectionName: section.section || "default-section",
|
|
2265
|
+
children: item.children
|
|
2266
|
+
? item.children.map((child) => ({
|
|
2267
|
+
...child,
|
|
2268
|
+
sectionName: section.section || "default-section",
|
|
2269
|
+
}))
|
|
2270
|
+
: undefined,
|
|
2271
|
+
};
|
|
2272
|
+
return compactItem;
|
|
2273
|
+
}));
|
|
2274
|
+
case "smart-grouping":
|
|
2275
|
+
default:
|
|
2276
|
+
const maxItemsBeforeGrouping = 3;
|
|
2277
|
+
return dynamicNavigation.flatMap((section) => {
|
|
2278
|
+
if (section.items.length > maxItemsBeforeGrouping) {
|
|
2279
|
+
return [
|
|
2280
|
+
{
|
|
2281
|
+
id: `section-${section.section}`,
|
|
2282
|
+
title: section.section,
|
|
2283
|
+
icon: section.icon || "folder",
|
|
2284
|
+
isSection: true,
|
|
2285
|
+
section: section.section,
|
|
2286
|
+
items: section.items,
|
|
2287
|
+
sectionName: section.section || "default-section",
|
|
2288
|
+
badge: section.items
|
|
2289
|
+
.reduce((sum, item) => {
|
|
2290
|
+
const badgeNum = item.badge
|
|
2291
|
+
? parseInt(item.badge) || 0
|
|
2292
|
+
: 0;
|
|
2293
|
+
return sum + badgeNum;
|
|
2294
|
+
}, 0)
|
|
2295
|
+
.toString() || undefined,
|
|
2296
|
+
},
|
|
2297
|
+
];
|
|
2298
|
+
}
|
|
2299
|
+
else {
|
|
2300
|
+
return section.items.map((item) => ({
|
|
2301
|
+
...item,
|
|
2302
|
+
sectionName: section.section || "default-section",
|
|
2303
|
+
children: item.children
|
|
2304
|
+
? item.children.map((child) => ({
|
|
2305
|
+
...child,
|
|
2306
|
+
sectionName: section.section || "default-section",
|
|
2307
|
+
}))
|
|
2308
|
+
: undefined,
|
|
2309
|
+
}));
|
|
2310
|
+
}
|
|
2311
|
+
});
|
|
2312
|
+
}
|
|
2313
|
+
}, [dynamicNavigation, config.layout.compactModeStrategy]);
|
|
2314
|
+
// Permission checking helper
|
|
2315
|
+
const hasPermission = useCallback((permission) => {
|
|
2316
|
+
return (dynamicUser.permissions.includes(permission) ||
|
|
2317
|
+
dynamicUser.permissions.includes("admin") ||
|
|
2318
|
+
dynamicUser.permissions.includes("write"));
|
|
2319
|
+
}, [dynamicUser.permissions]);
|
|
2320
|
+
// NEW: Helper function to toggle sub-item expansion
|
|
2321
|
+
const toggleSubItem = useCallback((itemId) => {
|
|
2322
|
+
setExpandedSubItems((prev) => {
|
|
2323
|
+
const newSet = new Set(prev);
|
|
2324
|
+
if (newSet.has(itemId)) {
|
|
2325
|
+
newSet.delete(itemId);
|
|
2326
|
+
}
|
|
2327
|
+
else {
|
|
2328
|
+
newSet.add(itemId);
|
|
2329
|
+
}
|
|
2330
|
+
return newSet;
|
|
2331
|
+
});
|
|
2332
|
+
}, []);
|
|
2333
|
+
// Calculate how many compact items can fit in screen height
|
|
2334
|
+
const [visibleCompactItems, setVisibleCompactItems] = useState(10);
|
|
2335
|
+
useEffect(() => {
|
|
2336
|
+
const calculateVisibleItems = () => {
|
|
2337
|
+
const headerHeight = 48;
|
|
2338
|
+
const footerHeight = footerVisible ? 32 : 0;
|
|
2339
|
+
const availableHeight = window.innerHeight - headerHeight - footerHeight;
|
|
2340
|
+
const sidebarPadding = 16;
|
|
2341
|
+
const itemHeight = 56;
|
|
2342
|
+
const maxItems = Math.floor((availableHeight - sidebarPadding) / itemHeight);
|
|
2343
|
+
setVisibleCompactItems(Math.max(3, maxItems));
|
|
2344
|
+
};
|
|
2345
|
+
calculateVisibleItems();
|
|
2346
|
+
window.addEventListener("resize", calculateVisibleItems);
|
|
2347
|
+
return () => window.removeEventListener("resize", calculateVisibleItems);
|
|
2348
|
+
}, [footerVisible]);
|
|
2349
|
+
// Module navigation
|
|
2350
|
+
const handleModuleSelect = useCallback((moduleId) => {
|
|
2351
|
+
if (autoCollapseEnabled && !isMobile && moduleId !== "overview") {
|
|
2352
|
+
setSidebarCollapsed(true);
|
|
2353
|
+
const activeSectionName = findActiveSectionName(moduleId);
|
|
2354
|
+
if (activeSectionName) {
|
|
2355
|
+
setExpandedSections(new Set([activeSectionName]));
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
startTransition(() => {
|
|
2359
|
+
if (tabModeEnabled) {
|
|
2360
|
+
if (!openTabs.has(moduleId)) {
|
|
2361
|
+
const moduleConfig = dynamicModules[moduleId] || {
|
|
2362
|
+
title: moduleId
|
|
2363
|
+
.replace("-", " ")
|
|
2364
|
+
.replace(/\b\w/g, (l) => l.toUpperCase()),
|
|
2365
|
+
description: `${moduleId.replace("-", " ")} module`,
|
|
2366
|
+
component: null,
|
|
2367
|
+
actions: ["View Details", "Configure"],
|
|
2368
|
+
permissions: [],
|
|
2369
|
+
breadcrumb: [],
|
|
2370
|
+
};
|
|
2371
|
+
const title = moduleId === "overview" ? "Overview" : moduleConfig.title;
|
|
2372
|
+
setOpenTabs((prev) => new Map(prev).set(moduleId, { title, config: moduleConfig }));
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
else {
|
|
2376
|
+
if (!openTabs.has(moduleId)) {
|
|
2377
|
+
const moduleConfig = dynamicModules[moduleId] || {
|
|
2378
|
+
title: moduleId
|
|
2379
|
+
.replace("-", " ")
|
|
2380
|
+
.replace(/\b\w/g, (l) => l.toUpperCase()),
|
|
2381
|
+
description: `${moduleId.replace("-", " ")} module`,
|
|
2382
|
+
component: null,
|
|
2383
|
+
actions: ["View Details", "Configure"],
|
|
2384
|
+
permissions: [],
|
|
2385
|
+
breadcrumb: [],
|
|
2386
|
+
};
|
|
2387
|
+
const title = moduleId === "overview" ? "Overview" : moduleConfig.title;
|
|
2388
|
+
setOpenTabs((prev) => new Map(prev).set(moduleId, { title, config: moduleConfig }));
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
setActiveTab(moduleId);
|
|
2392
|
+
});
|
|
2393
|
+
if (isMobile) {
|
|
2394
|
+
setMobileMenuOpen(false);
|
|
2395
|
+
}
|
|
2396
|
+
if (onModuleChange) {
|
|
2397
|
+
onModuleChange(moduleId, dynamicModules[moduleId]);
|
|
2398
|
+
}
|
|
2399
|
+
}, [
|
|
2400
|
+
openTabs,
|
|
2401
|
+
isMobile,
|
|
2402
|
+
tabModeEnabled,
|
|
2403
|
+
startTransition,
|
|
2404
|
+
onModuleChange,
|
|
2405
|
+
dynamicModules,
|
|
2406
|
+
autoCollapseEnabled,
|
|
2407
|
+
findActiveSectionName,
|
|
2408
|
+
]);
|
|
2409
|
+
// Handle tab close
|
|
2410
|
+
const handleTabClose = useCallback((moduleId) => {
|
|
2411
|
+
if (moduleId === "overview")
|
|
2412
|
+
return;
|
|
2413
|
+
setOpenTabs((prev) => {
|
|
2414
|
+
const newTabs = new Map(prev);
|
|
2415
|
+
newTabs.delete(moduleId);
|
|
2416
|
+
return newTabs;
|
|
2417
|
+
});
|
|
2418
|
+
if (activeTab === moduleId) {
|
|
2419
|
+
const availableTabs = Array.from(openTabs.keys()).filter((id) => id !== moduleId);
|
|
2420
|
+
const newActiveTab = availableTabs.includes("overview")
|
|
2421
|
+
? "overview"
|
|
2422
|
+
: availableTabs[0];
|
|
2423
|
+
if (newActiveTab) {
|
|
2424
|
+
setActiveTab(newActiveTab);
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
}, [activeTab, openTabs]);
|
|
2428
|
+
// Handle back to overview in single page mode
|
|
2429
|
+
const handleBackToOverview = () => {
|
|
2430
|
+
setActiveTab("overview");
|
|
2431
|
+
};
|
|
2432
|
+
const toggleSection = (sectionName) => {
|
|
2433
|
+
setExpandedSections((prev) => {
|
|
2434
|
+
const newSet = new Set(prev);
|
|
2435
|
+
if (newSet.has(sectionName)) {
|
|
2436
|
+
newSet.delete(sectionName);
|
|
2437
|
+
}
|
|
2438
|
+
else {
|
|
2439
|
+
newSet.add(sectionName);
|
|
2440
|
+
}
|
|
2441
|
+
return newSet;
|
|
2442
|
+
});
|
|
2443
|
+
};
|
|
2444
|
+
// Handle section click in compact mode
|
|
2445
|
+
const handleSectionClick = useCallback((section) => {
|
|
2446
|
+
if (section.items.length === 1) {
|
|
2447
|
+
handleModuleSelect(section.items[0].id);
|
|
2448
|
+
}
|
|
2449
|
+
else {
|
|
2450
|
+
handleModuleSelect(section.items[0].id);
|
|
2451
|
+
}
|
|
2452
|
+
}, [handleModuleSelect]);
|
|
2453
|
+
const toggleTheme = () => {
|
|
2454
|
+
startTransition(() => {
|
|
2455
|
+
setDarkMode((prev) => !prev);
|
|
2456
|
+
});
|
|
2457
|
+
};
|
|
2458
|
+
const toggleFooter = () => {
|
|
2459
|
+
setFooterVisible((prev) => !prev);
|
|
2460
|
+
};
|
|
2461
|
+
const toggleAutoCollapse = () => {
|
|
2462
|
+
setAutoCollapseEnabled((prev) => !prev);
|
|
2463
|
+
};
|
|
2464
|
+
// Persona panel handlers
|
|
2465
|
+
const handleChangePassword = () => {
|
|
2466
|
+
setPersonaPanelOpen(false);
|
|
2467
|
+
if (config.hooks.onChangePassword) {
|
|
2468
|
+
config.hooks.onChangePassword();
|
|
2469
|
+
}
|
|
2470
|
+
else {
|
|
2471
|
+
// Open the change password modal
|
|
2472
|
+
setChangePasswordModalOpen(true);
|
|
2473
|
+
}
|
|
2474
|
+
};
|
|
2475
|
+
// Handle change password submission
|
|
2476
|
+
const handleChangePasswordSubmit = async (data) => {
|
|
2477
|
+
setIsChangingPassword(true);
|
|
2478
|
+
try {
|
|
2479
|
+
// TODO: Replace with actual API call
|
|
2480
|
+
// await authService.changePassword(data);
|
|
2481
|
+
// Simulate API call
|
|
2482
|
+
await new Promise((resolve) => setTimeout(resolve, 1500));
|
|
2483
|
+
// Show success notification
|
|
2484
|
+
notificationService.success('Password Changed', 'Your password has been changed successfully.');
|
|
2485
|
+
setChangePasswordModalOpen(false);
|
|
2486
|
+
}
|
|
2487
|
+
catch (error) {
|
|
2488
|
+
// Show error notification
|
|
2489
|
+
notificationService.error('Password Change Failed', error?.message || 'Failed to change password. Please try again.');
|
|
2490
|
+
throw error; // Re-throw to let the modal handle it
|
|
2491
|
+
}
|
|
2492
|
+
finally {
|
|
2493
|
+
setIsChangingPassword(false);
|
|
2494
|
+
}
|
|
2495
|
+
};
|
|
2496
|
+
const handleLogout = () => {
|
|
2497
|
+
console.log("Logout button clicked");
|
|
2498
|
+
try {
|
|
2499
|
+
setPersonaPanelOpen(false);
|
|
2500
|
+
if (config.hooks.onLogout) {
|
|
2501
|
+
console.log("Calling custom logout hook");
|
|
2502
|
+
config.hooks.onLogout();
|
|
2503
|
+
}
|
|
2504
|
+
else {
|
|
2505
|
+
console.log("No custom logout hook, using default");
|
|
2506
|
+
const confirmLogout = window.confirm("Are you sure you want to logout?");
|
|
2507
|
+
if (confirmLogout) {
|
|
2508
|
+
console.log("User confirmed logout");
|
|
2509
|
+
// Clear any stored session data
|
|
2510
|
+
localStorage.removeItem('authToken');
|
|
2511
|
+
localStorage.removeItem('userData');
|
|
2512
|
+
sessionStorage.clear();
|
|
2513
|
+
// Show logout confirmation
|
|
2514
|
+
alert("You have been logged out successfully!");
|
|
2515
|
+
// Redirect to login page after alert is dismissed
|
|
2516
|
+
console.log("Redirecting to login page...");
|
|
2517
|
+
setTimeout(() => {
|
|
2518
|
+
// Redirect to root path (login page)
|
|
2519
|
+
window.location.href = '/';
|
|
2520
|
+
}, 100); // Small delay to ensure alert is dismissed
|
|
2521
|
+
}
|
|
2522
|
+
else {
|
|
2523
|
+
console.log("User cancelled logout");
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
catch (error) {
|
|
2528
|
+
console.error("Error during logout:", error);
|
|
2529
|
+
alert("An error occurred during logout. Please try again.");
|
|
2530
|
+
}
|
|
2531
|
+
};
|
|
2532
|
+
// Environment class helper
|
|
2533
|
+
const getEnvironmentClass = (env) => {
|
|
2534
|
+
const envLower = env.toLowerCase();
|
|
2535
|
+
switch (envLower) {
|
|
2536
|
+
case "development":
|
|
2537
|
+
return "env-development";
|
|
2538
|
+
case "staging":
|
|
2539
|
+
return "env-staging";
|
|
2540
|
+
case "production":
|
|
2541
|
+
return "env-production";
|
|
2542
|
+
case "uat":
|
|
2543
|
+
return "env-uat";
|
|
2544
|
+
default:
|
|
2545
|
+
return "env-development";
|
|
2546
|
+
}
|
|
2547
|
+
};
|
|
2548
|
+
// NEW: Recursive function to render navigation items with multi-level support
|
|
2549
|
+
const renderNavigationItem = useCallback((item, level = 0) => {
|
|
2550
|
+
const hasChildren = item.children && item.children.length > 0;
|
|
2551
|
+
const isExpanded = expandedSubItems.has(item.id);
|
|
2552
|
+
const isActive = hasActiveChild(item, activeTab);
|
|
2553
|
+
const isDirectlyActive = activeTab === item.id;
|
|
2554
|
+
if (hasChildren) {
|
|
2555
|
+
return (_jsxs("li", { className: `nav-item nav-item-with-children`, children: [_jsxs("a", { href: "#", className: `nav-link ${isDirectlyActive ? "active" : ""}`, onClick: (e) => {
|
|
2556
|
+
e.preventDefault();
|
|
2557
|
+
toggleSubItem(item.id);
|
|
2558
|
+
}, title: sidebarCollapsed ? item.title : undefined, children: [IconSystem[item.icon] && IconSystem[item.icon](), !sidebarCollapsed && (_jsxs(_Fragment, { children: [item.title, item.badge && (_jsx("span", { className: "nav-badge", children: item.badge })), _jsx("div", { className: `nav-item-expand ${isExpanded ? "expanded" : ""}`, children: _jsx(IconSystem.chevronRight, {}) })] }))] }), !sidebarCollapsed && item.children && (_jsx("ul", { className: `nav-sub-menu ${isExpanded ? "expanded" : "collapsed"}`, style: {
|
|
2559
|
+
maxHeight: isExpanded ? "300px" : "0",
|
|
2560
|
+
overflow: "hidden",
|
|
2561
|
+
transition: "all 0.3s ease",
|
|
2562
|
+
opacity: isExpanded ? 1 : 0,
|
|
2563
|
+
}, children: item.children.map((child) => renderNavigationItem(child, level + 1)) }))] }, item.id));
|
|
2564
|
+
}
|
|
2565
|
+
else {
|
|
2566
|
+
return (_jsx("li", { className: level > 0 ? "nav-sub-item" : "nav-item", children: _jsxs("a", { href: "#", className: level > 0
|
|
2567
|
+
? `nav-sub-link ${isDirectlyActive ? "active" : ""}`
|
|
2568
|
+
: `nav-link ${isDirectlyActive ? "active" : ""}`, onClick: (e) => {
|
|
2569
|
+
e.preventDefault();
|
|
2570
|
+
if (item.onClick) {
|
|
2571
|
+
item.onClick();
|
|
2572
|
+
}
|
|
2573
|
+
else {
|
|
2574
|
+
handleModuleSelect(item.id);
|
|
2575
|
+
}
|
|
2576
|
+
}, title: sidebarCollapsed ? item.title : undefined, children: [IconSystem[item.icon] && IconSystem[item.icon](), !sidebarCollapsed && (_jsxs(_Fragment, { children: [item.title, item.badge && (_jsx("span", { className: "nav-badge", children: item.badge }))] }))] }) }, item.id));
|
|
2577
|
+
}
|
|
2578
|
+
}, [
|
|
2579
|
+
activeTab,
|
|
2580
|
+
sidebarCollapsed,
|
|
2581
|
+
expandedSubItems,
|
|
2582
|
+
toggleSubItem,
|
|
2583
|
+
handleModuleSelect,
|
|
2584
|
+
hasActiveChild,
|
|
2585
|
+
IconSystem,
|
|
2586
|
+
]);
|
|
2587
|
+
// Breadcrumb component
|
|
2588
|
+
const BreadcrumbComponent = () => {
|
|
2589
|
+
if (!config.layout.showBreadcrumbs || isMobile)
|
|
2590
|
+
return null;
|
|
2591
|
+
return (_jsx("div", { className: "breadcrumb-container", children: _jsx("nav", { className: "breadcrumb", "aria-label": "Breadcrumb", children: breadcrumbs.map((crumb, index) => (_jsx("div", { className: "breadcrumb-item", children: index < breadcrumbs.length - 1 ? (_jsxs(_Fragment, { children: [_jsx("a", { href: "#", className: "breadcrumb-link", onClick: (e) => e.preventDefault(), children: crumb }), _jsx("span", { className: "breadcrumb-separator", children: _jsx(IconSystem.breadcrumbSeparator, {}) })] })) : (_jsx("span", { className: "breadcrumb-current", children: crumb })) }, index))) }) }));
|
|
2592
|
+
};
|
|
2593
|
+
// Logo component
|
|
2594
|
+
const LogoComponent = () => {
|
|
2595
|
+
const { logo } = config.branding;
|
|
2596
|
+
return (_jsxs("div", { className: "app-logo", children: [logo?.src && (_jsx("img", { src: logo.src, alt: logo.alt || `${dynamicAppTitle} Logo`, className: "logo-image", style: {
|
|
2597
|
+
width: logo.width || "28px",
|
|
2598
|
+
height: logo.height || "28px",
|
|
2599
|
+
}, onError: (e) => {
|
|
2600
|
+
e.target.style.display = "none";
|
|
2601
|
+
} })), logo?.showText !== false && _jsx("span", { children: dynamicAppTitle })] }));
|
|
2602
|
+
};
|
|
2603
|
+
const HeaderInfoCard = ({ label, value, icon, color, options, isOpen, onToggle, onSelect }) => {
|
|
2604
|
+
const isSelectable = options && options.length > 0;
|
|
2605
|
+
return (_jsxs("div", { className: `header-info-card header-info-card-${color} ${isSelectable ? 'selectable' : ''}`, onClick: isSelectable ? onToggle : undefined, children: [icon && _jsx("div", { className: "header-info-icon", children: icon }), _jsxs("div", { className: "header-info-content", children: [_jsx("span", { className: "header-info-label", children: label }), _jsx("span", { className: "header-info-value", children: value })] }), isSelectable && (_jsxs(_Fragment, { children: [_jsx("div", { className: "header-info-chevron", children: _jsx(IconSystem.chevronDown, {}) }), isOpen && (_jsx("div", { className: `header-info-dropdown header-info-dropdown-${color}`, children: options.map((option) => (_jsxs("div", { className: `header-info-dropdown-item ${option === value ? 'active' : ''}`, onClick: (e) => {
|
|
2606
|
+
e.stopPropagation();
|
|
2607
|
+
onSelect?.(option);
|
|
2608
|
+
onToggle?.();
|
|
2609
|
+
}, children: [option, option === value && (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: _jsx("polyline", { points: "20 6 9 17 4 12" }) }))] }, option))) }))] }))] }));
|
|
2610
|
+
};
|
|
2611
|
+
// Persona Control Component
|
|
2612
|
+
const PersonaControlComponent = () => {
|
|
2613
|
+
return (_jsxs("div", { className: "persona-control", onClick: () => setPersonaPanelOpen(!personaPanelOpen), children: [_jsx("div", { className: "persona-avatar", children: dynamicUser.avatar }), !isMobile && _jsx("div", { className: "persona-role", children: dynamicUser.role }), _jsx(IconSystem.chevronDown, {}), isInitialized && (_jsxs("div", { className: `persona-panel ${personaPanelOpen ? "open" : ""}`, children: [_jsxs("div", { className: "persona-panel-header", children: [_jsx("div", { className: "persona-panel-avatar", children: dynamicUser.avatar }), _jsxs("div", { className: "persona-panel-info", children: [_jsx("h3", { children: dynamicUser.name }), _jsx("p", { children: dynamicUser.role })] })] }), _jsxs("div", { className: "persona-panel-section", children: [_jsx("h4", { children: "Display Options" }), _jsxs("div", { className: "persona-panel-controls", children: [_jsxs("div", { className: "persona-control-item", children: [_jsxs("div", { className: "persona-control-label", children: [_jsx(IconSystem.tabs, {}), "View Mode"] }), _jsxs("div", { className: "view-mode-toggle", children: [_jsx("button", { className: `view-mode-btn ${tabModeEnabled ? "active" : ""}`, onClick: (e) => {
|
|
2614
|
+
e.stopPropagation();
|
|
2615
|
+
startTransition(() => setTabModeEnabled(true));
|
|
2616
|
+
}, children: "Tabs" }), _jsx("button", { className: `view-mode-btn ${!tabModeEnabled ? "active" : ""}`, onClick: (e) => {
|
|
2617
|
+
e.stopPropagation();
|
|
2618
|
+
startTransition(() => setTabModeEnabled(false));
|
|
2619
|
+
}, children: "Single" })] })] }), _jsxs("div", { className: "persona-control-item", children: [_jsxs("div", { className: "persona-control-label", children: [_jsx(IconSystem.settings, {}), "Dark Mode--3"] }), _jsx("div", { className: `theme-switch ${darkMode ? "active" : ""}`, onClick: (e) => {
|
|
2620
|
+
e.stopPropagation();
|
|
2621
|
+
toggleTheme();
|
|
2622
|
+
}, children: _jsx("div", { className: "theme-switch-handle" }) })] }), _jsxs("div", { className: "persona-control-item", children: [_jsxs("div", { className: "persona-control-label", children: [_jsx(IconSystem.footer, {}), "Show Footer"] }), _jsx("div", { className: `theme-switch ${footerVisible ? "active" : ""}`, onClick: (e) => {
|
|
2623
|
+
e.stopPropagation();
|
|
2624
|
+
toggleFooter();
|
|
2625
|
+
}, children: _jsx("div", { className: "theme-switch-handle" }) })] }), _jsxs("div", { className: "persona-control-item", children: [_jsxs("div", { className: "persona-control-label", children: [_jsx(IconSystem.collapse, {}), "Auto Collapse Sidebar"] }), _jsx("div", { className: `theme-switch ${autoCollapseEnabled ? "active" : ""}`, onClick: (e) => {
|
|
2626
|
+
e.stopPropagation();
|
|
2627
|
+
toggleAutoCollapse();
|
|
2628
|
+
}, children: _jsx("div", { className: "theme-switch-handle" }) })] })] })] }), _jsxs("div", { className: "persona-panel-section", children: [_jsx("h4", { children: "Account" }), _jsxs("div", { className: "persona-panel-controls", children: [_jsx("div", { className: "persona-control-item action", onClick: (e) => {
|
|
2629
|
+
e.stopPropagation();
|
|
2630
|
+
handleChangePassword();
|
|
2631
|
+
}, children: _jsxs("div", { className: "persona-control-label", children: [_jsx(IconSystem.lock, {}), "Change Password"] }) }), _jsx("div", { className: "persona-control-item action danger", onClick: (e) => {
|
|
2632
|
+
e.stopPropagation();
|
|
2633
|
+
handleLogout();
|
|
2634
|
+
}, children: _jsxs("div", { className: "persona-control-label", children: [_jsx(IconSystem.logout, {}), "Logout"] }) })] })] })] }))] }));
|
|
2635
|
+
};
|
|
2636
|
+
// Click outside handler for persona panel
|
|
2637
|
+
useEffect(() => {
|
|
2638
|
+
const handleClickOutside = (event) => {
|
|
2639
|
+
const target = event.target;
|
|
2640
|
+
if (personaPanelOpen && !target.closest(".persona-control")) {
|
|
2641
|
+
setPersonaPanelOpen(false);
|
|
2642
|
+
}
|
|
2643
|
+
};
|
|
2644
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
2645
|
+
return () => {
|
|
2646
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
2647
|
+
};
|
|
2648
|
+
}, [personaPanelOpen]);
|
|
2649
|
+
// Click outside handler for notification panel
|
|
2650
|
+
useEffect(() => {
|
|
2651
|
+
const handleClickOutside = (event) => {
|
|
2652
|
+
const target = event.target;
|
|
2653
|
+
if (notificationPanelOpen && !target.closest(".notification-bell") && !target.closest(".notification-panel")) {
|
|
2654
|
+
setNotificationPanelOpen(false);
|
|
2655
|
+
}
|
|
2656
|
+
};
|
|
2657
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
2658
|
+
return () => {
|
|
2659
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
2660
|
+
};
|
|
2661
|
+
}, [notificationPanelOpen]);
|
|
2662
|
+
// Click outside handler for tab overflow menu
|
|
2663
|
+
useEffect(() => {
|
|
2664
|
+
const handleClickOutside = (event) => {
|
|
2665
|
+
const target = event.target;
|
|
2666
|
+
if (tabOverflowMenuOpen && !target.closest(".tab-more-container")) {
|
|
2667
|
+
setTabOverflowMenuOpen(false);
|
|
2668
|
+
}
|
|
2669
|
+
};
|
|
2670
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
2671
|
+
return () => {
|
|
2672
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
2673
|
+
};
|
|
2674
|
+
}, [tabOverflowMenuOpen]);
|
|
2675
|
+
// Click outside handler for header info dropdowns
|
|
2676
|
+
useEffect(() => {
|
|
2677
|
+
const handleClickOutside = (event) => {
|
|
2678
|
+
const target = event.target;
|
|
2679
|
+
if (!target.closest(".header-info-card")) {
|
|
2680
|
+
setEntityDropdownOpen(false);
|
|
2681
|
+
setFyDropdownOpen(false);
|
|
2682
|
+
}
|
|
2683
|
+
};
|
|
2684
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
2685
|
+
return () => {
|
|
2686
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
2687
|
+
};
|
|
2688
|
+
}, []);
|
|
2689
|
+
return (_jsxs("div", { className: `enterprise-layout ${isInitialized ? "initialized" : ""}`, id: `enterprise-app-${componentId}`, children: [_jsxs("header", { className: "layout-header", children: [_jsxs("div", { className: "header-left", children: [_jsx("button", { className: "menu-toggle", onClick: () => isMobile
|
|
2690
|
+
? setMobileMenuOpen(!mobileMenuOpen)
|
|
2691
|
+
: setSidebarCollapsed(!sidebarCollapsed), children: _jsx(IconSystem.menu, {}) }), _jsx(LogoComponent, {}), _jsx(BreadcrumbComponent, {})] }), _jsx("div", { className: "header-center" }), _jsxs("div", { className: "header-right", children: [_jsxs("div", { className: "header-info-section", children: [_jsx(HeaderInfoCard, { label: "Entity & BU", value: `${currentEntity} - ${currentBusinessUnit}`, color: "blue", options: availableEntities, isOpen: entityDropdownOpen, onToggle: () => {
|
|
2692
|
+
setEntityDropdownOpen(!entityDropdownOpen);
|
|
2693
|
+
setFyDropdownOpen(false);
|
|
2694
|
+
}, onSelect: (value) => setCurrentEntity(value), icon: _jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("rect", { x: "4", y: "2", width: "16", height: "20", rx: "2" }), _jsx("line", { x1: "9", y1: "6", x2: "9", y2: "6" }), _jsx("line", { x1: "15", y1: "6", x2: "15", y2: "6" }), _jsx("line", { x1: "9", y1: "10", x2: "9", y2: "10" }), _jsx("line", { x1: "15", y1: "10", x2: "15", y2: "10" }), _jsx("line", { x1: "9", y1: "14", x2: "9", y2: "14" }), _jsx("line", { x1: "15", y1: "14", x2: "15", y2: "14" }), _jsx("line", { x1: "9", y1: "18", x2: "9", y2: "18" }), _jsx("line", { x1: "15", y1: "18", x2: "15", y2: "18" })] }) }), _jsx(HeaderInfoCard, { label: "Financial Year", value: financialYear, color: "green", options: availableFinancialYears, isOpen: fyDropdownOpen, onToggle: () => {
|
|
2695
|
+
setFyDropdownOpen(!fyDropdownOpen);
|
|
2696
|
+
setEntityDropdownOpen(false);
|
|
2697
|
+
}, onSelect: (value) => setFinancialYear(value), icon: _jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), _jsx("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), _jsx("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), _jsx("line", { x1: "3", y1: "10", x2: "21", y2: "10" })] }) })] }), _jsxs("div", { style: { position: "relative" }, children: [_jsxs("div", { className: "notification-bell", onClick: () => {
|
|
2698
|
+
setNotificationPanelOpen(!notificationPanelOpen);
|
|
2699
|
+
setPersonaPanelOpen(false);
|
|
2700
|
+
setEntityDropdownOpen(false);
|
|
2701
|
+
setFyDropdownOpen(false);
|
|
2702
|
+
}, children: [_jsx(IconSystem.notification, {}), notifications.filter(n => !n.read).length > 0 && (_jsx("div", { className: "notification-badge", children: notifications.filter(n => !n.read).length }))] }), isInitialized && (_jsxs("div", { className: `notification-panel ${notificationPanelOpen ? "open" : ""}`, children: [_jsxs("div", { className: "notification-panel-header", children: [_jsx("div", { className: "notification-panel-title", children: "Notifications" }), _jsx("div", { className: "notification-panel-actions", children: _jsx("button", { className: "notification-action-btn", onClick: (e) => {
|
|
2703
|
+
e.stopPropagation();
|
|
2704
|
+
setNotifications(notifications.map(n => ({ ...n, read: true })));
|
|
2705
|
+
}, children: "Mark all read" }) })] }), _jsxs("div", { className: "notification-filters", children: [_jsxs("div", { className: "notification-filter-tabs", children: [_jsx("button", { className: `notification-filter-tab ${notificationFilter === 'all' ? 'active' : ''}`, onClick: () => setNotificationFilter('all'), children: "All" }), _jsx("button", { className: `notification-filter-tab ${notificationFilter === 'unread' ? 'active' : ''}`, onClick: () => setNotificationFilter('unread'), children: "Unread" }), _jsx("button", { className: `notification-filter-tab ${notificationFilter === 'read' ? 'active' : ''}`, onClick: () => setNotificationFilter('read'), children: "Read" })] }), _jsxs("select", { className: "notification-grouping-btn", value: notificationGrouping, onChange: (e) => setNotificationGrouping(e.target.value), children: [_jsx("option", { value: "none", children: "No Grouping" }), _jsx("option", { value: "type", children: "Group by Type" }), _jsx("option", { value: "time", children: "Group by Time" })] })] }), _jsx("div", { className: "notification-panel-content", children: (() => {
|
|
2706
|
+
// Filter notifications based on selected filter
|
|
2707
|
+
const filteredNotifications = notifications.filter(n => {
|
|
2708
|
+
if (notificationFilter === 'unread')
|
|
2709
|
+
return !n.read;
|
|
2710
|
+
if (notificationFilter === 'read')
|
|
2711
|
+
return n.read;
|
|
2712
|
+
return true;
|
|
2713
|
+
});
|
|
2714
|
+
if (filteredNotifications.length === 0) {
|
|
2715
|
+
return (_jsxs("div", { className: "notification-empty", children: [_jsx("div", { className: "notification-empty-icon", children: "\uD83D\uDD14" }), _jsx("div", { children: "No notifications found" })] }));
|
|
2716
|
+
}
|
|
2717
|
+
// Group notifications if grouping is enabled
|
|
2718
|
+
if (notificationGrouping === 'type') {
|
|
2719
|
+
const groupedByType = {};
|
|
2720
|
+
filteredNotifications.forEach(n => {
|
|
2721
|
+
if (!groupedByType[n.type])
|
|
2722
|
+
groupedByType[n.type] = [];
|
|
2723
|
+
groupedByType[n.type].push(n);
|
|
2724
|
+
});
|
|
2725
|
+
return Object.entries(groupedByType).map(([type, items]) => (_jsxs(React.Fragment, { children: [_jsxs("div", { className: "notification-group-header", children: [type.charAt(0).toUpperCase() + type.slice(1), " (", items.length, ")"] }), items.map((notification) => (_jsxs("div", { className: `notification-item ${!notification.read ? 'unread' : ''}`, onClick: (e) => {
|
|
2726
|
+
e.stopPropagation();
|
|
2727
|
+
setNotifications(notifications.map(n => n.id === notification.id ? { ...n, read: true } : n));
|
|
2728
|
+
}, children: [_jsxs("div", { className: `notification-icon ${notification.type}`, children: [notification.type === 'success' && '✓', notification.type === 'info' && 'ℹ', notification.type === 'warning' && '⚠', notification.type === 'error' && '✕'] }), _jsxs("div", { className: "notification-content", children: [_jsx("div", { className: "notification-title", children: notification.title }), _jsx("div", { className: "notification-message", children: notification.message }), _jsx("div", { className: "notification-time", children: notification.time })] })] }, notification.id)))] }, type)));
|
|
2729
|
+
}
|
|
2730
|
+
else if (notificationGrouping === 'time') {
|
|
2731
|
+
const groupedByTime = {
|
|
2732
|
+
'Recent': [],
|
|
2733
|
+
'Earlier Today': [],
|
|
2734
|
+
'Older': []
|
|
2735
|
+
};
|
|
2736
|
+
filteredNotifications.forEach(n => {
|
|
2737
|
+
if (n.time.includes('min') || n.time.includes('hour')) {
|
|
2738
|
+
groupedByTime['Recent'].push(n);
|
|
2739
|
+
}
|
|
2740
|
+
else if (n.time.includes('today')) {
|
|
2741
|
+
groupedByTime['Earlier Today'].push(n);
|
|
2742
|
+
}
|
|
2743
|
+
else {
|
|
2744
|
+
groupedByTime['Older'].push(n);
|
|
2745
|
+
}
|
|
2746
|
+
});
|
|
2747
|
+
return Object.entries(groupedByTime)
|
|
2748
|
+
.filter(([_, items]) => items.length > 0)
|
|
2749
|
+
.map(([time, items]) => (_jsxs(React.Fragment, { children: [_jsxs("div", { className: "notification-group-header", children: [time, " (", items.length, ")"] }), items.map((notification) => (_jsxs("div", { className: `notification-item ${!notification.read ? 'unread' : ''}`, onClick: (e) => {
|
|
2750
|
+
e.stopPropagation();
|
|
2751
|
+
setNotifications(notifications.map(n => n.id === notification.id ? { ...n, read: true } : n));
|
|
2752
|
+
}, children: [_jsxs("div", { className: `notification-icon ${notification.type}`, children: [notification.type === 'success' && '✓', notification.type === 'info' && 'ℹ', notification.type === 'warning' && '⚠', notification.type === 'error' && '✕'] }), _jsxs("div", { className: "notification-content", children: [_jsx("div", { className: "notification-title", children: notification.title }), _jsx("div", { className: "notification-message", children: notification.message }), _jsx("div", { className: "notification-time", children: notification.time })] })] }, notification.id)))] }, time)));
|
|
2753
|
+
}
|
|
2754
|
+
else {
|
|
2755
|
+
// No grouping - show flat list
|
|
2756
|
+
return filteredNotifications.map((notification) => (_jsxs("div", { className: `notification-item ${!notification.read ? 'unread' : ''}`, onClick: (e) => {
|
|
2757
|
+
e.stopPropagation();
|
|
2758
|
+
setNotifications(notifications.map(n => n.id === notification.id ? { ...n, read: true } : n));
|
|
2759
|
+
}, children: [_jsxs("div", { className: `notification-icon ${notification.type}`, children: [notification.type === 'success' && '✓', notification.type === 'info' && 'ℹ', notification.type === 'warning' && '⚠', notification.type === 'error' && '✕'] }), _jsxs("div", { className: "notification-content", children: [_jsx("div", { className: "notification-title", children: notification.title }), _jsx("div", { className: "notification-message", children: notification.message }), _jsx("div", { className: "notification-time", children: notification.time })] })] }, notification.id)));
|
|
2760
|
+
}
|
|
2761
|
+
})() })] }))] }), _jsx(PersonaControlComponent, {})] })] }), isMobile && mobileMenuOpen && (_jsx("div", { className: "mobile-overlay visible", onClick: () => setMobileMenuOpen(false) })), _jsxs("div", { className: `layout-body ${!footerVisible ? "footer-hidden" : ""}`, children: [_jsx("aside", { className: `layout-sidebar ${sidebarCollapsed ? "collapsed" : ""} ${isMobile && !mobileMenuOpen ? "mobile-hidden" : ""} ${mobileMenuOpen ? "mobile-open" : ""}`, children: sidebarCollapsed ? (
|
|
2762
|
+
// Compact mode with smart grouping
|
|
2763
|
+
_jsxs("div", { className: "compact-navigation", children: [getCompactModeItems(config.layout.compactModeStrategy)
|
|
2764
|
+
.slice(0, visibleCompactItems)
|
|
2765
|
+
.map((item, index) => (_jsx("div", { className: "compact-nav-item", children: _jsxs("a", { href: "#", className: `compact-nav-link section-tooltip ${item.isSection
|
|
2766
|
+
? item.items?.some((subItem) => subItem.id === activeTab)
|
|
2767
|
+
? "active"
|
|
2768
|
+
: ""
|
|
2769
|
+
: activeTab === item.id
|
|
2770
|
+
? "active"
|
|
2771
|
+
: ""}`, onClick: (e) => {
|
|
2772
|
+
e.preventDefault();
|
|
2773
|
+
if (item.isSection) {
|
|
2774
|
+
handleSectionClick(item);
|
|
2775
|
+
}
|
|
2776
|
+
else {
|
|
2777
|
+
handleModuleSelect(item.id);
|
|
2778
|
+
}
|
|
2779
|
+
}, "data-tooltip": item.title, children: [IconSystem[item.icon] && IconSystem[item.icon](), item.badge && (_jsx("span", { className: "compact-nav-badge", children: item.badge }))] }) }, item.id || index))), getCompactModeItems(config.layout.compactModeStrategy).length >
|
|
2780
|
+
visibleCompactItems && (_jsx("div", { className: "compact-nav-item", children: _jsxs("div", { className: "compact-nav-link section-tooltip", "data-tooltip": `+${getCompactModeItems(config.layout.compactModeStrategy)
|
|
2781
|
+
.length - visibleCompactItems} more items`, style: {
|
|
2782
|
+
opacity: 0.6,
|
|
2783
|
+
cursor: "default",
|
|
2784
|
+
fontSize: "0.75rem",
|
|
2785
|
+
fontWeight: 600,
|
|
2786
|
+
}, children: ["+", getCompactModeItems(config.layout.compactModeStrategy)
|
|
2787
|
+
.length - visibleCompactItems] }) }))] })) : (
|
|
2788
|
+
// Regular expanded navigation with multi-level support
|
|
2789
|
+
dynamicNavigation.map((section, sectionIndex) => {
|
|
2790
|
+
const isExpanded = expandedSections.has(section.section);
|
|
2791
|
+
return (_jsxs("div", { className: "nav-section", children: [_jsx("div", { className: `nav-section-header ${isExpanded ? "expanded" : "collapsed"}`, onClick: () => !sidebarCollapsed && toggleSection(section.section), style: { cursor: sidebarCollapsed ? "default" : "pointer" }, children: !sidebarCollapsed && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "nav-section-title", style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [section.icon && IconSystem[section.icon] && (_jsx("span", { style: { display: "flex", alignItems: "center", color: "var(--text-secondary)", fontSize: "0.875rem" }, children: IconSystem[section.icon]() })), _jsxs("span", { children: [section.section, _jsxs("span", { style: {
|
|
2792
|
+
marginLeft: "0.5rem",
|
|
2793
|
+
fontSize: "0.6rem",
|
|
2794
|
+
color: "var(--text-muted)",
|
|
2795
|
+
fontWeight: "400",
|
|
2796
|
+
}, children: ["(", section.items.length, ")"] })] })] }), _jsx("div", { className: "nav-chevron", children: isExpanded ? (_jsx(IconSystem.chevronDown, {})) : (_jsx(IconSystem.chevronRight, {})) })] })) }), _jsx("div", { className: `nav-section-content ${isExpanded || sidebarCollapsed ? "expanded" : "collapsed"}`, children: _jsx("ul", { className: "nav-menu", children: section.items.map((item) => renderNavigationItem(item)) }) })] }, sectionIndex));
|
|
2797
|
+
})) }), _jsx("main", { className: "layout-main", children: _jsxs("div", { className: "content-wrapper", children: [tabModeEnabled ? (_jsxs("div", { className: "tab-bar-wrapper", children: [_jsx("div", { className: "tab-bar-visible", children: Array.from(openTabs.entries()).map(([moduleId, tabData]) => (_jsxs("div", { className: `tab ${activeTab === moduleId ? "active" : ""}`, onClick: () => setActiveTab(moduleId), children: [_jsx("span", { className: "tab-title", children: tabData.title }), moduleId !== "overview" && (_jsx("button", { className: "tab-close", onClick: (e) => {
|
|
2798
|
+
e.stopPropagation();
|
|
2799
|
+
handleTabClose(moduleId);
|
|
2800
|
+
}, children: "\u00D7" }))] }, moduleId))) }), openTabs.size > 2 && (_jsxs("div", { className: "tab-more-container", children: [_jsxs("button", { className: `tab-more-btn ${tabOverflowMenuOpen ? "active" : ""}`, onClick: () => setTabOverflowMenuOpen(!tabOverflowMenuOpen), children: [_jsx("span", { children: "More" }), _jsxs("span", { children: ["(", openTabs.size - 2, ")"] }), _jsx(IconSystem.chevronDown, {})] }), _jsx("div", { className: `tab-overflow-menu ${tabOverflowMenuOpen ? "open" : ""}`, children: Array.from(openTabs.entries())
|
|
2801
|
+
.slice(2)
|
|
2802
|
+
.map(([moduleId, tabData]) => (_jsxs("div", { className: `tab-overflow-item ${activeTab === moduleId ? "active" : ""}`, onClick: () => {
|
|
2803
|
+
setActiveTab(moduleId);
|
|
2804
|
+
setTabOverflowMenuOpen(false);
|
|
2805
|
+
}, children: [_jsx("span", { className: "tab-overflow-item-title", children: tabData.title }), moduleId !== "overview" && (_jsx("button", { className: "tab-overflow-item-close", onClick: (e) => {
|
|
2806
|
+
e.stopPropagation();
|
|
2807
|
+
handleTabClose(moduleId);
|
|
2808
|
+
}, children: "\u00D7" }))] }, moduleId))) })] }))] })) : (activeTab !== "overview" && (_jsxs("div", { className: "single-page-header", children: [_jsx("div", { className: "page-title", children: openTabs.get(activeTab)?.title || "Unknown Module" }), _jsxs("button", { className: "back-button", onClick: handleBackToOverview, children: [_jsx(IconSystem.arrowLeft, {}), "Back to Overview"] })] }))), _jsx("div", { className: "tab-content-area", children: Array.from(openTabs.entries()).map(([moduleId, tabData]) => (_jsx("div", { className: `enterprise-module ${activeTab === moduleId ? "active" : ""}`, children: activeTab === moduleId && (_jsx(_Fragment, { children: moduleId === "overview" ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "module-header", children: [_jsxs("div", { className: "module-header-content", children: [_jsxs("h1", { className: "module-title", children: ["Welcome to ", dynamicAppTitle] }), _jsx("p", { className: "module-description", children: "Enhanced Enterprise Management System with Multi-level Navigation Support" })] }), _jsxs("div", { className: "module-actions", children: [_jsxs("button", { className: "btn btn-primary", children: [_jsx(IconSystem.plus, {}), "Get Started"] }), _jsxs("button", { className: "btn btn-secondary", children: [_jsx(IconSystem.file, {}), "Documentation"] })] })] }), _jsx("div", { className: "module-content", children: _jsx("div", { style: { padding: "0.75rem 0 0 0", width: "100%" }, children: dynamicNavigation
|
|
2809
|
+
.filter(section => section.section !== "Dashboard")
|
|
2810
|
+
.map((section) => {
|
|
2811
|
+
const filteredItems = section.items.filter(item => item.id !== "overview");
|
|
2812
|
+
if (filteredItems.length === 0)
|
|
2813
|
+
return null;
|
|
2814
|
+
const isExpanded = expandedOverviewSections.has(section.section);
|
|
2815
|
+
return (_jsxs("div", { style: {
|
|
2816
|
+
marginBottom: "1rem",
|
|
2817
|
+
background: "var(--glass-bg)",
|
|
2818
|
+
borderRadius: "1rem",
|
|
2819
|
+
border: "1px solid var(--border-color)",
|
|
2820
|
+
overflow: "hidden",
|
|
2821
|
+
width: "100%",
|
|
2822
|
+
boxSizing: "border-box"
|
|
2823
|
+
}, children: [_jsxs("div", { onClick: () => {
|
|
2824
|
+
setExpandedOverviewSections(prev => {
|
|
2825
|
+
const newSet = new Set(prev);
|
|
2826
|
+
if (newSet.has(section.section)) {
|
|
2827
|
+
newSet.delete(section.section);
|
|
2828
|
+
}
|
|
2829
|
+
else {
|
|
2830
|
+
newSet.add(section.section);
|
|
2831
|
+
}
|
|
2832
|
+
return newSet;
|
|
2833
|
+
});
|
|
2834
|
+
}, style: {
|
|
2835
|
+
padding: "1rem 1.25rem",
|
|
2836
|
+
cursor: "pointer",
|
|
2837
|
+
display: "flex",
|
|
2838
|
+
alignItems: "center",
|
|
2839
|
+
justifyContent: "space-between",
|
|
2840
|
+
background: "linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.6) 100%)",
|
|
2841
|
+
borderBottom: isExpanded ? "1px solid var(--border-color)" : "none",
|
|
2842
|
+
transition: "all 0.2s ease"
|
|
2843
|
+
}, onMouseEnter: (e) => {
|
|
2844
|
+
e.currentTarget.style.background = "linear-gradient(135deg, rgba(224, 235, 247, 1) 0%, rgba(203, 213, 225, 0.9) 100%)";
|
|
2845
|
+
}, onMouseLeave: (e) => {
|
|
2846
|
+
e.currentTarget.style.background = "linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.6) 100%)";
|
|
2847
|
+
}, children: [_jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [_jsx("h2", { style: {
|
|
2848
|
+
fontSize: "1.1rem",
|
|
2849
|
+
fontWeight: 600,
|
|
2850
|
+
color: "var(--text-primary)",
|
|
2851
|
+
margin: 0
|
|
2852
|
+
}, children: section.section }), _jsx("span", { style: {
|
|
2853
|
+
fontSize: "0.8rem",
|
|
2854
|
+
color: "var(--text-secondary)",
|
|
2855
|
+
background: "var(--accent-color-10, rgba(59, 130, 246, 0.1))",
|
|
2856
|
+
padding: "0.2rem 0.6rem",
|
|
2857
|
+
borderRadius: "0.5rem",
|
|
2858
|
+
fontWeight: 500
|
|
2859
|
+
}, children: filteredItems.length })] }), _jsx("div", { style: {
|
|
2860
|
+
transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
2861
|
+
transition: "transform 0.3s ease",
|
|
2862
|
+
display: "flex",
|
|
2863
|
+
alignItems: "center",
|
|
2864
|
+
color: "var(--text-secondary)"
|
|
2865
|
+
}, children: _jsx(IconSystem.chevronDown, {}) })] }), isExpanded && (_jsx("div", { style: {
|
|
2866
|
+
padding: "1.25rem",
|
|
2867
|
+
display: "grid",
|
|
2868
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
|
|
2869
|
+
gap: "1rem",
|
|
2870
|
+
animation: "slideDown 0.3s ease",
|
|
2871
|
+
width: "100%",
|
|
2872
|
+
boxSizing: "border-box"
|
|
2873
|
+
}, children: filteredItems.map((item) => (_jsxs("div", { onClick: () => handleModuleSelect(item.id), style: {
|
|
2874
|
+
background: "var(--bg-secondary, rgba(255,255,255,0.02))",
|
|
2875
|
+
backdropFilter: "blur(15px)",
|
|
2876
|
+
border: "1px solid var(--border-color)",
|
|
2877
|
+
borderRadius: "1rem",
|
|
2878
|
+
padding: "1.25rem",
|
|
2879
|
+
transition: "all 0.3s ease",
|
|
2880
|
+
cursor: "pointer"
|
|
2881
|
+
}, onMouseEnter: (e) => {
|
|
2882
|
+
e.currentTarget.style.transform = "translateY(-4px)";
|
|
2883
|
+
e.currentTarget.style.boxShadow = "0 8px 16px rgba(0,0,0,0.1)";
|
|
2884
|
+
e.currentTarget.style.borderColor = "var(--accent-color)";
|
|
2885
|
+
}, onMouseLeave: (e) => {
|
|
2886
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
2887
|
+
e.currentTarget.style.boxShadow = "none";
|
|
2888
|
+
e.currentTarget.style.borderColor = "var(--border-color)";
|
|
2889
|
+
}, children: [_jsx("div", { style: {
|
|
2890
|
+
width: "2.5rem",
|
|
2891
|
+
height: "2.5rem",
|
|
2892
|
+
background: "var(--accent-gradient)",
|
|
2893
|
+
borderRadius: "0.75rem",
|
|
2894
|
+
display: "flex",
|
|
2895
|
+
alignItems: "center",
|
|
2896
|
+
justifyContent: "center",
|
|
2897
|
+
color: "white",
|
|
2898
|
+
marginBottom: "0.75rem",
|
|
2899
|
+
}, children: IconSystem[item.icon] && IconSystem[item.icon]() }), _jsx("h3", { style: {
|
|
2900
|
+
fontSize: "1rem",
|
|
2901
|
+
fontWeight: 600,
|
|
2902
|
+
marginBottom: "0.375rem",
|
|
2903
|
+
color: "var(--text-primary)",
|
|
2904
|
+
}, children: item.title }), _jsxs("p", { style: {
|
|
2905
|
+
fontSize: "0.8rem",
|
|
2906
|
+
color: "var(--text-secondary)",
|
|
2907
|
+
lineHeight: 1.5,
|
|
2908
|
+
margin: 0
|
|
2909
|
+
}, children: ["Click to open ", item.title.toLowerCase(), " module"] })] }, item.id))) }))] }, section.section));
|
|
2910
|
+
}) }) })] })) : (_jsxs(_Fragment, { children: [tabData.config?.showHeader && (_jsx("div", { className: "module-header", children: _jsxs("div", { className: "module-header-content", children: [_jsx("h1", { className: "module-title", children: tabData.config?.title || tabData.title }), _jsx("p", { className: "module-description", children: tabData.config?.description ||
|
|
2911
|
+
`${tabData.title} module for managing and monitoring operations` })] }) })), tabData.config?.component ? (React.createElement(tabData.config?.component)) : (_jsxs("div", { className: "module-content", style: { padding: "2rem", textAlign: "center" }, children: [_jsx("div", { style: {
|
|
2912
|
+
width: "4rem",
|
|
2913
|
+
height: "4rem",
|
|
2914
|
+
background: "var(--accent-gradient)",
|
|
2915
|
+
borderRadius: "1rem",
|
|
2916
|
+
display: "flex",
|
|
2917
|
+
alignItems: "center",
|
|
2918
|
+
justifyContent: "center",
|
|
2919
|
+
color: "white",
|
|
2920
|
+
margin: "0 auto 1.5rem",
|
|
2921
|
+
fontSize: "1.5rem"
|
|
2922
|
+
}, children: IconSystem.folder && IconSystem.folder() }), _jsx("h2", { style: {
|
|
2923
|
+
fontSize: "1.5rem",
|
|
2924
|
+
fontWeight: 600,
|
|
2925
|
+
color: "var(--text-primary)",
|
|
2926
|
+
marginBottom: "0.5rem"
|
|
2927
|
+
}, children: tabData.title }), _jsx("p", { style: {
|
|
2928
|
+
color: "var(--text-secondary)",
|
|
2929
|
+
maxWidth: "400px",
|
|
2930
|
+
margin: "0 auto"
|
|
2931
|
+
}, children: "This module is available. Configure the component in your module settings." })] }))] })) })) }, moduleId))) })] }) })] }), config.layout.enableFooter && (_jsxs("footer", { className: `layout-footer ${!footerVisible ? "hidden" : ""}`, children: [_jsxs("div", { className: "footer-left", children: [_jsx("div", { className: `footer-environment ${getEnvironmentClass(config.footer.environment)}`, children: config.footer.environment }), _jsx("span", { children: config.footer.appVersion }), _jsx("span", { children: config.footer.copyright })] }), _jsx("div", { className: "footer-right", children: _jsx("a", { href: config.footer.supportLink, className: "footer-support", children: config.footer.supportText }) })] })), _jsx(ChangePasswordModal, { isOpen: changePasswordModalOpen, onClose: () => setChangePasswordModalOpen(false), onSubmit: handleChangePasswordSubmit, username: config.user.name, isLoading: isChangingPassword })] }));
|
|
2932
|
+
};
|
|
2933
|
+
export default EnterpriseLayout;
|