@withwiz/toolkit 0.7.1 → 0.8.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 (381) hide show
  1. package/README.ko.md +235 -0
  2. package/README.md +57 -26
  3. package/dist/{chunk-V6YD53NH.js → chunk-23LQJYZN.js} +5 -2
  4. package/dist/{chunk-ZTRASVGZ.js → chunk-34L7HTM7.js} +1 -1
  5. package/dist/{chunk-GSUCBWML.js → chunk-3RK3MKAR.js} +5 -2
  6. package/dist/{chunk-6JXHXIEH.js → chunk-3UIKCS56.js} +2 -2
  7. package/dist/{chunk-MNYVAEXK.js → chunk-4ROIPF33.js} +16 -3
  8. package/dist/{chunk-JKSABDFT.js → chunk-4TGPAUJV.js} +4 -4
  9. package/dist/{chunk-D2KXIKI4.js → chunk-4XPXZNBX.js} +18 -11
  10. package/dist/{chunk-LG3KM5V3.js → chunk-5I3EQHR4.js} +6 -2
  11. package/dist/chunk-63EKUOJH.js +72 -0
  12. package/dist/{chunk-N5VOFGF3.js → chunk-75UDFONR.js} +5 -4
  13. package/dist/{chunk-GORISA3L.js → chunk-7KIM5MHV.js} +1 -1
  14. package/dist/{chunk-4L6OSSSG.js → chunk-7S2PCYNT.js} +3 -3
  15. package/dist/{chunk-2SIBG5BG.js → chunk-7YWUKMZD.js} +7 -0
  16. package/dist/{chunk-7X2N4VZM.js → chunk-ATBYGPLP.js} +1 -1
  17. package/dist/{chunk-A74POWYY.js → chunk-B7AJJKOY.js} +1 -1
  18. package/dist/{chunk-W7PEL3DX.js → chunk-BRBOGLFT.js} +4 -4
  19. package/dist/{chunk-IOUNOHP7.js → chunk-BRFW2LL2.js} +1 -1
  20. package/dist/{chunk-I4NT6G2T.js → chunk-DRTJSTEV.js} +2 -2
  21. package/dist/{chunk-JIYLTMVL.js → chunk-DVCGAI5N.js} +2 -2
  22. package/dist/{chunk-AV7ELXHG.js → chunk-E5TDIRBJ.js} +2 -2
  23. package/dist/{chunk-UBASOMP5.js → chunk-HGVPZSWW.js} +18 -13
  24. package/dist/{chunk-7F5X6F7X.js → chunk-HV6A6Z5R.js} +1 -1
  25. package/dist/chunk-ILMPKSWS.js +125 -0
  26. package/dist/{chunk-J5NLAZV2.js → chunk-JHUWZ6YW.js} +2 -2
  27. package/dist/{chunk-LON5THYQ.js → chunk-KLMKCYIN.js} +1 -1
  28. package/dist/{chunk-4KJZRI74.js → chunk-KWUOLKDO.js} +1 -1
  29. package/dist/{chunk-GJO2MPC3.js → chunk-LCYDMYZS.js} +1 -1
  30. package/dist/{chunk-WIQAPWTY.js → chunk-LL3VWKY4.js} +1 -1
  31. package/dist/{chunk-IMAFMUZ7.js → chunk-LSS3GJUE.js} +3 -2
  32. package/dist/{chunk-2PFSRVVD.js → chunk-LWHLB2Y6.js} +84 -18
  33. package/dist/{chunk-BBE4RXR7.js → chunk-MTZXWVW3.js} +17 -6
  34. package/dist/{chunk-ORMEWXMH.js → chunk-N3ETBM74.js} +1 -14
  35. package/dist/{chunk-KYAHURXN.js → chunk-N3TCQ5BF.js} +4 -3
  36. package/dist/{chunk-G4SNTXJ3.js → chunk-NLV7IEYM.js} +7 -6
  37. package/dist/{chunk-HX4MPCVV.js → chunk-NTZBMWB6.js} +4 -4
  38. package/dist/{chunk-JRORMRVN.js → chunk-OII5BXCZ.js} +1 -1
  39. package/dist/{chunk-RJGYONRO.js → chunk-PRPMEHRE.js} +2 -2
  40. package/dist/{chunk-KG65BFPK.js → chunk-QAIN3WNN.js} +1 -1
  41. package/dist/{chunk-JJAIVUVD.js → chunk-R7EFDSPZ.js} +2 -2
  42. package/dist/{chunk-VJE4HA2C.js → chunk-RWCPRPEP.js} +3 -2
  43. package/dist/{chunk-B6L5XV7O.js → chunk-SCAFDDJP.js} +11 -11
  44. package/dist/{chunk-KXYDTC4A.js → chunk-SNFPZD6L.js} +11 -2
  45. package/dist/{chunk-MWBEE6VI.js → chunk-SXBDP3CK.js} +3 -3
  46. package/dist/{chunk-B5VRZ2VJ.js → chunk-TNDEYJEL.js} +25 -6
  47. package/dist/{chunk-GDTZMX3L.js → chunk-TRGFXIEF.js} +1 -1
  48. package/dist/{chunk-VNDL2E44.js → chunk-U52U5SK7.js} +2 -2
  49. package/dist/{chunk-54REXMTE.js → chunk-UWOWKOOQ.js} +3 -1
  50. package/dist/{chunk-4PROUAZ5.js → chunk-V3WZFUY3.js} +7 -7
  51. package/dist/{chunk-G4LJN4OZ.js → chunk-VH57Y5Z4.js} +1 -1
  52. package/dist/{chunk-5S7M2AJL.js → chunk-VWAB4PM7.js} +1 -1
  53. package/dist/{chunk-AQZPGOEZ.js → chunk-VWKZMGPJ.js} +5 -4
  54. package/dist/{chunk-4K27YLAE.js → chunk-VZ2PQA4U.js} +2 -2
  55. package/dist/{chunk-ZOWEW4GY.js → chunk-WBHX4MJV.js} +2 -2
  56. package/dist/{chunk-UMRKMF3E.js → chunk-WXOWI7BJ.js} +2 -2
  57. package/dist/chunk-XAGPZLRK.js +106 -0
  58. package/dist/{chunk-VPRTPW7C.js → chunk-XF3WUF3F.js} +2 -2
  59. package/dist/{chunk-6TRD7ZW4.js → chunk-XKIBJJA3.js} +25 -21
  60. package/dist/{chunk-ZLYBY3R4.js → chunk-XTGS6JJB.js} +10 -5
  61. package/dist/{chunk-BFZR62LZ.js → chunk-XXPB4C37.js} +7 -7
  62. package/dist/{chunk-LUIYCIF7.js → chunk-Y4ME3Q5K.js} +2 -2
  63. package/dist/{chunk-Q66VOVGN.js → chunk-Y4WPEIKW.js} +1 -1
  64. package/dist/{chunk-MREY2W7N.js → chunk-Y6CPPBJI.js} +1 -1
  65. package/dist/{chunk-6TUDUOGC.js → chunk-ZEHNCHIV.js} +2 -2
  66. package/dist/{chunk-D73ZJQMX.js → chunk-ZZABL54F.js} +13 -0
  67. package/dist/core/auth/config.d.ts +3 -0
  68. package/dist/core/auth/config.js +3 -3
  69. package/dist/core/auth/email/index.d.ts +3 -3
  70. package/dist/core/auth/email/index.js +3 -3
  71. package/dist/core/auth/email/sender.d.ts +1 -1
  72. package/dist/core/auth/email/sender.js +2 -2
  73. package/dist/core/auth/email/token-generator.d.ts +11 -0
  74. package/dist/core/auth/email/token-generator.js +2 -2
  75. package/dist/core/auth/errors/index.js +1 -1
  76. package/dist/core/auth/index.d.ts +11 -11
  77. package/dist/core/auth/index.js +27 -19
  78. package/dist/core/auth/jwt/client.js +3 -2
  79. package/dist/core/auth/jwt/cookie.d.ts +1 -1
  80. package/dist/core/auth/jwt/cookie.js +4 -4
  81. package/dist/core/auth/jwt/index.d.ts +41 -9
  82. package/dist/core/auth/jwt/index.js +6 -6
  83. package/dist/core/auth/jwt/types.d.ts +1 -1
  84. package/dist/core/auth/jwt/types.js +1 -1
  85. package/dist/core/auth/oauth/index.d.ts +6 -6
  86. package/dist/core/auth/oauth/index.js +8 -8
  87. package/dist/core/auth/oauth/providers/github.d.ts +1 -1
  88. package/dist/core/auth/oauth/providers/github.js +1 -1
  89. package/dist/core/auth/oauth/providers/google.d.ts +1 -1
  90. package/dist/core/auth/oauth/providers/google.js +1 -1
  91. package/dist/core/auth/oauth/providers/index.d.ts +5 -5
  92. package/dist/core/auth/oauth/providers/index.js +7 -7
  93. package/dist/core/auth/oauth/providers/kakao.d.ts +1 -1
  94. package/dist/core/auth/oauth/providers/kakao.js +1 -1
  95. package/dist/core/auth/oauth/providers/meta.d.ts +1 -1
  96. package/dist/core/auth/oauth/providers/meta.js +1 -1
  97. package/dist/core/auth/oauth/providers/microsoft.d.ts +1 -1
  98. package/dist/core/auth/oauth/providers/microsoft.js +1 -1
  99. package/dist/core/auth/oauth/state-cookie.js +1 -1
  100. package/dist/core/auth/password/client-helper.d.ts +9 -9
  101. package/dist/core/auth/password/client-helper.js +5 -3
  102. package/dist/core/auth/password/hasher.d.ts +83 -0
  103. package/dist/core/auth/password/hasher.js +14 -0
  104. package/dist/core/auth/password/index.d.ts +8 -6
  105. package/dist/core/auth/password/index.js +11 -2
  106. package/dist/core/auth/services/email-verification.service.d.ts +1 -1
  107. package/dist/core/auth/services/email-verification.service.js +3 -3
  108. package/dist/core/auth/services/index.d.ts +13 -12
  109. package/dist/core/auth/services/index.js +16 -16
  110. package/dist/core/auth/services/login.service.d.ts +15 -1
  111. package/dist/core/auth/services/login.service.js +6 -6
  112. package/dist/core/auth/services/oauth-callback.service.d.ts +7 -1
  113. package/dist/core/auth/services/oauth-callback.service.js +6 -6
  114. package/dist/core/auth/services/password-reset.service.d.ts +1 -1
  115. package/dist/core/auth/services/password-reset.service.js +3 -3
  116. package/dist/core/auth/services/refresh-token-store.d.ts +39 -0
  117. package/dist/core/auth/services/register.service.d.ts +1 -1
  118. package/dist/core/auth/services/register.service.js +3 -3
  119. package/dist/core/auth/services/token-refresh.service.d.ts +27 -1
  120. package/dist/core/auth/services/token-refresh.service.js +6 -6
  121. package/dist/core/auth/token-delivery.d.ts +47 -0
  122. package/dist/core/auth/token-delivery.js +14 -0
  123. package/dist/core/auth/types/index.d.ts +38 -4
  124. package/dist/core/auth/types/index.js +1 -1
  125. package/dist/core/cache/cache-config.js +4 -4
  126. package/dist/core/cache/cache-defaults.js +1 -1
  127. package/dist/core/cache/cache-env.d.ts +3 -3
  128. package/dist/core/cache/cache-env.js +3 -3
  129. package/dist/core/cache/cache-factory.d.ts +6 -6
  130. package/dist/core/cache/cache-factory.js +11 -11
  131. package/dist/core/cache/cache-invalidation.d.ts +4 -4
  132. package/dist/core/cache/cache-invalidation.js +12 -12
  133. package/dist/core/cache/cache-redis.js +5 -5
  134. package/dist/core/cache/cache-types.js +1 -1
  135. package/dist/core/cache/cache-wrapper.d.ts +1 -1
  136. package/dist/core/cache/cache-wrapper.js +12 -12
  137. package/dist/core/cache/cache.d.ts +2 -2
  138. package/dist/core/cache/cache.js +17 -17
  139. package/dist/core/cache/config.js +2 -2
  140. package/dist/core/cache/hybrid-cache-manager.d.ts +1 -1
  141. package/dist/core/cache/hybrid-cache-manager.js +7 -7
  142. package/dist/core/cache/index.d.ts +15 -15
  143. package/dist/core/cache/index.js +17 -17
  144. package/dist/core/cache/inmemory-cache-manager.d.ts +1 -1
  145. package/dist/core/cache/inmemory-cache-manager.js +3 -3
  146. package/dist/core/cache/noop-cache-manager.d.ts +1 -1
  147. package/dist/core/cache/noop-cache-manager.js +5 -5
  148. package/dist/core/cache/redis-cache-manager.d.ts +2 -2
  149. package/dist/core/cache/redis-cache-manager.js +6 -6
  150. package/dist/core/config/common.js +1 -1
  151. package/dist/core/config/errors.js +1 -1
  152. package/dist/core/config/registry.d.ts +7 -7
  153. package/dist/core/config/registry.js +1 -1
  154. package/dist/core/config/warn.js +1 -1
  155. package/dist/core/constants/error-codes.js +1 -1
  156. package/dist/core/constants/index.d.ts +5 -5
  157. package/dist/core/constants/index.js +4 -2
  158. package/dist/core/constants/messages.js +1 -1
  159. package/dist/core/constants/pagination.js +1 -1
  160. package/dist/core/constants/security.d.ts +15 -0
  161. package/dist/core/constants/security.js +4 -2
  162. package/dist/core/constants/validation.js +1 -1
  163. package/dist/core/cors/index.js +1 -1
  164. package/dist/core/error/app-error.d.ts +2 -2
  165. package/dist/core/error/app-error.js +1 -1
  166. package/dist/core/error/extract-error-info.js +1 -1
  167. package/dist/core/error/friendly-messages-v2.d.ts +3 -3
  168. package/dist/core/error/friendly-messages-v2.js +4 -4
  169. package/dist/core/error/friendly-messages.js +1 -1
  170. package/dist/core/error/index.d.ts +6 -6
  171. package/dist/core/error/index.js +4 -4
  172. package/dist/core/error/messages/en.d.ts +1 -1
  173. package/dist/core/error/messages/en.js +1 -1
  174. package/dist/core/error/messages/index.d.ts +2 -2
  175. package/dist/core/error/messages/index.js +3 -3
  176. package/dist/core/error/messages/ko.d.ts +1 -1
  177. package/dist/core/error/messages/ko.js +1 -1
  178. package/dist/core/geolocation/batch-processor.d.ts +1 -1
  179. package/dist/core/geolocation/batch-processor.js +3 -3
  180. package/dist/core/geolocation/config.js +1 -1
  181. package/dist/core/geolocation/index.d.ts +5 -5
  182. package/dist/core/geolocation/index.js +3 -3
  183. package/dist/core/geolocation/providers/base-provider.d.ts +2 -2
  184. package/dist/core/geolocation/providers/base-provider.js +1 -1
  185. package/dist/core/geolocation/providers/index.d.ts +6 -6
  186. package/dist/core/geolocation/providers/index.js +1 -1
  187. package/dist/core/geolocation/providers/ip-api-provider.d.ts +3 -3
  188. package/dist/core/geolocation/providers/ip-api-provider.js +1 -1
  189. package/dist/core/geolocation/providers/ipapi-co-provider.d.ts +3 -3
  190. package/dist/core/geolocation/providers/ipapi-co-provider.js +1 -1
  191. package/dist/core/geolocation/providers/ipgeolocation-provider.d.ts +3 -3
  192. package/dist/core/geolocation/providers/ipgeolocation-provider.js +1 -1
  193. package/dist/core/geolocation/providers/maxmind-provider.d.ts +3 -3
  194. package/dist/core/geolocation/providers/maxmind-provider.js +1 -1
  195. package/dist/core/logger/config.js +1 -1
  196. package/dist/core/logger/logger.js +2 -2
  197. package/dist/core/storage/config.js +1 -1
  198. package/dist/core/storage/r2-storage.js +1 -1
  199. package/dist/core/system/cpu.d.ts +1 -1
  200. package/dist/core/system/cpu.js +4 -4
  201. package/dist/core/system/disk.d.ts +1 -1
  202. package/dist/core/system/disk.js +4 -4
  203. package/dist/core/system/environment.d.ts +1 -1
  204. package/dist/core/system/environment.js +7 -7
  205. package/dist/core/system/health-check.d.ts +2 -2
  206. package/dist/core/system/health-check.js +5 -5
  207. package/dist/core/system/index.d.ts +7 -7
  208. package/dist/core/system/index.js +14 -14
  209. package/dist/core/system/memory.d.ts +1 -1
  210. package/dist/core/system/memory.js +4 -4
  211. package/dist/core/system/network.d.ts +1 -1
  212. package/dist/core/system/network.js +4 -4
  213. package/dist/core/system/utils.js +3 -3
  214. package/dist/core/types/geoip.d.ts +1 -1
  215. package/dist/core/types/qr-code.js +1 -1
  216. package/dist/core/utils/error-message-formatter.js +1 -1
  217. package/dist/core/utils/format-number.js +1 -1
  218. package/dist/core/utils/index.d.ts +3 -3
  219. package/dist/core/utils/index.js +2 -2
  220. package/dist/core/utils/input-validation.js +52 -16
  221. package/dist/core/utils/ip-utils.js +1 -1
  222. package/dist/core/utils/optimistic-lock.js +1 -1
  223. package/dist/core/utils/sanitizer.js +2 -2
  224. package/dist/core/utils/short-code-generator.js +1 -1
  225. package/dist/core/utils/timezone.js +121 -14
  226. package/dist/core/utils/type-guards.js +1 -1
  227. package/dist/core/utils/url-normalizer.js +1 -1
  228. package/dist/core/validators/index.d.ts +1 -1
  229. package/dist/core/validators/index.js +2 -2
  230. package/dist/core/validators/password-validator.d.ts +3 -3
  231. package/dist/core/validators/password-validator.js +2 -2
  232. package/dist/initialize.d.ts +10 -10
  233. package/dist/initialize.js +8 -8
  234. package/dist/next/auth-handlers/forgot-password.handler.d.ts +1 -1
  235. package/dist/next/auth-handlers/forgot-password.handler.js +4 -4
  236. package/dist/next/auth-handlers/index.d.ts +11 -11
  237. package/dist/next/auth-handlers/index.js +29 -28
  238. package/dist/next/auth-handlers/login.handler.d.ts +1 -1
  239. package/dist/next/auth-handlers/login.handler.js +7 -6
  240. package/dist/next/auth-handlers/logout.handler.d.ts +1 -1
  241. package/dist/next/auth-handlers/logout.handler.js +5 -5
  242. package/dist/next/auth-handlers/me.handler.d.ts +1 -1
  243. package/dist/next/auth-handlers/me.handler.js +7 -6
  244. package/dist/next/auth-handlers/oauth-authorize.handler.d.ts +1 -1
  245. package/dist/next/auth-handlers/oauth-authorize.handler.js +5 -5
  246. package/dist/next/auth-handlers/oauth-callback.handler.d.ts +1 -1
  247. package/dist/next/auth-handlers/oauth-callback.handler.js +10 -10
  248. package/dist/next/auth-handlers/refresh.handler.d.ts +1 -1
  249. package/dist/next/auth-handlers/refresh.handler.js +8 -7
  250. package/dist/next/auth-handlers/register.handler.d.ts +1 -1
  251. package/dist/next/auth-handlers/register.handler.js +4 -4
  252. package/dist/next/auth-handlers/reset-password.handler.d.ts +1 -1
  253. package/dist/next/auth-handlers/reset-password.handler.js +4 -4
  254. package/dist/next/auth-handlers/verify-email.handler.d.ts +1 -1
  255. package/dist/next/auth-handlers/verify-email.handler.js +4 -4
  256. package/dist/next/auth-types/handler-types.d.ts +5 -1
  257. package/dist/next/auth-types/handler-types.js +13 -1
  258. package/dist/next/auth-types/index.d.ts +1 -1
  259. package/dist/next/auth-types/index.js +13 -1
  260. package/dist/next/error/error-handler.js +3 -3
  261. package/dist/next/error/index.d.ts +3 -3
  262. package/dist/next/error/index.js +6 -6
  263. package/dist/next/error/locale-detector.d.ts +1 -1
  264. package/dist/next/error/locale-detector.js +1 -1
  265. package/dist/next/middleware/auth.d.ts +3 -3
  266. package/dist/next/middleware/auth.js +8 -7
  267. package/dist/next/middleware/cors.d.ts +2 -2
  268. package/dist/next/middleware/cors.js +3 -3
  269. package/dist/next/middleware/error-handler.d.ts +1 -1
  270. package/dist/next/middleware/error-handler.js +6 -6
  271. package/dist/next/middleware/index.d.ts +11 -11
  272. package/dist/next/middleware/index.js +18 -17
  273. package/dist/next/middleware/init-request.d.ts +1 -1
  274. package/dist/next/middleware/init-request.js +1 -1
  275. package/dist/next/middleware/middleware-chain.d.ts +1 -1
  276. package/dist/next/middleware/middleware-chain.js +3 -3
  277. package/dist/next/middleware/rate-limit.d.ts +2 -2
  278. package/dist/next/middleware/rate-limit.js +3 -3
  279. package/dist/next/middleware/response-logger.d.ts +1 -1
  280. package/dist/next/middleware/response-logger.js +3 -3
  281. package/dist/next/middleware/security.d.ts +1 -1
  282. package/dist/next/middleware/security.js +3 -3
  283. package/dist/next/middleware/types.d.ts +6 -3
  284. package/dist/next/middleware/wrappers.d.ts +2 -2
  285. package/dist/next/middleware/wrappers.js +18 -17
  286. package/dist/next/utils/api-helpers.d.ts +6 -2
  287. package/dist/next/utils/api-helpers.js +3 -2
  288. package/dist/next/utils/cors.js +2 -2
  289. package/dist/next/utils/csv-export-format.js +1 -1
  290. package/dist/next/utils/csv-export.js +3 -3
  291. package/dist/next/utils/error-processor.d.ts +1 -1
  292. package/dist/next/utils/error-processor.js +3 -3
  293. package/dist/next/utils/index.d.ts +5 -5
  294. package/dist/next/utils/index.js +16 -15
  295. package/dist/prisma/auth-adapter/index.d.ts +1 -1
  296. package/dist/prisma/auth-adapter/index.js +1 -1
  297. package/package.json +94 -51
  298. package/dist/chunk-2P4N4OK2.js +0 -150
  299. package/dist/chunk-4IQWQSEV.js +0 -27
  300. package/dist/chunk-4K76HG4V.js +0 -34
  301. package/dist/chunk-7EXSMZ2O.js +0 -29
  302. package/dist/chunk-7VXRBTRF.js +0 -110
  303. package/dist/chunk-ARXUKGZI.js +0 -58
  304. package/dist/chunk-B5OH43PR.js +0 -31
  305. package/dist/chunk-BW4QO7T6.js +0 -56
  306. package/dist/chunk-EK4TL7VW.js +0 -22
  307. package/dist/chunk-ERKJJDY6.js +0 -117
  308. package/dist/chunk-G4GT4X3J.js +0 -240
  309. package/dist/chunk-GPOSTBDQ.js +0 -193
  310. package/dist/chunk-IRUFNC4L.js +0 -26
  311. package/dist/chunk-J2MAXMIP.js +0 -105
  312. package/dist/chunk-MFMQO6IS.js +0 -127
  313. package/dist/chunk-PBQGXOVX.js +0 -31
  314. package/dist/chunk-STMAKLLG.js +0 -24
  315. package/dist/chunk-WP233RH2.js +0 -80
  316. package/dist/chunk-WWOYFWFB.js +0 -137
  317. package/dist/chunk-X7FGBUA4.js +0 -117
  318. package/dist/chunk-YSPIFSDI.js +0 -136
  319. package/dist/chunk-ZCLKRGZ4.js +0 -81
  320. package/dist/react/components/ui/Alert.d.ts +0 -12
  321. package/dist/react/components/ui/Alert.js +0 -10
  322. package/dist/react/components/ui/Badge.d.ts +0 -7
  323. package/dist/react/components/ui/Badge.js +0 -8
  324. package/dist/react/components/ui/Button.d.ts +0 -7
  325. package/dist/react/components/ui/Button.js +0 -8
  326. package/dist/react/components/ui/DataTable.d.ts +0 -8
  327. package/dist/react/components/ui/DataTable.js +0 -22
  328. package/dist/react/components/ui/DomainDisplay.d.ts +0 -12
  329. package/dist/react/components/ui/DomainDisplay.js +0 -31
  330. package/dist/react/components/ui/Input.d.ts +0 -5
  331. package/dist/react/components/ui/Input.js +0 -8
  332. package/dist/react/components/ui/Label.d.ts +0 -5
  333. package/dist/react/components/ui/Label.js +0 -8
  334. package/dist/react/components/ui/Pagination.d.ts +0 -42
  335. package/dist/react/components/ui/Pagination.js +0 -20
  336. package/dist/react/components/ui/Select.d.ts +0 -15
  337. package/dist/react/components/ui/Select.js +0 -27
  338. package/dist/react/components/ui/Skeleton.d.ts +0 -6
  339. package/dist/react/components/ui/Skeleton.js +0 -8
  340. package/dist/react/components/ui/TimezoneDisplay.d.ts +0 -22
  341. package/dist/react/components/ui/TimezoneDisplay.js +0 -83
  342. package/dist/react/components/ui/Tooltip.d.ts +0 -21
  343. package/dist/react/components/ui/Tooltip.js +0 -94
  344. package/dist/react/components/ui/data-table/DataTable.d.ts +0 -2
  345. package/dist/react/components/ui/data-table/DataTable.js +0 -22
  346. package/dist/react/components/ui/data-table/DataTableBody.d.ts +0 -19
  347. package/dist/react/components/ui/data-table/DataTableBody.js +0 -10
  348. package/dist/react/components/ui/data-table/DataTableBulkActions.d.ts +0 -17
  349. package/dist/react/components/ui/data-table/DataTableBulkActions.js +0 -12
  350. package/dist/react/components/ui/data-table/DataTableFilters.d.ts +0 -15
  351. package/dist/react/components/ui/data-table/DataTableFilters.js +0 -13
  352. package/dist/react/components/ui/data-table/DataTablePagination.d.ts +0 -10
  353. package/dist/react/components/ui/data-table/DataTablePagination.js +0 -11
  354. package/dist/react/components/ui/data-table/DataTableSearch.d.ts +0 -24
  355. package/dist/react/components/ui/data-table/DataTableSearch.js +0 -12
  356. package/dist/react/components/ui/data-table/index.d.ts +0 -13
  357. package/dist/react/components/ui/data-table/index.js +0 -42
  358. package/dist/react/components/ui/data-table/types.d.ts +0 -120
  359. package/dist/react/components/ui/data-table/types.js +0 -9
  360. package/dist/react/components/ui/loading-bar.d.ts +0 -20
  361. package/dist/react/components/ui/loading-bar.js +0 -15
  362. package/dist/react/error/error-display.d.ts +0 -48
  363. package/dist/react/error/error-display.js +0 -30
  364. package/dist/react/error/index.d.ts +0 -6
  365. package/dist/react/error/index.js +0 -30
  366. package/dist/react/hooks/useDataTable.d.ts +0 -96
  367. package/dist/react/hooks/useDataTable.js +0 -151
  368. package/dist/react/hooks/useDebounce.d.ts +0 -7
  369. package/dist/react/hooks/useDebounce.js +0 -7
  370. package/dist/react/hooks/useExitIntent.d.ts +0 -35
  371. package/dist/react/hooks/useExitIntent.js +0 -72
  372. package/dist/react/hooks/useTimezone.d.ts +0 -19
  373. package/dist/react/hooks/useTimezone.js +0 -11
  374. package/dist/react/utils/client-utils.d.ts +0 -3
  375. package/dist/react/utils/client-utils.js +0 -9
  376. package/dist/react/utils/qr-code.d.ts +0 -16
  377. package/dist/react/utils/qr-code.js +0 -215
  378. package/dist/{chunk-7PEVOMBO.js → chunk-AOWUPAPS.js} +0 -0
  379. package/dist/{chunk-UQ3Z3ZAF.js → chunk-ER6LSA4M.js} +6 -6
  380. package/dist/{chunk-7WG7XPXC.js → chunk-KKZCNF6U.js} +3 -3
  381. /package/dist/{chunk-M22Z2NO6.js → core/auth/services/refresh-token-store.js} +0 -0
