adminator-admin-dashboard 2.7.1 → 2.8.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.
@@ -1,236 +0,0 @@
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
- }