nextjs-cms 0.0.1 → 0.5.2
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/LICENSE +21 -0
- package/README.md +289 -0
- package/dist/api/axios/axiosInstance.d.ts +2 -0
- package/dist/api/axios/axiosInstance.d.ts.map +1 -0
- package/dist/api/axios/axiosInstance.js +8 -0
- package/dist/api/index.d.ts +856 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +12 -0
- package/dist/api/lib/serverActions.d.ts +240 -0
- package/dist/api/lib/serverActions.d.ts.map +1 -0
- package/dist/api/lib/serverActions.js +834 -0
- package/dist/api/root.d.ts +829 -0
- package/dist/api/root.d.ts.map +1 -0
- package/dist/api/root.js +30 -0
- package/dist/api/routers/accountSettings.d.ts +61 -0
- package/dist/api/routers/accountSettings.d.ts.map +1 -0
- package/dist/api/routers/accountSettings.js +108 -0
- package/dist/api/routers/admins.d.ts +106 -0
- package/dist/api/routers/admins.d.ts.map +1 -0
- package/dist/api/routers/admins.js +219 -0
- package/dist/api/routers/auth.d.ts +48 -0
- package/dist/api/routers/auth.d.ts.map +1 -0
- package/dist/api/routers/auth.js +25 -0
- package/dist/api/routers/categorySection.d.ts +104 -0
- package/dist/api/routers/categorySection.d.ts.map +1 -0
- package/dist/api/routers/categorySection.js +38 -0
- package/dist/api/routers/cmsSettings.d.ts +49 -0
- package/dist/api/routers/cmsSettings.d.ts.map +1 -0
- package/dist/api/routers/cmsSettings.js +51 -0
- package/dist/api/routers/cpanel.d.ts +84 -0
- package/dist/api/routers/cpanel.d.ts.map +1 -0
- package/dist/api/routers/cpanel.js +216 -0
- package/dist/api/routers/files.d.ts +48 -0
- package/dist/api/routers/files.d.ts.map +1 -0
- package/dist/api/routers/files.js +23 -0
- package/dist/api/routers/gallery.d.ts +36 -0
- package/dist/api/routers/gallery.d.ts.map +1 -0
- package/dist/api/routers/gallery.js +62 -0
- package/dist/api/routers/googleAnalytics.d.ts +31 -0
- package/dist/api/routers/googleAnalytics.d.ts.map +1 -0
- package/dist/api/routers/googleAnalytics.js +7 -0
- package/dist/api/routers/hasItemsSection.d.ts +140 -0
- package/dist/api/routers/hasItemsSection.d.ts.map +1 -0
- package/dist/api/routers/hasItemsSection.js +34 -0
- package/dist/api/routers/navigation.d.ts +52 -0
- package/dist/api/routers/navigation.d.ts.map +1 -0
- package/dist/api/routers/navigation.js +11 -0
- package/dist/api/routers/simpleSection.d.ts +58 -0
- package/dist/api/routers/simpleSection.d.ts.map +1 -0
- package/dist/api/routers/simpleSection.js +12 -0
- package/dist/api/trpc.d.ts +107 -0
- package/dist/api/trpc.d.ts.map +1 -0
- package/dist/api/trpc.js +72 -0
- package/dist/auth/axios/axiosInstance.d.ts +2 -0
- package/dist/auth/axios/axiosInstance.d.ts.map +1 -0
- package/dist/auth/axios/axiosInstance.js +8 -0
- package/dist/auth/csrf.d.ts +30 -0
- package/dist/auth/csrf.d.ts.map +1 -0
- package/dist/auth/csrf.js +76 -0
- package/dist/auth/hooks/index.d.ts +4 -0
- package/dist/auth/hooks/index.d.ts.map +1 -0
- package/dist/auth/hooks/index.js +3 -0
- package/dist/auth/hooks/useAxiosPrivate.d.ts +5 -0
- package/dist/auth/hooks/useAxiosPrivate.d.ts.map +1 -0
- package/dist/auth/hooks/useAxiosPrivate.js +74 -0
- package/dist/auth/hooks/useRefreshToken.d.ts +7 -0
- package/dist/auth/hooks/useRefreshToken.d.ts.map +1 -0
- package/dist/auth/hooks/useRefreshToken.js +79 -0
- package/dist/auth/index.d.ts +23 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +44 -0
- package/dist/auth/jwt.d.ts +6 -0
- package/dist/auth/jwt.d.ts.map +1 -0
- package/dist/auth/jwt.js +25 -0
- package/dist/auth/lib/actions.d.ts +33 -0
- package/dist/auth/lib/actions.d.ts.map +1 -0
- package/dist/auth/lib/actions.js +209 -0
- package/dist/auth/lib/client.d.ts +4 -0
- package/dist/auth/lib/client.d.ts.map +1 -0
- package/dist/auth/lib/client.js +46 -0
- package/dist/auth/lib/index.d.ts +3 -0
- package/dist/auth/lib/index.d.ts.map +1 -0
- package/dist/auth/lib/index.js +2 -0
- package/dist/auth/react.d.ts +106 -0
- package/dist/auth/react.d.ts.map +1 -0
- package/dist/auth/react.js +347 -0
- package/dist/auth/trpc.d.ts +6 -0
- package/dist/auth/trpc.d.ts.map +1 -0
- package/dist/auth/trpc.js +81 -0
- package/dist/core/config/config-loader.d.ts +92 -0
- package/dist/core/config/config-loader.d.ts.map +1 -0
- package/dist/core/config/config-loader.js +230 -0
- package/dist/core/config/index.d.ts +3 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/index.js +1 -0
- package/dist/core/config/loader.d.ts +2 -0
- package/dist/core/config/loader.d.ts.map +1 -0
- package/dist/core/config/loader.js +42 -0
- package/dist/core/db/index.d.ts +2 -0
- package/dist/core/db/index.d.ts.map +1 -0
- package/dist/core/db/index.js +1 -0
- package/dist/core/db/table-checker/DbTable.d.ts +6 -0
- package/dist/core/db/table-checker/DbTable.d.ts.map +1 -0
- package/dist/core/db/table-checker/DbTable.js +5 -0
- package/dist/core/db/table-checker/MysqlTable.d.ts +34 -0
- package/dist/core/db/table-checker/MysqlTable.d.ts.map +1 -0
- package/dist/core/db/table-checker/MysqlTable.js +102 -0
- package/dist/core/db/table-checker/index.d.ts +2 -0
- package/dist/core/db/table-checker/index.d.ts.map +1 -0
- package/dist/core/db/table-checker/index.js +1 -0
- package/dist/core/factories/FieldFactory.d.ts +124 -0
- package/dist/core/factories/FieldFactory.d.ts.map +1 -0
- package/dist/core/factories/FieldFactory.js +411 -0
- package/dist/core/factories/SectionFactory.d.ts +110 -0
- package/dist/core/factories/SectionFactory.d.ts.map +1 -0
- package/dist/core/factories/SectionFactory.js +415 -0
- package/dist/core/factories/index.d.ts +3 -0
- package/dist/core/factories/index.d.ts.map +1 -0
- package/dist/core/factories/index.js +2 -0
- package/dist/core/fields/checkbox.d.ts +63 -0
- package/dist/core/fields/checkbox.d.ts.map +1 -0
- package/dist/core/fields/checkbox.js +62 -0
- package/dist/core/fields/color.d.ts +84 -0
- package/dist/core/fields/color.d.ts.map +1 -0
- package/dist/core/fields/color.js +91 -0
- package/dist/core/fields/date.d.ts +100 -0
- package/dist/core/fields/date.d.ts.map +1 -0
- package/dist/core/fields/date.js +108 -0
- package/dist/core/fields/document.d.ts +180 -0
- package/dist/core/fields/document.d.ts.map +1 -0
- package/dist/core/fields/document.js +277 -0
- package/dist/core/fields/field-group.d.ts +18 -0
- package/dist/core/fields/field-group.d.ts.map +1 -0
- package/dist/core/fields/field-group.js +6 -0
- package/dist/core/fields/field.d.ts +126 -0
- package/dist/core/fields/field.d.ts.map +1 -0
- package/dist/core/fields/field.js +148 -0
- package/dist/core/fields/fileField.d.ts +15 -0
- package/dist/core/fields/fileField.d.ts.map +1 -0
- package/dist/core/fields/fileField.js +5 -0
- package/dist/core/fields/index.d.ts +65 -0
- package/dist/core/fields/index.d.ts.map +1 -0
- package/dist/core/fields/index.js +18 -0
- package/dist/core/fields/map.d.ts +167 -0
- package/dist/core/fields/map.d.ts.map +1 -0
- package/dist/core/fields/map.js +152 -0
- package/dist/core/fields/number.d.ts +186 -0
- package/dist/core/fields/number.d.ts.map +1 -0
- package/dist/core/fields/number.js +241 -0
- package/dist/core/fields/password.d.ts +109 -0
- package/dist/core/fields/password.d.ts.map +1 -0
- package/dist/core/fields/password.js +133 -0
- package/dist/core/fields/photo.d.ts +289 -0
- package/dist/core/fields/photo.d.ts.map +1 -0
- package/dist/core/fields/photo.js +410 -0
- package/dist/core/fields/richText.d.ts +295 -0
- package/dist/core/fields/richText.d.ts.map +1 -0
- package/dist/core/fields/richText.js +338 -0
- package/dist/core/fields/select.d.ts +366 -0
- package/dist/core/fields/select.d.ts.map +1 -0
- package/dist/core/fields/select.js +499 -0
- package/dist/core/fields/selectMultiple.d.ts +236 -0
- package/dist/core/fields/selectMultiple.d.ts.map +1 -0
- package/dist/core/fields/selectMultiple.js +417 -0
- package/dist/core/fields/tags.d.ts +131 -0
- package/dist/core/fields/tags.d.ts.map +1 -0
- package/dist/core/fields/tags.js +105 -0
- package/dist/core/fields/text.d.ts +136 -0
- package/dist/core/fields/text.d.ts.map +1 -0
- package/dist/core/fields/text.js +157 -0
- package/dist/core/fields/textArea.d.ts +107 -0
- package/dist/core/fields/textArea.d.ts.map +1 -0
- package/dist/core/fields/textArea.js +126 -0
- package/dist/core/fields/video.d.ts +148 -0
- package/dist/core/fields/video.d.ts.map +1 -0
- package/dist/core/fields/video.js +248 -0
- package/dist/core/helpers/entity.d.ts +8 -0
- package/dist/core/helpers/entity.d.ts.map +1 -0
- package/dist/core/helpers/entity.js +27 -0
- package/dist/core/helpers/index.d.ts +5 -0
- package/dist/core/helpers/index.d.ts.map +1 -0
- package/dist/core/helpers/index.js +3 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +7 -0
- package/dist/core/sections/category.d.ts +283 -0
- package/dist/core/sections/category.d.ts.map +1 -0
- package/dist/core/sections/category.js +147 -0
- package/dist/core/sections/hasItems.d.ts +632 -0
- package/dist/core/sections/hasItems.d.ts.map +1 -0
- package/dist/core/sections/hasItems.js +144 -0
- package/dist/core/sections/index.d.ts +5 -0
- package/dist/core/sections/index.d.ts.map +1 -0
- package/dist/core/sections/index.js +4 -0
- package/dist/core/sections/section.d.ts +226 -0
- package/dist/core/sections/section.d.ts.map +1 -0
- package/dist/core/sections/section.js +341 -0
- package/dist/core/sections/simple.d.ts +99 -0
- package/dist/core/sections/simple.d.ts.map +1 -0
- package/dist/core/sections/simple.js +95 -0
- package/dist/core/security/dom.d.ts +11 -0
- package/dist/core/security/dom.d.ts.map +1 -0
- package/dist/core/security/dom.js +92 -0
- package/dist/core/submit/ItemEditSubmit.d.ts +76 -0
- package/dist/core/submit/ItemEditSubmit.d.ts.map +1 -0
- package/dist/core/submit/ItemEditSubmit.js +186 -0
- package/dist/core/submit/NewItemSubmit.d.ts +14 -0
- package/dist/core/submit/NewItemSubmit.d.ts.map +1 -0
- package/dist/core/submit/NewItemSubmit.js +93 -0
- package/dist/core/submit/SimpleSectionSubmit.d.ts +13 -0
- package/dist/core/submit/SimpleSectionSubmit.d.ts.map +1 -0
- package/dist/core/submit/SimpleSectionSubmit.js +93 -0
- package/dist/core/submit/index.d.ts +5 -0
- package/dist/core/submit/index.d.ts.map +1 -0
- package/dist/core/submit/index.js +4 -0
- package/dist/core/submit/submit.d.ts +116 -0
- package/dist/core/submit/submit.d.ts.map +1 -0
- package/dist/core/submit/submit.js +479 -0
- package/dist/core/types/index.d.ts +280 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/core/types/index.js +1 -0
- package/dist/db/client.d.ts +9 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +19 -0
- package/dist/db/config.d.ts +6 -0
- package/dist/db/config.d.ts.map +1 -0
- package/dist/db/config.js +22 -0
- package/dist/db/drizzle.config.d.ts +6 -0
- package/dist/db/drizzle.config.d.ts.map +1 -0
- package/dist/db/drizzle.config.js +18 -0
- package/dist/db/index.d.ts +3 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +3 -0
- package/dist/db/schema.d.ts +639 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +73 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/translations/dictionaries/ar.json +279 -0
- package/dist/translations/dictionaries/en.json +279 -0
- package/dist/translations/index.d.ts +3 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/index.js +15 -0
- package/dist/utils/CpanelApi.d.ts +25 -0
- package/dist/utils/CpanelApi.d.ts.map +1 -0
- package/dist/utils/CpanelApi.js +64 -0
- package/dist/utils/constants.d.ts +14 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +61 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/utils.d.ts +60 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +132 -0
- package/dist/validators/checkbox.d.ts +4 -0
- package/dist/validators/checkbox.d.ts.map +1 -0
- package/dist/validators/checkbox.js +12 -0
- package/dist/validators/color.d.ts +4 -0
- package/dist/validators/color.d.ts.map +1 -0
- package/dist/validators/color.js +7 -0
- package/dist/validators/date.d.ts +4 -0
- package/dist/validators/date.d.ts.map +1 -0
- package/dist/validators/date.js +5 -0
- package/dist/validators/document.d.ts +4 -0
- package/dist/validators/document.d.ts.map +1 -0
- package/dist/validators/document.js +57 -0
- package/dist/validators/index.d.ts +15 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +14 -0
- package/dist/validators/map.d.ts +4 -0
- package/dist/validators/map.d.ts.map +1 -0
- package/dist/validators/map.js +5 -0
- package/dist/validators/number.d.ts +4 -0
- package/dist/validators/number.d.ts.map +1 -0
- package/dist/validators/number.js +20 -0
- package/dist/validators/password.d.ts +4 -0
- package/dist/validators/password.d.ts.map +1 -0
- package/dist/validators/password.js +11 -0
- package/dist/validators/photo.d.ts +4 -0
- package/dist/validators/photo.d.ts.map +1 -0
- package/dist/validators/photo.js +100 -0
- package/dist/validators/richText.d.ts +4 -0
- package/dist/validators/richText.d.ts.map +1 -0
- package/dist/validators/richText.js +8 -0
- package/dist/validators/select-multiple.d.ts +10 -0
- package/dist/validators/select-multiple.d.ts.map +1 -0
- package/dist/validators/select-multiple.js +20 -0
- package/dist/validators/select.d.ts +4 -0
- package/dist/validators/select.d.ts.map +1 -0
- package/dist/validators/select.js +5 -0
- package/dist/validators/text.d.ts +4 -0
- package/dist/validators/text.d.ts.map +1 -0
- package/dist/validators/text.js +7 -0
- package/dist/validators/textarea.d.ts +4 -0
- package/dist/validators/textarea.d.ts.map +1 -0
- package/dist/validators/textarea.js +7 -0
- package/dist/validators/video.d.ts +4 -0
- package/dist/validators/video.d.ts.map +1 -0
- package/dist/validators/video.js +57 -0
- package/package.json +150 -6
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
{
|
|
2
|
+
"adminDoesNotExist": "Admin does not exist",
|
|
3
|
+
"admins": "Admins",
|
|
4
|
+
"admin_privileges": "Admin Privileges",
|
|
5
|
+
"create_new_admin": "Create New Admin",
|
|
6
|
+
"submit_new_admin": "Submit New Admin",
|
|
7
|
+
"admins_list": "Admins List",
|
|
8
|
+
"delete_admin": "Delete Admin",
|
|
9
|
+
"delete_admin_text": "Are you sure you want to delete this admin?",
|
|
10
|
+
"edit_admin": "Edit Admin",
|
|
11
|
+
"edit_admin_text": "Edit Admin",
|
|
12
|
+
"adminNotFound": "Admin not found",
|
|
13
|
+
"sectionNotFound": "Section not found",
|
|
14
|
+
"adminDeletedSuccessfully": "Admin deleted successfully",
|
|
15
|
+
"masterAdminCannotBeDeleted": "Master admin cannot be deleted",
|
|
16
|
+
"masterAdminCannotBeModified": "Master admin cannot be modified",
|
|
17
|
+
"login_to_your_account": "Login to your account",
|
|
18
|
+
"login": "Login",
|
|
19
|
+
"logout": "Logout",
|
|
20
|
+
"username": "Username",
|
|
21
|
+
"password": "Password",
|
|
22
|
+
"remember_me": "Remember me",
|
|
23
|
+
"have_account": "Have an account?",
|
|
24
|
+
"dont_have_an_account": "Don't have an account?",
|
|
25
|
+
"register": "Register",
|
|
26
|
+
"register_now": "Register now",
|
|
27
|
+
"register_new_account": "Register new account",
|
|
28
|
+
"forgot_password": "Forgot password?",
|
|
29
|
+
"reset_password": "Reset password",
|
|
30
|
+
"forgot_password_text": "Enter your email address and we will send you instructions on how to reset your password.",
|
|
31
|
+
"email": "Email",
|
|
32
|
+
"send_reset_link": "Send reset link",
|
|
33
|
+
"comply_with_terms": "By registering, you agree to our",
|
|
34
|
+
"terms_and_conditions": "Terms & Conditions",
|
|
35
|
+
"thank_you_for_registering": "Thank you for registering",
|
|
36
|
+
"thank_you_for_registering_text": "We have sent you an email with a link to verify your account.",
|
|
37
|
+
"username_required": "Username is required",
|
|
38
|
+
"password_required": "Password is required",
|
|
39
|
+
"usernamePasswordRequired": "Username and password are required",
|
|
40
|
+
"adminAlreadyExists": "An admin with this username already exists. Please choose another username.",
|
|
41
|
+
"selectAtLeastOnePrivilege": "Please select at least one privilege",
|
|
42
|
+
"email_required": "Email is required",
|
|
43
|
+
"dashboard": "Dashboard",
|
|
44
|
+
"my_courses": "My Courses",
|
|
45
|
+
"my_reviews": "My Reviews",
|
|
46
|
+
"my_bookmarks": "My Bookmarks",
|
|
47
|
+
"my_books": "My Books",
|
|
48
|
+
"orders": "Orders",
|
|
49
|
+
"you_dont_have_orders": "You don't have any orders yet",
|
|
50
|
+
"you_dont_have_bookmarks": "You don't have any bookmarks yet",
|
|
51
|
+
"orders_subtitle": "You can view all your orders here",
|
|
52
|
+
"reviews_subtitle": "You can view all your reviews here",
|
|
53
|
+
"bookmarks_subtitle": "You can view all your bookmarks here",
|
|
54
|
+
"billing_info": "Billing Info",
|
|
55
|
+
"edit_profile": "Edit Profile",
|
|
56
|
+
"security": "Security",
|
|
57
|
+
"social_profiles": "Social Profiles",
|
|
58
|
+
"notifications": "Notifications",
|
|
59
|
+
"privacy": "Privacy",
|
|
60
|
+
"delete_profile": "Delete Profile",
|
|
61
|
+
"first_name": "First Name",
|
|
62
|
+
"last_name": "Last Name",
|
|
63
|
+
"phone_number": "Phone Number",
|
|
64
|
+
"street_address": "Street Address",
|
|
65
|
+
"birthday": "Birthday",
|
|
66
|
+
"city": "City",
|
|
67
|
+
"country": "Country",
|
|
68
|
+
"profile_photo": "Profile Photo",
|
|
69
|
+
"profile_photo_text": "JPG file, square and at least 400x400px. Max 2MB.",
|
|
70
|
+
"save_changes": "Save Changes",
|
|
71
|
+
"delete": "Delete",
|
|
72
|
+
"upload": "Upload",
|
|
73
|
+
"edit_photo": "Edit Photo",
|
|
74
|
+
"personal_details": "Personal Details",
|
|
75
|
+
"personal_details_text": "Update your personal details and email address.",
|
|
76
|
+
"loading": "Loading",
|
|
77
|
+
"profile_photo_changed": "Profile photo changed",
|
|
78
|
+
"profile_photo_changed_error": "Error changing profile photo",
|
|
79
|
+
"error": "Error",
|
|
80
|
+
"about": "About",
|
|
81
|
+
"about_text": "Get to know the academy and Dr. Salam Asaad",
|
|
82
|
+
"profile": "Profile",
|
|
83
|
+
"profile_settings": "Profile Settings",
|
|
84
|
+
"contact": "Contact",
|
|
85
|
+
"contact_text": "Contact us for any questions or inquiries",
|
|
86
|
+
"message": "Message",
|
|
87
|
+
"send_message": "Send Message",
|
|
88
|
+
"courses": "Course",
|
|
89
|
+
"books": "Books",
|
|
90
|
+
"home": "Home",
|
|
91
|
+
"search_courses": "Search Courses",
|
|
92
|
+
"course_description": "Course Description",
|
|
93
|
+
"book_description": "Book Description",
|
|
94
|
+
"other_courses": "Other Courses",
|
|
95
|
+
"whats_included": "What's Included",
|
|
96
|
+
"unlimited_access": "Unlimited Access to the Course",
|
|
97
|
+
"unlimited_access_to_items": "Unlimited Access to the Courses",
|
|
98
|
+
"expertise_and_insights": "Expertise and Insights",
|
|
99
|
+
"learn_from_experts": "Learn from experts",
|
|
100
|
+
"courses_and_books": "Courses and Books",
|
|
101
|
+
"courses_and_books_text": "A variety of courses and books to choose from",
|
|
102
|
+
"learn_on_your_schedule": "Learn on your schedule",
|
|
103
|
+
"get_this_course": "Subscribe to this course",
|
|
104
|
+
"video_count": "Videos Count",
|
|
105
|
+
"video": "Video",
|
|
106
|
+
"you_purchased_course": "You subscribed to this course",
|
|
107
|
+
"watch_course": "Watch Course",
|
|
108
|
+
"you_can_access_course": "You can access this course by clicking the button below",
|
|
109
|
+
"videos": "Videos",
|
|
110
|
+
"course_videos": "Course Videos",
|
|
111
|
+
"rate": "Rate",
|
|
112
|
+
"you_can_rate_item_text": "You can rate this course by clicking the stars below",
|
|
113
|
+
"submit": "Submit",
|
|
114
|
+
"edit": "Edit",
|
|
115
|
+
"leave_feedback": "Leave Feedback",
|
|
116
|
+
"description": "Description",
|
|
117
|
+
"content": "Content",
|
|
118
|
+
"reviews": "Reviews",
|
|
119
|
+
"subscribers": "Subscribers",
|
|
120
|
+
"now_playing": "Now Playing",
|
|
121
|
+
"add_to_bookmarks": "Add to Bookmarks",
|
|
122
|
+
"remove_from_bookmarks": "Remove from Bookmarks",
|
|
123
|
+
"price": "Price",
|
|
124
|
+
"course_price": "Course Price",
|
|
125
|
+
"book_price": "Book Price",
|
|
126
|
+
"dr_salam_courses": "Dr. Salam Courses",
|
|
127
|
+
"dr_salam_books": "Dr. Salam Books",
|
|
128
|
+
"save": "Save",
|
|
129
|
+
"trending_courses": "Trending Courses",
|
|
130
|
+
"trending_books": "Trending Books",
|
|
131
|
+
"other_books": "Other Books",
|
|
132
|
+
"you_purchased_book": "You purchased this book",
|
|
133
|
+
"you_can_access_book": "You can download this book by clicking the button below",
|
|
134
|
+
"you_can_access_book_after_payment": "You can download this book after payment",
|
|
135
|
+
"download_book": "Download Book",
|
|
136
|
+
"get_this_book": "Get This Book",
|
|
137
|
+
"sales": "Sales",
|
|
138
|
+
"review": "Review",
|
|
139
|
+
"reset_password_email_sent": "Reset password request sent to your email address",
|
|
140
|
+
"email_not_valid": "Email not valid",
|
|
141
|
+
"email_not_found": "Email not found",
|
|
142
|
+
"something_went_wrong": "Something went wrong",
|
|
143
|
+
"security_settings": "Security Settings",
|
|
144
|
+
"change_password": "Change Password",
|
|
145
|
+
"change_password_text": "You can change your password by filling the form below",
|
|
146
|
+
"your_current_email_is": "Your current email is",
|
|
147
|
+
"new_email_address": "New Email Address",
|
|
148
|
+
"change_email_address": "Change Email Address",
|
|
149
|
+
"update": "Update",
|
|
150
|
+
"current_password": "Current Password",
|
|
151
|
+
"new_password": "New Password",
|
|
152
|
+
"confirm_new_password": "Confirm New Password",
|
|
153
|
+
"password_strength_tooltip": "Use at least 6 characters, a capital letter and a digit",
|
|
154
|
+
"password_strength": "Password Strength",
|
|
155
|
+
"passwordsDoNotMatch": "Passwords do not match",
|
|
156
|
+
"very_weak": "Very Weak",
|
|
157
|
+
"weak": "Weak",
|
|
158
|
+
"fair": "Fair",
|
|
159
|
+
"strong": "Strong",
|
|
160
|
+
"good": "Good",
|
|
161
|
+
"server_error": "Server Error",
|
|
162
|
+
"disk_space": "Disk Space",
|
|
163
|
+
"total_disk_space": "Total Disk Space",
|
|
164
|
+
"total_space": "Total Space",
|
|
165
|
+
"used_space": "Used Space",
|
|
166
|
+
"used_disk_space": "Used Disk Space",
|
|
167
|
+
"this_moth_bandwidth": "This Month's Bandwidth",
|
|
168
|
+
"total_bandwidth": "Total Bandwidth",
|
|
169
|
+
"used_bandwidth": "Used Bandwidth",
|
|
170
|
+
"email_accounts": "Email Accounts",
|
|
171
|
+
"total_emails": "Total Emails",
|
|
172
|
+
"used_emails": "Used Emails",
|
|
173
|
+
"approved": "Approved",
|
|
174
|
+
"pending_approval": "Pending Approval",
|
|
175
|
+
"by": "By",
|
|
176
|
+
"browse": "Browse",
|
|
177
|
+
"no_file_selected": "No file selected",
|
|
178
|
+
"start_typing": "Start typing",
|
|
179
|
+
"add_new": "Add New",
|
|
180
|
+
"approve": "Approve",
|
|
181
|
+
"add": "Add",
|
|
182
|
+
"add_new_item": "Add New Item",
|
|
183
|
+
"catDeleteTextLight": "Are you sure you want to delete this category?",
|
|
184
|
+
"catDeleteWarningLight": "Notice: All associated items will not be deleted.",
|
|
185
|
+
"cat_delete_text": "Are you sure you want to delete this category and all its contents?",
|
|
186
|
+
"cat_delete_warning": "Warning! All associated items will be deleted!",
|
|
187
|
+
"cat_delete_warning_subtitle": "Please don't proceed if you don't want to lose associated items.",
|
|
188
|
+
"cancel": "Cancel",
|
|
189
|
+
"itemCreatedSuccessfully": "Item created successfully",
|
|
190
|
+
"itemUpdatedSuccessfully": "Item updated successfully",
|
|
191
|
+
"sectionUpdatedSuccessfully": "Information updated successfully",
|
|
192
|
+
"itemDeletedSuccessfully": "Item deleted successfully",
|
|
193
|
+
"create_new_email_account": "Create New Email Account",
|
|
194
|
+
"emailQuota": "Email Quota",
|
|
195
|
+
"unlimited": "Unlimited",
|
|
196
|
+
"quota": "Quota",
|
|
197
|
+
"update_quota": "Update Quota",
|
|
198
|
+
"create": "Create",
|
|
199
|
+
"lastLoginIp": "Last Login IP Address",
|
|
200
|
+
"passengerApplications": "Passenger Applications",
|
|
201
|
+
"totalDatabases": "Total Databases",
|
|
202
|
+
"usedDatabases": "Used Databases",
|
|
203
|
+
"deleteEmailAccount": "Delete Email Account",
|
|
204
|
+
"totalPageViews": "Total Page Views",
|
|
205
|
+
"totalSessions": "Total Sessions",
|
|
206
|
+
"totalUniqueUsers": "Total Unique Users",
|
|
207
|
+
"bounceRate": "Bounce Rate",
|
|
208
|
+
"monthlyPageViews": "Monthly Page Views",
|
|
209
|
+
"topDevices": "Top Devices",
|
|
210
|
+
"topCountries": "Top Countries",
|
|
211
|
+
"liveUsers": "Live Users",
|
|
212
|
+
"analytics": "Analytics",
|
|
213
|
+
"countriesDevices": "Countries & Devices",
|
|
214
|
+
"page": "Page",
|
|
215
|
+
"device": "Device",
|
|
216
|
+
"liveUsersAreViewing": "Live users are viewing",
|
|
217
|
+
"noLiveUsers": "No live users in this moment",
|
|
218
|
+
"liveUsersSubtitle": "Live users are viewing these pages right now",
|
|
219
|
+
"source": "Source",
|
|
220
|
+
"sessionsPerUser": "Sessions Per User",
|
|
221
|
+
"topSources": "Top Sources",
|
|
222
|
+
"sources": "Sources",
|
|
223
|
+
"mediums": "Mediums",
|
|
224
|
+
"topMediums": "Top Mediums",
|
|
225
|
+
"accountInformation": "Account Information",
|
|
226
|
+
"devices": "Devices",
|
|
227
|
+
"countries": "Countries",
|
|
228
|
+
"advancedSettings": "Advanced Settings",
|
|
229
|
+
"advancedSettingsWarning": "PLEASE DO NOT CHANGE THESE SETTINGS IF YOU DO NOT KNOW WHAT YOU ARE DOING.",
|
|
230
|
+
"googleAnalyticsChangeText": "You can change your Google Analytics settings by filling the form below",
|
|
231
|
+
"googleAnalyticsChangeSubText": "if you don't have a Google Analytics account, you can create one",
|
|
232
|
+
"here": "here",
|
|
233
|
+
"accountSettings": "Account Settings",
|
|
234
|
+
"passwordChangeWarning": "Changing your password will require you to logout and login again",
|
|
235
|
+
"oldPassword": "Old Password",
|
|
236
|
+
"adminDetails": "Admin Details",
|
|
237
|
+
"phoneNumber": "Phone Number",
|
|
238
|
+
"name": "Name",
|
|
239
|
+
"emailAddress": "Email Address",
|
|
240
|
+
"log": "Log",
|
|
241
|
+
"logs": "Logs",
|
|
242
|
+
"select": "Select",
|
|
243
|
+
"settings": "Settings",
|
|
244
|
+
"deleteItemText": "Are you sure you want to delete this item?",
|
|
245
|
+
"deleteEmailText": "Are you sure you want to delete this email account?",
|
|
246
|
+
"dropzoneText": "Drag and drop some files here, or click to select files",
|
|
247
|
+
"noItems": "No items",
|
|
248
|
+
"removeMarker": "Remove Marker",
|
|
249
|
+
"restoreMarker": "Restore Original Marker",
|
|
250
|
+
"restoreMarkerTooltip": "There is no original marker to restore",
|
|
251
|
+
"gallery": "Photo Gallery",
|
|
252
|
+
"uploadPhotosToGallery": "Upload Photos to Gallery",
|
|
253
|
+
"delete_gallery_photo": "Delete Gallery Photo",
|
|
254
|
+
"delete_gallery_photo_text": "Are you sure you want to delete this photo?",
|
|
255
|
+
"gallery_photo_deleted": "Photo deleted successfully",
|
|
256
|
+
"errorsInSubmit": "There were some errors during submission",
|
|
257
|
+
"newVariant": "New Variant",
|
|
258
|
+
"checkAll": "Check All",
|
|
259
|
+
"removeAll": "Remove All",
|
|
260
|
+
"cpanelCredentialsNotSet": "cPanel credentials are not set",
|
|
261
|
+
"logoutError": "Error logging out",
|
|
262
|
+
"deletePhoto": "Delete Photo",
|
|
263
|
+
"deletePhotoText": "Are you sure you want to delete this photo? The photo will be permanently deleted after confirmation.",
|
|
264
|
+
"deleteVideo": "Delete Video",
|
|
265
|
+
"deleteVideoText": "Are you sure you want to delete this video? The video will be permanently deleted after confirmation.",
|
|
266
|
+
"yes": "Yes",
|
|
267
|
+
"no": "No",
|
|
268
|
+
"videoDeletedSuccessfully": "Video deleted successfully",
|
|
269
|
+
"photoDeletedSuccessfully": "Photo deleted successfully",
|
|
270
|
+
"selectFile": "Select File",
|
|
271
|
+
"mandatory": "Mandatory",
|
|
272
|
+
"imageDimensionsMustBe": "Image dimensions must be",
|
|
273
|
+
"maxFileSize": "Max file size",
|
|
274
|
+
"imageRecommendedDimensions": "Image recommended dimensions",
|
|
275
|
+
"seeAll": "See All",
|
|
276
|
+
"allowedExtensions": "Allowed extensions",
|
|
277
|
+
"recursiveCategoryDelete": "Delete this category and all its children",
|
|
278
|
+
"recursiveCategoryDeleteWarning": "Warning! All child items will be deleted as well"
|
|
279
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/translations/index.ts"],"names":[],"mappings":"AAGA,iBAAS,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,SAAO,GAAG,MAAM,CAanD;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import arStrings from './dictionaries/ar.json';
|
|
2
|
+
import enStrings from './dictionaries/en.json';
|
|
3
|
+
function getString(key, lang = 'en') {
|
|
4
|
+
const dict = lang === 'en' ? enStrings : arStrings;
|
|
5
|
+
// @ts-expect-error key is string
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
7
|
+
const text = dict[key];
|
|
8
|
+
if (!text) {
|
|
9
|
+
console.warn(`Key not found: ${key}`);
|
|
10
|
+
return key;
|
|
11
|
+
}
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
13
|
+
return text;
|
|
14
|
+
}
|
|
15
|
+
export default getString;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare class CpanelAPI {
|
|
2
|
+
get isError(): boolean;
|
|
3
|
+
version: string;
|
|
4
|
+
ssl: boolean;
|
|
5
|
+
port: number;
|
|
6
|
+
server: string;
|
|
7
|
+
maxredirect: number;
|
|
8
|
+
user: string;
|
|
9
|
+
json: any;
|
|
10
|
+
protected scope: string;
|
|
11
|
+
protected auth: string;
|
|
12
|
+
protected pass: string;
|
|
13
|
+
protected secret?: string;
|
|
14
|
+
protected httpMethod: 'GET' | 'POST';
|
|
15
|
+
protected postData: any;
|
|
16
|
+
protected requestUrl: string;
|
|
17
|
+
private _isError;
|
|
18
|
+
constructor(user: string, pass: string, server: string);
|
|
19
|
+
callApi(scope: string, method: string, params?: Record<string, any>): Promise<any>;
|
|
20
|
+
protected httpRequest(url: string, params: Record<string, any>): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
21
|
+
getError(): string;
|
|
22
|
+
getErrors(): any;
|
|
23
|
+
}
|
|
24
|
+
export default CpanelAPI;
|
|
25
|
+
//# sourceMappingURL=CpanelApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CpanelApi.d.ts","sourceRoot":"","sources":["../../src/utils/CpanelApi.ts"],"names":[],"mappings":"AAEA,cAAM,SAAS;IACX,IAAI,OAAO,IAAI,OAAO,CAErB;IACM,OAAO,SAAQ;IACf,GAAG,UAAO;IACV,IAAI,SAAO;IACX,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,SAAI;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,GAAG,CAAK;IACrB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAK;IAC5B,SAAS,CAAC,IAAI,EAAG,MAAM,CAAA;IACvB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,UAAU,EAAE,KAAK,GAAG,MAAM,CAAQ;IAC5C,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAK;IAC5B,SAAS,CAAC,UAAU,EAAG,MAAM,CAAA;IAC7B,OAAO,CAAC,QAAQ,CAAiB;gBAErB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAMzC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM;cAiBpE,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAiB7D,QAAQ;IAKR,SAAS;CAGnB;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
class CpanelAPI {
|
|
3
|
+
get isError() {
|
|
4
|
+
return !!this.json?.errors;
|
|
5
|
+
}
|
|
6
|
+
version = '2.0';
|
|
7
|
+
ssl = true;
|
|
8
|
+
port = 2083;
|
|
9
|
+
server;
|
|
10
|
+
maxredirect = 0;
|
|
11
|
+
user;
|
|
12
|
+
json = '';
|
|
13
|
+
scope = '';
|
|
14
|
+
auth;
|
|
15
|
+
pass;
|
|
16
|
+
secret;
|
|
17
|
+
httpMethod = 'GET';
|
|
18
|
+
postData = {};
|
|
19
|
+
requestUrl;
|
|
20
|
+
_isError = false;
|
|
21
|
+
constructor(user, pass, server) {
|
|
22
|
+
this.user = user;
|
|
23
|
+
this.pass = pass;
|
|
24
|
+
this.server = server;
|
|
25
|
+
}
|
|
26
|
+
async callApi(scope, method, params = {}) {
|
|
27
|
+
this.scope = scope;
|
|
28
|
+
this.auth = Buffer.from(`${this.user}:${this.pass}`).toString('base64');
|
|
29
|
+
const protocol = this.ssl ? 'https://' : 'http://';
|
|
30
|
+
this.requestUrl = '/execute/';
|
|
31
|
+
this.requestUrl = `${protocol}${this.server}:${this.port}${this.requestUrl}`;
|
|
32
|
+
this.requestUrl += `${this.scope ? this.scope + '/' : ''}${method}?`;
|
|
33
|
+
try {
|
|
34
|
+
const response = await this.httpRequest(this.requestUrl, params);
|
|
35
|
+
this.json = response.data;
|
|
36
|
+
return response.data;
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
throw new Error(`API call failed: ${error}, ${this.requestUrl}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
async httpRequest(url, params) {
|
|
43
|
+
const headers = {
|
|
44
|
+
Authorization: `Basic ${this.auth}`,
|
|
45
|
+
};
|
|
46
|
+
const config = {
|
|
47
|
+
headers,
|
|
48
|
+
method: this.httpMethod,
|
|
49
|
+
...(this.httpMethod === 'POST' ? { data: params } : { params }),
|
|
50
|
+
};
|
|
51
|
+
return axios({
|
|
52
|
+
url,
|
|
53
|
+
...config,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
getError() {
|
|
57
|
+
const errors = this.json.errors;
|
|
58
|
+
return errors.map((error, index) => `${index + 1}. ${error}`).join('\n');
|
|
59
|
+
}
|
|
60
|
+
getErrors() {
|
|
61
|
+
return this.json.errors;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export default CpanelAPI;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const responseHeaders: {
|
|
2
|
+
status: number;
|
|
3
|
+
headers: {
|
|
4
|
+
'Access-Control-Allow-Methods': string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Key-Value pairs of Arabic week days
|
|
9
|
+
*/
|
|
10
|
+
export declare const arabicWeekDays: Record<string, string>;
|
|
11
|
+
export declare const arabicMonths: Record<string, string>;
|
|
12
|
+
export declare const latinMonthsByInt: Record<string, string>;
|
|
13
|
+
export declare const arabicMonthsByInt: Record<string, string>;
|
|
14
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;CAM3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQjD,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa/C,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAanD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAapD,CAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export const responseHeaders = {
|
|
2
|
+
status: 200,
|
|
3
|
+
headers: {
|
|
4
|
+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE OPTIONS',
|
|
5
|
+
//'Access-Control-Allow-Headers': 'Content-Type, Authorization',
|
|
6
|
+
},
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Key-Value pairs of Arabic week days
|
|
10
|
+
*/
|
|
11
|
+
export const arabicWeekDays = {
|
|
12
|
+
Mon: 'الاثنين',
|
|
13
|
+
Tue: 'الثلاثاء',
|
|
14
|
+
Wed: 'الاربعاء',
|
|
15
|
+
Thu: 'الخميس',
|
|
16
|
+
Fri: 'الجمعة',
|
|
17
|
+
Sat: 'السبت',
|
|
18
|
+
Sun: 'الاحد',
|
|
19
|
+
};
|
|
20
|
+
export const arabicMonths = {
|
|
21
|
+
Jan: 'يناير',
|
|
22
|
+
Feb: 'فبراير',
|
|
23
|
+
Mar: 'مارس',
|
|
24
|
+
Apr: 'ابريل',
|
|
25
|
+
May: 'مايو',
|
|
26
|
+
Jun: 'يونيو',
|
|
27
|
+
Jul: 'يوليو',
|
|
28
|
+
Aug: 'اغسطس',
|
|
29
|
+
Sep: 'سبتمبر',
|
|
30
|
+
Oct: 'اكتوبر',
|
|
31
|
+
Nov: 'نوفمبر',
|
|
32
|
+
Dec: 'ديسمبر',
|
|
33
|
+
};
|
|
34
|
+
export const latinMonthsByInt = {
|
|
35
|
+
1: 'Jan',
|
|
36
|
+
2: 'Feb',
|
|
37
|
+
3: 'Mar',
|
|
38
|
+
4: 'Apr',
|
|
39
|
+
5: 'May',
|
|
40
|
+
6: 'Jun',
|
|
41
|
+
7: 'Jul',
|
|
42
|
+
8: 'Aug',
|
|
43
|
+
9: 'Sep',
|
|
44
|
+
10: 'Oct',
|
|
45
|
+
11: 'Nov',
|
|
46
|
+
12: 'Dec',
|
|
47
|
+
};
|
|
48
|
+
export const arabicMonthsByInt = {
|
|
49
|
+
'01': 'يناير',
|
|
50
|
+
'02': 'فبراير',
|
|
51
|
+
'03': 'مارس',
|
|
52
|
+
'04': 'ابريل',
|
|
53
|
+
'05': 'مايو',
|
|
54
|
+
'06': 'يونيو',
|
|
55
|
+
'07': 'يوليو',
|
|
56
|
+
'08': 'اغسطس',
|
|
57
|
+
'09': 'سبتمبر',
|
|
58
|
+
'10': 'اكتوبر',
|
|
59
|
+
'11': 'نوفمبر',
|
|
60
|
+
'12': 'ديسمبر',
|
|
61
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import CpanelAPI from './CpanelApi';
|
|
2
|
+
export { sanitizeFileName, sanitizeFolderOrFileName, cn, humanReadableFileSize, capitalizeWords, base64ToBlob, displayDateFromString, formatNumber, } from './utils';
|
|
3
|
+
export { CpanelAPI };
|
|
4
|
+
export { responseHeaders } from './constants';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,EACH,gBAAgB,EAChB,wBAAwB,EACxB,EAAE,EACF,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,YAAY,GACf,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,SAAS,EAAE,CAAA;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import CpanelAPI from './CpanelApi';
|
|
2
|
+
export { sanitizeFileName, sanitizeFolderOrFileName, cn, humanReadableFileSize, capitalizeWords, base64ToBlob, displayDateFromString, formatNumber, } from './utils';
|
|
3
|
+
export { CpanelAPI };
|
|
4
|
+
export { responseHeaders } from './constants';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ClassValue } from 'clsx';
|
|
2
|
+
/**
|
|
3
|
+
* Function to merge Tailwind CSS classes
|
|
4
|
+
* @param inputs
|
|
5
|
+
*/
|
|
6
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
7
|
+
/**
|
|
8
|
+
* Function to sanitize folder names
|
|
9
|
+
* @param string
|
|
10
|
+
*/
|
|
11
|
+
export declare const sanitizeFolderOrFileName: (string: string) => string;
|
|
12
|
+
/**
|
|
13
|
+
* Function to sanitize file names
|
|
14
|
+
* @param string
|
|
15
|
+
*/
|
|
16
|
+
export declare const sanitizeFileName: (string: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Function to format a number with commas
|
|
19
|
+
* @param number
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatNumber: (number: number) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Function to convert a base64 string to a Blob
|
|
24
|
+
* @param base64
|
|
25
|
+
* @param contentType
|
|
26
|
+
* @param stripHeader
|
|
27
|
+
*/
|
|
28
|
+
export declare function base64ToBlob({ base64, contentType, stripHeader, }: {
|
|
29
|
+
base64: string;
|
|
30
|
+
contentType: string;
|
|
31
|
+
stripHeader?: boolean;
|
|
32
|
+
}): Blob;
|
|
33
|
+
/**
|
|
34
|
+
* Function to display a date in a human-readable format from a string
|
|
35
|
+
* @param string
|
|
36
|
+
* @param lang
|
|
37
|
+
* @param displayWeekday
|
|
38
|
+
* @param separator
|
|
39
|
+
*/
|
|
40
|
+
export declare const displayDateFromString: (string: string, lang: string, displayWeekday: boolean, separator: "/" | ",") => string;
|
|
41
|
+
/**
|
|
42
|
+
* Function to display a date in a human-readable format from a Date object
|
|
43
|
+
* @param date
|
|
44
|
+
* @param lang
|
|
45
|
+
* @param displayWeekday
|
|
46
|
+
* @param separator
|
|
47
|
+
*/
|
|
48
|
+
export declare const displayDateFromDate: (date: Date, lang: string, displayWeekday: boolean, separator: "/" | ",") => string;
|
|
49
|
+
/**
|
|
50
|
+
* Function to capitalize the first letter of a string or all words
|
|
51
|
+
* @param input
|
|
52
|
+
* @param allWords
|
|
53
|
+
*/
|
|
54
|
+
export declare function capitalizeWords(input: string, allWords?: boolean): string;
|
|
55
|
+
/**
|
|
56
|
+
* Function to display a file size in a human-readable format
|
|
57
|
+
* @param sizeInBytes
|
|
58
|
+
*/
|
|
59
|
+
export declare function humanReadableFileSize(sizeInBytes: number, decimals?: number): string;
|
|
60
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAGtC;;;GAGG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,WAGtD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,WAG9C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,WAE1C,CAAA;AAMD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EACzB,MAAM,EACN,WAAW,EACX,WAAW,GACd,EAAE;IACC,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;CACxB,GAAG,IAAI,CAmBP;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,EAAE,MAAM,MAAM,EAAE,gBAAgB,OAAO,EAAE,WAAW,GAAG,GAAG,GAAG,WAGhH,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAC5B,MAAM,IAAI,EACV,MAAM,MAAM,EACZ,gBAAgB,OAAO,EACvB,WAAW,GAAG,GAAG,GAAG,KACrB,MAkBF,CAAA;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAc,GAAG,MAAM,CAW/E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAoBvF"}
|