@@ -1,3 +1,13 @@
1
+ import {
2
+ getAllowedOrigins,
3
+ getCorsConfig,
4
+ initCorsConfig,
5
+ isOriginAllowed,
6
+ setCorsHeaders,
7
+ withCORS,
8
+ withPublicCORS,
9
+ withRestrictedCORS
10
+ } from "../../chunk-34L7HTM7.js";
1
11
  import {
2
12
  boolFormatter,
3
13
  createCsvHeader,
@@ -6,7 +16,7 @@ import {
6
16
  dateFormatter,
7
17
  escapeCsvField,
8
18
  rowToCsv
9
- } from "../../chunk-JIYLTMVL.js";
19
+ } from "../../chunk-DVCGAI5N.js";
10
20
  import {
11
21
  ErrorProcessor,
12
22
  errorToResponse,
@@ -20,7 +30,7 @@ import {
20
30
  throwUnauthorizedError,
21
31
  throwValidationError,
22
32
  withErrorHandling
23
- } from "../../chunk-IOUNOHP7.js";
33
+ } from "../../chunk-BRFW2LL2.js";
24
34
  import {
25
35
  createPaginatedResponse,
26
36
  getReferer,
@@ -34,26 +44,17 @@ import {
34
44
  parseSort,
35
45
  requireAdmin,
36
46
  validateAndParse
37
- } from "../../chunk-V6YD53NH.js";
38
- import {
39
- getAllowedOrigins,
40
- getCorsConfig,
41
- initCorsConfig,
42
- isOriginAllowed,
43
- setCorsHeaders,
44
- withCORS,
45
- withPublicCORS,
46
- withRestrictedCORS
47
- } from "../../chunk-ZTRASVGZ.js";
47
+ } from "../../chunk-23LQJYZN.js";
48
48
  import "../../chunk-ATAQRXTH.js";
