adminator-admin-dashboard 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +403 -0
- package/README.md +113 -68
- package/dist/main.js +2368 -1492
- package/dist/main.js.map +1 -1
- package/package.json +15 -4
- package/src/assets/scripts/app.js +8 -7
- package/src/assets/scripts/app.ts +757 -0
- package/src/assets/scripts/components/Chart.ts +1350 -0
- package/src/assets/scripts/components/Sidebar.ts +388 -0
- package/src/assets/scripts/datatable/index.ts +707 -0
- package/src/assets/scripts/datepicker/index.ts +699 -0
- package/src/assets/scripts/ui/index.ts +740 -0
- package/src/assets/scripts/utils/date.ts +363 -0
- package/src/assets/scripts/utils/dom.ts +513 -0
- package/src/assets/scripts/utils/theme.ts +313 -0
- package/src/assets/scripts/vectorMaps/index.ts +542 -0
- package/src/types/index.ts +236 -0
- package/RELEASE_NOTES.md +0 -92
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core type definitions for Adminator Dashboard
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Theme types
|
|
6
|
+
export type Theme = 'light' | 'dark' | 'auto';
|
|
7
|
+
|
|
8
|
+
export interface ThemeConfig {
|
|
9
|
+
theme: Theme;
|
|
10
|
+
autoDetect: boolean;
|
|
11
|
+
persistChoice: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Component types
|
|
15
|
+
export interface ComponentOptions {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ComponentInterface {
|
|
20
|
+
name: string;
|
|
21
|
+
element: HTMLElement;
|
|
22
|
+
options: ComponentOptions;
|
|
23
|
+
isInitialized: boolean;
|
|
24
|
+
init(): void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Sidebar types
|
|
29
|
+
export interface SidebarOptions {
|
|
30
|
+
breakpoint?: number;
|
|
31
|
+
collapsible?: boolean;
|
|
32
|
+
autoHide?: boolean;
|
|
33
|
+
animation?: boolean;
|
|
34
|
+
animationDuration?: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface SidebarState {
|
|
38
|
+
isCollapsed: boolean;
|
|
39
|
+
isMobile: boolean;
|
|
40
|
+
activeMenu: string | null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Chart types
|
|
44
|
+
export type ChartType = 'line' | 'bar' | 'doughnut' | 'pie' | 'radar' | 'scatter' | 'bubble' | 'polarArea';
|
|
45
|
+
|
|
46
|
+
export interface ChartDataset {
|
|
47
|
+
label?: string;
|
|
48
|
+
data: number[];
|
|
49
|
+
backgroundColor?: string | string[];
|
|
50
|
+
borderColor?: string | string[];
|
|
51
|
+
borderWidth?: number;
|
|
52
|
+
fill?: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ChartData {
|
|
56
|
+
labels: string[];
|
|
57
|
+
datasets: ChartDataset[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ChartOptions {
|
|
61
|
+
type: ChartType;
|
|
62
|
+
data: ChartData;
|
|
63
|
+
responsive?: boolean;
|
|
64
|
+
maintainAspectRatio?: boolean;
|
|
65
|
+
plugins?: any;
|
|
66
|
+
scales?: any;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// DataTable types
|
|
70
|
+
export interface DataTableColumn {
|
|
71
|
+
key: string;
|
|
72
|
+
title: string;
|
|
73
|
+
sortable?: boolean;
|
|
74
|
+
searchable?: boolean;
|
|
75
|
+
render?: (value: any, row: any) => string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface DataTableOptions {
|
|
79
|
+
columns: DataTableColumn[];
|
|
80
|
+
data: any[];
|
|
81
|
+
pageSize?: number;
|
|
82
|
+
sortable?: boolean;
|
|
83
|
+
searchable?: boolean;
|
|
84
|
+
pagination?: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface DataTableState {
|
|
88
|
+
currentPage: number;
|
|
89
|
+
pageSize: number;
|
|
90
|
+
totalRows: number;
|
|
91
|
+
sortColumn: string | null;
|
|
92
|
+
sortDirection: 'asc' | 'desc';
|
|
93
|
+
searchQuery: string;
|
|
94
|
+
filteredData: any[];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Date utilities types
|
|
98
|
+
export interface DateRange {
|
|
99
|
+
start: Date;
|
|
100
|
+
end: Date;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface DateFormatOptions {
|
|
104
|
+
locale?: string;
|
|
105
|
+
format?: string;
|
|
106
|
+
timeZone?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// DOM utilities types
|
|
110
|
+
export type DOMEventHandler = (event: Event) => void;
|
|
111
|
+
|
|
112
|
+
export interface DOMUtilities {
|
|
113
|
+
select: (selector: string, context?: Element | Document) => HTMLElement | null;
|
|
114
|
+
selectAll: (selector: string, context?: Element | Document) => HTMLElement[];
|
|
115
|
+
on: (element: Element | Window | Document, event: string, handler: DOMEventHandler) => void;
|
|
116
|
+
off: (element: Element | Window | Document, event: string, handler: DOMEventHandler) => void;
|
|
117
|
+
addClass: (element: Element, className: string) => void;
|
|
118
|
+
removeClass: (element: Element, className: string) => void;
|
|
119
|
+
toggleClass: (element: Element, className: string) => void;
|
|
120
|
+
hasClass: (element: Element, className: string) => boolean;
|
|
121
|
+
attr: (element: Element, attribute: string, value?: string) => string | void;
|
|
122
|
+
data: (element: Element, key: string, value?: any) => any;
|
|
123
|
+
ready: (callback: () => void) => void;
|
|
124
|
+
exists: (selector: string, context?: Element | Document) => boolean;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Application state types
|
|
128
|
+
export interface ApplicationState {
|
|
129
|
+
theme: Theme;
|
|
130
|
+
sidebar: SidebarState;
|
|
131
|
+
components: Map<string, ComponentInterface>;
|
|
132
|
+
isInitialized: boolean;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface ApplicationConfig {
|
|
136
|
+
theme: ThemeConfig;
|
|
137
|
+
sidebar: SidebarOptions;
|
|
138
|
+
enableAnalytics?: boolean;
|
|
139
|
+
debugMode?: boolean;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Event types
|
|
143
|
+
export interface CustomEventDetail {
|
|
144
|
+
[key: string]: any;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface ThemeChangeEvent extends CustomEvent {
|
|
148
|
+
detail: {
|
|
149
|
+
theme: Theme;
|
|
150
|
+
previousTheme: Theme;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface ComponentEvent extends CustomEvent {
|
|
155
|
+
detail: {
|
|
156
|
+
component: string;
|
|
157
|
+
action: 'init' | 'destroy' | 'update';
|
|
158
|
+
data?: any;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Utility types
|
|
163
|
+
export type DeepPartial<T> = {
|
|
164
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export type RequiredKeys<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
168
|
+
|
|
169
|
+
export type OptionalKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
170
|
+
|
|
171
|
+
// Color types
|
|
172
|
+
export interface ColorPalette {
|
|
173
|
+
primary: string;
|
|
174
|
+
secondary: string;
|
|
175
|
+
success: string;
|
|
176
|
+
danger: string;
|
|
177
|
+
warning: string;
|
|
178
|
+
info: string;
|
|
179
|
+
light: string;
|
|
180
|
+
dark: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface ThemeColors {
|
|
184
|
+
light: ColorPalette;
|
|
185
|
+
dark: ColorPalette;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Animation types
|
|
189
|
+
export type AnimationEasing = 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
|
|
190
|
+
|
|
191
|
+
export interface AnimationOptions {
|
|
192
|
+
duration?: number;
|
|
193
|
+
easing?: AnimationEasing;
|
|
194
|
+
delay?: number;
|
|
195
|
+
fillMode?: 'none' | 'forwards' | 'backwards' | 'both';
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Layout types
|
|
199
|
+
export interface LayoutBreakpoints {
|
|
200
|
+
xs: number;
|
|
201
|
+
sm: number;
|
|
202
|
+
md: number;
|
|
203
|
+
lg: number;
|
|
204
|
+
xl: number;
|
|
205
|
+
xxl: number;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface ResponsiveConfig {
|
|
209
|
+
breakpoints: LayoutBreakpoints;
|
|
210
|
+
mobileFirst: boolean;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Error types
|
|
214
|
+
export class AdminatorError extends Error {
|
|
215
|
+
constructor(
|
|
216
|
+
message: string,
|
|
217
|
+
public component?: string,
|
|
218
|
+
public code?: string
|
|
219
|
+
) {
|
|
220
|
+
super(message);
|
|
221
|
+
this.name = 'AdminatorError';
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Plugin types
|
|
226
|
+
export interface PluginInterface {
|
|
227
|
+
name: string;
|
|
228
|
+
version: string;
|
|
229
|
+
dependencies?: string[];
|
|
230
|
+
init(app: any): void;
|
|
231
|
+
destroy(): void;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface PluginRegistry {
|
|
235
|
+
[key: string]: PluginInterface;
|
|
236
|
+
}
|
package/RELEASE_NOTES.md
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# 🚀 Adminator v2.7.0 - jQuery-Free Release
|
|
2
|
-
|
|
3
|
-
## 📋 Overview
|
|
4
|
-
This major release completely removes jQuery dependency from the Adminator admin dashboard while maintaining all functionality and improving performance. The project now uses modern vanilla JavaScript with Bootstrap 5.3.7.
|
|
5
|
-
|
|
6
|
-
## ✨ Major Changes
|
|
7
|
-
|
|
8
|
-
### 🗑️ Removed jQuery Dependencies (600KB+ bundle reduction)
|
|
9
|
-
- ❌ **jQuery Core** (3.7.1) → ✅ **Vanilla JavaScript**
|
|
10
|
-
- ❌ **jQuery Sparkline** (2.4.0) → ✅ **Chart.js 4.5.0** mini charts
|
|
11
|
-
- ❌ **Bootstrap Datepicker** (1.10.0) → ✅ **HTML5 date inputs** + vanilla JS
|
|
12
|
-
- ❌ **DataTables** (1.10.18) → ✅ **Custom vanilla JS** table component
|
|
13
|
-
- ❌ **Easy Pie Chart** (2.1.7) → ✅ **Custom SVG** pie charts
|
|
14
|
-
- ❌ **jVectorMap** (2.0.4) → ✅ **JSVectorMap 1.6.0** (jQuery-free)
|
|
15
|
-
|
|
16
|
-
### 🔧 New Vanilla JavaScript Components
|
|
17
|
-
- **Bootstrap 5 Components**: Modals, dropdowns, popovers, tooltips, accordions
|
|
18
|
-
- **Enhanced Data Tables**: Sorting, pagination, search functionality
|
|
19
|
-
- **Interactive Charts**: Chart.js-based sparklines with theme support
|
|
20
|
-
- **Vector Maps**: Interactive world maps with markers and tooltips
|
|
21
|
-
- **Date Pickers**: HTML5 date inputs with enhanced UX
|
|
22
|
-
- **Theme System**: Improved dark/light mode with CSS variables
|
|
23
|
-
|
|
24
|
-
### 📱 Mobile Enhancements
|
|
25
|
-
- Full-width search overlay for mobile devices
|
|
26
|
-
- Enhanced dropdown behavior with overlay management
|
|
27
|
-
- Touch-friendly interactions and gestures
|
|
28
|
-
- Viewport-based responsive breakpoints
|
|
29
|
-
- Prevents horizontal scrolling on mobile
|
|
30
|
-
|
|
31
|
-
### 🎨 Bootstrap 5 Migration
|
|
32
|
-
- **Updated to Bootstrap 5.3.7** from Bootstrap 4
|
|
33
|
-
- **Fixed deprecated classes**: `sr-only` → `visually-hidden`
|
|
34
|
-
- **Updated data attributes**: `data-toggle` → `data-bs-toggle`
|
|
35
|
-
- **Enhanced UI components**: New examples and improved styling
|
|
36
|
-
- **Better accessibility**: Proper ARIA attributes and keyboard navigation
|
|
37
|
-
|
|
38
|
-
## 🚀 Performance Improvements
|
|
39
|
-
- **Bundle size reduction**: ~600KB smaller JavaScript bundle
|
|
40
|
-
- **Faster page loads**: Eliminated jQuery dependency
|
|
41
|
-
- **Modern ES6+**: Class-based architecture with better maintainability
|
|
42
|
-
- **Optimized builds**: Webpack 5.99.9 with modern optimizations
|
|
43
|
-
|
|
44
|
-
## 📦 New Features
|
|
45
|
-
- **Theme Toggle**: Automatic injection with OS preference detection
|
|
46
|
-
- **Comprehensive Documentation**: Updated CLAUDE.md with full architecture guide
|
|
47
|
-
- **Mobile-First Design**: Enhanced mobile experience across all components
|
|
48
|
-
- **Dark Mode**: Complete dark mode implementation with CSS variables
|
|
49
|
-
|
|
50
|
-
## 🔧 Technical Details
|
|
51
|
-
- **Build System**: Webpack 5.99.9 with hot module replacement
|
|
52
|
-
- **JavaScript**: ES6+ with Babel transpilation, ESLint 9.x flat config
|
|
53
|
-
- **CSS**: Sass/SCSS with PostCSS processing
|
|
54
|
-
- **Frontend**: 100% jQuery-free vanilla JavaScript
|
|
55
|
-
- **Theme System**: CSS variables-based dark/light mode
|
|
56
|
-
|
|
57
|
-
## 📖 Documentation
|
|
58
|
-
- Complete architecture documentation in `CLAUDE.md`
|
|
59
|
-
- Development commands and workflow guidelines
|
|
60
|
-
- Component integration examples
|
|
61
|
-
- Mobile optimization techniques
|
|
62
|
-
|
|
63
|
-
## 🔗 Demo
|
|
64
|
-
- **Live Demo**: https://puikinsh.github.io/Adminator-admin-dashboard/
|
|
65
|
-
- **Development Server**: `npm start` (http://localhost:4000)
|
|
66
|
-
|
|
67
|
-
## 💻 Quick Start
|
|
68
|
-
```bash
|
|
69
|
-
# Install dependencies
|
|
70
|
-
npm install
|
|
71
|
-
|
|
72
|
-
# Start development server
|
|
73
|
-
npm start
|
|
74
|
-
|
|
75
|
-
# Build for production
|
|
76
|
-
npm run build
|
|
77
|
-
|
|
78
|
-
# Run linters
|
|
79
|
-
npm run lint
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## 🎯 What's Next
|
|
83
|
-
This release establishes a modern, maintainable foundation for the Adminator admin dashboard. All functionality has been preserved while significantly improving performance and developer experience.
|
|
84
|
-
|
|
85
|
-
## 🙏 Acknowledgments
|
|
86
|
-
- Original design by [Colorlib](https://colorlib.com)
|
|
87
|
-
- jQuery removal and modernization completed with comprehensive testing
|
|
88
|
-
- Bootstrap 5 migration with full backward compatibility
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
**Full Changelog**: https://github.com/puikinsh/Adminator-admin-dashboard/compare/v2.6.1...v2.7.0
|