@moontra/moonui-pro 2.20.1 → 2.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/index.d.ts +691 -261
  2. package/dist/index.mjs +7418 -4934
  3. package/package.json +11 -5
  4. package/plugin/index.d.ts +86 -0
  5. package/plugin/index.js +308 -0
  6. package/scripts/postbuild.js +27 -0
  7. package/scripts/postinstall.js +176 -23
  8. package/src/__tests__/use-intersection-observer.test.tsx +0 -216
  9. package/src/__tests__/use-local-storage.test.tsx +0 -174
  10. package/src/__tests__/use-pro-access.test.tsx +0 -183
  11. package/src/components/advanced-chart/advanced-chart.test.tsx +0 -281
  12. package/src/components/advanced-chart/index.tsx +0 -1242
  13. package/src/components/advanced-forms/index.tsx +0 -426
  14. package/src/components/animated-button/index.tsx +0 -385
  15. package/src/components/calendar/event-dialog.tsx +0 -372
  16. package/src/components/calendar/index.tsx +0 -1073
  17. package/src/components/calendar-pro/index.tsx +0 -1697
  18. package/src/components/color-picker/index.tsx +0 -432
  19. package/src/components/credit-card-input/index.tsx +0 -406
  20. package/src/components/dashboard/dashboard-grid.tsx +0 -462
  21. package/src/components/dashboard/demo.tsx +0 -425
  22. package/src/components/dashboard/index.tsx +0 -1046
  23. package/src/components/dashboard/time-range-picker.tsx +0 -336
  24. package/src/components/dashboard/types.ts +0 -222
  25. package/src/components/dashboard/widgets/activity-feed.tsx +0 -344
  26. package/src/components/dashboard/widgets/chart-widget.tsx +0 -418
  27. package/src/components/dashboard/widgets/metric-card.tsx +0 -343
  28. package/src/components/data-table/data-table-bulk-actions.tsx +0 -204
  29. package/src/components/data-table/data-table-column-toggle.tsx +0 -169
  30. package/src/components/data-table/data-table-export.ts +0 -156
  31. package/src/components/data-table/data-table-filter-drawer.tsx +0 -448
  32. package/src/components/data-table/data-table.test.tsx +0 -187
  33. package/src/components/data-table/index.tsx +0 -845
  34. package/src/components/draggable-list/index.tsx +0 -100
  35. package/src/components/enhanced/badge.tsx +0 -191
  36. package/src/components/enhanced/button.tsx +0 -362
  37. package/src/components/enhanced/card.tsx +0 -266
  38. package/src/components/enhanced/dialog.tsx +0 -246
  39. package/src/components/enhanced/index.ts +0 -4
  40. package/src/components/error-boundary/index.tsx +0 -109
  41. package/src/components/file-upload/file-upload.test.tsx +0 -243
  42. package/src/components/file-upload/index.tsx +0 -1660
  43. package/src/components/floating-action-button/index.tsx +0 -206
  44. package/src/components/form-wizard/form-wizard-context.tsx +0 -307
  45. package/src/components/form-wizard/form-wizard-navigation.tsx +0 -118
  46. package/src/components/form-wizard/form-wizard-progress.tsx +0 -298
  47. package/src/components/form-wizard/form-wizard-step.tsx +0 -111
  48. package/src/components/form-wizard/index.tsx +0 -102
  49. package/src/components/form-wizard/types.ts +0 -76
  50. package/src/components/gesture-drawer/index.tsx +0 -551
  51. package/src/components/github-stars/github-api.ts +0 -426
  52. package/src/components/github-stars/hooks.ts +0 -516
  53. package/src/components/github-stars/index.tsx +0 -375
  54. package/src/components/github-stars/types.ts +0 -148
  55. package/src/components/github-stars/variants.tsx +0 -513
  56. package/src/components/health-check/index.tsx +0 -439
  57. package/src/components/hover-card-3d/index.tsx +0 -530
  58. package/src/components/index.ts +0 -128
  59. package/src/components/internal/index.ts +0 -78
  60. package/src/components/kanban/add-card-modal.tsx +0 -502
  61. package/src/components/kanban/card-detail-modal.tsx +0 -761
  62. package/src/components/kanban/index.ts +0 -13
  63. package/src/components/kanban/kanban.tsx +0 -1684
  64. package/src/components/kanban/types.ts +0 -168
  65. package/src/components/lazy-component/index.tsx +0 -823
  66. package/src/components/license-error/index.tsx +0 -29
  67. package/src/components/magnetic-button/index.tsx +0 -167
  68. package/src/components/memory-efficient-data/index.tsx +0 -1016
  69. package/src/components/moonui-quiz-form/index.tsx +0 -817
  70. package/src/components/optimized-image/index.tsx +0 -425
  71. package/src/components/performance-debugger/index.tsx +0 -589
  72. package/src/components/performance-monitor/index.tsx +0 -794
  73. package/src/components/phone-number-input/index.tsx +0 -338
  74. package/src/components/pinch-zoom/index.tsx +0 -566
  75. package/src/components/quiz-form/index.tsx +0 -479
  76. package/src/components/rich-text-editor/index-old-backup.tsx +0 -437
  77. package/src/components/rich-text-editor/index.tsx +0 -2324
  78. package/src/components/rich-text-editor/slash-commands-extension.ts +0 -220
  79. package/src/components/rich-text-editor/slash-commands.css +0 -35
  80. package/src/components/rich-text-editor/table-styles.css +0 -65
  81. package/src/components/sidebar/index.tsx +0 -865
  82. package/src/components/spotlight-card/index.tsx +0 -191
  83. package/src/components/swipeable-card/index.tsx +0 -100
  84. package/src/components/timeline/index.tsx +0 -1148
  85. package/src/components/ui/accordion.tsx +0 -73
  86. package/src/components/ui/alert-dialog.tsx +0 -141
  87. package/src/components/ui/alert.tsx +0 -141
  88. package/src/components/ui/aspect-ratio.tsx +0 -245
  89. package/src/components/ui/avatar.tsx +0 -153
  90. package/src/components/ui/badge.tsx +0 -228
  91. package/src/components/ui/breadcrumb.tsx +0 -214
  92. package/src/components/ui/button.tsx +0 -222
  93. package/src/components/ui/calendar.tsx +0 -387
  94. package/src/components/ui/card.tsx +0 -214
  95. package/src/components/ui/checkbox.tsx +0 -259
  96. package/src/components/ui/collapsible.tsx +0 -135
  97. package/src/components/ui/color-picker.tsx +0 -97
  98. package/src/components/ui/command.tsx +0 -225
  99. package/src/components/ui/dialog.tsx +0 -334
  100. package/src/components/ui/dropdown-menu.tsx +0 -218
  101. package/src/components/ui/gesture-drawer.tsx +0 -11
  102. package/src/components/ui/hover-card.tsx +0 -29
  103. package/src/components/ui/index.ts +0 -190
  104. package/src/components/ui/input.tsx +0 -222
  105. package/src/components/ui/label.tsx +0 -29
  106. package/src/components/ui/lightbox.tsx +0 -606
  107. package/src/components/ui/magnetic-button.tsx +0 -129
  108. package/src/components/ui/media-gallery.tsx +0 -612
  109. package/src/components/ui/pagination.tsx +0 -123
  110. package/src/components/ui/popover.tsx +0 -185
  111. package/src/components/ui/progress.tsx +0 -30
  112. package/src/components/ui/radio-group.tsx +0 -257
  113. package/src/components/ui/scroll-area.tsx +0 -47
  114. package/src/components/ui/select.tsx +0 -374
  115. package/src/components/ui/separator.tsx +0 -145
  116. package/src/components/ui/sheet.tsx +0 -139
  117. package/src/components/ui/skeleton.tsx +0 -20
  118. package/src/components/ui/slider.tsx +0 -354
  119. package/src/components/ui/spotlight-card.tsx +0 -119
  120. package/src/components/ui/switch.tsx +0 -86
  121. package/src/components/ui/table.tsx +0 -329
  122. package/src/components/ui/tabs.tsx +0 -198
  123. package/src/components/ui/textarea.tsx +0 -28
  124. package/src/components/ui/toast.tsx +0 -317
  125. package/src/components/ui/toggle.tsx +0 -119
  126. package/src/components/ui/tooltip.tsx +0 -151
  127. package/src/components/virtual-list/index.tsx +0 -668
  128. package/src/hooks/use-chart.ts +0 -205
  129. package/src/hooks/use-data-table.ts +0 -182
  130. package/src/hooks/use-docs-pro-access.ts +0 -13
  131. package/src/hooks/use-license-check.ts +0 -65
  132. package/src/hooks/use-subscription.ts +0 -19
  133. package/src/hooks/use-toast.ts +0 -15
  134. package/src/index.ts +0 -14
  135. package/src/lib/ai-providers.ts +0 -377
  136. package/src/lib/component-metadata.ts +0 -18
  137. package/src/lib/micro-interactions.ts +0 -255
  138. package/src/lib/paddle.ts +0 -17
  139. package/src/lib/utils.ts +0 -6
  140. package/src/patterns/login-form/index.tsx +0 -276
  141. package/src/patterns/login-form/types.ts +0 -67
  142. package/src/setupTests.ts +0 -41
  143. package/src/styles/advanced-chart.css +0 -239
  144. package/src/styles/calendar.css +0 -35
  145. package/src/styles/design-system.css +0 -363
  146. package/src/styles/index.css +0 -85
  147. package/src/styles/tailwind.css +0 -7
  148. package/src/styles/tokens.css +0 -455
  149. package/src/types/moonui.d.ts +0 -22
  150. package/src/types/next-auth.d.ts +0 -21
  151. package/src/use-intersection-observer.tsx +0 -154
  152. package/src/use-local-storage.tsx +0 -71
  153. package/src/use-paddle.ts +0 -138
  154. package/src/use-performance-optimizer.ts +0 -389
  155. package/src/use-pro-access.ts +0 -141
  156. package/src/use-scroll-animation.ts +0 -219
  157. package/src/use-subscription.ts +0 -37
  158. package/src/use-toast.ts +0 -32
  159. package/src/utils/chart-helpers.ts +0 -357
  160. package/src/utils/cn.ts +0 -6
  161. package/src/utils/data-processing.ts +0 -151
  162. package/src/utils/license-validator.tsx +0 -183
