@withwiz/toolkit 0.7.0 → 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.
- package/README.ko.md +235 -0
- package/README.md +57 -26
- package/dist/{chunk-V6YD53NH.js → chunk-23LQJYZN.js} +5 -2
- package/dist/{chunk-ZTRASVGZ.js → chunk-34L7HTM7.js} +1 -1
- package/dist/{chunk-GSUCBWML.js → chunk-3RK3MKAR.js} +5 -2
- package/dist/{chunk-6JXHXIEH.js → chunk-3UIKCS56.js} +2 -2
- package/dist/{chunk-MNYVAEXK.js → chunk-4ROIPF33.js} +16 -3
- package/dist/{chunk-DUIQUAHR.js → chunk-4TGPAUJV.js} +4 -4
- package/dist/{chunk-P4CZVRSG.js → chunk-4XPXZNBX.js} +18 -11
- package/dist/{chunk-LG3KM5V3.js → chunk-5I3EQHR4.js} +6 -2
- package/dist/chunk-63EKUOJH.js +72 -0
- package/dist/{chunk-N5VOFGF3.js → chunk-75UDFONR.js} +5 -4
- package/dist/{chunk-T4643SEW.js → chunk-7KIM5MHV.js} +4 -4
- package/dist/{chunk-TF5RJ5Q2.js → chunk-7S2PCYNT.js} +5 -5
- package/dist/{chunk-2SIBG5BG.js → chunk-7YWUKMZD.js} +7 -0
- package/dist/{chunk-7X2N4VZM.js → chunk-ATBYGPLP.js} +1 -1
- package/dist/{chunk-A74POWYY.js → chunk-B7AJJKOY.js} +1 -1
- package/dist/{chunk-HKW4JA45.js → chunk-BRBOGLFT.js} +10 -10
- package/dist/{chunk-ZFNIHVVA.js → chunk-BRFW2LL2.js} +5 -5
- package/dist/{chunk-I4NT6G2T.js → chunk-DRTJSTEV.js} +2 -2
- package/dist/{chunk-H5KYXSYZ.js → chunk-DVCGAI5N.js} +2 -12
- package/dist/{chunk-AV7ELXHG.js → chunk-E5TDIRBJ.js} +2 -2
- package/dist/{chunk-Q5ERE4M3.js → chunk-HGVPZSWW.js} +18 -13
- package/dist/{chunk-2QVDB6UO.js → chunk-HV6A6Z5R.js} +1 -1
- package/dist/chunk-ILMPKSWS.js +125 -0
- package/dist/{chunk-J5NLAZV2.js → chunk-JHUWZ6YW.js} +2 -2
- package/dist/{chunk-LON5THYQ.js → chunk-KLMKCYIN.js} +1 -1
- package/dist/{chunk-4KJZRI74.js → chunk-KWUOLKDO.js} +1 -1
- package/dist/{chunk-GJO2MPC3.js → chunk-LCYDMYZS.js} +1 -1
- package/dist/{chunk-UP3VFIVQ.js → chunk-LL3VWKY4.js} +1 -1
- package/dist/{chunk-IMAFMUZ7.js → chunk-LSS3GJUE.js} +3 -2
- package/dist/{chunk-2PFSRVVD.js → chunk-LWHLB2Y6.js} +84 -18
- package/dist/{chunk-BBE4RXR7.js → chunk-MTZXWVW3.js} +17 -6
- package/dist/{chunk-ORMEWXMH.js → chunk-N3ETBM74.js} +1 -14
- package/dist/{chunk-UKPMQBU2.js → chunk-N3TCQ5BF.js} +6 -5
- package/dist/{chunk-TMTN7H46.js → chunk-NLV7IEYM.js} +7 -6
- package/dist/{chunk-P2VPYAJZ.js → chunk-NTZBMWB6.js} +6 -6
- package/dist/{chunk-ZVGEGDYF.js → chunk-OII5BXCZ.js} +1 -1
- package/dist/{chunk-2JGSS4RM.js → chunk-PRPMEHRE.js} +2 -2
- package/dist/{chunk-KG65BFPK.js → chunk-QAIN3WNN.js} +1 -1
- package/dist/{chunk-2MYD2BFJ.js → chunk-R7EFDSPZ.js} +7 -7
- package/dist/{chunk-VJE4HA2C.js → chunk-RWCPRPEP.js} +3 -2
- package/dist/{chunk-4YDBQZ5M.js → chunk-SCAFDDJP.js} +14 -14
- package/dist/{chunk-KXYDTC4A.js → chunk-SNFPZD6L.js} +11 -2
- package/dist/{chunk-BL6QHL5L.js → chunk-SXBDP3CK.js} +3 -3
- package/dist/{chunk-B5VRZ2VJ.js → chunk-TNDEYJEL.js} +25 -6
- package/dist/{chunk-Q4XDPK5B.js → chunk-TRGFXIEF.js} +3 -3
- package/dist/{chunk-VNDL2E44.js → chunk-U52U5SK7.js} +2 -2
- package/dist/{chunk-3KYSGBVF.js → chunk-UWOWKOOQ.js} +5 -3
- package/dist/{chunk-TQ3XHHZK.js → chunk-V3WZFUY3.js} +9 -9
- package/dist/{chunk-5BBVV2EX.js → chunk-VH57Y5Z4.js} +1 -1
- package/dist/{chunk-5S7M2AJL.js → chunk-VWAB4PM7.js} +1 -1
- package/dist/{chunk-AQZPGOEZ.js → chunk-VWKZMGPJ.js} +5 -4
- package/dist/{chunk-4K27YLAE.js → chunk-VZ2PQA4U.js} +2 -2
- package/dist/{chunk-ZOWEW4GY.js → chunk-WBHX4MJV.js} +2 -2
- package/dist/{chunk-UMRKMF3E.js → chunk-WXOWI7BJ.js} +2 -2
- package/dist/chunk-XAGPZLRK.js +106 -0
- package/dist/{chunk-AWIORJAI.js → chunk-XF3WUF3F.js} +2 -2
- package/dist/{chunk-M5ZYAQBB.js → chunk-XKIBJJA3.js} +28 -24
- package/dist/{chunk-ZLYBY3R4.js → chunk-XTGS6JJB.js} +10 -5
- package/dist/{chunk-KCDJIW2F.js → chunk-XXPB4C37.js} +5 -5
- package/dist/{chunk-LUIYCIF7.js → chunk-Y4ME3Q5K.js} +2 -2
- package/dist/{chunk-Q66VOVGN.js → chunk-Y4WPEIKW.js} +1 -1
- package/dist/{chunk-TUA5XW5Z.js → chunk-Y6CPPBJI.js} +1 -1
- package/dist/{chunk-PRWWB4QY.js → chunk-ZEHNCHIV.js} +2 -2
- package/dist/{chunk-D73ZJQMX.js → chunk-ZZABL54F.js} +13 -0
- package/dist/core/auth/config.d.ts +3 -0
- package/dist/core/auth/config.js +3 -3
- package/dist/core/auth/email/index.d.ts +3 -3
- package/dist/core/auth/email/index.js +3 -3
- package/dist/core/auth/email/sender.d.ts +1 -1
- package/dist/core/auth/email/sender.js +2 -2
- package/dist/core/auth/email/token-generator.d.ts +11 -0
- package/dist/core/auth/email/token-generator.js +2 -2
- package/dist/core/auth/errors/index.js +1 -1
- package/dist/core/auth/index.d.ts +11 -11
- package/dist/core/auth/index.js +24 -16
- package/dist/core/auth/jwt/client.js +3 -2
- package/dist/core/auth/jwt/cookie.d.ts +1 -1
- package/dist/core/auth/jwt/cookie.js +4 -4
- package/dist/core/auth/jwt/index.d.ts +41 -9
- package/dist/core/auth/jwt/index.js +6 -6
- package/dist/core/auth/jwt/types.d.ts +1 -1
- package/dist/core/auth/jwt/types.js +1 -1
- package/dist/core/auth/oauth/index.d.ts +6 -6
- package/dist/core/auth/oauth/index.js +5 -5
- package/dist/core/auth/oauth/providers/github.d.ts +1 -1
- package/dist/core/auth/oauth/providers/github.js +1 -1
- package/dist/core/auth/oauth/providers/google.d.ts +1 -1
- package/dist/core/auth/oauth/providers/google.js +1 -1
- package/dist/core/auth/oauth/providers/index.d.ts +5 -5
- package/dist/core/auth/oauth/providers/index.js +4 -4
- package/dist/core/auth/oauth/providers/kakao.d.ts +1 -1
- package/dist/core/auth/oauth/providers/kakao.js +1 -1
- package/dist/core/auth/oauth/providers/meta.d.ts +1 -1
- package/dist/core/auth/oauth/providers/meta.js +1 -1
- package/dist/core/auth/oauth/providers/microsoft.d.ts +1 -1
- package/dist/core/auth/oauth/providers/microsoft.js +1 -1
- package/dist/core/auth/oauth/state-cookie.js +1 -1
- package/dist/core/auth/password/client-helper.d.ts +9 -9
- package/dist/core/auth/password/client-helper.js +5 -3
- package/dist/core/auth/password/hasher.d.ts +83 -0
- package/dist/core/auth/password/hasher.js +14 -0
- package/dist/core/auth/password/index.d.ts +8 -6
- package/dist/core/auth/password/index.js +11 -2
- package/dist/core/auth/services/email-verification.service.d.ts +1 -1
- package/dist/core/auth/services/email-verification.service.js +3 -3
- package/dist/core/auth/services/index.d.ts +13 -12
- package/dist/core/auth/services/index.js +16 -16
- package/dist/core/auth/services/login.service.d.ts +15 -1
- package/dist/core/auth/services/login.service.js +6 -6
- package/dist/core/auth/services/oauth-callback.service.d.ts +7 -1
- package/dist/core/auth/services/oauth-callback.service.js +6 -6
- package/dist/core/auth/services/password-reset.service.d.ts +1 -1
- package/dist/core/auth/services/password-reset.service.js +3 -3
- package/dist/core/auth/services/refresh-token-store.d.ts +39 -0
- package/dist/core/auth/services/register.service.d.ts +1 -1
- package/dist/core/auth/services/register.service.js +3 -3
- package/dist/core/auth/services/token-refresh.service.d.ts +27 -1
- package/dist/core/auth/services/token-refresh.service.js +6 -6
- package/dist/core/auth/token-delivery.d.ts +47 -0
- package/dist/core/auth/token-delivery.js +14 -0
- package/dist/core/auth/types/index.d.ts +38 -4
- package/dist/core/auth/types/index.js +1 -1
- package/dist/core/cache/cache-config.js +5 -5
- package/dist/core/cache/cache-defaults.js +1 -1
- package/dist/core/cache/cache-env.d.ts +3 -3
- package/dist/core/cache/cache-env.js +4 -4
- package/dist/core/cache/cache-factory.d.ts +6 -6
- package/dist/core/cache/cache-factory.js +12 -12
- package/dist/core/cache/cache-invalidation.d.ts +4 -4
- package/dist/core/cache/cache-invalidation.js +13 -13
- package/dist/core/cache/cache-redis.js +6 -6
- package/dist/core/cache/cache-types.js +1 -1
- package/dist/core/cache/cache-wrapper.d.ts +1 -1
- package/dist/core/cache/cache-wrapper.js +13 -13
- package/dist/core/cache/cache.d.ts +2 -2
- package/dist/core/cache/cache.js +25 -25
- package/dist/core/cache/config.js +3 -3
- package/dist/core/cache/hybrid-cache-manager.d.ts +1 -1
- package/dist/core/cache/hybrid-cache-manager.js +8 -8
- package/dist/core/cache/index.d.ts +15 -15
- package/dist/core/cache/index.js +25 -25
- package/dist/core/cache/inmemory-cache-manager.d.ts +1 -1
- package/dist/core/cache/inmemory-cache-manager.js +3 -3
- package/dist/core/cache/noop-cache-manager.d.ts +1 -1
- package/dist/core/cache/noop-cache-manager.js +6 -6
- package/dist/core/cache/redis-cache-manager.d.ts +2 -2
- package/dist/core/cache/redis-cache-manager.js +7 -7
- package/dist/core/config/common.js +1 -1
- package/dist/core/config/errors.js +1 -1
- package/dist/core/config/registry.d.ts +7 -7
- package/dist/core/config/registry.js +1 -1
- package/dist/core/config/warn.js +1 -1
- package/dist/core/constants/error-codes.js +1 -1
- package/dist/core/constants/index.d.ts +5 -5
- package/dist/core/constants/index.js +17 -15
- package/dist/core/constants/messages.js +1 -1
- package/dist/core/constants/pagination.js +1 -1
- package/dist/core/constants/security.d.ts +15 -0
- package/dist/core/constants/security.js +4 -2
- package/dist/core/constants/validation.js +1 -1
- package/dist/core/cors/index.js +1 -1
- package/dist/core/error/app-error.d.ts +2 -2
- package/dist/core/error/app-error.js +1 -1
- package/dist/core/error/extract-error-info.js +1 -1
- package/dist/core/error/friendly-messages-v2.d.ts +3 -3
- package/dist/core/error/friendly-messages-v2.js +4 -4
- package/dist/core/error/friendly-messages.js +1 -1
- package/dist/core/error/index.d.ts +6 -6
- package/dist/core/error/index.js +7 -7
- package/dist/core/error/messages/en.d.ts +1 -1
- package/dist/core/error/messages/en.js +1 -1
- package/dist/core/error/messages/index.d.ts +2 -2
- package/dist/core/error/messages/index.js +3 -3
- package/dist/core/error/messages/ko.d.ts +1 -1
- package/dist/core/error/messages/ko.js +1 -1
- package/dist/core/geolocation/batch-processor.d.ts +1 -1
- package/dist/core/geolocation/batch-processor.js +3 -3
- package/dist/core/geolocation/config.js +1 -1
- package/dist/core/geolocation/index.d.ts +5 -5
- package/dist/core/geolocation/index.js +3 -3
- package/dist/core/geolocation/providers/base-provider.d.ts +2 -2
- package/dist/core/geolocation/providers/base-provider.js +1 -1
- package/dist/core/geolocation/providers/index.d.ts +6 -6
- package/dist/core/geolocation/providers/index.js +1 -1
- package/dist/core/geolocation/providers/ip-api-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/ip-api-provider.js +1 -1
- package/dist/core/geolocation/providers/ipapi-co-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/ipapi-co-provider.js +1 -1
- package/dist/core/geolocation/providers/ipgeolocation-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/ipgeolocation-provider.js +1 -1
- package/dist/core/geolocation/providers/maxmind-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/maxmind-provider.js +1 -1
- package/dist/core/logger/config.js +1 -1
- package/dist/core/logger/logger.js +2 -2
- package/dist/core/storage/config.js +1 -1
- package/dist/core/storage/r2-storage.js +2 -2
- package/dist/core/system/cpu.d.ts +1 -1
- package/dist/core/system/cpu.js +4 -4
- package/dist/core/system/disk.d.ts +1 -1
- package/dist/core/system/disk.js +4 -4
- package/dist/core/system/environment.d.ts +1 -1
- package/dist/core/system/environment.js +8 -8
- package/dist/core/system/health-check.d.ts +2 -2
- package/dist/core/system/health-check.js +6 -6
- package/dist/core/system/index.d.ts +7 -7
- package/dist/core/system/index.js +16 -16
- package/dist/core/system/memory.d.ts +1 -1
- package/dist/core/system/memory.js +4 -4
- package/dist/core/system/network.d.ts +1 -1
- package/dist/core/system/network.js +4 -4
- package/dist/core/system/utils.js +3 -3
- package/dist/core/types/geoip.d.ts +1 -1
- package/dist/core/types/qr-code.js +1 -1
- package/dist/core/utils/error-message-formatter.js +1 -1
- package/dist/core/utils/format-number.js +1 -1
- package/dist/core/utils/index.d.ts +3 -3
- package/dist/core/utils/index.js +2 -2
- package/dist/core/utils/input-validation.js +52 -16
- package/dist/core/utils/ip-utils.js +1 -1
- package/dist/core/utils/optimistic-lock.js +1 -1
- package/dist/core/utils/sanitizer.js +2 -2
- package/dist/core/utils/short-code-generator.js +1 -1
- package/dist/core/utils/timezone.js +121 -14
- package/dist/core/utils/type-guards.js +1 -1
- package/dist/core/utils/url-normalizer.js +1 -1
- package/dist/core/validators/index.d.ts +1 -1
- package/dist/core/validators/index.js +2 -2
- package/dist/core/validators/password-validator.d.ts +3 -3
- package/dist/core/validators/password-validator.js +2 -2
- package/dist/initialize.d.ts +10 -10
- package/dist/initialize.js +9 -9
- package/dist/next/auth-handlers/forgot-password.handler.d.ts +1 -1
- package/dist/next/auth-handlers/forgot-password.handler.js +4 -4
- package/dist/next/auth-handlers/index.d.ts +11 -11
- package/dist/next/auth-handlers/index.js +28 -27
- package/dist/next/auth-handlers/login.handler.d.ts +1 -1
- package/dist/next/auth-handlers/login.handler.js +7 -6
- package/dist/next/auth-handlers/logout.handler.d.ts +1 -1
- package/dist/next/auth-handlers/logout.handler.js +5 -5
- package/dist/next/auth-handlers/me.handler.d.ts +1 -1
- package/dist/next/auth-handlers/me.handler.js +7 -6
- package/dist/next/auth-handlers/oauth-authorize.handler.d.ts +1 -1
- package/dist/next/auth-handlers/oauth-authorize.handler.js +4 -4
- package/dist/next/auth-handlers/oauth-callback.handler.d.ts +1 -1
- package/dist/next/auth-handlers/oauth-callback.handler.js +9 -9
- package/dist/next/auth-handlers/refresh.handler.d.ts +1 -1
- package/dist/next/auth-handlers/refresh.handler.js +8 -7
- package/dist/next/auth-handlers/register.handler.d.ts +1 -1
- package/dist/next/auth-handlers/register.handler.js +4 -4
- package/dist/next/auth-handlers/reset-password.handler.d.ts +1 -1
- package/dist/next/auth-handlers/reset-password.handler.js +4 -4
- package/dist/next/auth-handlers/verify-email.handler.d.ts +1 -1
- package/dist/next/auth-handlers/verify-email.handler.js +4 -4
- package/dist/next/auth-types/handler-types.d.ts +5 -1
- package/dist/next/auth-types/handler-types.js +13 -1
- package/dist/next/auth-types/index.d.ts +1 -1
- package/dist/next/auth-types/index.js +13 -1
- package/dist/next/error/error-handler.js +5 -5
- package/dist/next/error/index.d.ts +3 -3
- package/dist/next/error/index.js +9 -9
- package/dist/next/error/locale-detector.d.ts +1 -1
- package/dist/next/error/locale-detector.js +1 -1
- package/dist/next/middleware/auth.d.ts +3 -3
- package/dist/next/middleware/auth.js +10 -9
- package/dist/next/middleware/cors.d.ts +2 -2
- package/dist/next/middleware/cors.js +3 -3
- package/dist/next/middleware/error-handler.d.ts +1 -1
- package/dist/next/middleware/error-handler.js +9 -9
- package/dist/next/middleware/index.d.ts +11 -11
- package/dist/next/middleware/index.js +23 -22
- package/dist/next/middleware/init-request.d.ts +1 -1
- package/dist/next/middleware/init-request.js +1 -1
- package/dist/next/middleware/middleware-chain.d.ts +1 -1
- package/dist/next/middleware/middleware-chain.js +3 -3
- package/dist/next/middleware/rate-limit.d.ts +2 -2
- package/dist/next/middleware/rate-limit.js +4 -4
- package/dist/next/middleware/response-logger.d.ts +1 -1
- package/dist/next/middleware/response-logger.js +3 -3
- package/dist/next/middleware/security.d.ts +1 -1
- package/dist/next/middleware/security.js +3 -3
- package/dist/next/middleware/types.d.ts +6 -3
- package/dist/next/middleware/wrappers.d.ts +2 -2
- package/dist/next/middleware/wrappers.js +21 -20
- package/dist/next/utils/api-helpers.d.ts +6 -2
- package/dist/next/utils/api-helpers.js +3 -2
- package/dist/next/utils/cors.js +2 -2
- package/dist/next/utils/csv-export-format.d.ts +11 -0
- package/dist/next/utils/csv-export-format.js +15 -0
- package/dist/next/utils/csv-export.d.ts +0 -2
- package/dist/next/utils/csv-export.js +3 -3
- package/dist/next/utils/error-processor.d.ts +1 -1
- package/dist/next/utils/error-processor.js +4 -4
- package/dist/next/utils/index.d.ts +5 -5
- package/dist/next/utils/index.js +21 -20
- package/dist/prisma/auth-adapter/index.d.ts +1 -1
- package/dist/prisma/auth-adapter/index.js +1 -1
- package/package.json +95 -51
- package/dist/chunk-2P4N4OK2.js +0 -150
- package/dist/chunk-4IQWQSEV.js +0 -27
- package/dist/chunk-4K76HG4V.js +0 -34
- package/dist/chunk-7EXSMZ2O.js +0 -29
- package/dist/chunk-7VXRBTRF.js +0 -110
- package/dist/chunk-ARXUKGZI.js +0 -58
- package/dist/chunk-B5OH43PR.js +0 -31
- package/dist/chunk-BW4QO7T6.js +0 -56
- package/dist/chunk-C6WH7RF5.js +0 -117
- package/dist/chunk-EK4TL7VW.js +0 -22
- package/dist/chunk-GPOSTBDQ.js +0 -193
- package/dist/chunk-IRUFNC4L.js +0 -26
- package/dist/chunk-J2MAXMIP.js +0 -105
- package/dist/chunk-MFMQO6IS.js +0 -127
- package/dist/chunk-NIWVKN6A.js +0 -81
- package/dist/chunk-OO2XOASJ.js +0 -240
- package/dist/chunk-PBQGXOVX.js +0 -31
- package/dist/chunk-STMAKLLG.js +0 -24
- package/dist/chunk-WP233RH2.js +0 -80
- package/dist/chunk-WWOYFWFB.js +0 -137
- package/dist/chunk-X7FGBUA4.js +0 -117
- package/dist/chunk-YSPIFSDI.js +0 -136
- package/dist/react/components/ui/Alert.d.ts +0 -12
- package/dist/react/components/ui/Alert.js +0 -10
- package/dist/react/components/ui/Badge.d.ts +0 -7
- package/dist/react/components/ui/Badge.js +0 -8
- package/dist/react/components/ui/Button.d.ts +0 -7
- package/dist/react/components/ui/Button.js +0 -8
- package/dist/react/components/ui/DataTable.d.ts +0 -8
- package/dist/react/components/ui/DataTable.js +0 -22
- package/dist/react/components/ui/DomainDisplay.d.ts +0 -12
- package/dist/react/components/ui/DomainDisplay.js +0 -31
- package/dist/react/components/ui/Input.d.ts +0 -5
- package/dist/react/components/ui/Input.js +0 -8
- package/dist/react/components/ui/Label.d.ts +0 -5
- package/dist/react/components/ui/Label.js +0 -8
- package/dist/react/components/ui/Pagination.d.ts +0 -42
- package/dist/react/components/ui/Pagination.js +0 -20
- package/dist/react/components/ui/Select.d.ts +0 -15
- package/dist/react/components/ui/Select.js +0 -27
- package/dist/react/components/ui/Skeleton.d.ts +0 -6
- package/dist/react/components/ui/Skeleton.js +0 -8
- package/dist/react/components/ui/TimezoneDisplay.d.ts +0 -22
- package/dist/react/components/ui/TimezoneDisplay.js +0 -83
- package/dist/react/components/ui/Tooltip.d.ts +0 -21
- package/dist/react/components/ui/Tooltip.js +0 -94
- package/dist/react/components/ui/data-table/DataTable.d.ts +0 -2
- package/dist/react/components/ui/data-table/DataTable.js +0 -22
- package/dist/react/components/ui/data-table/DataTableBody.d.ts +0 -19
- package/dist/react/components/ui/data-table/DataTableBody.js +0 -10
- package/dist/react/components/ui/data-table/DataTableBulkActions.d.ts +0 -17
- package/dist/react/components/ui/data-table/DataTableBulkActions.js +0 -12
- package/dist/react/components/ui/data-table/DataTableFilters.d.ts +0 -15
- package/dist/react/components/ui/data-table/DataTableFilters.js +0 -13
- package/dist/react/components/ui/data-table/DataTablePagination.d.ts +0 -10
- package/dist/react/components/ui/data-table/DataTablePagination.js +0 -11
- package/dist/react/components/ui/data-table/DataTableSearch.d.ts +0 -24
- package/dist/react/components/ui/data-table/DataTableSearch.js +0 -12
- package/dist/react/components/ui/data-table/index.d.ts +0 -13
- package/dist/react/components/ui/data-table/index.js +0 -42
- package/dist/react/components/ui/data-table/types.d.ts +0 -120
- package/dist/react/components/ui/data-table/types.js +0 -9
- package/dist/react/components/ui/loading-bar.d.ts +0 -20
- package/dist/react/components/ui/loading-bar.js +0 -15
- package/dist/react/error/error-display.d.ts +0 -48
- package/dist/react/error/error-display.js +0 -30
- package/dist/react/error/index.d.ts +0 -6
- package/dist/react/error/index.js +0 -30
- package/dist/react/hooks/useDataTable.d.ts +0 -96
- package/dist/react/hooks/useDataTable.js +0 -151
- package/dist/react/hooks/useDebounce.d.ts +0 -7
- package/dist/react/hooks/useDebounce.js +0 -7
- package/dist/react/hooks/useExitIntent.d.ts +0 -35
- package/dist/react/hooks/useExitIntent.js +0 -72
- package/dist/react/hooks/useTimezone.d.ts +0 -19
- package/dist/react/hooks/useTimezone.js +0 -11
- package/dist/react/utils/client-utils.d.ts +0 -3
- package/dist/react/utils/client-utils.js +0 -9
- package/dist/react/utils/qr-code.d.ts +0 -16
- package/dist/react/utils/qr-code.js +0 -215
- package/dist/{chunk-7PEVOMBO.js → chunk-AOWUPAPS.js} +0 -0
- package/dist/{chunk-V3GEYUBG.js → chunk-ER6LSA4M.js} +3 -3
- package/dist/{chunk-7WG7XPXC.js → chunk-KKZCNF6U.js} +3 -3
- /package/dist/{chunk-M22Z2NO6.js → core/auth/services/refresh-token-store.js} +0 -0
package/dist/chunk-J2MAXMIP.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-4K76HG4V.js";
|
|
4
|
-
|
|
5
|
-
// src/react/components/ui/Pagination.tsx
|
|
6
|
-
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
function Pagination({ children, className }) {
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
10
|
-
"nav",
|
|
11
|
-
{
|
|
12
|
-
className: cn("mx-auto flex w-full justify-center", className),
|
|
13
|
-
role: "navigation",
|
|
14
|
-
"aria-label": "pagination",
|
|
15
|
-
children
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
function PaginationContent({ children, className }) {
|
|
20
|
-
return /* @__PURE__ */ jsx("ul", { className: cn("flex flex-row items-center gap-1", className), children });
|
|
21
|
-
}
|
|
22
|
-
function PaginationItem({ children, className }) {
|
|
23
|
-
return /* @__PURE__ */ jsx("li", { className: cn("", className), children });
|
|
24
|
-
}
|
|
25
|
-
function PaginationLink({
|
|
26
|
-
children,
|
|
27
|
-
href,
|
|
28
|
-
onClick,
|
|
29
|
-
isActive = false,
|
|
30
|
-
className
|
|
31
|
-
}) {
|
|
32
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
-
"a",
|
|
34
|
-
{
|
|
35
|
-
href,
|
|
36
|
-
onClick,
|
|
37
|
-
className: cn(
|
|
38
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
39
|
-
isActive ? "h-10 px-4 bg-primary text-primary-foreground" : "h-10 px-4 hover:bg-accent hover:text-accent-foreground",
|
|
40
|
-
className
|
|
41
|
-
),
|
|
42
|
-
children
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
function PaginationPrevious({
|
|
47
|
-
href,
|
|
48
|
-
onClick,
|
|
49
|
-
className,
|
|
50
|
-
children
|
|
51
|
-
}) {
|
|
52
|
-
return /* @__PURE__ */ jsxs(
|
|
53
|
-
"a",
|
|
54
|
-
{
|
|
55
|
-
href,
|
|
56
|
-
onClick,
|
|
57
|
-
className: cn(
|
|
58
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 h-10 px-4 hover:bg-accent hover:text-accent-foreground",
|
|
59
|
-
className
|
|
60
|
-
),
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
|
|
63
|
-
/* @__PURE__ */ jsx("span", { className: "ml-2", children: children || "Previous" })
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
function PaginationNext({
|
|
69
|
-
href,
|
|
70
|
-
onClick,
|
|
71
|
-
className,
|
|
72
|
-
children
|
|
73
|
-
}) {
|
|
74
|
-
return /* @__PURE__ */ jsxs(
|
|
75
|
-
"a",
|
|
76
|
-
{
|
|
77
|
-
href,
|
|
78
|
-
onClick,
|
|
79
|
-
className: cn(
|
|
80
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 h-10 px-4 hover:bg-accent hover:text-accent-foreground",
|
|
81
|
-
className
|
|
82
|
-
),
|
|
83
|
-
children: [
|
|
84
|
-
/* @__PURE__ */ jsx("span", { className: "mr-2", children: children || "Next" }),
|
|
85
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
function PaginationEllipsis({ className }) {
|
|
91
|
-
return /* @__PURE__ */ jsxs("span", { className: cn("flex h-10 w-10 items-center justify-center", className), children: [
|
|
92
|
-
/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
|
|
93
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
94
|
-
] });
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export {
|
|
98
|
-
Pagination,
|
|
99
|
-
PaginationContent,
|
|
100
|
-
PaginationItem,
|
|
101
|
-
PaginationLink,
|
|
102
|
-
PaginationPrevious,
|
|
103
|
-
PaginationNext,
|
|
104
|
-
PaginationEllipsis
|
|
105
|
-
};
|
package/dist/chunk-MFMQO6IS.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatLabel
|
|
3
|
-
} from "./chunk-B5OH43PR.js";
|
|
4
|
-
import {
|
|
5
|
-
Pagination,
|
|
6
|
-
PaginationContent,
|
|
7
|
-
PaginationEllipsis,
|
|
8
|
-
PaginationItem,
|
|
9
|
-
PaginationLink,
|
|
10
|
-
PaginationNext,
|
|
11
|
-
PaginationPrevious
|
|
12
|
-
} from "./chunk-J2MAXMIP.js";
|
|
13
|
-
|
|
14
|
-
// src/react/components/ui/data-table/DataTablePagination.tsx
|
|
15
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
function DataTablePagination({
|
|
17
|
-
pagination,
|
|
18
|
-
labels
|
|
19
|
-
}) {
|
|
20
|
-
const totalPages = Math.ceil(pagination.total / pagination.pageSize);
|
|
21
|
-
return /* @__PURE__ */ jsx("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-3 p-3 bg-muted/50 rounded-lg", children: /* @__PURE__ */ jsx(Pagination, { className: "w-full", children: /* @__PURE__ */ jsxs(PaginationContent, { className: "flex-wrap gap-1 justify-between w-full items-center", children: [
|
|
22
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground text-center sm:text-left whitespace-nowrap", children: formatLabel(labels.showing, {
|
|
23
|
-
start: (pagination.page - 1) * pagination.pageSize + 1,
|
|
24
|
-
end: Math.min(pagination.page * pagination.pageSize, pagination.total),
|
|
25
|
-
total: pagination.total
|
|
26
|
-
}) }),
|
|
27
|
-
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsxs(
|
|
28
|
-
PaginationPrevious,
|
|
29
|
-
{
|
|
30
|
-
href: "#",
|
|
31
|
-
onClick: (e) => {
|
|
32
|
-
e.preventDefault();
|
|
33
|
-
if (pagination.page > 1) pagination.onPageChange(pagination.page - 1);
|
|
34
|
-
},
|
|
35
|
-
className: pagination.page <= 1 ? "pointer-events-none opacity-50" : "",
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: labels.previous }),
|
|
38
|
-
/* @__PURE__ */ jsx("span", { className: "sm:hidden", children: "\u2190" })
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
) }),
|
|
42
|
-
/* @__PURE__ */ jsx("div", { className: "hidden sm:flex", children: (() => {
|
|
43
|
-
const pages = [];
|
|
44
|
-
if (pagination.page > 3) {
|
|
45
|
-
pages.push(
|
|
46
|
-
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
47
|
-
PaginationLink,
|
|
48
|
-
{
|
|
49
|
-
href: "#",
|
|
50
|
-
onClick: (e) => {
|
|
51
|
-
e.preventDefault();
|
|
52
|
-
pagination.onPageChange(1);
|
|
53
|
-
},
|
|
54
|
-
children: "1"
|
|
55
|
-
}
|
|
56
|
-
) }, 1)
|
|
57
|
-
);
|
|
58
|
-
if (pagination.page > 4) {
|
|
59
|
-
pages.push(
|
|
60
|
-
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationEllipsis, {}) }, "ellipsis1")
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
for (let i = Math.max(1, pagination.page - 2); i <= Math.min(totalPages, pagination.page + 2); i++) {
|
|
65
|
-
pages.push(
|
|
66
|
-
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
67
|
-
PaginationLink,
|
|
68
|
-
{
|
|
69
|
-
href: "#",
|
|
70
|
-
isActive: i === pagination.page,
|
|
71
|
-
onClick: (e) => {
|
|
72
|
-
e.preventDefault();
|
|
73
|
-
pagination.onPageChange(i);
|
|
74
|
-
},
|
|
75
|
-
children: i
|
|
76
|
-
}
|
|
77
|
-
) }, i)
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
if (pagination.page < totalPages - 2) {
|
|
81
|
-
if (pagination.page < totalPages - 3) {
|
|
82
|
-
pages.push(
|
|
83
|
-
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationEllipsis, {}) }, "ellipsis2")
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
pages.push(
|
|
87
|
-
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
88
|
-
PaginationLink,
|
|
89
|
-
{
|
|
90
|
-
href: "#",
|
|
91
|
-
onClick: (e) => {
|
|
92
|
-
e.preventDefault();
|
|
93
|
-
pagination.onPageChange(totalPages);
|
|
94
|
-
},
|
|
95
|
-
children: totalPages
|
|
96
|
-
}
|
|
97
|
-
) }, totalPages)
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
return pages;
|
|
101
|
-
})() }),
|
|
102
|
-
/* @__PURE__ */ jsx("div", { className: "sm:hidden", children: /* @__PURE__ */ jsxs("span", { className: "px-3 py-2 text-sm font-medium", children: [
|
|
103
|
-
pagination.page,
|
|
104
|
-
" / ",
|
|
105
|
-
totalPages
|
|
106
|
-
] }) }),
|
|
107
|
-
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsxs(
|
|
108
|
-
PaginationNext,
|
|
109
|
-
{
|
|
110
|
-
href: "#",
|
|
111
|
-
onClick: (e) => {
|
|
112
|
-
e.preventDefault();
|
|
113
|
-
if (pagination.page < totalPages) pagination.onPageChange(pagination.page + 1);
|
|
114
|
-
},
|
|
115
|
-
className: pagination.page >= totalPages ? "pointer-events-none opacity-50" : "",
|
|
116
|
-
children: [
|
|
117
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: labels.next }),
|
|
118
|
-
/* @__PURE__ */ jsx("span", { className: "sm:hidden", children: "\u2192" })
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
) })
|
|
122
|
-
] }) }) });
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export {
|
|
126
|
-
DataTablePagination
|
|
127
|
-
};
|
package/dist/chunk-NIWVKN6A.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatLabel
|
|
3
|
-
} from "./chunk-B5OH43PR.js";
|
|
4
|
-
import {
|
|
5
|
-
LoadingBar
|
|
6
|
-
} from "./chunk-X7FGBUA4.js";
|
|
7
|
-
import {
|
|
8
|
-
Button
|
|
9
|
-
} from "./chunk-BW4QO7T6.js";
|
|
10
|
-
|
|
11
|
-
// src/react/components/ui/data-table/DataTableBulkActions.tsx
|
|
12
|
-
import { CheckSquare, Square, Loader2 } from "lucide-react";
|
|
13
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
function DataTableBulkActions({
|
|
15
|
-
bulkActions,
|
|
16
|
-
localSelectedIds,
|
|
17
|
-
dataLength,
|
|
18
|
-
bulkActionLoading,
|
|
19
|
-
onSelectAll,
|
|
20
|
-
onBulkAction,
|
|
21
|
-
labels
|
|
22
|
-
}) {
|
|
23
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 p-3 bg-muted rounded-lg", children: [
|
|
25
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
26
|
-
/* @__PURE__ */ jsxs(
|
|
27
|
-
Button,
|
|
28
|
-
{
|
|
29
|
-
"data-testid": "select-all-btn",
|
|
30
|
-
variant: "outline",
|
|
31
|
-
size: "sm",
|
|
32
|
-
onClick: () => {
|
|
33
|
-
const allSelected = localSelectedIds.length === dataLength && dataLength > 0;
|
|
34
|
-
onSelectAll(!allSelected);
|
|
35
|
-
},
|
|
36
|
-
className: "flex items-center gap-1 h-9 px-3",
|
|
37
|
-
children: [
|
|
38
|
-
localSelectedIds.length === dataLength && dataLength > 0 ? /* @__PURE__ */ jsx(CheckSquare, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Square, { className: "h-4 w-4" }),
|
|
39
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: labels.selectAll }),
|
|
40
|
-
/* @__PURE__ */ jsx("span", { className: "sm:hidden", children: labels.selectAllShort })
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: formatLabel(labels.selected, { count: localSelectedIds.length, total: dataLength }) })
|
|
45
|
-
] }) }),
|
|
46
|
-
localSelectedIds.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-2", children: bulkActions.map((action) => {
|
|
47
|
-
var _a;
|
|
48
|
-
const isLoading = bulkActionLoading === action.key;
|
|
49
|
-
const isDisabled = !!bulkActionLoading || ((_a = action.disabled) == null ? void 0 : _a.call(action, localSelectedIds)) || localSelectedIds.length === 0;
|
|
50
|
-
return /* @__PURE__ */ jsxs(
|
|
51
|
-
Button,
|
|
52
|
-
{
|
|
53
|
-
"data-testid": `bulk-action-${action.key}`,
|
|
54
|
-
variant: action.variant || "outline",
|
|
55
|
-
size: "sm",
|
|
56
|
-
onClick: () => onBulkAction(action),
|
|
57
|
-
disabled: isDisabled,
|
|
58
|
-
className: "flex items-center gap-1 h-9 text-xs",
|
|
59
|
-
children: [
|
|
60
|
-
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin" }) : action.icon,
|
|
61
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: isLoading ? labels.processing : action.label }),
|
|
62
|
-
/* @__PURE__ */ jsx("span", { className: "sm:hidden", children: isLoading ? "..." : action.label.split(" ")[0] })
|
|
63
|
-
]
|
|
64
|
-
},
|
|
65
|
-
action.key
|
|
66
|
-
);
|
|
67
|
-
}) })
|
|
68
|
-
] }),
|
|
69
|
-
bulkActionLoading && /* @__PURE__ */ jsxs("div", { className: "p-3 bg-muted/50 rounded-lg", children: [
|
|
70
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
71
|
-
/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin text-primary" }),
|
|
72
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: formatLabel(labels.processingItems, { count: localSelectedIds.length }) })
|
|
73
|
-
] }),
|
|
74
|
-
/* @__PURE__ */ jsx(LoadingBar, { size: "sm", variant: "primary", className: "mt-2" })
|
|
75
|
-
] })
|
|
76
|
-
] });
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export {
|
|
80
|
-
DataTableBulkActions
|
|
81
|
-
};
|
package/dist/chunk-OO2XOASJ.js
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DataTableBody
|
|
3
|
-
} from "./chunk-2P4N4OK2.js";
|
|
4
|
-
import {
|
|
5
|
-
DataTableBulkActions
|
|
6
|
-
} from "./chunk-NIWVKN6A.js";
|
|
7
|
-
import {
|
|
8
|
-
DataTableFilters
|
|
9
|
-
} from "./chunk-YSPIFSDI.js";
|
|
10
|
-
import {
|
|
11
|
-
DataTablePagination
|
|
12
|
-
} from "./chunk-MFMQO6IS.js";
|
|
13
|
-
import {
|
|
14
|
-
DataTableSearch
|
|
15
|
-
} from "./chunk-7VXRBTRF.js";
|
|
16
|
-
import {
|
|
17
|
-
DEFAULT_LABELS
|
|
18
|
-
} from "./chunk-B5OH43PR.js";
|
|
19
|
-
import {
|
|
20
|
-
Alert,
|
|
21
|
-
AlertDescription
|
|
22
|
-
} from "./chunk-PBQGXOVX.js";
|
|
23
|
-
import {
|
|
24
|
-
cn
|
|
25
|
-
} from "./chunk-4K76HG4V.js";
|
|
26
|
-
import {
|
|
27
|
-
__spreadValues
|
|
28
|
-
} from "./chunk-ORMEWXMH.js";
|
|
29
|
-
|
|
30
|
-
// src/react/components/ui/data-table/DataTable.tsx
|
|
31
|
-
import { useState, useEffect, useMemo, useRef } from "react";
|
|
32
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
-
var EMPTY_ARRAY = [];
|
|
34
|
-
var EMPTY_OBJECT = {};
|
|
35
|
-
function DataTable({
|
|
36
|
-
data,
|
|
37
|
-
columns,
|
|
38
|
-
loading = false,
|
|
39
|
-
error = null,
|
|
40
|
-
pagination,
|
|
41
|
-
sort,
|
|
42
|
-
bulkActions = EMPTY_ARRAY,
|
|
43
|
-
filters = EMPTY_ARRAY,
|
|
44
|
-
filterValues = EMPTY_OBJECT,
|
|
45
|
-
onFilterChange,
|
|
46
|
-
onClearFilters,
|
|
47
|
-
selectable = false,
|
|
48
|
-
onSelectionChange,
|
|
49
|
-
selectedIds = EMPTY_ARRAY,
|
|
50
|
-
getRowId,
|
|
51
|
-
className,
|
|
52
|
-
emptyMessage = "No data",
|
|
53
|
-
searchPlaceholder = "Search...",
|
|
54
|
-
onSearch,
|
|
55
|
-
onSearchValueChange,
|
|
56
|
-
searchValue = "",
|
|
57
|
-
showFilters = false,
|
|
58
|
-
onToggleFilters,
|
|
59
|
-
createButton,
|
|
60
|
-
labels: customLabels,
|
|
61
|
-
syncWithUrl = false
|
|
62
|
-
}) {
|
|
63
|
-
const customLabelsRef = useRef(customLabels);
|
|
64
|
-
const labelsRef = useRef(__spreadValues(__spreadValues({}, DEFAULT_LABELS), customLabels));
|
|
65
|
-
if (customLabelsRef.current !== customLabels) {
|
|
66
|
-
customLabelsRef.current = customLabels;
|
|
67
|
-
labelsRef.current = __spreadValues(__spreadValues({}, DEFAULT_LABELS), customLabels);
|
|
68
|
-
}
|
|
69
|
-
const labels = labelsRef.current;
|
|
70
|
-
const [localSelectedIds, setLocalSelectedIds] = useState(
|
|
71
|
-
selectedIds
|
|
72
|
-
);
|
|
73
|
-
const [bulkActionLoading, setBulkActionLoading] = useState(null);
|
|
74
|
-
const prevSelectedIdsRef = useRef(JSON.stringify(selectedIds));
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
const serialized = JSON.stringify(selectedIds);
|
|
77
|
-
if (serialized !== prevSelectedIdsRef.current) {
|
|
78
|
-
prevSelectedIdsRef.current = serialized;
|
|
79
|
-
setLocalSelectedIds(selectedIds);
|
|
80
|
-
}
|
|
81
|
-
}, [selectedIds]);
|
|
82
|
-
const hasActiveFilters = useMemo(() => {
|
|
83
|
-
if (searchValue && searchValue.trim()) return true;
|
|
84
|
-
for (const [key, value] of Object.entries(filterValues)) {
|
|
85
|
-
if (value === void 0 || value === null || value === "") continue;
|
|
86
|
-
if (value === "all") continue;
|
|
87
|
-
if (typeof value === "object" && value !== null) {
|
|
88
|
-
if (key === "dateRange" && (value.start || value.end)) return true;
|
|
89
|
-
if (key === "clickRange" && (value.min || value.max)) return true;
|
|
90
|
-
if (key === "lastClickedRange" && (value.start || value.end)) return true;
|
|
91
|
-
} else {
|
|
92
|
-
if (key === "activeFilter" && value !== "all") return true;
|
|
93
|
-
if (key === "publicFilter" && value !== "all") return true;
|
|
94
|
-
if (key === "expirationFilter" && value !== "all") return true;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return false;
|
|
98
|
-
}, [searchValue, filterValues]);
|
|
99
|
-
useEffect(() => {
|
|
100
|
-
if (!syncWithUrl || typeof window === "undefined") return;
|
|
101
|
-
const params = new URLSearchParams(window.location.search);
|
|
102
|
-
let changed = false;
|
|
103
|
-
if (searchValue) {
|
|
104
|
-
if (params.get("search") !== searchValue) {
|
|
105
|
-
params.set("search", searchValue);
|
|
106
|
-
changed = true;
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
if (params.has("search")) {
|
|
110
|
-
params.delete("search");
|
|
111
|
-
changed = true;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (sort) {
|
|
115
|
-
if (params.get("sort") !== sort.sort) {
|
|
116
|
-
params.set("sort", sort.sort);
|
|
117
|
-
changed = true;
|
|
118
|
-
}
|
|
119
|
-
if (params.get("order") !== sort.order) {
|
|
120
|
-
params.set("order", sort.order);
|
|
121
|
-
changed = true;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
if (pagination) {
|
|
125
|
-
const pageStr = String(pagination.page);
|
|
126
|
-
const pageSizeStr = String(pagination.pageSize);
|
|
127
|
-
if (params.get("page") !== pageStr) {
|
|
128
|
-
params.set("page", pageStr);
|
|
129
|
-
changed = true;
|
|
130
|
-
}
|
|
131
|
-
if (params.get("pageSize") !== pageSizeStr) {
|
|
132
|
-
params.set("pageSize", pageSizeStr);
|
|
133
|
-
changed = true;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
if (changed) {
|
|
137
|
-
const newUrl = `${window.location.pathname}?${params.toString()}`;
|
|
138
|
-
window.history.replaceState(null, "", newUrl);
|
|
139
|
-
}
|
|
140
|
-
}, [syncWithUrl, searchValue, sort == null ? void 0 : sort.sort, sort == null ? void 0 : sort.order, pagination == null ? void 0 : pagination.page, pagination == null ? void 0 : pagination.pageSize]);
|
|
141
|
-
const handleSelectAll = (checked) => {
|
|
142
|
-
const newSelection = checked ? data.map((item) => getRowId(item)) : [];
|
|
143
|
-
setLocalSelectedIds(newSelection);
|
|
144
|
-
onSelectionChange == null ? void 0 : onSelectionChange(newSelection);
|
|
145
|
-
};
|
|
146
|
-
const handleSelect = (id, checked) => {
|
|
147
|
-
const newSelection = checked ? [...localSelectedIds, id] : localSelectedIds.filter((item) => item !== id);
|
|
148
|
-
setLocalSelectedIds(newSelection);
|
|
149
|
-
onSelectionChange == null ? void 0 : onSelectionChange(newSelection);
|
|
150
|
-
};
|
|
151
|
-
const handleSort = (columnKey) => {
|
|
152
|
-
if (!sort) return;
|
|
153
|
-
if (sort.sort === columnKey) {
|
|
154
|
-
sort.onSortChange(columnKey, sort.order === "asc" ? "desc" : "asc");
|
|
155
|
-
} else {
|
|
156
|
-
sort.onSortChange(columnKey, "asc");
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
const handleBulkAction = async (action) => {
|
|
160
|
-
if (localSelectedIds.length === 0 || bulkActionLoading) return;
|
|
161
|
-
setBulkActionLoading(action.key);
|
|
162
|
-
try {
|
|
163
|
-
await action.onClick(localSelectedIds);
|
|
164
|
-
} finally {
|
|
165
|
-
setBulkActionLoading(null);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
const visibleColumns = columns.filter((col) => !col.hidden);
|
|
169
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), children: [
|
|
170
|
-
(onSearch || createButton) && /* @__PURE__ */ jsx(
|
|
171
|
-
DataTableSearch,
|
|
172
|
-
{
|
|
173
|
-
onSearch,
|
|
174
|
-
onSearchValueChange,
|
|
175
|
-
searchValue,
|
|
176
|
-
searchPlaceholder,
|
|
177
|
-
labels,
|
|
178
|
-
filters,
|
|
179
|
-
onToggleFilters,
|
|
180
|
-
showFilters,
|
|
181
|
-
hasActiveFilters,
|
|
182
|
-
pagination,
|
|
183
|
-
createButton
|
|
184
|
-
}
|
|
185
|
-
),
|
|
186
|
-
showFilters && filters.length > 0 && /* @__PURE__ */ jsx(
|
|
187
|
-
DataTableFilters,
|
|
188
|
-
{
|
|
189
|
-
filters,
|
|
190
|
-
filterValues,
|
|
191
|
-
onFilterChange,
|
|
192
|
-
onClearFilters,
|
|
193
|
-
hasActiveFilters,
|
|
194
|
-
labels
|
|
195
|
-
}
|
|
196
|
-
),
|
|
197
|
-
selectable && bulkActions.length > 0 && /* @__PURE__ */ jsx(
|
|
198
|
-
DataTableBulkActions,
|
|
199
|
-
{
|
|
200
|
-
bulkActions,
|
|
201
|
-
localSelectedIds,
|
|
202
|
-
dataLength: data.length,
|
|
203
|
-
bulkActionLoading,
|
|
204
|
-
onSelectAll: handleSelectAll,
|
|
205
|
-
onBulkAction: handleBulkAction,
|
|
206
|
-
labels
|
|
207
|
-
}
|
|
208
|
-
),
|
|
209
|
-
error && /* @__PURE__ */ jsx(Alert, { variant: "destructive", children: /* @__PURE__ */ jsx(AlertDescription, { children: error }) }),
|
|
210
|
-
/* @__PURE__ */ jsx(
|
|
211
|
-
DataTableBody,
|
|
212
|
-
{
|
|
213
|
-
data,
|
|
214
|
-
visibleColumns,
|
|
215
|
-
loading,
|
|
216
|
-
error,
|
|
217
|
-
emptyMessage,
|
|
218
|
-
selectable,
|
|
219
|
-
localSelectedIds,
|
|
220
|
-
getRowId,
|
|
221
|
-
onSelectAll: handleSelectAll,
|
|
222
|
-
onSelect: handleSelect,
|
|
223
|
-
sort,
|
|
224
|
-
onSort: handleSort,
|
|
225
|
-
labels
|
|
226
|
-
}
|
|
227
|
-
),
|
|
228
|
-
pagination && pagination.total > 0 && /* @__PURE__ */ jsx(
|
|
229
|
-
DataTablePagination,
|
|
230
|
-
{
|
|
231
|
-
pagination,
|
|
232
|
-
labels
|
|
233
|
-
}
|
|
234
|
-
)
|
|
235
|
-
] });
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export {
|
|
239
|
-
DataTable
|
|
240
|
-
};
|
package/dist/chunk-PBQGXOVX.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-4K76HG4V.js";
|
|
4
|
-
|
|
5
|
-
// src/react/components/ui/Alert.tsx
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
function Alert({ variant = "default", children, className }) {
|
|
8
|
-
const variantClasses = {
|
|
9
|
-
default: "bg-background text-foreground",
|
|
10
|
-
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
11
|
-
};
|
|
12
|
-
return /* @__PURE__ */ jsx(
|
|
13
|
-
"div",
|
|
14
|
-
{
|
|
15
|
-
className: cn(
|
|
16
|
-
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
17
|
-
variantClasses[variant],
|
|
18
|
-
className
|
|
19
|
-
),
|
|
20
|
-
children
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
function AlertDescription({ children, className }) {
|
|
25
|
-
return /* @__PURE__ */ jsx("div", { className: cn("text-sm [&_p]:leading-relaxed", className), children });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
Alert,
|
|
30
|
-
AlertDescription
|
|
31
|
-
};
|
package/dist/chunk-STMAKLLG.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cn
|
|
3
|
-
} from "./chunk-4K76HG4V.js";
|
|
4
|
-
|
|
5
|
-
// src/react/components/ui/Badge.tsx
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
function Badge({
|
|
8
|
-
children,
|
|
9
|
-
variant = "default",
|
|
10
|
-
className
|
|
11
|
-
}) {
|
|
12
|
-
const baseClasses = "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2";
|
|
13
|
-
const variantClasses = {
|
|
14
|
-
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
15
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
17
|
-
outline: "text-foreground"
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ jsx("div", { className: cn(baseClasses, variantClasses[variant], className), children });
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
Badge
|
|
24
|
-
};
|
package/dist/chunk-WP233RH2.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getTimezoneOffset,
|
|
3
|
-
getUserTimezone
|
|
4
|
-
} from "./chunk-WWOYFWFB.js";
|
|
5
|
-
import {
|
|
6
|
-
__spreadProps,
|
|
7
|
-
__spreadValues
|
|
8
|
-
} from "./chunk-ORMEWXMH.js";
|
|
9
|
-
|
|
10
|
-
// src/react/hooks/useTimezone.ts
|
|
11
|
-
import { useState, useEffect, useCallback } from "react";
|
|
12
|
-
function useTimezone() {
|
|
13
|
-
const [timezoneInfo, setTimezoneInfo] = useState({
|
|
14
|
-
timezone: "UTC",
|
|
15
|
-
offset: 0,
|
|
16
|
-
offsetFormatted: "+00:00"
|
|
17
|
-
});
|
|
18
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
try {
|
|
21
|
-
const timezone = getUserTimezone();
|
|
22
|
-
const offset = getTimezoneOffset();
|
|
23
|
-
const offsetFormatted = formatOffset(offset);
|
|
24
|
-
setTimezoneInfo({
|
|
25
|
-
timezone,
|
|
26
|
-
offset,
|
|
27
|
-
offsetFormatted
|
|
28
|
-
});
|
|
29
|
-
} catch (error) {
|
|
30
|
-
console.warn("Cannot get timezone information:", error);
|
|
31
|
-
setTimezoneInfo({
|
|
32
|
-
timezone: "UTC",
|
|
33
|
-
offset: 0,
|
|
34
|
-
offsetFormatted: "+00:00"
|
|
35
|
-
});
|
|
36
|
-
} finally {
|
|
37
|
-
setIsLoading(false);
|
|
38
|
-
}
|
|
39
|
-
}, []);
|
|
40
|
-
const formatOffset = useCallback((offsetMinutes) => {
|
|
41
|
-
const absOffset = Math.abs(offsetMinutes);
|
|
42
|
-
const hours = Math.floor(absOffset / 60);
|
|
43
|
-
const minutes = absOffset % 60;
|
|
44
|
-
const sign = offsetMinutes <= 0 ? "+" : "-";
|
|
45
|
-
return `${sign}${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
|
|
46
|
-
}, []);
|
|
47
|
-
const refreshTimezone = useCallback(() => {
|
|
48
|
-
try {
|
|
49
|
-
const timezone = getUserTimezone();
|
|
50
|
-
const offset = getTimezoneOffset();
|
|
51
|
-
const offsetFormatted = formatOffset(offset);
|
|
52
|
-
setTimezoneInfo({
|
|
53
|
-
timezone,
|
|
54
|
-
offset,
|
|
55
|
-
offsetFormatted
|
|
56
|
-
});
|
|
57
|
-
} catch (error) {
|
|
58
|
-
console.error("Failed to refresh timezone information:", error);
|
|
59
|
-
}
|
|
60
|
-
}, [formatOffset]);
|
|
61
|
-
return __spreadProps(__spreadValues({}, timezoneInfo), {
|
|
62
|
-
isLoading,
|
|
63
|
-
refreshTimezone
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function useSimpleTimezone() {
|
|
67
|
-
const { timezone, offsetFormatted, isLoading } = useTimezone();
|
|
68
|
-
return {
|
|
69
|
-
timezone,
|
|
70
|
-
offsetFormatted,
|
|
71
|
-
isLoading,
|
|
72
|
-
// 간단한 표시용
|
|
73
|
-
display: `${timezone} (${offsetFormatted})`
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export {
|
|
78
|
-
useTimezone,
|
|
79
|
-
useSimpleTimezone
|
|
80
|
-
};
|