49
49
  import "../../chunk-XQIAXMRY.js";
50
50
  import "../../chunk-7ZO5UNTJ.js";
51
- import "../../chunk-KG65BFPK.js";
51
+ import "../../chunk-7YWUKMZD.js";
52
+ import "../../chunk-QAIN3WNN.js";
52
53
  import "../../chunk-IKZB26SK.js";
53
54
  import "../../chunk-PX535BHW.js";
54
55
  import "../../chunk-6J2EJVND.js";
55
56
  import "../../chunk-F3R3UYBF.js";
56
- import "../../chunk-ORMEWXMH.js";
57
+ import "../../chunk-N3ETBM74.js";
57
58
  export {
58
59
  ErrorProcessor,
59
60
  boolFormatter,
@@ -8,7 +8,7 @@
8
8
  * 패키지 독립성을 위해 덕 타이핑(Duck Typing) 방식으로 PrismaClient를 받습니다.
9
9
  */
10
10
  type PrismaClientLike = Record<string, any>;
11
- import type { UserRepository, OAuthAccountRepository, EmailTokenRepository, BaseUser, CreateUserData, UpdateUserData, OAuthAccount, CreateOAuthAccountData, UpdateOAuthAccountData, EmailToken, TokenType } from '@withwiz/core/auth/types';
11
+ import type { UserRepository, OAuthAccountRepository, EmailTokenRepository, BaseUser, CreateUserData, UpdateUserData, OAuthAccount, CreateOAuthAccountData, UpdateOAuthAccountData, EmailToken, TokenType } from '@withwiz/toolkit/core/auth/types';
12
12
  export interface PrismaAdapterConfig {
13
13
  tokenTables?: {
14
14
  emailVerification?: string;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __spreadValues
3
- } from "../../chunk-ORMEWXMH.js";
3
+ } from "../../chunk-N3ETBM74.js";
4
4
 
5
5
  // src/prisma/auth-adapter/index.ts
6
6
  var DEFAULT_CONFIG = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withwiz/toolkit",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "Shared utility library for withwiz projects",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -31,86 +31,101 @@
31
31
  },
