@goplusvn/core 0.1.0

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 (223) hide show
  1. package/dist/audit/index.d.mts +115 -0
  2. package/dist/audit/index.d.ts +115 -0
  3. package/dist/audit/index.js +204 -0
  4. package/dist/audit/index.js.map +1 -0
  5. package/dist/audit/index.mjs +200 -0
  6. package/dist/audit/index.mjs.map +1 -0
  7. package/dist/auth/index.d.mts +86 -0
  8. package/dist/auth/index.d.ts +86 -0
  9. package/dist/auth/index.js +210 -0
  10. package/dist/auth/index.js.map +1 -0
  11. package/dist/auth/index.mjs +198 -0
  12. package/dist/auth/index.mjs.map +1 -0
  13. package/dist/button-1dWvP9Ib.d.mts +30 -0
  14. package/dist/button-1dWvP9Ib.d.ts +30 -0
  15. package/dist/calendar-2QzdEo1z.d.mts +20 -0
  16. package/dist/calendar-2QzdEo1z.d.ts +20 -0
  17. package/dist/code-generation/index.d.mts +30 -0
  18. package/dist/code-generation/index.d.ts +30 -0
  19. package/dist/code-generation/index.js +31 -0
  20. package/dist/code-generation/index.js.map +1 -0
  21. package/dist/code-generation/index.mjs +28 -0
  22. package/dist/code-generation/index.mjs.map +1 -0
  23. package/dist/configs/index.d.mts +175 -0
  24. package/dist/configs/index.d.ts +175 -0
  25. package/dist/configs/index.js +254 -0
  26. package/dist/configs/index.js.map +1 -0
  27. package/dist/configs/index.mjs +233 -0
  28. package/dist/configs/index.mjs.map +1 -0
  29. package/dist/crud/index.d.mts +646 -0
  30. package/dist/crud/index.d.ts +646 -0
  31. package/dist/crud/index.js +11772 -0
  32. package/dist/crud/index.js.map +1 -0
  33. package/dist/crud/index.mjs +11665 -0
  34. package/dist/crud/index.mjs.map +1 -0
  35. package/dist/crud/server.d.mts +20 -0
  36. package/dist/crud/server.d.ts +20 -0
  37. package/dist/crud/server.js +123 -0
  38. package/dist/crud/server.js.map +1 -0
  39. package/dist/crud/server.mjs +120 -0
  40. package/dist/crud/server.mjs.map +1 -0
  41. package/dist/data-table-skeleton-12NA8Mjx.d.mts +39 -0
  42. package/dist/data-table-skeleton-12NA8Mjx.d.ts +39 -0
  43. package/dist/dialog-bKfjZMTd.d.mts +22 -0
  44. package/dist/dialog-bKfjZMTd.d.ts +22 -0
  45. package/dist/dynamic-icon-DrGIiu2N.d.mts +10 -0
  46. package/dist/dynamic-icon-DrGIiu2N.d.ts +10 -0
  47. package/dist/home/index.d.mts +269 -0
  48. package/dist/home/index.d.ts +269 -0
  49. package/dist/home/index.js +1678 -0
  50. package/dist/home/index.js.map +1 -0
  51. package/dist/home/index.mjs +1635 -0
  52. package/dist/home/index.mjs.map +1 -0
  53. package/dist/hooks/index.d.mts +7 -0
  54. package/dist/hooks/index.d.ts +7 -0
  55. package/dist/hooks/index.js +8316 -0
  56. package/dist/hooks/index.js.map +1 -0
  57. package/dist/hooks/index.mjs +8255 -0
  58. package/dist/hooks/index.mjs.map +1 -0
  59. package/dist/index-50hpiPrV.d.ts +116 -0
  60. package/dist/index-B9zQVEVi.d.mts +116 -0
  61. package/dist/index.d.mts +5 -0
  62. package/dist/index.d.ts +5 -0
  63. package/dist/index.js +123 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/index.mjs +118 -0
  66. package/dist/index.mjs.map +1 -0
  67. package/dist/infrastructure/index.d.mts +423 -0
  68. package/dist/infrastructure/index.d.ts +423 -0
  69. package/dist/infrastructure/index.js +633 -0
  70. package/dist/infrastructure/index.js.map +1 -0
  71. package/dist/infrastructure/index.mjs +619 -0
  72. package/dist/infrastructure/index.mjs.map +1 -0
  73. package/dist/label-DWTEkNPo.d.ts +226 -0
  74. package/dist/label-LPpdcoBx.d.mts +226 -0
  75. package/dist/layout/index.d.mts +48 -0
  76. package/dist/layout/index.d.ts +48 -0
  77. package/dist/layout/index.js +117 -0
  78. package/dist/layout/index.js.map +1 -0
  79. package/dist/layout/index.mjs +90 -0
  80. package/dist/layout/index.mjs.map +1 -0
  81. package/dist/navigation/index.d.mts +16 -0
  82. package/dist/navigation/index.d.ts +16 -0
  83. package/dist/navigation/index.js +53 -0
  84. package/dist/navigation/index.js.map +1 -0
  85. package/dist/navigation/index.mjs +50 -0
  86. package/dist/navigation/index.mjs.map +1 -0
  87. package/dist/notification/index.d.mts +105 -0
  88. package/dist/notification/index.d.ts +105 -0
  89. package/dist/notification/index.js +278 -0
  90. package/dist/notification/index.js.map +1 -0
  91. package/dist/notification/index.mjs +274 -0
  92. package/dist/notification/index.mjs.map +1 -0
  93. package/dist/organization/index.d.mts +99 -0
  94. package/dist/organization/index.d.ts +99 -0
  95. package/dist/organization/index.js +360 -0
  96. package/dist/organization/index.js.map +1 -0
  97. package/dist/organization/index.mjs +352 -0
  98. package/dist/organization/index.mjs.map +1 -0
  99. package/dist/plugin/index.d.mts +83 -0
  100. package/dist/plugin/index.d.ts +83 -0
  101. package/dist/plugin/index.js +86 -0
  102. package/dist/plugin/index.js.map +1 -0
  103. package/dist/plugin/index.mjs +84 -0
  104. package/dist/plugin/index.mjs.map +1 -0
  105. package/dist/providers/index.d.mts +25 -0
  106. package/dist/providers/index.d.ts +25 -0
  107. package/dist/providers/index.js +84 -0
  108. package/dist/providers/index.js.map +1 -0
  109. package/dist/providers/index.mjs +77 -0
  110. package/dist/providers/index.mjs.map +1 -0
  111. package/dist/rbac/index.d.mts +226 -0
  112. package/dist/rbac/index.d.ts +226 -0
  113. package/dist/rbac/index.js +4784 -0
  114. package/dist/rbac/index.js.map +1 -0
  115. package/dist/rbac/index.mjs +4722 -0
  116. package/dist/rbac/index.mjs.map +1 -0
  117. package/dist/rbac/permissions.d.mts +26 -0
  118. package/dist/rbac/permissions.d.ts +26 -0
  119. package/dist/rbac/permissions.js +94 -0
  120. package/dist/rbac/permissions.js.map +1 -0
  121. package/dist/rbac/permissions.mjs +90 -0
  122. package/dist/rbac/permissions.mjs.map +1 -0
  123. package/dist/rbac/server.d.mts +1 -0
  124. package/dist/rbac/server.d.ts +1 -0
  125. package/dist/rbac/server.js +128 -0
  126. package/dist/rbac/server.js.map +1 -0
  127. package/dist/rbac/server.mjs +124 -0
  128. package/dist/rbac/server.mjs.map +1 -0
  129. package/dist/schemas/index.d.mts +1257 -0
  130. package/dist/schemas/index.d.ts +1257 -0
  131. package/dist/schemas/index.js +572 -0
  132. package/dist/schemas/index.js.map +1 -0
  133. package/dist/schemas/index.mjs +523 -0
  134. package/dist/schemas/index.mjs.map +1 -0
  135. package/dist/server-QuYCTa89.d.mts +83 -0
  136. package/dist/server-QuYCTa89.d.ts +83 -0
  137. package/dist/sonner-C74GlRDQ.d.mts +71 -0
  138. package/dist/sonner-C74GlRDQ.d.ts +71 -0
  139. package/dist/status-BOXZgIqX.d.mts +12 -0
  140. package/dist/status-BOXZgIqX.d.ts +12 -0
  141. package/dist/system/index.d.mts +77 -0
  142. package/dist/system/index.d.ts +77 -0
  143. package/dist/system/index.js +102 -0
  144. package/dist/system/index.js.map +1 -0
  145. package/dist/system/index.mjs +100 -0
  146. package/dist/system/index.mjs.map +1 -0
  147. package/dist/tabs-C6FfBwPY.d.mts +18 -0
  148. package/dist/tabs-C6FfBwPY.d.ts +18 -0
  149. package/dist/tenant-provider-B8eC_Wpb.d.mts +27 -0
  150. package/dist/tenant-provider-B8eC_Wpb.d.ts +27 -0
  151. package/dist/types/index.d.mts +469 -0
  152. package/dist/types/index.d.ts +469 -0
  153. package/dist/types/index.js +25 -0
  154. package/dist/types/index.js.map +1 -0
  155. package/dist/types/index.mjs +21 -0
  156. package/dist/types/index.mjs.map +1 -0
  157. package/dist/ui/auth.d.mts +39 -0
  158. package/dist/ui/auth.d.ts +39 -0
  159. package/dist/ui/auth.js +4941 -0
  160. package/dist/ui/auth.js.map +1 -0
  161. package/dist/ui/auth.mjs +4896 -0
  162. package/dist/ui/auth.mjs.map +1 -0
  163. package/dist/ui/crud.d.mts +2 -0
  164. package/dist/ui/crud.d.ts +2 -0
  165. package/dist/ui/crud.js +4 -0
  166. package/dist/ui/crud.js.map +1 -0
  167. package/dist/ui/crud.mjs +3 -0
  168. package/dist/ui/crud.mjs.map +1 -0
  169. package/dist/ui/data-display.d.mts +596 -0
  170. package/dist/ui/data-display.d.ts +596 -0
  171. package/dist/ui/data-display.js +5307 -0
  172. package/dist/ui/data-display.js.map +1 -0
  173. package/dist/ui/data-display.mjs +5212 -0
  174. package/dist/ui/data-display.mjs.map +1 -0
  175. package/dist/ui/feedback.d.mts +55 -0
  176. package/dist/ui/feedback.d.ts +55 -0
  177. package/dist/ui/feedback.js +2608 -0
  178. package/dist/ui/feedback.js.map +1 -0
  179. package/dist/ui/feedback.mjs +2526 -0
  180. package/dist/ui/feedback.mjs.map +1 -0
  181. package/dist/ui/forms.d.mts +309 -0
  182. package/dist/ui/forms.d.ts +309 -0
  183. package/dist/ui/forms.js +4656 -0
  184. package/dist/ui/forms.js.map +1 -0
  185. package/dist/ui/forms.mjs +4571 -0
  186. package/dist/ui/forms.mjs.map +1 -0
  187. package/dist/ui/index.d.mts +331 -0
  188. package/dist/ui/index.d.ts +331 -0
  189. package/dist/ui/index.js +16953 -0
  190. package/dist/ui/index.js.map +1 -0
  191. package/dist/ui/index.mjs +16598 -0
  192. package/dist/ui/index.mjs.map +1 -0
  193. package/dist/ui/primitives/client.d.mts +61 -0
  194. package/dist/ui/primitives/client.d.ts +61 -0
  195. package/dist/ui/primitives/client.js +3408 -0
  196. package/dist/ui/primitives/client.js.map +1 -0
  197. package/dist/ui/primitives/client.mjs +3256 -0
  198. package/dist/ui/primitives/client.mjs.map +1 -0
  199. package/dist/ui/primitives.d.mts +113 -0
  200. package/dist/ui/primitives.d.ts +113 -0
  201. package/dist/ui/primitives.js +3356 -0
  202. package/dist/ui/primitives.js.map +1 -0
  203. package/dist/ui/primitives.mjs +3227 -0
  204. package/dist/ui/primitives.mjs.map +1 -0
  205. package/dist/user/index.d.mts +228 -0
  206. package/dist/user/index.d.ts +228 -0
  207. package/dist/user/index.js +4306 -0
  208. package/dist/user/index.js.map +1 -0
  209. package/dist/user/index.mjs +4260 -0
  210. package/dist/user/index.mjs.map +1 -0
  211. package/dist/utils/index.d.mts +205 -0
  212. package/dist/utils/index.d.ts +205 -0
  213. package/dist/utils/index.js +574 -0
  214. package/dist/utils/index.js.map +1 -0
  215. package/dist/utils/index.mjs +514 -0
  216. package/dist/utils/index.mjs.map +1 -0
  217. package/dist/workflow/index.d.mts +40 -0
  218. package/dist/workflow/index.d.ts +40 -0
  219. package/dist/workflow/index.js +3710 -0
  220. package/dist/workflow/index.js.map +1 -0
  221. package/dist/workflow/index.mjs +3677 -0
  222. package/dist/workflow/index.mjs.map +1 -0
  223. package/package.json +311 -0
