@appcorp/shadcn 1.2.0 → 2.0.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/components/app-sidebar.js +1 -41
- package/components/audio.js +1 -21
- package/components/dashboard.js +1 -67
- package/components/drawer-generic.js +1 -47
- package/components/enhanced-checkbox.js +1 -86
- package/components/enhanced-combobox.js +1 -315
- package/components/enhanced-drawer-footer.js +1 -39
- package/components/enhanced-drawer-header.js +1 -15
- package/components/enhanced-dropzone-impl.d.ts +32 -0
- package/components/enhanced-dropzone-impl.js +1 -0
- package/components/enhanced-dropzone.d.ts +2 -63
- package/components/enhanced-dropzone.js +1 -296
- package/components/enhanced-input.js +1 -87
- package/components/enhanced-label.js +1 -68
- package/components/enhanced-radio.js +1 -23
- package/components/enhanced-select.js +1 -81
- package/components/enhanced-slider.js +1 -80
- package/components/enhanced-switch.js +1 -89
- package/components/enhanced-table-footer-action.js +1 -110
- package/components/enhanced-table-footer-page.js +1 -132
- package/components/enhanced-table-footer-pagination.js +1 -118
- package/components/enhanced-table-header-action.js +1 -40
- package/components/enhanced-table-header-search.js +1 -18
- package/components/enhanced-table.js +1 -329
- package/components/enhanced-textarea.js +1 -87
- package/components/field.d.ts +1 -1
- package/components/field.js +1 -153
- package/components/image-resize-dialog.js +1 -180
- package/components/nav-main.js +1 -86
- package/components/nav-projects.js +1 -50
- package/components/nav-user.js +1 -62
- package/components/show-toast.js +1 -11
- package/components/sidebar.d.ts +1 -1
- package/components/sidebar.js +1 -326
- package/components/team-switcher.js +1 -53
- package/components/theme-provider.js +1 -160
- package/components/timeline.js +1 -21
- package/components/tooltip.js +1 -85
- package/components/ui/accordion.js +1 -87
- package/components/ui/alert-dialog.js +1 -120
- package/components/ui/alert.d.ts +1 -1
- package/components/ui/alert.js +1 -90
- package/components/ui/area-chart-v1-impl.d.ts +19 -0
- package/components/ui/area-chart-v1-impl.js +1 -0
- package/components/ui/area-chart-v1.d.ts +2 -19
- package/components/ui/area-chart-v1.js +1 -114
- package/components/ui/aspect-ratio.js +1 -40
- package/components/ui/avatar.js +1 -80
- package/components/ui/badge.d.ts +2 -2
- package/components/ui/badge.js +1 -80
- package/components/ui/breadcrumb.js +1 -107
- package/components/ui/button.d.ts +2 -2
- package/components/ui/button.js +1 -92
- package/components/ui/calendar-impl.d.ts +8 -0
- package/components/ui/calendar-impl.js +1 -0
- package/components/ui/calendar.d.ts +2 -8
- package/components/ui/calendar.js +1 -109
- package/components/ui/card.js +1 -96
- package/components/ui/carousel-impl.d.ts +18 -0
- package/components/ui/carousel-impl.js +1 -0
- package/components/ui/carousel.d.ts +6 -18
- package/components/ui/carousel.js +1 -171
- package/components/ui/chart-impl.d.ts +62 -0
- package/components/ui/chart-impl.js +7 -0
- package/components/ui/chart.d.ts +7 -62
- package/components/ui/chart.js +1 -220
- package/components/ui/checkbox.js +1 -71
- package/components/ui/collapsible.js +1 -44
- package/components/ui/combobox.js +1 -88
- package/components/ui/command-impl.d.ts +80 -0
- package/components/ui/command-impl.js +1 -0
- package/components/ui/command.d.ts +9 -80
- package/components/ui/command.js +1 -118
- package/components/ui/context-menu.js +1 -141
- package/components/ui/dialog.js +1 -113
- package/components/ui/drawer-impl.d.ts +22 -0
- package/components/ui/drawer-impl.js +1 -0
- package/components/ui/drawer.d.ts +10 -22
- package/components/ui/drawer.js +1 -112
- package/components/ui/dropdown-menu.js +1 -143
- package/components/ui/form.d.ts +4 -2
- package/components/ui/form.js +1 -132
- package/components/ui/hover-card.js +1 -72
- package/components/ui/input-otp-impl.d.ts +34 -0
- package/components/ui/input-otp-impl.js +1 -0
- package/components/ui/input-otp.d.ts +4 -34
- package/components/ui/input-otp.js +1 -93
- package/components/ui/input.js +1 -66
- package/components/ui/label.d.ts +1 -1
- package/components/ui/label.js +1 -70
- package/components/ui/language-selector.js +1 -63
- package/components/ui/menubar.js +1 -165
- package/components/ui/navigation-menu.d.ts +1 -1
- package/components/ui/navigation-menu.js +1 -114
- package/components/ui/pagination.js +1 -113
- package/components/ui/popover.js +1 -75
- package/components/ui/progress.js +1 -69
- package/components/ui/radio-group.js +1 -77
- package/components/ui/resizable-impl.d.ts +24 -0
- package/components/ui/resizable-impl.js +1 -0
- package/components/ui/resizable.d.ts +3 -24
- package/components/ui/resizable.js +1 -79
- package/components/ui/scroll-area.js +1 -80
- package/components/ui/select.js +1 -127
- package/components/ui/separator.js +1 -68
- package/components/ui/sheet.d.ts +1 -1
- package/components/ui/sheet.js +1 -127
- package/components/ui/skeleton.js +1 -34
- package/components/ui/slider.js +1 -79
- package/components/ui/sonner.js +1 -45
- package/components/ui/switch.js +1 -69
- package/components/ui/table.js +1 -109
- package/components/ui/tabs.js +1 -82
- package/components/ui/textarea.js +1 -66
- package/components/ui/theme-switcher.js +1 -152
- package/components/ui/toggle.d.ts +2 -2
- package/components/ui/toggle.js +1 -87
- package/data/admin-dashboard.js +1 -304
- package/hooks/use-enhanced-combobox.js +1 -150
- package/hooks/use-mobile.js +1 -51
- package/hooks/use-outside-click.js +1 -23
- package/lib/themes.js +1 -150
- package/lib/toast-utils.js +1 -212
- package/lib/utils.js +1 -12
- package/package.json +9 -90
- package/utils/transform-breadcrumbs.js +1 -11
- package/utils/transform-navitems.js +1 -33
- package/components/aceternity-ui/apple-cards-carousel.d.ts +0 -35
- package/components/aceternity-ui/apple-cards-carousel.js +0 -263
- package/components/shadcn-example/ai-chat/chat-interface.d.ts +0 -11
- package/components/shadcn-example/ai-chat/chat-interface.js +0 -70
- package/components/shadcn-example/ai-chat/index.d.ts +0 -38
- package/components/shadcn-example/ai-chat/index.js +0 -66
- package/components/shadcn-example/ai-chat/sidebar.d.ts +0 -15
- package/components/shadcn-example/ai-chat/sidebar.js +0 -68
- package/components/shadcn-example/ai-chat/welcome-section.d.ts +0 -12
- package/components/shadcn-example/ai-chat/welcome-section.js +0 -26
- package/components/shadcn-example/authentication/index.d.ts +0 -24
- package/components/shadcn-example/authentication/index.js +0 -59
- package/components/shadcn-example/authentication/user-auth-form.d.ts +0 -11
- package/components/shadcn-example/authentication/user-auth-form.js +0 -54
- package/components/shadcn-example/blog-detail-page/comment-section.d.ts +0 -15
- package/components/shadcn-example/blog-detail-page/comment-section.js +0 -83
- package/components/shadcn-example/blog-detail-page/content.d.ts +0 -7
- package/components/shadcn-example/blog-detail-page/content.js +0 -15
- package/components/shadcn-example/blog-detail-page/header.d.ts +0 -11
- package/components/shadcn-example/blog-detail-page/header.js +0 -36
- package/components/shadcn-example/blog-detail-page/index.d.ts +0 -25
- package/components/shadcn-example/blog-detail-page/index.js +0 -74
- package/components/shadcn-example/blog-page/blog-post-card.d.ts +0 -13
- package/components/shadcn-example/blog-page/blog-post-card.js +0 -30
- package/components/shadcn-example/blog-page/featured-post-sidebar-item.d.ts +0 -10
- package/components/shadcn-example/blog-page/featured-post-sidebar-item.js +0 -19
- package/components/shadcn-example/blog-page/index.d.ts +0 -20
- package/components/shadcn-example/blog-page/index.js +0 -36
- package/components/shadcn-example/coming-soon/countdown.d.ts +0 -2
- package/components/shadcn-example/coming-soon/countdown.js +0 -82
- package/components/shadcn-example/coming-soon/index.d.ts +0 -10
- package/components/shadcn-example/coming-soon/index.js +0 -41
- package/components/shadcn-io/color-picker/index.d.ts +0 -43
- package/components/shadcn-io/color-picker/index.js +0 -304
- package/components/shadcn-io/copy-button/index.d.ts +0 -16
- package/components/shadcn-io/copy-button/index.js +0 -121
- package/components/shadcn-io/dropzone/index.d.ts +0 -19
- package/components/shadcn-io/dropzone/index.js +0 -131
- package/components/shadcn-io/gantt/index.d.ts +0 -145
- package/components/shadcn-io/gantt/index.js +0 -766
- package/components/shadcn-io/table/index.d.ts +0 -60
- package/components/shadcn-io/table/index.js +0 -138
- package/templates/appcorp-v1/footer/bottom-bar.d.ts +0 -6
- package/templates/appcorp-v1/footer/bottom-bar.js +0 -25
- package/templates/appcorp-v1/footer/cta.d.ts +0 -6
- package/templates/appcorp-v1/footer/cta.js +0 -21
- package/templates/appcorp-v1/footer/footer-grid.d.ts +0 -14
- package/templates/appcorp-v1/footer/footer-grid.js +0 -52
- package/templates/appcorp-v1/footer/index.d.ts +0 -3
- package/templates/appcorp-v1/footer/index.js +0 -28
- package/templates/appcorp-v1/footer/newsletter.d.ts +0 -11
- package/templates/appcorp-v1/footer/newsletter.js +0 -28
- package/templates/appcorp-v1/footer/stats.d.ts +0 -6
- package/templates/appcorp-v1/footer/stats.js +0 -15
- package/templates/appcorp-v1/header/announcement-bar.d.ts +0 -3
- package/templates/appcorp-v1/header/announcement-bar.js +0 -15
- package/templates/appcorp-v1/header/dropdown-panel.d.ts +0 -8
- package/templates/appcorp-v1/header/dropdown-panel.js +0 -72
- package/templates/appcorp-v1/header/index.d.ts +0 -12
- package/templates/appcorp-v1/header/index.js +0 -16
- package/templates/appcorp-v1/header/mobile-menu.d.ts +0 -14
- package/templates/appcorp-v1/header/mobile-menu.js +0 -101
- package/templates/appcorp-v1/header/navigation-bar.d.ts +0 -3
- package/templates/appcorp-v1/header/navigation-bar.js +0 -117
- package/templates/appcorp-v1/header/social-button.d.ts +0 -7
- package/templates/appcorp-v1/header/social-button.js +0 -48
- package/templates/appcorp-v1/home.d.ts +0 -3
- package/templates/appcorp-v1/home.js +0 -27
- package/templates/data/appcorp-v1.d.ts +0 -93
- package/templates/data/appcorp-v1.js +0 -348
- package/templates/data/edupilotpro-v1.d.ts +0 -33
- package/templates/data/edupilotpro-v1.js +0 -116
- package/templates/data/school-v1.d.ts +0 -328
- package/templates/data/school-v1.js +0 -1563
- package/templates/edupilotpro-v1/feature-card.d.ts +0 -13
- package/templates/edupilotpro-v1/feature-card.js +0 -28
- package/templates/edupilotpro-v1/mockups/dashboard-mockup.d.ts +0 -3
- package/templates/edupilotpro-v1/mockups/dashboard-mockup.js +0 -55
- package/templates/school-v1/footer.d.ts +0 -3
- package/templates/school-v1/footer.js +0 -75
- package/templates/school-v1/index.d.ts +0 -18
- package/templates/school-v1/index.js +0 -60
- package/templates/school-v1/navigation.d.ts +0 -3
- package/templates/school-v1/navigation.js +0 -123
- package/templates/school-v1/sections/about.d.ts +0 -3
- package/templates/school-v1/sections/about.js +0 -49
- package/templates/school-v1/sections/admissions.d.ts +0 -3
- package/templates/school-v1/sections/admissions.js +0 -77
- package/templates/school-v1/sections/contact.d.ts +0 -3
- package/templates/school-v1/sections/contact.js +0 -67
- package/templates/school-v1/sections/faqs.d.ts +0 -3
- package/templates/school-v1/sections/faqs.js +0 -50
- package/templates/school-v1/sections/hero.d.ts +0 -3
- package/templates/school-v1/sections/hero.js +0 -132
- package/templates/school-v1/sections/management.d.ts +0 -3
- package/templates/school-v1/sections/management.js +0 -34
- package/templates/school-v1/sections/policies.d.ts +0 -3
- package/templates/school-v1/sections/policies.js +0 -127
- package/templates/school-v1/sections/programs.d.ts +0 -3
- package/templates/school-v1/sections/programs.js +0 -107
- package/templates/school-v1/sections/testimonials.d.ts +0 -3
- package/templates/school-v1/sections/testimonials.js +0 -46
- package/templates/school-v1/sections/why-choose-us.d.ts +0 -3
- package/templates/school-v1/sections/why-choose-us.js +0 -57
package/data/admin-dashboard.js
CHANGED
|
@@ -1,304 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adminDashboardData = void 0;
|
|
4
|
-
var lucide_react_1 = require("lucide-react");
|
|
5
|
-
exports.adminDashboardData = {
|
|
6
|
-
apps: [
|
|
7
|
-
{
|
|
8
|
-
name: "Analytics",
|
|
9
|
-
url: "#",
|
|
10
|
-
icon: lucide_react_1.PieChart,
|
|
11
|
-
enabled: true,
|
|
12
|
-
order: 1,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: "Terminal",
|
|
16
|
-
url: "#",
|
|
17
|
-
icon: lucide_react_1.SquareTerminal,
|
|
18
|
-
enabled: true,
|
|
19
|
-
order: 2,
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
offerUrl: "/offer",
|
|
23
|
-
username: "Muntazim",
|
|
24
|
-
email: "admin@company.com",
|
|
25
|
-
avatar: "https://www.w3schools.com/w3images/avatar6.png",
|
|
26
|
-
showLanguageSelector: true,
|
|
27
|
-
handleSignOut: function () { return console.log("Sign out"); },
|
|
28
|
-
clearBrowserCache: function () { return console.log("Clear browser cache"); },
|
|
29
|
-
profiles: [
|
|
30
|
-
{
|
|
31
|
-
name: "Subhan",
|
|
32
|
-
avatar: "https://www.w3schools.com/w3images/avatar6.png",
|
|
33
|
-
age: "3 Yrs",
|
|
34
|
-
enabled: true,
|
|
35
|
-
order: 1,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: "Mustajab",
|
|
39
|
-
avatar: "https://www.w3schools.com/w3images/avatar6.png",
|
|
40
|
-
age: "4 Yrs",
|
|
41
|
-
enabled: false,
|
|
42
|
-
order: 2,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
navItems: [
|
|
46
|
-
{
|
|
47
|
-
title: "Dashboard",
|
|
48
|
-
url: "/dashboard",
|
|
49
|
-
icon: lucide_react_1.SquareTerminal,
|
|
50
|
-
isActive: false,
|
|
51
|
-
enabled: true,
|
|
52
|
-
order: 1,
|
|
53
|
-
subItems: [],
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
title: "Flashcard Category",
|
|
57
|
-
url: "#",
|
|
58
|
-
icon: lucide_react_1.Bot,
|
|
59
|
-
isActive: true,
|
|
60
|
-
enabled: true,
|
|
61
|
-
order: 2,
|
|
62
|
-
subItems: [
|
|
63
|
-
{
|
|
64
|
-
title: "Manage",
|
|
65
|
-
url: "",
|
|
66
|
-
isActive: true,
|
|
67
|
-
enabled: true,
|
|
68
|
-
order: 1,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
title: "Toddler / Early childhood",
|
|
72
|
-
url: "#",
|
|
73
|
-
isActive: false,
|
|
74
|
-
enabled: true,
|
|
75
|
-
order: 2,
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
title: "Preschool / Pre-kindergarten",
|
|
79
|
-
url: "#",
|
|
80
|
-
isActive: false,
|
|
81
|
-
enabled: true,
|
|
82
|
-
order: 3,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
title: "Kindergarten",
|
|
86
|
-
url: "#",
|
|
87
|
-
isActive: false,
|
|
88
|
-
enabled: true,
|
|
89
|
-
order: 4,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
title: "Grade / Standard 1",
|
|
93
|
-
url: "#",
|
|
94
|
-
isActive: false,
|
|
95
|
-
enabled: true,
|
|
96
|
-
order: 5,
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
title: "Grade / Standard 2",
|
|
100
|
-
url: "#",
|
|
101
|
-
isActive: false,
|
|
102
|
-
enabled: true,
|
|
103
|
-
order: 6,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
title: "Grade / Standard 3",
|
|
107
|
-
url: "#",
|
|
108
|
-
isActive: false,
|
|
109
|
-
enabled: true,
|
|
110
|
-
order: 7,
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
title: "Grade / Standard 4",
|
|
114
|
-
url: "#",
|
|
115
|
-
isActive: false,
|
|
116
|
-
enabled: true,
|
|
117
|
-
order: 8,
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
title: "Grade / Standard 5",
|
|
121
|
-
url: "#",
|
|
122
|
-
isActive: false,
|
|
123
|
-
enabled: true,
|
|
124
|
-
order: 9,
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
title: "Flashcard",
|
|
130
|
-
url: "#",
|
|
131
|
-
icon: lucide_react_1.Bot,
|
|
132
|
-
isActive: false,
|
|
133
|
-
enabled: true,
|
|
134
|
-
order: 3,
|
|
135
|
-
subItems: [
|
|
136
|
-
{
|
|
137
|
-
title: "Toddler / Early childhood",
|
|
138
|
-
url: "#",
|
|
139
|
-
isActive: false,
|
|
140
|
-
enabled: true,
|
|
141
|
-
order: 1,
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
title: "Preschool / Pre-kindergarten",
|
|
145
|
-
url: "#",
|
|
146
|
-
isActive: false,
|
|
147
|
-
enabled: true,
|
|
148
|
-
order: 2,
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
title: "Kindergarten",
|
|
152
|
-
url: "#",
|
|
153
|
-
isActive: false,
|
|
154
|
-
enabled: true,
|
|
155
|
-
order: 3,
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
title: "Grade / Standard 1",
|
|
159
|
-
url: "#",
|
|
160
|
-
isActive: false,
|
|
161
|
-
enabled: true,
|
|
162
|
-
order: 4,
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
title: "Grade / Standard 2",
|
|
166
|
-
url: "#",
|
|
167
|
-
isActive: false,
|
|
168
|
-
enabled: true,
|
|
169
|
-
order: 5,
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
title: "Grade / Standard 3",
|
|
173
|
-
url: "#",
|
|
174
|
-
isActive: false,
|
|
175
|
-
enabled: true,
|
|
176
|
-
order: 6,
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
title: "Grade / Standard 4",
|
|
180
|
-
url: "#",
|
|
181
|
-
isActive: false,
|
|
182
|
-
enabled: true,
|
|
183
|
-
order: 7,
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
title: "Grade / Standard 5",
|
|
187
|
-
url: "#",
|
|
188
|
-
isActive: false,
|
|
189
|
-
enabled: true,
|
|
190
|
-
order: 8,
|
|
191
|
-
},
|
|
192
|
-
],
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
title: "Quizzes",
|
|
196
|
-
url: "#",
|
|
197
|
-
icon: lucide_react_1.BookOpen,
|
|
198
|
-
isActive: false,
|
|
199
|
-
enabled: true,
|
|
200
|
-
order: 4,
|
|
201
|
-
subItems: [
|
|
202
|
-
{
|
|
203
|
-
title: "Introduction",
|
|
204
|
-
url: "#",
|
|
205
|
-
isActive: false,
|
|
206
|
-
enabled: true,
|
|
207
|
-
order: 1,
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
title: "Get Started",
|
|
211
|
-
url: "#",
|
|
212
|
-
isActive: false,
|
|
213
|
-
enabled: true,
|
|
214
|
-
order: 2,
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
title: "Tutorials",
|
|
218
|
-
url: "#",
|
|
219
|
-
isActive: false,
|
|
220
|
-
enabled: true,
|
|
221
|
-
order: 3,
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
title: "Changelog",
|
|
225
|
-
url: "#",
|
|
226
|
-
isActive: false,
|
|
227
|
-
enabled: true,
|
|
228
|
-
order: 4,
|
|
229
|
-
},
|
|
230
|
-
],
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
title: "Settings",
|
|
234
|
-
url: "#",
|
|
235
|
-
icon: lucide_react_1.Settings2,
|
|
236
|
-
isActive: false,
|
|
237
|
-
enabled: true,
|
|
238
|
-
order: 5,
|
|
239
|
-
subItems: [
|
|
240
|
-
{
|
|
241
|
-
title: "General",
|
|
242
|
-
url: "#",
|
|
243
|
-
isActive: false,
|
|
244
|
-
enabled: true,
|
|
245
|
-
order: 1,
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
title: "Kids",
|
|
249
|
-
url: "#",
|
|
250
|
-
isActive: false,
|
|
251
|
-
enabled: true,
|
|
252
|
-
order: 2,
|
|
253
|
-
},
|
|
254
|
-
],
|
|
255
|
-
},
|
|
256
|
-
],
|
|
257
|
-
footerNavItems: [
|
|
258
|
-
{
|
|
259
|
-
title: "Upgrade to Pro",
|
|
260
|
-
url: "#",
|
|
261
|
-
icon: lucide_react_1.Sparkles,
|
|
262
|
-
isActive: false,
|
|
263
|
-
enabled: true,
|
|
264
|
-
order: 1,
|
|
265
|
-
subItems: [],
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
title: "Divider",
|
|
269
|
-
url: "#",
|
|
270
|
-
icon: lucide_react_1.Sparkles,
|
|
271
|
-
isActive: false,
|
|
272
|
-
enabled: true,
|
|
273
|
-
order: 2,
|
|
274
|
-
subItems: [],
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
title: "Account",
|
|
278
|
-
url: "#",
|
|
279
|
-
icon: lucide_react_1.BadgeCheck,
|
|
280
|
-
isActive: false,
|
|
281
|
-
enabled: true,
|
|
282
|
-
order: 3,
|
|
283
|
-
subItems: [],
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
title: "Billing",
|
|
287
|
-
url: "#",
|
|
288
|
-
icon: lucide_react_1.CreditCard,
|
|
289
|
-
isActive: false,
|
|
290
|
-
enabled: true,
|
|
291
|
-
order: 4,
|
|
292
|
-
subItems: [],
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
title: "Notifications",
|
|
296
|
-
url: "#",
|
|
297
|
-
icon: lucide_react_1.Bell,
|
|
298
|
-
isActive: false,
|
|
299
|
-
enabled: true,
|
|
300
|
-
order: 5,
|
|
301
|
-
subItems: [],
|
|
302
|
-
},
|
|
303
|
-
],
|
|
304
|
-
};
|
|
1
|
+
"use strict";import{BadgeCheck as a,Bell as l,BookOpen as i,Bot as e,CreditCard as d,PieChart as s,Settings2 as o,Sparkles as r,SquareTerminal as t}from"lucide-react";export const adminDashboardData={apps:[{name:"Analytics",url:"#",icon:s,enabled:!0,order:1},{name:"Terminal",url:"#",icon:t,enabled:!0,order:2}],offerUrl:"/offer",username:"Muntazim",email:"admin@company.com",avatar:"https://www.w3schools.com/w3images/avatar6.png",showLanguageSelector:!0,handleSignOut:()=>console.log("Sign out"),clearBrowserCache:()=>console.log("Clear browser cache"),profiles:[{name:"Subhan",avatar:"https://www.w3schools.com/w3images/avatar6.png",age:"3 Yrs",enabled:!0,order:1},{name:"Mustajab",avatar:"https://www.w3schools.com/w3images/avatar6.png",age:"4 Yrs",enabled:!1,order:2}],navItems:[{title:"Dashboard",url:"/dashboard",icon:t,isActive:!1,enabled:!0,order:1,subItems:[]},{title:"Flashcard Category",url:"#",icon:e,isActive:!0,enabled:!0,order:2,subItems:[{title:"Manage",url:"",isActive:!0,enabled:!0,order:1},{title:"Toddler / Early childhood",url:"#",isActive:!1,enabled:!0,order:2},{title:"Preschool / Pre-kindergarten",url:"#",isActive:!1,enabled:!0,order:3},{title:"Kindergarten",url:"#",isActive:!1,enabled:!0,order:4},{title:"Grade / Standard 1",url:"#",isActive:!1,enabled:!0,order:5},{title:"Grade / Standard 2",url:"#",isActive:!1,enabled:!0,order:6},{title:"Grade / Standard 3",url:"#",isActive:!1,enabled:!0,order:7},{title:"Grade / Standard 4",url:"#",isActive:!1,enabled:!0,order:8},{title:"Grade / Standard 5",url:"#",isActive:!1,enabled:!0,order:9}]},{title:"Flashcard",url:"#",icon:e,isActive:!1,enabled:!0,order:3,subItems:[{title:"Toddler / Early childhood",url:"#",isActive:!1,enabled:!0,order:1},{title:"Preschool / Pre-kindergarten",url:"#",isActive:!1,enabled:!0,order:2},{title:"Kindergarten",url:"#",isActive:!1,enabled:!0,order:3},{title:"Grade / Standard 1",url:"#",isActive:!1,enabled:!0,order:4},{title:"Grade / Standard 2",url:"#",isActive:!1,enabled:!0,order:5},{title:"Grade / Standard 3",url:"#",isActive:!1,enabled:!0,order:6},{title:"Grade / Standard 4",url:"#",isActive:!1,enabled:!0,order:7},{title:"Grade / Standard 5",url:"#",isActive:!1,enabled:!0,order:8}]},{title:"Quizzes",url:"#",icon:i,isActive:!1,enabled:!0,order:4,subItems:[{title:"Introduction",url:"#",isActive:!1,enabled:!0,order:1},{title:"Get Started",url:"#",isActive:!1,enabled:!0,order:2},{title:"Tutorials",url:"#",isActive:!1,enabled:!0,order:3},{title:"Changelog",url:"#",isActive:!1,enabled:!0,order:4}]},{title:"Settings",url:"#",icon:o,isActive:!1,enabled:!0,order:5,subItems:[{title:"General",url:"#",isActive:!1,enabled:!0,order:1},{title:"Kids",url:"#",isActive:!1,enabled:!0,order:2}]}],footerNavItems:[{title:"Upgrade to Pro",url:"#",icon:r,isActive:!1,enabled:!0,order:1,subItems:[]},{title:"Divider",url:"#",icon:r,isActive:!1,enabled:!0,order:2,subItems:[]},{title:"Account",url:"#",icon:a,isActive:!1,enabled:!0,order:3,subItems:[]},{title:"Billing",url:"#",icon:d,isActive:!1,enabled:!0,order:4,subItems:[]},{title:"Notifications",url:"#",icon:l,isActive:!1,enabled:!0,order:5,subItems:[]}]};
|
|
@@ -1,150 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
45
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
46
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
47
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
48
|
-
function step(op) {
|
|
49
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
50
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
51
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
52
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
53
|
-
switch (op[0]) {
|
|
54
|
-
case 0: case 1: t = op; break;
|
|
55
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
56
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
57
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
58
|
-
default:
|
|
59
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
60
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
61
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
62
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
63
|
-
if (t[2]) _.ops.pop();
|
|
64
|
-
_.trys.pop(); continue;
|
|
65
|
-
}
|
|
66
|
-
op = body.call(thisArg, _);
|
|
67
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
68
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72
|
-
exports.useEnhancedCombobox = void 0;
|
|
73
|
-
var react_1 = __importStar(require("react"));
|
|
74
|
-
var fetch_data_1 = require("@react-pakistan/util-functions/general/fetch-data");
|
|
75
|
-
var api_methods_1 = require("@react-pakistan/util-functions/constants/api-methods");
|
|
76
|
-
var use_debounce_1 = require("@react-pakistan/util-functions/hooks/use-debounce");
|
|
77
|
-
var enhanced_combobox_1 = require("../components/enhanced-combobox");
|
|
78
|
-
var useEnhancedCombobox = function (_a) {
|
|
79
|
-
var emptyText = _a.emptyText, error = _a.error, formatSearchResult = _a.formatSearchResult, id = _a.id, info = _a.info, label = _a.label, onValueChange = _a.onValueChange, options = _a.options, placeholder = _a.placeholder, required = _a.required, searchEndpoint = _a.searchEndpoint, searchPlaceholder = _a.searchPlaceholder, value = _a.value;
|
|
80
|
-
var _b = (0, react_1.useState)(""), searchQuery = _b[0], setSearchQuery = _b[1];
|
|
81
|
-
var _c = (0, react_1.useState)([]), searchOptions = _c[0], setSearchOptions = _c[1];
|
|
82
|
-
var _d = (0, react_1.useState)(false), loading = _d[0], setLoading = _d[1];
|
|
83
|
-
var debouncedSearchQuery = (0, use_debounce_1.useDebounce)(searchQuery, 800);
|
|
84
|
-
(0, react_1.useEffect)(function () {
|
|
85
|
-
if (!debouncedSearchQuery) {
|
|
86
|
-
setSearchOptions([]);
|
|
87
|
-
setLoading(false);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
setLoading(true);
|
|
91
|
-
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
92
|
-
var data, formatter, error_1;
|
|
93
|
-
return __generator(this, function (_a) {
|
|
94
|
-
switch (_a.label) {
|
|
95
|
-
case 0:
|
|
96
|
-
_a.trys.push([0, 2, 3, 4]);
|
|
97
|
-
return [4 /*yield*/, (0, fetch_data_1.fetchData)({
|
|
98
|
-
url: searchEndpoint,
|
|
99
|
-
method: api_methods_1.API_METHODS.GET,
|
|
100
|
-
params: { searchQuery: debouncedSearchQuery },
|
|
101
|
-
})];
|
|
102
|
-
case 1:
|
|
103
|
-
data = (_a.sent()).data;
|
|
104
|
-
formatter = formatSearchResult ||
|
|
105
|
-
(function (item) {
|
|
106
|
-
var _a, _b;
|
|
107
|
-
return ({
|
|
108
|
-
label: String((_a = item.label) !== null && _a !== void 0 ? _a : ""),
|
|
109
|
-
value: String((_b = item.value) !== null && _b !== void 0 ? _b : ""),
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
setSearchOptions((data.items || []).map(formatter));
|
|
113
|
-
return [3 /*break*/, 4];
|
|
114
|
-
case 2:
|
|
115
|
-
error_1 = _a.sent();
|
|
116
|
-
console.error("Failed to fetch expense categories:", error_1);
|
|
117
|
-
setSearchOptions([]);
|
|
118
|
-
return [3 /*break*/, 4];
|
|
119
|
-
case 3:
|
|
120
|
-
setLoading(false);
|
|
121
|
-
return [7 /*endfinally*/];
|
|
122
|
-
case 4: return [2 /*return*/];
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
}); })();
|
|
126
|
-
}, [debouncedSearchQuery, searchEndpoint]);
|
|
127
|
-
var mappedOptions = (0, react_1.useMemo)(function () {
|
|
128
|
-
return searchOptions.length > 0 ? searchOptions : options;
|
|
129
|
-
}, [searchOptions, options]);
|
|
130
|
-
var handleSearchChange = (0, react_1.useCallback)(function (query) {
|
|
131
|
-
setSearchQuery(query);
|
|
132
|
-
}, []);
|
|
133
|
-
var enhancedComboboxElement = (0, react_1.useMemo)(function () { return (react_1.default.createElement(enhanced_combobox_1.EnhancedCombobox, { emptyText: emptyText, error: error, id: id, info: info, label: label, loading: loading, onSearchChange: handleSearchChange, onValueChange: onValueChange, options: mappedOptions, placeholder: placeholder, required: required, searchPlaceholder: searchPlaceholder, value: value })); }, [
|
|
134
|
-
emptyText,
|
|
135
|
-
error,
|
|
136
|
-
handleSearchChange,
|
|
137
|
-
id,
|
|
138
|
-
info,
|
|
139
|
-
label,
|
|
140
|
-
loading,
|
|
141
|
-
mappedOptions,
|
|
142
|
-
onValueChange,
|
|
143
|
-
placeholder,
|
|
144
|
-
required,
|
|
145
|
-
searchPlaceholder,
|
|
146
|
-
value,
|
|
147
|
-
]);
|
|
148
|
-
return { enhancedComboboxElement: enhancedComboboxElement };
|
|
149
|
-
};
|
|
150
|
-
exports.useEnhancedCombobox = useEnhancedCombobox;
|
|
1
|
+
"use strict";import M,{useCallback as V,useEffect as O,useMemo as Q,useState as r}from"react";import{EnhancedCombobox as k}from"../components/enhanced-combobox";const A={GET:"GET"};function F(e,t){const[c,n]=r(e);return O(()=>{const a=setTimeout(()=>n(e),t);return()=>clearTimeout(a)},[e,t]),c}export const useEnhancedCombobox=({emptyText:e,error:t,formatSearchResult:c,id:n,info:a,label:d,onValueChange:b,options:f,placeholder:p,required:g,searchEndpoint:E,searchPlaceholder:S,value:C})=>{const[v,G]=r(""),[s,u]=r([]),[x,l]=r(!1),i=F(v,800);O(()=>{if(!i){u([]),l(!1);return}l(!0),(async()=>{try{const{fetchData:o}=await import("@react-pakistan/util-functions/general/fetch-data"),{data:_}=await o({url:E,method:A.GET,params:{searchQuery:i}}),w=c||(D=>{var m,h;return{label:String((m=D.label)!==null&&m!==void 0?m:""),value:String((h=D.value)!==null&&h!==void 0?h:"")}});u((_.items||[]).map(w))}catch(o){console.error("Failed to fetch expense categories:",o),u([])}finally{l(!1)}})()},[i,E]);const y=Q(()=>s.length>0?s:f,[s,f]),T=V(o=>{G(o)},[]);return{enhancedComboboxElement:Q(()=>M.createElement(k,{emptyText:e,error:t,id:n,info:a,label:d,loading:x,onSearchChange:T,onValueChange:b,options:y,placeholder:p,required:g,searchPlaceholder:S,value:C}),[e,t,T,n,a,d,x,y,b,p,g,S,C])}};
|
package/hooks/use-mobile.js
CHANGED
|
@@ -1,51 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.useIsMobile = useIsMobile;
|
|
37
|
-
var React = __importStar(require("react"));
|
|
38
|
-
var MOBILE_BREAKPOINT = 768;
|
|
39
|
-
function useIsMobile() {
|
|
40
|
-
var _a = React.useState(undefined), isMobile = _a[0], setIsMobile = _a[1];
|
|
41
|
-
React.useEffect(function () {
|
|
42
|
-
var mql = window.matchMedia("(max-width: ".concat(MOBILE_BREAKPOINT - 1, "px)"));
|
|
43
|
-
var onChange = function () {
|
|
44
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
45
|
-
};
|
|
46
|
-
mql.addEventListener("change", onChange);
|
|
47
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
48
|
-
return function () { return mql.removeEventListener("change", onChange); };
|
|
49
|
-
}, []);
|
|
50
|
-
return !!isMobile;
|
|
51
|
-
}
|
|
1
|
+
"use strict";import*as o from"react";const e=768;export function useIsMobile(){const[s,n]=o.useState(void 0);return o.useEffect(()=>{const t=window.matchMedia(`(max-width: ${e-1}px)`),i=()=>{n(window.innerWidth<e)};return t.addEventListener("change",i),n(window.innerWidth<e),()=>t.removeEventListener("change",i)},[]),!!s}
|
|
@@ -1,23 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useOutsideClick = void 0;
|
|
4
|
-
var react_1 = require("react");
|
|
5
|
-
var useOutsideClick = function (ref, callback) {
|
|
6
|
-
(0, react_1.useEffect)(function () {
|
|
7
|
-
var listener = function (event) {
|
|
8
|
-
var target = event.target;
|
|
9
|
-
// DO NOTHING if the element being clicked is the target element or their children
|
|
10
|
-
if (!ref.current || (target && ref.current.contains(target))) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
callback(event);
|
|
14
|
-
};
|
|
15
|
-
document.addEventListener("mousedown", listener);
|
|
16
|
-
document.addEventListener("touchstart", listener);
|
|
17
|
-
return function () {
|
|
18
|
-
document.removeEventListener("mousedown", listener);
|
|
19
|
-
document.removeEventListener("touchstart", listener);
|
|
20
|
-
};
|
|
21
|
-
}, [ref, callback]);
|
|
22
|
-
};
|
|
23
|
-
exports.useOutsideClick = useOutsideClick;
|
|
1
|
+
"use strict";import{useEffect as s}from"react";export const useOutsideClick=(e,n)=>{s(()=>{const t=r=>{const o=r.target;!e.current||o&&e.current.contains(o)||n(r)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,n])};
|