32
32
  "exports": {
33
33
  "./initialize": "./dist/initialize.js",
34
- "./core/config": {
35
- "types": "./dist/core/config/registry.d.ts",
36
- "import": "./dist/core/config/registry.js"
37
- },
38
- "./core/config/errors": "./dist/core/config/errors.js",
39
- "./core/config/common": "./dist/core/config/common.js",
40
- "./core/auth/config": "./dist/core/auth/config.js",
41
- "./core/cache/config": "./dist/core/cache/config.js",
42
- "./core/logger/config": "./dist/core/logger/config.js",
43
- "./core/storage/config": "./dist/core/storage/config.js",
44
- "./core/geolocation/config": "./dist/core/geolocation/config.js",
45
- "./core/cors": "./dist/core/cors/index.js",
46
34
  "./core/auth": "./dist/core/auth/index.js",
35
+ "./core/auth/config": "./dist/core/auth/config.js",
36
+ "./core/auth/email": "./dist/core/auth/email/index.js",
37
+ "./core/auth/email/sender": "./dist/core/auth/email/sender.js",
38
+ "./core/auth/email/token-generator": "./dist/core/auth/email/token-generator.js",
39
+ "./core/auth/errors": "./dist/core/auth/errors/index.js",
47
40
  "./core/auth/jwt": "./dist/core/auth/jwt/index.js",
48
41
  "./core/auth/jwt/client": "./dist/core/auth/jwt/client.js",
49
- "./core/auth/password": "./dist/core/auth/password/index.js",
50
- "./core/auth/password/client-helper": "./dist/core/auth/password/client-helper.js",
42
+ "./core/auth/jwt/cookie": "./dist/core/auth/jwt/cookie.js",
51
43
  "./core/auth/oauth": "./dist/core/auth/oauth/index.js",
52
44
  "./core/auth/oauth/providers": "./dist/core/auth/oauth/providers/index.js",
53
- "./core/auth/oauth/providers/google": "./dist/core/auth/oauth/providers/google.js",
54
45
  "./core/auth/oauth/providers/github": "./dist/core/auth/oauth/providers/github.js",
46
+ "./core/auth/oauth/providers/google": "./dist/core/auth/oauth/providers/google.js",
55
47
  "./core/auth/oauth/providers/kakao": "./dist/core/auth/oauth/providers/kakao.js",
56
- "./core/auth/oauth/providers/microsoft": "./dist/core/auth/oauth/providers/microsoft.js",
57
48
  "./core/auth/oauth/providers/meta": "./dist/core/auth/oauth/providers/meta.js",
49
+ "./core/auth/oauth/providers/microsoft": "./dist/core/auth/oauth/providers/microsoft.js",
50
+ "./core/auth/oauth/state-cookie": "./dist/core/auth/oauth/state-cookie.js",
51
+ "./core/auth/password": "./dist/core/auth/password/index.js",
52
+ "./core/auth/password/client-helper": "./dist/core/auth/password/client-helper.js",
53
+ "./core/auth/password/hasher": "./dist/core/auth/password/hasher.js",
58
54
  "./core/auth/services": "./dist/core/auth/services/index.js",
59
- "./core/auth/email": "./dist/core/auth/email/index.js",
55
+ "./core/auth/services/email-verification.service": "./dist/core/auth/services/email-verification.service.js",
56
+ "./core/auth/services/login.service": "./dist/core/auth/services/login.service.js",
57
+ "./core/auth/services/oauth-callback.service": "./dist/core/auth/services/oauth-callback.service.js",
58
+ "./core/auth/services/password-reset.service": "./dist/core/auth/services/password-reset.service.js",
59
+ "./core/auth/services/register.service": "./dist/core/auth/services/register.service.js",
60
+ "./core/auth/services/token-refresh.service": "./dist/core/auth/services/token-refresh.service.js",
61
+ "./core/auth/services/refresh-token-store": "./dist/core/auth/services/refresh-token-store.js",
62
+ "./core/auth/token-delivery": "./dist/core/auth/token-delivery.js",
60
63
  "./core/auth/types": "./dist/core/auth/types/index.js",
61
- "./next/auth-handlers": "./dist/next/auth-handlers/index.js",
62
- "./next/auth-types": "./dist/next/auth-types/index.js",
63
- "./prisma/auth-adapter": "./dist/prisma/auth-adapter/index.js",
64
64
  "./core/cache": "./dist/core/cache/index.js",
65
65
  "./core/cache/cache": "./dist/core/cache/cache.js",
66
- "./core/cache/cache-factory": "./dist/core/cache/cache-factory.js",
67
- "./core/cache/cache-invalidation": "./dist/core/cache/cache-invalidation.js",
66
+ "./core/cache/cache-config": "./dist/core/cache/cache-config.js",
68
67
  "./core/cache/cache-defaults": "./dist/core/cache/cache-defaults.js",
69
68
  "./core/cache/cache-env": "./dist/core/cache/cache-env.js",
69
+ "./core/cache/cache-factory": "./dist/core/cache/cache-factory.js",
70
+ "./core/cache/cache-invalidation": "./dist/core/cache/cache-invalidation.js",
71
+ "./core/cache/cache-redis": "./dist/core/cache/cache-redis.js",
72
+ "./core/cache/cache-types": "./dist/core/cache/cache-types.js",
73
+ "./core/cache/cache-wrapper": "./dist/core/cache/cache-wrapper.js",
74
+ "./core/cache/config": "./dist/core/cache/config.js",
70
75
  "./core/cache/hybrid-cache-manager": "./dist/core/cache/hybrid-cache-manager.js",
71
- "./react/components/ui/*": "./dist/react/components/ui/*.js",
72
- "./react/components/ui/data-table": "./dist/react/components/ui/data-table/index.js",
73
- "./react/components/ui/data-table/*": "./dist/react/components/ui/data-table/*.js",
76
+ "./core/cache/inmemory-cache-manager": "./dist/core/cache/inmemory-cache-manager.js",
77
+ "./core/cache/noop-cache-manager": "./dist/core/cache/noop-cache-manager.js",
78
+ "./core/cache/redis-cache-manager": "./dist/core/cache/redis-cache-manager.js",
79
+ "./core/config": {
80
+ "types": "./dist/core/config/registry.d.ts",
81
+ "import": "./dist/core/config/registry.js"
82
+ },
83
+ "./core/config/common": "./dist/core/config/common.js",
84
+ "./core/config/errors": "./dist/core/config/errors.js",
85
+ "./core/config/registry": "./dist/core/config/registry.js",
74
86
  "./core/constants": "./dist/core/constants/index.js",
75
87
  "./core/constants/error-codes": "./dist/core/constants/error-codes.js",
76
88
  "./core/constants/messages": "./dist/core/constants/messages.js",
77
89
  "./core/constants/pagination": "./dist/core/constants/pagination.js",
78
90
  "./core/constants/security": "./dist/core/constants/security.js",
91
+ "./core/constants/validation": "./dist/core/constants/validation.js",
92
+ "./core/cors": "./dist/core/cors/index.js",
79
93
  "./core/error": "./dist/core/error/index.js",
80
94
  "./core/error/app-error": "./dist/core/error/app-error.js",
95
+ "./core/error/extract-error-info": "./dist/core/error/extract-error-info.js",
96
+ "./core/error/friendly-messages-v2": "./dist/core/error/friendly-messages-v2.js",
81
97
  "./core/error/messages": "./dist/core/error/messages/index.js",
82
- "./next/error": "./dist/next/error/index.js",
83
- "./next/error/error-handler": "./dist/next/error/error-handler.js",
84
- "./react/error": "./dist/react/error/index.js",
85
- "./react/error/error-display": "./dist/react/error/error-display.js",
98
+ "./core/error/messages/types": "./dist/core/error/messages/types.js",
86
99
  "./core/geolocation": "./dist/core/geolocation/index.js",
87
100
  "./core/geolocation/batch-processor": "./dist/core/geolocation/batch-processor.js",
101
+ "./core/geolocation/config": "./dist/core/geolocation/config.js",
88
102
  "./core/geolocation/providers": "./dist/core/geolocation/providers/index.js",
89
- "./react/hooks/useDataTable": "./dist/react/hooks/useDataTable.js",
90
- "./react/hooks/useDebounce": "./dist/react/hooks/useDebounce.js",
91
- "./react/hooks/useExitIntent": "./dist/react/hooks/useExitIntent.js",
92
- "./react/hooks/useTimezone": "./dist/react/hooks/useTimezone.js",
103
+ "./core/geolocation/providers/base-provider": "./dist/core/geolocation/providers/base-provider.js",
104
+ "./core/geolocation/providers/ip-api-provider": "./dist/core/geolocation/providers/ip-api-provider.js",
105
+ "./core/geolocation/providers/ipapi-co-provider": "./dist/core/geolocation/providers/ipapi-co-provider.js",
106
+ "./core/geolocation/providers/ipgeolocation-provider": "./dist/core/geolocation/providers/ipgeolocation-provider.js",
107
+ "./core/geolocation/providers/maxmind-provider": "./dist/core/geolocation/providers/maxmind-provider.js",
108
+ "./core/logger/config": "./dist/core/logger/config.js",
93
109
  "./core/logger/logger": "./dist/core/logger/logger.js",
94
- "./next/middleware": "./dist/next/middleware/index.js",
95
- "./next/middleware/types": "./dist/next/middleware/types.js",
96
- "./next/middleware/wrappers": "./dist/next/middleware/wrappers.js",
97
- "./next/middleware/auth": "./dist/next/middleware/auth.js",
98
- "./next/middleware/rate-limit": "./dist/next/middleware/rate-limit.js",
99
- "./next/middleware/cors": "./dist/next/middleware/cors.js",
100
- "./next/middleware/security": "./dist/next/middleware/security.js",
101
110
  "./core/storage": {
102
111
  "types": "./dist/core/storage/r2-storage.d.ts",
103
112
  "import": "./dist/core/storage/r2-storage.js"
104
113
  },
114
+ "./core/storage/config": "./dist/core/storage/config.js",
105
115
  "./core/storage/r2-storage": "./dist/core/storage/r2-storage.js",
106
116
  "./core/system": "./dist/core/system/index.js",
107
- "./core/system/types": "./dist/core/system/types.js",
117
+ "./core/system/cpu": "./dist/core/system/cpu.js",
118
+ "./core/system/disk": "./dist/core/system/disk.js",
119
+ "./core/system/environment": "./dist/core/system/environment.js",
108
120
  "./core/system/health-check": "./dist/core/system/health-check.js",
109
- "./core/types/i18n": "./dist/core/types/i18n.js",
121
+ "./core/system/memory": "./dist/core/system/memory.js",
122
+ "./core/system/network": "./dist/core/system/network.js",
123
+ "./core/system/types": "./dist/core/system/types.js",
110
124
  "./core/types/api": "./dist/core/types/api.js",
111
125
  "./core/types/database": "./dist/core/types/database.js",
112
126
  "./core/types/env": "./dist/core/types/env.js",
113
127
  "./core/types/geoip": "./dist/core/types/geoip.js",
128
+ "./core/types/i18n": "./dist/core/types/i18n.js",
114
129
  "./core/types/qr-code": "./dist/core/types/qr-code.js",
115
130
  "./core/types/user": "./dist/core/types/user.js",
116
131
  "./core/utils": "./dist/core/utils/index.js",
@@ -124,16 +139,46 @@
124
139
  "./core/utils/timezone": "./dist/core/utils/timezone.js",
125
140
  "./core/utils/type-guards": "./dist/core/utils/type-guards.js",
126
141
  "./core/utils/url-normalizer": "./dist/core/utils/url-normalizer.js",
142
+ "./core/validators": "./dist/core/validators/index.js",
143
+ "./core/validators/password-validator": "./dist/core/validators/password-validator.js",
144
+ "./next/auth-handlers": "./dist/next/auth-handlers/index.js",
145
+ "./next/auth-handlers/forgot-password.handler": "./dist/next/auth-handlers/forgot-password.handler.js",
146
+ "./next/auth-handlers/login.handler": "./dist/next/auth-handlers/login.handler.js",
147
+ "./next/auth-handlers/logout.handler": "./dist/next/auth-handlers/logout.handler.js",
148
+ "./next/auth-handlers/me.handler": "./dist/next/auth-handlers/me.handler.js",
149
+ "./next/auth-handlers/oauth-authorize.handler": "./dist/next/auth-handlers/oauth-authorize.handler.js",
150
+ "./next/auth-handlers/oauth-callback.handler": "./dist/next/auth-handlers/oauth-callback.handler.js",
151
+ "./next/auth-handlers/refresh.handler": "./dist/next/auth-handlers/refresh.handler.js",
152
+ "./next/auth-handlers/register.handler": "./dist/next/auth-handlers/register.handler.js",
153
+ "./next/auth-handlers/reset-password.handler": "./dist/next/auth-handlers/reset-password.handler.js",
154
+ "./next/auth-handlers/verify-email.handler": "./dist/next/auth-handlers/verify-email.handler.js",
155
+ "./next/auth-types": "./dist/next/auth-types/index.js",
156
+ "./next/auth-types/handler-types": "./dist/next/auth-types/handler-types.js",
157
+ "./next/error": "./dist/next/error/index.js",
158
+ "./next/error/error-handler": "./dist/next/error/error-handler.js",
159
+ "./next/error/ErrorBoundary": {
160
+ "types": "./dist/next/error/ErrorBoundary.d.ts",
161
+ "import": "./dist/next/error/index.js"
162
+ },
163
+ "./next/error/locale-detector": "./dist/next/error/locale-detector.js",
164
+ "./next/middleware": "./dist/next/middleware/index.js",
165
+ "./next/middleware/auth": "./dist/next/middleware/auth.js",
166
+ "./next/middleware/cors": "./dist/next/middleware/cors.js",
167
+ "./next/middleware/error-handler": "./dist/next/middleware/error-handler.js",
168
+ "./next/middleware/init-request": "./dist/next/middleware/init-request.js",
169
+ "./next/middleware/middleware-chain": "./dist/next/middleware/middleware-chain.js",
170
+ "./next/middleware/rate-limit": "./dist/next/middleware/rate-limit.js",
171
+ "./next/middleware/response-logger": "./dist/next/middleware/response-logger.js",
172
+ "./next/middleware/security": "./dist/next/middleware/security.js",
173
+ "./next/middleware/types": "./dist/next/middleware/types.js",
174
+ "./next/middleware/wrappers": "./dist/next/middleware/wrappers.js",
127
175
  "./next/utils": "./dist/next/utils/index.js",
128
176
  "./next/utils/api-helpers": "./dist/next/utils/api-helpers.js",
129
177
  "./next/utils/cors": "./dist/next/utils/cors.js",
130
178
  "./next/utils/csv-export": "./dist/next/utils/csv-export.js",
131
179
  "./next/utils/csv-export-format": "./dist/next/utils/csv-export-format.js",
132
180
  "./next/utils/error-processor": "./dist/next/utils/error-processor.js",
133
- "./react/utils/client-utils": "./dist/react/utils/client-utils.js",
134
- "./react/utils/qr-code": "./dist/react/utils/qr-code.js",
135
- "./core/validators": "./dist/core/validators/index.js",
136
- "./core/validators/password-validator": "./dist/core/validators/password-validator.js"
181
+ "./prisma/auth-adapter": "./dist/prisma/auth-adapter/index.js"
137
182
  },