@@ -0,0 +1,205 @@
1
+ import { ClassValue } from 'clsx';
2
+ import { NavigationType, DynamicIconNameType, LocaleType, FormatStyleType } from '../types/index.mjs';
3
+ export { S as STATUS_ACTIVE, a as STATUS_COLORS, b as STATUS_INACTIVE, c as STATUS_OPTIONS, d as STATUS_VALUES, e as booleanToStatus, s as statusToBoolean } from '../status-BOXZgIqX.mjs';
4
+ import 'lucide-react';
5
+ import 'react';
6
+ import 'zod';
7
+
8
+ /**
9
+ * Merge Tailwind CSS classes with clsx
10
+ */
11
+ declare function cn(...inputs: ClassValue[]): string;
12
+ /**
13
+ * Get initials from full name
14
+ */
15
+ declare function getInitials(fullName: string): string;
16
+ /**
17
+ * Slugify string
18
+ */
19
+ declare function slugify(text: string): string;
20
+ /**
21
+ * Convert camelCase to Title Case
22
+ */
23
+ declare function camelCaseToTitleCase(camelCaseStr: string): string;
24
+ /**
25
+ * Convert Title Case to camelCase
26
+ */
27
+ declare function titleCaseToCamelCase(titleCaseStr: string): string;
28
+ declare const isEven: (num: number) => boolean;
29
+ declare const isNonNegative: (num: number) => boolean;
30
+ /**
31
+ * Đọc số tiền thành chữ tiếng Việt
32
+ * Dùng chung cho tất cả các phiếu in (hợp đồng, phiếu thu, phiếu chi, phiếu nhập/xuất kho, v.v.)
33
+ * @param amount - Số tiền (VND)
34
+ * @returns Chuỗi đọc bằng chữ, VD: "Bảy mươi hai triệu một trăm năm mươi chín nghìn tám trăm hai mươi đồng"
35
+ */
36
+ declare function readMoney(amount: number): string;
37
+ /**
38
+ * Format currency with locale
39
+ */
40
+ declare function formatCurrency(value: number, locales?: LocaleType, currency?: string): string;
41
+ /**
42
+ * Format number with locale
43
+ */
44
+ declare function formatNumber(value: number, options?: {
45
+ locale?: string;
46
+ minimumFractionDigits?: number;
47
+ maximumFractionDigits?: number;
48
+ }): string;
49
+ /**
50
+ * Format percent
51
+ */
52
+ declare function formatPercent(value: number, locales?: LocaleType): string;
53
+ /**
54
+ * Format number to compact (e.g., 1K, 1M)
55
+ */
56
+ declare function formatNumberToCompact(value: number, locales?: LocaleType): string;
57
+ /**
58
+ * Format file size
59
+ */
60
+ declare function formatFileSize(bytes: number, decimals?: number): string;
61
+ /**
62
+ * Format unread count
63
+ */
64
+ declare function formatUnreadCount(unreadCount: number): string | number;
65
+ /**
66
+ * Format date with Vietnamese locale (Asia/Ho_Chi_Minh timezone)
67
+ */
68
+ declare function formatDate(date: Date | string, options?: {
69
+ locale?: string;
70
+ format?: "short" | "medium" | "long" | "full";
71
+ }): string;
72
+ /**
73
+ * Format datetime with Vietnamese locale (Asia/Ho_Chi_Minh timezone)
74
+ */
75
+ declare function formatDateTime(date: Date | string, options?: {
76
+ locale?: string;
77
+ }): string;
78
+ /**
79
+ * Format relative date (Today, Yesterday, or date) - Asia/Ho_Chi_Minh timezone
80
+ */
81
+ declare function formatRelativeDate(value?: string | number | Date): string;
82
+ /**
83
+ * Check if date is before today (Asia/Ho_Chi_Minh timezone)
84
+ */
85
+ declare function isBeforeToday(date: Date): boolean;
86
+ /**
87
+ * Ensure path has prefix
88
+ */
89
+ declare function ensureWithPrefix(value: string, prefix: string): string;
90
+ /**
91
+ * Ensure path has suffix
92
+ */
93
+ declare function ensureWithSuffix(value: string, suffix: string): string;
94
+ /**
95
+ * Ensure path without prefix
96
+ */
97
+ declare function ensureWithoutPrefix(value: string, prefix: string): string;
98
+ /**
99
+ * Ensure path without suffix
100
+ */
101
+ declare function ensureWithoutSuffix(value: string, suffix: string): string;
102
+ /**
103
+ * Check if pathname is active
104
+ */
105
+ declare function isActivePathname(basePathname: string, currentPathname: string, exactMatch?: boolean): boolean;
106
+ /**
107
+ * Wait/sleep function
108
+ */
109
+ declare function wait(ms?: number): Promise<void>;
110
+ /**
111
+ * Debounce function
112
+ */
113
+ declare function debounce<T extends (...args: unknown[]) => unknown>(func: T, wait: number): (...args: Parameters<T>) => void;
114
+ /**
115
+ * Deep clone object
116
+ */
117
+ declare function deepClone<T>(obj: T): T;
118
+ /**
119
+ * Check if value is empty
120
+ */
121
+ declare function isEmpty(value: unknown): boolean;
122
+ /**
123
+ * Generate a random ID
124
+ */
125
+ declare function generateId(prefix?: string): string;
126
+ /**
127
+ * Get dictionary value safely
128
+ */
129
+ declare function getDictionaryValue(key: string, section: Record<string, unknown>, fallback?: string): string;
130
+ /**
131
+ * Format overview card value based on style
132
+ */
133
+ declare function formatOverviewCardValue(value: number, formatStyle: FormatStyleType): string | number;
134
+ /**
135
+ * Get credit card brand name from number
136
+ */
137
+ declare function getCreditCardBrandName(number: string): string;
138
+ /**
139
+ * Convert rem to pixels
140
+ */
141
+ declare function remToPx(rem: number): number;
142
+ /**
143
+ * Check if string is a valid URL
144
+ */
145
+ declare function isUrl(text: string): boolean;
146
+ /**
147
+ * Rating to percentage string
148
+ */
149
+ declare function ratingToPercentage(rating: number, maxRating: number, fractionDigits?: number): string;
150
+ /**
151
+ * Ensure redirect pathname with query params
152
+ */
153
+ declare function ensureRedirectPathname(basePathname: string, redirectPathname: string): string;
154
+ /**
155
+ * Get discounted price
156
+ */
157
+ declare function getDiscountedPrice(price: number, discountRate: number, isAnnual?: boolean): number;
158
+ /**
159
+ * Convert time string to Date
160
+ */
161
+ declare function timeToDate(timeString: string, baseDate?: Date): Date;
162
+ /**
163
+ * Format file type
164
+ */
165
+ declare function formatFileType(type: string): string;
166
+ /**
167
+ * Format date with time (Asia/Ho_Chi_Minh timezone)
168
+ */
169
+ declare function formatDateWithTime(value: string | number | Date): string;
170
+ /**
171
+ * Format date short (MMM dd) - Asia/Ho_Chi_Minh timezone
172
+ */
173
+ declare function formatDateShort(value: string | number | Date): string;
174
+ /**
175
+ * Format time (Asia/Ho_Chi_Minh timezone)
176
+ */
177
+ declare function formatTime(value: string | number | Date): string;
178
+ /**
179
+ * Format duration from milliseconds
180
+ */
181
+ declare function formatDuration(value: string | number | Date): string;
182
+ /**
183
+ * Format distance to now
184
+ */
185
+ declare function formatDistance(value: string | number | Date): string;
186
+
187
+ declare function isPathnameMissingLocale(pathname: string): boolean;
188
+ declare function getLocaleFromPathname(pathname: string): string | undefined;
189
+ declare function ensureLocalizedPathname(pathname: string, locale: string): string;
190
+ declare function relocalizePathname(pathname: string, locale: string): string;
191
+ declare class Logger {
192
+ private log;
193
+ info(message: string, context?: Record<string, unknown>): void;
194
+ warn(message: string, context?: Record<string, unknown>): void;
195
+ error(message: string, error?: unknown, context?: Record<string, unknown>): void;
196
+ debug(message: string, context?: Record<string, unknown>): void;
197
+ }
198
+ declare const logger: Logger;
199
+
200
+ declare function shouldExcludeFromTabs(pathname: string): boolean;
201
+ declare function normalizePathname(pathname: string): string;
202
+ declare function findRouteTitle(pathname: string, navigations: NavigationType[]): string | null;
203
+ declare function findRouteIcon(pathname: string, navigations: NavigationType[]): DynamicIconNameType | null;
204
+
205
+ export { camelCaseToTitleCase, cn, debounce, deepClone, ensureLocalizedPathname, ensureRedirectPathname, ensureWithPrefix, ensureWithSuffix, ensureWithoutPrefix, ensureWithoutSuffix, findRouteIcon, findRouteTitle, formatCurrency, formatDate, formatDateShort, formatDateTime, formatDateWithTime, formatDistance, formatDuration, formatFileSize, formatFileType, formatNumber, formatNumberToCompact, formatOverviewCardValue, formatPercent, formatRelativeDate, formatTime, formatUnreadCount, generateId, getCreditCardBrandName, getDictionaryValue, getDiscountedPrice, getInitials, getLocaleFromPathname, isActivePathname, isBeforeToday, isEmpty, isEven, isNonNegative, isPathnameMissingLocale, isUrl, logger, normalizePathname, ratingToPercentage, readMoney, relocalizePathname, remToPx, shouldExcludeFromTabs, slugify, timeToDate, titleCaseToCamelCase, wait };
@@ -0,0 +1,205 @@
1
+ import { ClassValue } from 'clsx';
2
+ import { NavigationType, DynamicIconNameType, LocaleType, FormatStyleType } from '../types/index.js';
3
+ export { S as STATUS_ACTIVE, a as STATUS_COLORS, b as STATUS_INACTIVE, c as STATUS_OPTIONS, d as STATUS_VALUES, e as booleanToStatus, s as statusToBoolean } from '../status-BOXZgIqX.js';
4
+ import 'lucide-react';
5
+ import 'react';
6
+ import 'zod';
7
+
8
+ /**
9
+ * Merge Tailwind CSS classes with clsx
10
+ */
11
+ declare function cn(...inputs: ClassValue[]): string;
12
+ /**
13
+ * Get initials from full name
14
+ */
15
+ declare function getInitials(fullName: string): string;
16
+ /**
17
+ * Slugify string
18
+ */
19
+ declare function slugify(text: string): string;
20
+ /**
21
+ * Convert camelCase to Title Case
22
+ */
23
+ declare function camelCaseToTitleCase(camelCaseStr: string): string;
24
+ /**
25
+ * Convert Title Case to camelCase
26
+ */
27
+ declare function titleCaseToCamelCase(titleCaseStr: string): string;
28
+ declare const isEven: (num: number) => boolean;
29
+ declare const isNonNegative: (num: number) => boolean;
30
+ /**
31
+ * Đọc số tiền thành chữ tiếng Việt
32
+ * Dùng chung cho tất cả các phiếu in (hợp đồng, phiếu thu, phiếu chi, phiếu nhập/xuất kho, v.v.)
33
+ * @param amount - Số tiền (VND)
34
+ * @returns Chuỗi đọc bằng chữ, VD: "Bảy mươi hai triệu một trăm năm mươi chín nghìn tám trăm hai mươi đồng"
35
+ */
36
+ declare function readMoney(amount: number): string;
37
+ /**
38
+ * Format currency with locale
39
+ */
40
+ declare function formatCurrency(value: number, locales?: LocaleType, currency?: string): string;
41
+ /**
42
+ * Format number with locale
43
+ */
44
+ declare function formatNumber(value: number, options?: {
45
+ locale?: string;
46
+ minimumFractionDigits?: number;
47
+ maximumFractionDigits?: number;
48
+ }): string;
49
+ /**
50
+ * Format percent
51
+ */
52
+ declare function formatPercent(value: number, locales?: LocaleType): string;
53
+ /**
54
+ * Format number to compact (e.g., 1K, 1M)
55
+ */
56
+ declare function formatNumberToCompact(value: number, locales?: LocaleType): string;
57
+ /**
58
+ * Format file size
59
+ */
60
+ declare function formatFileSize(bytes: number, decimals?: number): string;
61
+ /**
62
+ * Format unread count
63
+ */
64
+ declare function formatUnreadCount(unreadCount: number): string | number;
65
+ /**
66
+ * Format date with Vietnamese locale (Asia/Ho_Chi_Minh timezone)
67
+ */
68
+ declare function formatDate(date: Date | string, options?: {
69
+ locale?: string;
70
+ format?: "short" | "medium" | "long" | "full";
71
+ }): string;
72
+ /**
73
+ * Format datetime with Vietnamese locale (Asia/Ho_Chi_Minh timezone)
74
+ */
75
+ declare function formatDateTime(date: Date | string, options?: {
76
+ locale?: string;
77
+ }): string;
78
+ /**
79
+ * Format relative date (Today, Yesterday, or date) - Asia/Ho_Chi_Minh timezone
80
+ */
81
+ declare function formatRelativeDate(value?: string | number | Date): string;
82
+ /**
83
+ * Check if date is before today (Asia/Ho_Chi_Minh timezone)
84
+ */
85
+ declare function isBeforeToday(date: Date): boolean;
86
+ /**
87
+ * Ensure path has prefix
88
+ */
89
+ declare function ensureWithPrefix(value: string, prefix: string): string;
90
+ /**
91
+ * Ensure path has suffix
92
+ */
93
+ declare function ensureWithSuffix(value: string, suffix: string): string;
94
+ /**
95
+ * Ensure path without prefix
96
+ */
97
+ declare function ensureWithoutPrefix(value: string, prefix: string): string;
98
+ /**
99
+ * Ensure path without suffix
100
+ */
101
+ declare function ensureWithoutSuffix(value: string, suffix: string): string;
102
+ /**
103
+ * Check if pathname is active
104
+ */
105
+ declare function isActivePathname(basePathname: string, currentPathname: string, exactMatch?: boolean): boolean;
106
+ /**
107
+ * Wait/sleep function
108
+ */
109
+ declare function wait(ms?: number): Promise<void>;
110
+ /**
111
+ * Debounce function
112
+ */
113
+ declare function debounce<T extends (...args: unknown[]) => unknown>(func: T, wait: number): (...args: Parameters<T>) => void;
114
+ /**
115
+ * Deep clone object
116
+ */
117
+ declare function deepClone<T>(obj: T): T;
118
+ /**
119
+ * Check if value is empty
120
+ */
121
+ declare function isEmpty(value: unknown): boolean;
122
+ /**
123
+ * Generate a random ID
124
+ */
125
+ declare function generateId(prefix?: string): string;
126
+ /**
127
+ * Get dictionary value safely
128
+ */
129
+ declare function getDictionaryValue(key: string, section: Record<string, unknown>, fallback?: string): string;
130
+ /**
131
+ * Format overview card value based on style
132
+ */
133
+ declare function formatOverviewCardValue(value: number, formatStyle: FormatStyleType): string | number;
134
+ /**
135
+ * Get credit card brand name from number
136
+ */
137
+ declare function getCreditCardBrandName(number: string): string;
138
+ /**
139
+ * Convert rem to pixels
140
+ */
141
+ declare function remToPx(rem: number): number;
142
+ /**
143
+ * Check if string is a valid URL
144
+ */
145
+ declare function isUrl(text: string): boolean;
146
+ /**
147
+ * Rating to percentage string
148
+ */
149
+ declare function ratingToPercentage(rating: number, maxRating: number, fractionDigits?: number): string;
150
+ /**
151
+ * Ensure redirect pathname with query params
152
+ */
153
+ declare function ensureRedirectPathname(basePathname: string, redirectPathname: string): string;
154
+ /**
155
+ * Get discounted price
156
+ */
157
+ declare function getDiscountedPrice(price: number, discountRate: number, isAnnual?: boolean): number;
158
+ /**
159
+ * Convert time string to Date
160
+ */
161
+ declare function timeToDate(timeString: string, baseDate?: Date): Date;
162
+ /**
163
+ * Format file type
164
+ */
165
+ declare function formatFileType(type: string): string;
166
+ /**
167
+ * Format date with time (Asia/Ho_Chi_Minh timezone)
168
+ */
169
+ declare function formatDateWithTime(value: string | number | Date): string;
170
+ /**
171
+ * Format date short (MMM dd) - Asia/Ho_Chi_Minh timezone
172
+ */
173
+ declare function formatDateShort(value: string | number | Date): string;
174
+ /**
175
+ * Format time (Asia/Ho_Chi_Minh timezone)
176
+ */
177
+ declare function formatTime(value: string | number | Date): string;
178
+ /**
179
+ * Format duration from milliseconds
180
+ */
181
+ declare function formatDuration(value: string | number | Date): string;
182
+ /**
183
+ * Format distance to now
184
+ */
185
+ declare function formatDistance(value: string | number | Date): string;
186
+
187
+ declare function isPathnameMissingLocale(pathname: string): boolean;
188
+ declare function getLocaleFromPathname(pathname: string): string | undefined;
189
+ declare function ensureLocalizedPathname(pathname: string, locale: string): string;
190
+ declare function relocalizePathname(pathname: string, locale: string): string;
191
+ declare class Logger {
192
+ private log;
193
+ info(message: string, context?: Record<string, unknown>): void;
194
+ warn(message: string, context?: Record<string, unknown>): void;
195
+ error(message: string, error?: unknown, context?: Record<string, unknown>): void;
196
+ debug(message: string, context?: Record<string, unknown>): void;
197
+ }
198
+ declare const logger: Logger;
199
+
200
+ declare function shouldExcludeFromTabs(pathname: string): boolean;
201
+ declare function normalizePathname(pathname: string): string;
202
+ declare function findRouteTitle(pathname: string, navigations: NavigationType[]): string | null;
203
+ declare function findRouteIcon(pathname: string, navigations: NavigationType[]): DynamicIconNameType | null;
204
+
205
+ export { camelCaseToTitleCase, cn, debounce, deepClone, ensureLocalizedPathname, ensureRedirectPathname, ensureWithPrefix, ensureWithSuffix, ensureWithoutPrefix, ensureWithoutSuffix, findRouteIcon, findRouteTitle, formatCurrency, formatDate, formatDateShort, formatDateTime, formatDateWithTime, formatDistance, formatDuration, formatFileSize, formatFileType, formatNumber, formatNumberToCompact, formatOverviewCardValue, formatPercent, formatRelativeDate, formatTime, formatUnreadCount, generateId, getCreditCardBrandName, getDictionaryValue, getDiscountedPrice, getInitials, getLocaleFromPathname, isActivePathname, isBeforeToday, isEmpty, isEven, isNonNegative, isPathnameMissingLocale, isUrl, logger, normalizePathname, ratingToPercentage, readMoney, relocalizePathname, remToPx, shouldExcludeFromTabs, slugify, timeToDate, titleCaseToCamelCase, wait };