@@ -1,336 +0,0 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import { motion } from "framer-motion";
5
- import { Button } from "../ui/button";
6
- import { Calendar } from "../ui/calendar";
7
- import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
8
- import { cn } from "../../lib/utils";
9
- import { CalendarIcon, ChevronDown } from "lucide-react";
10
- import {
11
- format,
12
- startOfDay,
13
- endOfDay,
14
- subDays,
15
- startOfWeek,
16
- endOfWeek,
17
- startOfMonth,
18
- endOfMonth,
19
- } from "date-fns";
20
- import { TimeRange } from "./types";
21
-
22
- interface TimeRangePickerProps {
23
- value?: TimeRange;
24
- onChange?: (range: TimeRange) => void;
25
- className?: string;
26
- showPresets?: boolean;
27
- showComparison?: boolean;
28
- glassmorphism?: boolean;
29
- }
30
-
31
- const PRESET_RANGES = [
32
- {
33
- label: "Today",
34
- value: "today",
35
- getRange: () => ({
36
- start: startOfDay(new Date()),
37
- end: endOfDay(new Date()),
38
- label: "Today",
39
- preset: "today" as const,
40
- }),
41
- },
42
- {
43
- label: "Yesterday",
44
- value: "yesterday",
45
- getRange: () => ({
46
- start: startOfDay(subDays(new Date(), 1)),
47
- end: endOfDay(subDays(new Date(), 1)),
48
- label: "Yesterday",
49
- preset: "yesterday" as const,
50
- }),
51
- },
52
- {
53
- label: "Last 7 days",
54
- value: "last7days",
55
- getRange: () => ({
56
- start: startOfDay(subDays(new Date(), 6)),
57
- end: endOfDay(new Date()),
58
- label: "Last 7 days",
59
- preset: "last7days" as const,
60
- }),
61
- },
62
- {
63
- label: "Last 30 days",
64
- value: "last30days",
65
- getRange: () => ({
66
- start: startOfDay(subDays(new Date(), 29)),
67
- end: endOfDay(new Date()),
68
- label: "Last 30 days",
69
- preset: "last30days" as const,
70
- }),
71
- },
72
- {
73
- label: "This week",
74
- value: "thisWeek",
75
- getRange: () => ({
76
- start: startOfWeek(new Date()),
77
- end: endOfWeek(new Date()),
78
- label: "This week",
79
- preset: "custom" as const,
80
- }),
81
- },
82
- {
83
- label: "This month",
84
- value: "thisMonth",
85
- getRange: () => ({
86
- start: startOfMonth(new Date()),
87
- end: endOfMonth(new Date()),
88
- label: "This month",
89
- preset: "thisMonth" as const,
90
- }),
91
- },
92
- {
93
- label: "Last month",
94
- value: "lastMonth",
95
- getRange: () => {
96
- const lastMonth = subDays(startOfMonth(new Date()), 1);
97
- return {
98
- start: startOfMonth(lastMonth),
99
- end: endOfMonth(lastMonth),
100
- label: "Last month",
101
- preset: "lastMonth" as const,
102
- };
103
- },
104
- },
105
- ];
106
-
107
- export function TimeRangePicker({
108
- value,
109
- onChange,
110
- className,
111
- showPresets = true,
112
- showComparison = false,
113
- glassmorphism = false,
114
- }: TimeRangePickerProps) {
115
- const [isOpen, setIsOpen] = React.useState(false);
116
- const [customRange, setCustomRange] = React.useState<{
117
- from?: Date;
118
- to?: Date;
119
- }>({
120
- from: undefined,
121
- to: undefined,
122
- });
123
- const [comparisonEnabled, setComparisonEnabled] = React.useState(false);
124
-
125
- const currentRange = value || PRESET_RANGES[2].getRange(); // Default: Last 7 days
126
-
127
- // Format tarih aralığı
128
- const formatRange = (range: TimeRange) => {
129
- if (range.preset && range.preset !== "custom") {
130
- return range.label;
131
- }
132
- return `${format(range.start, "MMM d")} - ${format(range.end, "MMM d, yyyy")}`;
133
- };
134
-
135
- // Preset seçimi
136
- const handlePresetSelect = (preset: (typeof PRESET_RANGES)[0]) => {
137
- const range = preset.getRange();
138
- onChange?.(range);
139
- setIsOpen(false);
140
- };
141
-
142
- // Custom tarih seçimi
143
- const handleCustomRangeSelect = () => {
144
- if (customRange.from && customRange.to) {
145
- onChange?.({
146
- start: startOfDay(customRange.from),
147
- end: endOfDay(customRange.to),
148
- label: `${format(customRange.from, "MMM d")} - ${format(customRange.to, "MMM d, yyyy")}`,
149
- preset: "custom",
150
- });
151
- setIsOpen(false);
152
- }
153
- };
154
-
155
- return (
156
- <Popover open={isOpen} onOpenChange={setIsOpen}>
157
- <PopoverTrigger asChild>
158
- <Button
159
- variant="outline"
160
- className={cn(
161
- "justify-start text-left font-normal",
162
- glassmorphism &&
163
- "bg-background/60 backdrop-blur-sm border-white/10",
164
- !value && "text-muted-foreground",
165
- className
166
- )}
167
- >
168
- <CalendarIcon className="mr-2 h-4 w-4" />
169
- {formatRange(currentRange)}
170
- <ChevronDown className="ml-auto h-4 w-4 opacity-50" />
171
- </Button>
172
- </PopoverTrigger>
173
- <PopoverContent
174
- className={cn(
175
- "time-range-popover w-auto max-w-[95vw] sm:max-w-4xl p-0 overflow-hidden",
176
- glassmorphism &&
177
- "bg-background/95 backdrop-blur-md border-white/10"
178
- )}
179
- align="end"
180
- side="bottom"
181
- sideOffset={4}
182
- collisionPadding={16}
183
- >
184
- <motion.div
185
- initial={{ opacity: 0, y: -10 }}
186
- animate={{ opacity: 1, y: 0 }}
187
- transition={{ duration: 0.2 }}
188
- className="min-w-0"
189
- >
190
- {/* Mobile: Stacked Layout */}
191
- <div className="sm:hidden">
192
- {/* Custom tarih seçici */}
193
- <div className="p-3">
194
- {/* Karşılaştırma */}
195
- {showComparison && (
196
- <div className="mt-3 pt-3 border-t">
197
- <label className="flex items-center gap-2 cursor-pointer">
198
- <input
199
- type="checkbox"
200
- checked={comparisonEnabled}
201
- onChange={(e) =>
202
- setComparisonEnabled(
203
- e.target.checked
204
- )
205
- }
206
- className="rounded w-3 h-3"
207
- />
208
- <span className="text-xs">
209
- Compare to previous
210
- </span>
211
- </label>
212
- </div>
213
- )}
214
- </div>
215
- </div>
216
-
217
- {/* Desktop: Side by Side Layout */}
218
- <div className="hidden sm:flex">
219
- {/* Preset'ler */}
220
- {showPresets && (
221
- <div className="preset-column border-r p-3 min-w-[140px]">
222
- <div className="grid grid-cols-1 gap-1">
223
- {PRESET_RANGES.map((preset) => (
224
- <motion.button
225
- key={preset.value}
226
- whileHover={{ x: 2 }}
227
- whileTap={{ scale: 0.98 }}
228
- onClick={() =>
229
- handlePresetSelect(preset)
230
- }
231
- className={cn(
232
- "w-full text-left px-2 py-1.5 text-sm rounded-md transition-colors whitespace-nowrap",
233
- "hover:bg-muted",
234
- currentRange.preset ===
235
- preset.value &&
236
- "bg-primary text-primary-foreground"
237
- )}
238
- >
239
- {preset.label}
240
- </motion.button>
241
- ))}
242
- </div>
243
-
244
- {/* Karşılaştırma */}
245
- {showComparison && (
246
- <div className="mt-4 pt-4 border-t">
247
- <label className="flex items-center gap-2 px-2 cursor-pointer">
248
- <input
249
- type="checkbox"
250
- checked={comparisonEnabled}
251
- onChange={(e) =>
252
- setComparisonEnabled(
253
- e.target.checked
254
- )
255
- }
256
- className="rounded w-4 h-4"
257
- />
258
- <span className="text-sm">
259
- Compare to previous period
260
- </span>
261
- </label>
262
- </div>
263
- )}
264
- </div>
265
- )}
266
-
267
- {/* Custom tarih seçici */}
268
- <div className="p-3 flex-1">
269
- <div className="overflow-x-auto">
270
- <Calendar
271
- mode="range"
272
- selected={{
273
- from: customRange.from,
274
- to: customRange.to,
275
- }}
276
- onSelect={(range: any) =>
277
- setCustomRange(
278
- range || {
279
- from: undefined,
280
- to: undefined,
281
- }
282
- )
283
- }
284
- numberOfMonths={2}
285
- showOutsideDays={true}
286
- className="rounded-md"
287
- />
288
- </div>
289
-
290
- <div className="flex items-center justify-between pt-3 px-2">
291
- <div className="text-sm text-muted-foreground">
292
- {customRange.from && customRange.to && (
293
- <span>
294
- {Math.ceil(
295
- (customRange.to.getTime() -
296
- customRange.from.getTime()) /
297
- (1000 * 60 * 60 * 24)
298
- )}{" "}
299
- days selected
300
- </span>
301
- )}
302
- </div>
303
- <div className="flex gap-2">
304
- <Button
305
- variant="ghost"
306
- size="sm"
307
- onClick={() => {
308
- setCustomRange({
309
- from: undefined,
310
- to: undefined,
311
- });
312
- setIsOpen(false);
313
- }}
314
- >
315
- Cancel
316
- </Button>
317
- <Button
318
- size="sm"
319
- onClick={handleCustomRangeSelect}
320
- disabled={
321
- !customRange.from || !customRange.to
322
- }
323
- >
324
- Apply
325
- </Button>
326
- </div>
327
- </div>
328
- </div>
329
- </div>
330
- </motion.div>
331
- </PopoverContent>
332
- </Popover>
333
- );
334
- }
335
-
336
- export default TimeRangePicker;
@@ -1,222 +0,0 @@
1
- import { ReactNode } from 'react'
2
-
3
- // Widget tipleri
4
- export type WidgetType =
5
- | 'metric'
6
- | 'chart'
7
- | 'table'
8
- | 'map'
9
- | 'activity'
10
- | 'calendar'
11
- | 'progress'
12
- | 'comparison'
13
-
14
- // Widget boyutları
15
- export interface WidgetSize {
16
- w: number // Grid genişliği
17
- h: number // Grid yüksekliği
18
- minW?: number
19
- maxW?: number
20
- minH?: number
21
- maxH?: number
22
- }
23
-
24
- // Widget pozisyonu
25
- export interface WidgetPosition {
26
- x: number
27
- y: number
28
- }
29
-
30
- // Tema tipleri
31
- export type DashboardTheme = 'analytics' | 'sales' | 'monitoring' | 'finance' | 'custom'
32
-
33
- // Zaman aralığı
34
- export interface TimeRange {
35
- start: Date
36
- end: Date
37
- label: string
38
- preset?: 'today' | 'yesterday' | 'last7days' | 'last30days' | 'thisMonth' | 'lastMonth' | 'custom'
39
- }
40
-
41
- // Metric widget
42
- export interface MetricData {
43
- id: string
44
- title: string
45
- value: string | number
46
- change?: {
47
- value: number
48
- type: 'increase' | 'decrease' | 'neutral'
49
- period: string
50
- }
51
- icon?: ReactNode
52
- color?: 'primary' | 'success' | 'warning' | 'danger' | 'info'
53
- sparkline?: number[]
54
- forecast?: number
55
- target?: number
56
- unit?: string
57
- }
58
-
59
- // Chart widget
60
- export interface ChartData {
61
- type: 'line' | 'bar' | 'area' | 'pie' | 'donut' | 'radar'
62
- data: any
63
- options?: any
64
- }
65
-
66
- // Table widget
67
- export interface TableData {
68
- columns: Array<{
69
- id: string
70
- header: string
71
- accessor: string
72
- sortable?: boolean
73
- filterable?: boolean
74
- }>
75
- data: any[]
76
- pagination?: boolean
77
- pageSize?: number
78
- }
79
-
80
- // Activity widget
81
- export interface ActivityItem {
82
- id: string
83
- type: 'info' | 'success' | 'warning' | 'error'
84
- title: string
85
- description?: string
86
- timestamp: Date
87
- user?: {
88
- name: string
89
- avatar?: string
90
- }
91
- icon?: ReactNode
92
- }
93
-
94
- // Progress widget
95
- export interface ProgressData {
96
- id: string
97
- title: string
98
- current: number
99
- target: number
100
- unit?: string
101
- color?: 'primary' | 'success' | 'warning' | 'danger'
102
- deadline?: Date
103
- }
104
-
105
- // Comparison widget
106
- export interface ComparisonData {
107
- periods: Array<{
108
- label: string
109
- value: number
110
- data?: any[]
111
- }>
112
- metric: string
113
- unit?: string
114
- showChart?: boolean
115
- }
116
-
117
- // Widget base interface
118
- export interface Widget {
119
- id: string
120
- type: WidgetType
121
- title: string
122
- description?: string
123
- size?: WidgetSize
124
- position?: WidgetPosition
125
- data?: any
126
- config?: any
127
- loading?: boolean
128
- error?: string
129
- refreshInterval?: number // ms
130
- lastUpdated?: Date
131
- permissions?: {
132
- canEdit?: boolean
133
- canDelete?: boolean
134
- canResize?: boolean
135
- canMove?: boolean
136
- }
137
- }
138
-
139
- // Dashboard configuration
140
- export interface DashboardConfig {
141
- id: string
142
- name: string
143
- description?: string
144
- theme: DashboardTheme
145
- layout: {
146
- rowHeight: number
147
- margin: [number, number]
148
- containerPadding: [number, number]
149
- breakpoints: {
150
- lg: number
151
- md: number
152
- sm: number
153
- xs: number
154
- xxs: number
155
- }
156
- cols: {
157
- lg: number
158
- md: number
159
- sm: number
160
- xs: number
161
- xxs: number
162
- }
163
- }
164
- widgets: Widget[]
165
- filters?: {
166
- timeRange?: TimeRange
167
- dimensions?: Record<string, any>
168
- }
169
- createdAt: Date
170
- updatedAt: Date
171
- createdBy?: string
172
- shared?: boolean
173
- tags?: string[]
174
- }
175
-
176
- // Dashboard template
177
- export interface DashboardTemplate {
178
- id: string
179
- name: string
180
- description: string
181
- thumbnail?: string
182
- category: 'analytics' | 'sales' | 'operations' | 'finance' | 'marketing' | 'custom'
183
- widgets: Omit<Widget, 'id'>[]
184
- theme: DashboardTheme
185
- popularity?: number
186
- isPro?: boolean
187
- }
188
-
189
- // WebSocket message
190
- export interface DashboardUpdate {
191
- type: 'widget-update' | 'notification' | 'alert' | 'refresh'
192
- widgetId?: string
193
- data?: any
194
- timestamp: Date
195
- }
196
-
197
- // Export format
198
- export type ExportFormat = 'json' | 'csv' | 'pdf' | 'png'
199
-
200
- // Filter types
201
- export interface DashboardFilter {
202
- id: string
203
- type: 'select' | 'multiselect' | 'daterange' | 'search' | 'toggle'
204
- label: string
205
- field: string
206
- options?: Array<{ value: any; label: string }>
207
- defaultValue?: any
208
- }
209
-
210
- // Notification
211
- export interface DashboardNotification {
212
- id: string
213
- type: 'info' | 'success' | 'warning' | 'error'
214
- title: string
215
- message?: string
216
- timestamp: Date
217
- read?: boolean
218
- action?: {
219
- label: string
220
- handler: () => void
221
- }
222
- }