138
183
  "scripts": {
139
184
  "build": "tsup && tsc --emitDeclarationOnly --skipLibCheck",
@@ -158,7 +203,6 @@
158
203
  "clsx": "^2.1.1",
159
204
  "jose": "^6.1.0",
160
205
  "lucide-react": "^0.562.0",
161
- "sonner": "^2.0.5",
162
206
  "tailwind-merge": "^3.3.1",
163
207
  "winston": "^3.17.0",
164
208
  "winston-daily-rotate-file": "^5.0.0",
@@ -168,7 +212,7 @@
168
212
  "next": ">=15.0.0",
169
213
  "react": ">=18.0.0",
170
214
  "react-dom": ">=18.0.0",
171
- "@radix-ui/react-select": ">=2.0.0",
215
+ "argon2": ">=0.31.0",
172
216
  "date-fns": ">=3.0.0",
173
217
  "nodemailer": ">=6.0.0"
174
218
  },
@@ -182,7 +226,7 @@
182
226
  "react-dom": {
183
227
  "optional": true
184
228
  },
185
- "@radix-ui/react-select": {
229
+ "argon2": {
186
230
  "optional": true
187
231
  },
188
232
  "date-fns": {
@@ -193,7 +237,6 @@
193
237
  }
194
238
  },
195
239
  "devDependencies": {
196
- "@radix-ui/react-select": "^2.2.6",
197
240
  "@testing-library/react": "^16.3.2",
198
241
  "@testing-library/user-event": "^14.5.1",
199
242
  "@types/bcryptjs": "^3.0.0",
@@ -1,150 +0,0 @@
1
- import {
2
- LoadingBar
3
- } from "./chunk-X7FGBUA4.js";
4
- import {
5
- cn
6
- } from "./chunk-4K76HG4V.js";
7
-
8
- // src/react/components/ui/data-table/DataTableBody.tsx
9
- import { useRef, useEffect } from "react";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
- function DataTableBody({
12
- data,
13
- visibleColumns,
14
- loading,
15
- error,
16
- emptyMessage,
17
- selectable,
18
- localSelectedIds,
19
- getRowId,
20
- onSelectAll,
21
- onSelect,
22
- sort,
23
- onSort,
24
- labels
25
- }) {
26
- const selectAllRef = useRef(null);
27
- useEffect(() => {
28
- if (selectAllRef.current) {
29
- selectAllRef.current.indeterminate = localSelectedIds.length > 0 && localSelectedIds.length < data.length;
30
- }
31
- }, [localSelectedIds, data.length]);
32
- return /* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto max-w-full", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-sm min-w-full", children: [
33
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "border-b bg-muted/50", children: [
34
- selectable && /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-center font-medium w-12", children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(
35
- "input",
36
- {
37
- "data-testid": "select-all-checkbox",
38
- type: "checkbox",
39
- ref: selectAllRef,
40
- checked: data.length > 0 && localSelectedIds.length === data.length,
41
- onChange: (e) => onSelectAll(e.target.checked),
42
- className: "h-4 w-4"
43
- }
44
- ) }) }),
45
- visibleColumns.map((column) => {
46
- var _a, _b, _c, _d;
47
- const width = column.width === "auto" ? void 0 : column.width;
48
- return /* @__PURE__ */ jsx(
49
- "th",
50
- {
51
- className: cn(
52
- "px-2 py-2 font-medium first:pl-4 last:pr-4",
53
- column.sortable && "cursor-pointer",
54
- column.className,
55
- ((_a = column.responsive) == null ? void 0 : _a.sm) && "hidden sm:table-cell",
56
- ((_b = column.responsive) == null ? void 0 : _b.md) && "hidden md:table-cell",
57
- ((_c = column.responsive) == null ? void 0 : _c.lg) && "hidden lg:table-cell",
58
- ((_d = column.responsive) == null ? void 0 : _d.xl) && "hidden xl:table-cell"
59
- ),
60
- style: {
61
- width,
62
- minWidth: column.minWidth || width || void 0,
63
- maxWidth: column.maxWidth || void 0
64
- },
65
- onClick: column.sortable ? () => onSort(column.key) : void 0,
66
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-1", children: [
67
- column.header,
68
- column.sortable && sort && sort.sort === column.key && /* @__PURE__ */ jsx("span", { children: sort.order === "asc" ? "\u25B2" : "\u25BC" })
69
- ] })
70
- },
71
- column.key
72
- );
73
- })
74
- ] }) }),
75
- /* @__PURE__ */ jsx("tbody", { children: loading ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
76
- "td",
77
- {
78
- colSpan: visibleColumns.length + (selectable ? 1 : 0),
79
- className: "text-center py-8",
80
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center space-y-3", children: [
81
- /* @__PURE__ */ jsx(LoadingBar, { size: "md", variant: "primary", className: "w-64" }),
82
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: labels.loading })
83
- ] })
84
- }
85
- ) }) : error ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
86
- "td",
87
- {
88
- colSpan: visibleColumns.length + (selectable ? 1 : 0),
89
- className: "text-center py-8 text-destructive",
90
- children: error
91
- }
92
- ) }) : data.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
93
- "td",
94
- {
95
- colSpan: visibleColumns.length + (selectable ? 1 : 0),
96
- className: "text-center py-8 text-muted-foreground",
97
- children: emptyMessage
98
- }
99
- ) }) : data.map((item) => {
100
- const rowId = getRowId(item);
101
- return /* @__PURE__ */ jsxs(
102
- "tr",
103
- {
104
- className: cn(
105
- "border-b last:border-0 hover:bg-muted/30",
106
- localSelectedIds.includes(rowId) && "bg-primary/5"
107
- ),
108
- children: [
109
- selectable && /* @__PURE__ */ jsx("td", { className: "px-3 py-3 text-center w-12", children: /* @__PURE__ */ jsx(
110
- "input",
111
- {
112
- "data-testid": `row-checkbox-${rowId}`,
113
- type: "checkbox",
114
- checked: localSelectedIds.includes(rowId),
115
- onChange: (e) => onSelect(rowId, e.target.checked),
116
- className: "h-4 w-4"
117
- }
118
- ) }),
119
- visibleColumns.map((column) => {
120
- var _a, _b, _c, _d;
121
- return /* @__PURE__ */ jsx(
122
- "td",
123
- {
124
- className: cn(
125
- "px-2 py-3 overflow-hidden first:pl-4 last:pr-4",
126
- column.className,
127
- ((_a = column.responsive) == null ? void 0 : _a.sm) && "hidden sm:table-cell",
128
- ((_b = column.responsive) == null ? void 0 : _b.md) && "hidden md:table-cell",
129
- ((_c = column.responsive) == null ? void 0 : _c.lg) && "hidden lg:table-cell",
130
- ((_d = column.responsive) == null ? void 0 : _d.xl) && "hidden xl:table-cell"
131
- ),
132
- style: {
133
- maxWidth: column.maxWidth || column.width || void 0
134
- },
135
- children: column.cell ? column.cell(item) : column.accessorKey ? String(item[column.accessorKey] || "") : ""
136
- },
137
- column.key
138
- );
139
- })
140
- ]
141
- },
142
- rowId
143
- );
144
- }) })
145
- ] }) }) });
146
- }
147
-
148
- export {
149
- DataTableBody
150
- };
@@ -1,27 +0,0 @@
1
- import {
2
- cn
3
- } from "./chunk-4K76HG4V.js";
4
- import {
5
- __objRest,
6
- __spreadValues
7
- } from "./chunk-ORMEWXMH.js";
8
-
9
- // src/react/components/ui/Input.tsx
10
- import { jsx } from "react/jsx-runtime";
11
- function Input(_a) {
12
- var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
13
- return /* @__PURE__ */ jsx(
14
- "input",
15
- __spreadValues({
16
- type,
17
- className: cn(
18
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
19
- className
20
- )
21
- }, props)
22
- );
23
- }
24
-
25
- export {
26
- Input
27
- };
@@ -1,34 +0,0 @@
1
- // src/react/utils/client-utils.ts
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
- function cn(...inputs) {
5
- return twMerge(clsx(inputs));
6
- }
7
- async function copyToClipboard(text) {
8
- try {
9
- if (navigator.clipboard && window.isSecureContext) {
10
- await navigator.clipboard.writeText(text);
11
- return true;
12
- } else {
13
- const textArea = document.createElement("textarea");
14
- textArea.value = text;
15
- textArea.style.position = "fixed";
16
- textArea.style.left = "-999999px";
17
- textArea.style.top = "-999999px";
18
- document.body.appendChild(textArea);
19
- textArea.focus();
20
- textArea.select();
21
- const result = document.execCommand("copy");
22
- textArea.remove();
23
- return result;
24
- }
25
- } catch (error) {
26
- console.error("Failed to copy to clipboard:", error);
27
- return false;
28
- }
29
- }
30
-
31
- export {
32
- cn,
33
- copyToClipboard
34
- };
@@ -1,29 +0,0 @@
1
- // src/react/hooks/useDebounce.ts
2
- import { useEffect, useState, useRef } from "react";
3
- function useDebounce(value, delay) {
4
- const [debouncedValue, setDebouncedValue] = useState(value);
5
- const timeoutRef = useRef(null);
6
- const lastValueRef = useRef(value);
7
- useEffect(() => {
8
- if (value === lastValueRef.current) {
9
- return;
10
- }
11
- lastValueRef.current = value;
12
- if (timeoutRef.current) {
13
- clearTimeout(timeoutRef.current);
14
- }
15
- timeoutRef.current = setTimeout(() => {
16
- setDebouncedValue(value);
17
- }, delay);
18
- return () => {
19
- if (timeoutRef.current) {
20
- clearTimeout(timeoutRef.current);
21
- }
22
- };
23
- }, [value, delay]);
24
- return debouncedValue;
25
- }
26
-
27
- export {
28
- useDebounce
29
- };